From d1102dba7210b95e41d06c2338a22ba6af248645 Mon Sep 17 00:00:00 2001 From: Liming Gao Date: Wed, 27 Jun 2018 21:08:52 +0800 Subject: [PATCH] MdeModulePkg: Clean up source files 1. Do not use tab characters 2. No trailing white space in one line 3. All files must end with CRLF Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao Reviewed-by: Star Zeng --- .../BootManagerMenuApp/BootManagerMenu.c | 266 ++++++------ .../BootManagerMenuApp/BootManagerMenu.h | 10 +- .../BootManagerMenuApp/BootManagerMenuApp.inf | 10 +- .../BootManagerMenuApp/BootManagerMenuApp.uni | 4 +- .../BootManagerMenuAppExtra.uni | 6 +- .../BootManagerMenuStrings.uni | 4 +- .../Application/HelloWorld/HelloWorld.c | 38 +- .../Application/HelloWorld/HelloWorld.uni | 4 +- .../HelloWorld/HelloWorldExtra.uni | 6 +- .../MemoryProfileInfoExtra.uni | 6 +- MdeModulePkg/Application/UiApp/UiApp.inf | 8 +- .../VariableInfo/VariableInfoExtra.uni | 6 +- .../Bus/Ata/AtaAtapiPassThru/AhciMode.c | 4 +- .../Bus/Ata/AtaAtapiPassThru/AhciMode.h | 40 +- .../Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf | 6 +- .../AtaAtapiPassThruDxeExtra.uni | 6 +- .../Bus/Ata/AtaAtapiPassThru/ComponentName.c | 18 +- .../Bus/Ata/AtaAtapiPassThru/IdeMode.h | 24 +- .../Bus/Ata/AtaBusDxe/AtaBusDxeExtra.uni | 6 +- .../Bus/Ata/AtaBusDxe/AtaPassThruExecute.c | 4 +- .../Bus/Ata/AtaBusDxe/ComponentName.c | 18 +- MdeModulePkg/Bus/I2c/I2cDxe/I2cBus.c | 68 +-- .../Bus/I2c/I2cDxe/I2cBusDxeExtra.uni | 6 +- MdeModulePkg/Bus/I2c/I2cDxe/I2cDxe.h | 16 +- MdeModulePkg/Bus/I2c/I2cDxe/I2cDxeExtra.uni | 6 +- MdeModulePkg/Bus/I2c/I2cDxe/I2cHost.c | 44 +- .../Bus/I2c/I2cDxe/I2cHostDxeExtra.uni | 6 +- .../Bus/Isa/IsaBusDxe/ComponentName.c | 18 +- .../Bus/Isa/IsaBusDxe/ComponentName.h | 18 +- MdeModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.c | 70 +-- MdeModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf | 6 +- .../Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c | 2 +- MdeModulePkg/Bus/Pci/EhciDxe/ComponentName.c | 4 +- MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c | 22 +- MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h | 4 +- MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf | 8 +- MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.uni | 6 +- MdeModulePkg/Bus/Pci/EhciDxe/EhciDxeExtra.uni | 6 +- MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c | 4 +- MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.c | 126 +++--- MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.h | 26 +- MdeModulePkg/Bus/Pci/EhciPei/EhciPei.inf | 4 +- MdeModulePkg/Bus/Pci/EhciPei/EhciPei.uni | 4 +- MdeModulePkg/Bus/Pci/EhciPei/EhciPeiExtra.uni | 6 +- MdeModulePkg/Bus/Pci/EhciPei/EhciReg.h | 36 +- MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c | 30 +- MdeModulePkg/Bus/Pci/EhciPei/EhciSched.h | 14 +- MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c | 36 +- MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.h | 54 +-- MdeModulePkg/Bus/Pci/EhciPei/UsbHcMem.c | 30 +- MdeModulePkg/Bus/Pci/EhciPei/UsbHcMem.h | 18 +- MdeModulePkg/Bus/Pci/IdeBusPei/AtapiPeim.c | 124 +++--- MdeModulePkg/Bus/Pci/IdeBusPei/AtapiPeim.h | 102 ++--- MdeModulePkg/Bus/Pci/IdeBusPei/IdeBusPei.uni | 6 +- .../Bus/Pci/IdeBusPei/IdeBusPeiExtra.uni | 6 +- .../IncompatiblePciDeviceSupport.c | 6 +- .../IncompatiblePciDeviceSupportDxe.inf | 4 +- .../IncompatiblePciDeviceSupportExtra.uni | 6 +- .../Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf | 4 +- .../Pci/NvmExpressDxe/NvmExpressDxeExtra.uni | 6 +- .../Bus/Pci/NvmExpressDxe/NvmExpressHci.c | 4 +- .../Pci/NvmExpressDxe/NvmExpressPassthru.c | 2 +- MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c | 10 +- MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf | 6 +- .../Bus/Pci/PciBusDxe/PciBusDxeExtra.uni | 6 +- .../Bus/Pci/PciBusDxe/PciDeviceSupport.c | 4 +- .../Bus/Pci/PciBusDxe/PciEnumerator.c | 12 +- .../Bus/Pci/PciBusDxe/PciEnumeratorSupport.c | 6 +- MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c | 44 +- MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c | 6 +- .../Bus/Pci/PciBusDxe/PciOptionRomSupport.c | 8 +- .../Bus/Pci/PciBusDxe/PciResourceSupport.c | 4 +- .../Pci/PciHostBridgeDxe/PciRootBridgeIo.c | 2 +- .../Pci/PciSioSerialDxe/PciSioSerialDxe.uni | 4 +- .../PciSioSerialDxe/PciSioSerialDxeExtra.uni | 6 +- MdeModulePkg/Bus/Pci/PciSioSerialDxe/Serial.c | 10 +- MdeModulePkg/Bus/Pci/PciSioSerialDxe/Serial.h | 6 +- .../Bus/Pci/PciSioSerialDxe/SerialIo.c | 14 +- .../Bus/Pci/SataControllerDxe/ComponentName.c | 8 +- .../Pci/SataControllerDxe/SataController.c | 218 +++++----- .../Pci/SataControllerDxe/SataController.h | 212 ++++----- .../SataControllerDxe/SataControllerDxe.inf | 8 +- .../SataControllerDxe/SataControllerDxe.uni | 6 +- .../SataControllerDxeExtra.uni | 6 +- .../Bus/Pci/SdMmcPciHcPei/SdMmcPciHcPei.c | 4 +- .../Bus/Pci/SdMmcPciHcPei/SdMmcPciHcPei.inf | 4 +- .../Bus/Pci/UfsPciHcDxe/ComponentName.c | 4 +- .../Bus/Pci/UfsPciHcDxe/UfsPciHcDxe.c | 78 ++-- .../Bus/Pci/UfsPciHcDxe/UfsPciHcDxe.h | 80 ++-- .../Bus/Pci/UfsPciHcDxe/UfsPciHcDxe.inf | 4 +- .../Bus/Pci/UfsPciHcDxe/UfsPciHcDxe.uni | 4 +- .../Bus/Pci/UfsPciHcDxe/UfsPciHcDxeExtra.uni | 6 +- .../Bus/Pci/UfsPciHcPei/UfsPciHcPei.c | 6 +- .../Bus/Pci/UfsPciHcPei/UfsPciHcPei.inf | 4 +- .../Bus/Pci/UfsPciHcPei/UfsPciHcPei.uni | 4 +- .../Bus/Pci/UfsPciHcPei/UfsPciHcPeiExtra.uni | 6 +- MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c | 6 +- MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h | 4 +- MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf | 8 +- MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.uni | 4 +- MdeModulePkg/Bus/Pci/UhciDxe/UhciDxeExtra.uni | 6 +- MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c | 42 +- MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.h | 40 +- MdeModulePkg/Bus/Pci/UhciPei/UhciPei.uni | 4 +- MdeModulePkg/Bus/Pci/UhciPei/UhciPeiExtra.uni | 6 +- MdeModulePkg/Bus/Pci/XhciDxe/UsbHcMem.c | 28 +- MdeModulePkg/Bus/Pci/XhciDxe/UsbHcMem.h | 14 +- MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c | 10 +- MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf | 4 +- MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.uni | 4 +- MdeModulePkg/Bus/Pci/XhciDxe/XhciDxeExtra.uni | 6 +- MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c | 40 +- MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.h | 8 +- MdeModulePkg/Bus/Pci/XhciPei/XhciPei.uni | 4 +- MdeModulePkg/Bus/Pci/XhciPei/XhciPeiExtra.uni | 6 +- MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c | 116 ++--- MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.h | 60 +-- MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.uni | 4 +- .../Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf | 10 +- .../Bus/Scsi/ScsiBusDxe/ScsiBusExtra.uni | 6 +- .../Bus/Scsi/ScsiDiskDxe/ComponentName.c | 4 +- MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c | 126 +++--- MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.h | 60 +-- .../Bus/Scsi/ScsiDiskDxe/ScsiDisk.uni | 4 +- .../Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf | 8 +- .../Bus/Scsi/ScsiDiskDxe/ScsiDiskExtra.uni | 6 +- MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.c | 4 +- .../Bus/Ufs/UfsBlockIoPei/UfsBlockIoPei.c | 208 ++++----- .../Bus/Ufs/UfsBlockIoPei/UfsBlockIoPei.h | 176 ++++---- .../Bus/Ufs/UfsBlockIoPei/UfsBlockIoPei.uni | 4 +- .../Ufs/UfsBlockIoPei/UfsBlockIoPeiExtra.uni | 6 +- MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHcMem.c | 24 +- MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHcMem.h | 6 +- MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHci.c | 78 ++-- MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHci.h | 46 +- .../Bus/Ufs/UfsPassThruDxe/ComponentName.c | 20 +- .../Bus/Ufs/UfsPassThruDxe/UfsPassThru.c | 18 +- .../Bus/Ufs/UfsPassThruDxe/UfsPassThru.h | 6 +- .../Bus/Ufs/UfsPassThruDxe/UfsPassThru.uni | 6 +- .../Bus/Ufs/UfsPassThruDxe/UfsPassThruDxe.inf | 6 +- .../Ufs/UfsPassThruDxe/UfsPassThruExtra.uni | 6 +- .../Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c | 32 +- .../Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.h | 46 +- MdeModulePkg/Bus/Usb/UsbBotPei/BotPeim.c | 4 +- MdeModulePkg/Bus/Usb/UsbBotPei/BotPeim.h | 10 +- MdeModulePkg/Bus/Usb/UsbBotPei/PeiAtapi.c | 10 +- MdeModulePkg/Bus/Usb/UsbBotPei/PeiUsbLib.c | 4 +- MdeModulePkg/Bus/Usb/UsbBotPei/PeiUsbLib.h | 6 +- MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPei.uni | 4 +- .../Bus/Usb/UsbBotPei/UsbBotPeiExtra.uni | 6 +- MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPeim.c | 74 ++-- MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPeim.h | 62 +-- MdeModulePkg/Bus/Usb/UsbBotPei/UsbPeim.h | 4 +- MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c | 20 +- MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.h | 4 +- MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf | 6 +- MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.uni | 4 +- .../Bus/Usb/UsbBusDxe/UsbBusDxeExtra.uni | 6 +- MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.c | 6 +- MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c | 60 +-- MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c | 6 +- MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.h | 2 +- MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c | 6 +- MdeModulePkg/Bus/Usb/UsbBusPei/HubPeim.c | 4 +- MdeModulePkg/Bus/Usb/UsbBusPei/HubPeim.h | 2 +- MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.c | 4 +- MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.h | 4 +- MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.inf | 4 +- MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.uni | 4 +- .../Bus/Usb/UsbBusPei/UsbBusPeiExtra.uni | 6 +- MdeModulePkg/Bus/Usb/UsbBusPei/UsbIoPeim.c | 10 +- MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.c | 88 ++-- MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.h | 14 +- MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c | 6 +- MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf | 6 +- MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.uni | 4 +- .../Bus/Usb/UsbKbDxe/UsbKbDxeExtra.uni | 6 +- .../Bus/Usb/UsbMassStorageDxe/UsbMass.h | 4 +- .../Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c | 14 +- .../Bus/Usb/UsbMassStorageDxe/UsbMassBoot.h | 12 +- .../Bus/Usb/UsbMassStorageDxe/UsbMassBot.c | 4 +- .../Bus/Usb/UsbMassStorageDxe/UsbMassBot.h | 4 +- .../Bus/Usb/UsbMassStorageDxe/UsbMassCbi.c | 4 +- .../Bus/Usb/UsbMassStorageDxe/UsbMassCbi.h | 4 +- .../Usb/UsbMassStorageDxe/UsbMassDiskInfo.c | 26 +- .../Usb/UsbMassStorageDxe/UsbMassDiskInfo.h | 26 +- .../Bus/Usb/UsbMassStorageDxe/UsbMassImpl.c | 78 ++-- .../Bus/Usb/UsbMassStorageDxe/UsbMassImpl.h | 8 +- .../UsbMassStorageDxe/UsbMassStorageDxe.inf | 4 +- .../UsbMassStorageDxe/UsbMassStorageDxe.uni | 4 +- .../UsbMassStorageDxeExtra.uni | 6 +- .../UsbMouseAbsolutePointer.c | 30 +- .../UsbMouseAbsolutePointer.h | 10 +- .../UsbMouseAbsolutePointerDxe.inf | 4 +- .../UsbMouseAbsolutePointerDxe.uni | 4 +- .../UsbMouseAbsolutePointerDxeExtra.uni | 6 +- MdeModulePkg/Bus/Usb/UsbMouseDxe/MouseHid.c | 4 +- MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c | 28 +- MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.h | 22 +- .../Bus/Usb/UsbMouseDxe/UsbMouseDxe.inf | 4 +- .../Bus/Usb/UsbMouseDxe/UsbMouseDxe.uni | 4 +- .../Bus/Usb/UsbMouseDxe/UsbMouseDxeExtra.uni | 6 +- MdeModulePkg/Core/Dxe/Dispatcher/Dependency.c | 4 +- MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c | 30 +- MdeModulePkg/Core/Dxe/DxeCore.uni | 4 +- MdeModulePkg/Core/Dxe/DxeCoreExtra.uni | 6 +- MdeModulePkg/Core/Dxe/DxeMain.h | 54 +-- MdeModulePkg/Core/Dxe/DxeMain.inf | 8 +- MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c | 6 +- .../Core/Dxe/DxeMain/DxeProtocolNotify.c | 6 +- MdeModulePkg/Core/Dxe/Event/Tpl.c | 4 +- MdeModulePkg/Core/Dxe/FwVol/FwVol.c | 30 +- MdeModulePkg/Core/Dxe/FwVolBlock/FwVolBlock.c | 8 +- MdeModulePkg/Core/Dxe/Gcd/Gcd.c | 76 ++-- MdeModulePkg/Core/Dxe/Hand/DriverSupport.c | 8 +- MdeModulePkg/Core/Dxe/Hand/Handle.c | 6 +- MdeModulePkg/Core/Dxe/Hand/Handle.h | 32 +- MdeModulePkg/Core/Dxe/Hand/Locate.c | 6 +- MdeModulePkg/Core/Dxe/Image/Image.c | 94 ++-- MdeModulePkg/Core/Dxe/Image/Image.h | 10 +- .../Core/Dxe/Mem/MemoryProfileRecord.c | 12 +- MdeModulePkg/Core/Dxe/Mem/Page.c | 106 ++--- MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c | 20 +- .../Core/Dxe/Misc/MemoryAttributesTable.c | 6 +- MdeModulePkg/Core/Dxe/Misc/Stall.c | 12 +- .../SectionExtraction/CoreSectionExtraction.c | 22 +- .../Core/DxeIplPeim/Arm/DxeLoadFunc.c | 8 +- MdeModulePkg/Core/DxeIplPeim/DxeIpl.uni | 4 +- MdeModulePkg/Core/DxeIplPeim/DxeIplExtra.uni | 6 +- MdeModulePkg/Core/DxeIplPeim/DxeLoad.c | 70 +-- .../Core/DxeIplPeim/Ebc/DxeLoadFunc.c | 4 +- .../Core/DxeIplPeim/Ia32/DxeLoadFunc.c | 6 +- .../Core/DxeIplPeim/X64/DxeLoadFunc.c | 6 +- .../Core/DxeIplPeim/X64/VirtualMemory.c | 16 +- .../Core/DxeIplPeim/X64/VirtualMemory.h | 22 +- MdeModulePkg/Core/Pei/BootMode/BootMode.c | 36 +- MdeModulePkg/Core/Pei/CpuIo/CpuIo.c | 138 +++--- MdeModulePkg/Core/Pei/Dependency/Dependency.c | 48 +-- MdeModulePkg/Core/Pei/Dependency/Dependency.h | 18 +- MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c | 248 +++++------ MdeModulePkg/Core/Pei/FwVol/FwVol.c | 382 ++++++++-------- MdeModulePkg/Core/Pei/FwVol/FwVol.h | 104 ++--- MdeModulePkg/Core/Pei/Hob/Hob.c | 40 +- MdeModulePkg/Core/Pei/Image/Image.c | 50 +-- MdeModulePkg/Core/Pei/Memory/MemoryServices.c | 44 +- MdeModulePkg/Core/Pei/PciCfg2/PciCfg2.c | 48 +-- MdeModulePkg/Core/Pei/PeiCoreExtra.uni | 6 +- MdeModulePkg/Core/Pei/PeiMain.h | 204 ++++----- MdeModulePkg/Core/Pei/PeiMain.inf | 12 +- MdeModulePkg/Core/Pei/PeiMain/PeiMain.c | 32 +- MdeModulePkg/Core/Pei/Ppi/Ppi.c | 34 +- MdeModulePkg/Core/Pei/Security/Security.c | 22 +- MdeModulePkg/Core/Pei/StatusCode/StatusCode.c | 38 +- MdeModulePkg/Core/PiSmmCore/Dependency.c | 18 +- MdeModulePkg/Core/PiSmmCore/Dispatcher.c | 88 ++-- MdeModulePkg/Core/PiSmmCore/Handle.c | 16 +- .../PiSmmCore/InstallConfigurationTable.c | 16 +- MdeModulePkg/Core/PiSmmCore/Locate.c | 16 +- MdeModulePkg/Core/PiSmmCore/Notify.c | 20 +- MdeModulePkg/Core/PiSmmCore/PiSmmCore.c | 36 +- MdeModulePkg/Core/PiSmmCore/PiSmmCore.h | 26 +- MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf | 10 +- .../Core/PiSmmCore/PiSmmCoreExtra.uni | 6 +- .../Core/PiSmmCore/PiSmmCorePrivateData.h | 56 +-- MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c | 138 +++--- MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf | 8 +- MdeModulePkg/Core/PiSmmCore/PiSmmIplExtra.uni | 6 +- MdeModulePkg/Core/PiSmmCore/Pool.c | 16 +- MdeModulePkg/Core/PiSmmCore/Smi.c | 16 +- .../Core/PiSmmCore/SmramProfileRecord.c | 14 +- MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf | 8 +- .../Core/RuntimeDxe/RuntimeDxeExtra.uni | 6 +- MdeModulePkg/Include/Guid/AcpiS3Context.h | 4 +- .../Include/Guid/BootScriptExecutorVariable.h | 4 +- MdeModulePkg/Include/Guid/CapsuleVendor.h | 20 +- MdeModulePkg/Include/Guid/ConnectConInEvent.h | 4 +- MdeModulePkg/Include/Guid/ConsoleInDevice.h | 12 +- MdeModulePkg/Include/Guid/ConsoleOutDevice.h | 10 +- .../Guid/Crc32GuidedSectionExtraction.h | 12 +- MdeModulePkg/Include/Guid/DebugMask.h | 20 +- MdeModulePkg/Include/Guid/DriverSampleHii.h | 14 +- MdeModulePkg/Include/Guid/EndOfS3Resume.h | 16 +- .../Include/Guid/EventExitBootServiceFailed.h | 4 +- .../Include/Guid/FaultTolerantWrite.h | 12 +- .../Include/Guid/HiiResourceSampleHii.h | 14 +- MdeModulePkg/Include/Guid/Ip4Config2Hii.h | 14 +- MdeModulePkg/Include/Guid/Ip4IScsiConfigHii.h | 14 +- .../Include/Guid/LoadModuleAtFixedAddress.h | 18 +- MdeModulePkg/Include/Guid/LzmaDecompress.h | 16 +- MdeModulePkg/Include/Guid/MdeModuleHii.h | 10 +- .../Include/Guid/MdeModulePkgTokenSpace.h | 12 +- MdeModulePkg/Include/Guid/MemoryProfile.h | 6 +- .../Include/Guid/MemoryStatusCodeRecord.h | 18 +- .../Include/Guid/MemoryTypeInformation.h | 12 +- MdeModulePkg/Include/Guid/MtcVendor.h | 14 +- .../Include/Guid/PcdDataBaseHobGuid.h | 10 +- MdeModulePkg/Include/Guid/Performance.h | 22 +- .../Guid/PiSmmCommunicationRegionTable.h | 16 +- .../Include/Guid/PlatDriOverrideHii.h | 14 +- MdeModulePkg/Include/Guid/S3SmmInitDone.h | 16 +- .../Include/Guid/StandardErrorDevice.h | 12 +- .../Include/Guid/StatusCodeCallbackGuid.h | 14 +- .../Include/Guid/StatusCodeDataTypeDebug.h | 22 +- .../Include/Guid/StatusCodeDataTypeVariable.h | 8 +- MdeModulePkg/Include/Guid/SystemNvDataGuid.h | 16 +- MdeModulePkg/Include/Guid/UsbKeyBoardLayout.h | 10 +- .../Include/Guid/VariableIndexTable.h | 10 +- MdeModulePkg/Include/Guid/VlanConfigHii.h | 14 +- MdeModulePkg/Include/Guid/ZeroGuid.h | 12 +- MdeModulePkg/Include/Library/BootLogoLib.h | 4 +- MdeModulePkg/Include/Library/CapsuleLib.h | 22 +- .../Include/Library/CpuExceptionHandlerLib.h | 26 +- .../Include/Library/CustomizedDisplayLib.h | 54 +-- MdeModulePkg/Include/Library/DpcLib.h | 12 +- .../Include/Library/FileExplorerLib.h | 12 +- MdeModulePkg/Include/Library/HiiLib.h | 236 +++++----- MdeModulePkg/Include/Library/HttpLib.h | 32 +- MdeModulePkg/Include/Library/IpIoLib.h | 94 ++-- MdeModulePkg/Include/Library/LockBoxLib.h | 2 +- .../Include/Library/MemoryProfileLib.h | 16 +- MdeModulePkg/Include/Library/NetLib.h | 60 +-- .../Include/Library/OemHookStatusCodeLib.h | 56 +-- .../Include/Library/PlatformBootManagerLib.h | 4 +- .../Include/Library/PlatformHookLib.h | 18 +- MdeModulePkg/Include/Library/RecoveryLib.h | 14 +- MdeModulePkg/Include/Library/ResetSystemLib.h | 24 +- .../Include/Library/ResetUtilityLib.h | 4 +- MdeModulePkg/Include/Library/S3Lib.h | 12 +- .../Include/Library/SecurityManagementLib.h | 82 ++-- .../Include/Library/SmmCorePlatformHookLib.h | 20 +- MdeModulePkg/Include/Library/TcpIoLib.h | 20 +- MdeModulePkg/Include/Library/UdpIoLib.h | 4 +- .../Include/Library/UefiBootManagerLib.h | 38 +- .../Include/Library/UefiHiiServicesLib.h | 12 +- MdeModulePkg/Include/Ppi/AtaController.h | 60 +-- MdeModulePkg/Include/Ppi/SerialPortPei.h | 6 +- MdeModulePkg/Include/Ppi/SmmAccess.h | 36 +- MdeModulePkg/Include/Ppi/SmmCommunication.h | 6 +- MdeModulePkg/Include/Ppi/SmmControl.h | 6 +- MdeModulePkg/Include/Ppi/Usb2HostController.h | 96 ++--- MdeModulePkg/Include/Ppi/UsbController.h | 8 +- MdeModulePkg/Include/Ppi/UsbHostController.h | 90 ++-- MdeModulePkg/Include/Ppi/UsbIo.h | 42 +- .../Include/Protocol/DisplayProtocol.h | 52 +-- MdeModulePkg/Include/Protocol/Dpc.h | 18 +- .../Include/Protocol/EbcSimpleDebugger.h | 4 +- MdeModulePkg/Include/Protocol/EbcVmTest.h | 4 +- .../Include/Protocol/EsrtManagement.h | 34 +- .../Include/Protocol/FaultTolerantWrite.h | 22 +- MdeModulePkg/Include/Protocol/FileExplorer.h | 14 +- MdeModulePkg/Include/Protocol/FormBrowserEx.h | 44 +- .../Include/Protocol/FormBrowserEx2.h | 18 +- .../Include/Protocol/GenericMemoryTest.h | 40 +- MdeModulePkg/Include/Protocol/LoadPe32Image.h | 16 +- MdeModulePkg/Include/Protocol/PlatformLogo.h | 10 +- MdeModulePkg/Include/Protocol/Print2.h | 46 +- .../Include/Protocol/SmmFaultTolerantWrite.h | 30 +- .../Include/Protocol/SmmFirmwareVolumeBlock.h | 24 +- .../Include/Protocol/SmmSwapAddressRange.h | 32 +- MdeModulePkg/Include/Protocol/SmmVariable.h | 18 +- .../Include/Protocol/SwapAddressRange.h | 56 +-- .../Include/Protocol/UfsHostController.h | 82 ++-- MdeModulePkg/Include/Protocol/VariableLock.h | 16 +- .../BasePlatformHookLibNull.c | 8 +- .../BaseResetSystemLibNull.c | 10 +- .../BaseSerialPortLib16550.c | 128 +++--- .../BaseSerialPortLib16550.inf | 4 +- .../BaseSerialPortLib16550.uni | 4 +- .../Library/BootLogoLib/BootLogoLib.c | 6 +- .../Library/BootLogoLib/BootLogoLib.inf | 12 +- .../BootMaintenanceManagerUiLib/BmLib.c | 4 +- .../BootMaintenance.c | 62 +-- .../BootMaintenanceManager.h | 70 +-- .../BootMaintenanceManager.vfr | 14 +- .../BootMaintenanceManagerStrings.uni | 10 +- .../BootMaintenanceManagerUiLib.inf | 10 +- .../BootMaintenanceManagerUiLib/BootOption.c | 64 +-- .../ConsoleOption.c | 52 +-- .../BootMaintenanceManagerUiLib/FormGuid.h | 4 +- .../BootMaintenanceManagerUiLib/UpdatePage.c | 64 +-- .../BootMaintenanceManagerUiLib/Variable.c | 26 +- .../Library/BootManagerUiLib/BootManager.c | 20 +- .../BootManagerUiLib/BootManagerStrings.uni | 26 +- .../BootManagerUiLib/BootManagerUiLib.inf | 4 +- .../CpuExceptionHandlerLibNull.c | 24 +- .../CustomizedDisplayLib.c | 74 ++-- .../CustomizedDisplayLib.inf | 8 +- .../CustomizedDisplayLibInternal.c | 70 +-- .../CustomizedDisplayLibInternal.h | 22 +- .../CustomizedDisplayLibModStrs.uni | 10 +- .../DeviceManagerUiLib/DeviceManager.c | 56 +-- .../DeviceManagerStrings.uni | 6 +- .../DeviceManagerUiLib/DeviceManagerUiLib.inf | 8 +- .../DxeCapsuleLibNull/DxeCapsuleLibNull.c | 10 +- .../DxeCoreMemoryAllocationServices.h | 16 +- .../DxeCoreMemoryProfileLib.c | 16 +- .../DxeCoreMemoryProfileLibNull.c | 16 +- .../DxeCoreMemoryProfileServices.h | 16 +- .../MemoryAllocationLib.c | 116 ++--- .../DxeCorePerformanceLib.c | 2 +- .../DxeCorePerformanceLib.inf | 10 +- .../DxeCorePerformanceLib.uni | 4 +- .../DxeCorePerformanceLibInternal.h | 2 +- .../DxeCrc32GuidedSectionExtractLib.c | 28 +- .../DxeCrc32GuidedSectionExtractLib.inf | 4 +- .../DxeCrc32GuidedSectionExtractLib.uni | 4 +- .../DxeDebugPrintErrorLevelLib.c | 76 ++-- .../DxeDebugPrintErrorLevelLib.inf | 8 +- MdeModulePkg/Library/DxeDpcLib/DpcLib.c | 4 +- MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.uni | 4 +- .../DxeFileExplorerProtocol.c | 14 +- .../DxeFileExplorerProtocol.inf | 4 +- MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c | 136 +++--- .../Library/DxeHttpLib/DxeHttpLib.inf | 4 +- .../Library/DxeHttpLib/DxeHttpLib.uni | 4 +- MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c | 132 +++--- .../Library/DxeIpIoLib/DxeIpIoLib.uni | 4 +- MdeModulePkg/Library/DxeNetLib/DxeNetLib.c | 88 ++-- MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf | 4 +- MdeModulePkg/Library/DxeNetLib/DxeNetLib.uni | 4 +- MdeModulePkg/Library/DxeNetLib/NetBuffer.c | 18 +- .../DxePerformanceLib/DxePerformanceLib.c | 4 +- .../DxePerformanceLib/DxePerformanceLib.inf | 8 +- .../DxePerformanceLib/DxePerformanceLib.uni | 4 +- .../DxePrintLibPrint2Protocol/PrintLib.c | 176 ++++---- .../ReportStatusCodeLib.c | 6 +- .../DxeResetSystemLib/DxeResetSystemLib.c | 8 +- .../DxeSecurityManagementLib.c | 68 +-- .../DxeSecurityManagementLib.inf | 4 +- .../DxeSmmPerformanceLib.c | 18 +- .../DxeSmmPerformanceLib.inf | 10 +- .../DxeSmmPerformanceLib.uni | 4 +- .../Library/DxeTcpIoLib/DxeTcpIoLib.c | 38 +- .../Library/DxeTcpIoLib/DxeTcpIoLib.inf | 4 +- .../Library/DxeTcpIoLib/DxeTcpIoLib.uni | 4 +- .../Library/DxeUdpIoLib/DxeUdpIoLib.inf | 4 +- .../Library/DxeUdpIoLib/DxeUpdIoLib.uni | 4 +- .../Library/FileExplorerLib/FileExplorer.c | 52 +-- .../Library/FileExplorerLib/FileExplorer.h | 22 +- .../FileExplorerLib/FileExplorerLib.inf | 12 +- .../FileExplorerLib/FileExplorerString.uni | 26 +- .../FileExplorerLib/FileExplorerVfr.vfr | 4 +- .../Library/LockBoxNullLib/LockBoxNullLib.c | 4 +- .../Library/LockBoxNullLib/LockBoxNullLib.inf | 4 +- .../Library/LockBoxNullLib/LockBoxNullLib.uni | 4 +- .../F86GuidedSectionExtraction.c | 32 +- .../GuidedSectionExtraction.c | 24 +- .../LZMA-SDK-README.txt | 2 +- .../LzmaCustomDecompressLib/LzmaDecompress.c | 34 +- .../LzmaDecompressLibInternal.h | 32 +- .../OemHookStatusCodeLibNull.c | 24 +- .../OemHookStatusCodeLibNull.inf | 6 +- .../PeiCrc32GuidedSectionExtractLib.c | 28 +- .../PeiCrc32GuidedSectionExtractLib.inf | 4 +- .../PeiDebugPrintHobLib/PeiDebugPrintHobLib.c | 8 +- .../PeiDebugPrintHobLib.inf | 4 +- .../PeiDxeDebugLibReportStatusCode/DebugLib.c | 44 +- .../PeiDxeDebugLibReportStatusCode.inf | 4 +- .../PeiPerformanceLib/PeiPerformanceLib.c | 2 +- .../PeiPerformanceLib/PeiPerformanceLib.inf | 12 +- .../PeiPerformanceLib/PeiPerformanceLib.uni | 4 +- .../PeiRecoveryLibNull/PeiRecoveryLibNull.c | 6 +- .../PeiRecoveryLibNull/PeiRecoveryLibNull.inf | 12 +- .../PeiRecoveryLibNull/PeiRecoveryLibNull.uni | 4 +- .../PeiReportStatusCodeLib.inf | 4 +- .../PeiResetSystemLib/PeiResetSystemLib.c | 8 +- .../Library/PeiS3LibNull/PeiS3LibNull.c | 6 +- .../Library/PeiS3LibNull/PeiS3LibNull.inf | 8 +- .../Library/PeiS3LibNull/PeiS3LibNull.uni | 4 +- .../MemoryAllocationLib.c | 130 +++--- .../PiSmmCoreMemoryAllocationServices.h | 40 +- .../PiSmmCoreMemoryProfileLib.c | 16 +- .../PiSmmCoreMemoryProfileLibNull.c | 16 +- .../PiSmmCoreMemoryProfileServices.h | 16 +- .../PiSmmCoreSmmServicesTableLib.c | 8 +- .../PlatformVarCleanupLib/VfrStrings.uni | 4 +- .../Library/ResetUtilityLib/ResetUtility.c | 8 +- .../ResetUtilityLib/ResetUtilityLib.inf | 4 +- .../ReportStatusCodeLib.c | 28 +- .../RuntimeDxeReportStatusCodeLib.inf | 4 +- .../SmmCorePerformanceLib.inf | 8 +- .../SmmCorePerformanceLib.uni | 4 +- .../SmmCorePerformanceLibInternal.h | 4 +- .../SmmCorePlatformHookLibNull.c | 10 +- .../Library/SmmLockBoxLib/SmmLockBoxDxeLib.c | 2 +- .../SmmLockBoxLib/SmmLockBoxDxeLib.inf | 4 +- .../SmmLockBoxLib/SmmLockBoxDxeLib.uni | 4 +- .../Library/SmmLockBoxLib/SmmLockBoxPeiLib.c | 6 +- .../SmmLockBoxLib/SmmLockBoxPeiLib.inf | 4 +- .../SmmLockBoxLib/SmmLockBoxPeiLib.uni | 4 +- .../Library/SmmLockBoxLib/SmmLockBoxSmmLib.c | 4 +- .../SmmLockBoxLib/SmmLockBoxSmmLib.inf | 2 +- .../SmmLockBoxLib/SmmLockBoxSmmLib.uni | 4 +- .../MemoryAllocationLib.c | 310 ++++++------- .../SmmMemoryAllocationProfileLib.inf | 8 +- .../SmmMemoryProfileLib.c | 16 +- .../SmmPerformanceLib/SmmPerformanceLib.c | 6 +- .../SmmPerformanceLib/SmmPerformanceLib.inf | 8 +- .../SmmPerformanceLib/SmmPerformanceLib.uni | 4 +- .../ReportStatusCodeLib.c | 6 +- .../Library/UefiBootManagerLib/BmBoot.c | 34 +- .../UefiBootManagerLib/BmBootDescription.c | 4 +- .../Library/UefiBootManagerLib/BmConnect.c | 10 +- .../Library/UefiBootManagerLib/BmConsole.c | 32 +- .../UefiBootManagerLib/BmDriverHealth.c | 14 +- .../Library/UefiBootManagerLib/BmHotkey.c | 12 +- .../Library/UefiBootManagerLib/BmLoadOption.c | 66 +-- .../Library/UefiBootManagerLib/BmMisc.c | 24 +- .../Library/UefiBootManagerLib/InternalBm.h | 24 +- .../UefiBootManagerLib/UefiBootManagerLib.inf | 4 +- MdeModulePkg/Library/UefiHiiLib/HiiLanguage.c | 12 +- MdeModulePkg/Library/UefiHiiLib/HiiLib.c | 388 ++++++++--------- MdeModulePkg/Library/UefiHiiLib/HiiString.c | 104 ++--- .../Library/UefiHiiLib/InternalHiiLib.h | 16 +- .../Library/UefiHiiLib/UefiHiiLib.uni | 4 +- .../UefiHiiServicesLib/UefiHiiServicesLib.c | 30 +- .../UefiHiiServicesLib/UefiHiiServicesLib.inf | 10 +- .../DxeMemoryProfileLib.c | 16 +- .../MemoryAllocationLib.c | 116 ++--- .../UefiMemoryAllocationProfileLib.inf | 4 +- .../VarCheckPcdLib/VarCheckPcdStructure.h | 4 +- MdeModulePkg/Logo/LogoExtra.uni | 6 +- MdeModulePkg/MdeModulePkg.dec | 2 +- MdeModulePkg/MdeModulePkg.dsc | 10 +- MdeModulePkg/MdeModulePkgExtra.uni | 6 +- .../Acpi/AcpiPlatformDxe/AcpiPlatform.c | 2 +- .../Acpi/AcpiPlatformDxe/AcpiPlatform.uni | 4 +- .../Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf | 6 +- .../AcpiPlatformDxe/AcpiPlatformExtra.uni | 6 +- .../Universal/Acpi/AcpiTableDxe/AcpiSdt.c | 98 ++--- .../Universal/Acpi/AcpiTableDxe/AcpiSdt.h | 102 ++--- .../Universal/Acpi/AcpiTableDxe/AcpiTable.h | 8 +- .../Acpi/AcpiTableDxe/AcpiTableDxe.inf | 6 +- .../Acpi/AcpiTableDxe/AcpiTableDxe.uni | 4 +- .../Acpi/AcpiTableDxe/AcpiTableDxeExtra.uni | 6 +- .../Acpi/AcpiTableDxe/AcpiTableProtocol.c | 56 +-- .../Universal/Acpi/AcpiTableDxe/Aml.c | 12 +- .../Universal/Acpi/AcpiTableDxe/AmlChild.c | 22 +- .../Acpi/AcpiTableDxe/AmlNamespace.c | 42 +- .../Universal/Acpi/AcpiTableDxe/AmlOption.c | 26 +- .../Universal/Acpi/AcpiTableDxe/AmlString.c | 26 +- .../BootGraphicsResourceTableDxe.inf | 4 +- .../BootGraphicsResourceTableDxe.uni | 4 +- .../BootGraphicsResourceTableDxeExtra.uni | 6 +- .../BootScriptExecutorDxe.inf | 6 +- .../BootScriptExecutorDxe.uni | 4 +- .../BootScriptExecutorDxeExtra.uni | 6 +- .../BootScriptExecutorDxe/ScriptExecute.c | 14 +- .../BootScriptExecutorDxe/ScriptExecute.h | 28 +- .../BootScriptExecutorDxe/X64/SetIdtEntry.c | 4 +- .../FirmwarePerformanceDxe.c | 6 +- .../FirmwarePerformanceDxe.inf | 4 +- .../FirmwarePerformanceDxe.uni | 4 +- .../FirmwarePerformanceDxeExtra.uni | 6 +- .../FirmwarePerformancePei.inf | 2 +- .../FirmwarePerformancePei.uni | 6 +- .../FirmwarePerformancePeiExtra.uni | 6 +- .../FirmwarePerformanceSmm.c | 28 +- .../FirmwarePerformanceSmm.inf | 4 +- .../FirmwarePerformanceSmm.uni | 4 +- .../FirmwarePerformanceSmmExtra.uni | 6 +- .../Acpi/S3SaveStateDxe/AcpiS3ContextSave.c | 38 +- .../Acpi/S3SaveStateDxe/InternalS3SaveState.h | 30 +- .../Acpi/S3SaveStateDxe/S3SaveState.c | 178 ++++---- .../Acpi/S3SaveStateDxe/S3SaveStateDxe.inf | 4 +- .../Acpi/S3SaveStateDxe/S3SaveStateDxe.uni | 4 +- .../S3SaveStateDxe/S3SaveStateDxeExtra.uni | 6 +- .../SmmS3SaveState/InternalSmmSaveState.h | 30 +- .../Acpi/SmmS3SaveState/SmmS3SaveState.c | 182 ++++---- .../Acpi/SmmS3SaveState/SmmS3SaveState.inf | 4 +- .../Acpi/SmmS3SaveState/SmmS3SaveState.uni | 4 +- .../SmmS3SaveState/SmmS3SaveStateExtra.uni | 6 +- MdeModulePkg/Universal/BdsDxe/Bds.h | 14 +- MdeModulePkg/Universal/BdsDxe/BdsDxe.inf | 6 +- MdeModulePkg/Universal/BdsDxe/BdsDxe.uni | 4 +- MdeModulePkg/Universal/BdsDxe/BdsDxeExtra.uni | 6 +- MdeModulePkg/Universal/BdsDxe/BdsEntry.c | 46 +- .../Universal/BdsDxe/HwErrRecSupport.c | 6 +- MdeModulePkg/Universal/BdsDxe/Language.c | 10 +- .../BootManagerPolicyDxe.c | 12 +- .../BootManagerPolicyDxe.inf | 6 +- .../BootManagerPolicyDxe.uni | 4 +- .../BootManagerPolicyDxeExtra.uni | 6 +- MdeModulePkg/Universal/CapsulePei/Capsule.h | 8 +- .../Universal/CapsulePei/CapsulePei.inf | 8 +- .../Universal/CapsulePei/CapsulePei.uni | 4 +- .../Universal/CapsulePei/CapsulePeiExtra.uni | 6 +- .../Universal/CapsulePei/CapsuleX64.uni | 6 +- .../Universal/CapsulePei/CapsuleX64Extra.uni | 6 +- .../CapsulePei/Common/CapsuleCoalesce.c | 32 +- .../Universal/CapsulePei/UefiCapsule.c | 62 +-- .../Universal/CapsulePei/X64/X64Entry.c | 18 +- .../CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf | 10 +- .../CapsuleRuntimeDxe/CapsuleRuntimeDxe.uni | 4 +- .../CapsuleRuntimeDxeExtra.uni | 6 +- .../CapsuleRuntimeDxe/CapsuleService.c | 42 +- .../CapsuleRuntimeDxe/CapsuleService.h | 4 +- .../X64/SaveLongModeContext.c | 12 +- .../Console/ConPlatformDxe/ConPlatform.c | 32 +- .../Console/ConPlatformDxe/ConPlatform.h | 22 +- .../Console/ConPlatformDxe/ConPlatformDxe.inf | 4 +- .../ConPlatformDxe/ConPlatformDxeExtra.uni | 6 +- .../Console/ConSplitterDxe/ComponentName.c | 4 +- .../Console/ConSplitterDxe/ConSplitter.c | 36 +- .../Console/ConSplitterDxe/ConSplitterDxe.inf | 4 +- .../ConSplitterDxe/ConSplitterDxeExtra.uni | 6 +- .../ConSplitterDxe/ConSplitterGraphics.c | 14 +- .../GraphicsConsoleDxe/GraphicsConsole.c | 46 +- .../GraphicsConsoleDxe/GraphicsConsole.h | 44 +- .../GraphicsConsoleDxe/GraphicsConsoleDxe.inf | 4 +- .../GraphicsConsoleDxeExtra.uni | 6 +- .../Universal/Console/TerminalDxe/Ansi.c | 6 +- .../Universal/Console/TerminalDxe/Terminal.h | 20 +- .../Console/TerminalDxe/TerminalConIn.c | 8 +- .../Console/TerminalDxe/TerminalConOut.c | 10 +- .../Console/TerminalDxe/TerminalDxeExtra.uni | 6 +- .../Universal/Console/TerminalDxe/Vtutf8.c | 18 +- .../Universal/DebugPortDxe/DebugPort.h | 20 +- .../DebugPortDxe/DebugPortDxeExtra.uni | 6 +- .../Universal/DebugSupportDxe/DebugSupport.c | 12 +- .../DebugSupportDxe/DebugSupportDxeExtra.uni | 6 +- .../DebugSupportDxe/Ia32/DebugSupport.h | 64 +-- .../DebugSupportDxe/Ia32/PlDebugSupport.c | 60 +-- .../DebugSupportDxe/Ia32/PlDebugSupport.h | 16 +- .../DebugSupportDxe/Ipf/PlDebugSupport.h | 4 +- .../DebugSupportDxe/X64/PlDebugSupport.h | 16 +- .../Universal/DevicePathDxe/DevicePathDxe.inf | 4 +- .../Universal/DevicePathDxe/DevicePathDxe.uni | 4 +- .../DevicePathDxe/DevicePathDxeExtra.uni | 6 +- .../Disk/CdExpressPei/CdExpressPei.inf | 4 +- .../Disk/CdExpressPei/CdExpressPei.uni | 4 +- .../Disk/CdExpressPei/CdExpressPeiExtra.uni | 6 +- .../Disk/CdExpressPei/PeiCdExpress.c | 48 +-- .../Disk/CdExpressPei/PeiCdExpress.h | 44 +- .../Universal/Disk/DiskIoDxe/DiskIo.c | 40 +- .../Universal/Disk/DiskIoDxe/DiskIo.h | 4 +- .../Universal/Disk/DiskIoDxe/DiskIoDxe.inf | 8 +- .../Universal/Disk/DiskIoDxe/DiskIoDxe.uni | 4 +- .../Disk/DiskIoDxe/DiskIoDxeExtra.uni | 6 +- .../Universal/Disk/PartitionDxe/Gpt.c | 8 +- .../Universal/Disk/PartitionDxe/Mbr.c | 20 +- .../Universal/Disk/PartitionDxe/Partition.c | 58 +-- .../Universal/Disk/PartitionDxe/Partition.h | 10 +- .../Disk/PartitionDxe/PartitionDxe.inf | 6 +- .../Disk/PartitionDxe/PartitionDxe.uni | 6 +- .../Disk/PartitionDxe/PartitionDxeExtra.uni | 6 +- .../EnglishDxe/EnglishDxe.inf | 10 +- .../EnglishDxe/EnglishDxe.uni | 4 +- .../EnglishDxe/EnglishDxeExtra.uni | 6 +- .../EnglishDxe/UnicodeCollationEng.c | 16 +- .../EnglishDxe/UnicodeCollationEng.h | 16 +- .../DisplayEngineDxe/DisplayEngine.uni | 4 +- .../DisplayEngineDxe/DisplayEngineDxe.inf | 8 +- .../DisplayEngineDxe/DisplayEngineExtra.uni | 6 +- .../Universal/DisplayEngineDxe/FormDisplay.c | 246 +++++------ .../Universal/DisplayEngineDxe/FormDisplay.h | 36 +- .../Universal/DisplayEngineDxe/InputHandler.c | 58 +-- .../DisplayEngineDxe/ProcessOptions.c | 46 +- .../DriverHealthManagerDxe.c | 4 +- .../DriverHealthManagerDxe.inf | 6 +- .../DriverHealthManagerDxe.uni | 4 +- .../DriverHealthManagerDxeExtra.uni | 6 +- .../DriverHealthManagerStrings.uni | 8 +- .../DriverHealthManagerVfr.h | 6 +- .../Universal/DriverSampleDxe/DriverSample.c | 84 ++-- .../DriverSampleDxe/DriverSample.uni | 4 +- .../DriverSampleDxe/DriverSampleDxe.inf | 8 +- .../DriverSampleDxe/DriverSampleExtra.uni | 6 +- .../Universal/DriverSampleDxe/Inventory.vfr | 46 +- .../DriverSampleDxe/InventoryStrings.uni | 26 +- .../Universal/DriverSampleDxe/Vfr.vfr | 74 ++-- .../Universal/DriverSampleDxe/VfrStrings.uni | 42 +- MdeModulePkg/Universal/EbcDxe/EbcDxe.inf | 8 +- MdeModulePkg/Universal/EbcDxe/EbcDxe.uni | 4 +- MdeModulePkg/Universal/EbcDxe/EbcDxeExtra.uni | 6 +- MdeModulePkg/Universal/EbcDxe/EbcExecute.c | 12 +- .../Universal/EbcDxe/Ia32/EbcSupport.c | 4 +- .../Universal/EbcDxe/X64/EbcSupport.c | 4 +- MdeModulePkg/Universal/EsrtDxe/EsrtDxe.c | 64 +-- MdeModulePkg/Universal/EsrtDxe/EsrtDxe.inf | 6 +- MdeModulePkg/Universal/EsrtDxe/EsrtDxe.uni | 4 +- .../Universal/EsrtDxe/EsrtDxeExtra.uni | 6 +- MdeModulePkg/Universal/EsrtDxe/EsrtImpl.c | 36 +- MdeModulePkg/Universal/EsrtDxe/EsrtImpl.h | 52 +-- .../FaultTolerantWrite.c | 42 +- .../FaultTolerantWrite.h | 36 +- .../FaultTolerantWriteDxe.c | 66 +-- .../FaultTolerantWriteDxe.inf | 4 +- .../FaultTolerantWriteDxeExtra.uni | 6 +- .../FaultTolerantWriteSmm.c | 94 ++-- .../FaultTolerantWriteSmm.inf | 8 +- .../FaultTolerantWriteSmmCommon.h | 20 +- .../FaultTolerantWriteSmmDxe.c | 106 ++--- .../FaultTolerantWriteSmmDxe.h | 16 +- .../FaultTolerantWriteSmmDxe.inf | 8 +- .../FaultTolerantWriteSmmDxeExtra.uni | 6 +- .../Universal/FaultTolerantWriteDxe/FtwMisc.c | 38 +- .../SmmFaultTolerantWriteDxeExtra.uni | 6 +- .../UpdateWorkingBlock.c | 16 +- .../FaultTolerantWritePei.c | 16 +- .../FaultTolerantWritePeiExtra.uni | 6 +- .../FileExplorerDxe/FileExplorerDxe.inf | 4 +- .../FileExplorerDxe/FileExplorerDxe.uni | 4 +- .../FileExplorerDxe/FileExplorerDxeExtra.uni | 6 +- .../FvSimpleFileSystem.c | 16 +- .../FvSimpleFileSystem.uni | 4 +- .../FvSimpleFileSystemDxe.inf | 4 +- .../FvSimpleFileSystemExtra.uni | 6 +- .../FvSimpleFileSystemInternal.h | 4 +- .../HiiDatabaseDxe/ConfigKeywordHandler.c | 234 +++++----- .../Universal/HiiDatabaseDxe/ConfigRouting.c | 346 +++++++-------- .../Universal/HiiDatabaseDxe/Database.c | 10 +- MdeModulePkg/Universal/HiiDatabaseDxe/Font.c | 96 ++--- .../Universal/HiiDatabaseDxe/HiiDatabase.h | 120 +++--- .../Universal/HiiDatabaseDxe/HiiDatabase.uni | 4 +- .../HiiDatabaseDxe/HiiDatabaseDxe.inf | 16 +- .../HiiDatabaseDxe/HiiDatabaseEntry.c | 4 +- .../HiiDatabaseDxe/HiiDatabaseExtra.uni | 6 +- MdeModulePkg/Universal/HiiDatabaseDxe/Image.c | 8 +- .../Universal/HiiDatabaseDxe/String.c | 72 ++-- .../HiiResourcesSample.c | 6 +- .../HiiResourcesSample.uni | 4 +- .../HiiResourcesSampleDxe.inf | 4 +- .../HiiResourcesSampleExtra.uni | 6 +- .../HiiResourcesSampleDxe/Sample.vfr | 6 +- .../HiiResourcesSampleDxe/SampleStrings.uni | 26 +- .../LegacyRegion2Dxe/LegacyRegion2.c | 28 +- .../LegacyRegion2Dxe/LegacyRegion2.h | 14 +- .../LegacyRegion2Dxe/LegacyRegion2Dxe.inf | 12 +- .../LegacyRegion2Dxe/LegacyRegion2Dxe.uni | 6 +- .../LegacyRegion2DxeExtra.uni | 6 +- .../Universal/LockBox/SmmLockBox/SmmLockBox.c | 14 +- .../LockBox/SmmLockBox/SmmLockBox.inf | 4 +- .../LockBox/SmmLockBox/SmmLockBox.uni | 4 +- .../LockBox/SmmLockBox/SmmLockBoxExtra.uni | 6 +- .../GenericMemoryTestDxe.uni | 4 +- .../GenericMemoryTestDxeExtra.uni | 6 +- .../GenericMemoryTestDxe/LightMemoryTest.c | 60 +-- .../GenericMemoryTestDxe/LightMemoryTest.h | 52 +-- .../NullMemoryTestDxe/NullMemoryTest.c | 64 +-- .../NullMemoryTestDxe/NullMemoryTest.h | 64 +-- .../NullMemoryTestDxe/NullMemoryTestDxe.inf | 8 +- .../NullMemoryTestDxe/NullMemoryTestDxe.uni | 4 +- .../NullMemoryTestDxeExtra.uni | 6 +- MdeModulePkg/Universal/Metronome/Metronome.c | 46 +- MdeModulePkg/Universal/Metronome/Metronome.h | 26 +- .../Universal/Metronome/Metronome.inf | 18 +- .../Universal/Metronome/Metronome.uni | 4 +- .../Universal/Metronome/MetronomeExtra.uni | 6 +- .../MonotonicCounter.c | 6 +- .../MonotonicCounterRuntimeDxeExtra.uni | 6 +- .../Universal/Network/ArpDxe/ArpDriver.c | 104 ++--- .../Universal/Network/ArpDxe/ArpDriver.h | 96 ++--- .../Universal/Network/ArpDxe/ArpDxe.inf | 4 +- .../Universal/Network/ArpDxe/ArpDxe.uni | 4 +- .../Universal/Network/ArpDxe/ArpDxeExtra.uni | 6 +- .../Universal/Network/ArpDxe/ArpImpl.c | 6 +- .../Universal/Network/ArpDxe/ArpImpl.h | 78 ++-- .../Universal/Network/ArpDxe/ArpMain.c | 58 +-- .../Universal/Network/ArpDxe/ComponentName.c | 16 +- .../Network/Dhcp4Dxe/ComponentName.c | 28 +- .../Universal/Network/Dhcp4Dxe/Dhcp4Driver.c | 8 +- .../Universal/Network/Dhcp4Dxe/Dhcp4Driver.h | 20 +- .../Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf | 4 +- .../Universal/Network/Dhcp4Dxe/Dhcp4Dxe.uni | 4 +- .../Network/Dhcp4Dxe/Dhcp4DxeExtra.uni | 6 +- .../Universal/Network/Dhcp4Dxe/Dhcp4Impl.c | 10 +- .../Universal/Network/Dhcp4Dxe/Dhcp4Impl.h | 2 +- .../Universal/Network/Dhcp4Dxe/Dhcp4Io.c | 30 +- .../Universal/Network/Dhcp4Dxe/Dhcp4Io.h | 4 +- .../Universal/Network/Dhcp4Dxe/Dhcp4Option.c | 4 +- .../Universal/Network/Dhcp4Dxe/Dhcp4Option.h | 6 +- MdeModulePkg/Universal/Network/DpcDxe/Dpc.c | 4 +- .../Universal/Network/DpcDxe/DpcDxe.uni | 4 +- .../Universal/Network/DpcDxe/DpcDxeExtra.uni | 6 +- .../Network/IScsiDxe/ComponentName.c | 18 +- .../Network/IScsiDxe/ComponentName.h | 8 +- .../Universal/Network/IScsiDxe/IScsi4Dxe.uni | 4 +- .../Network/IScsiDxe/IScsi4DxeExtra.uni | 6 +- .../Universal/Network/IScsiDxe/IScsiCHAP.h | 8 +- .../Universal/Network/IScsiDxe/IScsiConfig.c | 42 +- .../Universal/Network/IScsiDxe/IScsiConfig.h | 22 +- .../Network/IScsiDxe/IScsiConfigDxe.vfr | 64 +-- .../IScsiDxe/IScsiConfigDxeStrings.uni | 30 +- .../Universal/Network/IScsiDxe/IScsiDhcp.c | 12 +- .../Universal/Network/IScsiDxe/IScsiDhcp.h | 4 +- .../Universal/Network/IScsiDxe/IScsiDriver.c | 80 ++-- .../Universal/Network/IScsiDxe/IScsiDriver.h | 44 +- .../Universal/Network/IScsiDxe/IScsiDxe.inf | 4 +- .../Network/IScsiDxe/IScsiExtScsiPassThru.c | 32 +- .../Universal/Network/IScsiDxe/IScsiIbft.c | 8 +- .../Universal/Network/IScsiDxe/IScsiMisc.c | 62 +-- .../Universal/Network/IScsiDxe/IScsiMisc.h | 12 +- .../Universal/Network/IScsiDxe/IScsiProto.c | 22 +- .../Universal/Network/IScsiDxe/IScsiProto.h | 18 +- .../Universal/Network/IScsiDxe/IScsiTcp4Io.c | 14 +- .../Universal/Network/IScsiDxe/IScsiTcp4Io.h | 12 +- MdeModulePkg/Universal/Network/IScsiDxe/Md5.c | 62 +-- MdeModulePkg/Universal/Network/IScsiDxe/Md5.h | 6 +- .../Universal/Network/Ip4Dxe/ComponentName.c | 26 +- .../Universal/Network/Ip4Dxe/Ip4Common.h | 4 +- .../Universal/Network/Ip4Dxe/Ip4Config2.vfr | 6 +- .../Universal/Network/Ip4Dxe/Ip4Config2Impl.c | 128 +++--- .../Universal/Network/Ip4Dxe/Ip4Config2Impl.h | 18 +- .../Universal/Network/Ip4Dxe/Ip4Config2Nv.c | 206 ++++----- .../Universal/Network/Ip4Dxe/Ip4Config2Nv.h | 4 +- .../Universal/Network/Ip4Dxe/Ip4Driver.c | 48 +-- .../Universal/Network/Ip4Dxe/Ip4Driver.h | 20 +- .../Universal/Network/Ip4Dxe/Ip4Dxe.inf | 8 +- .../Universal/Network/Ip4Dxe/Ip4Dxe.uni | 4 +- .../Universal/Network/Ip4Dxe/Ip4DxeExtra.uni | 6 +- .../Network/Ip4Dxe/Ip4DxeStrings.uni | 4 +- .../Universal/Network/Ip4Dxe/Ip4Icmp.c | 8 +- .../Universal/Network/Ip4Dxe/Ip4Icmp.h | 4 +- MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c | 14 +- MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.h | 4 +- .../Universal/Network/Ip4Dxe/Ip4Igmp.c | 4 +- .../Universal/Network/Ip4Dxe/Ip4Impl.c | 38 +- .../Universal/Network/Ip4Dxe/Ip4Impl.h | 20 +- .../Universal/Network/Ip4Dxe/Ip4Input.c | 90 ++-- .../Universal/Network/Ip4Dxe/Ip4Input.h | 16 +- .../Universal/Network/Ip4Dxe/Ip4Option.c | 6 +- .../Universal/Network/Ip4Dxe/Ip4Option.h | 6 +- .../Universal/Network/Ip4Dxe/Ip4Output.c | 22 +- .../Universal/Network/Ip4Dxe/Ip4Route.h | 4 +- .../Universal/Network/MnpDxe/ComponentName.c | 38 +- .../Universal/Network/MnpDxe/MnpConfig.c | 16 +- .../Universal/Network/MnpDxe/MnpDriver.c | 8 +- .../Universal/Network/MnpDxe/MnpDxe.inf | 4 +- .../Universal/Network/MnpDxe/MnpDxe.uni | 4 +- .../Universal/Network/MnpDxe/MnpDxeExtra.uni | 4 +- .../Universal/Network/MnpDxe/MnpImpl.h | 6 +- MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c | 22 +- .../Universal/Network/MnpDxe/MnpVlan.c | 8 +- .../Network/Mtftp4Dxe/ComponentName.c | 24 +- .../Network/Mtftp4Dxe/Mtftp4Driver.c | 6 +- .../Network/Mtftp4Dxe/Mtftp4Driver.h | 8 +- .../Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf | 4 +- .../Universal/Network/Mtftp4Dxe/Mtftp4Dxe.uni | 4 +- .../Network/Mtftp4Dxe/Mtftp4DxeExtra.uni | 6 +- .../Universal/Network/Mtftp4Dxe/Mtftp4Impl.c | 242 +++++------ .../Universal/Network/Mtftp4Dxe/Mtftp4Impl.h | 16 +- .../Network/Mtftp4Dxe/Mtftp4Option.h | 8 +- .../Universal/Network/Mtftp4Dxe/Mtftp4Rrq.c | 46 +- .../Network/Mtftp4Dxe/Mtftp4Support.c | 76 ++-- .../Network/Mtftp4Dxe/Mtftp4Support.h | 40 +- .../Universal/Network/Mtftp4Dxe/Mtftp4Wrq.c | 26 +- .../Universal/Network/SnpDxe/ComponentName.c | 28 +- .../Universal/Network/SnpDxe/Initialize.c | 36 +- .../Network/SnpDxe/Mcast_ip_to_mac.c | 40 +- .../Universal/Network/SnpDxe/Nvdata.c | 62 +-- .../Network/SnpDxe/Receive_filters.c | 100 ++--- MdeModulePkg/Universal/Network/SnpDxe/Reset.c | 24 +- .../Universal/Network/SnpDxe/Shutdown.c | 24 +- MdeModulePkg/Universal/Network/SnpDxe/Snp.c | 6 +- .../Universal/Network/SnpDxe/SnpDxe.inf | 14 +- .../Universal/Network/SnpDxe/SnpDxe.uni | 4 +- .../Universal/Network/SnpDxe/SnpDxeExtra.uni | 6 +- MdeModulePkg/Universal/Network/SnpDxe/Start.c | 18 +- .../Network/SnpDxe/Station_address.c | 40 +- MdeModulePkg/Universal/Network/SnpDxe/Stop.c | 30 +- .../Universal/Network/SnpDxe/Transmit.c | 54 +-- .../Universal/Network/SnpDxe/WaitForPacket.c | 10 +- .../Universal/Network/Tcp4Dxe/ComponentName.c | 22 +- .../Universal/Network/Tcp4Dxe/SockImpl.h | 8 +- .../Universal/Network/Tcp4Dxe/SockInterface.c | 8 +- .../Universal/Network/Tcp4Dxe/Socket.h | 152 +++---- .../Network/Tcp4Dxe/Tcp4Dispatcher.c | 4 +- .../Universal/Network/Tcp4Dxe/Tcp4Driver.c | 120 +++--- .../Universal/Network/Tcp4Dxe/Tcp4Driver.h | 114 ++--- .../Universal/Network/Tcp4Dxe/Tcp4Dxe.inf | 4 +- .../Universal/Network/Tcp4Dxe/Tcp4Dxe.uni | 4 +- .../Network/Tcp4Dxe/Tcp4DxeExtra.uni | 6 +- .../Universal/Network/Tcp4Dxe/Tcp4Input.c | 8 +- .../Universal/Network/Tcp4Dxe/Tcp4Main.c | 198 ++++----- .../Universal/Network/Tcp4Dxe/Tcp4Main.h | 198 ++++----- .../Universal/Network/Tcp4Dxe/Tcp4Misc.c | 4 +- .../Universal/Network/Tcp4Dxe/Tcp4Option.c | 16 +- .../Universal/Network/Tcp4Dxe/Tcp4Option.h | 4 +- .../Universal/Network/Tcp4Dxe/Tcp4Output.c | 22 +- .../Universal/Network/Tcp4Dxe/Tcp4Proto.h | 6 +- .../Universal/Network/Tcp4Dxe/Tcp4Timer.c | 10 +- .../Universal/Network/Udp4Dxe/ComponentName.c | 14 +- .../Universal/Network/Udp4Dxe/Udp4Driver.c | 26 +- .../Universal/Network/Udp4Dxe/Udp4Driver.h | 18 +- .../Universal/Network/Udp4Dxe/Udp4Dxe.inf | 4 +- .../Universal/Network/Udp4Dxe/Udp4Dxe.uni | 4 +- .../Network/Udp4Dxe/Udp4DxeExtra.uni | 6 +- .../Universal/Network/Udp4Dxe/Udp4Impl.c | 8 +- .../Universal/Network/Udp4Dxe/Udp4Impl.h | 22 +- .../Universal/Network/Udp4Dxe/Udp4Main.c | 20 +- .../Network/UefiPxeBcDxe/ComponentName.c | 4 +- .../Network/UefiPxeBcDxe/PxeBcDhcp.c | 20 +- .../Network/UefiPxeBcDxe/PxeBcDhcp.h | 32 +- .../Network/UefiPxeBcDxe/PxeBcDriver.h | 12 +- .../Network/UefiPxeBcDxe/PxeBcImpl.c | 68 +-- .../Network/UefiPxeBcDxe/PxeBcMtftp.c | 26 +- .../Network/UefiPxeBcDxe/PxeBcMtftp.h | 16 +- .../Network/UefiPxeBcDxe/PxeBcSupport.c | 6 +- .../Network/UefiPxeBcDxe/PxeBcSupport.h | 12 +- .../Network/UefiPxeBcDxe/UefiPxe4BcDxe.uni | 4 +- .../UefiPxeBcDxe/UefiPxe4BcDxeExtra.uni | 6 +- .../Network/UefiPxeBcDxe/UefiPxeBcDxe.inf | 10 +- .../Network/VlanConfigDxe/VlanConfigDriver.c | 4 +- .../Network/VlanConfigDxe/VlanConfigDxe.uni | 4 +- .../VlanConfigDxe/VlanConfigDxeExtra.uni | 6 +- .../Network/VlanConfigDxe/VlanConfigImpl.c | 6 +- .../VlanConfigDxe/VlanConfigStrings.uni | 4 +- MdeModulePkg/Universal/PCD/Dxe/Pcd.c | 382 ++++++++-------- MdeModulePkg/Universal/PCD/Dxe/Pcd.inf | 166 +++---- MdeModulePkg/Universal/PCD/Dxe/PcdDxe.uni | 68 +-- .../Universal/PCD/Dxe/PcdDxeExtra.uni | 6 +- MdeModulePkg/Universal/PCD/Dxe/Service.c | 176 ++++---- MdeModulePkg/Universal/PCD/Dxe/Service.h | 404 ++++++++--------- MdeModulePkg/Universal/PCD/Pei/Pcd.c | 408 +++++++++--------- MdeModulePkg/Universal/PCD/Pei/Pcd.inf | 166 +++---- MdeModulePkg/Universal/PCD/Pei/PcdPeim.uni | 66 +-- .../Universal/PCD/Pei/PcdPeimExtra.uni | 6 +- MdeModulePkg/Universal/PCD/Pei/Service.c | 82 ++-- MdeModulePkg/Universal/PCD/Pei/Service.h | 390 ++++++++--------- .../PcatSingleSegmentPciCfg2PeiExtra.uni | 6 +- .../PcatSingleSegmentPciCfg2Pei/PciCfg2.c | 20 +- .../InternalPlatDriOverrideDxe.h | 16 +- .../PlatDriOverrideDxe.c | 68 +-- .../PlatDriOverrideDxe.uni | 10 +- .../PlatDriOverrideDxeExtra.uni | 6 +- .../PlatDriOverrideLib.c | 24 +- .../PlatformDriOverrideDxe/PlatOverMngr.h | 6 +- .../PlatformDriOverrideDxe.inf | 14 +- MdeModulePkg/Universal/PrintDxe/PrintDxe.uni | 4 +- .../Universal/PrintDxe/PrintDxeExtra.uni | 6 +- .../PropertiesTableAttributesDxe.c | 4 +- .../RegularExpressionDxe.h | 2 +- .../RegularExpressionDxe.inf | 16 +- .../Pei/ReportStatusCodeRouterPei.c | 20 +- .../Pei/ReportStatusCodeRouterPei.h | 12 +- .../Pei/ReportStatusCodeRouterPeiExtra.uni | 6 +- .../ReportStatusCodeRouterRuntimeDxe.c | 20 +- .../ReportStatusCodeRouterRuntimeDxe.h | 16 +- .../ReportStatusCodeRouterRuntimeDxe.inf | 4 +- .../ReportStatusCodeRouterRuntimeDxeExtra.uni | 6 +- .../Smm/ReportStatusCodeRouterSmm.c | 18 +- .../Smm/ReportStatusCodeRouterSmm.h | 14 +- .../Smm/ReportStatusCodeRouterSmm.inf | 4 +- .../Smm/ReportStatusCodeRouterSmmExtra.uni | 6 +- .../Universal/ResetSystemPei/ResetSystem.c | 2 +- .../ResetSystemPei/ResetSystemPei.uni | 4 +- .../ResetSystemPei/ResetSystemPeiExtra.uni | 6 +- .../ResetSystemRuntimeDxe/ResetSystem.c | 10 +- .../ResetSystemRuntimeDxe/ResetSystem.h | 6 +- .../ResetSystemRuntimeDxe.uni | 4 +- .../ResetSystemRuntimeDxeExtra.uni | 6 +- .../SectionExtractionDxe.c | 22 +- .../SectionExtractionDxeExtra.uni | 6 +- .../SectionExtractionPei.c | 58 +-- .../SectionExtractionPei.inf | 4 +- .../SectionExtractionPeiExtra.uni | 6 +- .../Universal/SecurityStubDxe/SecurityStub.c | 80 ++-- .../SecurityStubDxe/SecurityStubDxe.uni | 4 +- .../SecurityStubDxe/SecurityStubDxeExtra.uni | 6 +- .../Universal/SerialDxe/SerialDxeExtra.uni | 6 +- .../Universal/SetupBrowserDxe/Expression.c | 146 +++---- .../Universal/SetupBrowserDxe/Expression.h | 26 +- .../Universal/SetupBrowserDxe/IfrParse.c | 42 +- .../Universal/SetupBrowserDxe/Presentation.c | 110 ++--- .../Universal/SetupBrowserDxe/Setup.c | 222 +++++----- .../Universal/SetupBrowserDxe/Setup.h | 124 +++--- .../SetupBrowserDxe/SetupBrowser.uni | 4 +- .../SetupBrowserDxe/SetupBrowserDxe.inf | 4 +- .../SetupBrowserDxe/SetupBrowserExtra.uni | 6 +- MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c | 172 ++++---- MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.h | 22 +- .../Universal/SmbiosDxe/SmbiosDxe.inf | 4 +- .../Universal/SmbiosDxe/SmbiosDxeExtra.uni | 6 +- .../SmbiosMeasurementDxe.inf | 4 +- .../SmbiosMeasurementDxeExtra.uni | 6 +- .../Pei/MemoryStausCodeWorker.c | 4 +- .../Pei/SerialStatusCodeWorker.c | 6 +- .../Pei/StatusCodeHandlerPei.c | 8 +- .../Pei/StatusCodeHandlerPei.inf | 8 +- .../Pei/StatusCodeHandlerPeiExtra.uni | 6 +- .../RuntimeDxe/MemoryStatusCodeWorker.c | 6 +- .../RuntimeDxe/SerialStatusCodeWorker.c | 54 +-- .../RuntimeDxe/StatusCodeHandlerRuntimeDxe.c | 14 +- .../RuntimeDxe/StatusCodeHandlerRuntimeDxe.h | 8 +- .../StatusCodeHandlerRuntimeDxe.inf | 4 +- .../StatusCodeHandlerRuntimeDxeExtra.uni | 6 +- .../Smm/MemoryStatusCodeWorker.c | 16 +- .../Smm/SerialStatusCodeWorker.c | 54 +-- .../Smm/StatusCodeHandlerSmm.c | 8 +- .../Smm/StatusCodeHandlerSmm.h | 6 +- .../Smm/StatusCodeHandlerSmm.inf | 4 +- .../Smm/StatusCodeHandlerSmmExtra.uni | 6 +- .../Universal/TimestampDxe/TimestampDxe.c | 38 +- .../Universal/TimestampDxe/TimestampDxe.inf | 4 +- .../TimestampDxe/TimestampDxeExtra.uni | 6 +- .../Variable/EmuRuntimeDxe/EmuVariable.c | 142 +++--- .../EmuRuntimeDxe/EmuVariableRuntimeDxe.inf | 4 +- .../EmuVariableRuntimeDxeExtra.uni | 6 +- .../Variable/EmuRuntimeDxe/InitVariable.c | 14 +- .../Variable/EmuRuntimeDxe/Variable.h | 36 +- .../Universal/Variable/Pei/PeiVariable.uni | 4 +- .../Variable/Pei/PeiVariableExtra.uni | 6 +- .../RuntimeDxe/VariableRuntimeDxeExtra.uni | 6 +- .../Variable/RuntimeDxe/VariableSmmExtra.uni | 6 +- .../RuntimeDxe/VariableSmmRuntimeDxeExtra.uni | 6 +- .../WatchdogTimerDxe/WatchdogTimer.c | 6 +- .../WatchdogTimerDxe/WatchdogTimer.h | 20 +- .../WatchdogTimerDxe/WatchdogTimer.inf | 4 +- .../WatchdogTimerDxe/WatchdogTimerExtra.uni | 6 +- 1010 files changed, 13595 insertions(+), 13595 deletions(-) diff --git a/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenu.c b/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenu.c index a25f2ca298..6a6b19ad09 100644 --- a/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenu.c +++ b/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenu.c @@ -1,7 +1,7 @@ /** @file The application to show the Boot Manager Menu. -Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -91,19 +91,19 @@ UINTN GetLineWidth ( IN EFI_STRING_ID StringId ) -{ +{ UINTN Index; UINTN IncrementValue; EFI_STRING String; UINTN LineWidth; - + LineWidth = 0; - String = HiiGetString (gStringPackHandle, StringId, NULL); - + String = HiiGetString (gStringPackHandle, StringId, NULL); + if (String != NULL) { Index = 0; IncrementValue = 1; - + do { // // Advance to the null-terminator or to the first width directive @@ -113,7 +113,7 @@ GetLineWidth ( Index++, LineWidth = LineWidth + IncrementValue ) ; - + // // We hit the null-terminator, we now have a count // @@ -137,11 +137,11 @@ GetLineWidth ( Index++; IncrementValue = 2; } - } while (String[Index] != 0); + } while (String[Index] != 0); FreePool (String); } - - return LineWidth; + + return LineWidth; } /** @@ -150,10 +150,10 @@ GetLineWidth ( @param BootMenuData The boot menu data to be processed. @return EFI_SUCCESS calculate boot menu information successful. - @retval EFI_INVALID_PARAMETER Input parameter is invalid + @retval EFI_INVALID_PARAMETER Input parameter is invalid **/ -EFI_STATUS +EFI_STATUS InitializeBootMenuScreen ( IN OUT BOOT_MENU_POPUP_DATA *BootMenuData ) @@ -172,21 +172,21 @@ InitializeBootMenuScreen ( // // Get maximum string width // - MaxStrWidth = 0; - for (Index = 0; Index < TITLE_TOKEN_COUNT; Index++) { + MaxStrWidth = 0; + for (Index = 0; Index < TITLE_TOKEN_COUNT; Index++) { StrWidth = GetLineWidth (BootMenuData->TitleToken[Index]); MaxStrWidth = MaxStrWidth > StrWidth ? MaxStrWidth : StrWidth; } - + for (Index = 0; Index < BootMenuData->ItemCount; Index++) { StrWidth = GetLineWidth (BootMenuData->PtrTokens[Index]); - MaxStrWidth = MaxStrWidth > StrWidth ? MaxStrWidth : StrWidth; - } - - for (Index = 0; Index < HELP_TOKEN_COUNT; Index++) { + MaxStrWidth = MaxStrWidth > StrWidth ? MaxStrWidth : StrWidth; + } + + for (Index = 0; Index < HELP_TOKEN_COUNT; Index++) { StrWidth = GetLineWidth (BootMenuData->HelpToken[Index]); MaxStrWidth = MaxStrWidth > StrWidth ? MaxStrWidth : StrWidth; - } + } // // query current row and column to calculate boot menu location // @@ -195,10 +195,10 @@ InitializeBootMenuScreen ( gST->ConOut->Mode->Mode, &Column, &Row - ); - - MaxPrintRows = Row - 6; - UnSelectableItmes = TITLE_TOKEN_COUNT + 2 + HELP_TOKEN_COUNT + 2; + ); + + MaxPrintRows = Row - 6; + UnSelectableItmes = TITLE_TOKEN_COUNT + 2 + HELP_TOKEN_COUNT + 2; BootMenuData->MenuScreen.Width = MaxStrWidth + 8; if (BootMenuData->ItemCount + UnSelectableItmes > MaxPrintRows) { BootMenuData->MenuScreen.Height = MaxPrintRows; @@ -211,10 +211,10 @@ InitializeBootMenuScreen ( BootMenuData->ScrollBarControl.HasScrollBar = FALSE; BootMenuData->ScrollBarControl.ItemCountPerScreen = BootMenuData->ItemCount; BootMenuData->ScrollBarControl.FirstItem = 0; - BootMenuData->ScrollBarControl.LastItem = BootMenuData->ItemCount - 1; + BootMenuData->ScrollBarControl.LastItem = BootMenuData->ItemCount - 1; } - BootMenuData->MenuScreen.StartCol = (Column - BootMenuData->MenuScreen.Width) / 2; - BootMenuData->MenuScreen.StartRow = (Row - BootMenuData->MenuScreen.Height) / 2; + BootMenuData->MenuScreen.StartCol = (Column - BootMenuData->MenuScreen.Width) / 2; + BootMenuData->MenuScreen.StartRow = (Row - BootMenuData->MenuScreen.Height) / 2; return EFI_SUCCESS; } @@ -222,7 +222,7 @@ InitializeBootMenuScreen ( This function uses check boot option is wheher setup application or no @param BootOption Pointer to EFI_BOOT_MANAGER_LOAD_OPTION array. - + @retval TRUE This boot option is setup application. @retval FALSE This boot options isn't setup application @@ -291,9 +291,9 @@ IgnoreBootOption ( @param BootOption Pointer to EFI_BOOT_MANAGER_LOAD_OPTION array. @param BootOptionCount Number of boot option. @param BootMenuData The Input BootMenuData to be initialized. - + @retval EFI_SUCCESS Initialize boot menu data successful. - @retval EFI_INVALID_PARAMETER Input parameter is invalid. + @retval EFI_INVALID_PARAMETER Input parameter is invalid. **/ EFI_STATUS @@ -305,7 +305,7 @@ InitializeBootMenuData ( { UINTN Index; UINTN StrIndex; - + if (BootOption == NULL || BootMenuData == NULL) { return EFI_INVALID_PARAMETER; } @@ -324,21 +324,21 @@ InitializeBootMenuData ( ASSERT (BootOption[Index].Description != NULL); BootMenuData->PtrTokens[StrIndex++] = HiiSetString ( - gStringPackHandle, + gStringPackHandle, 0, BootOption[Index].Description, NULL ); } - BootMenuData->ItemCount = StrIndex; + BootMenuData->ItemCount = StrIndex; BootMenuData->HelpToken[0] = STRING_TOKEN (STR_BOOT_POPUP_MENU_HELP1_STRING); BootMenuData->HelpToken[1] = STRING_TOKEN (STR_BOOT_POPUP_MENU_HELP2_STRING); BootMenuData->HelpToken[2] = STRING_TOKEN (STR_BOOT_POPUP_MENU_HELP3_STRING); InitializeBootMenuScreen (BootMenuData); BootMenuData->SelectItem = 0; return EFI_SUCCESS; -} +} /** This function uses input select item to highlight selected item @@ -347,9 +347,9 @@ InitializeBootMenuData ( @param WantSelectItem The user wants to select item. @param BootMenuData The boot menu data to be processed - @return EFI_SUCCESS Highlight selected item and update current selected - item successful - @retval EFI_INVALID_PARAMETER Input parameter is invalid + @return EFI_SUCCESS Highlight selected item and update current selected + item successful + @retval EFI_INVALID_PARAMETER Input parameter is invalid **/ EFI_STATUS BootMenuSelectItem ( @@ -359,7 +359,7 @@ BootMenuSelectItem ( { INT32 SavedAttribute; EFI_STRING String; - UINTN StartCol; + UINTN StartCol; UINTN StartRow; UINTN PrintCol; UINTN PrintRow; @@ -370,7 +370,7 @@ BootMenuSelectItem ( UINTN ItemCountPerScreen; UINTN Index; BOOLEAN RePaintItems; - + if (BootMenuData == NULL || WantSelectItem >= BootMenuData->ItemCount) { return EFI_INVALID_PARAMETER; } @@ -381,20 +381,20 @@ BootMenuSelectItem ( StartRow = BootMenuData->MenuScreen.StartRow; // // print selectable items again and adjust scroll bar if need - // + // if (BootMenuData->ScrollBarControl.HasScrollBar && (WantSelectItem < BootMenuData->ScrollBarControl.FirstItem || WantSelectItem > BootMenuData->ScrollBarControl.LastItem || - WantSelectItem == BootMenuData->SelectItem)) { + WantSelectItem == BootMenuData->SelectItem)) { ItemCountPerScreen = BootMenuData->ScrollBarControl.ItemCountPerScreen; // // Set first item and last item - // + // if (WantSelectItem < BootMenuData->ScrollBarControl.FirstItem) { BootMenuData->ScrollBarControl.FirstItem = WantSelectItem; - BootMenuData->ScrollBarControl.LastItem = WantSelectItem + ItemCountPerScreen - 1; + BootMenuData->ScrollBarControl.LastItem = WantSelectItem + ItemCountPerScreen - 1; } else if (WantSelectItem > BootMenuData->ScrollBarControl.LastItem) { - BootMenuData->ScrollBarControl.FirstItem = WantSelectItem - ItemCountPerScreen + 1; + BootMenuData->ScrollBarControl.FirstItem = WantSelectItem - ItemCountPerScreen + 1; BootMenuData->ScrollBarControl.LastItem = WantSelectItem; } gST->ConOut->SetAttribute (gST->ConOut, EFI_WHITE | EFI_BACKGROUND_BLUE); @@ -407,7 +407,7 @@ BootMenuSelectItem ( TopShadeNum++; } PrintCol = StartCol + BootMenuData->MenuScreen.Width - 2; - PrintRow = StartRow + TITLE_TOKEN_COUNT + 2; + PrintRow = StartRow + TITLE_TOKEN_COUNT + 2; for (Index = 0; Index < TopShadeNum; Index++, PrintRow++) { PrintCharAt (PrintCol, PrintRow, BLOCKELEMENT_LIGHT_SHADE); } @@ -419,65 +419,65 @@ BootMenuSelectItem ( LowShadeNum++; } PrintCol = StartCol + BootMenuData->MenuScreen.Width - 2; - PrintRow = StartRow + TITLE_TOKEN_COUNT + 2 + ItemCountPerScreen - LowShadeNum; + PrintRow = StartRow + TITLE_TOKEN_COUNT + 2 + ItemCountPerScreen - LowShadeNum; for (Index = 0; Index < LowShadeNum; Index++, PrintRow++) { PrintCharAt (PrintCol, PrintRow, BLOCKELEMENT_LIGHT_SHADE); - } + } } PrintCol = StartCol + BootMenuData->MenuScreen.Width - 2; - PrintRow = StartRow + TITLE_TOKEN_COUNT + 2 + TopShadeNum; + PrintRow = StartRow + TITLE_TOKEN_COUNT + 2 + TopShadeNum; for (Index = TopShadeNum; Index < ItemCountPerScreen - LowShadeNum; Index++, PrintRow++) { PrintCharAt (PrintCol, PrintRow, BLOCKELEMENT_FULL_BLOCK); - } + } // // Clear selectable items first // PrintCol = StartCol + 1; - PrintRow = StartRow + TITLE_TOKEN_COUNT + 2; + PrintRow = StartRow + TITLE_TOKEN_COUNT + 2; String = AllocateZeroPool ((BootMenuData->MenuScreen.Width - 2) * sizeof (CHAR16)); ASSERT (String != NULL); for (Index = 0; Index < BootMenuData->MenuScreen.Width - 3; Index++) { String[Index] = 0x20; - } - for (Index = 0; Index < ItemCountPerScreen; Index++) { - PrintStringAt (PrintCol, PrintRow + Index, String); + } + for (Index = 0; Index < ItemCountPerScreen; Index++) { + PrintStringAt (PrintCol, PrintRow + Index, String); } FreePool (String); // - // print selectable items + // print selectable items // for (Index = 0; Index < ItemCountPerScreen; Index++, PrintRow++) { String = HiiGetString (gStringPackHandle, BootMenuData->PtrTokens[Index + FirstItem], NULL); PrintStringAt (PrintCol, PrintRow, String); - FreePool (String); + FreePool (String); } RePaintItems = TRUE; } - + // - // Print want to select item + // Print want to select item // FirstItem = BootMenuData->ScrollBarControl.FirstItem; gST->ConOut->SetAttribute (gST->ConOut, EFI_WHITE | EFI_BACKGROUND_BLACK); String = HiiGetString (gStringPackHandle, BootMenuData->PtrTokens[WantSelectItem], NULL); - PrintCol = StartCol + 1; - PrintRow = StartRow + TITLE_TOKEN_COUNT + 2 + WantSelectItem - FirstItem; + PrintCol = StartCol + 1; + PrintRow = StartRow + TITLE_TOKEN_COUNT + 2 + WantSelectItem - FirstItem; PrintStringAt (PrintCol, PrintRow, String); FreePool (String); - + // - // if Want Select and selected item isn't the same and doesn't re-draw selectable + // if Want Select and selected item isn't the same and doesn't re-draw selectable // items, clear select item // if (WantSelectItem != BootMenuData->SelectItem && !RePaintItems) { gST->ConOut->SetAttribute (gST->ConOut, EFI_WHITE | EFI_BACKGROUND_BLUE); String = HiiGetString (gStringPackHandle, BootMenuData->PtrTokens[BootMenuData->SelectItem], NULL); - PrintCol = StartCol + 1; - PrintRow = StartRow + 3 + BootMenuData->SelectItem - FirstItem; + PrintCol = StartCol + 1; + PrintRow = StartRow + 3 + BootMenuData->SelectItem - FirstItem; PrintStringAt (PrintCol, PrintRow, String); - FreePool (String); + FreePool (String); } gST->ConOut->SetAttribute (gST->ConOut, SavedAttribute); @@ -489,28 +489,28 @@ BootMenuSelectItem ( This function uses to draw boot popup menu @param BootMenuData The Input BootMenuData to be processed. - + @retval EFI_SUCCESS Draw boot popup menu successful. **/ -EFI_STATUS +EFI_STATUS DrawBootPopupMenu ( IN BOOT_MENU_POPUP_DATA *BootMenuData ) { EFI_STRING String; UINTN Index; - UINTN Width; + UINTN Width; UINTN StartCol; UINTN StartRow; UINTN PrintRow; UINTN PrintCol; UINTN LineWidth; - INT32 SavedAttribute; - UINTN ItemCountPerScreen; + INT32 SavedAttribute; + UINTN ItemCountPerScreen; gST->ConOut->ClearScreen (gST->ConOut); - + SavedAttribute = gST->ConOut->Mode->Attribute; gST->ConOut->SetAttribute (gST->ConOut, EFI_WHITE | EFI_BACKGROUND_BLUE); Width = BootMenuData->MenuScreen.Width; @@ -518,17 +518,17 @@ DrawBootPopupMenu ( StartRow = BootMenuData->MenuScreen.StartRow; ItemCountPerScreen = BootMenuData->ScrollBarControl.ItemCountPerScreen; PrintRow = StartRow; - + gST->ConOut->EnableCursor (gST->ConOut, FALSE); // // Draw Boot popup menu screen // PrintCharAt (StartCol, PrintRow, BOXDRAW_DOWN_RIGHT); for (Index = 1; Index < Width - 1; Index++) { - PrintCharAt (StartCol + Index, PrintRow, BOXDRAW_HORIZONTAL); + PrintCharAt (StartCol + Index, PrintRow, BOXDRAW_HORIZONTAL); } PrintCharAt (StartCol + Width - 1, PrintRow, BOXDRAW_DOWN_LEFT); - + // // Draw the screen for title // @@ -540,18 +540,18 @@ DrawBootPopupMenu ( for (Index = 0; Index < TITLE_TOKEN_COUNT; Index++) { PrintRow++; - PrintCharAt (StartCol, PrintRow, BOXDRAW_VERTICAL); + PrintCharAt (StartCol, PrintRow, BOXDRAW_VERTICAL); PrintStringAt (StartCol + 1, PrintRow, String); PrintCharAt (StartCol + Width - 1, PrintRow, BOXDRAW_VERTICAL); } - + PrintRow++; PrintCharAt (StartCol, PrintRow, BOXDRAW_VERTICAL_RIGHT); for (Index = 1; Index < Width - 1; Index++) { - PrintCharAt (StartCol + Index, PrintRow, BOXDRAW_HORIZONTAL); + PrintCharAt (StartCol + Index, PrintRow, BOXDRAW_HORIZONTAL); } - PrintCharAt (StartCol + Width - 1, PrintRow, BOXDRAW_VERTICAL_LEFT); - + PrintCharAt (StartCol + Width - 1, PrintRow, BOXDRAW_VERTICAL_LEFT); + // // Draw screen for selectable items // @@ -560,15 +560,15 @@ DrawBootPopupMenu ( PrintCharAt (StartCol, PrintRow, BOXDRAW_VERTICAL); PrintStringAt (StartCol + 1, PrintRow, String); PrintCharAt (StartCol + Width - 1, PrintRow, BOXDRAW_VERTICAL); - } + } PrintRow++; PrintCharAt (StartCol, PrintRow, BOXDRAW_VERTICAL_RIGHT); for (Index = 1; Index < Width - 1; Index++) { - PrintCharAt (StartCol + Index, PrintRow, BOXDRAW_HORIZONTAL); + PrintCharAt (StartCol + Index, PrintRow, BOXDRAW_HORIZONTAL); } PrintCharAt (StartCol + Width - 1, PrintRow, BOXDRAW_VERTICAL_LEFT); - + // // Draw screen for Help // @@ -578,39 +578,39 @@ DrawBootPopupMenu ( PrintStringAt (StartCol + 1, PrintRow, String); PrintCharAt (StartCol + Width - 1, PrintRow, BOXDRAW_VERTICAL); } - FreePool (String); - - PrintRow++; + FreePool (String); + + PrintRow++; PrintCharAt (StartCol, PrintRow, BOXDRAW_UP_RIGHT); for (Index = 1; Index < Width - 1; Index++) { - PrintCharAt (StartCol + Index, PrintRow, BOXDRAW_HORIZONTAL); + PrintCharAt (StartCol + Index, PrintRow, BOXDRAW_HORIZONTAL); } - PrintCharAt (StartCol + Width - 1, PrintRow, BOXDRAW_UP_LEFT); - - + PrintCharAt (StartCol + Width - 1, PrintRow, BOXDRAW_UP_LEFT); + + // // print title strings // PrintRow = StartRow + 1; for (Index = 0; Index < TITLE_TOKEN_COUNT; Index++, PrintRow++) { String = HiiGetString (gStringPackHandle, BootMenuData->TitleToken[Index], NULL); - LineWidth = GetLineWidth (BootMenuData->TitleToken[Index]); + LineWidth = GetLineWidth (BootMenuData->TitleToken[Index]); PrintCol = StartCol + (Width - LineWidth) / 2; PrintStringAt (PrintCol, PrintRow, String); FreePool (String); } - + // // print selectable items // PrintCol = StartCol + 1; - PrintRow = StartRow + TITLE_TOKEN_COUNT + 2; + PrintRow = StartRow + TITLE_TOKEN_COUNT + 2; for (Index = 0; Index < ItemCountPerScreen; Index++, PrintRow++) { String = HiiGetString (gStringPackHandle, BootMenuData->PtrTokens[Index], NULL); PrintStringAt (PrintCol, PrintRow, String); - FreePool (String); + FreePool (String); } - + // // Print Help strings // @@ -622,20 +622,20 @@ DrawBootPopupMenu ( PrintStringAt (PrintCol, PrintRow, String); FreePool (String); } - + // // Print scroll bar if has scroll bar // if (BootMenuData->ScrollBarControl.HasScrollBar) { PrintCol = StartCol + Width - 2; - PrintRow = StartRow + 2; - PrintCharAt (PrintCol, PrintRow, GEOMETRICSHAPE_UP_TRIANGLE); - PrintCharAt (PrintCol + 1, PrintRow, BOXDRAW_VERTICAL); - PrintRow += (ItemCountPerScreen + 1); + PrintRow = StartRow + 2; + PrintCharAt (PrintCol, PrintRow, GEOMETRICSHAPE_UP_TRIANGLE); + PrintCharAt (PrintCol + 1, PrintRow, BOXDRAW_VERTICAL); + PrintRow += (ItemCountPerScreen + 1); PrintCharAt (PrintCol, PrintRow, GEOMETRICSHAPE_DOWN_TRIANGLE); - PrintCharAt (PrintCol + 1, PrintRow, BOXDRAW_VERTICAL); - } - + PrintCharAt (PrintCol + 1, PrintRow, BOXDRAW_VERTICAL); + } + gST->ConOut->SetAttribute (gST->ConOut, SavedAttribute); // // Print Selected item @@ -645,7 +645,7 @@ DrawBootPopupMenu ( } /** - This function uses to boot from selected item + This function uses to boot from selected item @param BootOptions Pointer to EFI_BOOT_MANAGER_LOAD_OPTION array. @param BootOptionCount Number of boot option. @@ -654,7 +654,7 @@ DrawBootPopupMenu ( VOID BootFromSelectOption ( IN EFI_BOOT_MANAGER_LOAD_OPTION *BootOptions, - IN UINTN BootOptionCount, + IN UINTN BootOptionCount, IN UINTN SelectItem ) { @@ -677,9 +677,9 @@ BootFromSelectOption ( /** This function will change video resolution and text mode - according to defined setup mode or defined boot mode + according to defined setup mode or defined boot mode - @param IsSetupMode Indicate mode is changed to setup mode or boot mode. + @param IsSetupMode Indicate mode is changed to setup mode or boot mode. @retval EFI_SUCCESS Mode is changed successfully. @retval Others Mode failed to be changed. @@ -707,13 +707,13 @@ BdsSetConsoleMode ( EFI_STATUS Status; UINTN Index; UINTN CurrentColumn; - UINTN CurrentRow; + UINTN CurrentRow; MaxGopMode = 0; MaxTextMode = 0; // - // Get current video resolution and text mode + // Get current video resolution and text mode // Status = gBS->HandleProtocol ( gST->ConsoleOutHandle, @@ -731,7 +731,7 @@ BdsSetConsoleMode ( ); if (EFI_ERROR (Status)) { SimpleTextOut = NULL; - } + } if ((GraphicsOutput == NULL) || (SimpleTextOut == NULL)) { return EFI_UNSUPPORTED; @@ -752,12 +752,12 @@ BdsSetConsoleMode ( NewHorizontalResolution = mBootHorizontalResolution; NewVerticalResolution = mBootVerticalResolution; NewColumns = mBootTextModeColumn; - NewRows = mBootTextModeRow; + NewRows = mBootTextModeRow; } - + if (GraphicsOutput != NULL) { MaxGopMode = GraphicsOutput->Mode->MaxMode; - } + } if (SimpleTextOut != NULL) { MaxTextMode = SimpleTextOut->Mode->MaxMode; @@ -861,7 +861,7 @@ BdsSetConsoleMode ( ASSERT_EFI_ERROR (Status); Status = PcdSet32S (PcdConOutRow, NewRows); ASSERT_EFI_ERROR (Status); - + // // Video mode is changed, so restart graphics console driver and higher level driver. // Reconnect graphics console driver and higher level driver. @@ -894,10 +894,10 @@ BdsSetConsoleMode ( @param ImageHandle The image handle. @param SystemTable The system table. - + @retval EFI_SUCCESS Boot from selected boot option, and return success from boot option @retval EFI_NOT_FOUND User select to enter setup or can not find boot option - + **/ EFI_STATUS EFIAPI @@ -907,7 +907,7 @@ BootManagerMenuEntry ( ) { EFI_BOOT_MANAGER_LOAD_OPTION *BootOption; - UINTN BootOptionCount; + UINTN BootOptionCount; EFI_STATUS Status; BOOT_MENU_POPUP_DATA BootMenuData; UINTN Index; @@ -950,7 +950,7 @@ BootManagerMenuEntry ( if (!mModeInitialized) { // - // After the console is ready, get current video resolution + // After the console is ready, get current video resolution // and text mode before launching setup at first time. // Status = gBS->HandleProtocol ( @@ -961,7 +961,7 @@ BootManagerMenuEntry ( if (EFI_ERROR (Status)) { GraphicsOutput = NULL; } - + Status = gBS->HandleProtocol ( gST->ConsoleOutHandle, &gEfiSimpleTextOutProtocolGuid, @@ -969,7 +969,7 @@ BootManagerMenuEntry ( ); if (EFI_ERROR (Status)) { SimpleTextOut = NULL; - } + } if (GraphicsOutput != NULL) { // @@ -992,14 +992,14 @@ BootManagerMenuEntry ( // // Get user defined text mode for setup. - // + // mSetupHorizontalResolution = PcdGet32 (PcdSetupVideoHorizontalResolution); - mSetupVerticalResolution = PcdGet32 (PcdSetupVideoVerticalResolution); + mSetupVerticalResolution = PcdGet32 (PcdSetupVideoVerticalResolution); mSetupTextModeColumn = PcdGet32 (PcdSetupConOutColumn); mSetupTextModeRow = PcdGet32 (PcdSetupConOutRow); mModeInitialized = TRUE; } - + // // Set back to conventional setup resolution // @@ -1013,7 +1013,7 @@ BootManagerMenuEntry ( // According to boot menu data to draw boot popup menu // DrawBootPopupMenu (&BootMenuData); - + // // check user input to determine want to re-draw or boot from user selected item // @@ -1023,18 +1023,18 @@ BootManagerMenuEntry ( Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key); if (!EFI_ERROR (Status)) { switch (Key.UnicodeChar) { - - case CHAR_NULL: - switch (Key.ScanCode) { - + + case CHAR_NULL: + switch (Key.ScanCode) { + case SCAN_UP: SelectItem = BootMenuData.SelectItem == 0 ? BootMenuData.ItemCount - 1 : BootMenuData.SelectItem - 1; - BootMenuSelectItem (SelectItem, &BootMenuData); + BootMenuSelectItem (SelectItem, &BootMenuData); break; - + case SCAN_DOWN: SelectItem = BootMenuData.SelectItem == BootMenuData.ItemCount - 1 ? 0 : BootMenuData.SelectItem + 1; - BootMenuSelectItem (SelectItem, &BootMenuData); + BootMenuSelectItem (SelectItem, &BootMenuData); break; case SCAN_ESC: @@ -1045,12 +1045,12 @@ BootManagerMenuEntry ( // BdsSetConsoleMode (FALSE); break; - + default: break; } break; - + case CHAR_CARRIAGE_RETURN: gST->ConOut->ClearScreen (gST->ConOut); // @@ -1064,7 +1064,7 @@ BootManagerMenuEntry ( BdsSetConsoleMode (TRUE); DrawBootPopupMenu (&BootMenuData); break; - + default: break; } @@ -1076,5 +1076,5 @@ BootManagerMenuEntry ( HiiRemovePackages (gStringPackHandle); return Status; - + } diff --git a/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenu.h b/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenu.h index 26d9a31865..dd7f5790a5 100644 --- a/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenu.h +++ b/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenu.h @@ -1,7 +1,7 @@ /** @file FrontPage routines to handle the callbacks and browser calls -Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -37,24 +37,24 @@ typedef struct _BOOT_MENU_SCREEN { UINTN StartRow; UINTN Width; UINTN Height; -} BOOT_MENU_SCREEN; +} BOOT_MENU_SCREEN; typedef struct _BOOT_MENU_SCROLL_BAR_CONTROL { BOOLEAN HasScrollBar; UINTN ItemCountPerScreen; UINTN FirstItem; UINTN LastItem; -} BOOT_MENU_SCROLL_BAR_CONTROL; +} BOOT_MENU_SCROLL_BAR_CONTROL; typedef struct _BOOT_MENU_POPUP_DATA { EFI_STRING_ID TitleToken[TITLE_TOKEN_COUNT]; // Title string ID UINTN ItemCount; // Selectable item count EFI_STRING_ID *PtrTokens; // All of selectable items string ID EFI_STRING_ID HelpToken[HELP_TOKEN_COUNT]; // All of help string ID - UINTN SelectItem; // Current select item + UINTN SelectItem; // Current select item BOOT_MENU_SCREEN MenuScreen; // Boot menu screen information BOOT_MENU_SCROLL_BAR_CONTROL ScrollBarControl; // Boot menu scroll bar inoformation } BOOT_MENU_POPUP_DATA; -#endif +#endif diff --git a/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf b/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf index 392a97065c..3dc1bab9a0 100644 --- a/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf +++ b/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.inf @@ -3,16 +3,16 @@ # # The application pops up a menu showing all the boot options referenced by # BootOrder NV variable and user can choose to boot from one of them. -# +# # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# +# ## [Defines] @@ -21,7 +21,7 @@ MODULE_UNI_FILE = BootManagerMenuApp.uni FILE_GUID = EEC25BDC-67F2-4D95-B1D5-F81B2039D11D MODULE_TYPE = UEFI_APPLICATION - VERSION_STRING = 1.0 + VERSION_STRING = 1.0 ENTRY_POINT = BootManagerMenuEntry # @@ -47,7 +47,7 @@ UefiBootServicesTableLib UefiApplicationEntryPoint UefiBootManagerLib - + [Guids] [Protocols] diff --git a/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.uni b/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.uni index a1470371f6..390635f924 100644 --- a/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.uni +++ b/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuApp.uni @@ -4,13 +4,13 @@ // The application pops up a menu showing all the boot options referenced by // BootOrder NV variable and user can choose to boot from one of them. // -// Copyright (c) 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php. -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuAppExtra.uni b/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuAppExtra.uni index 3887923d05..99ab4bdab7 100644 --- a/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuAppExtra.uni +++ b/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuAppExtra.uni @@ -4,7 +4,7 @@ // The application pops up a menu showing all the boot options referenced by // BootOrder NV variable and user can choose to boot from one of them. // -// Copyright (c) 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -16,8 +16,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Boot Manager Menu Application" diff --git a/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuStrings.uni b/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuStrings.uni index 6f5e44cc47..f2893fb602 100644 --- a/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuStrings.uni +++ b/MdeModulePkg/Application/BootManagerMenuApp/BootManagerMenuStrings.uni @@ -1,7 +1,7 @@ // /** @file // String definitions for BootManagerMenuApp. -// -// Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.
+// +// Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
// This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at diff --git a/MdeModulePkg/Application/HelloWorld/HelloWorld.c b/MdeModulePkg/Application/HelloWorld/HelloWorld.c index 164571bfb0..0008cd14fd 100644 --- a/MdeModulePkg/Application/HelloWorld/HelloWorld.c +++ b/MdeModulePkg/Application/HelloWorld/HelloWorld.c @@ -1,15 +1,15 @@ /** @file - This sample application bases on HelloWorld PCD setting + This sample application bases on HelloWorld PCD setting to print "UEFI Hello World!" to the UEFI Console. - Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -32,9 +32,9 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_STRING_ID mStringHelpTokenId = STRING_TOKEN (S The user Entry Point for Application. The user code starts with this function as the real entry point for the application. - @param[in] ImageHandle The firmware allocated handle for the EFI image. + @param[in] ImageHandle The firmware allocated handle for the EFI image. @param[in] SystemTable A pointer to the EFI System Table. - + @retval EFI_SUCCESS The entry point is executed successfully. @retval other Some error occurs when executing this entry point. @@ -46,19 +46,19 @@ UefiMain ( IN EFI_SYSTEM_TABLE *SystemTable ) { - UINT32 Index; - - Index = 0; - + UINT32 Index; + + Index = 0; + // // Three PCD type (FeatureFlag, UINT32 and String) are used as the sample. // if (FeaturePcdGet (PcdHelloWorldPrintEnable)) { - for (Index = 0; Index < PcdGet32 (PcdHelloWorldPrintTimes); Index ++) { - // - // Use UefiLib Print API to print string to UEFI console - // - Print ((CHAR16*)PcdGetPtr (PcdHelloWorldPrintString)); + for (Index = 0; Index < PcdGet32 (PcdHelloWorldPrintTimes); Index ++) { + // + // Use UefiLib Print API to print string to UEFI console + // + Print ((CHAR16*)PcdGetPtr (PcdHelloWorldPrintString)); } } diff --git a/MdeModulePkg/Application/HelloWorld/HelloWorld.uni b/MdeModulePkg/Application/HelloWorld/HelloWorld.uni index f8be3d1463..9fe187cb50 100644 --- a/MdeModulePkg/Application/HelloWorld/HelloWorld.uni +++ b/MdeModulePkg/Application/HelloWorld/HelloWorld.uni @@ -3,10 +3,10 @@ // // This is a sample shell application that will print "UEFI Hello World!" to the // UEFI Console based on PCD setting. -// +// // It demos how to use EDKII PCD mechanism to make code more flexible. // -// Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License diff --git a/MdeModulePkg/Application/HelloWorld/HelloWorldExtra.uni b/MdeModulePkg/Application/HelloWorld/HelloWorldExtra.uni index e20b4a5a3f..1b78d0c98c 100644 --- a/MdeModulePkg/Application/HelloWorld/HelloWorldExtra.uni +++ b/MdeModulePkg/Application/HelloWorld/HelloWorldExtra.uni @@ -1,7 +1,7 @@ // /** @file // HelloWorld Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Hello World Application" diff --git a/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfoExtra.uni b/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfoExtra.uni index c096711843..5db93c7ec1 100644 --- a/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfoExtra.uni +++ b/MdeModulePkg/Application/MemoryProfileInfo/MemoryProfileInfoExtra.uni @@ -1,7 +1,7 @@ // /** @file // MemoryProfileInfo Localized Strings and Content // -// Copyright (c) 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Memory Profile Information Application" diff --git a/MdeModulePkg/Application/UiApp/UiApp.inf b/MdeModulePkg/Application/UiApp/UiApp.inf index d144462ce4..417f1a3ec9 100644 --- a/MdeModulePkg/Application/UiApp/UiApp.inf +++ b/MdeModulePkg/Application/UiApp/UiApp.inf @@ -1,15 +1,15 @@ ## @file # UiApp module is driver for BDS phase. # -# Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# +# ## [Defines] @@ -60,7 +60,7 @@ PcdLib UefiHiiServicesLib UefiBootManagerLib - + [Guids] gEfiIfrTianoGuid ## CONSUMES ## GUID (Extended IFR Guid Opcode) gEfiIfrFrontPageGuid ## CONSUMES ## GUID diff --git a/MdeModulePkg/Application/VariableInfo/VariableInfoExtra.uni b/MdeModulePkg/Application/VariableInfo/VariableInfoExtra.uni index 16c7461508..dfdc9f8438 100644 --- a/MdeModulePkg/Application/VariableInfo/VariableInfoExtra.uni +++ b/MdeModulePkg/Application/VariableInfo/VariableInfoExtra.uni @@ -1,7 +1,7 @@ // /** @file // VariableInfo Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Variable Information Application" diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c index 5da5018345..79ae11bd20 100644 --- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c +++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.c @@ -820,7 +820,7 @@ AhciPioTransfer ( Offset = EFI_AHCI_PORT_START + Port * EFI_AHCI_PORT_REG_WIDTH + EFI_AHCI_PORT_TFD; PortTfd = AhciReadReg (PciIo, (UINT32) Offset); // - // PxTFD will be updated if there is a D2H or SetupFIS received. + // PxTFD will be updated if there is a D2H or SetupFIS received. // if ((PortTfd & EFI_AHCI_PORT_TFD_ERR) != 0) { Status = EFI_DEVICE_ERROR; @@ -2010,7 +2010,7 @@ AhciCreateTransferDescriptor ( // MaxCommandSlotNumber = (UINT8) (((Capability & 0x1F00) >> 8) + 1); Support64Bit = (BOOLEAN) (((Capability & BIT31) != 0) ? TRUE : FALSE); - + PortImplementBitMap = AhciReadReg(PciIo, EFI_AHCI_PI_OFFSET); // // Get the highest bit of implemented ports which decides how many bytes are allocated for recived FIS. diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.h b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.h index 0ef749b4c7..3b7500c662 100644 --- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.h +++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AhciMode.h @@ -1,14 +1,14 @@ /** @file Header file for AHCI mode of ATA host controller. - + Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php + This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ #ifndef __ATA_HC_AHCI_MODE_H__ @@ -68,7 +68,7 @@ typedef union { #define EFI_AHCI_MAX_DATA_PER_PRDT 0x400000 #define EFI_AHCI_FIS_REGISTER_H2D 0x27 //Register FIS - Host to Device -#define EFI_AHCI_FIS_REGISTER_H2D_LENGTH 20 +#define EFI_AHCI_FIS_REGISTER_H2D_LENGTH 20 #define EFI_AHCI_FIS_REGISTER_D2H 0x34 //Register FIS - Device to Host #define EFI_AHCI_FIS_REGISTER_D2H_LENGTH 20 #define EFI_AHCI_FIS_DMA_ACTIVATE 0x39 //DMA Activate FIS - Device to Host @@ -213,12 +213,12 @@ typedef struct { UINT32 AhciCmdPrdbc; //Physical Region Descriptor Byte Count UINT32 AhciCmdCtba; //Command Table Descriptor Base Address UINT32 AhciCmdCtbau; //Command Table Descriptor Base Address Upper 32-BITs - UINT32 AhciCmdRsvd1[4]; + UINT32 AhciCmdRsvd1[4]; } EFI_AHCI_COMMAND_LIST; // // This is a software constructed FIS. -// For data transfer operations, this is the H2D Register FIS format as +// For data transfer operations, this is the H2D Register FIS format as // specified in the Serial ATA Revision 2.6 specification. // typedef struct { @@ -257,7 +257,7 @@ typedef struct { // Physical Region Descriptor Table includes up to 65535 entries // The entry data structure is listed at the following. // the actual entry number comes from the PRDTL field in the command -// list entry for this command slot. +// list entry for this command slot. // typedef struct { UINT32 AhciPrdtDba; //Data Base Address @@ -285,13 +285,13 @@ typedef struct { UINT8 AhciDmaSetupFis[0x1C]; // Dma Setup Fis: offset 0x00 UINT8 AhciDmaSetupFisRsvd[0x04]; UINT8 AhciPioSetupFis[0x14]; // Pio Setup Fis: offset 0x20 - UINT8 AhciPioSetupFisRsvd[0x0C]; + UINT8 AhciPioSetupFisRsvd[0x0C]; UINT8 AhciD2HRegisterFis[0x14]; // D2H Register Fis: offset 0x40 UINT8 AhciD2HRegisterFisRsvd[0x04]; UINT64 AhciSetDeviceBitsFis; // Set Device Bits Fix: offset 0x58 UINT8 AhciUnknownFis[0x40]; // Unkonwn Fis: offset 0x60 - UINT8 AhciUnknownFisRsvd[0x60]; -} EFI_AHCI_RECEIVED_FIS; + UINT8 AhciUnknownFisRsvd[0x60]; +} EFI_AHCI_RECEIVED_FIS; typedef struct { UINT8 Madt : 5; @@ -320,12 +320,12 @@ typedef struct { } EFI_AHCI_REGISTERS; /** - This function is used to send out ATAPI commands conforms to the Packet Command + This function is used to send out ATAPI commands conforms to the Packet Command with PIO Protocol. @param PciIo The PCI IO protocol instance. @param AhciRegisters The pointer to the EFI_AHCI_REGISTERS. - @param Port The number of port. + @param Port The number of port. @param PortMultiplier The number of port multiplier. @param Packet A pointer to EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET structure. @@ -346,12 +346,12 @@ AhciPacketCommandExecute ( /** Start command for give slot on specific port. - + @param PciIo The PCI IO protocol instance. @param Port The number of port. @param CommandSlot The number of CommandSlot. @param Timeout The timeout value of start, uses 100ns as a unit. - + @retval EFI_DEVICE_ERROR The command start unsuccessfully. @retval EFI_TIMEOUT The operation is time out. @retval EFI_SUCCESS The command start successfully. @@ -368,11 +368,11 @@ AhciStartCommand ( /** Stop command running for giving port - + @param PciIo The PCI IO protocol instance. @param Port The number of port. @param Timeout The timeout value of stop, uses 100ns as a unit. - + @retval EFI_DEVICE_ERROR The command stop unsuccessfully. @retval EFI_TIMEOUT The operation is time out. @retval EFI_SUCCESS The command stop successfully. diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf index d1ce859091..74e62649ce 100644 --- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf +++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThru.inf @@ -29,9 +29,9 @@ # # VALID_ARCHITECTURES = IA32 X64 IPF EBC # -# DRIVER_BINDING = gAtaAtapiPassThruDriverBinding +# DRIVER_BINDING = gAtaAtapiPassThruDriverBinding # COMPONENT_NAME = gAtaAtapiPassThruComponentName -# COMPONENT_NAME2 = gAtaAtapiPassThruComponentName2 +# COMPONENT_NAME2 = gAtaAtapiPassThruComponentName2 # # @@ -43,7 +43,7 @@ IdeMode.c IdeMode.h ComponentName.c - + [Packages] MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThruDxeExtra.uni b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThruDxeExtra.uni index 8af8f56f2f..4aff950fea 100644 --- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThruDxeExtra.uni +++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/AtaAtapiPassThruDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // AtaAtapiPassThruDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "ATA ATAPI Pass Thru DXE Driver" diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/ComponentName.c b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/ComponentName.c index c3f7738d45..c4cfedd397 100644 --- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/ComponentName.c +++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/ComponentName.c @@ -1,21 +1,21 @@ /** @file UEFI Component Name(2) protocol implementation for AtaAtapiPassThru driver. - - Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ #include "AtaAtapiPassThru.h" // -// Driver name table +// Driver name table // GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mAtaAtapiPassThruDriverNameTable[] = { { "eng;en", L"AtaAtapiPassThru Driver" }, diff --git a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/IdeMode.h b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/IdeMode.h index 67fff64658..7b70d5f0aa 100644 --- a/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/IdeMode.h +++ b/MdeModulePkg/Bus/Ata/AtaAtapiPassThru/IdeMode.h @@ -1,14 +1,14 @@ /** @file Header file for IDE mode of ATA host controller. - - Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ #ifndef __ATA_HC_IDE_MODE_H__ @@ -121,7 +121,7 @@ typedef struct { #define IDE_SECONDARY_PROGRAMMABLE_INDICATOR BIT3 /** - Get IDE i/o port registers' base addresses by mode. + Get IDE i/o port registers' base addresses by mode. In 'Compatibility' mode, use fixed addresses. In Native-PCI mode, get base addresses from BARs in the PCI IDE controller's @@ -144,7 +144,7 @@ typedef struct { |___________|_______________|_______________| Table 1. Compatibility resource mappings - + b) In Native-PCI mode, IDE registers are mapped into IO space using the BARs in IDE controller's PCI Configuration Space, shown in the Table 2 below. ___________________________________________________ @@ -161,7 +161,7 @@ typedef struct { @param[in] PciIo Pointer to the EFI_PCI_IO_PROTOCOL instance @param[in, out] IdeRegisters Pointer to EFI_IDE_REGISTERS which is used to store the IDE i/o port registers' base addresses - + @retval EFI_UNSUPPORTED Return this value when the BARs is not IO type @retval EFI_SUCCESS Get the Base address successfully @retval Other Read the pci configureation data error @@ -175,7 +175,7 @@ GetIdeRegisterIoAddr ( ); /** - This function is used to send out ATAPI commands conforms to the Packet Command + This function is used to send out ATAPI commands conforms to the Packet Command with PIO Data In Protocol. @param[in] PciIo Pointer to the EFI_PCI_IO_PROTOCOL instance diff --git a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxeExtra.uni b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxeExtra.uni index a55c9acb63..ea8b25cfb6 100644 --- a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxeExtra.uni +++ b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaBusDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // AtaBusDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "ATA Bus DXE Driver" diff --git a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c index 35a1b47e8a..03b088804b 100644 --- a/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c +++ b/MdeModulePkg/Bus/Ata/AtaBusDxe/AtaPassThruExecute.c @@ -10,7 +10,7 @@ for Security Protocol Specific layout. This implementation uses big endian for Cylinder register. - Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -633,7 +633,7 @@ AtaTerminateNonBlockingTask ( // // Aborting operation has been done. From now on, don't need to abort normal operation. - // + // OldTpl = gBS->RaiseTPL (TPL_NOTIFY); AtaDevice->Abort = FALSE; gBS->RestoreTPL (OldTpl); diff --git a/MdeModulePkg/Bus/Ata/AtaBusDxe/ComponentName.c b/MdeModulePkg/Bus/Ata/AtaBusDxe/ComponentName.c index ff9d727e6c..e79ae3cefb 100644 --- a/MdeModulePkg/Bus/Ata/AtaBusDxe/ComponentName.c +++ b/MdeModulePkg/Bus/Ata/AtaBusDxe/ComponentName.c @@ -1,21 +1,21 @@ /** @file UEFI Component Name(2) protocol implementation for ConPlatform driver. - - Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ #include "AtaBus.h" // -// Driver name table +// Driver name table // GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mAtaBusDriverNameTable[] = { { "eng;en", L"ATA Bus Driver" }, diff --git a/MdeModulePkg/Bus/I2c/I2cDxe/I2cBus.c b/MdeModulePkg/Bus/I2c/I2cDxe/I2cBus.c index cad5ad7d44..99d9208490 100644 --- a/MdeModulePkg/Bus/I2c/I2cDxe/I2cBus.c +++ b/MdeModulePkg/Bus/I2c/I2cDxe/I2cBus.c @@ -1,8 +1,8 @@ /** @file - This file implements I2C IO Protocol which enables the user to manipulate a single + This file implements I2C IO Protocol which enables the user to manipulate a single I2C device independent of the host controller and I2C design. - Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.
+ Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -76,7 +76,7 @@ VENDOR_DEVICE_PATH gVendorDevicePathTemplate = { }; // -// Driver name table +// Driver name table // GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mI2cBusDriverNameTable[] = { { "eng;en", (CHAR16 *) L"I2C Bus Driver" }, @@ -241,12 +241,12 @@ I2cBusComponentNameGetControllerName ( /** Check if the child of I2C controller has been created. - @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. + @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. @param[in] Controller I2C controller handle. @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. @param[in] RemainingHasControllerNode Indicate if RemainingDevicePath contains CONTROLLER_DEVICE_PATH. @param[in] RemainingControllerNumber Controller number in CONTROLLER_DEVICE_PATH. - + @retval EFI_SUCCESS The child of I2C controller is not created. @retval Others The child of I2C controller has been created or other errors happen. @@ -266,11 +266,11 @@ CheckRemainingDevicePath ( UINTN EntryCount; UINTN Index; BOOLEAN SystemHasControllerNode; - UINT32 SystemControllerNumber; + UINT32 SystemControllerNumber; SystemHasControllerNode = FALSE; SystemControllerNumber = 0; - + Status = gBS->OpenProtocolInformation ( Controller, &gEfiI2cHostProtocolGuid, @@ -280,7 +280,7 @@ CheckRemainingDevicePath ( if (EFI_ERROR (Status)) { return Status; } - + for (Index = 0; Index < EntryCount; Index++) { if ((OpenInfoBuffer[Index].Attributes & EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER) != 0) { Status = gBS->OpenProtocol ( @@ -294,7 +294,7 @@ CheckRemainingDevicePath ( if (!EFI_ERROR (Status)) { // // Find vendor device path node and compare - // + // while (!IsDevicePathEnd (SystemDevicePath)) { if ((DevicePathType (SystemDevicePath) == HARDWARE_DEVICE_PATH) && (DevicePathSubType (SystemDevicePath) == HW_VENDOR_DP)) { @@ -469,7 +469,7 @@ I2cBusDriverSupported ( // // Determine if the I2C Host Protocol is available // - Status = gBS->OpenProtocol ( + Status = gBS->OpenProtocol ( Controller, &gEfiI2cHostProtocolGuid, (VOID **) &I2cHost, @@ -489,7 +489,7 @@ I2cBusDriverSupported ( if (Status == EFI_ALREADY_STARTED) { - if ((RemainingDevicePath == NULL) || + if ((RemainingDevicePath == NULL) || ((RemainingDevicePath != NULL) && IsDevicePathEnd (RemainingDevicePath))) { // // If RemainingDevicePath is NULL or is the End of Device Path Node, return EFI_SUCCESS. @@ -498,7 +498,7 @@ I2cBusDriverSupported ( } else { // // Test if the child with the RemainingDevicePath has already been created. - // + // Status = CheckRemainingDevicePath ( This, Controller, @@ -647,7 +647,7 @@ I2cBusDriverStart ( Status = EFI_OUT_OF_RESOURCES; goto Error; } - + /* +----------------+ .->| I2C_BUS_CONTEXT|<----- This file Protocol (gEfiCallerIdGuid) installed on I2C Controller handle @@ -660,7 +660,7 @@ I2cBusDriverStart ( | I2C IO Protocol Structure | <----- I2C IO Protocol | | +----------------------------+ - + */ I2cBusContext->I2cHost = I2cHost; I2cBusContext->I2cEnumerate = I2cEnumerate; @@ -672,9 +672,9 @@ I2cBusDriverStart ( // Parent controller device path used to create children device path // I2cBusContext->ParentDevicePath = ParentDevicePath; - + I2cBusContext->DriverBindingHandle = This->DriverBindingHandle; - + Status = gBS->InstallMultipleProtocolInterfaces ( &Controller, &gEfiCallerIdGuid, @@ -698,7 +698,7 @@ Error: if (EFI_ERROR (Status)) { DEBUG ((EFI_D_ERROR, "I2cBus: Start() function failed, Status = %r\n", Status)); if (ParentDevicePath != NULL) { - gBS->CloseProtocol ( + gBS->CloseProtocol ( Controller, &gEfiDevicePathProtocolGuid, This->DriverBindingHandle, @@ -716,14 +716,14 @@ Error: } if (I2cEnumerate != NULL) { - gBS->CloseProtocol ( + gBS->CloseProtocol ( Controller, &gEfiI2cEnumerateProtocolGuid, This->DriverBindingHandle, Controller ); } - + if (I2cBusContext != NULL) { Status = gBS->UninstallMultipleProtocolInterfaces ( &Controller, @@ -783,7 +783,7 @@ I2cBusDriverStop ( UINTN Index; if (NumberOfChildren == 0) { - gBS->CloseProtocol ( + gBS->CloseProtocol ( Controller, &gEfiDevicePathProtocolGuid, This->DriverBindingHandle, @@ -880,14 +880,14 @@ RegisterI2cDevice ( // Default DeviceIndex // RemainingPathDeviceIndex = 0; - + // // Determine the controller number in Controller Node Device Path when RemainingDevicePath is not NULL. // if (RemainingDevicePath != NULL) { // // Check if there is a controller node appended after vendor node - // + // DevPathNode = NextDevicePathNode (RemainingDevicePath); if ((DevicePathType (DevPathNode) == HARDWARE_DEVICE_PATH) && (DevicePathSubType(DevPathNode) == HW_CONTROLLER_DP)) { @@ -965,7 +965,7 @@ RegisterI2cDevice ( // if ((!CompareGuid (&((VENDOR_DEVICE_PATH *)RemainingDevicePath)->Guid, Device->DeviceGuid)) || (RemainingPathDeviceIndex != Device->DeviceIndex)) { - continue; + continue; } } @@ -1015,7 +1015,7 @@ RegisterI2cDevice ( ReleaseI2cDeviceContext (I2cDeviceContext); continue; } - + // // Create the child handle // @@ -1040,7 +1040,7 @@ RegisterI2cDevice ( // Free resources for this I2C device // ReleaseI2cDeviceContext (I2cDeviceContext); - continue; + continue; } if (RemainingDevicePath != NULL) { @@ -1074,7 +1074,7 @@ RegisterI2cDevice ( The upper layer driver writer provides the following to the platform vendor: - + 1. Vendor specific GUID for the I2C part 2. Guidance on proper construction of the slave address array when the I2C device uses more than one slave address. The I2C bus protocol @@ -1192,7 +1192,7 @@ ReleaseI2cDeviceContext ( if (I2cDeviceContext == NULL) { return; } - + if (I2cDeviceContext->DevicePath != NULL) { FreePool (I2cDeviceContext->DevicePath); } @@ -1282,12 +1282,12 @@ UnRegisterI2cDevice ( ); return Status; } - + // // Free resources for this I2C device // ReleaseI2cDeviceContext (I2cDeviceContext); - + return EFI_SUCCESS; } @@ -1310,12 +1310,12 @@ I2cBusDevicePathAppend ( ) { EFI_DEVICE_PATH_PROTOCOL *PreviousDevicePath; - + PreviousDevicePath = NULL; // // Build vendor device path - // + // CopyMem (&gVendorDevicePathTemplate.Guid, I2cDeviceContext->I2cDevice->DeviceGuid, sizeof (EFI_GUID)); I2cDeviceContext->DevicePath = AppendDevicePathNode ( I2cDeviceContext->I2cBusContext->ParentDevicePath, @@ -1325,13 +1325,13 @@ I2cBusDevicePathAppend ( if (I2cDeviceContext->DevicePath == NULL) { return EFI_OUT_OF_RESOURCES; } - + if ((BuildControllerNode) && (I2cDeviceContext->DevicePath != NULL)) { // // Build the final I2C device path with controller node // PreviousDevicePath = I2cDeviceContext->DevicePath; - gControllerDevicePathTemplate.ControllerNumber = I2cDeviceContext->I2cDevice->DeviceIndex; + gControllerDevicePathTemplate.ControllerNumber = I2cDeviceContext->I2cDevice->DeviceIndex; I2cDeviceContext->DevicePath = AppendDevicePathNode ( I2cDeviceContext->DevicePath, (EFI_DEVICE_PATH_PROTOCOL *) &gControllerDevicePathTemplate @@ -1379,7 +1379,7 @@ InitializeI2cBus( ); ASSERT_EFI_ERROR (Status); - + return Status; } diff --git a/MdeModulePkg/Bus/I2c/I2cDxe/I2cBusDxeExtra.uni b/MdeModulePkg/Bus/I2c/I2cDxe/I2cBusDxeExtra.uni index 374debe440..e7e84fdfec 100644 --- a/MdeModulePkg/Bus/I2c/I2cDxe/I2cBusDxeExtra.uni +++ b/MdeModulePkg/Bus/I2c/I2cDxe/I2cBusDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // I2cBusDxe Localized Strings and Content // -// Copyright (c) 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "I2C Bus DXE Driver" diff --git a/MdeModulePkg/Bus/I2c/I2cDxe/I2cDxe.h b/MdeModulePkg/Bus/I2c/I2cDxe/I2cDxe.h index 1490d4283a..005dd3e073 100644 --- a/MdeModulePkg/Bus/I2c/I2cDxe/I2cDxe.h +++ b/MdeModulePkg/Bus/I2c/I2cDxe/I2cDxe.h @@ -4,7 +4,7 @@ This file defines common data structures, macro definitions and some module internal function header files. - Copyright (c) 2013, Intel Corporation. All rights reserved.
+ Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -53,7 +53,7 @@ typedef struct { EFI_I2C_HOST_PROTOCOL *I2cHost; EFI_HANDLE Controller; EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath; - EFI_HANDLE DriverBindingHandle; + EFI_HANDLE DriverBindingHandle; } I2C_BUS_CONTEXT; // @@ -102,7 +102,7 @@ typedef struct { // Signature // UINT32 Signature; - + // // Next request in the pending request list // @@ -218,7 +218,7 @@ extern EFI_DRIVER_BINDING_PROTOCOL gI2cHostDriverBinding; @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. @retval EFI_SUCCESS Driver API properly initialized - + **/ EFI_STATUS RegisterI2cDevice ( @@ -285,7 +285,7 @@ I2cBusDevicePathAppend ( The upper layer driver writer provides the following to the platform vendor: - + 1. Vendor specific GUID for the I2C part 2. Guidance on proper construction of the slave address array when the I2C device uses more than one slave address. The I2C bus protocol @@ -524,7 +524,7 @@ I2cBusComponentNameGetDriverName ( IN CHAR8 *Language, OUT CHAR16 **DriverName ); - + /** Retrieves a Unicode string that is the user readable name of the controller that is being managed by a driver. @@ -789,7 +789,7 @@ I2cHostDriverStart ( IN EFI_HANDLE Controller, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath ); - + /** Stops a device controller or a bus controller. @@ -871,7 +871,7 @@ I2cHostComponentNameGetDriverName ( IN CHAR8 *Language, OUT CHAR16 **DriverName ); - + /** Retrieves a Unicode string that is the user readable name of the controller that is being managed by a driver. diff --git a/MdeModulePkg/Bus/I2c/I2cDxe/I2cDxeExtra.uni b/MdeModulePkg/Bus/I2c/I2cDxe/I2cDxeExtra.uni index 1f27927531..17b0218584 100644 --- a/MdeModulePkg/Bus/I2c/I2cDxe/I2cDxeExtra.uni +++ b/MdeModulePkg/Bus/I2c/I2cDxe/I2cDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // I2cDxe Localized Strings and Content // -// Copyright (c) 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "I2C DXE Driver" diff --git a/MdeModulePkg/Bus/I2c/I2cDxe/I2cHost.c b/MdeModulePkg/Bus/I2c/I2cDxe/I2cHost.c index 68dd931887..d745b6df78 100644 --- a/MdeModulePkg/Bus/I2c/I2cDxe/I2cHost.c +++ b/MdeModulePkg/Bus/I2c/I2cDxe/I2cHost.c @@ -1,9 +1,9 @@ /** @file - This file implements I2C Host Protocol which provides callers with the ability to + This file implements I2C Host Protocol which provides callers with the ability to do I/O transactions to all of the devices on the I2C bus. Copyright (c) 2014, Hewlett-Packard Development Company, L.P.
- Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.
+ Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -26,7 +26,7 @@ EFI_DRIVER_BINDING_PROTOCOL gI2cHostDriverBinding = { }; // -// Driver name table +// Driver name table // GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mI2cHostDriverNameTable[] = { { "eng;en", L"I2c Host Driver" }, @@ -356,7 +356,7 @@ I2cHostDriverStart ( // // Locate I2C Master Protocol // - Status = gBS->OpenProtocol ( + Status = gBS->OpenProtocol ( Controller, &gEfiI2cMasterProtocolGuid, (VOID **)&I2cMaster, @@ -425,7 +425,7 @@ I2cHostDriverStart ( if (EFI_ERROR (Status)) { DEBUG ((EFI_D_ERROR, "I2cHost: create bus available event error, Status = %r\n", Status)); goto Exit; - } + } // // Build the I2C host protocol for the current I2C controller @@ -451,9 +451,9 @@ Exit: &gEfiI2cBusConfigurationManagementProtocolGuid, This->DriverBindingHandle, Controller - ); + ); } - + if ((I2cHostContext != NULL) && (I2cHostContext->I2cEvent != NULL)) { gBS->CloseEvent (I2cHostContext->I2cEvent); I2cHostContext->I2cEvent = NULL; @@ -513,7 +513,7 @@ I2cHostDriverStop ( IN EFI_HANDLE *ChildHandleBuffer ) { - EFI_STATUS Status; + EFI_STATUS Status; I2C_HOST_CONTEXT *I2cHostContext; EFI_I2C_HOST_PROTOCOL *I2cHost; EFI_TPL TplPrevious; @@ -543,14 +543,14 @@ I2cHostDriverStop ( // Raise TPL for critical section // TplPrevious = gBS->RaiseTPL (TPL_I2C_SYNC); - + // // If there is pending request or pending bus configuration, do not stop // Status = EFI_DEVICE_ERROR; if (( !I2cHostContext->I2cBusConfigurationManagementPending ) && IsListEmpty (&I2cHostContext->RequestList)) { - + // // Remove the I2C host protocol // @@ -561,7 +561,7 @@ I2cHostDriverStop ( NULL ); } - + // // Leave critical section // @@ -581,12 +581,12 @@ I2cHostDriverStop ( gBS->CloseEvent (I2cHostContext->I2cBusConfigurationEvent); I2cHostContext->I2cBusConfigurationEvent = NULL; } - + if (I2cHostContext->I2cEvent != NULL) { gBS->CloseEvent (I2cHostContext->I2cEvent); I2cHostContext->I2cEvent = NULL; } - + FreePool (I2cHostContext); } @@ -644,7 +644,7 @@ I2cHostI2cBusConfigurationAvailable ( // Force next operation to enable the I2C bus configuration // I2cHostContext->I2cBusConfiguration = (UINTN) -1; - + // // Do not continue current I2C request // @@ -666,7 +666,7 @@ I2cHostI2cBusConfigurationAvailable ( // // Start an I2C operation on the host, the status is returned by I2cHostContext->Status // - Status = I2cMaster->StartRequest ( + Status = I2cMaster->StartRequest ( I2cMaster, I2cRequest->SlaveAddress, I2cRequest->RequestPacket, @@ -734,7 +734,7 @@ I2cHostRequestComplete ( if(!IsListEmpty (EntryHeader)) { I2cHostRequestEnable (I2cHostContext); } - + return Status; } @@ -942,7 +942,7 @@ I2cHostQueueRequest ( if (RequestPacket == NULL) { return EFI_INVALID_PARAMETER; } - + if ((SlaveAddress & I2C_ADDRESSING_10_BIT) != 0) { // // 10-bit address, bits 0-9 are used for 10-bit I2C slave addresses, @@ -970,7 +970,7 @@ I2cHostQueueRequest ( // // For synchronous transaction, register an event used to wait for finishing synchronous transaction // - Status = gBS->CreateEvent ( + Status = gBS->CreateEvent ( 0, TPL_I2C_SYNC, NULL, @@ -981,7 +981,7 @@ I2cHostQueueRequest ( return Status; } } - + // // TPL should be at or below TPL_NOTIFY. // For synchronous requests this routine must be called at or below TPL_CALLBACK. @@ -1022,9 +1022,9 @@ I2cHostQueueRequest ( // Synchronize with the other threads // gBS->RaiseTPL ( TPL_I2C_SYNC ); - + FirstRequest = IsListEmpty (&I2cHostContext->RequestList); - + // // Insert new I2C request in the list // @@ -1034,7 +1034,7 @@ I2cHostQueueRequest ( // Release the thread synchronization // gBS->RestoreTPL (TplPrevious); - + if (FirstRequest) { // // Start the first I2C request, then the subsequent of I2C request will continue diff --git a/MdeModulePkg/Bus/I2c/I2cDxe/I2cHostDxeExtra.uni b/MdeModulePkg/Bus/I2c/I2cDxe/I2cHostDxeExtra.uni index 816663884c..ed3b2d6e75 100644 --- a/MdeModulePkg/Bus/I2c/I2cDxe/I2cHostDxeExtra.uni +++ b/MdeModulePkg/Bus/I2c/I2cDxe/I2cHostDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // I2cHostDxe Localized Strings and Content // -// Copyright (c) 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "I2C Host DXE Driver" diff --git a/MdeModulePkg/Bus/Isa/IsaBusDxe/ComponentName.c b/MdeModulePkg/Bus/Isa/IsaBusDxe/ComponentName.c index ff7bbef278..b0815615a6 100644 --- a/MdeModulePkg/Bus/Isa/IsaBusDxe/ComponentName.c +++ b/MdeModulePkg/Bus/Isa/IsaBusDxe/ComponentName.c @@ -1,14 +1,14 @@ /** @file UEFI Component Name(2) protocol implementation for IsaBusDxe driver. - - Copyright (c) 2015, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -16,7 +16,7 @@ #include // -// Driver name table +// Driver name table // GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mIsaBusDriverNameTable[] = { { "eng;en", L"PI ISA BUS Driver" }, diff --git a/MdeModulePkg/Bus/Isa/IsaBusDxe/ComponentName.h b/MdeModulePkg/Bus/Isa/IsaBusDxe/ComponentName.h index f533971833..41ec235f1b 100644 --- a/MdeModulePkg/Bus/Isa/IsaBusDxe/ComponentName.h +++ b/MdeModulePkg/Bus/Isa/IsaBusDxe/ComponentName.h @@ -1,14 +1,14 @@ /** @file UEFI Component Name(2) protocol implementation for IsaBusDxe driver. - - Copyright (c) 2015, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + + Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.c b/MdeModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.c index 0bd9b24fbd..8aba2d3aac 100644 --- a/MdeModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.c +++ b/MdeModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.c @@ -3,7 +3,7 @@ Controller and installs the ISA Host Controller Service Binding protocol on the ISA Host Controller's handle. - Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -19,19 +19,19 @@ #include "ComponentName.h" /** - Tests to see if this driver supports a given controller. If a child device is provided, + Tests to see if this driver supports a given controller. If a child device is provided, it further tests to see if this driver supports creating a handle for the specified child device. @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. - @param[in] ControllerHandle The handle of the controller to test. This handle - must support a protocol interface that supplies + @param[in] ControllerHandle The handle of the controller to test. This handle + must support a protocol interface that supplies an I/O abstraction to the driver. - @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This - parameter is ignored by device drivers, and is optional for bus - drivers. For bus drivers, if this parameter is not NULL, then - the bus driver must determine if the bus controller specified - by ControllerHandle and the child controller specified - by RemainingDevicePath are both supported by this + @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This + parameter is ignored by device drivers, and is optional for bus + drivers. For bus drivers, if this parameter is not NULL, then + the bus driver must determine if the bus controller specified + by ControllerHandle and the child controller specified + by RemainingDevicePath are both supported by this bus driver. @retval EFI_SUCCESS The device specified by ControllerHandle and @@ -105,14 +105,14 @@ ISA_BUS_CHILD_PRIVATE_DATA mIsaBusChildPrivateTemplate = { /** Creates a child handle and installs a protocol. - - The CreateChild() function installs a protocol on ChildHandle. - If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle. + + The CreateChild() function installs a protocol on ChildHandle. + If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle. If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle. @param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance. @param ChildHandle Pointer to the handle of the child to create. If it is NULL, - then a new handle is created. If it is a pointer to an existing UEFI handle, + then a new handle is created. If it is a pointer to an existing UEFI handle, then the protocol is added to the existing UEFI handle. @retval EFI_SUCCES The protocol was added to ChildHandle. @@ -164,9 +164,9 @@ IsaBusCreateChild ( /** Destroys a child handle with a protocol installed on it. - - The DestroyChild() function does the opposite of CreateChild(). It removes a protocol - that was installed by CreateChild() from ChildHandle. If the removed protocol is the + + The DestroyChild() function does the opposite of CreateChild(). It removes a protocol + that was installed by CreateChild() from ChildHandle. If the removed protocol is the last protocol on ChildHandle, then ChildHandle is destroyed. @param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance. @@ -260,18 +260,18 @@ ISA_BUS_PRIVATE_DATA mIsaBusPrivateTemplate = { Starts a device controller or a bus controller. @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. - @param[in] ControllerHandle The handle of the controller to start. This handle - must support a protocol interface that supplies + @param[in] ControllerHandle The handle of the controller to start. This handle + must support a protocol interface that supplies an I/O abstraction to the driver. - @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This - parameter is ignored by device drivers, and is optional for bus - drivers. For a bus driver, if this parameter is NULL, then handles - for all the children of Controller are created by this driver. - If this parameter is not NULL and the first Device Path Node is - not the End of Device Path Node, then only the handle for the - child device specified by the first Device Path Node of + @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This + parameter is ignored by device drivers, and is optional for bus + drivers. For a bus driver, if this parameter is NULL, then handles + for all the children of Controller are created by this driver. + If this parameter is not NULL and the first Device Path Node is + not the End of Device Path Node, then only the handle for the + child device specified by the first Device Path Node of RemainingDevicePath is created by this driver. - If the first Device Path Node of RemainingDevicePath is + If the first Device Path Node of RemainingDevicePath is the End of Device Path Node, no child handle is created by this driver. @@ -340,13 +340,13 @@ IsaBusDriverBindingStart ( /** Stops a device controller or a bus controller. - + @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. - @param[in] ControllerHandle A handle to the device being stopped. The handle must - support a bus specific I/O protocol for the driver + @param[in] ControllerHandle A handle to the device being stopped. The handle must + support a bus specific I/O protocol for the driver to use to stop the device. @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer. - @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL + @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL if NumberOfChildren is 0. @retval EFI_SUCCESS The device was stopped. @@ -432,10 +432,10 @@ EFI_DRIVER_BINDING_PROTOCOL gIsaBusDriverBinding = { /** Entry point of the IsaBusDxe driver. - - @param[in] ImageHandle The firmware allocated handle for the EFI image. + + @param[in] ImageHandle The firmware allocated handle for the EFI image. @param[in] SystemTable A pointer to the EFI System Table. - + @retval EFI_SUCCESS The entry point is executed successfully. @retval other Some error occurs when executing this entry point. **/ @@ -447,7 +447,7 @@ InitializeIsaBus ( ) { EFI_STATUS Status; - + Status = EfiLibInstallDriverBindingComponentName2 ( ImageHandle, SystemTable, diff --git a/MdeModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf b/MdeModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf index 1d9e22ec4c..b257e99dba 100644 --- a/MdeModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf +++ b/MdeModulePkg/Bus/Isa/IsaBusDxe/IsaBusDxe.inf @@ -6,7 +6,7 @@ # the ISA Host Controller and installs the ISA Host Controller Service Binding # protocol on the ISA Host Controller's handle. # -# Copyright (c) 2015, Intel Corporation. All rights reserved.
+# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -56,9 +56,9 @@ DebugLib [Protocols] - ## CONSUMES + ## CONSUMES ## PRODUCES - gEfiIsaHcProtocolGuid + gEfiIsaHcProtocolGuid gEfiIsaHcServiceBindingProtocolGuid ## PRODUCES [UserExtensions.TianoCore."ExtraFiles"] diff --git a/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c b/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c index 5986eca5f3..9eda6f5ca0 100644 --- a/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c +++ b/MdeModulePkg/Bus/Isa/Ps2KeyboardDxe/Ps2KbdTextIn.c @@ -718,7 +718,7 @@ KeyNotifyProcessHandler ( while (TRUE) { // // Enter critical section - // + // OldTpl = gBS->RaiseTPL (TPL_NOTIFY); Status = PopEfikeyBufHead (&ConsoleIn->EfiKeyQueueForNotify, &KeyData); // diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/ComponentName.c b/MdeModulePkg/Bus/Pci/EhciDxe/ComponentName.c index 3181b9da5b..a5fb7ed4c7 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/ComponentName.c +++ b/MdeModulePkg/Bus/Pci/EhciDxe/ComponentName.c @@ -1,8 +1,8 @@ /** @file UEFI Component Name(2) protocol implementation for EHCI driver. -Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.
- +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c index f18ee82261..30ad2b2ffe 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c +++ b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.c @@ -1,14 +1,14 @@ -/** @file +/** @file The Ehci controller driver. - EhciDxe driver is responsible for managing the behavior of EHCI controller. - It implements the interfaces of monitoring the status of all ports and transferring + EhciDxe driver is responsible for managing the behavior of EHCI controller. + It implements the interfaces of monitoring the status of all ports and transferring Control, Bulk, Interrupt and Isochronous requests to Usb2.0 device. Note that EhciDxe driver is enhanced to guarantee that the EHCI controller get attached - to the EHCI controller before a UHCI or OHCI driver attaches to the companion UHCI or - OHCI controller. This way avoids the control transfer on a shared port between EHCI - and companion host controller when UHCI or OHCI gets attached earlier than EHCI and a + to the EHCI controller before a UHCI or OHCI driver attaches to the companion UHCI or + OHCI controller. This way avoids the control transfer on a shared port between EHCI + and companion host controller when UHCI or OHCI gets attached earlier than EHCI and a USB 2.0 device inserts. Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
@@ -1608,7 +1608,7 @@ EhcCreateUsb2Hc ( gBS->FreePool (Ehc); return NULL; } - + EhcGetUsbDebugPortInfo (Ehc); // @@ -1781,12 +1781,12 @@ EhcDriverBindingStart ( goto CLOSE_PCIIO; } // - // Determine if the device is UHCI or OHCI host controller or not. If yes, then find out the + // Determine if the device is UHCI or OHCI host controller or not. If yes, then find out the // companion usb ehci host controller and force EHCI driver get attached to it before // UHCI or OHCI driver attaches to UHCI or OHCI host controller. // if ((UsbClassCReg.ProgInterface == PCI_IF_UHCI || UsbClassCReg.ProgInterface == PCI_IF_OHCI) && - (UsbClassCReg.BaseCode == PCI_CLASS_SERIAL) && + (UsbClassCReg.BaseCode == PCI_CLASS_SERIAL) && (UsbClassCReg.SubClassCode == PCI_CLASS_SERIAL_USB)) { Status = PciIo->GetLocation ( PciIo, @@ -1835,7 +1835,7 @@ EhcDriverBindingStart ( } if ((UsbClassCReg.ProgInterface == PCI_IF_EHCI) && - (UsbClassCReg.BaseCode == PCI_CLASS_SERIAL) && + (UsbClassCReg.BaseCode == PCI_CLASS_SERIAL) && (UsbClassCReg.SubClassCode == PCI_CLASS_SERIAL_USB)) { Status = Instance->GetLocation ( Instance, @@ -2098,7 +2098,7 @@ EhcDriverBindingStop ( } // - // Disable routing of all ports to EHCI controller, so all ports are + // Disable routing of all ports to EHCI controller, so all ports are // routed back to the UHCI or OHCI controller. // EhcClearOpRegBit (Ehc, EHC_CONFIG_FLAG_OFFSET, CONFIGFLAG_ROUTE_EHC); diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h index 3415816c53..f7556754f8 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h +++ b/MdeModulePkg/Bus/Pci/EhciDxe/Ehci.h @@ -2,7 +2,7 @@ Provides some data struct used by EHCI controller driver. -Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -133,7 +133,7 @@ struct _USB2_HC_DEV { EFI_EVENT PollTimer; // - // ExitBootServicesEvent is used to stop the EHC DMA operation + // ExitBootServicesEvent is used to stop the EHC DMA operation // after exit boot service. // EFI_EVENT ExitBootServiceEvent; diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf b/MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf index 238923e828..bc6bd4ce29 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf +++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.inf @@ -1,14 +1,14 @@ ## @file # The EhciDxe driver is responsible for managing the behavior of EHCI controller. -# It implements the interfaces of monitoring the status of all ports and transferring +# It implements the interfaces of monitoring the status of all ports and transferring # Control, Bulk, Interrupt and Isochronous requests to Usb2.0 device. # # Note that EhciDxe driver is enhanced to guarantee that the EHCI controller get attached -# to the EHCI controller before the UHCI driver attaches to the companion UHCI controller. +# to the EHCI controller before the UHCI driver attaches to the companion UHCI controller. # This way avoids the control transfer on a shared port between EHCI and companion host # controller when UHCI gets attached earlier than EHCI and a USB 2.0 device inserts. # -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -36,7 +36,7 @@ # # VALID_ARCHITECTURES = IA32 X64 IPF EBC ARM AARCH64 # -# DRIVER_BINDING = gEhciDriverBinding +# DRIVER_BINDING = gEhciDriverBinding # COMPONENT_NAME = gEhciComponentName # COMPONENT_NAME2 = gEhciComponentName2 # diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.uni b/MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.uni index e36ee52663..eb930abdd0 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.uni +++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciDxe.uni @@ -3,19 +3,19 @@ // // It implements the interfaces of monitoring the status of all ports and transferring // Control, Bulk, Interrupt and Isochronous requests to Usb2.0 device. -// +// // Note that EhciDxe driver is enhanced to guarantee that the EHCI controller get attached // to the EHCI controller before the UHCI driver attaches to the companion UHCI controller. // This way avoids the control transfer on a shared port between EHCI and companion host // controller when UHCI gets attached earlier than EHCI and a USB 2.0 device inserts. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciDxeExtra.uni b/MdeModulePkg/Bus/Pci/EhciDxe/EhciDxeExtra.uni index 1d625a9f7b..8bce7f98ec 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciDxeExtra.uni +++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // EhciDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "EHCI Controller DXE Driver" diff --git a/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c b/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c index 036c00b32b..fea6f47f4c 100644 --- a/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c +++ b/MdeModulePkg/Bus/Pci/EhciDxe/EhciSched.c @@ -2,7 +2,7 @@ EHCI transfer scheduling routines. -Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -918,7 +918,7 @@ EhcUpdateAsyncRequest ( // // calculate physical address by offset. // - PciAddr = (UINTN)Urb->DataPhy + ((UINTN)Qtd->Data - (UINTN)Urb->Data); + PciAddr = (UINTN)Urb->DataPhy + ((UINTN)Qtd->Data - (UINTN)Urb->Data); QtdHw->Page[0] = EHC_LOW_32BIT (PciAddr); QtdHw->PageHigh[0]= EHC_HIGH_32BIT (PciAddr); } diff --git a/MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.c b/MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.c index 5cad25e926..6abd3d4d71 100644 --- a/MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.c +++ b/MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.c @@ -2,8 +2,8 @@ PEIM to produce gPeiUsb2HostControllerPpiGuid based on gPeiUsbControllerPpiGuid which is used to enable recovery function from USB Drivers. -Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
- +Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The @@ -39,7 +39,7 @@ USB_PORT_STATE_MAP mUsbPortChangeMap[] = { /** Read Ehc Operation register. - + @param Ehc The EHCI device. @param Offset The operation register offset. @@ -53,17 +53,17 @@ EhcReadOpReg ( ) { UINT32 Data; - + ASSERT (Ehc->CapLen != 0); Data = MmioRead32 (Ehc->UsbHostControllerBaseAddress + Ehc->CapLen + Offset); - + return Data; } /** Write the data to the EHCI operation register. - + @param Ehc The EHCI device. @param Offset EHCI operation register offset. @param Data The data to write. @@ -85,7 +85,7 @@ EhcWriteOpReg ( /** Set one bit of the operational register while keeping other bits. - + @param Ehc The EHCI device. @param Offset The offset of the operational register. @param Bit The bit mask of the register to set. @@ -107,7 +107,7 @@ EhcSetOpRegBit ( /** Clear one bit of the operational register while keeping other bits. - + @param Ehc The EHCI device. @param Offset The offset of the operational register. @param Bit The bit mask of the register to clear. @@ -128,9 +128,9 @@ EhcClearOpRegBit ( } /** - Wait the operation register's bit as specified by Bit + Wait the operation register's bit as specified by Bit to become set (or clear). - + @param Ehc The EHCI device. @param Offset The offset of the operational register. @param Bit The bit mask of the register to wait for. @@ -165,7 +165,7 @@ EhcWaitOpRegBit ( /** Read EHCI capability register. - + @param Ehc The EHCI device. @param Offset Capability register address. @@ -179,16 +179,16 @@ EhcReadCapRegister ( ) { UINT32 Data; - + Data = MmioRead32(Ehc->UsbHostControllerBaseAddress + Offset); - + return Data; } /** Set door bell and wait it to be ACKed by host controller. This function is used to synchronize with the hardware. - + @param Ehc The EHCI device. @param Timeout The time to wait before abort (in millisecond, ms). @@ -223,9 +223,9 @@ EhcSetAndWaitDoorBell ( } /** - Clear all the interrutp status bits, these bits + Clear all the interrutp status bits, these bits are Write-Clean. - + @param Ehc The EHCI device. **/ @@ -238,9 +238,9 @@ EhcAckAllInterrupt ( } /** - Enable the periodic schedule then wait EHC to + Enable the periodic schedule then wait EHC to actually enable it. - + @param Ehc The EHCI device. @param Timeout The time to wait before abort (in millisecond, ms). @@ -264,7 +264,7 @@ EhcEnablePeriodSchd ( /** Enable asynchrounous schedule. - + @param Ehc The EHCI device. @param Timeout Time to wait before abort. @@ -288,7 +288,7 @@ EhcEnableAsyncSchd ( /** Check whether Ehc is halted. - + @param Ehc The EHCI device. @retval TRUE The controller is halted. @@ -305,7 +305,7 @@ EhcIsHalt ( /** Check whether system error occurred. - + @param Ehc The EHCI device. @retval TRUE System error happened. @@ -322,7 +322,7 @@ EhcIsSysError ( /** Reset the host controller. - + @param Ehc The EHCI device. @param Timeout Time to wait before abort (in millisecond, ms). @@ -356,7 +356,7 @@ EhcResetHC ( /** Halt the host controller. - + @param Ehc The EHCI device. @param Timeout Time to wait before abort. @@ -379,7 +379,7 @@ EhcHaltHC ( /** Set the EHCI to run. - + @param Ehc The EHCI device. @param Timeout Time to wait before abort. @@ -402,7 +402,7 @@ EhcRunHC ( /** Power On All EHCI Ports. - + @param Ehc The EHCI device. **/ @@ -414,7 +414,7 @@ EhcPowerOnAllPorts ( UINT8 PortNumber; UINT8 Index; UINT32 RegVal; - + PortNumber = (UINT8)(Ehc->HcStructParams & HCSP_NPORTS); for (Index = 0; Index < PortNumber; Index++) { // @@ -429,14 +429,14 @@ EhcPowerOnAllPorts ( } /** - Initialize the HC hardware. + Initialize the HC hardware. EHCI spec lists the five things to do to initialize the hardware. 1. Program CTRLDSSEGMENT. 2. Set USBINTR to enable interrupts. 3. Set periodic list base. 4. Set USBCMD, interrupt threshold, frame list size etc. 5. Write 1 to CONFIGFLAG to route all ports to EHCI. - + @param Ehc The EHCI device. @retval EFI_SUCCESS The EHCI has come out of halt state. @@ -451,7 +451,7 @@ EhcInitHC ( EFI_STATUS Status; EFI_PHYSICAL_ADDRESS TempPtr; UINTN PageNumber; - + ASSERT (EhcIsHalt (Ehc)); // @@ -472,9 +472,9 @@ EhcInitHC ( return Status; } - EhcPowerOnAllPorts (Ehc); + EhcPowerOnAllPorts (Ehc); MicroSecondDelay (EHC_ROOT_PORT_RECOVERY_STALL); - + Status = EhcInitSched (Ehc); if (EFI_ERROR (Status)) { @@ -523,26 +523,26 @@ EhcInitHC ( /** Submits bulk transfer to a bulk endpoint of a USB device. - + @param PeiServices The pointer of EFI_PEI_SERVICES. @param This The pointer of PEI_USB2_HOST_CONTROLLER_PPI. @param DeviceAddress Target device address. @param EndPointAddress Endpoint number and its direction in bit 7. - @param DeviceSpeed Device speed, Low speed device doesn't support + @param DeviceSpeed Device speed, Low speed device doesn't support bulk transfer. - @param MaximumPacketLength Maximum packet size the endpoint is capable of + @param MaximumPacketLength Maximum packet size the endpoint is capable of sending or receiving. - @param Data Array of pointers to the buffers of data to transmit + @param Data Array of pointers to the buffers of data to transmit from or receive into. @param DataLength The lenght of the data buffer. @param DataToggle On input, the initial data toggle for the transfer; - On output, it is updated to to next data toggle to use of + On output, it is updated to to next data toggle to use of the subsequent bulk transfer. @param TimeOut Indicates the maximum time, in millisecond, which the transfer is allowed to complete. If Timeout is 0, then the caller must wait for the function to be completed until EFI_SUCCESS or EFI_DEVICE_ERROR is returned. - @param Translator A pointr to the transaction translator data. + @param Translator A pointr to the transaction translator data. @param TransferResult A pointer to the detailed result information of the bulk transfer. @@ -577,7 +577,7 @@ EhcBulkTransfer ( // // Validate the parameters // - if ((DataLength == NULL) || (*DataLength == 0) || + if ((DataLength == NULL) || (*DataLength == 0) || (Data == NULL) || (Data[0] == NULL) || (TransferResult == NULL)) { return EFI_INVALID_PARAMETER; } @@ -652,10 +652,10 @@ ON_EXIT: Retrieves the number of root hub ports. @param[in] PeiServices The pointer to the PEI Services Table. - @param[in] This The pointer to this instance of the + @param[in] This The pointer to this instance of the PEI_USB2_HOST_CONTROLLER_PPI. - @param[out] PortNumber The pointer to the number of the root hub ports. - + @param[out] PortNumber The pointer to the number of the root hub ports. + @retval EFI_SUCCESS The port number was retrieved successfully. @retval EFI_INVALID_PARAMETER PortNumber is NULL. @@ -671,19 +671,19 @@ EhcGetRootHubPortNumber ( PEI_USB2_HC_DEV *EhcDev; EhcDev = PEI_RECOVERY_USB_EHC_DEV_FROM_EHCI_THIS (This); - + if (PortNumber == NULL) { return EFI_INVALID_PARAMETER; - } - + } + *PortNumber = (UINT8)(EhcDev->HcStructParams & HCSP_NPORTS); return EFI_SUCCESS; - + } /** Clears a feature for the specified root hub port. - + @param PeiServices The pointer of EFI_PEI_SERVICES. @param This The pointer of PEI_USB2_HOST_CONTROLLER_PPI. @param PortNumber Specifies the root hub port whose feature @@ -691,7 +691,7 @@ EhcGetRootHubPortNumber ( @param PortFeature Indicates the feature selector associated with the feature clear request. - @retval EFI_SUCCESS The feature specified by PortFeature was cleared + @retval EFI_SUCCESS The feature specified by PortFeature was cleared for the USB root hub port specified by PortNumber. @retval EFI_INVALID_PARAMETER PortNumber is invalid or PortFeature is invalid. @@ -805,7 +805,7 @@ ON_EXIT: /** Sets a feature for the specified root hub port. - + @param PeiServices The pointer of EFI_PEI_SERVICES @param This The pointer of PEI_USB2_HOST_CONTROLLER_PPI @param PortNumber Root hub port to set. @@ -876,7 +876,7 @@ EhcSetRootHubPortFeature ( break; } } - + // // Set one to PortReset bit must also set zero to PortEnable bit // @@ -907,10 +907,10 @@ ON_EXIT: /** Retrieves the current status of a USB root hub port. - + @param PeiServices The pointer of EFI_PEI_SERVICES. @param This The pointer of PEI_USB2_HOST_CONTROLLER_PPI. - @param PortNumber The root hub port to retrieve the state from. + @param PortNumber The root hub port to retrieve the state from. @param PortStatus Variable to receive the port state. @retval EFI_SUCCESS The status of the USB root hub port specified. @@ -957,9 +957,9 @@ EhcGetRootHubPortStatus ( // // Identify device speed. If in K state, it is low speed. - // If the port is enabled after reset, the device is of + // If the port is enabled after reset, the device is of // high speed. The USB bus driver should retrieve the actual - // port speed after reset. + // port speed after reset. // if (EHC_BIT_IS_SET (State, PORTSC_LINESTATE_K)) { PortStatus->PortStatus |= USB_PORT_STAT_LOW_SPEED; @@ -967,7 +967,7 @@ EhcGetRootHubPortStatus ( } else if (EHC_BIT_IS_SET (State, PORTSC_ENABLED)) { PortStatus->PortStatus |= USB_PORT_STAT_HIGH_SPEED; } - + // // Convert the EHCI port/port change state to UEFI status // @@ -993,12 +993,12 @@ ON_EXIT: /** Submits control transfer to a target USB device. - + @param PeiServices The pointer of EFI_PEI_SERVICES. @param This The pointer of PEI_USB2_HOST_CONTROLLER_PPI. @param DeviceAddress The target device address. @param DeviceSpeed Target device speed. - @param MaximumPacketLength Maximum packet size the default control transfer + @param MaximumPacketLength Maximum packet size the default control transfer endpoint is capable of sending or receiving. @param Request USB device request to send. @param TransferDirection Specifies the data direction for the data stage. @@ -1052,12 +1052,12 @@ EhcControlTransfer ( return EFI_INVALID_PARAMETER; } - if ((TransferDirection == EfiUsbNoData) && + if ((TransferDirection == EfiUsbNoData) && ((Data != NULL) || (*DataLength != 0))) { return EFI_INVALID_PARAMETER; } - if ((TransferDirection != EfiUsbNoData) && + if ((TransferDirection != EfiUsbNoData) && ((Data == NULL) || (*DataLength == 0))) { return EFI_INVALID_PARAMETER; } @@ -1225,7 +1225,7 @@ EhcPeimEntry ( if (EFI_ERROR (Status)) { break; } - + // // This PEIM is for UHC type controller. // @@ -1303,19 +1303,19 @@ EhcPeimEntry ( **/ EFI_STATUS InitializeUsbHC ( - IN PEI_USB2_HC_DEV *EhcDev + IN PEI_USB2_HC_DEV *EhcDev ) { EFI_STATUS Status; - + EhcResetHC (EhcDev, EHC_RESET_TIMEOUT); Status = EhcInitHC (EhcDev); if (EFI_ERROR (Status)) { - return EFI_ABORTED; + return EFI_ABORTED; } - + return EFI_SUCCESS; } diff --git a/MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.h b/MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.h index 715a5ab1c1..be4237d84b 100644 --- a/MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.h +++ b/MdeModulePkg/Bus/Pci/EhciPei/EhcPeim.h @@ -1,8 +1,8 @@ /** @file Private Header file for Usb Host Controller PEIM -Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
- +Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The @@ -118,20 +118,20 @@ struct _PEI_USB2_HC_DEV { // PEI_EHC_QTD *ShortReadStop; EFI_EVENT PollTimer; - + // - // Asynchronous(bulk and control) transfer schedule data: + // Asynchronous(bulk and control) transfer schedule data: // ReclaimHead is used as the head of the asynchronous transfer - // list. It acts as the reclamation header. + // list. It acts as the reclamation header. // PEI_EHC_QH *ReclaimHead; - + // // Periodic (interrupt) transfer schedule data: // - VOID *PeriodFrame; // Mapped as common buffer + VOID *PeriodFrame; // Mapped as common buffer VOID *PeriodFrameMap; - + PEI_EHC_QH *PeriodOne; EFI_LIST_ENTRY AsyncIntTransfers; @@ -156,14 +156,14 @@ struct _PEI_USB2_HC_DEV { **/ EFI_STATUS InitializeUsbHC ( - IN PEI_USB2_HC_DEV *EhcDev + IN PEI_USB2_HC_DEV *EhcDev ); /** Initialize the memory management pool for the host controller. - + @param Ehc The EHCI device. - @param Check4G Whether the host controller requires allocated memory + @param Check4G Whether the host controller requires allocated memory from one 4G address space. @param Which4G The 4G memory area each memory allocated should be from. @@ -178,7 +178,7 @@ UsbHcInitMemPool ( IN UINT32 Which4G ) ; - + /** Release the memory management pool. @@ -199,7 +199,7 @@ UsbHcFreeMemPool ( /** Allocate some memory from the host controller's memory pool which can be used to communicate with host controller. - + @param Ehc The EHCI device. @param Pool The host controller's memory pool. @param Size Size of the memory to allocate. diff --git a/MdeModulePkg/Bus/Pci/EhciPei/EhciPei.inf b/MdeModulePkg/Bus/Pci/EhciPei/EhciPei.inf index 813ccc9450..74c13db1c1 100644 --- a/MdeModulePkg/Bus/Pci/EhciPei/EhciPei.inf +++ b/MdeModulePkg/Bus/Pci/EhciPei/EhciPei.inf @@ -4,14 +4,14 @@ # It produces gPeiUsb2HostControllerPpiGuid based on gPeiUsbControllerPpiGuid # which is used to enable recovery function from USB Drivers. # -# Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions # of the BSD License which accompanies this distribution. The # full text of the license may be found at # http://opensource.org/licenses/bsd-license.php -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # diff --git a/MdeModulePkg/Bus/Pci/EhciPei/EhciPei.uni b/MdeModulePkg/Bus/Pci/EhciPei/EhciPei.uni index 9bc809c876..e633014bfc 100644 --- a/MdeModulePkg/Bus/Pci/EhciPei/EhciPei.uni +++ b/MdeModulePkg/Bus/Pci/EhciPei/EhciPei.uni @@ -4,14 +4,14 @@ // It produces gPeiUsb2HostControllerPpiGuid based on gPeiUsbControllerPpiGuid // which is used to enable recovery function from USB Drivers. // -// Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions // of the BSD License which accompanies this distribution. The // full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Bus/Pci/EhciPei/EhciPeiExtra.uni b/MdeModulePkg/Bus/Pci/EhciPei/EhciPeiExtra.uni index cbf1b7d668..4319fe2a77 100644 --- a/MdeModulePkg/Bus/Pci/EhciPei/EhciPeiExtra.uni +++ b/MdeModulePkg/Bus/Pci/EhciPei/EhciPeiExtra.uni @@ -1,7 +1,7 @@ // /** @file // EhciPei Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions @@ -14,8 +14,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "EHCI PEI Module for Recovery" diff --git a/MdeModulePkg/Bus/Pci/EhciPei/EhciReg.h b/MdeModulePkg/Bus/Pci/EhciPei/EhciReg.h index 34c61d8a94..14d3f77e44 100644 --- a/MdeModulePkg/Bus/Pci/EhciPei/EhciReg.h +++ b/MdeModulePkg/Bus/Pci/EhciPei/EhciReg.h @@ -1,8 +1,8 @@ /** @file Private Header file for Usb Host Controller PEIM -Copyright (c) 2010, Intel Corporation. All rights reserved.
- +Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The @@ -94,8 +94,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #define EHCI_IS_DATAIN(EndpointAddr) EHC_BIT_IS_SET((EndpointAddr), 0x80) // -// Structure to map the hardware port states to the -// UEFI's port states. +// Structure to map the hardware port states to the +// UEFI's port states. // typedef struct { UINT16 HwState; @@ -116,7 +116,7 @@ typedef struct { /** Read EHCI capability register. - + @param Ehc The EHCI device. @param Offset Capability register address. @@ -132,7 +132,7 @@ EhcReadCapRegister ( /** Read Ehc Operation register. - + @param Ehc The EHCI device. @param Offset The operation register offset. @@ -148,7 +148,7 @@ EhcReadOpReg ( /** Write the data to the EHCI operation register. - + @param Ehc The EHCI device. @param Offset EHCI operation register offset. @param Data The data to write. @@ -164,7 +164,7 @@ EhcWriteOpReg ( /** Stop the legacy USB SMI support. - + @param Ehc The EHCI device. **/ @@ -177,7 +177,7 @@ EhcClearLegacySupport ( /** Set door bell and wait it to be ACKed by host controller. This function is used to synchronize with the hardware. - + @param Ehc The EHCI device. @param Timeout The time to wait before abort (in millisecond, ms). @@ -193,9 +193,9 @@ EhcSetAndWaitDoorBell ( ; /** - Clear all the interrutp status bits, these bits + Clear all the interrutp status bits, these bits are Write-Clean. - + @param Ehc The EHCI device. **/ @@ -207,7 +207,7 @@ EhcAckAllInterrupt ( /** Check whether Ehc is halted. - + @param Ehc The EHCI device. @retval TRUE The controller is halted. @@ -222,7 +222,7 @@ EhcIsHalt ( /** Check whether system error occurred. - + @param Ehc The EHCI device. @retval TRUE System error happened. @@ -237,7 +237,7 @@ EhcIsSysError ( /** Reset the host controller. - + @param Ehc The EHCI device. @param Timeout Time to wait before abort (in millisecond, ms). @@ -254,7 +254,7 @@ EhcResetHC ( /** Halt the host controller. - + @param Ehc The EHCI device. @param Timeout Time to wait before abort. @@ -271,7 +271,7 @@ EhcHaltHC ( /** Set the EHCI to run - + @param Ehc The EHCI device. @param Timeout Time to wait before abort. @@ -287,14 +287,14 @@ EhcRunHC ( ; /** - Initialize the HC hardware. + Initialize the HC hardware. EHCI spec lists the five things to do to initialize the hardware. 1. Program CTRLDSSEGMENT. 2. Set USBINTR to enable interrupts. 3. Set periodic list base. 4. Set USBCMD, interrupt threshold, frame list size etc. 5. Write 1 to CONFIGFLAG to route all ports to EHCI. - + @param Ehc The EHCI device. @retval EFI_SUCCESS The EHCI has come out of halt state. diff --git a/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c b/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c index 6b19362699..65bc84f0c2 100644 --- a/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c +++ b/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.c @@ -2,8 +2,8 @@ PEIM to produce gPeiUsb2HostControllerPpiGuid based on gPeiUsbControllerPpiGuid which is used to enable recovery function from USB Drivers. -Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
- +Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The @@ -19,7 +19,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** Create helper QTD/QH for the EHCI device. - + @param Ehc The EHCI device. @retval EFI_OUT_OF_RESOURCES Failed to allocate resource for helper QTD/QH. @@ -95,7 +95,7 @@ EhcCreateHelpQ ( /** Initialize the schedule data structure such as frame list. - + @param Ehc The EHCI device to init schedule data for. @retval EFI_OUT_OF_RESOURCES Failed to allocate resource to init schedule data. @@ -162,7 +162,7 @@ EhcInitSched ( if (EFI_ERROR (Status)) { return Status; } - + // // Initialize the frame list entries then set the registers // @@ -186,8 +186,8 @@ EhcInitSched ( /** Free the schedule data. It may be partially initialized. - - @param Ehc The EHCI device. + + @param Ehc The EHCI device. **/ VOID @@ -230,7 +230,7 @@ EhcFreeSched ( due to its interfaces. This simplifies the AsynList management: A reclamation header is always linked to the AsyncListAddr, the only active QH is appended to it. - + @param Ehc The EHCI device. @param Qh The queue head to link. @@ -260,7 +260,7 @@ EhcLinkQhToAsync ( /** Unlink a queue head from the asynchronous schedule list. Need to synchronize with hardware. - + @param Ehc The EHCI device. @param Qh The queue head to unlink. @@ -291,13 +291,13 @@ EhcUnlinkQhFromAsync ( // Set and wait the door bell to synchronize with the hardware // EhcSetAndWaitDoorBell (Ehc, EHC_GENERIC_TIMEOUT); - + return; } /** Check the URB's execution result and update the URB's - result accordingly. + result accordingly. @param Ehc The EHCI device. @param Urb The URB to check result. @@ -358,13 +358,13 @@ EhcCheckUrbResult ( Finished = TRUE; goto ON_EXIT; - + } else if (EHC_BIT_IS_SET (State, QTD_STAT_ACTIVE)) { // // The QTD is still active, no need to check furthur. // Urb->Result |= EFI_USB_ERR_NOTEXECUTE; - + Finished = FALSE; goto ON_EXIT; @@ -387,7 +387,7 @@ EhcCheckUrbResult ( // Status Stage of the setup transfer to get the finial result // if (QtdHw->AltNext == QTD_LINK (Ehc->ShortReadStop, FALSE)) { - + Finished = TRUE; goto ON_EXIT; } @@ -412,7 +412,7 @@ ON_EXIT: /** Execute the transfer by polling the URB. This is a synchronous operation. - + @param Ehc The EHCI device. @param Urb The URB to execute. @param TimeOut The time to wait before abort, in millisecond. diff --git a/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.h b/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.h index 6cc52f8d0a..ebe407c5dd 100644 --- a/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.h +++ b/MdeModulePkg/Bus/Pci/EhciPei/EhciSched.h @@ -1,8 +1,8 @@ /** @file Private Header file for Usb Host Controller PEIM -Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.
- +Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The @@ -19,7 +19,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** Initialize the schedule data structure such as frame list. - + @param Ehc The EHCI device to init schedule data for. @retval EFI_OUT_OF_RESOURCES Failed to allocate resource to init schedule data. @@ -34,7 +34,7 @@ EhcInitSched ( /** Free the schedule data. It may be partially initialized. - + @param Ehc The EHCI device. **/ @@ -50,7 +50,7 @@ EhcFreeSched ( due to its interfaces. This simplifies the AsynList management: A reclamation header is always linked to the AsyncListAddr, the only active QH is appended to it. - + @param Ehc The EHCI device. @param Qh The queue head to link. @@ -65,7 +65,7 @@ EhcLinkQhToAsync ( /** Unlink a queue head from the asynchronous schedule list. Need to synchronize with hardware. - + @param Ehc The EHCI device. @param Qh The queue head to unlink. @@ -79,7 +79,7 @@ EhcUnlinkQhFromAsync ( /** Execute the transfer by polling the URB. This is a synchronous operation. - + @param Ehc The EHCI device. @param Urb The URB to execute. @param TimeOut The time to wait before abort, in millisecond. diff --git a/MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c b/MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c index baacf5d560..a766f70a9d 100644 --- a/MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c +++ b/MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.c @@ -2,8 +2,8 @@ PEIM to produce gPeiUsb2HostControllerPpiGuid based on gPeiUsbControllerPpiGuid which is used to enable recovery function from USB Drivers. -Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
- +Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The @@ -20,7 +20,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** Delete a single asynchronous interrupt transfer for the device and endpoint. - + @param Ehc The EHCI device. @param Data Current data not associated with a QTD. @param DataLen The length of the data. @@ -96,7 +96,7 @@ EhcCreateQtd ( Len += ThisBufLen; Data += ThisBufLen; } - + // // Need to fix the last pointer if the Qtd can't hold all the // user's data to make sure that the length is in the unit of @@ -120,7 +120,7 @@ EhcCreateQtd ( 1. SplitXState in the Status field. 2. Microframe S-mask. 3. Microframe C-mask. - + @param Ep The queue head's related endpoint. @param QhHw The queue head to initialize. @@ -142,7 +142,7 @@ EhcInitIntQh ( QhHw->SMask = QH_MICROFRAME_0; return ; } - + // // For low/full speed device, the transfer must go through // the split transaction. Need to update three fields @@ -160,7 +160,7 @@ EhcInitIntQh ( /** Allocate and initialize a EHCI queue head. - + @param Ehci The EHCI device. @param Ep The endpoint to create queue head for. @@ -185,7 +185,7 @@ EhcCreateQh ( Qh->Signature = EHC_QH_SIG; Qh->NextQh = NULL; Qh->Interval = Ep->PollRate; - + InitializeListHead (&Qh->Qtds); QhHw = &Qh->QhHw; @@ -250,7 +250,7 @@ EhcCreateQh ( can't support high speed endpoint with a interval less than 8 microframe because interval is specified in the unit of ms (millisecond). - + @param Interval The interval to convert. @retval The converted interval. @@ -266,7 +266,7 @@ EhcConvertPollRate ( if (Interval == 0) { return 1; } - + // // Find the index (1 based) of the highest non-zero bit // @@ -282,7 +282,7 @@ EhcConvertPollRate ( /** Free a list of QTDs. - + @param Ehc The EHCI device. @param Qtds The list head of the QTD. @@ -307,7 +307,7 @@ EhcFreeQtds ( /** Free an allocated URB. It is possible for it to be partially inited. - + @param Ehc The EHCI device. @param Urb The URB to free. @@ -338,7 +338,7 @@ EhcFreeUrb ( /** Create a list of QTDs for the URB. - + @param Ehc The EHCI device. @param Urb The URB to create QTDs for. @@ -380,7 +380,7 @@ EhcCreateQtds ( if (Ep->Direction == EfiUsbDataIn) { AlterNext = QTD_LINK (Ehc->ShortReadStop, FALSE); } - + // // Build the Setup and status packets for control transfer // @@ -457,7 +457,7 @@ EhcCreateQtds ( Len += Qtd->DataLen; } - + // // Insert the status packet for control transfer // @@ -496,7 +496,7 @@ ON_ERROR: /** Create a new URB and its associated QTD. - + @param Ehc The EHCI device. @param DevAddr The device address. @param EpAddr Endpoint addrress & its direction. @@ -519,7 +519,7 @@ PEI_URB * EhcCreateUrb ( IN PEI_USB2_HC_DEV *Ehc, IN UINT8 DevAddr, - IN UINT8 EpAddr, + IN UINT8 EpAddr, IN UINT8 DevSpeed, IN UINT8 Toggle, IN UINTN MaxPacket, @@ -540,7 +540,7 @@ EhcCreateUrb ( UINTN Len; PEI_URB *Urb; VOID *Map; - + Urb = Ehc->Urb; Urb->Signature = EHC_URB_SIG; InitializeListHead (&Urb->UrbList); diff --git a/MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.h b/MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.h index 3fe93fb294..009b67d6c9 100644 --- a/MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.h +++ b/MdeModulePkg/Bus/Pci/EhciPei/EhciUrb.h @@ -1,8 +1,8 @@ /** @file Private Header file for Usb Host Controller PEIM -Copyright (c) 2010, Intel Corporation. All rights reserved.
- +Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The @@ -73,7 +73,7 @@ typedef struct _PEI_URB PEI_URB; #define USB_ERR_SHORT_PACKET 0x200 // -// Fill in the hardware link point: pass in a EHC_QH/QH_HW +// Fill in the hardware link point: pass in a EHC_QH/QH_HW // pointer to QH_LINK; A EHC_QTD/QTD_HW pointer to QTD_LINK // #define QH_LINK(Addr, Type, Term) \ @@ -82,16 +82,16 @@ typedef struct _PEI_URB PEI_URB; #define QTD_LINK(Addr, Term) QH_LINK((Addr), 0, (Term)) // -// The defination of EHCI hardware used data structure for -// little endian architecture. The QTD and QH structures -// are required to be 32 bytes aligned. Don't add members +// The defination of EHCI hardware used data structure for +// little endian architecture. The QTD and QH structures +// are required to be 32 bytes aligned. Don't add members // to the head of the associated software strucuture. // #pragma pack(1) typedef struct { UINT32 NextQtd; UINT32 AltNext; - + UINT32 Status : 8; UINT32 Pid : 2; UINT32 ErrCnt : 2; @@ -105,7 +105,7 @@ typedef struct { } QTD_HW; typedef struct { - UINT32 HorizonLink; + UINT32 HorizonLink; // // Endpoint capabilities/Characteristics DWord 1 and DWord 2 // @@ -131,7 +131,7 @@ typedef struct { UINT32 CurQtd; UINT32 NextQtd; UINT32 AltQtd; - + UINT32 Status : 8; UINT32 Pid : 2; UINT32 ErrCnt : 2; @@ -163,7 +163,7 @@ typedef struct _USB_ENDPOINT { } USB_ENDPOINT; // -// Software QTD strcture, this is used to manage all the +// Software QTD strcture, this is used to manage all the // QTD generated from a URB. Don't add fields before QtdHw. // struct _PEI_EHC_QTD { @@ -177,17 +177,17 @@ struct _PEI_EHC_QTD { // -// Software QH structure. All three different transaction types -// supported by UEFI USB, that is the control/bulk/interrupt -// transfers use the queue head and queue token strcuture. +// Software QH structure. All three different transaction types +// supported by UEFI USB, that is the control/bulk/interrupt +// transfers use the queue head and queue token strcuture. // // Interrupt QHs are linked to periodic frame list in the reversed -// 2^N tree. Each interrupt QH is linked to the list starting at +// 2^N tree. Each interrupt QH is linked to the list starting at // frame 0. There is a dummy interrupt QH linked to each frame as // a sentinental whose polling interval is 1. Synchronous interrupt -// transfer is linked after this dummy QH. -// -// For control/bulk transfer, only synchronous (in the sense of UEFI) +// transfer is linked after this dummy QH. +// +// For control/bulk transfer, only synchronous (in the sense of UEFI) // transfer is supported. A dummy QH is linked to EHCI AsyncListAddr // as the reclamation header. New transfer is inserted after this QH. // @@ -196,17 +196,17 @@ struct _PEI_EHC_QH { UINT32 Signature; PEI_EHC_QH *NextQh; // The queue head pointed to by horizontal link EFI_LIST_ENTRY Qtds; // The list of QTDs to this queue head - UINTN Interval; + UINTN Interval; }; // -// URB (Usb Request Block) contains information for all kinds of +// URB (Usb Request Block) contains information for all kinds of // usb requests. // struct _PEI_URB { UINT32 Signature; EFI_LIST_ENTRY UrbList; - + // // Transaction information // @@ -218,14 +218,14 @@ struct _PEI_URB { UINTN DataLen; VOID *DataPhy; // Address of the mapped user data VOID *DataMap; - EFI_ASYNC_USB_TRANSFER_CALLBACK Callback; + EFI_ASYNC_USB_TRANSFER_CALLBACK Callback; VOID *Context; // // Schedule data // PEI_EHC_QH *Qh; - + // // Transaction result // @@ -237,7 +237,7 @@ struct _PEI_URB { /** Delete a single asynchronous interrupt transfer for the device and endpoint. - + @param Ehc The EHCI device. @param Data Current data not associated with a QTD. @param DataLen The length of the data. @@ -261,7 +261,7 @@ EhcCreateQtd ( /** Allocate and initialize a EHCI queue head. - + @param Ehci The EHCI device. @param Ep The endpoint to create queue head for. @@ -277,7 +277,7 @@ EhcCreateQh ( /** Free an allocated URB. It is possible for it to be partially inited. - + @param Ehc The EHCI device. @param Urb The URB to free. @@ -291,7 +291,7 @@ EhcFreeUrb ( /** Create a new URB and its associated QTD. - + @param Ehc The EHCI device. @param DevAddr The device address. @param EpAddr Endpoint addrress & its direction. @@ -314,7 +314,7 @@ PEI_URB * EhcCreateUrb ( IN PEI_USB2_HC_DEV *Ehc, IN UINT8 DevAddr, - IN UINT8 EpAddr, + IN UINT8 EpAddr, IN UINT8 DevSpeed, IN UINT8 Toggle, IN UINTN MaxPacket, diff --git a/MdeModulePkg/Bus/Pci/EhciPei/UsbHcMem.c b/MdeModulePkg/Bus/Pci/EhciPei/UsbHcMem.c index a0419bd857..3cc31f5054 100644 --- a/MdeModulePkg/Bus/Pci/EhciPei/UsbHcMem.c +++ b/MdeModulePkg/Bus/Pci/EhciPei/UsbHcMem.c @@ -2,8 +2,8 @@ PEIM to produce gPeiUsb2HostControllerPpiGuid based on gPeiUsbControllerPpiGuid which is used to enable recovery function from USB Drivers. -Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
- +Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The @@ -54,28 +54,28 @@ UsbHcAllocMemBlock ( return NULL; } ZeroMem ((VOID *)(UINTN)TempPtr, PageNumber*EFI_PAGE_SIZE); - + // // each bit in the bit array represents USBHC_MEM_UNIT // bytes of memory in the memory block. // ASSERT (USBHC_MEM_UNIT * 8 <= EFI_PAGE_SIZE); - + Block = (USBHC_MEM_BLOCK*)(UINTN)TempPtr; Block->BufLen = EFI_PAGES_TO_SIZE (Pages); Block->BitsLen = Block->BufLen / (USBHC_MEM_UNIT * 8); - + PageNumber = (Block->BitsLen)/PAGESIZE +1; Status = PeiServicesAllocatePages ( EfiBootServicesCode, PageNumber, &TempPtr ); - + if (EFI_ERROR (Status)) { return NULL; } - ZeroMem ((VOID *)(UINTN)TempPtr, PageNumber*EFI_PAGE_SIZE); + ZeroMem ((VOID *)(UINTN)TempPtr, PageNumber*EFI_PAGE_SIZE); Block->Bits = (UINT8 *)(UINTN)TempPtr; @@ -184,7 +184,7 @@ UsbHcAllocMemFromBlock ( if (Available < Units) { return NULL; } - + // // Mark the memory as allocated // @@ -283,7 +283,7 @@ UsbHcIsMemBlockEmpty ( { UINTN Index; - + for (Index = 0; Index < Block->BitsLen; Index++) { if (Block->Bits[Index] != 0) { return FALSE; @@ -321,7 +321,7 @@ UsbHcUnlinkMemBlock ( /** Initialize the memory management pool for the host controller. - + @param Ehc The EHCI device. @param Check4G Whether the host controller requires allocated memory. from one 4G address space. @@ -342,7 +342,7 @@ UsbHcInitMemPool ( UINTN PageNumber; EFI_STATUS Status; EFI_PHYSICAL_ADDRESS TempPtr; - + PageNumber = sizeof(USBHC_MEM_POOL)/PAGESIZE +1; Status = PeiServicesAllocatePages ( EfiBootServicesCode, @@ -353,9 +353,9 @@ UsbHcInitMemPool ( if (EFI_ERROR (Status)) { return NULL; } - ZeroMem ((VOID *)(UINTN)TempPtr, PageNumber*EFI_PAGE_SIZE); + ZeroMem ((VOID *)(UINTN)TempPtr, PageNumber*EFI_PAGE_SIZE); - Pool = (USBHC_MEM_POOL *) ((UINTN) TempPtr); + Pool = (USBHC_MEM_POOL *) ((UINTN) TempPtr); Pool->Check4G = Check4G; Pool->Which4G = Which4G; @@ -405,7 +405,7 @@ UsbHcFreeMemPool ( /** Allocate some memory from the host controller's memory pool which can be used to communicate with host controller. - + @param Ehc The EHCI device. @param Pool The host controller's memory pool. @param Size Size of the memory to allocate. @@ -464,7 +464,7 @@ UsbHcAllocateMem ( if (NewBlock == NULL) { return NULL; } - + // // Add the new memory block to the pool, then allocate memory from it // diff --git a/MdeModulePkg/Bus/Pci/EhciPei/UsbHcMem.h b/MdeModulePkg/Bus/Pci/EhciPei/UsbHcMem.h index 717a8c822c..17e60f652c 100644 --- a/MdeModulePkg/Bus/Pci/EhciPei/UsbHcMem.h +++ b/MdeModulePkg/Bus/Pci/EhciPei/UsbHcMem.h @@ -1,8 +1,8 @@ /** @file Private Header file for Usb Host Controller PEIM -Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
- +Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The @@ -32,22 +32,22 @@ typedef struct _USBHC_MEM_BLOCK USBHC_MEM_BLOCK; struct _USBHC_MEM_BLOCK { UINT8 *Bits; // Bit array to record which unit is allocated - UINTN BitsLen; + UINTN BitsLen; UINT8 *Buf; UINT8 *BufHost; UINTN BufLen; // Memory size in bytes - VOID *Mapping; + VOID *Mapping; USBHC_MEM_BLOCK *Next; }; // -// USBHC_MEM_POOL is used to manage the memory used by USB +// USBHC_MEM_POOL is used to manage the memory used by USB // host controller. EHCI requires the control memory and transfer -// data to be on the same 4G memory. +// data to be on the same 4G memory. // typedef struct _USBHC_MEM_POOL { - BOOLEAN Check4G; - UINT32 Which4G; + BOOLEAN Check4G; + UINT32 Which4G; USBHC_MEM_BLOCK *Head; } USBHC_MEM_POOL; @@ -71,7 +71,7 @@ typedef struct _USBHC_MEM_POOL { (Byte)++; \ (Bit) = 0; \ } \ - } while (0) + } while (0) /** diff --git a/MdeModulePkg/Bus/Pci/IdeBusPei/AtapiPeim.c b/MdeModulePkg/Bus/Pci/IdeBusPei/AtapiPeim.c index 58bef161fb..f509b749d2 100644 --- a/MdeModulePkg/Bus/Pci/IdeBusPei/AtapiPeim.c +++ b/MdeModulePkg/Bus/Pci/IdeBusPei/AtapiPeim.c @@ -5,7 +5,7 @@ ATA controllers in the platform. This PPI can be consumed by PEIM which produce gEfiPeiDeviceRecoveryModulePpiGuid for Atapi CD ROM device. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions @@ -21,8 +21,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "AtapiPeim.h" /** - Initializes the Atapi Block Io PPI. - + Initializes the Atapi Block Io PPI. + @param[in] FileHandle Handle of the file being invoked. @param[in] PeiServices Describes the list of possible PEI Services. @@ -97,16 +97,16 @@ AtapiPeimEntry ( /** Gets the count of block I/O devices that one specific block driver detects. - This function is used for getting the count of block I/O devices that one + This function is used for getting the count of block I/O devices that one specific block driver detects. To the PEI ATAPI driver, it returns the number - of all the detected ATAPI devices it detects during the enumeration process. - To the PEI legacy floppy driver, it returns the number of all the legacy - devices it finds during its enumeration process. If no device is detected, - then the function will return zero. - - @param[in] PeiServices General-purpose services that are available + of all the detected ATAPI devices it detects during the enumeration process. + To the PEI legacy floppy driver, it returns the number of all the legacy + devices it finds during its enumeration process. If no device is detected, + then the function will return zero. + + @param[in] PeiServices General-purpose services that are available to every PEIM. - @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI + @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI instance. @param[out] NumberBlockDevices The number of block I/O devices discovered. @@ -135,27 +135,27 @@ AtapiGetNumberOfBlockDevices ( /** Gets a block device's media information. - This function will provide the caller with the specified block device's media - information. If the media changes, calling this function will update the media + This function will provide the caller with the specified block device's media + information. If the media changes, calling this function will update the media information accordingly. @param[in] PeiServices General-purpose services that are available to every PEIM @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI instance. - @param[in] DeviceIndex Specifies the block device to which the function wants - to talk. Because the driver that implements Block I/O - PPIs will manage multiple block devices, the PPIs that - want to talk to a single device must specify the + @param[in] DeviceIndex Specifies the block device to which the function wants + to talk. Because the driver that implements Block I/O + PPIs will manage multiple block devices, the PPIs that + want to talk to a single device must specify the device index that was assigned during the enumeration - process. This index is a number from one to + process. This index is a number from one to NumberBlockDevices. - @param[out] MediaInfo The media information of the specified block media. - The caller is responsible for the ownership of this + @param[out] MediaInfo The media information of the specified block media. + The caller is responsible for the ownership of this data structure. - - @retval EFI_SUCCESS Media information about the specified block device + + @retval EFI_SUCCESS Media information about the specified block device was obtained successfully. - @retval EFI_DEVICE_ERROR Cannot get the media information due to a hardware + @retval EFI_DEVICE_ERROR Cannot get the media information due to a hardware error. @retval Others Other failure occurs. @@ -196,7 +196,7 @@ AtapiGetBlockDeviceMediaInfo ( // // probe media and retrieve latest media information // - DEBUG ((EFI_D_INFO, "Atatpi GetInfo DevicePosition is %d\n", AtapiBlkIoDev->DeviceInfo[Index].DevicePosition)); + DEBUG ((EFI_D_INFO, "Atatpi GetInfo DevicePosition is %d\n", AtapiBlkIoDev->DeviceInfo[Index].DevicePosition)); DEBUG ((EFI_D_INFO, "Atatpi GetInfo DeviceType is %d\n", AtapiBlkIoDev->DeviceInfo[Index].MediaInfo.DeviceType)); DEBUG ((EFI_D_INFO, "Atatpi GetInfo MediaPresent is %d\n", AtapiBlkIoDev->DeviceInfo[Index].MediaInfo.MediaPresent)); DEBUG ((EFI_D_INFO, "Atatpi GetInfo BlockSize is 0x%x\n", AtapiBlkIoDev->DeviceInfo[Index].MediaInfo.BlockSize)); @@ -217,7 +217,7 @@ AtapiGetBlockDeviceMediaInfo ( DEBUG ((EFI_D_INFO, "Atatpi GetInfo MediaPresent is %d\n", AtapiBlkIoDev->DeviceInfo[Index].MediaInfo.MediaPresent)); DEBUG ((EFI_D_INFO, "Atatpi GetInfo BlockSize is 0x%x\n", AtapiBlkIoDev->DeviceInfo[Index].MediaInfo.BlockSize)); DEBUG ((EFI_D_INFO, "Atatpi GetInfo LastBlock is 0x%x\n", AtapiBlkIoDev->DeviceInfo[Index].MediaInfo.LastBlock)); - + // // Get media info from AtapiBlkIoDev // @@ -229,31 +229,31 @@ AtapiGetBlockDeviceMediaInfo ( /** Reads the requested number of blocks from the specified block device. - The function reads the requested number of blocks from the device. All the + The function reads the requested number of blocks from the device. All the blocks are read, or an error is returned. If there is no media in the device, the function returns EFI_NO_MEDIA. - @param[in] PeiServices General-purpose services that are available to + @param[in] PeiServices General-purpose services that are available to every PEIM. @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI instance. - @param[in] DeviceIndex Specifies the block device to which the function wants - to talk. Because the driver that implements Block I/O - PPIs will manage multiple block devices, the PPIs that - want to talk to a single device must specify the device - index that was assigned during the enumeration process. + @param[in] DeviceIndex Specifies the block device to which the function wants + to talk. Because the driver that implements Block I/O + PPIs will manage multiple block devices, the PPIs that + want to talk to a single device must specify the device + index that was assigned during the enumeration process. This index is a number from one to NumberBlockDevices. @param[in] StartLBA The starting logical block address (LBA) to read from on the device @param[in] BufferSize The size of the Buffer in bytes. This number must be a multiple of the intrinsic block size of the device. @param[out] Buffer A pointer to the destination buffer for the data. - The caller is responsible for the ownership of the + The caller is responsible for the ownership of the buffer. - + @retval EFI_SUCCESS The data was read correctly from the device. - @retval EFI_DEVICE_ERROR The device reported an error while attempting + @retval EFI_DEVICE_ERROR The device reported an error while attempting to perform the read operation. - @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not + @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid, or the buffer is not properly aligned. @retval EFI_NO_MEDIA There is no media in the device. @retval EFI_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of @@ -553,7 +553,7 @@ AtapiEnumerateDevices ( ); // - // Allow SATA Devices to spin-up. This is needed if + // Allow SATA Devices to spin-up. This is needed if // SEC and PEI phase is too short, for example Release Build. // DEBUG ((EFI_D_INFO, "Delay for %d seconds for SATA devices to spin-up\n", PcdGet16 (PcdSataSpinUpDelayInSecForRecoveryPath))); @@ -571,7 +571,7 @@ AtapiEnumerateDevices ( // // Using Command and Control Regs Base Address to fill other registers. // - for (Index1 = 0; Index1 < IdeEnabledNumber; Index1 ++) { + for (Index1 = 0; Index1 < IdeEnabledNumber; Index1 ++) { CommandBlockBaseAddr = IdeRegsBaseAddr[Index1].CommandBlockBaseAddr; AtapiBlkIoDev->IdeIoPortReg[Index1].Data = CommandBlockBaseAddr; AtapiBlkIoDev->IdeIoPortReg[Index1].Reg1.Feature = (UINT16) (CommandBlockBaseAddr + 0x1); @@ -585,7 +585,7 @@ AtapiEnumerateDevices ( ControlBlockBaseAddr = IdeRegsBaseAddr[Index1].ControlBlockBaseAddr; AtapiBlkIoDev->IdeIoPortReg[Index1].Alt.DeviceControl = ControlBlockBaseAddr; AtapiBlkIoDev->IdeIoPortReg[Index1].DriveAddress = (UINT16) (ControlBlockBaseAddr + 0x1); - + // // Scan IDE bus for ATAPI devices IDE or Sata device // @@ -628,7 +628,7 @@ AtapiEnumerateDevices ( /** Detect Atapi devices. - + @param[in] AtapiBlkIoDev A pointer to atapi block IO device. @param[in] DevicePosition An integer to signify device position. @param[out] MediaInfo The media information of the specified block media. @@ -667,7 +667,7 @@ DiscoverAtapiDevice ( /** Check power mode of Atapi devices. - + @param[in] AtapiBlkIoDev A pointer to atapi block IO device. @param[in] DevicePosition An integer to signify device position. @param[in] AtaCommand The Ata Command passed in. @@ -800,7 +800,7 @@ CheckPowerMode ( /** Detect if an IDE controller exists in specified position. - + @param[in] AtapiBlkIoDev A pointer to atapi block IO device. @param[in] DevicePosition An integer to signify device position. @@ -842,7 +842,7 @@ DetectIDEController ( /** Wait specified time interval to poll for BSY bit clear in the Status Register. - + @param[in] AtapiBlkIoDev A pointer to atapi block IO device. @param[in] IdeIoRegisters A pointer to IDE IO registers. @param[in] TimeoutInMilliSeconds Time specified in milliseconds. @@ -887,7 +887,7 @@ WaitForBSYClear ( /** Wait specified time interval to poll for DRDY bit set in the Status register. - + @param[in] AtapiBlkIoDev A pointer to atapi block IO device. @param[in] IdeIoRegisters A pointer to IDE IO registers. @param[in] TimeoutInMilliSeconds Time specified in milliseconds. @@ -928,7 +928,7 @@ DRDYReady ( return EFI_ABORTED; } } - + MicroSecondDelay (250); Delay--; @@ -944,7 +944,7 @@ DRDYReady ( /** Wait specified time interval to poll for DRQ bit clear in the Status Register. - + @param[in] AtapiBlkIoDev A pointer to atapi block IO device. @param[in] IdeIoRegisters A pointer to IDE IO registers. @param[in] TimeoutInMilliSeconds Time specified in milliseconds. @@ -987,7 +987,7 @@ DRQClear ( return EFI_ABORTED; } } - + MicroSecondDelay (250); Delay--; @@ -1002,7 +1002,7 @@ DRQClear ( /** Wait specified time interval to poll for DRQ bit clear in the Alternate Status Register. - + @param[in] AtapiBlkIoDev A pointer to atapi block IO device. @param[in] IdeIoRegisters A pointer to IDE IO registers. @param[in] TimeoutInMilliSeconds Time specified in milliseconds. @@ -1045,7 +1045,7 @@ DRQClear2 ( return EFI_ABORTED; } } - + MicroSecondDelay (250); Delay--; @@ -1406,7 +1406,7 @@ TestUnitReady ( /** Send out ATAPI commands conforms to the Packet Command with PIO Data In Protocol. - + @param[in] AtapiBlkIoDev A pointer to atapi block IO device. @param[in] DevicePosition An integer to signify device position. @param[in] Packet A pointer to ATAPI command packet. @@ -1702,8 +1702,8 @@ Inquiry ( return EFI_SUCCESS; } -/** - Used before read/write blocks from/to ATAPI device media. +/** + Used before read/write blocks from/to ATAPI device media. Since ATAPI device media is removable, it is necessary to detect whether media is present and get current present media's information. @@ -1739,7 +1739,7 @@ DetectMedia ( if (SenseBuffers == NULL) { return EFI_OUT_OF_RESOURCES; } - + // // Test Unit Ready command is used to detect whether device is accessible, // the device will produce corresponding Sense data. @@ -1878,7 +1878,7 @@ DetectMedia ( return EFI_SUCCESS; } -/** +/** Reset specified Atapi device. @param[in] AtapiBlkIoDev A pointer to atapi block IO device. @@ -1976,7 +1976,7 @@ ResetDevice ( } -/** +/** Sends out ATAPI Request Sense Packet Command to the specified device. @param[in] AtapiBlkIoDev A pointer to atapi block IO device. @@ -2072,7 +2072,7 @@ RequestSense ( return EFI_SUCCESS; } -/** +/** Sends out ATAPI Read Capacity Packet Command to the specified device. This command will return the information regarding the capacity of the media in the device. @@ -2185,7 +2185,7 @@ ReadCapacity ( } } -/** +/** Perform read from disk in block unit. @param[in] AtapiBlkIoDev A pointer to atapi block IO device. @@ -2288,7 +2288,7 @@ ReadSectors ( return Status; } -/** +/** Check if there is media according to sense data. @param[in] SenseData Pointer to sense data. @@ -2324,14 +2324,14 @@ IsNoMedia ( return IsNoMedia; } -/** +/** Check if device state is unclear according to sense data. @param[in] SenseData Pointer to sense data. @param[in] SenseCounts Count of sense data. @retval TRUE Device state is unclear - @retval FALSE Device state is clear + @retval FALSE Device state is clear **/ BOOLEAN @@ -2365,7 +2365,7 @@ IsDeviceStateUnclear ( return Unclear; } -/** +/** Check if there is media error according to sense data. @param[in] SenseData Pointer to sense data. @@ -2438,7 +2438,7 @@ IsMediaError ( return IsError; } -/** +/** Check if drive is ready according to sense data. @param[in] SenseData Pointer to sense data. diff --git a/MdeModulePkg/Bus/Pci/IdeBusPei/AtapiPeim.h b/MdeModulePkg/Bus/Pci/IdeBusPei/AtapiPeim.h index 20b35c4afd..2b06a8ba1b 100644 --- a/MdeModulePkg/Bus/Pci/IdeBusPei/AtapiPeim.h +++ b/MdeModulePkg/Bus/Pci/IdeBusPei/AtapiPeim.h @@ -1,7 +1,7 @@ /** @file Private Include file for IdeBus PEIM. -Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions @@ -140,16 +140,16 @@ typedef struct { /** Gets the count of block I/O devices that one specific block driver detects. - This function is used for getting the count of block I/O devices that one + This function is used for getting the count of block I/O devices that one specific block driver detects. To the PEI ATAPI driver, it returns the number - of all the detected ATAPI devices it detects during the enumeration process. - To the PEI legacy floppy driver, it returns the number of all the legacy - devices it finds during its enumeration process. If no device is detected, - then the function will return zero. - - @param[in] PeiServices General-purpose services that are available + of all the detected ATAPI devices it detects during the enumeration process. + To the PEI legacy floppy driver, it returns the number of all the legacy + devices it finds during its enumeration process. If no device is detected, + then the function will return zero. + + @param[in] PeiServices General-purpose services that are available to every PEIM. - @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI + @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI instance. @param[out] NumberBlockDevices The number of block I/O devices discovered. @@ -167,27 +167,27 @@ AtapiGetNumberOfBlockDevices ( /** Gets a block device's media information. - This function will provide the caller with the specified block device's media - information. If the media changes, calling this function will update the media + This function will provide the caller with the specified block device's media + information. If the media changes, calling this function will update the media information accordingly. @param[in] PeiServices General-purpose services that are available to every PEIM @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI instance. - @param[in] DeviceIndex Specifies the block device to which the function wants - to talk. Because the driver that implements Block I/O - PPIs will manage multiple block devices, the PPIs that - want to talk to a single device must specify the + @param[in] DeviceIndex Specifies the block device to which the function wants + to talk. Because the driver that implements Block I/O + PPIs will manage multiple block devices, the PPIs that + want to talk to a single device must specify the device index that was assigned during the enumeration - process. This index is a number from one to + process. This index is a number from one to NumberBlockDevices. - @param[out] MediaInfo The media information of the specified block media. - The caller is responsible for the ownership of this + @param[out] MediaInfo The media information of the specified block media. + The caller is responsible for the ownership of this data structure. - - @retval EFI_SUCCESS Media information about the specified block device + + @retval EFI_SUCCESS Media information about the specified block device was obtained successfully. - @retval EFI_DEVICE_ERROR Cannot get the media information due to a hardware + @retval EFI_DEVICE_ERROR Cannot get the media information due to a hardware error. @retval Others Other failure occurs. @@ -204,31 +204,31 @@ AtapiGetBlockDeviceMediaInfo ( /** Reads the requested number of blocks from the specified block device. - The function reads the requested number of blocks from the device. All the + The function reads the requested number of blocks from the device. All the blocks are read, or an error is returned. If there is no media in the device, the function returns EFI_NO_MEDIA. - @param[in] PeiServices General-purpose services that are available to + @param[in] PeiServices General-purpose services that are available to every PEIM. @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI instance. - @param[in] DeviceIndex Specifies the block device to which the function wants - to talk. Because the driver that implements Block I/O - PPIs will manage multiple block devices, the PPIs that - want to talk to a single device must specify the device - index that was assigned during the enumeration process. + @param[in] DeviceIndex Specifies the block device to which the function wants + to talk. Because the driver that implements Block I/O + PPIs will manage multiple block devices, the PPIs that + want to talk to a single device must specify the device + index that was assigned during the enumeration process. This index is a number from one to NumberBlockDevices. @param[in] StartLBA The starting logical block address (LBA) to read from on the device @param[in] BufferSize The size of the Buffer in bytes. This number must be a multiple of the intrinsic block size of the device. @param[out] Buffer A pointer to the destination buffer for the data. - The caller is responsible for the ownership of the + The caller is responsible for the ownership of the buffer. - + @retval EFI_SUCCESS The data was read correctly from the device. - @retval EFI_DEVICE_ERROR The device reported an error while attempting + @retval EFI_DEVICE_ERROR The device reported an error while attempting to perform the read operation. - @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not + @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid, or the buffer is not properly aligned. @retval EFI_NO_MEDIA There is no media in the device. @retval EFI_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of @@ -374,7 +374,7 @@ AtapiEnumerateDevices ( /** Detect Atapi devices. - + @param[in] AtapiBlkIoDev A pointer to atapi block IO device. @param[in] DevicePosition An integer to signify device position. @param[out] MediaInfo The media information of the specified block media. @@ -394,7 +394,7 @@ DiscoverAtapiDevice ( /** Detect if an IDE controller exists in specified position. - + @param[in] AtapiBlkIoDev A pointer to atapi block IO device. @param[in] DevicePosition An integer to signify device position. @@ -410,7 +410,7 @@ DetectIDEController ( /** Wait specified time interval to poll for BSY bit clear in the Status Register. - + @param[in] AtapiBlkIoDev A pointer to atapi block IO device. @param[in] IdeIoRegisters A pointer to IDE IO registers. @param[in] TimeoutInMilliSeconds Time specified in milliseconds. @@ -428,7 +428,7 @@ WaitForBSYClear ( /** Wait specified time interval to poll for DRDY bit set in the Status register. - + @param[in] AtapiBlkIoDev A pointer to atapi block IO device. @param[in] IdeIoRegisters A pointer to IDE IO registers. @param[in] TimeoutInMilliSeconds Time specified in milliseconds. @@ -446,7 +446,7 @@ DRDYReady ( /** Wait specified time interval to poll for DRQ bit clear in the Status Register. - + @param[in] AtapiBlkIoDev A pointer to atapi block IO device. @param[in] IdeIoRegisters A pointer to IDE IO registers. @param[in] TimeoutInMilliSeconds Time specified in milliseconds. @@ -464,7 +464,7 @@ DRQClear ( /** Wait specified time interval to poll for DRQ bit clear in the Alternate Status Register. - + @param[in] AtapiBlkIoDev A pointer to atapi block IO device. @param[in] IdeIoRegisters A pointer to IDE IO registers. @param[in] TimeoutInMilliSeconds Time specified in milliseconds. @@ -569,7 +569,7 @@ TestUnitReady ( /** Send out ATAPI commands conforms to the Packet Command with PIO Data In Protocol. - + @param[in] AtapiBlkIoDev A pointer to atapi block IO device. @param[in] DevicePosition An integer to signify device position. @param[in] Packet A pointer to ATAPI command packet. @@ -613,10 +613,10 @@ Inquiry ( OUT EFI_PEI_BLOCK_IO2_MEDIA *MediaInfo2 ); -/** - Used before read/write blocks from/to ATAPI device media. +/** + Used before read/write blocks from/to ATAPI device media. Since ATAPI device media is removable, it is necessary to detect - whether media is present and get current present media's information. + whether media is present and get current present media's information. @param[in] AtapiBlkIoDev A pointer to atapi block IO device. @param[in] DevicePosition An integer to signify device position. @@ -636,7 +636,7 @@ DetectMedia ( IN OUT EFI_PEI_BLOCK_IO2_MEDIA *MediaInfo2 ); -/** +/** Reset specified Atapi device. @param[in] AtapiBlkIoDev A pointer to atapi block IO device. @@ -654,7 +654,7 @@ ResetDevice ( IN BOOLEAN Extensive ); -/** +/** Sends out ATAPI Request Sense Packet Command to the specified device. @param[in] AtapiBlkIoDev A pointer to atapi block IO device. @@ -674,7 +674,7 @@ RequestSense ( IN OUT UINT8 *SenseCounts ); -/** +/** Sends out ATAPI Read Capacity Packet Command to the specified device. This command will return the information regarding the capacity of the media in the device. @@ -696,7 +696,7 @@ ReadCapacity ( IN OUT EFI_PEI_BLOCK_IO2_MEDIA *MediaInfo2 ); -/** +/** Perform read from disk in block unit. @param[in] AtapiBlkIoDev A pointer to atapi block IO device. @@ -720,7 +720,7 @@ ReadSectors ( IN UINTN BlockSize ); -/** +/** Check if there is media according to sense data. @param[in] SenseData Pointer to sense data. @@ -736,14 +736,14 @@ IsNoMedia ( IN UINTN SenseCounts ); -/** +/** Check if device state is unclear according to sense data. @param[in] SenseData Pointer to sense data. @param[in] SenseCounts Count of sense data. @retval TRUE Device state is unclear - @retval FALSE Device state is clear + @retval FALSE Device state is clear **/ BOOLEAN @@ -752,7 +752,7 @@ IsDeviceStateUnclear ( IN UINTN SenseCounts ); -/** +/** Check if there is media error according to sense data. @param[in] SenseData Pointer to sense data. @@ -768,7 +768,7 @@ IsMediaError ( IN UINTN SenseCounts ); -/** +/** Check if drive is ready according to sense data. @param[in] SenseData Pointer to sense data. diff --git a/MdeModulePkg/Bus/Pci/IdeBusPei/IdeBusPei.uni b/MdeModulePkg/Bus/Pci/IdeBusPei/IdeBusPei.uni index 60d235c75f..15d50c1434 100644 --- a/MdeModulePkg/Bus/Pci/IdeBusPei/IdeBusPei.uni +++ b/MdeModulePkg/Bus/Pci/IdeBusPei/IdeBusPei.uni @@ -3,17 +3,17 @@ // // This PPI can be consumed by PEIM which produce gEfiPeiDeviceRecoveryModulePpiGuid // for Atapi CD ROM device. -// +// // This module discovers CDROM devices in Legacy and native mode and installs block IO ppis for them. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions // of the BSD License which accompanies this distribution. The // full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Bus/Pci/IdeBusPei/IdeBusPeiExtra.uni b/MdeModulePkg/Bus/Pci/IdeBusPei/IdeBusPeiExtra.uni index 59ce6b159f..10243428f6 100644 --- a/MdeModulePkg/Bus/Pci/IdeBusPei/IdeBusPeiExtra.uni +++ b/MdeModulePkg/Bus/Pci/IdeBusPei/IdeBusPeiExtra.uni @@ -1,7 +1,7 @@ // /** @file // IdeBusPei Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions @@ -14,8 +14,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "IDE Bus PEI Module for Recovery" diff --git a/MdeModulePkg/Bus/Pci/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c b/MdeModulePkg/Bus/Pci/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c index da8daba87d..6764a85dd1 100644 --- a/MdeModulePkg/Bus/Pci/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c +++ b/MdeModulePkg/Bus/Pci/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupport.c @@ -1,7 +1,7 @@ /** @file This module is one template module for Incompatible PCI Device Support protocol. It includes one incompatible pci devices list template. - + Incompatible PCI Device Support protocol allows the PCI bus driver to support resource allocation for some PCI devices that do not comply with the PCI Specification. @@ -68,7 +68,7 @@ typedef struct { the configuration requirement. @retval EFI_SUCCESS Successfully got ACPI resource for specified PCI device. - @retval EFI_INVALID_PARAMETER Configuration is NULL. + @retval EFI_INVALID_PARAMETER Configuration is NULL. @retval EFI_OUT_OF_RESOURCES No memory available. @retval EFI_UNSUPPORTED The specified PCI device wasn't supported. @@ -233,7 +233,7 @@ IncompatiblePciDeviceSupportEntryPoint ( the configuration requirement. @retval EFI_SUCCESS Successfully got ACPI resource for specified PCI device. - @retval EFI_INVALID_PARAMETER Configuration is NULL. + @retval EFI_INVALID_PARAMETER Configuration is NULL. @retval EFI_OUT_OF_RESOURCES No memory available. @retval EFI_UNSUPPORTED The specified PCI device wasn't supported. diff --git a/MdeModulePkg/Bus/Pci/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupportDxe.inf b/MdeModulePkg/Bus/Pci/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupportDxe.inf index a83edaec7b..fa3e012cc7 100644 --- a/MdeModulePkg/Bus/Pci/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupportDxe.inf +++ b/MdeModulePkg/Bus/Pci/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupportDxe.inf @@ -1,10 +1,10 @@ ## @file # PCI Incompatible device support module template. # -# Installs EFI PCI Incompatible Device Support protocol and includes one incompatile +# Installs EFI PCI Incompatible Device Support protocol and includes one incompatile # pci devices list template. # -# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License diff --git a/MdeModulePkg/Bus/Pci/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupportExtra.uni b/MdeModulePkg/Bus/Pci/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupportExtra.uni index 2600140094..1306b5f920 100644 --- a/MdeModulePkg/Bus/Pci/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupportExtra.uni +++ b/MdeModulePkg/Bus/Pci/IncompatiblePciDeviceSupportDxe/IncompatiblePciDeviceSupportExtra.uni @@ -1,7 +1,7 @@ // /** @file // IncompatiblePciDeviceSupport Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Incompatible PCI Device Support DXE Driver" diff --git a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf index 4918696104..bfb783205c 100644 --- a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf +++ b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxe.inf @@ -4,7 +4,7 @@ # NvmExpressDxe driver is used to manage non-volatile memory subsystem which follows # NVM Express specification. # -# Copyright (c) 2013 - 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -78,4 +78,4 @@ # [UserExtensions.TianoCore."ExtraFiles"] - NvmExpressDxeExtra.uni \ No newline at end of file + NvmExpressDxeExtra.uni diff --git a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxeExtra.uni b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxeExtra.uni index 2f0ef9422d..5b7fa32976 100644 --- a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxeExtra.uni +++ b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // NvmExpressDxe Localized Strings and Content // -// Copyright (c) 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "NVM Express DXE Driver" diff --git a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c index ea48e78827..30ade3a589 100644 --- a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c +++ b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressHci.c @@ -2,7 +2,7 @@ NvmExpressDxe driver is used to manage non-volatile memory subsystem which follows NVM Express specification. - Copyright (c) 2013 - 2017, Intel Corporation. All rights reserved.
+ Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -1003,7 +1003,7 @@ NvmeControllerInit ( // if (Private->ControllerData == NULL) { Private->ControllerData = (NVME_ADMIN_CONTROLLER_DATA *)AllocateZeroPool (sizeof(NVME_ADMIN_CONTROLLER_DATA)); - + if (Private->ControllerData == NULL) { return EFI_OUT_OF_RESOURCES; } diff --git a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c index cfad1587f2..2468871322 100644 --- a/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c +++ b/MdeModulePkg/Bus/Pci/NvmExpressDxe/NvmExpressPassthru.c @@ -781,7 +781,7 @@ NvmExpressPassThru ( // Copy the Respose Queue entry for this command to the callers response buffer // CopyMem(Packet->NvmeCompletion, Cq, sizeof(EFI_NVM_EXPRESS_COMPLETION)); - + // // Dump every completion entry status for debugging. // diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c index a1654c0025..9ae45cca9b 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBus.c @@ -140,7 +140,7 @@ PciBusDriverBindingSupported ( // if (RemainingDevicePath != NULL) { // - // Check if RemainingDevicePath is the End of Device Path Node, + // Check if RemainingDevicePath is the End of Device Path Node, // if yes, go on checking other conditions // if (!IsDevicePathEnd (RemainingDevicePath)) { @@ -254,7 +254,7 @@ PciBusDriverBindingStart ( // if (RemainingDevicePath != NULL) { // - // Check if RemainingDevicePath is the End of Device Path Node, + // Check if RemainingDevicePath is the End of Device Path Node, // if yes, return EFI_SUCCESS // if (IsDevicePathEnd (RemainingDevicePath)) { @@ -282,14 +282,14 @@ PciBusDriverBindingStart ( // // If PCI Platform protocol doesn't exist, try to Pci Override Protocol. // - if (gPciPlatformProtocol == NULL) { + if (gPciPlatformProtocol == NULL) { gPciOverrideProtocol = NULL; gBS->LocateProtocol ( &gEfiPciOverrideProtocolGuid, NULL, (VOID **) &gPciOverrideProtocol ); - } + } if (mIoMmuProtocol == NULL) { gBS->LocateProtocol ( @@ -315,7 +315,7 @@ PciBusDriverBindingStart ( This->DriverBindingHandle, Controller, EFI_OPEN_PROTOCOL_GET_PROTOCOL - ); + ); ASSERT_EFI_ERROR (Status); // diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf index 97608bfcf2..a21dd2b5ed 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxe.inf @@ -2,7 +2,7 @@ # The PCI bus driver will probe all PCI devices and allocate MMIO and IO space for these devices. # Please use PCD feature flag PcdPciBusHotplugDeviceSupport to enable hot plug supporting. # -# Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -90,8 +90,8 @@ gEfiPciHotPlugInitProtocolGuid ## SOMETIMES_CONSUMES gEfiPciHostBridgeResourceAllocationProtocolGuid ## TO_START gEfiPciPlatformProtocolGuid ## SOMETIMES_CONSUMES - gEfiPciOverrideProtocolGuid ## SOMETIMES_CONSUMES - gEfiPciEnumerationCompleteProtocolGuid ## PRODUCES + gEfiPciOverrideProtocolGuid ## SOMETIMES_CONSUMES + gEfiPciEnumerationCompleteProtocolGuid ## PRODUCES gEfiPciRootBridgeIoProtocolGuid ## TO_START gEfiIncompatiblePciDeviceSupportProtocolGuid ## SOMETIMES_CONSUMES gEfiLoadFile2ProtocolGuid ## SOMETIMES_PRODUCES diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxeExtra.uni b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxeExtra.uni index 8f318d8f55..f562ae8b67 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxeExtra.uni +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciBusDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // PciBusDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "PCI Bus DXE Driver" diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c index f69fe938da..ad7a2337f5 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciDeviceSupport.c @@ -236,7 +236,7 @@ RegisterPciDevice ( PciIo = &(PciIoDevice->PciIo); Data8 = PCI_INT_LINE_UNKNOWN; PciIo->Pci.Write (PciIo, EfiPciIoWidthUint8, 0x3C, 1, &Data8); - + // // Process OpRom // @@ -296,7 +296,7 @@ RegisterPciDevice ( PciIoDevice->PciIo.RomImage, PciIoDevice->PciIo.RomSize ); - } + } } } diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c index d5d3c07393..f44db01a9d 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumerator.c @@ -187,7 +187,7 @@ PciRootBridgeEnumerator ( AddrRangeMin = Configuration1->AddrRangeMin; Configuration1->AddrRangeMin = Configuration2->AddrRangeMin; Configuration2->AddrRangeMin = AddrRangeMin; - + AddrLen = Configuration1->AddrLen; Configuration1->AddrLen = Configuration2->AddrLen; Configuration2->AddrLen = AddrLen; @@ -234,7 +234,7 @@ PciRootBridgeEnumerator ( Status = PciAllocateBusNumber (RootBridgeDev, SubBusNumber, PaddedBusRange, &SubBusNumber); if (EFI_ERROR (Status)) { return Status; - } + } // // Find the bus range which contains the higest bus number, then returns the number of buses @@ -252,7 +252,7 @@ PciRootBridgeEnumerator ( Configuration++; Desc = Configuration->Desc; Configuration->Desc = ACPI_END_TAG_DESCRIPTOR; - + // // Set bus number // @@ -267,7 +267,7 @@ PciRootBridgeEnumerator ( // Configuration->Desc = Desc; (Configuration - 1)->AddrLen = AddrLen; - + return Status; } @@ -1812,7 +1812,7 @@ NotifyPhase ( Phase, ChipsetEntry ); - } + } Status = PciResAlloc->NotifyPhase ( PciResAlloc, @@ -2043,7 +2043,7 @@ PciHotPlugRequestNotify ( return EFI_INVALID_PARAMETER; } } - + Status = gBS->OpenProtocol ( Controller, &gEfiPciIoProtocolGuid, diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c index 6f3d1bebc6..cfd291ef7d 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciEnumeratorSupport.c @@ -1736,7 +1736,7 @@ PciIovParseVfBar ( break; } } - + // // Check the length again so as to keep compatible with some special bars // @@ -1745,7 +1745,7 @@ PciIovParseVfBar ( PciIoDevice->VfPciBar[BarIndex].BaseAddress = 0; PciIoDevice->VfPciBar[BarIndex].Alignment = 0; } - + // // Increment number of bar // @@ -2185,7 +2185,7 @@ CreatePciIoDevice ( // ParentPciIo = &Bridge->PciIo; ParentPciIo->Pci.Read ( - ParentPciIo, + ParentPciIo, EfiPciIoWidthUint32, Bridge->PciExpressCapabilityOffset + EFI_PCIE_CAPABILITY_DEVICE_CAPABILITIES_2_OFFSET, 1, diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c index 62179eb44b..87b0b9884a 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciIo.c @@ -1,7 +1,7 @@ /** @file EFI PCI IO protocol functions implementation for PCI Bus module. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -232,7 +232,7 @@ PciIoPollMem ( // // If request is not aligned, then convert request to EfiPciIoWithXXXUint8 - // + // if (FeaturePcdGet (PcdUnalignedPciIoEnable)) { if ((Offset & ((1 << (Width & 0x03)) - 1)) != 0) { Status = PciIoMemRead (This, Width, BarIndex, Offset, 1, Result); @@ -262,7 +262,7 @@ PciIoPollMem ( } while (TRUE); } } - + Status = PciIoDevice->PciRootBridgeIo->PollMem ( PciIoDevice->PciRootBridgeIo, (EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) Width, @@ -335,7 +335,7 @@ PciIoPollIo ( // // If request is not aligned, then convert request to EfiPciIoWithXXXUint8 - // + // if (FeaturePcdGet (PcdUnalignedPciIoEnable)) { if ((Offset & ((1 << (Width & 0x03)) - 1)) != 0) { Status = PciIoIoRead (This, Width, BarIndex, Offset, 1, Result); @@ -365,7 +365,7 @@ PciIoPollIo ( } while (TRUE); } } - + Status = PciIoDevice->PciRootBridgeIo->PollIo ( PciIoDevice->PciRootBridgeIo, (EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) Width, @@ -438,14 +438,14 @@ PciIoMemRead ( // // If request is not aligned, then convert request to EfiPciIoWithXXXUint8 - // + // if (FeaturePcdGet (PcdUnalignedPciIoEnable)) { if ((Offset & ((1 << (Width & 0x03)) - 1)) != 0) { Count *= (UINTN)(1 << (Width & 0x03)); Width = (EFI_PCI_IO_PROTOCOL_WIDTH) (Width & (~0x03)); } - } - + } + Status = PciIoDevice->PciRootBridgeIo->Mem.Read ( PciIoDevice->PciRootBridgeIo, @@ -517,7 +517,7 @@ PciIoMemWrite ( // // If request is not aligned, then convert request to EfiPciIoWithXXXUint8 - // + // if (FeaturePcdGet (PcdUnalignedPciIoEnable)) { if ((Offset & ((1 << (Width & 0x03)) - 1)) != 0) { Count *= (UINTN)(1 << (Width & 0x03)); @@ -595,13 +595,13 @@ PciIoIoRead ( // // If request is not aligned, then convert request to EfiPciIoWithXXXUint8 - // + // if (FeaturePcdGet (PcdUnalignedPciIoEnable)) { if ((Offset & ((1 << (Width & 0x03)) - 1)) != 0) { Count *= (UINTN)(1 << (Width & 0x03)); Width = (EFI_PCI_IO_PROTOCOL_WIDTH) (Width & (~0x03)); } - } + } Status = PciIoDevice->PciRootBridgeIo->Io.Read ( PciIoDevice->PciRootBridgeIo, @@ -673,13 +673,13 @@ PciIoIoWrite ( // // If request is not aligned, then convert request to EfiPciIoWithXXXUint8 - // + // if (FeaturePcdGet (PcdUnalignedPciIoEnable)) { if ((Offset & ((1 << (Width & 0x03)) - 1)) != 0) { Count *= (UINTN)(1 << (Width & 0x03)); Width = (EFI_PCI_IO_PROTOCOL_WIDTH) (Width & (~0x03)); } - } + } Status = PciIoDevice->PciRootBridgeIo->Io.Write ( PciIoDevice->PciRootBridgeIo, @@ -739,16 +739,16 @@ PciIoConfigRead ( if (EFI_ERROR (Status)) { return Status; } - + // // If request is not aligned, then convert request to EfiPciIoWithXXXUint8 - // + // if (FeaturePcdGet (PcdUnalignedPciIoEnable)) { if ((Offset & ((1 << (Width & 0x03)) - 1)) != 0) { Count *= (UINTN)(1 << (Width & 0x03)); Width = (EFI_PCI_IO_PROTOCOL_WIDTH) (Width & (~0x03)); } - } + } Status = PciIoDevice->PciRootBridgeIo->Pci.Read ( PciIoDevice->PciRootBridgeIo, @@ -811,14 +811,14 @@ PciIoConfigWrite ( // // If request is not aligned, then convert request to EfiPciIoWithXXXUint8 - // + // if (FeaturePcdGet (PcdUnalignedPciIoEnable)) { if ((Offset & ((1 << (Width & 0x03)) - 1)) != 0) { Count *= (UINTN)(1 << (Width & 0x03)); Width = (EFI_PCI_IO_PROTOCOL_WIDTH) (Width & (~0x03)); } - } - + } + Status = PciIoDevice->PciRootBridgeIo->Pci.Write ( PciIoDevice->PciRootBridgeIo, (EFI_PCI_ROOT_BRIDGE_IO_PROTOCOL_WIDTH) Width, @@ -910,13 +910,13 @@ PciIoCopyMem ( // // If request is not aligned, then convert request to EfiPciIoWithXXXUint8 - // + // if (FeaturePcdGet (PcdUnalignedPciIoEnable)) { if ((SrcOffset & ((1 << (Width & 0x03)) - 1)) != 0 || (DestOffset & ((1 << (Width & 0x03)) - 1)) != 0) { Count *= (UINTN)(1 << (Width & 0x03)); Width = (EFI_PCI_IO_PROTOCOL_WIDTH) (Width & (~0x03)); } - } + } Status = PciIoDevice->PciRootBridgeIo->CopyMem ( PciIoDevice->PciRootBridgeIo, @@ -1790,7 +1790,7 @@ PciIoAttributes ( @param AddrRangeMin The base address of the MMIO. @param AddrLen The length of the MMIO. - @retval The AddrTranslationOffset from RootBridgeIo for the + @retval The AddrTranslationOffset from RootBridgeIo for the specified range, or (UINT64) -1 if the range is not found in RootBridgeIo. **/ diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c index 126a2f7117..b81f81a136 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciLib.c @@ -269,11 +269,11 @@ DumpBridgeResource ( /** Find the corresponding resource node for the Device in child list of BridgeResource. - + @param[in] Device Pointer to PCI_IO_DEVICE. @param[in] BridgeResource Pointer to PCI_RESOURCE_NODE. @param[out] DeviceResources Pointer to a buffer to receive resources for the Device. - + @return Count of the resource descriptors returned. **/ UINTN @@ -306,7 +306,7 @@ FindResourceNode ( /** Dump the resource map of all the devices under Bridge. - + @param[in] Bridge Bridge device instance. @param[in] Resources Resource descriptors for the bridge device. @param[in] ResourceCount Count of resource descriptors. diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c index d390bb655a..c2be85a906 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciOptionRomSupport.c @@ -1,7 +1,7 @@ /** @file PCI Rom supporting funtions implementation for PCI Bus module. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -342,7 +342,7 @@ ContainEfiImage ( } // - // The PCI Data Structure must be DWORD aligned. + // The PCI Data Structure must be DWORD aligned. // if (RomHeader->PcirOffset == 0 || (RomHeader->PcirOffset & 3) != 0 || @@ -471,8 +471,8 @@ LoadOpRomImage ( FirstCheck = FALSE; OffsetPcir = RomHeader->PcirOffset; // - // If the pointer to the PCI Data Structure is invalid, no further images can be located. - // The PCI Data Structure must be DWORD aligned. + // If the pointer to the PCI Data Structure is invalid, no further images can be located. + // The PCI Data Structure must be DWORD aligned. // if (OffsetPcir == 0 || (OffsetPcir & 3) != 0 || diff --git a/MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c b/MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c index 2f713fcee9..f3e51d6150 100644 --- a/MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c +++ b/MdeModulePkg/Bus/Pci/PciBusDxe/PciResourceSupport.c @@ -1,7 +1,7 @@ /** @file PCI resouces support functions implemntation for PCI Bus module. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -1116,7 +1116,7 @@ DegradeResource ( PMem64Node, TRUE ); - } + } // // if both PMEM64 and PMEM32 requests from child devices, which can not be satisfied diff --git a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridgeIo.c b/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridgeIo.c index 83f553a0a3..f8a1239ceb 100644 --- a/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridgeIo.c +++ b/MdeModulePkg/Bus/Pci/PciHostBridgeDxe/PciRootBridgeIo.c @@ -537,7 +537,7 @@ GetElapsedTick ( ) { UINT64 PreviousTick; - + PreviousTick = *CurrentTick; *CurrentTick = GetPerformanceCounter(); if (StartTick < EndTick) { diff --git a/MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxe.uni b/MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxe.uni index abf85ec411..3b43b95ab4 100644 --- a/MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxe.uni +++ b/MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxe.uni @@ -3,13 +3,13 @@ // // Produces the Serial I/O protocol for standard UARTS using Super I/O or PCI I/O. // -// Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxeExtra.uni b/MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxeExtra.uni index d6146f01a8..bd57f1de8d 100644 --- a/MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxeExtra.uni +++ b/MdeModulePkg/Bus/Pci/PciSioSerialDxe/PciSioSerialDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // PciSioSerialDxe Localized Strings and Content // -// Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,6 +13,6 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "PCI SIO UART Serial Bus DXE Driver" diff --git a/MdeModulePkg/Bus/Pci/PciSioSerialDxe/Serial.c b/MdeModulePkg/Bus/Pci/PciSioSerialDxe/Serial.c index a9dc8274d9..5fd9b36ebd 100644 --- a/MdeModulePkg/Bus/Pci/PciSioSerialDxe/Serial.c +++ b/MdeModulePkg/Bus/Pci/PciSioSerialDxe/Serial.c @@ -1,7 +1,7 @@ /** @file Serial driver for PCI or SIO UARTS. -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -94,7 +94,7 @@ SERIAL_DEV gSerialDevTemplate = { Check the device path node whether it's the Flow Control node or not. @param[in] FlowControl The device path node to be checked. - + @retval TRUE It's the Flow Control node. @retval FALSE It's not. @@ -114,9 +114,9 @@ IsUartFlowControlDevicePathNode ( /** The user Entry Point for module PciSioSerial. The user code starts with this function. - @param[in] ImageHandle The firmware allocated handle for the EFI image. + @param[in] ImageHandle The firmware allocated handle for the EFI image. @param[in] SystemTable A pointer to the EFI System Table. - + @retval EFI_SUCCESS The entry point is executed successfully. @retval other Some error occurs when executing this entry point. @@ -396,7 +396,7 @@ SerialControllerDriverSupported ( if (EFI_ERROR (Status)) { Status = IsPciSerialController (Controller); } - return Status; + return Status; } /** diff --git a/MdeModulePkg/Bus/Pci/PciSioSerialDxe/Serial.h b/MdeModulePkg/Bus/Pci/PciSioSerialDxe/Serial.h index 3c7eb915f4..0d931a3d8e 100644 --- a/MdeModulePkg/Bus/Pci/PciSioSerialDxe/Serial.h +++ b/MdeModulePkg/Bus/Pci/PciSioSerialDxe/Serial.h @@ -1,7 +1,7 @@ /** @file Header file for PciSioSerial Driver -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -497,7 +497,7 @@ SerialFifoFull ( /** Detect whether specific FIFO is empty or not. - + @param Fifo A pointer to the Data Structure SERIAL_DEV_FIFO @return whether specific FIFO is empty or not @@ -777,7 +777,7 @@ SkipControllerDevicePathNode ( Check the device path node whether it's the Flow Control node or not. @param[in] FlowControl The device path node to be checked. - + @retval TRUE It's the Flow Control node. @retval FALSE It's not. diff --git a/MdeModulePkg/Bus/Pci/PciSioSerialDxe/SerialIo.c b/MdeModulePkg/Bus/Pci/PciSioSerialDxe/SerialIo.c index c0682e93b6..31d5ab42ec 100644 --- a/MdeModulePkg/Bus/Pci/PciSioSerialDxe/SerialIo.c +++ b/MdeModulePkg/Bus/Pci/PciSioSerialDxe/SerialIo.c @@ -1,7 +1,7 @@ /** @file SerialIo implementation for PCI or SIO UARTs. -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -92,7 +92,7 @@ VerifyUartParameters ( ((DataBits >= 6) && (DataBits <= 8) && (StopBits == OneFiveStopBits)) ) { return FALSE; - } + } // // Do not verify the baud rate if clock rate is unknown (0). @@ -169,8 +169,8 @@ VerifyUartParameters ( } // - // ActualBaudRate is higher than requested baud rate and more than 4% - // higher than the requested value. Increment Divisor if it is less + // ActualBaudRate is higher than requested baud rate and more than 4% + // higher than the requested value. Increment Divisor if it is less // than MAX_UINT16 and computed baud rate with new divisor. // if (ComputedDivisor == MAX_UINT16) { @@ -212,7 +212,7 @@ SerialFifoFull ( /** Detect whether specific FIFO is empty or not. - + @param Fifo A pointer to the Data Structure SERIAL_DEV_FIFO @return whether specific FIFO is empty or not @@ -363,7 +363,7 @@ SerialReceiveTransmit ( Data = READ_RBR (SerialDevice); SerialFifoAdd (&SerialDevice->Receive, Data); - + // // For full handshake flow control, if receive buffer full // tell the peer to stop sending data. @@ -1065,7 +1065,7 @@ SerialWrite ( NULL ) ); - + for (Index = 0; Index < *BufferSize; Index++) { SerialFifoAdd (&SerialDevice->Transmit, CharBuffer[Index]); diff --git a/MdeModulePkg/Bus/Pci/SataControllerDxe/ComponentName.c b/MdeModulePkg/Bus/Pci/SataControllerDxe/ComponentName.c index 467ad11d1a..cb18aae6c5 100644 --- a/MdeModulePkg/Bus/Pci/SataControllerDxe/ComponentName.c +++ b/MdeModulePkg/Bus/Pci/SataControllerDxe/ComponentName.c @@ -1,7 +1,7 @@ /** @file UEFI Component Name(2) protocol implementation for Sata Controller driver. - Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -72,7 +72,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mSataControllerController @param DriverName A pointer to the Unicode string to return. This Unicode string is the name of the driver specified by This in the language specified by Language. - + @retval EFI_SUCCESS The Unicode string for the Driver specified by This and the language specified by Language was returned in DriverName. @@ -100,7 +100,7 @@ SataControllerComponentNameGetDriverName ( /** Retrieves a Unicode string that is the user readable name of the controller - that is being managed by an UEFI Driver. + that is being managed by an UEFI Driver. @param This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. @param ControllerHandle The handle of a controller that the driver specified by @@ -123,7 +123,7 @@ SataControllerComponentNameGetDriverName ( ControllerHandle and ChildHandle in the language specified by Language from the point of view of the driver specified by This. - + @retval EFI_SUCCESS The Unicode string for the user readable name in the language specified by Language for the driver specified by This was returned in DriverName. diff --git a/MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.c b/MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.c index 87c201dabd..7dc40f82e8 100644 --- a/MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.c +++ b/MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.c @@ -1,7 +1,7 @@ /** @file This driver module produces IDE_CONTROLLER_INIT protocol for Sata Controllers. - Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
Copyright (c) 2018, ARM Ltd. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -46,7 +46,7 @@ AhciReadReg ( UINT32 Data; ASSERT (PciIo != NULL); - + Data = 0; PciIo->Mem.Read ( @@ -242,9 +242,9 @@ CalculateBestUdmaMode ( /** The Entry Point of module. It follows the standard UEFI driver model. - @param[in] ImageHandle The firmware allocated handle for the EFI image. + @param[in] ImageHandle The firmware allocated handle for the EFI image. @param[in] SystemTable A pointer to the EFI System Table. - + @retval EFI_SUCCESS The entry point is executed successfully. @retval other Some error occurs when executing this entry point. @@ -338,7 +338,7 @@ SataControllerSupported ( } /** - This routine is called right after the .Supported() called and + This routine is called right after the .Supported() called and Start this driver on ControllerHandle. @param This Protocol instance pointer. @@ -558,7 +558,7 @@ Done: @param This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. @param Controller A handle to the device being stopped. @param NumberOfChildren The number of child device handles in ChildHandleBuffer. - @param ChildHandleBuffer An array of child handles to be freed. + @param ChildHandleBuffer An array of child handles to be freed. @retval EFI_SUCCESS This driver is removed from this device. @retval other Some error occurs when removing this driver from this device. @@ -679,34 +679,34 @@ FlatDeviceIndex ( // /** Returns the information about the specified IDE channel. - + This function can be used to obtain information about a particular IDE channel. - The driver entity uses this information during the enumeration process. - - If Enabled is set to FALSE, the driver entity will not scan the channel. Note + The driver entity uses this information during the enumeration process. + + If Enabled is set to FALSE, the driver entity will not scan the channel. Note that it will not prevent an operating system driver from scanning the channel. - - For most of today's controllers, MaxDevices will either be 1 or 2. For SATA - controllers, this value will always be 1. SATA configurations can contain SATA + + For most of today's controllers, MaxDevices will either be 1 or 2. For SATA + controllers, this value will always be 1. SATA configurations can contain SATA port multipliers. SATA port multipliers behave like SATA bridges and can support - up to 16 devices on the other side. If a SATA port out of the IDE controller - is connected to a port multiplier, MaxDevices will be set to the number of SATA - devices that the port multiplier supports. Because today's port multipliers - support up to fifteen SATA devices, this number can be as large as fifteen. The IDE - bus driver is required to scan for the presence of port multipliers behind an SATA - controller and enumerate up to MaxDevices number of devices behind the port - multiplier. - - In this context, the devices behind a port multiplier constitute a channel. - + up to 16 devices on the other side. If a SATA port out of the IDE controller + is connected to a port multiplier, MaxDevices will be set to the number of SATA + devices that the port multiplier supports. Because today's port multipliers + support up to fifteen SATA devices, this number can be as large as fifteen. The IDE + bus driver is required to scan for the presence of port multipliers behind an SATA + controller and enumerate up to MaxDevices number of devices behind the port + multiplier. + + In this context, the devices behind a port multiplier constitute a channel. + @param[in] This The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance. @param[in] Channel Zero-based channel number. - @param[out] Enabled TRUE if this channel is enabled. Disabled channels + @param[out] Enabled TRUE if this channel is enabled. Disabled channels are not scanned to see if any devices are present. @param[out] MaxDevices The maximum number of IDE devices that the bus driver - can expect on this channel. For the ATA/ATAPI - specification, version 6, this number will either be - one or two. For Serial ATA (SATA) configurations with a + can expect on this channel. For the ATA/ATAPI + specification, version 6, this number will either be + one or two. For Serial ATA (SATA) configurations with a port multiplier, this number can be as large as fifteen. @retval EFI_SUCCESS Information was returned without any errors. @@ -739,13 +739,13 @@ IdeInitGetChannelInfo ( /** The notifications from the driver entity that it is about to enter a certain phase of the IDE channel enumeration process. - - This function can be used to notify the IDE controller driver to perform - specific actions, including any chipset-specific initialization, so that the - chipset is ready to enter the next phase. Seven notification points are defined - at this time. - - More synchronization points may be added as required in the future. + + This function can be used to notify the IDE controller driver to perform + specific actions, including any chipset-specific initialization, so that the + chipset is ready to enter the next phase. Seven notification points are defined + at this time. + + More synchronization points may be added as required in the future. @param[in] This The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance. @@ -755,9 +755,9 @@ IdeInitGetChannelInfo ( @retval EFI_SUCCESS The notification was accepted without any errors. @retval EFI_UNSUPPORTED Phase is not supported. @retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount). - @retval EFI_NOT_READY This phase cannot be entered at this time; for - example, an attempt was made to enter a Phase - without having entered one or more previous + @retval EFI_NOT_READY This phase cannot be entered at this time; for + example, an attempt was made to enter a Phase + without having entered one or more previous Phase. **/ @@ -775,32 +775,32 @@ IdeInitNotifyPhase ( /** Submits the device information to the IDE controller driver. - This function is used by the driver entity to pass detailed information about - a particular device to the IDE controller driver. The driver entity obtains + This function is used by the driver entity to pass detailed information about + a particular device to the IDE controller driver. The driver entity obtains this information by issuing an ATA or ATAPI IDENTIFY_DEVICE command. IdentifyData - is the pointer to the response data buffer. The IdentifyData buffer is owned - by the driver entity, and the IDE controller driver must make a local copy - of the entire buffer or parts of the buffer as needed. The original IdentifyData + is the pointer to the response data buffer. The IdentifyData buffer is owned + by the driver entity, and the IDE controller driver must make a local copy + of the entire buffer or parts of the buffer as needed. The original IdentifyData buffer pointer may not be valid when - + - EFI_IDE_CONTROLLER_INIT_PROTOCOL.CalculateMode() or - EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode() is called at a later point. - - The IDE controller driver may consult various fields of EFI_IDENTIFY_DATA to - compute the optimum mode for the device. These fields are not limited to the - timing information. For example, an implementation of the IDE controller driver - may examine the vendor and type/mode field to match known bad drives. - - The driver entity may submit drive information in any order, as long as it - submits information for all the devices belonging to the enumeration group + + The IDE controller driver may consult various fields of EFI_IDENTIFY_DATA to + compute the optimum mode for the device. These fields are not limited to the + timing information. For example, an implementation of the IDE controller driver + may examine the vendor and type/mode field to match known bad drives. + + The driver entity may submit drive information in any order, as long as it + submits information for all the devices belonging to the enumeration group before EFI_IDE_CONTROLLER_INIT_PROTOCOL.CalculateMode() is called for any device in that enumeration group. If a device is absent, EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData() - should be called with IdentifyData set to NULL. The IDE controller driver may - not have any other mechanism to know whether a device is present or not. Therefore, - setting IdentifyData to NULL does not constitute an error condition. - EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData() can be called only once for a - given (Channel, Device) pair. - + should be called with IdentifyData set to NULL. The IDE controller driver may + not have any other mechanism to know whether a device is present or not. Therefore, + setting IdentifyData to NULL does not constitute an error condition. + EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData() can be called only once for a + given (Channel, Device) pair. + @param[in] This A pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance. @param[in] Channel Zero-based channel number. @param[in] Device Zero-based device number on the Channel. @@ -853,31 +853,31 @@ IdeInitSubmitData ( /** Disqualifies specific modes for an IDE device. - This function allows the driver entity or other drivers (such as platform + This function allows the driver entity or other drivers (such as platform drivers) to reject certain timing modes and request the IDE controller driver - to recalculate modes. This function allows the driver entity and the IDE - controller driver to negotiate the timings on a per-device basis. This function - is useful in the case of drives that lie about their capabilities. An example - is when the IDE device fails to accept the timing modes that are calculated + to recalculate modes. This function allows the driver entity and the IDE + controller driver to negotiate the timings on a per-device basis. This function + is useful in the case of drives that lie about their capabilities. An example + is when the IDE device fails to accept the timing modes that are calculated by the IDE controller driver based on the response to the Identify Drive command. - If the driver entity does not want to limit the ATA timing modes and leave that - decision to the IDE controller driver, it can either not call this function for - the given device or call this function and set the Valid flag to FALSE for all + If the driver entity does not want to limit the ATA timing modes and leave that + decision to the IDE controller driver, it can either not call this function for + the given device or call this function and set the Valid flag to FALSE for all modes that are listed in EFI_ATA_COLLECTIVE_MODE. - - The driver entity may disqualify modes for a device in any order and any number + + The driver entity may disqualify modes for a device in any order and any number of times. - - This function can be called multiple times to invalidate multiple modes of the - same type (e.g., Programmed Input/Output [PIO] modes 3 and 4). See the ATA/ATAPI - specification for more information on PIO modes. - + + This function can be called multiple times to invalidate multiple modes of the + same type (e.g., Programmed Input/Output [PIO] modes 3 and 4). See the ATA/ATAPI + specification for more information on PIO modes. + For Serial ATA (SATA) controllers, this member function can be used to disqualify a higher transfer rate mode on a given channel. For example, a platform driver - may inform the IDE controller driver to not use second-generation (Gen2) speeds + may inform the IDE controller driver to not use second-generation (Gen2) speeds for a certain SATA drive. - + @param[in] This The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance. @param[in] Channel The zero-based channel number. @param[in] Device The zero-based device number on the Channel. @@ -888,7 +888,7 @@ IdeInitSubmitData ( @retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount). @retval EFI_INVALID_PARAMETER Device is invalid. @retval EFI_INVALID_PARAMETER IdentifyData is NULL. - + **/ EFI_STATUS EFIAPI @@ -928,39 +928,39 @@ IdeInitDisqualifyMode ( Returns the information about the optimum modes for the specified IDE device. This function is used by the driver entity to obtain the optimum ATA modes for - a specific device. The IDE controller driver takes into account the following + a specific device. The IDE controller driver takes into account the following while calculating the mode: - The IdentifyData inputs to EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData() - The BadModes inputs to EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode() - The driver entity is required to call EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData() - for all the devices that belong to an enumeration group before calling - EFI_IDE_CONTROLLER_INIT_PROTOCOL.CalculateMode() for any device in the same group. - - The IDE controller driver will use controller- and possibly platform-specific - algorithms to arrive at SupportedModes. The IDE controller may base its - decision on user preferences and other considerations as well. This function - may be called multiple times because the driver entity may renegotiate the mode + The driver entity is required to call EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData() + for all the devices that belong to an enumeration group before calling + EFI_IDE_CONTROLLER_INIT_PROTOCOL.CalculateMode() for any device in the same group. + + The IDE controller driver will use controller- and possibly platform-specific + algorithms to arrive at SupportedModes. The IDE controller may base its + decision on user preferences and other considerations as well. This function + may be called multiple times because the driver entity may renegotiate the mode with the IDE controller driver using EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode(). - - The driver entity may collect timing information for various devices in any + + The driver entity may collect timing information for various devices in any order. The driver entity is responsible for making sure that all the dependencies - are satisfied. For example, the SupportedModes information for device A that - was previously returned may become stale after a call to + are satisfied. For example, the SupportedModes information for device A that + was previously returned may become stale after a call to EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode() for device B. - - The buffer SupportedModes is allocated by the callee because the caller does - not necessarily know the size of the buffer. The type EFI_ATA_COLLECTIVE_MODE - is defined in a way that allows for future extensibility and can be of variable - length. This memory pool should be deallocated by the caller when it is no - longer necessary. - - The IDE controller driver for a Serial ATA (SATA) controller can use this - member function to force a lower speed (first-generation [Gen1] speeds on a - second-generation [Gen2]-capable hardware). The IDE controller driver can - also allow the driver entity to stay with the speed that has been negotiated + + The buffer SupportedModes is allocated by the callee because the caller does + not necessarily know the size of the buffer. The type EFI_ATA_COLLECTIVE_MODE + is defined in a way that allows for future extensibility and can be of variable + length. This memory pool should be deallocated by the caller when it is no + longer necessary. + + The IDE controller driver for a Serial ATA (SATA) controller can use this + member function to force a lower speed (first-generation [Gen1] speeds on a + second-generation [Gen2]-capable hardware). The IDE controller driver can + also allow the driver entity to stay with the speed that has been negotiated by the physical layer. - + @param[in] This The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance. @param[in] Channel A zero-based channel number. @param[in] Device A zero-based device number on the Channel. @@ -968,13 +968,13 @@ IdeInitDisqualifyMode ( @retval EFI_SUCCESS SupportedModes was returned. @retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount). - @retval EFI_INVALID_PARAMETER Device is invalid. + @retval EFI_INVALID_PARAMETER Device is invalid. @retval EFI_INVALID_PARAMETER SupportedModes is NULL. - @retval EFI_NOT_READY Modes cannot be calculated due to a lack of - data. This error may happen if - EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData() - and EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyData() - were not called for at least one drive in the + @retval EFI_NOT_READY Modes cannot be calculated due to a lack of + data. This error may happen if + EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData() + and EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyData() + were not called for at least one drive in the same enumeration group. **/ @@ -1061,9 +1061,9 @@ IdeInitCalculateMode ( Commands the IDE controller driver to program the IDE controller hardware so that the specified device can operate at the specified mode. - This function is used by the driver entity to instruct the IDE controller - driver to program the IDE controller hardware to the specified modes. This - function can be called only once for a particular device. For a Serial ATA + This function is used by the driver entity to instruct the IDE controller + driver to program the IDE controller hardware to the specified modes. This + function can be called only once for a particular device. For a Serial ATA (SATA) Advanced Host Controller Interface (AHCI) controller, no controller- specific programming may be required. diff --git a/MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.h b/MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.h index db2e219599..436eff2dc6 100644 --- a/MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.h +++ b/MdeModulePkg/Bus/Pci/SataControllerDxe/SataController.h @@ -1,7 +1,7 @@ /** @file Header file for Sata Controller driver. - Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
Copyright (c) 2018, ARM Ltd. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -146,7 +146,7 @@ SataControllerSupported ( ); /** - This routine is called right after the .Supported() called and + This routine is called right after the .Supported() called and Start this driver on ControllerHandle. @param This Protocol instance pointer. @@ -173,7 +173,7 @@ SataControllerStart ( @param This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. @param Controller A handle to the device being stopped. @param NumberOfChildren The number of child device handles in ChildHandleBuffer. - @param ChildHandleBuffer An array of child handles to be freed. + @param ChildHandleBuffer An array of child handles to be freed. @retval EFI_SUCCESS This driver is removed from this device. @retval other Some error occurs when removing this driver from this device. @@ -193,34 +193,34 @@ SataControllerStop ( // /** Returns the information about the specified IDE channel. - + This function can be used to obtain information about a particular IDE channel. - The driver entity uses this information during the enumeration process. - - If Enabled is set to FALSE, the driver entity will not scan the channel. Note + The driver entity uses this information during the enumeration process. + + If Enabled is set to FALSE, the driver entity will not scan the channel. Note that it will not prevent an operating system driver from scanning the channel. - - For most of today's controllers, MaxDevices will either be 1 or 2. For SATA - controllers, this value will always be 1. SATA configurations can contain SATA + + For most of today's controllers, MaxDevices will either be 1 or 2. For SATA + controllers, this value will always be 1. SATA configurations can contain SATA port multipliers. SATA port multipliers behave like SATA bridges and can support - up to 16 devices on the other side. If a SATA port out of the IDE controller - is connected to a port multiplier, MaxDevices will be set to the number of SATA - devices that the port multiplier supports. Because today's port multipliers - support up to fifteen SATA devices, this number can be as large as fifteen. The IDE - bus driver is required to scan for the presence of port multipliers behind an SATA - controller and enumerate up to MaxDevices number of devices behind the port - multiplier. - - In this context, the devices behind a port multiplier constitute a channel. - + up to 16 devices on the other side. If a SATA port out of the IDE controller + is connected to a port multiplier, MaxDevices will be set to the number of SATA + devices that the port multiplier supports. Because today's port multipliers + support up to fifteen SATA devices, this number can be as large as fifteen. The IDE + bus driver is required to scan for the presence of port multipliers behind an SATA + controller and enumerate up to MaxDevices number of devices behind the port + multiplier. + + In this context, the devices behind a port multiplier constitute a channel. + @param[in] This The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance. @param[in] Channel Zero-based channel number. - @param[out] Enabled TRUE if this channel is enabled. Disabled channels + @param[out] Enabled TRUE if this channel is enabled. Disabled channels are not scanned to see if any devices are present. @param[out] MaxDevices The maximum number of IDE devices that the bus driver - can expect on this channel. For the ATA/ATAPI - specification, version 6, this number will either be - one or two. For Serial ATA (SATA) configurations with a + can expect on this channel. For the ATA/ATAPI + specification, version 6, this number will either be + one or two. For Serial ATA (SATA) configurations with a port multiplier, this number can be as large as fifteen. @@ -240,13 +240,13 @@ IdeInitGetChannelInfo ( /** The notifications from the driver entity that it is about to enter a certain phase of the IDE channel enumeration process. - - This function can be used to notify the IDE controller driver to perform - specific actions, including any chipset-specific initialization, so that the - chipset is ready to enter the next phase. Seven notification points are defined - at this time. - - More synchronization points may be added as required in the future. + + This function can be used to notify the IDE controller driver to perform + specific actions, including any chipset-specific initialization, so that the + chipset is ready to enter the next phase. Seven notification points are defined + at this time. + + More synchronization points may be added as required in the future. @param[in] This The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance. @@ -256,9 +256,9 @@ IdeInitGetChannelInfo ( @retval EFI_SUCCESS The notification was accepted without any errors. @retval EFI_UNSUPPORTED Phase is not supported. @retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount). - @retval EFI_NOT_READY This phase cannot be entered at this time; for - example, an attempt was made to enter a Phase - without having entered one or more previous + @retval EFI_NOT_READY This phase cannot be entered at this time; for + example, an attempt was made to enter a Phase + without having entered one or more previous Phase. **/ @@ -273,32 +273,32 @@ IdeInitNotifyPhase ( /** Submits the device information to the IDE controller driver. - This function is used by the driver entity to pass detailed information about - a particular device to the IDE controller driver. The driver entity obtains + This function is used by the driver entity to pass detailed information about + a particular device to the IDE controller driver. The driver entity obtains this information by issuing an ATA or ATAPI IDENTIFY_DEVICE command. IdentifyData - is the pointer to the response data buffer. The IdentifyData buffer is owned - by the driver entity, and the IDE controller driver must make a local copy - of the entire buffer or parts of the buffer as needed. The original IdentifyData + is the pointer to the response data buffer. The IdentifyData buffer is owned + by the driver entity, and the IDE controller driver must make a local copy + of the entire buffer or parts of the buffer as needed. The original IdentifyData buffer pointer may not be valid when - + - EFI_IDE_CONTROLLER_INIT_PROTOCOL.CalculateMode() or - EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode() is called at a later point. - - The IDE controller driver may consult various fields of EFI_IDENTIFY_DATA to - compute the optimum mode for the device. These fields are not limited to the - timing information. For example, an implementation of the IDE controller driver - may examine the vendor and type/mode field to match known bad drives. - - The driver entity may submit drive information in any order, as long as it - submits information for all the devices belonging to the enumeration group + + The IDE controller driver may consult various fields of EFI_IDENTIFY_DATA to + compute the optimum mode for the device. These fields are not limited to the + timing information. For example, an implementation of the IDE controller driver + may examine the vendor and type/mode field to match known bad drives. + + The driver entity may submit drive information in any order, as long as it + submits information for all the devices belonging to the enumeration group before EFI_IDE_CONTROLLER_INIT_PROTOCOL.CalculateMode() is called for any device in that enumeration group. If a device is absent, EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData() - should be called with IdentifyData set to NULL. The IDE controller driver may - not have any other mechanism to know whether a device is present or not. Therefore, - setting IdentifyData to NULL does not constitute an error condition. - EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData() can be called only once for a - given (Channel, Device) pair. - + should be called with IdentifyData set to NULL. The IDE controller driver may + not have any other mechanism to know whether a device is present or not. Therefore, + setting IdentifyData to NULL does not constitute an error condition. + EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData() can be called only once for a + given (Channel, Device) pair. + @param[in] This A pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance. @param[in] Channel Zero-based channel number. @param[in] Device Zero-based device number on the Channel. @@ -321,31 +321,31 @@ IdeInitSubmitData ( /** Disqualifies specific modes for an IDE device. - This function allows the driver entity or other drivers (such as platform + This function allows the driver entity or other drivers (such as platform drivers) to reject certain timing modes and request the IDE controller driver - to recalculate modes. This function allows the driver entity and the IDE - controller driver to negotiate the timings on a per-device basis. This function - is useful in the case of drives that lie about their capabilities. An example - is when the IDE device fails to accept the timing modes that are calculated + to recalculate modes. This function allows the driver entity and the IDE + controller driver to negotiate the timings on a per-device basis. This function + is useful in the case of drives that lie about their capabilities. An example + is when the IDE device fails to accept the timing modes that are calculated by the IDE controller driver based on the response to the Identify Drive command. - If the driver entity does not want to limit the ATA timing modes and leave that - decision to the IDE controller driver, it can either not call this function for - the given device or call this function and set the Valid flag to FALSE for all + If the driver entity does not want to limit the ATA timing modes and leave that + decision to the IDE controller driver, it can either not call this function for + the given device or call this function and set the Valid flag to FALSE for all modes that are listed in EFI_ATA_COLLECTIVE_MODE. - - The driver entity may disqualify modes for a device in any order and any number + + The driver entity may disqualify modes for a device in any order and any number of times. - - This function can be called multiple times to invalidate multiple modes of the - same type (e.g., Programmed Input/Output [PIO] modes 3 and 4). See the ATA/ATAPI - specification for more information on PIO modes. - + + This function can be called multiple times to invalidate multiple modes of the + same type (e.g., Programmed Input/Output [PIO] modes 3 and 4). See the ATA/ATAPI + specification for more information on PIO modes. + For Serial ATA (SATA) controllers, this member function can be used to disqualify a higher transfer rate mode on a given channel. For example, a platform driver - may inform the IDE controller driver to not use second-generation (Gen2) speeds + may inform the IDE controller driver to not use second-generation (Gen2) speeds for a certain SATA drive. - + @param[in] This The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance. @param[in] Channel The zero-based channel number. @param[in] Device The zero-based device number on the Channel. @@ -356,7 +356,7 @@ IdeInitSubmitData ( @retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount). @retval EFI_INVALID_PARAMETER Device is invalid. @retval EFI_INVALID_PARAMETER IdentifyData is NULL. - + **/ EFI_STATUS EFIAPI @@ -371,39 +371,39 @@ IdeInitDisqualifyMode ( Returns the information about the optimum modes for the specified IDE device. This function is used by the driver entity to obtain the optimum ATA modes for - a specific device. The IDE controller driver takes into account the following + a specific device. The IDE controller driver takes into account the following while calculating the mode: - The IdentifyData inputs to EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData() - The BadModes inputs to EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode() - The driver entity is required to call EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData() - for all the devices that belong to an enumeration group before calling - EFI_IDE_CONTROLLER_INIT_PROTOCOL.CalculateMode() for any device in the same group. - - The IDE controller driver will use controller- and possibly platform-specific - algorithms to arrive at SupportedModes. The IDE controller may base its - decision on user preferences and other considerations as well. This function - may be called multiple times because the driver entity may renegotiate the mode + The driver entity is required to call EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData() + for all the devices that belong to an enumeration group before calling + EFI_IDE_CONTROLLER_INIT_PROTOCOL.CalculateMode() for any device in the same group. + + The IDE controller driver will use controller- and possibly platform-specific + algorithms to arrive at SupportedModes. The IDE controller may base its + decision on user preferences and other considerations as well. This function + may be called multiple times because the driver entity may renegotiate the mode with the IDE controller driver using EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode(). - - The driver entity may collect timing information for various devices in any + + The driver entity may collect timing information for various devices in any order. The driver entity is responsible for making sure that all the dependencies - are satisfied. For example, the SupportedModes information for device A that - was previously returned may become stale after a call to + are satisfied. For example, the SupportedModes information for device A that + was previously returned may become stale after a call to EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyMode() for device B. - - The buffer SupportedModes is allocated by the callee because the caller does - not necessarily know the size of the buffer. The type EFI_ATA_COLLECTIVE_MODE - is defined in a way that allows for future extensibility and can be of variable - length. This memory pool should be deallocated by the caller when it is no - longer necessary. - - The IDE controller driver for a Serial ATA (SATA) controller can use this - member function to force a lower speed (first-generation [Gen1] speeds on a - second-generation [Gen2]-capable hardware). The IDE controller driver can - also allow the driver entity to stay with the speed that has been negotiated + + The buffer SupportedModes is allocated by the callee because the caller does + not necessarily know the size of the buffer. The type EFI_ATA_COLLECTIVE_MODE + is defined in a way that allows for future extensibility and can be of variable + length. This memory pool should be deallocated by the caller when it is no + longer necessary. + + The IDE controller driver for a Serial ATA (SATA) controller can use this + member function to force a lower speed (first-generation [Gen1] speeds on a + second-generation [Gen2]-capable hardware). The IDE controller driver can + also allow the driver entity to stay with the speed that has been negotiated by the physical layer. - + @param[in] This The pointer to the EFI_IDE_CONTROLLER_INIT_PROTOCOL instance. @param[in] Channel A zero-based channel number. @param[in] Device A zero-based device number on the Channel. @@ -411,13 +411,13 @@ IdeInitDisqualifyMode ( @retval EFI_SUCCESS SupportedModes was returned. @retval EFI_INVALID_PARAMETER Channel is invalid (Channel >= ChannelCount). - @retval EFI_INVALID_PARAMETER Device is invalid. + @retval EFI_INVALID_PARAMETER Device is invalid. @retval EFI_INVALID_PARAMETER SupportedModes is NULL. - @retval EFI_NOT_READY Modes cannot be calculated due to a lack of - data. This error may happen if - EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData() - and EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyData() - were not called for at least one drive in the + @retval EFI_NOT_READY Modes cannot be calculated due to a lack of + data. This error may happen if + EFI_IDE_CONTROLLER_INIT_PROTOCOL.SubmitData() + and EFI_IDE_CONTROLLER_INIT_PROTOCOL.DisqualifyData() + were not called for at least one drive in the same enumeration group. **/ @@ -434,9 +434,9 @@ IdeInitCalculateMode ( Commands the IDE controller driver to program the IDE controller hardware so that the specified device can operate at the specified mode. - This function is used by the driver entity to instruct the IDE controller - driver to program the IDE controller hardware to the specified modes. This - function can be called only once for a particular device. For a Serial ATA + This function is used by the driver entity to instruct the IDE controller + driver to program the IDE controller hardware to the specified modes. This + function can be called only once for a particular device. For a Serial ATA (SATA) Advanced Host Controller Interface (AHCI) controller, no controller- specific programming may be required. diff --git a/MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf b/MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf index 03f9fa0d1d..4fcb9678aa 100644 --- a/MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf +++ b/MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.inf @@ -1,15 +1,15 @@ ## @file # SataController driver to manage SATA compliance IDE/AHCI host controllers. # -# Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# +# ## [Defines] @@ -26,7 +26,7 @@ # # VALID_ARCHITECTURES = IA32 X64 IPF EBC ARM AARCH64 # -# DRIVER_BINDING = gSataControllerDriverBinding +# DRIVER_BINDING = gSataControllerDriverBinding # COMPONENT_NAME = gSataControllerComponentName # COMPONENT_NAME2 = gSataControllerComponentName2 # diff --git a/MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.uni b/MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.uni index a9563270c8..c02adbc863 100644 --- a/MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.uni +++ b/MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxe.uni @@ -3,13 +3,13 @@ // // It consumes PciIo protocol and produces IdeControllerInit protocol for upper layer use. // -// Copyright (c) 2016, Intel Corporation. All rights reserved.
+// Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // @@ -19,4 +19,4 @@ #string STR_MODULE_ABSTRACT #language en-US "Responsible for managing the standard SATA controller" #string STR_MODULE_DESCRIPTION #language en-US "Implements the IdeControllerInit protocol interface for upper layer use\n" - \ No newline at end of file + diff --git a/MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxeExtra.uni b/MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxeExtra.uni index ed25611d2c..b88da0ed72 100644 --- a/MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxeExtra.uni +++ b/MdeModulePkg/Bus/Pci/SataControllerDxe/SataControllerDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // SataControllerDxe Localized Strings and Content // -// Copyright (c) 2016, Intel Corporation. All rights reserved.
+// Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "SATA Controller DXE Driver" diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcPei/SdMmcPciHcPei.c b/MdeModulePkg/Bus/Pci/SdMmcPciHcPei/SdMmcPciHcPei.c index 3f4ebc40d8..29a0261ac5 100644 --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcPei/SdMmcPciHcPei.c +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcPei/SdMmcPciHcPei.c @@ -2,7 +2,7 @@ SdMmcPciHcPei driver is used to provide platform-dependent info, mainly SD/MMC host controller MMIO base, to upper layer SD/MMC drivers. - Copyright (c) 2015, Intel Corporation. All rights reserved.
+ Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -160,7 +160,7 @@ InitializeSdMmcHcPeim ( // MmioSize = Size & 0xFFFFFFF0; PciWrite32 (PCI_LIB_ADDRESS(Bus, Device, Function, PCI_BASE_ADDRESSREG_OFFSET + 4), 0xFFFFFFFF); - Size = PciRead32 (PCI_LIB_ADDRESS(Bus, Device, Function, PCI_BASE_ADDRESSREG_OFFSET + 4)); + Size = PciRead32 (PCI_LIB_ADDRESS(Bus, Device, Function, PCI_BASE_ADDRESSREG_OFFSET + 4)); // // Fix the length to support some spefic 64 bit BAR // diff --git a/MdeModulePkg/Bus/Pci/SdMmcPciHcPei/SdMmcPciHcPei.inf b/MdeModulePkg/Bus/Pci/SdMmcPciHcPei/SdMmcPciHcPei.inf index bc6ea60d6b..51675f5bfb 100644 --- a/MdeModulePkg/Bus/Pci/SdMmcPciHcPei/SdMmcPciHcPei.inf +++ b/MdeModulePkg/Bus/Pci/SdMmcPciHcPei/SdMmcPciHcPei.inf @@ -1,7 +1,7 @@ ## @file # Component Description File For SD/MMC Pci Host Controller Pei Module. # -# Copyright (c) 2015, Intel Corporation. All rights reserved.
+# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -53,4 +53,4 @@ gEfiPeiMasterBootModePpiGuid AND gEfiPeiMemoryDiscoveredPpiGuid [UserExtensions.TianoCore."ExtraFiles"] - SdMmcPciHcPeiExtra.uni \ No newline at end of file + SdMmcPciHcPeiExtra.uni diff --git a/MdeModulePkg/Bus/Pci/UfsPciHcDxe/ComponentName.c b/MdeModulePkg/Bus/Pci/UfsPciHcDxe/ComponentName.c index 1e2db1a876..54f67832eb 100644 --- a/MdeModulePkg/Bus/Pci/UfsPciHcDxe/ComponentName.c +++ b/MdeModulePkg/Bus/Pci/UfsPciHcDxe/ComponentName.c @@ -2,7 +2,7 @@ UfsHcDxe driver produces EFI_UFS_HOST_CONTROLLER_PROTOCOL. The upper layer module uses it to query the MMIO base address of the UFS host controller. - Copyright (c) 2014, Intel Corporation. All rights reserved.
+ Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -38,7 +38,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mUfsHcDriverNameTable[] = "eng;en", L"Universal Flash Storage (UFS) Pci Host Controller Driver" }, - { + { NULL, NULL } diff --git a/MdeModulePkg/Bus/Pci/UfsPciHcDxe/UfsPciHcDxe.c b/MdeModulePkg/Bus/Pci/UfsPciHcDxe/UfsPciHcDxe.c index 96cf39adc1..6539397860 100644 --- a/MdeModulePkg/Bus/Pci/UfsPciHcDxe/UfsPciHcDxe.c +++ b/MdeModulePkg/Bus/Pci/UfsPciHcDxe/UfsPciHcDxe.c @@ -2,7 +2,7 @@ UfsHcDxe driver is used to provide platform-dependent info, mainly UFS host controller MMIO base, to upper layer UFS drivers. - Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.
+ Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -95,24 +95,24 @@ UfsHcGetMmioBar ( return Status; } -/** +/** Provides the UFS controller-specific addresses needed to access system memory. - + @param This A pointer to the EFI_UFS_HOST_CONTROLLER_PROTOCOL instance. @param Operation Indicates if the bus master is going to read or write to system memory. @param HostAddress The system memory address to map to the UFS controller. @param NumberOfBytes On input the number of bytes to map. On output the number of bytes - that were mapped. + that were mapped. @param DeviceAddress The resulting map address for the bus master UFS controller to use to - access the hosts HostAddress. + access the hosts HostAddress. @param Mapping A resulting value to pass to Unmap(). - + @retval EFI_SUCCESS The range was mapped for the returned NumberOfBytes. - @retval EFI_UNSUPPORTED The HostAddress cannot be mapped as a common buffer. + @retval EFI_UNSUPPORTED The HostAddress cannot be mapped as a common buffer. @retval EFI_INVALID_PARAMETER One or more parameters are invalid. @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources. @retval EFI_DEVICE_ERROR The system hardware could not map the requested address. - + **/ EFI_STATUS EFIAPI @@ -140,15 +140,15 @@ UfsHcMap ( return Status; } -/** +/** Completes the Map() operation and releases any corresponding resources. - - @param This A pointer to the EFI_UFS_HOST_CONTROLLER_PROTOCOL instance. + + @param This A pointer to the EFI_UFS_HOST_CONTROLLER_PROTOCOL instance. @param Mapping The mapping value returned from Map(). - + @retval EFI_SUCCESS The range was unmapped. @retval EFI_DEVICE_ERROR The data was not committed to the target system memory. - + **/ EFI_STATUS EFIAPI @@ -172,25 +172,25 @@ UfsHcUnmap ( return Status; } -/** +/** Allocates pages that are suitable for an EfiUfsHcOperationBusMasterCommonBuffer - mapping. - + mapping. + @param This A pointer to the EFI_UFS_HOST_CONTROLLER_PROTOCOL instance. @param Type This parameter is not used and must be ignored. @param MemoryType The type of memory to allocate, EfiBootServicesData or - EfiRuntimeServicesData. - @param Pages The number of pages to allocate. + EfiRuntimeServicesData. + @param Pages The number of pages to allocate. @param HostAddress A pointer to store the base system memory address of the - allocated range. + allocated range. @param Attributes The requested bit mask of attributes for the allocated range. - + @retval EFI_SUCCESS The requested memory pages were allocated. @retval EFI_UNSUPPORTED Attributes is unsupported. The only legal attribute bits are - MEMORY_WRITE_COMBINE and MEMORY_CACHED. + MEMORY_WRITE_COMBINE and MEMORY_CACHED. @retval EFI_INVALID_PARAMETER One or more parameters are invalid. - @retval EFI_OUT_OF_RESOURCES The memory pages could not be allocated. - + @retval EFI_OUT_OF_RESOURCES The memory pages could not be allocated. + **/ EFI_STATUS EFIAPI @@ -218,17 +218,17 @@ UfsHcAllocateBuffer ( return Status; } -/** +/** Frees memory that was allocated with AllocateBuffer(). - - @param This A pointer to the EFI_UFS_HOST_CONTROLLER_PROTOCOL instance. - @param Pages The number of pages to free. - @param HostAddress The base system memory address of the allocated range. - + + @param This A pointer to the EFI_UFS_HOST_CONTROLLER_PROTOCOL instance. + @param Pages The number of pages to free. + @param HostAddress The base system memory address of the allocated range. + @retval EFI_SUCCESS The requested memory pages were freed. @retval EFI_INVALID_PARAMETER The memory range specified by HostAddress and Pages was not allocated with AllocateBuffer(). - + **/ EFI_STATUS EFIAPI @@ -253,16 +253,16 @@ UfsHcFreeBuffer ( return Status; } -/** +/** Flushes all posted write transactions from the UFS bus to attached UFS device. - - @param This A pointer to the EFI_UFS_HOST_CONTROLLER_PROTOCOL instance. - + + @param This A pointer to the EFI_UFS_HOST_CONTROLLER_PROTOCOL instance. + @retval EFI_SUCCESS The posted write transactions were flushed from the UFS bus - to attached UFS device. + to attached UFS device. @retval EFI_DEVICE_ERROR The posted write transactions were not flushed from the UFS - bus to attached UFS device due to a hardware error. - + bus to attached UFS device due to a hardware error. + **/ EFI_STATUS EFIAPI @@ -281,7 +281,7 @@ UfsHcFlush ( return Status; } -/** +/** Enable a UFS bus driver to access UFS MMIO registers in the UFS Host Controller memory space. @param This A pointer to the EDKII_UFS_HOST_CONTROLLER_PROTOCOL instance. @@ -323,7 +323,7 @@ UfsHcMmioRead ( return Status; } -/** +/** Enable a UFS bus driver to access UFS MMIO registers in the UFS Host Controller memory space. @param This A pointer to the EDKII_UFS_HOST_CONTROLLER_PROTOCOL instance. diff --git a/MdeModulePkg/Bus/Pci/UfsPciHcDxe/UfsPciHcDxe.h b/MdeModulePkg/Bus/Pci/UfsPciHcDxe/UfsPciHcDxe.h index d9d977a5c9..a2e61d6128 100644 --- a/MdeModulePkg/Bus/Pci/UfsPciHcDxe/UfsPciHcDxe.h +++ b/MdeModulePkg/Bus/Pci/UfsPciHcDxe/UfsPciHcDxe.h @@ -2,7 +2,7 @@ UfsHcDxe driver is used to provide platform-dependent info, mainly UFS host controller MMIO base, to upper layer UFS drivers. - Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.
+ Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -55,7 +55,7 @@ struct _UFS_HOST_CONTROLLER_PRIVATE_DATA { UINT32 Signature; EDKII_UFS_HOST_CONTROLLER_PROTOCOL UfsHc; - EFI_PCI_IO_PROTOCOL *PciIo; + EFI_PCI_IO_PROTOCOL *PciIo; UINT8 BarIndex; UINT64 PciAttributes; }; @@ -336,24 +336,24 @@ UfsHcGetMmioBar ( OUT UINTN *MmioBar ); -/** +/** Provides the UFS controller-specific addresses needed to access system memory. - + @param This A pointer to the EFI_UFS_HOST_CONTROLLER_PROTOCOL instance. @param Operation Indicates if the bus master is going to read or write to system memory. @param HostAddress The system memory address to map to the UFS controller. @param NumberOfBytes On input the number of bytes to map. On output the number of bytes - that were mapped. + that were mapped. @param DeviceAddress The resulting map address for the bus master UFS controller to use to - access the hosts HostAddress. + access the hosts HostAddress. @param Mapping A resulting value to pass to Unmap(). - + @retval EFI_SUCCESS The range was mapped for the returned NumberOfBytes. - @retval EFI_UNSUPPORTED The HostAddress cannot be mapped as a common buffer. + @retval EFI_UNSUPPORTED The HostAddress cannot be mapped as a common buffer. @retval EFI_INVALID_PARAMETER One or more parameters are invalid. @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources. @retval EFI_DEVICE_ERROR The system hardware could not map the requested address. - + **/ EFI_STATUS EFIAPI @@ -366,15 +366,15 @@ UfsHcMap ( OUT VOID **Mapping ); -/** +/** Completes the Map() operation and releases any corresponding resources. - - @param This A pointer to the EFI_UFS_HOST_CONTROLLER_PROTOCOL instance. + + @param This A pointer to the EFI_UFS_HOST_CONTROLLER_PROTOCOL instance. @param Mapping The mapping value returned from Map(). - + @retval EFI_SUCCESS The range was unmapped. @retval EFI_DEVICE_ERROR The data was not committed to the target system memory. - + **/ EFI_STATUS EFIAPI @@ -383,25 +383,25 @@ UfsHcUnmap ( IN VOID *Mapping ); -/** +/** Allocates pages that are suitable for an EfiUfsHcOperationBusMasterCommonBuffer - mapping. - + mapping. + @param This A pointer to the EFI_UFS_HOST_CONTROLLER_PROTOCOL instance. @param Type This parameter is not used and must be ignored. @param MemoryType The type of memory to allocate, EfiBootServicesData or - EfiRuntimeServicesData. - @param Pages The number of pages to allocate. + EfiRuntimeServicesData. + @param Pages The number of pages to allocate. @param HostAddress A pointer to store the base system memory address of the - allocated range. + allocated range. @param Attributes The requested bit mask of attributes for the allocated range. - + @retval EFI_SUCCESS The requested memory pages were allocated. @retval EFI_UNSUPPORTED Attributes is unsupported. The only legal attribute bits are - MEMORY_WRITE_COMBINE and MEMORY_CACHED. + MEMORY_WRITE_COMBINE and MEMORY_CACHED. @retval EFI_INVALID_PARAMETER One or more parameters are invalid. - @retval EFI_OUT_OF_RESOURCES The memory pages could not be allocated. - + @retval EFI_OUT_OF_RESOURCES The memory pages could not be allocated. + **/ EFI_STATUS EFIAPI @@ -414,17 +414,17 @@ UfsHcAllocateBuffer ( IN UINT64 Attributes ); -/** +/** Frees memory that was allocated with AllocateBuffer(). - - @param This A pointer to the EFI_UFS_HOST_CONTROLLER_PROTOCOL instance. - @param Pages The number of pages to free. - @param HostAddress The base system memory address of the allocated range. - + + @param This A pointer to the EFI_UFS_HOST_CONTROLLER_PROTOCOL instance. + @param Pages The number of pages to free. + @param HostAddress The base system memory address of the allocated range. + @retval EFI_SUCCESS The requested memory pages were freed. @retval EFI_INVALID_PARAMETER The memory range specified by HostAddress and Pages was not allocated with AllocateBuffer(). - + **/ EFI_STATUS EFIAPI @@ -434,16 +434,16 @@ UfsHcFreeBuffer ( IN VOID *HostAddress ); -/** +/** Flushes all posted write transactions from the UFS bus to attached UFS device. - - @param This A pointer to the EFI_UFS_HOST_CONTROLLER_PROTOCOL instance. - + + @param This A pointer to the EFI_UFS_HOST_CONTROLLER_PROTOCOL instance. + @retval EFI_SUCCESS The posted write transactions were flushed from the UFS bus - to attached UFS device. + to attached UFS device. @retval EFI_DEVICE_ERROR The posted write transactions were not flushed from the UFS - bus to attached UFS device due to a hardware error. - + bus to attached UFS device due to a hardware error. + **/ EFI_STATUS EFIAPI @@ -451,7 +451,7 @@ UfsHcFlush ( IN EDKII_UFS_HOST_CONTROLLER_PROTOCOL *This ); -/** +/** Enable a UFS bus driver to access UFS MMIO registers in the UFS Host Controller memory space. @param This A pointer to the EDKII_UFS_HOST_CONTROLLER_PROTOCOL instance. @@ -479,7 +479,7 @@ UfsHcMmioRead ( IN OUT VOID *Buffer ); -/** +/** Enable a UFS bus driver to access UFS MMIO registers in the UFS Host Controller memory space. @param This A pointer to the EDKII_UFS_HOST_CONTROLLER_PROTOCOL instance. diff --git a/MdeModulePkg/Bus/Pci/UfsPciHcDxe/UfsPciHcDxe.inf b/MdeModulePkg/Bus/Pci/UfsPciHcDxe/UfsPciHcDxe.inf index c1ce9ea851..525235635a 100644 --- a/MdeModulePkg/Bus/Pci/UfsPciHcDxe/UfsPciHcDxe.inf +++ b/MdeModulePkg/Bus/Pci/UfsPciHcDxe/UfsPciHcDxe.inf @@ -1,7 +1,7 @@ ## @file # Component Description File For Universal Flash Storage Pci Host Controller Module. # -# Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.
+# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -53,4 +53,4 @@ gEdkiiUfsHostControllerProtocolGuid ## BY_START [UserExtensions.TianoCore."ExtraFiles"] - UfsPciHcDxeExtra.uni \ No newline at end of file + UfsPciHcDxeExtra.uni diff --git a/MdeModulePkg/Bus/Pci/UfsPciHcDxe/UfsPciHcDxe.uni b/MdeModulePkg/Bus/Pci/UfsPciHcDxe/UfsPciHcDxe.uni index 009180fbe4..58e06ea0b5 100644 --- a/MdeModulePkg/Bus/Pci/UfsPciHcDxe/UfsPciHcDxe.uni +++ b/MdeModulePkg/Bus/Pci/UfsPciHcDxe/UfsPciHcDxe.uni @@ -1,13 +1,13 @@ // /** @file // The UfsPciHcDxe driver is used by upper layer to retrieve mmio base address of managed pci-based Ufs host controller. // -// Copyright (c) 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Bus/Pci/UfsPciHcDxe/UfsPciHcDxeExtra.uni b/MdeModulePkg/Bus/Pci/UfsPciHcDxe/UfsPciHcDxeExtra.uni index ff33ff6a06..35fd876bce 100644 --- a/MdeModulePkg/Bus/Pci/UfsPciHcDxe/UfsPciHcDxeExtra.uni +++ b/MdeModulePkg/Bus/Pci/UfsPciHcDxe/UfsPciHcDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // UfsPciHcDxe Localized Strings and Content // -// Copyright (c) 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "UFS PCI-Based HC Driver" diff --git a/MdeModulePkg/Bus/Pci/UfsPciHcPei/UfsPciHcPei.c b/MdeModulePkg/Bus/Pci/UfsPciHcPei/UfsPciHcPei.c index 36325641e7..56e4051155 100644 --- a/MdeModulePkg/Bus/Pci/UfsPciHcPei/UfsPciHcPei.c +++ b/MdeModulePkg/Bus/Pci/UfsPciHcPei/UfsPciHcPei.c @@ -2,7 +2,7 @@ UfsPciHcPei driver is used to provide platform-dependent info, mainly UFS host controller MMIO base, to upper layer UFS drivers. - Copyright (c) 2014, Intel Corporation. All rights reserved.
+ Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -53,7 +53,7 @@ GetUfsHcMmioBar ( if (ControllerId >= Private->TotalUfsHcs) { return EFI_INVALID_PARAMETER; } - + *MmioBar = (UINTN)Private->UfsHcPciAddr[ControllerId]; return EFI_SUCCESS; @@ -61,7 +61,7 @@ GetUfsHcMmioBar ( /** The user code starts with this function. - + @param FileHandle Handle of the file being invoked. @param PeiServices Describes the list of possible PEI Services. diff --git a/MdeModulePkg/Bus/Pci/UfsPciHcPei/UfsPciHcPei.inf b/MdeModulePkg/Bus/Pci/UfsPciHcPei/UfsPciHcPei.inf index b16935628c..3535da17f0 100644 --- a/MdeModulePkg/Bus/Pci/UfsPciHcPei/UfsPciHcPei.inf +++ b/MdeModulePkg/Bus/Pci/UfsPciHcPei/UfsPciHcPei.inf @@ -1,7 +1,7 @@ ## @file # Component Description File For Universal Flash Storage Pci Host Controller Pei Module. # -# Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.
+# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -53,4 +53,4 @@ gEfiPeiMasterBootModePpiGuid AND gEfiPeiMemoryDiscoveredPpiGuid [UserExtensions.TianoCore."ExtraFiles"] - UfsPciHcPeiExtra.uni \ No newline at end of file + UfsPciHcPeiExtra.uni diff --git a/MdeModulePkg/Bus/Pci/UfsPciHcPei/UfsPciHcPei.uni b/MdeModulePkg/Bus/Pci/UfsPciHcPei/UfsPciHcPei.uni index 59f5d7071e..f2a296830a 100644 --- a/MdeModulePkg/Bus/Pci/UfsPciHcPei/UfsPciHcPei.uni +++ b/MdeModulePkg/Bus/Pci/UfsPciHcPei/UfsPciHcPei.uni @@ -2,14 +2,14 @@ // The UfsPciHcPei driver is used by upper layer to retrieve mmio base address of managed // pci-based Ufs host controller at PEI phase. // -// Copyright (c) 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions // of the BSD License which accompanies this distribution. The // full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Bus/Pci/UfsPciHcPei/UfsPciHcPeiExtra.uni b/MdeModulePkg/Bus/Pci/UfsPciHcPei/UfsPciHcPeiExtra.uni index cb579badb7..c9b22a551d 100644 --- a/MdeModulePkg/Bus/Pci/UfsPciHcPei/UfsPciHcPeiExtra.uni +++ b/MdeModulePkg/Bus/Pci/UfsPciHcPei/UfsPciHcPeiExtra.uni @@ -1,7 +1,7 @@ // /** @file // UfsPciHcPei Localized Strings and Content // -// Copyright (c) 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions @@ -14,8 +14,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "UFS PCI-Based HC Module for Recovery" diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c index 1fcc8b5f32..246f0646f6 100644 --- a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c +++ b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.c @@ -2,7 +2,7 @@ The UHCI driver model and HC protocol routines. -Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -1519,7 +1519,7 @@ UhciFreeDev ( if (Uhc->ExitBootServiceEvent != NULL) { gBS->CloseEvent (Uhc->ExitBootServiceEvent); } - + if (Uhc->MemPool != NULL) { UsbHcFreeMemPool (Uhc->MemPool); } @@ -1796,7 +1796,7 @@ UhciDriverBindingStart ( UhciWriteReg (Uhc->PciIo, USBCMD_OFFSET, USBCMD_RS | USBCMD_MAXP); return EFI_SUCCESS; - + UNINSTALL_USBHC: gBS->UninstallMultipleProtocolInterfaces ( Controller, diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h index fc23a75a96..e1218ffc57 100644 --- a/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h +++ b/MdeModulePkg/Bus/Pci/UhciDxe/Uhci.h @@ -2,7 +2,7 @@ The definition for UHCI driver model and HC protocol routines. -Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -145,7 +145,7 @@ struct _USB_HC_DEV { VOID *FrameMapping; // - // ExitBootServicesEvent is used to stop the EHC DMA operation + // ExitBootServicesEvent is used to stop the EHC DMA operation // after exit boot service. // EFI_EVENT ExitBootServiceEvent; diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf b/MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf index 9c5ff7b6fc..5dccd3b22e 100644 --- a/MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf +++ b/MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.inf @@ -1,9 +1,9 @@ ## @file -# The UhciDxe driver is responsible for managing the behavior of UHCI controller. +# The UhciDxe driver is responsible for managing the behavior of UHCI controller. # It implements the interfaces of monitoring the status of all ports and transferring # Control, Bulk, Interrupt and Isochronous requests to Usb1.x device # -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -23,7 +23,7 @@ FILE_GUID = 2FB92EFA-2EE0-4bae-9EB6-7464125E1EF7 MODULE_TYPE = UEFI_DRIVER VERSION_STRING = 1.0 - + ENTRY_POINT = UhciDriverEntryPoint # @@ -31,7 +31,7 @@ # # VALID_ARCHITECTURES = IA32 X64 IPF EBC ARM AARCH64 # -# DRIVER_BINDING = gUhciDriverBinding +# DRIVER_BINDING = gUhciDriverBinding # COMPONENT_NAME = gUhciComponentName # COMPONENT_NAME2 = gUhciComponentName2 # diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.uni b/MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.uni index bedde4502f..8737869183 100644 --- a/MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.uni +++ b/MdeModulePkg/Bus/Pci/UhciDxe/UhciDxe.uni @@ -4,13 +4,13 @@ // It implements the interfaces of monitoring the status of all ports and transferring // Control, Bulk, Interrupt and Isochronous requests to Usb1.x device // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Bus/Pci/UhciDxe/UhciDxeExtra.uni b/MdeModulePkg/Bus/Pci/UhciDxe/UhciDxeExtra.uni index af258486c7..cad96dac97 100644 --- a/MdeModulePkg/Bus/Pci/UhciDxe/UhciDxeExtra.uni +++ b/MdeModulePkg/Bus/Pci/UhciDxe/UhciDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // UhciDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "UHCI DXE Driver" diff --git a/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c b/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c index 482c404c0e..ec2daf1649 100644 --- a/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c +++ b/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.c @@ -2,8 +2,8 @@ PEIM to produce gPeiUsbHostControllerPpiGuid based on gPeiUsbControllerPpiGuid which is used to enable recovery function from USB Drivers. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
- +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The @@ -220,12 +220,12 @@ UhcPeimEntry ( /** Submits control transfer to a target USB device. - + @param PeiServices The pointer of EFI_PEI_SERVICES. @param This The pointer of PEI_USB_HOST_CONTROLLER_PPI. @param DeviceAddress The target device address. @param DeviceSpeed Target device speed. - @param MaximumPacketLength Maximum packet size the default control transfer + @param MaximumPacketLength Maximum packet size the default control transfer endpoint is capable of sending or receiving. @param Request USB device request to send. @param TransferDirection Specifies the data direction for the data stage. @@ -458,18 +458,18 @@ UhcControlTransfer ( /** Submits bulk transfer to a bulk endpoint of a USB device. - + @param PeiServices The pointer of EFI_PEI_SERVICES. @param This The pointer of PEI_USB_HOST_CONTROLLER_PPI. @param DeviceAddress Target device address. @param EndPointAddress Endpoint number and its direction in bit 7. - @param MaximumPacketLength Maximum packet size the endpoint is capable of + @param MaximumPacketLength Maximum packet size the endpoint is capable of sending or receiving. - @param Data Array of pointers to the buffers of data to transmit + @param Data Array of pointers to the buffers of data to transmit from or receive into. @param DataLength The lenght of the data buffer. @param DataToggle On input, the initial data toggle for the transfer; - On output, it is updated to to next data toggle to use of + On output, it is updated to to next data toggle to use of the subsequent bulk transfer. @param TimeOut Indicates the maximum time, in millisecond, which the transfer is allowed to complete. @@ -694,10 +694,10 @@ UhcBulkTransfer ( Retrieves the number of root hub ports. @param[in] PeiServices The pointer to the PEI Services Table. - @param[in] This The pointer to this instance of the + @param[in] This The pointer to this instance of the PEI_USB_HOST_CONTROLLER_PPI. - @param[out] PortNumber The pointer to the number of the root hub ports. - + @param[out] PortNumber The pointer to the number of the root hub ports. + @retval EFI_SUCCESS The port number was retrieved successfully. @retval EFI_INVALID_PARAMETER PortNumber is NULL. @@ -739,10 +739,10 @@ UhcGetRootHubPortNumber ( /** Retrieves the current status of a USB root hub port. - + @param PeiServices The pointer of EFI_PEI_SERVICES. @param This The pointer of PEI_USB_HOST_CONTROLLER_PPI. - @param PortNumber The root hub port to retrieve the state from. + @param PortNumber The root hub port to retrieve the state from. @param PortStatus Variable to receive the port state. @retval EFI_SUCCESS The status of the USB root hub port specified. @@ -832,7 +832,7 @@ UhcGetRootHubPortStatus ( /** Sets a feature for the specified root hub port. - + @param PeiServices The pointer of EFI_PEI_SERVICES @param This The pointer of PEI_USB_HOST_CONTROLLER_PPI @param PortNumber Root hub port to set. @@ -908,7 +908,7 @@ UhcSetRootHubPortFeature ( /** Clears a feature for the specified root hub port. - + @param PeiServices The pointer of EFI_PEI_SERVICES. @param This The pointer of PEI_USB_HOST_CONTROLLER_PPI. @param PortNumber Specifies the root hub port whose feature @@ -916,7 +916,7 @@ UhcSetRootHubPortFeature ( @param PortFeature Indicates the feature selector associated with the feature clear request. - @retval EFI_SUCCESS The feature specified by PortFeature was cleared + @retval EFI_SUCCESS The feature specified by PortFeature was cleared for the USB root hub port specified by PortNumber. @retval EFI_INVALID_PARAMETER PortNumber is invalid or PortFeature is invalid. @@ -1131,7 +1131,7 @@ CreateFrameList ( ASSERT (UhcDev->BulkQH != NULL); // - //Set the corresponding QH pointer + //Set the corresponding QH pointer // SetQHHorizontalLinkPtr(UhcDev->ConfigQH, UhcDev->BulkQH); SetQHHorizontalQHorTDSelect (UhcDev->ConfigQH, TRUE); @@ -1154,7 +1154,7 @@ CreateFrameList ( /** Read a 16bit width data from Uhc HC IO space register. - + @param UhcDev The UHCI device. @param Port The IO space address of the register. @@ -1172,7 +1172,7 @@ USBReadPortW ( /** Write a 16bit width data into Uhc HC IO space register. - + @param UhcDev The UHCI device. @param Port The IO space address of the register. @param Data The data written into the register. @@ -1190,7 +1190,7 @@ USBWritePortW ( /** Write a 32bit width data into Uhc HC IO space register. - + @param UhcDev The UHCI device. @param Port The IO space address of the register. @param Data The data written into the register. @@ -1208,7 +1208,7 @@ USBWritePortDW ( /** Clear the content of UHCI's Status Register. - + @param UhcDev The UHCI device. @param StatusAddr The IO space address of the register. diff --git a/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.h b/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.h index 9935f522cd..33d4f2f65f 100644 --- a/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.h +++ b/MdeModulePkg/Bus/Pci/UhciPei/UhcPeim.h @@ -1,8 +1,8 @@ /** @file Private Header file for Usb Host Controller PEIM -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
- +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The @@ -203,12 +203,12 @@ typedef struct { /** Submits control transfer to a target USB device. - + @param PeiServices The pointer of EFI_PEI_SERVICES. @param This The pointer of PEI_USB_HOST_CONTROLLER_PPI. @param DeviceAddress The target device address. @param DeviceSpeed Target device speed. - @param MaximumPacketLength Maximum packet size the default control transfer + @param MaximumPacketLength Maximum packet size the default control transfer endpoint is capable of sending or receiving. @param Request USB device request to send. @param TransferDirection Specifies the data direction for the data stage. @@ -242,18 +242,18 @@ UhcControlTransfer ( /** Submits bulk transfer to a bulk endpoint of a USB device. - + @param PeiServices The pointer of EFI_PEI_SERVICES. @param This The pointer of PEI_USB_HOST_CONTROLLER_PPI. @param DeviceAddress Target device address. @param EndPointAddress Endpoint number and its direction in bit 7. - @param MaximumPacketLength Maximum packet size the endpoint is capable of + @param MaximumPacketLength Maximum packet size the endpoint is capable of sending or receiving. - @param Data Array of pointers to the buffers of data to transmit + @param Data Array of pointers to the buffers of data to transmit from or receive into. @param DataLength The lenght of the data buffer. @param DataToggle On input, the initial data toggle for the transfer; - On output, it is updated to to next data toggle to use of + On output, it is updated to to next data toggle to use of the subsequent bulk transfer. @param TimeOut Indicates the maximum time, in millisecond, which the transfer is allowed to complete. @@ -286,10 +286,10 @@ UhcBulkTransfer ( Retrieves the number of root hub ports. @param[in] PeiServices The pointer to the PEI Services Table. - @param[in] This The pointer to this instance of the + @param[in] This The pointer to this instance of the PEI_USB_HOST_CONTROLLER_PPI. - @param[out] PortNumber The pointer to the number of the root hub ports. - + @param[out] PortNumber The pointer to the number of the root hub ports. + @retval EFI_SUCCESS The port number was retrieved successfully. @retval EFI_INVALID_PARAMETER PortNumber is NULL. @@ -304,10 +304,10 @@ UhcGetRootHubPortNumber ( /** Retrieves the current status of a USB root hub port. - + @param PeiServices The pointer of EFI_PEI_SERVICES. @param This The pointer of PEI_USB_HOST_CONTROLLER_PPI. - @param PortNumber The root hub port to retrieve the state from. + @param PortNumber The root hub port to retrieve the state from. @param PortStatus Variable to receive the port state. @retval EFI_SUCCESS The status of the USB root hub port specified. @@ -326,7 +326,7 @@ UhcGetRootHubPortStatus ( /** Sets a feature for the specified root hub port. - + @param PeiServices The pointer of EFI_PEI_SERVICES @param This The pointer of PEI_USB_HOST_CONTROLLER_PPI @param PortNumber Root hub port to set. @@ -348,7 +348,7 @@ UhcSetRootHubPortFeature ( /** Clears a feature for the specified root hub port. - + @param PeiServices The pointer of EFI_PEI_SERVICES. @param This The pointer of PEI_USB_HOST_CONTROLLER_PPI. @param PortNumber Specifies the root hub port whose feature @@ -356,7 +356,7 @@ UhcSetRootHubPortFeature ( @param PortFeature Indicates the feature selector associated with the feature clear request. - @retval EFI_SUCCESS The feature specified by PortFeature was cleared + @retval EFI_SUCCESS The feature specified by PortFeature was cleared for the USB root hub port specified by PortNumber. @retval EFI_INVALID_PARAMETER PortNumber is invalid or PortFeature is invalid. @@ -400,7 +400,7 @@ CreateFrameList ( /** Read a 16bit width data from Uhc HC IO space register. - + @param UhcDev The UHCI device. @param Port The IO space address of the register. @@ -415,7 +415,7 @@ USBReadPortW ( /** Write a 16bit width data into Uhc HC IO space register. - + @param UhcDev The UHCI device. @param Port The IO space address of the register. @param Data The data written into the register. @@ -430,7 +430,7 @@ USBWritePortW ( /** Write a 32bit width data into Uhc HC IO space register. - + @param UhcDev The UHCI device. @param Port The IO space address of the register. @param Data The data written into the register. @@ -445,7 +445,7 @@ USBWritePortDW ( /** Clear the content of UHCI's Status Register. - + @param UhcDev The UHCI device. @param StatusAddr The IO space address of the register. diff --git a/MdeModulePkg/Bus/Pci/UhciPei/UhciPei.uni b/MdeModulePkg/Bus/Pci/UhciPei/UhciPei.uni index ef299e441d..fb1ba01b85 100644 --- a/MdeModulePkg/Bus/Pci/UhciPei/UhciPei.uni +++ b/MdeModulePkg/Bus/Pci/UhciPei/UhciPei.uni @@ -4,14 +4,14 @@ // It produces gPeiUsbHostControllerPpiGuid based on gPeiUsbControllerPpiGuid which is used // to enable recovery function from USB Drivers. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions // of the BSD License which accompanies this distribution. The // full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Bus/Pci/UhciPei/UhciPeiExtra.uni b/MdeModulePkg/Bus/Pci/UhciPei/UhciPeiExtra.uni index c000912f3c..e31ce04780 100644 --- a/MdeModulePkg/Bus/Pci/UhciPei/UhciPeiExtra.uni +++ b/MdeModulePkg/Bus/Pci/UhciPei/UhciPeiExtra.uni @@ -1,7 +1,7 @@ // /** @file // UhciPei Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions @@ -14,8 +14,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "UHCI PEI Module for Recovery" diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/UsbHcMem.c b/MdeModulePkg/Bus/Pci/XhciDxe/UsbHcMem.c index 7c5261cca2..b5840a959f 100644 --- a/MdeModulePkg/Bus/Pci/XhciDxe/UsbHcMem.c +++ b/MdeModulePkg/Bus/Pci/XhciDxe/UsbHcMem.c @@ -2,7 +2,7 @@ Routine procedures for memory allocate/free. -Copyright (c) 2013 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -598,23 +598,23 @@ UsbHcFreeMem ( return ; } -/** +/** Allocates pages at a specified alignment that are suitable for an EfiPciIoOperationBusMasterCommonBuffer mapping. - + If Alignment is not a power of two and Alignment is not zero, then ASSERT(). @param PciIo The PciIo that can be used to access the host controller. @param Pages The number of pages to allocate. @param Alignment The requested alignment of the allocation. Must be a power of two. @param HostAddress The system memory address to map to the PCI controller. - @param DeviceAddress The resulting map address for the bus master PCI controller to + @param DeviceAddress The resulting map address for the bus master PCI controller to use to access the hosts HostAddress. @param Mapping A resulting value to pass to Unmap(). @retval EFI_SUCCESS Success to allocate aligned pages. @retval EFI_INVALID_PARAMETER Pages or Alignment is not valid. @retval EFI_OUT_OF_RESOURCES Do not have enough resources to allocate memory. - + **/ EFI_STATUS @@ -639,11 +639,11 @@ UsbHcAllocateAlignedPages ( // Alignment must be a power of two or zero. // ASSERT ((Alignment & (Alignment - 1)) == 0); - + if ((Alignment & (Alignment - 1)) != 0) { return EFI_INVALID_PARAMETER; } - + if (Pages == 0) { return EFI_INVALID_PARAMETER; } @@ -657,7 +657,7 @@ UsbHcAllocateAlignedPages ( // Make sure that Pages plus EFI_SIZE_TO_PAGES (Alignment) does not overflow. // ASSERT (RealPages > Pages); - + Status = PciIo->AllocateBuffer ( PciIo, AllocateAnyPages, @@ -665,7 +665,7 @@ UsbHcAllocateAlignedPages ( Pages, &Memory, 0 - ); + ); if (EFI_ERROR (Status)) { return EFI_OUT_OF_RESOURCES; } @@ -719,7 +719,7 @@ UsbHcAllocateAlignedPages ( Status = PciIo->FreeBuffer (PciIo, Pages, (VOID *) AlignedMemory); return EFI_OUT_OF_RESOURCES; } - + *HostAddress = (VOID *) AlignedMemory; return EFI_SUCCESS; @@ -727,7 +727,7 @@ UsbHcAllocateAlignedPages ( /** Frees memory that was allocated with UsbHcAllocateAlignedPages(). - + @param PciIo The PciIo that can be used to access the host controller. @param HostAddress The system memory address to map to the PCI controller. @param Pages The number of 4 KB pages to free. @@ -743,9 +743,9 @@ UsbHcFreeAlignedPages ( ) { EFI_STATUS Status; - + ASSERT (Pages != 0); - + Status = PciIo->Unmap (PciIo, Mapping); ASSERT_EFI_ERROR (Status); @@ -753,6 +753,6 @@ UsbHcFreeAlignedPages ( PciIo, Pages, HostAddress - ); + ); ASSERT_EFI_ERROR (Status); } diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/UsbHcMem.h b/MdeModulePkg/Bus/Pci/XhciDxe/UsbHcMem.h index 1907685ddd..bb5fc5b5de 100644 --- a/MdeModulePkg/Bus/Pci/XhciDxe/UsbHcMem.h +++ b/MdeModulePkg/Bus/Pci/XhciDxe/UsbHcMem.h @@ -2,7 +2,7 @@ This file contains the definination for host controller memory management routines. -Copyright (c) 2013, Intel Corporation. All rights reserved.
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -164,23 +164,23 @@ UsbHcGetHostAddrForPciAddr ( IN UINTN Size ); -/** +/** Allocates pages at a specified alignment that are suitable for an EfiPciIoOperationBusMasterCommonBuffer mapping. - + If Alignment is not a power of two and Alignment is not zero, then ASSERT(). @param PciIo The PciIo that can be used to access the host controller. @param Pages The number of pages to allocate. @param Alignment The requested alignment of the allocation. Must be a power of two. @param HostAddress The system memory address to map to the PCI controller. - @param DeviceAddress The resulting map address for the bus master PCI controller to + @param DeviceAddress The resulting map address for the bus master PCI controller to use to access the hosts HostAddress. @param Mapping A resulting value to pass to Unmap(). @retval EFI_SUCCESS Success to allocate aligned pages. @retval EFI_INVALID_PARAMETER Pages or Alignment is not valid. @retval EFI_OUT_OF_RESOURCES Do not have enough resources to allocate memory. - + **/ EFI_STATUS @@ -192,10 +192,10 @@ UsbHcAllocateAlignedPages ( OUT EFI_PHYSICAL_ADDRESS *DeviceAddress, OUT VOID **Mapping ); - + /** Frees memory that was allocated with UsbHcAllocateAlignedPages(). - + @param PciIo The PciIo that can be used to access the host controller. @param HostAddress The system memory address to map to the PCI controller. @param Pages The number of pages to free. diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c index c884f4c314..48eccf770a 100644 --- a/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c +++ b/MdeModulePkg/Bus/Pci/XhciDxe/Xhci.c @@ -1,7 +1,7 @@ /** @file The XHCI controller driver. -Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -159,7 +159,7 @@ XhcReset ( EFI_TPL OldTpl; Xhc = XHC_FROM_THIS (This); - + if (Xhc->DevicePath != NULL) { // // Report Status Code to indicate reset happens @@ -169,7 +169,7 @@ XhcReset ( (EFI_IO_BUS_USB | EFI_IOB_PC_RESET), Xhc->DevicePath ); - } + } OldTpl = gBS->RaiseTPL (XHC_TPL); @@ -995,7 +995,7 @@ XhcControlTransfer ( // Hook Set_Config request from UsbBus as we need configure device endpoint. // if ((Request->Request == USB_REQ_GET_DESCRIPTOR) && - ((Request->RequestType == USB_REQUEST_TYPE (EfiUsbDataIn, USB_REQ_TYPE_STANDARD, USB_TARGET_DEVICE)) || + ((Request->RequestType == USB_REQUEST_TYPE (EfiUsbDataIn, USB_REQ_TYPE_STANDARD, USB_TARGET_DEVICE)) || ((Request->RequestType == USB_REQUEST_TYPE (EfiUsbDataIn, USB_REQ_TYPE_CLASS, USB_TARGET_DEVICE))))) { DescriptorType = (UINT8)(Request->Value >> 8); if ((DescriptorType == USB_DESC_TYPE_DEVICE) && ((*DataLength == sizeof (EFI_USB_DEVICE_DESCRIPTOR)) || ((DeviceSpeed == EFI_USB_SPEED_FULL) && (*DataLength == 8)))) { @@ -1144,7 +1144,7 @@ XhcControlTransfer ( ClearPortRequest.Length = 0; XhcControlTransfer ( - This, + This, DeviceAddress, DeviceSpeed, MaximumPacketLength, diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf b/MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf index 614938ac89..9bdabd10bc 100644 --- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf +++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.inf @@ -3,7 +3,7 @@ # It implements the interfaces of monitoring the status of all ports and transferring # Control, Bulk, Interrupt and Isochronous requests to those attached usb LS/FS/HS/SS devices. # -# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -41,7 +41,7 @@ XhciReg.c XhciSched.c UsbHcMem.c - UsbHcMem.h + UsbHcMem.h ComponentName.c ComponentName.h Xhci.h diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.uni b/MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.uni index 7eca8f85e0..20b49f14d6 100644 --- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.uni +++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciDxe.uni @@ -4,13 +4,13 @@ // It implements the interfaces of monitoring the status of all ports and transferring // Control, Bulk, Interrupt and Isochronous requests to those attached usb LS/FS/HS/SS devices. // -// Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciDxeExtra.uni b/MdeModulePkg/Bus/Pci/XhciDxe/XhciDxeExtra.uni index b2969d1adb..e3d2344343 100644 --- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciDxeExtra.uni +++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // XhciDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "XHCI DXE Driver" diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c index 21fdcf130a..6a2ef4cd5d 100644 --- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c +++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.c @@ -2,7 +2,7 @@ XHCI transfer scheduling routines. -Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -201,7 +201,7 @@ XhcFreeUrb ( if ((Xhc == NULL) || (Urb == NULL)) { return; } - + if (Urb->DataMap != NULL) { Xhc->PciIo->Unmap (Xhc->PciIo, Urb->DataMap); } @@ -269,15 +269,15 @@ XhcCreateTransferTrb ( } else { MapOp = EfiPciIoOperationBusMasterRead; } - + Len = Urb->DataLen; Status = Xhc->PciIo->Map (Xhc->PciIo, MapOp, Urb->Data, &Len, &PhyAddr, &Map); - + if (EFI_ERROR (Status) || (Len != Urb->DataLen)) { DEBUG ((EFI_D_ERROR, "XhcCreateTransferTrb: Fail to map Urb->Data.\n")); return EFI_OUT_OF_RESOURCES; } - + Urb->DataPhy = (VOID *) ((UINTN) PhyAddr); Urb->DataMap = Map; } @@ -469,7 +469,7 @@ XhcInitSched ( VOID *Dcbaa; EFI_PHYSICAL_ADDRESS DcbaaPhy; UINT64 CmdRing; - EFI_PHYSICAL_ADDRESS CmdRingPhy; + EFI_PHYSICAL_ADDRESS CmdRingPhy; UINTN Entries; UINT32 MaxScratchpadBufs; UINT64 *ScratchBuf; @@ -520,7 +520,7 @@ XhcInitSched ( ScratchEntryMap = AllocateZeroPool (sizeof (UINTN) * MaxScratchpadBufs); ASSERT (ScratchEntryMap != NULL); Xhc->ScratchEntryMap = ScratchEntryMap; - + // // Allocate the buffer to record the host address for each entry // @@ -533,7 +533,7 @@ XhcInitSched ( Xhc->PciIo, EFI_SIZE_TO_PAGES (MaxScratchpadBufs * sizeof (UINT64)), Xhc->PageSize, - (VOID **) &ScratchBuf, + (VOID **) &ScratchBuf, &ScratchPhy, &Xhc->ScratchMap ); @@ -659,7 +659,7 @@ XhcRecoverHaltedEndpoint ( } Dci = XhcEndpointToDci (Urb->Ep.EpAddr, (UINT8)(Urb->Ep.Direction)); ASSERT (Dci < 32); - + DEBUG ((EFI_D_INFO, "Recovery Halted Slot = %x,Dci = %x\n", SlotId, Dci)); // @@ -721,7 +721,7 @@ XhcDequeueTrbFromEndpoint ( } Dci = XhcEndpointToDci (Urb->Ep.EpAddr, (UINT8)(Urb->Ep.Direction)); ASSERT (Dci < 32); - + DEBUG ((EFI_D_INFO, "Stop Slot = %x,Dci = %x\n", SlotId, Dci)); // @@ -792,9 +792,9 @@ CreateEventRing ( EventRing->TrbNumber = EVENT_RING_TRB_NUMBER; EventRing->EventRingDequeue = (TRB_TEMPLATE *) EventRing->EventRingSeg0; EventRing->EventRingEnqueue = (TRB_TEMPLATE *) EventRing->EventRingSeg0; - + DequeuePhy = UsbHcGetPciAddrForHostAddr (Xhc->MemPool, Buf, Size); - + // // Software maintains an Event Ring Consumer Cycle State (CCS) bit, initializing it to '1' // and toggling it every time the Event Ring Dequeue Pointer wraps back to the beginning of the Event Ring. @@ -953,7 +953,7 @@ XhcFreeSched ( { UINT32 Index; UINT64 *ScratchEntry; - + if (Xhc->ScratchBuf != NULL) { ScratchEntry = Xhc->ScratchEntry; for (Index = 0; Index < Xhc->MaxScratchpadBufs; Index++) { @@ -974,14 +974,14 @@ XhcFreeSched ( UsbHcFreeMem (Xhc->MemPool, Xhc->CmdRing.RingSeg0, sizeof (TRB_TEMPLATE) * CMD_RING_TRB_NUMBER); Xhc->CmdRing.RingSeg0 = NULL; } - + XhcFreeEventRing (Xhc,&Xhc->EventRing); if (Xhc->DCBAA != NULL) { UsbHcFreeMem (Xhc->MemPool, Xhc->DCBAA, (Xhc->MaxSlotsEn + 1) * sizeof(UINT64)); Xhc->DCBAA = NULL; } - + // // Free memory pool at last // @@ -1132,7 +1132,7 @@ XhcCheckUrbResult ( if ((EvtTrb->Type != TRB_TYPE_COMMAND_COMPLT_EVENT) && (EvtTrb->Type != TRB_TYPE_TRANS_EVENT)) { continue; } - + // // Need convert pci device address to host address // @@ -1149,12 +1149,12 @@ XhcCheckUrbResult ( CheckedUrb = Xhc->PendingUrb; } else if (IsTransferRingTrb (Xhc, TRBPtr, Urb)) { CheckedUrb = Urb; - } else if (IsAsyncIntTrb (Xhc, TRBPtr, &AsyncUrb)) { + } else if (IsAsyncIntTrb (Xhc, TRBPtr, &AsyncUrb)) { CheckedUrb = AsyncUrb; } else { continue; } - + switch (EvtTrb->Completecode) { case TRB_COMPLETION_STALL_ERROR: CheckedUrb->Result |= EFI_USB_ERR_STALL; @@ -1676,7 +1676,7 @@ XhcPollPortStatusChange ( Status = XhcInitializeDeviceSlot64 (Xhc, ParentRouteChart, Port, RouteChart, Speed); } } - } + } return Status; } @@ -3144,7 +3144,7 @@ XhcSetConfigCmd64 ( if (Dci > MaxDci) { MaxDci = Dci; } - + IfDesc = (USB_INTERFACE_DESCRIPTOR *)((UINTN)IfDesc + IfDesc->Length); } diff --git a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.h b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.h index f40f94c1e4..097408828a 100644 --- a/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.h +++ b/MdeModulePkg/Bus/Pci/XhciDxe/XhciSched.h @@ -2,7 +2,7 @@ This file contains the definition for XHCI host controller schedule routines. -Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -620,7 +620,7 @@ typedef struct _SLOT_CONTEXT_64 { UINT32 RsvdZ9; UINT32 RsvdZ10; UINT32 RsvdZ11; - + UINT32 RsvdZ12; UINT32 RsvdZ13; UINT32 RsvdZ14; @@ -688,12 +688,12 @@ typedef struct _ENDPOINT_CONTEXT_64 { UINT32 RsvdZ5; UINT32 RsvdZ6; UINT32 RsvdZ7; - + UINT32 RsvdZ8; UINT32 RsvdZ9; UINT32 RsvdZ10; UINT32 RsvdZ11; - + UINT32 RsvdZ12; UINT32 RsvdZ13; UINT32 RsvdZ14; diff --git a/MdeModulePkg/Bus/Pci/XhciPei/XhciPei.uni b/MdeModulePkg/Bus/Pci/XhciPei/XhciPei.uni index ee23b4b658..b4d8cf30bd 100644 --- a/MdeModulePkg/Bus/Pci/XhciPei/XhciPei.uni +++ b/MdeModulePkg/Bus/Pci/XhciPei/XhciPei.uni @@ -4,14 +4,14 @@ // It produces gPeiUsb2HostControllerPpiGuid based on gPeiUsbControllerPpiGuid // which is used to enable recovery function from USB Drivers. // -// Copyright (c) 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions // of the BSD License which accompanies this distribution. The // full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Bus/Pci/XhciPei/XhciPeiExtra.uni b/MdeModulePkg/Bus/Pci/XhciPei/XhciPeiExtra.uni index 0d0fc7a952..73c72eda8d 100644 --- a/MdeModulePkg/Bus/Pci/XhciPei/XhciPeiExtra.uni +++ b/MdeModulePkg/Bus/Pci/XhciPei/XhciPeiExtra.uni @@ -1,7 +1,7 @@ // /** @file // XhciPei Localized Strings and Content // -// Copyright (c) 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "XHCI PEI Module for Recovery" diff --git a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c index 21034aab19..11a7f2a927 100644 --- a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c +++ b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.c @@ -2,7 +2,7 @@ SCSI Bus driver that layers on every SCSI Pass Thru and Extended SCSI Pass Thru protocol in the system. -Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -188,7 +188,7 @@ SCSIBusDriverBindingSupported ( SetMem (TargetId, TARGET_MAX_BYTES, 0xFF); // - // To keep backward compatibility, UEFI ExtPassThru Protocol is supported as well as + // To keep backward compatibility, UEFI ExtPassThru Protocol is supported as well as // EFI PassThru Protocol. From priority perspective, ExtPassThru Protocol is firstly // tried to open on host controller handle. If fails, then PassThru Protocol is tried instead. // @@ -217,7 +217,7 @@ SCSIBusDriverBindingSupported ( &gEfiExtScsiPassThruProtocolGuid, This->DriverBindingHandle, Controller - ); + ); return EFI_SUCCESS; } else { // @@ -232,7 +232,7 @@ SCSIBusDriverBindingSupported ( &gEfiExtScsiPassThruProtocolGuid, This->DriverBindingHandle, Controller - ); + ); if (!EFI_ERROR(Status)) { return EFI_SUCCESS; } @@ -240,7 +240,7 @@ SCSIBusDriverBindingSupported ( } // - // Come here in 2 condition: + // Come here in 2 condition: // 1. ExtPassThru doesn't exist. // 2. ExtPassThru exists but RemainingDevicePath is invalid. // @@ -252,22 +252,22 @@ SCSIBusDriverBindingSupported ( Controller, EFI_OPEN_PROTOCOL_BY_DRIVER ); - + if (Status == EFI_ALREADY_STARTED) { return EFI_SUCCESS; } - + if (EFI_ERROR (Status)) { return Status; } - + // // Test RemainingDevicePath is valid or not. // if ((RemainingDevicePath != NULL) && !IsDevicePathEnd (RemainingDevicePath)) { Status = PassThru->GetTargetLun (PassThru, RemainingDevicePath, &ScsiTargetId.ScsiId.Scsi, &Lun); } - + gBS->CloseProtocol ( Controller, &gEfiScsiPassThruProtocolGuid, @@ -325,10 +325,10 @@ SCSIBusDriverBindingStart ( FromFirstTarget = FALSE; ExtScsiSupport = FALSE; PassThruStatus = EFI_SUCCESS; - + TargetId = &ScsiTargetId.ScsiId.ExtScsi[0]; SetMem (TargetId, TARGET_MAX_BYTES, 0xFF); - + DevicePathStatus = gBS->OpenProtocol ( Controller, &gEfiDevicePathProtocolGuid, @@ -348,10 +348,10 @@ SCSIBusDriverBindingStart ( EFI_PROGRESS_CODE, (EFI_IO_BUS_SCSI | EFI_IOB_PC_INIT), ParentDevicePath - ); + ); // - // To keep backward compatibility, UEFI ExtPassThru Protocol is supported as well as + // To keep backward compatibility, UEFI ExtPassThru Protocol is supported as well as // EFI PassThru Protocol. From priority perspective, ExtPassThru Protocol is firstly // tried to open on host controller handle. If fails, then PassThru Protocol is tried instead. // @@ -386,13 +386,13 @@ SCSIBusDriverBindingStart ( This->DriverBindingHandle, Controller ); - } + } return Status; - } + } } else { // - // Succeed to open ExtPassThru Protocol, and meanwhile open PassThru Protocol - // with BY_DRIVER if it is also present on the handle. The intent is to prevent + // Succeed to open ExtPassThru Protocol, and meanwhile open PassThru Protocol + // with BY_DRIVER if it is also present on the handle. The intent is to prevent // another SCSI Bus Driver to work on the same host handle. // ExtScsiSupport = TRUE; @@ -405,7 +405,7 @@ SCSIBusDriverBindingStart ( EFI_OPEN_PROTOCOL_BY_DRIVER ); } - + if (Status != EFI_ALREADY_STARTED) { // // Go through here means either ExtPassThru or PassThru Protocol is successfully opened @@ -423,14 +423,14 @@ SCSIBusDriverBindingStart ( if (ScsiBusDev->ExtScsiSupport) { ScsiBusDev->ExtScsiInterface = ExtScsiInterface; } else { - ScsiBusDev->ScsiInterface = ScsiInterface; + ScsiBusDev->ScsiInterface = ScsiInterface; } // // Install EFI_SCSI_BUS_PROTOCOL to the controller handle, So ScsiBusDev could be // retrieved on this controller handle. With ScsiBusDev, we can know which PassThru // Protocol is present on the handle, UEFI ExtPassThru Protocol or EFI PassThru Protocol. - // + // Status = gBS->InstallProtocolInterface ( &Controller, &gEfiCallerIdGuid, @@ -472,17 +472,17 @@ SCSIBusDriverBindingStart ( Lun = 0; if (RemainingDevicePath == NULL) { // - // If RemainingDevicePath is NULL, + // If RemainingDevicePath is NULL, // must enumerate all SCSI devices anyway // FromFirstTarget = TRUE; } else if (!IsDevicePathEnd (RemainingDevicePath)) { // - // If RemainingDevicePath isn't the End of Device Path Node, + // If RemainingDevicePath isn't the End of Device Path Node, // only scan the specified device by RemainingDevicePath // if (ScsiBusDev->ExtScsiSupport) { - Status = ScsiBusDev->ExtScsiInterface->GetTargetLun (ScsiBusDev->ExtScsiInterface, RemainingDevicePath, &TargetId, &Lun); + Status = ScsiBusDev->ExtScsiInterface->GetTargetLun (ScsiBusDev->ExtScsiInterface, RemainingDevicePath, &TargetId, &Lun); } else { Status = ScsiBusDev->ScsiInterface->GetTargetLun (ScsiBusDev->ScsiInterface, RemainingDevicePath, &ScsiTargetId.ScsiId.Scsi, &Lun); } @@ -494,7 +494,7 @@ SCSIBusDriverBindingStart ( // // If RemainingDevicePath is the End of Device Path Node, // skip enumerate any device and return EFI_SUCESSS - // + // ScanOtherPuns = FALSE; } @@ -539,11 +539,11 @@ SCSIBusDriverBindingStart ( return EFI_SUCCESS; ErrorExit: - + if (ScsiBusDev != NULL) { FreePool (ScsiBusDev); } - + if (ExtScsiSupport) { gBS->CloseProtocol ( Controller, @@ -578,7 +578,7 @@ ErrorExit: restrictions for this service. DisconnectController() must follow these calling restrictions. If any other agent wishes to call Stop() it must also follow these calling restrictions. - + @param This Protocol instance pointer. @param ControllerHandle Handle of device to stop driver on @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of @@ -650,7 +650,7 @@ SCSIBusDriverBindingStop ( ); // // When Start() succeeds to open ExtPassThru, it always tries to open PassThru BY_DRIVER. - // Its intent is to prevent another SCSI Bus Driver from woking on the same host handle. + // Its intent is to prevent another SCSI Bus Driver from woking on the same host handle. // So Stop() needs to try to close PassThru if present here. // gBS->CloseProtocol ( @@ -763,11 +763,11 @@ SCSIBusDriverBindingStop ( @param This Protocol instance pointer. @param DeviceType A pointer to the device type information retrieved from - the SCSI Controller. + the SCSI Controller. @retval EFI_SUCCESS Retrieves the device type information successfully. @retval EFI_INVALID_PARAMETER The DeviceType is NULL. - + **/ EFI_STATUS EFIAPI @@ -833,7 +833,7 @@ ScsiGetDeviceLocation ( @retval EFI_DEVICE_ERROR Errors encountered when resetting the SCSI bus. @retval EFI_UNSUPPORTED The bus reset operation is not supported by the SCSI Host Controller. - @retval EFI_TIMEOUT A timeout occurred while attempting to reset + @retval EFI_TIMEOUT A timeout occurred while attempting to reset the SCSI bus. **/ EFI_STATUS @@ -893,7 +893,7 @@ ScsiResetDevice ( (EFI_IO_BUS_ATA_ATAPI | EFI_IOB_PC_RESET), ScsiIoDevice->ScsiBusDeviceData->DevicePath ); - + CopyMem (Target,&ScsiIoDevice->Pun, TARGET_MAX_BYTES); @@ -917,47 +917,47 @@ ScsiResetDevice ( Sends a SCSI Request Packet to the SCSI Controller for execution. @param This Protocol instance pointer. - @param CommandPacket The SCSI request packet to send to the SCSI + @param CommandPacket The SCSI request packet to send to the SCSI Controller specified by the device handle. @param Event If the SCSI bus where the SCSI device is attached - does not support non-blocking I/O, then Event is - ignored, and blocking I/O is performed. + does not support non-blocking I/O, then Event is + ignored, and blocking I/O is performed. If Event is NULL, then blocking I/O is performed. - If Event is not NULL and non-blocking I/O is + If Event is not NULL and non-blocking I/O is supported, then non-blocking I/O is performed, and Event will be signaled when the SCSI Request Packet completes. - @retval EFI_SUCCESS The SCSI Request Packet was sent by the host - successfully, and TransferLength bytes were - transferred to/from DataBuffer.See - HostAdapterStatus, TargetStatus, + @retval EFI_SUCCESS The SCSI Request Packet was sent by the host + successfully, and TransferLength bytes were + transferred to/from DataBuffer.See + HostAdapterStatus, TargetStatus, SenseDataLength, and SenseData in that order for additional status information. - @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, + @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, but the entire DataBuffer could not be transferred. The actual number of bytes transferred is returned - in TransferLength. See HostAdapterStatus, - TargetStatus, SenseDataLength, and SenseData in + in TransferLength. See HostAdapterStatus, + TargetStatus, SenseDataLength, and SenseData in that order for additional status information. - @retval EFI_NOT_READY The SCSI Request Packet could not be sent because - there are too many SCSI Command Packets already + @retval EFI_NOT_READY The SCSI Request Packet could not be sent because + there are too many SCSI Command Packets already queued.The caller may retry again later. - @retval EFI_DEVICE_ERROR A device error occurred while attempting to send - the SCSI Request Packet. See HostAdapterStatus, - TargetStatus, SenseDataLength, and SenseData in + @retval EFI_DEVICE_ERROR A device error occurred while attempting to send + the SCSI Request Packet. See HostAdapterStatus, + TargetStatus, SenseDataLength, and SenseData in that order for additional status information. - @retval EFI_INVALID_PARAMETER The contents of CommandPacket are invalid. - The SCSI Request Packet was not sent, so no + @retval EFI_INVALID_PARAMETER The contents of CommandPacket are invalid. + The SCSI Request Packet was not sent, so no additional status information is available. @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet - is not supported by the SCSI initiator(i.e., SCSI + is not supported by the SCSI initiator(i.e., SCSI Host Controller). The SCSI Request Packet was not - sent, so no additional status information is + sent, so no additional status information is available. - @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI + @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute. See HostAdapterStatus, - TargetStatus, SenseDataLength, and SenseData in + TargetStatus, SenseDataLength, and SenseData in that order for additional status information. **/ EFI_STATUS @@ -973,10 +973,10 @@ ScsiExecuteSCSICommand ( UINT8 Target[TARGET_MAX_BYTES]; EFI_EVENT PacketEvent; EFI_EXT_SCSI_PASS_THRU_SCSI_REQUEST_PACKET *ExtRequestPacket; - SCSI_EVENT_DATA EventData; + SCSI_EVENT_DATA EventData; PacketEvent = NULL; - + if (Packet == NULL) { return EFI_INVALID_PARAMETER; } @@ -1258,7 +1258,7 @@ ScsiScanCreateDevice ( return EFI_SUCCESS; ErrorExit: - + // // The memory space for ScsiDevicePath is allocated in // ScsiPassThru->BuildDevicePath() function; It is no longer used @@ -1365,7 +1365,7 @@ DiscoverScsiDevice ( ScsiDeviceFound = FALSE; goto Done; } - + // // Retrieved inquiry data successfully // diff --git a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.h b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.h index babf86f2c3..a637042af7 100644 --- a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.h +++ b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.h @@ -1,7 +1,7 @@ /** @file Header file for SCSI Bus Driver. -Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -41,7 +41,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. typedef union { UINT32 Scsi; - UINT8 ExtScsi[4]; + UINT8 ExtScsi[4]; } SCSI_ID; typedef struct _SCSI_TARGET_ID { @@ -79,7 +79,7 @@ typedef struct _EFI_SCSI_BUS_PROTOCOL { typedef struct _SCSI_BUS_DEVICE { UINTN Signature; EFI_SCSI_BUS_PROTOCOL BusIdentify; - BOOLEAN ExtScsiSupport; + BOOLEAN ExtScsiSupport; EFI_SCSI_PASS_THRU_PROTOCOL *ScsiInterface; EFI_EXT_SCSI_PASS_THRU_PROTOCOL *ExtScsiInterface; EFI_DEVICE_PATH_PROTOCOL *DevicePath; @@ -92,7 +92,7 @@ typedef struct { EFI_HANDLE Handle; EFI_SCSI_IO_PROTOCOL ScsiIo; EFI_DEVICE_PATH_PROTOCOL *DevicePath; - BOOLEAN ExtScsiSupport; + BOOLEAN ExtScsiSupport; EFI_SCSI_PASS_THRU_PROTOCOL *ScsiPassThru; EFI_EXT_SCSI_PASS_THRU_PROTOCOL *ExtScsiPassThru; SCSI_BUS_DEVICE *ScsiBusDeviceData; @@ -174,7 +174,7 @@ SCSIBusDriverBindingStart ( restrictions for this service. DisconnectController() must follow these calling restrictions. If any other agent wishes to call Stop() it must also follow these calling restrictions. - + @param This Protocol instance pointer. @param ControllerHandle Handle of device to stop driver on @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of @@ -327,11 +327,11 @@ ScsiBusComponentNameGetControllerName ( @param This Protocol instance pointer. @param DeviceType A pointer to the device type information retrieved from - the SCSI Controller. + the SCSI Controller. @retval EFI_SUCCESS Retrieves the device type information successfully. @retval EFI_INVALID_PARAMETER The DeviceType is NULL. - + **/ EFI_STATUS EFIAPI @@ -370,7 +370,7 @@ ScsiGetDeviceLocation ( @retval EFI_DEVICE_ERROR Errors encountered when resetting the SCSI bus. @retval EFI_UNSUPPORTED The bus reset operation is not supported by the SCSI Host Controller. - @retval EFI_TIMEOUT A timeout occurred while attempting to reset + @retval EFI_TIMEOUT A timeout occurred while attempting to reset the SCSI bus. **/ EFI_STATUS @@ -400,47 +400,47 @@ ScsiResetDevice ( Sends a SCSI Request Packet to the SCSI Controller for execution. @param This Protocol instance pointer. - @param CommandPacket The SCSI request packet to send to the SCSI + @param CommandPacket The SCSI request packet to send to the SCSI Controller specified by the device handle. @param Event If the SCSI bus where the SCSI device is attached - does not support non-blocking I/O, then Event is - ignored, and blocking I/O is performed. + does not support non-blocking I/O, then Event is + ignored, and blocking I/O is performed. If Event is NULL, then blocking I/O is performed. - If Event is not NULL and non-blocking I/O is + If Event is not NULL and non-blocking I/O is supported, then non-blocking I/O is performed, and Event will be signaled when the SCSI Request Packet completes. - @retval EFI_SUCCESS The SCSI Request Packet was sent by the host - successfully, and TransferLength bytes were - transferred to/from DataBuffer.See - HostAdapterStatus, TargetStatus, + @retval EFI_SUCCESS The SCSI Request Packet was sent by the host + successfully, and TransferLength bytes were + transferred to/from DataBuffer.See + HostAdapterStatus, TargetStatus, SenseDataLength, and SenseData in that order for additional status information. - @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, + @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was executed, but the entire DataBuffer could not be transferred. The actual number of bytes transferred is returned - in TransferLength. See HostAdapterStatus, - TargetStatus, SenseDataLength, and SenseData in + in TransferLength. See HostAdapterStatus, + TargetStatus, SenseDataLength, and SenseData in that order for additional status information. - @retval EFI_NOT_READY The SCSI Request Packet could not be sent because - there are too many SCSI Command Packets already + @retval EFI_NOT_READY The SCSI Request Packet could not be sent because + there are too many SCSI Command Packets already queued.The caller may retry again later. - @retval EFI_DEVICE_ERROR A device error occurred while attempting to send - the SCSI Request Packet. See HostAdapterStatus, - TargetStatus, SenseDataLength, and SenseData in + @retval EFI_DEVICE_ERROR A device error occurred while attempting to send + the SCSI Request Packet. See HostAdapterStatus, + TargetStatus, SenseDataLength, and SenseData in that order for additional status information. - @retval EFI_INVALID_PARAMETER The contents of CommandPacket are invalid. - The SCSI Request Packet was not sent, so no + @retval EFI_INVALID_PARAMETER The contents of CommandPacket are invalid. + The SCSI Request Packet was not sent, so no additional status information is available. @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet - is not supported by the SCSI initiator(i.e., SCSI + is not supported by the SCSI initiator(i.e., SCSI Host Controller). The SCSI Request Packet was not - sent, so no additional status information is + sent, so no additional status information is available. - @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI + @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute. See HostAdapterStatus, - TargetStatus, SenseDataLength, and SenseData in + TargetStatus, SenseDataLength, and SenseData in that order for additional status information. **/ EFI_STATUS diff --git a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.uni b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.uni index d1a338ba4e..122c1a4625 100644 --- a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.uni +++ b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBus.uni @@ -4,13 +4,13 @@ // Note that the driver will install the Device Path Protocol and SCSI I/O Protocol on // these handles. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf index 18ffd88d89..abcd267668 100644 --- a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf +++ b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusDxe.inf @@ -2,16 +2,16 @@ # The SCSI bus driver scans all SCSI devices and creates a device handle for each of them. # Note that the driver will install the Device Path Protocol and SCSI I/O Protocol on # these handles. -# -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+# +# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# +# ## [Defines] @@ -29,7 +29,7 @@ # # VALID_ARCHITECTURES = IA32 X64 IPF EBC # -# DRIVER_BINDING = gSCSIBusDriverBinding +# DRIVER_BINDING = gSCSIBusDriverBinding # COMPONENT_NAME = gScsiBusComponentName # COMPONENT_NAME2 = gScsiBusComponentName2 # diff --git a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusExtra.uni b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusExtra.uni index bc09a5e327..29b08bcffd 100644 --- a/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusExtra.uni +++ b/MdeModulePkg/Bus/Scsi/ScsiBusDxe/ScsiBusExtra.uni @@ -1,7 +1,7 @@ // /** @file // ScsiBus Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "SCSI Bus DXE Driver" diff --git a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ComponentName.c b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ComponentName.c index 08b71d08f3..f2da7af8fb 100644 --- a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ComponentName.c +++ b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ComponentName.c @@ -1,7 +1,7 @@ /** @file UEFI Component Name(2) protocol implementation for SCSI disk driver. -Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -183,7 +183,7 @@ ScsiDiskComponentNameGetControllerName ( if (ChildHandle != NULL) { return EFI_UNSUPPORTED; } - + // // Make sure this driver is currently managing ControllerHandle // diff --git a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c index 6a0a193556..0d63c85e44 100644 --- a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c +++ b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.c @@ -1,7 +1,7 @@ /** @file SCSI disk driver that layers on every SCSI IO protocol in the system. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -79,9 +79,9 @@ FreeAlignedBuffer ( The user code starts with this function. - @param ImageHandle The firmware allocated handle for the EFI image. + @param ImageHandle The firmware allocated handle for the EFI image. @param SystemTable A pointer to the EFI System Table. - + @retval EFI_SUCCESS The entry point is executed successfully. @retval other Some error occurs when executing this entry point. @@ -356,7 +356,7 @@ ScsiDiskDriverBindingStart ( ); return EFI_SUCCESS; } - } + } } gBS->FreePool (ScsiDiskDevice->SenseData); @@ -368,7 +368,7 @@ ScsiDiskDriverBindingStart ( Controller ); return Status; - + } @@ -380,7 +380,7 @@ ScsiDiskDriverBindingStart ( restrictions for this service. DisconnectController() must follow these calling restrictions. If any other agent wishes to call Stop() it must also follow these calling restrictions. - + @param This Protocol instance pointer. @param ControllerHandle Handle of device to stop driver on @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of @@ -1720,7 +1720,7 @@ Done: @param ScsiDiskDevice The pointer of SCSI_DISK_DEV @param MustReadCapacity The flag about reading device capacity - @param MediaChange The pointer of flag indicates if media has changed + @param MediaChange The pointer of flag indicates if media has changed @retval EFI_DEVICE_ERROR Indicates that error occurs @retval EFI_SUCCESS Successfully to detect media @@ -1855,7 +1855,7 @@ ScsiDiskDetectMedia ( } else { break; } - } else { + } else { Retry++; if (!NeedRetry || (Retry >= MaxRetry)) { goto EXIT; @@ -2059,7 +2059,7 @@ ScsiDiskInquiryDevice ( EFI_SCSI_PAGE_CODE_BLOCK_LIMITS_VPD ); if (!EFI_ERROR (Status)) { - ScsiDiskDevice->BlkIo.Media->OptimalTransferLengthGranularity = + ScsiDiskDevice->BlkIo.Media->OptimalTransferLengthGranularity = (BlockLimits->OptimalTransferLengthGranularity2 << 8) | BlockLimits->OptimalTransferLengthGranularity1; @@ -2111,7 +2111,7 @@ ScsiDiskInquiryDevice ( } else if (Status == EFI_NOT_READY) { *NeedRetry = TRUE; return EFI_DEVICE_ERROR; - + } else if ((Status == EFI_INVALID_PARAMETER) || (Status == EFI_UNSUPPORTED)) { *NeedRetry = FALSE; return EFI_DEVICE_ERROR; @@ -2147,7 +2147,7 @@ ScsiDiskInquiryDevice ( *NeedRetry = FALSE; return EFI_DEVICE_ERROR; } - + // // if goes here, meant ScsiInquiryCommand() failed. // if ScsiDiskRequestSenseKeys() succeeds at last, @@ -2303,7 +2303,7 @@ ScsiDiskTestUnitReady ( @param ScsiDiskDevice The pointer of SCSI_DISK_DEV @param SenseData The pointer of EFI_SCSI_SENSE_DATA - @param NumberOfSenseKeys The number of sense key + @param NumberOfSenseKeys The number of sense key @param Action The pointer of action which indicates what is need to do next @retval EFI_DEVICE_ERROR Indicates that error occurs @@ -2444,7 +2444,7 @@ ScsiDiskReadCapacity ( *NeedRetry = FALSE; // - // submit Read Capacity(10) Command. If it returns capacity of FFFFFFFFh, + // submit Read Capacity(10) Command. If it returns capacity of FFFFFFFFh, // 16 byte command should be used to access large hard disk >2TB // CommandStatus = ScsiReadCapacityCommand ( @@ -2508,12 +2508,12 @@ ScsiDiskReadCapacity ( // go ahead to check HostAdapterStatus and TargetStatus // (EFI_TIMEOUT, EFI_DEVICE_ERROR, EFI_WARN_BUFFER_TOO_SMALL) // - + Status = CheckHostAdapterStatus (HostAdapterStatus); if ((Status == EFI_TIMEOUT) || (Status == EFI_NOT_READY)) { *NeedRetry = TRUE; return EFI_DEVICE_ERROR; - + } else if (Status == EFI_DEVICE_ERROR) { // // reset the scsi channel @@ -2536,7 +2536,7 @@ ScsiDiskReadCapacity ( *NeedRetry = FALSE; return EFI_DEVICE_ERROR; } - + // // if goes here, meant ScsiReadCapacityCommand() failed. // if ScsiDiskRequestSenseKeys() succeeds at last, @@ -2616,7 +2616,7 @@ CheckHostAdapterStatus ( @param TargetStatus Target status @retval EFI_NOT_READY Device is NOT ready. - @retval EFI_DEVICE_ERROR + @retval EFI_DEVICE_ERROR @retval EFI_SUCCESS **/ @@ -2708,20 +2708,20 @@ ScsiDiskRequestSenseKeys ( ); if ((Status == EFI_SUCCESS) || (Status == EFI_WARN_BUFFER_TOO_SMALL)) { FallStatus = EFI_SUCCESS; - + } else if ((Status == EFI_TIMEOUT) || (Status == EFI_NOT_READY)) { *NeedRetry = TRUE; FallStatus = EFI_DEVICE_ERROR; - + } else if ((Status == EFI_INVALID_PARAMETER) || (Status == EFI_UNSUPPORTED)) { *NeedRetry = FALSE; FallStatus = EFI_DEVICE_ERROR; - + } else if (Status == EFI_DEVICE_ERROR) { if (AskResetIfError) { ScsiDiskDevice->ScsiIo->ResetDevice (ScsiDiskDevice->ScsiIo); } - + FallStatus = EFI_DEVICE_ERROR; } @@ -2743,7 +2743,7 @@ ScsiDiskRequestSenseKeys ( // no more sense key or number of sense keys exceeds predefined, // skip the loop. // - if ((PtrSenseData->Sense_Key == EFI_SCSI_SK_NO_SENSE) || + if ((PtrSenseData->Sense_Key == EFI_SCSI_SK_NO_SENSE) || (*NumberOfSenseKeys == ScsiDiskDevice->SenseDataNumber)) { SenseReq = FALSE; } @@ -2777,9 +2777,9 @@ GetMediaInfo ( (Capacity10->LastLba2 << 16) | (Capacity10->LastLba1 << 8) | Capacity10->LastLba0; - + ScsiDiskDevice->BlkIo.Media->BlockSize = (Capacity10->BlockSize3 << 24) | - (Capacity10->BlockSize2 << 16) | + (Capacity10->BlockSize2 << 16) | (Capacity10->BlockSize1 << 8) | Capacity10->BlockSize0; ScsiDiskDevice->BlkIo.Media->LowestAlignedLba = 0; @@ -2799,7 +2799,7 @@ GetMediaInfo ( *Ptr = Capacity16->LastLba7; ScsiDiskDevice->BlkIo.Media->BlockSize = (Capacity16->BlockSize3 << 24) | - (Capacity16->BlockSize2 << 16) | + (Capacity16->BlockSize2 << 16) | (Capacity16->BlockSize1 << 8) | Capacity16->BlockSize0; @@ -2870,7 +2870,7 @@ ScsiDiskReadSectors ( BlocksRemaining = NumberOfBlocks; BlockSize = ScsiDiskDevice->BlkIo.Media->BlockSize; - + // // limit the data bytes that can be transferred by one Read(10) or Read(16) Command // @@ -3114,7 +3114,7 @@ ScsiDiskWriteSectors ( &ByteCount, Lba, SectorCount - ); + ); } if (!EFI_ERROR (Status)) { break; @@ -4994,7 +4994,7 @@ ScsiDiskIsHardwareError ( SensePtr = SenseData; for (Index = 0; Index < SenseCounts; Index++) { - + // // Sense Key is EFI_SCSI_SK_HARDWARE_ERROR (0x4) // @@ -5071,7 +5071,7 @@ ScsiDiskIsResetBefore ( SensePtr = SenseData; for (Index = 0; Index < SenseCounts; Index++) { - + // // Sense Key is EFI_SCSI_SK_UNIT_ATTENTION (0x6) // Additional Sense Code is EFI_SCSI_ASC_RESET (0x29) @@ -5092,7 +5092,7 @@ ScsiDiskIsResetBefore ( @param SenseData The pointer of EFI_SCSI_SENSE_DATA @param SenseCounts The number of sense key - @param RetryLater The flag means if need a retry + @param RetryLater The flag means if need a retry @retval TRUE Drive is ready. @retval FALSE Drive is NOT ready. @@ -5187,7 +5187,7 @@ ScsiDiskHaveSenseKey ( SensePtr = SenseData; for (Index = 0; Index < SenseCounts; Index++) { - + // // Sense Key is SK_NO_SENSE (0x0) // @@ -5234,18 +5234,18 @@ ReleaseScsiDiskDeviceResources ( /** Determine if Block Io & Block Io2 should be produced. - + @param ChildHandle Child Handle to retrieve Parent information. - + @retval TRUE Should produce Block Io & Block Io2. @retval FALSE Should not produce Block Io & Block Io2. -**/ +**/ BOOLEAN DetermineInstallBlockIo ( IN EFI_HANDLE ChildHandle - ) + ) { EFI_SCSI_PASS_THRU_PROTOCOL *ScsiPassThru; EFI_EXT_SCSI_PASS_THRU_PROTOCOL *ExtScsiPassThru; @@ -5271,7 +5271,7 @@ DetermineInstallBlockIo ( return TRUE; } } - + return FALSE; } @@ -5280,23 +5280,23 @@ DetermineInstallBlockIo ( specified by ProtocolGuid is present on a ControllerHandle and opened by ChildHandle with an attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER. If the ControllerHandle is found, then the protocol specified by ProtocolGuid - will be opened on it. - + will be opened on it. + @param ProtocolGuid ProtocolGuid pointer. @param ChildHandle Child Handle to retrieve Parent information. - -**/ + +**/ VOID * EFIAPI GetParentProtocol ( IN EFI_GUID *ProtocolGuid, IN EFI_HANDLE ChildHandle - ) + ) { UINTN Index; UINTN HandleCount; - VOID *Interface; + VOID *Interface; EFI_STATUS Status; EFI_HANDLE *HandleBuffer; @@ -5316,7 +5316,7 @@ GetParentProtocol ( } // - // Iterate to find who is parent handle that is opened with ProtocolGuid by ChildHandle + // Iterate to find who is parent handle that is opened with ProtocolGuid by ChildHandle // for (Index = 0; Index < HandleCount; Index++) { Status = EfiTestChildHandle (HandleBuffer[Index], ChildHandle, ProtocolGuid); @@ -5331,7 +5331,7 @@ GetParentProtocol ( gBS->FreePool (HandleBuffer); return NULL; -} +} /** Determine if EFI Erase Block Protocol should be produced. @@ -5468,7 +5468,7 @@ Done: /** Provides inquiry information for the controller type. - + This function is used by the IDE bus driver to get inquiry data. Data format of Identify data is defined by the Interface GUID. @@ -5477,9 +5477,9 @@ Done: @param[in, out] InquiryDataSize Pointer to the value for the inquiry data size. @retval EFI_SUCCESS The command was accepted without any errors. - @retval EFI_NOT_FOUND Device does not support this data class - @retval EFI_DEVICE_ERROR Error reading InquiryData from device - @retval EFI_BUFFER_TOO_SMALL InquiryDataSize not big enough + @retval EFI_NOT_FOUND Device does not support this data class + @retval EFI_DEVICE_ERROR Error reading InquiryData from device + @retval EFI_BUFFER_TOO_SMALL InquiryDataSize not big enough **/ EFI_STATUS @@ -5511,16 +5511,16 @@ ScsiDiskInfoInquiry ( This function is used by the IDE bus driver to get identify data. Data format of Identify data is defined by the Interface GUID. - @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL + @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance. @param[in, out] IdentifyData Pointer to a buffer for the identify data. @param[in, out] IdentifyDataSize Pointer to the value for the identify data size. @retval EFI_SUCCESS The command was accepted without any errors. - @retval EFI_NOT_FOUND Device does not support this data class - @retval EFI_DEVICE_ERROR Error reading IdentifyData from device - @retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough + @retval EFI_NOT_FOUND Device does not support this data class + @retval EFI_DEVICE_ERROR Error reading IdentifyData from device + @retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough **/ EFI_STATUS @@ -5536,7 +5536,7 @@ ScsiDiskInfoIdentify ( if (CompareGuid (&This->Interface, &gEfiDiskInfoScsiInterfaceGuid) || CompareGuid (&This->Interface, &gEfiDiskInfoUfsInterfaceGuid)) { // - // Physical SCSI bus does not support this data class. + // Physical SCSI bus does not support this data class. // return EFI_NOT_FOUND; } @@ -5554,8 +5554,8 @@ ScsiDiskInfoIdentify ( /** Provides sense data information for the controller type. - - This function is used by the IDE bus driver to get sense data. + + This function is used by the IDE bus driver to get sense data. Data format of Sense data is defined by the Interface GUID. @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance. @@ -5585,7 +5585,7 @@ ScsiDiskInfoSenseData ( /** This function is used by the IDE bus driver to get controller information. - @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance. + @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance. @param[out] IdeChannel Pointer to the Ide Channel number. Primary or secondary. @param[out] IdeDevice Pointer to the Ide Device number. Master or slave. @@ -5626,11 +5626,11 @@ ScsiDiskInfoWhichIde ( via SCSI Request Packet. @param ScsiDiskDevice The pointer of SCSI_DISK_DEV - + @retval EFI_SUCCESS The ATAPI device identify data were retrieved successfully. @retval others Some error occurred during the identification that ATAPI device. -**/ +**/ EFI_STATUS AtapiIdentifyDevice ( IN OUT SCSI_DISK_DEV *ScsiDiskDevice @@ -5666,8 +5666,8 @@ AtapiIdentifyDevice ( @param ScsiDiskDevice The pointer of SCSI_DISK_DEV. @param ChildHandle Child handle to install DiskInfo protocol. - -**/ + +**/ VOID InitializeInstallDiskInfo ( IN SCSI_DISK_DEV *ScsiDiskDevice, @@ -5683,7 +5683,7 @@ InitializeInstallDiskInfo ( Status = gBS->HandleProtocol (ChildHandle, &gEfiDevicePathProtocolGuid, (VOID **) &DevicePathNode); // - // Device Path protocol must be installed on the device handle. + // Device Path protocol must be installed on the device handle. // ASSERT_EFI_ERROR (Status); // @@ -5715,7 +5715,7 @@ InitializeInstallDiskInfo ( ScsiDiskDevice->Channel = AtapiDevicePath->PrimarySecondary; ScsiDiskDevice->Device = AtapiDevicePath->SlaveMaster; // - // Update the DiskInfo.Interface to IDE interface GUID for the physical ATAPI device. + // Update the DiskInfo.Interface to IDE interface GUID for the physical ATAPI device. // CopyGuid (&ScsiDiskDevice->DiskInfo.Interface, &gEfiDiskInfoIdeInterfaceGuid); } else { @@ -5726,7 +5726,7 @@ InitializeInstallDiskInfo ( ScsiDiskDevice->Channel = SataDevicePath->HBAPortNumber; ScsiDiskDevice->Device = SataDevicePath->PortMultiplierPortNumber; // - // Update the DiskInfo.Interface to AHCI interface GUID for the physical AHCI device. + // Update the DiskInfo.Interface to AHCI interface GUID for the physical AHCI device. // CopyGuid (&ScsiDiskDevice->DiskInfo.Interface, &gEfiDiskInfoAhciInterfaceGuid); } diff --git a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.h b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.h index 6e9f032bb8..bb6232676d 100644 --- a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.h +++ b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.h @@ -1,7 +1,7 @@ /** @file Header file for SCSI Disk Driver. -Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -86,7 +86,7 @@ typedef struct { // SCSI_UNMAP_PARAM_INFO UnmapInfo; BOOLEAN BlockLimitsVpdSupported; - + // // The flag indicates if 16-byte command can be used // @@ -251,7 +251,7 @@ ScsiDiskDriverBindingStart ( restrictions for this service. DisconnectController() must follow these calling restrictions. If any other agent wishes to call Stop() it must also follow these calling restrictions. - + @param This Protocol instance pointer. @param ControllerHandle Handle of device to stop driver on @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of @@ -646,7 +646,7 @@ ScsiDiskEraseBlocks ( /** Provides inquiry information for the controller type. - + This function is used by the IDE bus driver to get inquiry data. Data format of Identify data is defined by the Interface GUID. @@ -655,9 +655,9 @@ ScsiDiskEraseBlocks ( @param[in, out] InquiryDataSize Pointer to the value for the inquiry data size. @retval EFI_SUCCESS The command was accepted without any errors. - @retval EFI_NOT_FOUND Device does not support this data class - @retval EFI_DEVICE_ERROR Error reading InquiryData from device - @retval EFI_BUFFER_TOO_SMALL InquiryDataSize not big enough + @retval EFI_NOT_FOUND Device does not support this data class + @retval EFI_DEVICE_ERROR Error reading InquiryData from device + @retval EFI_BUFFER_TOO_SMALL InquiryDataSize not big enough **/ EFI_STATUS @@ -675,16 +675,16 @@ ScsiDiskInfoInquiry ( This function is used by the IDE bus driver to get identify data. Data format of Identify data is defined by the Interface GUID. - @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL + @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance. @param[in, out] IdentifyData Pointer to a buffer for the identify data. @param[in, out] IdentifyDataSize Pointer to the value for the identify data size. @retval EFI_SUCCESS The command was accepted without any errors. - @retval EFI_NOT_FOUND Device does not support this data class - @retval EFI_DEVICE_ERROR Error reading IdentifyData from device - @retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough + @retval EFI_NOT_FOUND Device does not support this data class + @retval EFI_DEVICE_ERROR Error reading IdentifyData from device + @retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough **/ EFI_STATUS @@ -698,8 +698,8 @@ ScsiDiskInfoIdentify ( /** Provides sense data information for the controller type. - - This function is used by the IDE bus driver to get sense data. + + This function is used by the IDE bus driver to get sense data. Data format of Sense data is defined by the Interface GUID. @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance. @@ -725,7 +725,7 @@ ScsiDiskInfoSenseData ( /** This function is used by the IDE bus driver to get controller information. - @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance. + @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance. @param[out] IdeChannel Pointer to the Ide Channel number. Primary or secondary. @param[out] IdeDevice Pointer to the Ide Device number. Master or slave. @@ -747,7 +747,7 @@ ScsiDiskInfoWhichIde ( @param ScsiDiskDevice The pointer of SCSI_DISK_DEV @param MustReadCapacity The flag about reading device capacity - @param MediaChange The pointer of flag indicates if media has changed + @param MediaChange The pointer of flag indicates if media has changed @retval EFI_DEVICE_ERROR Indicates that error occurs @retval EFI_SUCCESS Successfully to detect media @@ -790,7 +790,7 @@ ScsiDiskTestUnitReady ( @param ScsiDiskDevice The pointer of SCSI_DISK_DEV @param SenseData The pointer of EFI_SCSI_SENSE_DATA - @param NumberOfSenseKeys The number of sense key + @param NumberOfSenseKeys The number of sense key @param Action The pointer of action which indicates what is need to do next @retval EFI_DEVICE_ERROR Indicates that error occurs @@ -849,7 +849,7 @@ CheckHostAdapterStatus ( @param TargetStatus Target status @retval EFI_NOT_READY Device is NOT ready. - @retval EFI_DEVICE_ERROR + @retval EFI_DEVICE_ERROR @retval EFI_SUCCESS **/ @@ -1071,7 +1071,7 @@ ScsiDiskRead16 ( IN UINT64 StartLba, IN UINT32 SectorCount ); - + /** Submit Write(16) Command. @@ -1095,7 +1095,7 @@ ScsiDiskWrite16 ( IN OUT UINT32 *DataLength, IN UINT64 StartLba, IN UINT32 SectorCount - ); + ); /** Submit Async Read(10) command. @@ -1326,7 +1326,7 @@ ScsiDiskIsResetBefore ( @param SenseData The pointer of EFI_SCSI_SENSE_DATA @param SenseCounts The number of sense key - @param RetryLater The flag means if need a retry + @param RetryLater The flag means if need a retry @retval TRUE Drive is ready. @retval FALSE Drive is NOT ready. @@ -1368,14 +1368,14 @@ ReleaseScsiDiskDeviceResources ( /** Determine if Block Io should be produced. - + @param ChildHandle Child Handle to retrieve Parent information. - + @retval TRUE Should produce Block Io. @retval FALSE Should not produce Block Io. -**/ +**/ BOOLEAN DetermineInstallBlockIo ( IN EFI_HANDLE ChildHandle @@ -1391,26 +1391,26 @@ DetermineInstallBlockIo ( @param ScsiDiskDevice The pointer of SCSI_DISK_DEV. @param ChildHandle Child handle to install DiskInfo protocol. - -**/ + +**/ VOID InitializeInstallDiskInfo ( IN SCSI_DISK_DEV *ScsiDiskDevice, IN EFI_HANDLE ChildHandle - ); + ); /** Search protocol database and check to see if the protocol specified by ProtocolGuid is present on a ControllerHandle and opened by ChildHandle with an attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER. If the ControllerHandle is found, then the protocol specified by ProtocolGuid - will be opened on it. - + will be opened on it. + @param ProtocolGuid ProtocolGuid pointer. @param ChildHandle Child Handle to retrieve Parent information. - -**/ + +**/ VOID * EFIAPI GetParentProtocol ( diff --git a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.uni b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.uni index 73f8096cf6..a5db55ca79 100644 --- a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.uni +++ b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDisk.uni @@ -3,13 +3,13 @@ // // It detects the SCSI disk media and installs Block I/O Protocol on the device handle. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf index 3fbc589236..397d314272 100644 --- a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf +++ b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskDxe.inf @@ -2,16 +2,16 @@ # The Scsi Disk driver is used to retrieve the media info in the attached SCSI disk. # It detects the SCSI disk media and installs Block I/O and Block I/O2 Protocol on # the device handle. -# -# Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+# +# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# +# ## [Defines] diff --git a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskExtra.uni b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskExtra.uni index 2c7fdfbd67..08b0e37d0f 100644 --- a/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskExtra.uni +++ b/MdeModulePkg/Bus/Scsi/ScsiDiskDxe/ScsiDiskExtra.uni @@ -1,7 +1,7 @@ // /** @file // ScsiDisk Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "SCSI Disk DXE Driver" diff --git a/MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.c b/MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.c index 4ebced0b94..2ed4d2e781 100644 --- a/MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.c +++ b/MdeModulePkg/Bus/Sd/EmmcDxe/EmmcDxe.c @@ -4,7 +4,7 @@ It produces BlockIo, BlockIo2 and StorageSecurity protocols to allow upper layer access the EMMC device. - Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.
+ Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -505,7 +505,7 @@ InstallProtocolOnPartition ( Device->Private->DriverBindingHandle, Partition->Handle, EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER - ); + ); } } else { diff --git a/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsBlockIoPei.c b/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsBlockIoPei.c index 9282309e84..505b92cfc1 100644 --- a/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsBlockIoPei.c +++ b/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsBlockIoPei.c @@ -1,6 +1,6 @@ /** @file - Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.
+ Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -153,10 +153,10 @@ UFS_PEIM_HC_PRIVATE_DATA gUfsHcPeimTemplate = { EFI_STATUS UfsPeimRequestSense ( IN UFS_PEIM_HC_PRIVATE_DATA *Private, - IN UINTN Lun, + IN UINTN Lun, OUT VOID *DataBuffer, OUT UINT32 *DataBufferLength - ) + ) { UFS_SCSI_REQUEST_PACKET Packet; UINT8 Cdb[UFS_SCSI_OP_LENGTH_SIX]; @@ -201,10 +201,10 @@ UfsPeimRequestSense ( EFI_STATUS UfsPeimTestUnitReady ( IN UFS_PEIM_HC_PRIVATE_DATA *Private, - IN UINTN Lun, + IN UINTN Lun, OUT VOID *SenseData, OPTIONAL OUT UINT8 *SenseDataLength - ) + ) { UFS_SCSI_REQUEST_PACKET Packet; UINT8 Cdb[UFS_SCSI_OP_LENGTH_SIX]; @@ -254,7 +254,7 @@ UfsPeimInquiry ( OUT UINT32 *InquiryLength, OUT VOID *SenseData, OPTIONAL OUT UINT8 *SenseDataLength - ) + ) { UFS_SCSI_REQUEST_PACKET Packet; UINT8 Cdb[UFS_SCSI_OP_LENGTH_SIX]; @@ -311,7 +311,7 @@ UfsPeimReadCapacity ( OUT UINT32 *DataLength, OUT VOID *SenseData, OPTIONAL OUT UINT8 *SenseDataLength - ) + ) { UFS_SCSI_REQUEST_PACKET Packet; UINT8 Cdb[UFS_SCSI_OP_LENGTH_TEN]; @@ -367,7 +367,7 @@ UfsPeimReadCapacity16 ( OUT UINT32 *DataLength, OUT VOID *SenseData, OPTIONAL OUT UINT8 *SenseDataLength - ) + ) { UFS_SCSI_REQUEST_PACKET Packet; UINT8 Cdb[UFS_SCSI_OP_LENGTH_SIXTEEN]; @@ -429,7 +429,7 @@ UfsPeimRead10 ( OUT UINT32 *DataLength, OUT VOID *SenseData, OPTIONAL OUT UINT8 *SenseDataLength - ) + ) { UFS_SCSI_REQUEST_PACKET Packet; UINT8 Cdb[UFS_SCSI_OP_LENGTH_TEN]; @@ -491,7 +491,7 @@ UfsPeimRead16 ( OUT UINT32 *DataLength, OUT VOID *SenseData, OPTIONAL OUT UINT8 *SenseDataLength - ) + ) { UFS_SCSI_REQUEST_PACKET Packet; UINT8 Cdb[UFS_SCSI_OP_LENGTH_SIXTEEN]; @@ -597,16 +597,16 @@ UfsPeimParsingSenseKeys ( /** Gets the count of block I/O devices that one specific block driver detects. - This function is used for getting the count of block I/O devices that one + This function is used for getting the count of block I/O devices that one specific block driver detects. To the PEI ATAPI driver, it returns the number - of all the detected ATAPI devices it detects during the enumeration process. - To the PEI legacy floppy driver, it returns the number of all the legacy - devices it finds during its enumeration process. If no device is detected, - then the function will return zero. - - @param[in] PeiServices General-purpose services that are available + of all the detected ATAPI devices it detects during the enumeration process. + To the PEI legacy floppy driver, it returns the number of all the legacy + devices it finds during its enumeration process. If no device is detected, + then the function will return zero. + + @param[in] PeiServices General-purpose services that are available to every PEIM. - @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI + @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI instance. @param[out] NumberBlockDevices The number of block I/O devices discovered. @@ -633,41 +633,41 @@ UfsBlockIoPeimGetDeviceNo ( /** Gets a block device's media information. - This function will provide the caller with the specified block device's media - information. If the media changes, calling this function will update the media + This function will provide the caller with the specified block device's media + information. If the media changes, calling this function will update the media information accordingly. @param[in] PeiServices General-purpose services that are available to every PEIM @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI instance. - @param[in] DeviceIndex Specifies the block device to which the function wants - to talk. Because the driver that implements Block I/O - PPIs will manage multiple block devices, the PPIs that - want to talk to a single device must specify the + @param[in] DeviceIndex Specifies the block device to which the function wants + to talk. Because the driver that implements Block I/O + PPIs will manage multiple block devices, the PPIs that + want to talk to a single device must specify the device index that was assigned during the enumeration - process. This index is a number from one to + process. This index is a number from one to NumberBlockDevices. - @param[out] MediaInfo The media information of the specified block media. - The caller is responsible for the ownership of this + @param[out] MediaInfo The media information of the specified block media. + The caller is responsible for the ownership of this data structure. - @par Note: - The MediaInfo structure describes an enumeration of possible block device - types. This enumeration exists because no device paths are actually passed - across interfaces that describe the type or class of hardware that is publishing + @par Note: + The MediaInfo structure describes an enumeration of possible block device + types. This enumeration exists because no device paths are actually passed + across interfaces that describe the type or class of hardware that is publishing the block I/O interface. This enumeration will allow for policy decisions - in the Recovery PEIM, such as "Try to recover from legacy floppy first, - LS-120 second, CD-ROM third." If there are multiple partitions abstracted - by a given device type, they should be reported in ascending order; this - order also applies to nested partitions, such as legacy MBR, where the - outermost partitions would have precedence in the reporting order. The - same logic applies to systems such as IDE that have precedence relationships - like "Master/Slave" or "Primary/Secondary". The master device should be + in the Recovery PEIM, such as "Try to recover from legacy floppy first, + LS-120 second, CD-ROM third." If there are multiple partitions abstracted + by a given device type, they should be reported in ascending order; this + order also applies to nested partitions, such as legacy MBR, where the + outermost partitions would have precedence in the reporting order. The + same logic applies to systems such as IDE that have precedence relationships + like "Master/Slave" or "Primary/Secondary". The master device should be reported first, the slave second. - - @retval EFI_SUCCESS Media information about the specified block device + + @retval EFI_SUCCESS Media information about the specified block device was obtained successfully. - @retval EFI_DEVICE_ERROR Cannot get the media information due to a hardware + @retval EFI_DEVICE_ERROR Cannot get the media information due to a hardware error. **/ @@ -687,7 +687,7 @@ UfsBlockIoPeimGetMediaInfo ( EFI_SCSI_DISK_CAPACITY_DATA Capacity; EFI_SCSI_DISK_CAPACITY_DATA16 Capacity16; UINTN DataLength; - BOOLEAN NeedRetry; + BOOLEAN NeedRetry; Private = GET_UFS_PEIM_HC_PRIVATE_DATA_FROM_THIS (This); NeedRetry = TRUE; @@ -717,7 +717,7 @@ UfsBlockIoPeimGetMediaInfo ( if (!EFI_ERROR (Status)) { break; } - + if (SenseDataLength == 0) { continue; } @@ -763,31 +763,31 @@ UfsBlockIoPeimGetMediaInfo ( /** Reads the requested number of blocks from the specified block device. - The function reads the requested number of blocks from the device. All the + The function reads the requested number of blocks from the device. All the blocks are read, or an error is returned. If there is no media in the device, the function returns EFI_NO_MEDIA. - @param[in] PeiServices General-purpose services that are available to + @param[in] PeiServices General-purpose services that are available to every PEIM. @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI instance. - @param[in] DeviceIndex Specifies the block device to which the function wants - to talk. Because the driver that implements Block I/O - PPIs will manage multiple block devices, PPIs that - want to talk to a single device must specify the device - index that was assigned during the enumeration process. + @param[in] DeviceIndex Specifies the block device to which the function wants + to talk. Because the driver that implements Block I/O + PPIs will manage multiple block devices, PPIs that + want to talk to a single device must specify the device + index that was assigned during the enumeration process. This index is a number from one to NumberBlockDevices. @param[in] StartLBA The starting logical block address (LBA) to read from on the device @param[in] BufferSize The size of the Buffer in bytes. This number must be a multiple of the intrinsic block size of the device. @param[out] Buffer A pointer to the destination buffer for the data. - The caller is responsible for the ownership of the + The caller is responsible for the ownership of the buffer. - + @retval EFI_SUCCESS The data was read correctly from the device. - @retval EFI_DEVICE_ERROR The device reported an error while attempting + @retval EFI_DEVICE_ERROR The device reported an error while attempting to perform the read operation. - @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not + @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid, or the buffer is not properly aligned. @retval EFI_NO_MEDIA There is no media in the device. @retval EFI_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of @@ -811,7 +811,7 @@ UfsBlockIoPeimReadBlocks ( UFS_PEIM_HC_PRIVATE_DATA *Private; EFI_SCSI_SENSE_DATA SenseData; UINT8 SenseDataLength; - BOOLEAN NeedRetry; + BOOLEAN NeedRetry; Status = EFI_SUCCESS; NeedRetry = TRUE; @@ -861,7 +861,7 @@ UfsBlockIoPeimReadBlocks ( if (!EFI_ERROR (Status)) { break; } - + if (SenseDataLength == 0) { continue; } @@ -903,16 +903,16 @@ UfsBlockIoPeimReadBlocks ( /** Gets the count of block I/O devices that one specific block driver detects. - This function is used for getting the count of block I/O devices that one + This function is used for getting the count of block I/O devices that one specific block driver detects. To the PEI ATAPI driver, it returns the number - of all the detected ATAPI devices it detects during the enumeration process. - To the PEI legacy floppy driver, it returns the number of all the legacy - devices it finds during its enumeration process. If no device is detected, - then the function will return zero. - - @param[in] PeiServices General-purpose services that are available + of all the detected ATAPI devices it detects during the enumeration process. + To the PEI legacy floppy driver, it returns the number of all the legacy + devices it finds during its enumeration process. If no device is detected, + then the function will return zero. + + @param[in] PeiServices General-purpose services that are available to every PEIM. - @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO2_PPI + @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO2_PPI instance. @param[out] NumberBlockDevices The number of block I/O devices discovered. @@ -939,41 +939,41 @@ UfsBlockIoPeimGetDeviceNo2 ( /** Gets a block device's media information. - This function will provide the caller with the specified block device's media - information. If the media changes, calling this function will update the media + This function will provide the caller with the specified block device's media + information. If the media changes, calling this function will update the media information accordingly. @param[in] PeiServices General-purpose services that are available to every PEIM @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO2_PPI instance. - @param[in] DeviceIndex Specifies the block device to which the function wants - to talk. Because the driver that implements Block I/O - PPIs will manage multiple block devices, the PPIs that - want to talk to a single device must specify the + @param[in] DeviceIndex Specifies the block device to which the function wants + to talk. Because the driver that implements Block I/O + PPIs will manage multiple block devices, the PPIs that + want to talk to a single device must specify the device index that was assigned during the enumeration - process. This index is a number from one to + process. This index is a number from one to NumberBlockDevices. - @param[out] MediaInfo The media information of the specified block media. - The caller is responsible for the ownership of this + @param[out] MediaInfo The media information of the specified block media. + The caller is responsible for the ownership of this data structure. - @par Note: - The MediaInfo structure describes an enumeration of possible block device - types. This enumeration exists because no device paths are actually passed - across interfaces that describe the type or class of hardware that is publishing + @par Note: + The MediaInfo structure describes an enumeration of possible block device + types. This enumeration exists because no device paths are actually passed + across interfaces that describe the type or class of hardware that is publishing the block I/O interface. This enumeration will allow for policy decisions - in the Recovery PEIM, such as "Try to recover from legacy floppy first, - LS-120 second, CD-ROM third." If there are multiple partitions abstracted - by a given device type, they should be reported in ascending order; this - order also applies to nested partitions, such as legacy MBR, where the - outermost partitions would have precedence in the reporting order. The - same logic applies to systems such as IDE that have precedence relationships - like "Master/Slave" or "Primary/Secondary". The master device should be + in the Recovery PEIM, such as "Try to recover from legacy floppy first, + LS-120 second, CD-ROM third." If there are multiple partitions abstracted + by a given device type, they should be reported in ascending order; this + order also applies to nested partitions, such as legacy MBR, where the + outermost partitions would have precedence in the reporting order. The + same logic applies to systems such as IDE that have precedence relationships + like "Master/Slave" or "Primary/Secondary". The master device should be reported first, the slave second. - - @retval EFI_SUCCESS Media information about the specified block device + + @retval EFI_SUCCESS Media information about the specified block device was obtained successfully. - @retval EFI_DEVICE_ERROR Cannot get the media information due to a hardware + @retval EFI_DEVICE_ERROR Cannot get the media information due to a hardware error. **/ @@ -991,7 +991,7 @@ UfsBlockIoPeimGetMediaInfo2 ( EFI_PEI_BLOCK_IO_MEDIA Media; Private = GET_UFS_PEIM_HC_PRIVATE_DATA_FROM_THIS2 (This); - + Status = UfsBlockIoPeimGetMediaInfo ( PeiServices, &Private->BlkIoPpi, @@ -1009,31 +1009,31 @@ UfsBlockIoPeimGetMediaInfo2 ( /** Reads the requested number of blocks from the specified block device. - The function reads the requested number of blocks from the device. All the + The function reads the requested number of blocks from the device. All the blocks are read, or an error is returned. If there is no media in the device, the function returns EFI_NO_MEDIA. - @param[in] PeiServices General-purpose services that are available to + @param[in] PeiServices General-purpose services that are available to every PEIM. @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO2_PPI instance. - @param[in] DeviceIndex Specifies the block device to which the function wants - to talk. Because the driver that implements Block I/O - PPIs will manage multiple block devices, PPIs that - want to talk to a single device must specify the device - index that was assigned during the enumeration process. + @param[in] DeviceIndex Specifies the block device to which the function wants + to talk. Because the driver that implements Block I/O + PPIs will manage multiple block devices, PPIs that + want to talk to a single device must specify the device + index that was assigned during the enumeration process. This index is a number from one to NumberBlockDevices. @param[in] StartLBA The starting logical block address (LBA) to read from on the device @param[in] BufferSize The size of the Buffer in bytes. This number must be a multiple of the intrinsic block size of the device. @param[out] Buffer A pointer to the destination buffer for the data. - The caller is responsible for the ownership of the + The caller is responsible for the ownership of the buffer. - + @retval EFI_SUCCESS The data was read correctly from the device. - @retval EFI_DEVICE_ERROR The device reported an error while attempting + @retval EFI_DEVICE_ERROR The device reported an error while attempting to perform the read operation. - @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not + @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid, or the buffer is not properly aligned. @retval EFI_NO_MEDIA There is no media in the device. @retval EFI_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of @@ -1052,7 +1052,7 @@ UfsBlockIoPeimReadBlocks2 ( ) { EFI_STATUS Status; - UFS_PEIM_HC_PRIVATE_DATA *Private; + UFS_PEIM_HC_PRIVATE_DATA *Private; Status = EFI_SUCCESS; Private = GET_UFS_PEIM_HC_PRIVATE_DATA_FROM_THIS2 (This); @@ -1118,7 +1118,7 @@ UfsEndOfPei ( /** The user code starts with this function. - + @param FileHandle Handle of the file being invoked. @param PeiServices Describes the list of possible PEI Services. @@ -1205,8 +1205,8 @@ InitializeUfsBlockIoPeim ( // // UFS 2.0 spec Section 13.1.3.3: - // At the end of the UFS Interconnect Layer initialization on both host and device side, - // the host shall send a NOP OUT UPIU to verify that the device UTP Layer is ready. + // At the end of the UFS Interconnect Layer initialization on both host and device side, + // the host shall send a NOP OUT UPIU to verify that the device UTP Layer is ready. // Status = UfsExecNopCmds (Private); if (EFI_ERROR (Status)) { @@ -1241,7 +1241,7 @@ InitializeUfsBlockIoPeim ( DEBUG ((EFI_D_INFO, "Ufs %d Lun %d is enabled\n", Controller, Index)); } } - + PeiServicesInstallPpi (&Private->BlkIoPpiList); PeiServicesNotifyPpi (&Private->EndOfPeiNotifyList); Controller++; diff --git a/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsBlockIoPei.h b/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsBlockIoPei.h index 345947c6b1..3f0d07da8b 100644 --- a/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsBlockIoPei.h +++ b/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsBlockIoPei.h @@ -1,6 +1,6 @@ /** @file - Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.
+ Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -102,7 +102,7 @@ typedef struct { UINT8 SenseDataLength; } UFS_SCSI_REQUEST_PACKET; -typedef struct _UFS_PEIM_HC_PRIVATE_DATA { +typedef struct _UFS_PEIM_HC_PRIVATE_DATA { UINT32 Signature; EFI_HANDLE Controller; @@ -282,16 +282,16 @@ UfsExecNopCmds ( /** Gets the count of block I/O devices that one specific block driver detects. - This function is used for getting the count of block I/O devices that one + This function is used for getting the count of block I/O devices that one specific block driver detects. To the PEI ATAPI driver, it returns the number - of all the detected ATAPI devices it detects during the enumeration process. - To the PEI legacy floppy driver, it returns the number of all the legacy - devices it finds during its enumeration process. If no device is detected, - then the function will return zero. - - @param[in] PeiServices General-purpose services that are available + of all the detected ATAPI devices it detects during the enumeration process. + To the PEI legacy floppy driver, it returns the number of all the legacy + devices it finds during its enumeration process. If no device is detected, + then the function will return zero. + + @param[in] PeiServices General-purpose services that are available to every PEIM. - @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI + @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI instance. @param[out] NumberBlockDevices The number of block I/O devices discovered. @@ -309,41 +309,41 @@ UfsBlockIoPeimGetDeviceNo ( /** Gets a block device's media information. - This function will provide the caller with the specified block device's media - information. If the media changes, calling this function will update the media + This function will provide the caller with the specified block device's media + information. If the media changes, calling this function will update the media information accordingly. @param[in] PeiServices General-purpose services that are available to every PEIM @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI instance. - @param[in] DeviceIndex Specifies the block device to which the function wants - to talk. Because the driver that implements Block I/O - PPIs will manage multiple block devices, the PPIs that - want to talk to a single device must specify the + @param[in] DeviceIndex Specifies the block device to which the function wants + to talk. Because the driver that implements Block I/O + PPIs will manage multiple block devices, the PPIs that + want to talk to a single device must specify the device index that was assigned during the enumeration - process. This index is a number from one to + process. This index is a number from one to NumberBlockDevices. - @param[out] MediaInfo The media information of the specified block media. - The caller is responsible for the ownership of this + @param[out] MediaInfo The media information of the specified block media. + The caller is responsible for the ownership of this data structure. - @par Note: - The MediaInfo structure describes an enumeration of possible block device - types. This enumeration exists because no device paths are actually passed - across interfaces that describe the type or class of hardware that is publishing + @par Note: + The MediaInfo structure describes an enumeration of possible block device + types. This enumeration exists because no device paths are actually passed + across interfaces that describe the type or class of hardware that is publishing the block I/O interface. This enumeration will allow for policy decisions - in the Recovery PEIM, such as "Try to recover from legacy floppy first, - LS-120 second, CD-ROM third." If there are multiple partitions abstracted - by a given device type, they should be reported in ascending order; this - order also applies to nested partitions, such as legacy MBR, where the - outermost partitions would have precedence in the reporting order. The - same logic applies to systems such as IDE that have precedence relationships - like "Master/Slave" or "Primary/Secondary". The master device should be + in the Recovery PEIM, such as "Try to recover from legacy floppy first, + LS-120 second, CD-ROM third." If there are multiple partitions abstracted + by a given device type, they should be reported in ascending order; this + order also applies to nested partitions, such as legacy MBR, where the + outermost partitions would have precedence in the reporting order. The + same logic applies to systems such as IDE that have precedence relationships + like "Master/Slave" or "Primary/Secondary". The master device should be reported first, the slave second. - - @retval EFI_SUCCESS Media information about the specified block device + + @retval EFI_SUCCESS Media information about the specified block device was obtained successfully. - @retval EFI_DEVICE_ERROR Cannot get the media information due to a hardware + @retval EFI_DEVICE_ERROR Cannot get the media information due to a hardware error. **/ @@ -359,31 +359,31 @@ UfsBlockIoPeimGetMediaInfo ( /** Reads the requested number of blocks from the specified block device. - The function reads the requested number of blocks from the device. All the + The function reads the requested number of blocks from the device. All the blocks are read, or an error is returned. If there is no media in the device, the function returns EFI_NO_MEDIA. - @param[in] PeiServices General-purpose services that are available to + @param[in] PeiServices General-purpose services that are available to every PEIM. @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI instance. - @param[in] DeviceIndex Specifies the block device to which the function wants - to talk. Because the driver that implements Block I/O - PPIs will manage multiple block devices, PPIs that - want to talk to a single device must specify the device - index that was assigned during the enumeration process. + @param[in] DeviceIndex Specifies the block device to which the function wants + to talk. Because the driver that implements Block I/O + PPIs will manage multiple block devices, PPIs that + want to talk to a single device must specify the device + index that was assigned during the enumeration process. This index is a number from one to NumberBlockDevices. @param[in] StartLBA The starting logical block address (LBA) to read from on the device @param[in] BufferSize The size of the Buffer in bytes. This number must be a multiple of the intrinsic block size of the device. @param[out] Buffer A pointer to the destination buffer for the data. - The caller is responsible for the ownership of the + The caller is responsible for the ownership of the buffer. - + @retval EFI_SUCCESS The data was read correctly from the device. - @retval EFI_DEVICE_ERROR The device reported an error while attempting + @retval EFI_DEVICE_ERROR The device reported an error while attempting to perform the read operation. - @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not + @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid, or the buffer is not properly aligned. @retval EFI_NO_MEDIA There is no media in the device. @retval EFI_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of @@ -404,16 +404,16 @@ UfsBlockIoPeimReadBlocks ( /** Gets the count of block I/O devices that one specific block driver detects. - This function is used for getting the count of block I/O devices that one + This function is used for getting the count of block I/O devices that one specific block driver detects. To the PEI ATAPI driver, it returns the number - of all the detected ATAPI devices it detects during the enumeration process. - To the PEI legacy floppy driver, it returns the number of all the legacy - devices it finds during its enumeration process. If no device is detected, - then the function will return zero. - - @param[in] PeiServices General-purpose services that are available + of all the detected ATAPI devices it detects during the enumeration process. + To the PEI legacy floppy driver, it returns the number of all the legacy + devices it finds during its enumeration process. If no device is detected, + then the function will return zero. + + @param[in] PeiServices General-purpose services that are available to every PEIM. - @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO2_PPI + @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO2_PPI instance. @param[out] NumberBlockDevices The number of block I/O devices discovered. @@ -431,41 +431,41 @@ UfsBlockIoPeimGetDeviceNo2 ( /** Gets a block device's media information. - This function will provide the caller with the specified block device's media - information. If the media changes, calling this function will update the media + This function will provide the caller with the specified block device's media + information. If the media changes, calling this function will update the media information accordingly. @param[in] PeiServices General-purpose services that are available to every PEIM @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO2_PPI instance. - @param[in] DeviceIndex Specifies the block device to which the function wants - to talk. Because the driver that implements Block I/O - PPIs will manage multiple block devices, the PPIs that - want to talk to a single device must specify the + @param[in] DeviceIndex Specifies the block device to which the function wants + to talk. Because the driver that implements Block I/O + PPIs will manage multiple block devices, the PPIs that + want to talk to a single device must specify the device index that was assigned during the enumeration - process. This index is a number from one to + process. This index is a number from one to NumberBlockDevices. - @param[out] MediaInfo The media information of the specified block media. - The caller is responsible for the ownership of this + @param[out] MediaInfo The media information of the specified block media. + The caller is responsible for the ownership of this data structure. - @par Note: - The MediaInfo structure describes an enumeration of possible block device - types. This enumeration exists because no device paths are actually passed - across interfaces that describe the type or class of hardware that is publishing + @par Note: + The MediaInfo structure describes an enumeration of possible block device + types. This enumeration exists because no device paths are actually passed + across interfaces that describe the type or class of hardware that is publishing the block I/O interface. This enumeration will allow for policy decisions - in the Recovery PEIM, such as "Try to recover from legacy floppy first, - LS-120 second, CD-ROM third." If there are multiple partitions abstracted - by a given device type, they should be reported in ascending order; this - order also applies to nested partitions, such as legacy MBR, where the - outermost partitions would have precedence in the reporting order. The - same logic applies to systems such as IDE that have precedence relationships - like "Master/Slave" or "Primary/Secondary". The master device should be + in the Recovery PEIM, such as "Try to recover from legacy floppy first, + LS-120 second, CD-ROM third." If there are multiple partitions abstracted + by a given device type, they should be reported in ascending order; this + order also applies to nested partitions, such as legacy MBR, where the + outermost partitions would have precedence in the reporting order. The + same logic applies to systems such as IDE that have precedence relationships + like "Master/Slave" or "Primary/Secondary". The master device should be reported first, the slave second. - - @retval EFI_SUCCESS Media information about the specified block device + + @retval EFI_SUCCESS Media information about the specified block device was obtained successfully. - @retval EFI_DEVICE_ERROR Cannot get the media information due to a hardware + @retval EFI_DEVICE_ERROR Cannot get the media information due to a hardware error. **/ @@ -481,31 +481,31 @@ UfsBlockIoPeimGetMediaInfo2 ( /** Reads the requested number of blocks from the specified block device. - The function reads the requested number of blocks from the device. All the + The function reads the requested number of blocks from the device. All the blocks are read, or an error is returned. If there is no media in the device, the function returns EFI_NO_MEDIA. - @param[in] PeiServices General-purpose services that are available to + @param[in] PeiServices General-purpose services that are available to every PEIM. @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO2_PPI instance. - @param[in] DeviceIndex Specifies the block device to which the function wants - to talk. Because the driver that implements Block I/O - PPIs will manage multiple block devices, PPIs that - want to talk to a single device must specify the device - index that was assigned during the enumeration process. + @param[in] DeviceIndex Specifies the block device to which the function wants + to talk. Because the driver that implements Block I/O + PPIs will manage multiple block devices, PPIs that + want to talk to a single device must specify the device + index that was assigned during the enumeration process. This index is a number from one to NumberBlockDevices. @param[in] StartLBA The starting logical block address (LBA) to read from on the device @param[in] BufferSize The size of the Buffer in bytes. This number must be a multiple of the intrinsic block size of the device. @param[out] Buffer A pointer to the destination buffer for the data. - The caller is responsible for the ownership of the + The caller is responsible for the ownership of the buffer. - + @retval EFI_SUCCESS The data was read correctly from the device. - @retval EFI_DEVICE_ERROR The device reported an error while attempting + @retval EFI_DEVICE_ERROR The device reported an error while attempting to perform the read operation. - @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not + @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid, or the buffer is not properly aligned. @retval EFI_NO_MEDIA There is no media in the device. @retval EFI_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of @@ -525,7 +525,7 @@ UfsBlockIoPeimReadBlocks2 ( /** Initialize the memory management pool for the host controller. - + @param Private The Ufs Peim driver private data. @retval EFI_SUCCESS The memory pool is initialized. @@ -554,7 +554,7 @@ UfsPeimFreeMemPool ( /** Allocate some memory from the host controller's memory pool which can be used to communicate with host controller. - + @param Pool The host controller's memory pool. @param Size Size of the memory to allocate. diff --git a/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsBlockIoPei.uni b/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsBlockIoPei.uni index 04b9f3bfc7..51184439ce 100644 --- a/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsBlockIoPei.uni +++ b/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsBlockIoPei.uni @@ -3,14 +3,14 @@ // // The UfsBlockIoPei driver is used to support recovery from UFS device. // -// Copyright (c) 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions // of the BSD License which accompanies this distribution. The // full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsBlockIoPeiExtra.uni b/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsBlockIoPeiExtra.uni index 0ce3004afd..b56f0bddc4 100644 --- a/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsBlockIoPeiExtra.uni +++ b/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsBlockIoPeiExtra.uni @@ -1,7 +1,7 @@ // /** @file // UfsBlockIoPei Localized Strings and Content // -// Copyright (c) 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions @@ -14,8 +14,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "UFS BlockIo Peim for Recovery" diff --git a/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHcMem.c b/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHcMem.c index b9e3859b35..d69e6e7227 100644 --- a/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHcMem.c +++ b/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHcMem.c @@ -1,7 +1,7 @@ /** @file -Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.
- +Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The @@ -44,17 +44,17 @@ UfsPeimAllocMemBlock ( } ZeroMem ((VOID*)(UINTN)TempPtr, sizeof(UFS_PEIM_MEM_BLOCK)); - + // // each bit in the bit array represents UFS_PEIM_MEM_UNIT // bytes of memory in the memory block. // ASSERT (UFS_PEIM_MEM_UNIT * 8 <= EFI_PAGE_SIZE); - + Block = (UFS_PEIM_MEM_BLOCK*)(UINTN)TempPtr; Block->BufLen = EFI_PAGES_TO_SIZE (Pages); Block->BitsLen = Block->BufLen / (UFS_PEIM_MEM_UNIT * 8); - + Status = PeiServicesAllocatePool (Block->BitsLen, &TempPtr); if (EFI_ERROR (Status)) { return NULL; @@ -158,7 +158,7 @@ UfsPeimAllocMemFromBlock ( if (Available < Units) { return NULL; } - + // // Mark the memory as allocated // @@ -209,7 +209,7 @@ UfsPeimIsMemBlockEmpty ( { UINTN Index; - + for (Index = 0; Index < Block->BitsLen; Index++) { if (Block->Bits[Index] != 0) { return FALSE; @@ -247,7 +247,7 @@ UfsPeimUnlinkMemBlock ( /** Initialize the memory management pool for the host controller. - + @param Private The Ufs Peim driver private data. @retval EFI_SUCCESS The memory pool is initialized. @@ -265,7 +265,7 @@ UfsPeimInitMemPool ( TempPtr = NULL; Pool = NULL; - + Status = PeiServicesAllocatePool (sizeof (UFS_PEIM_MEM_POOL), &TempPtr); if (EFI_ERROR (Status)) { return EFI_OUT_OF_RESOURCES; @@ -287,7 +287,7 @@ UfsPeimInitMemPool ( /** Release the memory management pool. - + @param Pool The memory pool to free. @retval EFI_DEVICE_ERROR Fail to free the memory pool. @@ -320,7 +320,7 @@ UfsPeimFreeMemPool ( /** Allocate some memory from the host controller's memory pool which can be used to communicate with host controller. - + @param Pool The host controller's memory pool. @param Size Size of the memory to allocate. @@ -377,7 +377,7 @@ UfsPeimAllocateMem ( if (NewBlock == NULL) { return NULL; } - + // // Add the new memory block to the pool, then allocate memory from it // diff --git a/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHcMem.h b/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHcMem.h index 60db079721..0b95f0fe56 100644 --- a/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHcMem.h +++ b/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHcMem.h @@ -1,7 +1,7 @@ /** @file -Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.
- +Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The @@ -25,7 +25,7 @@ typedef struct _UFS_PEIM_MEM_BLOCK UFS_PEIM_MEM_BLOCK; struct _UFS_PEIM_MEM_BLOCK { UINT8 *Bits; // Bit array to record which unit is allocated - UINTN BitsLen; + UINTN BitsLen; UINT8 *Buf; UINT8 *BufHost; UINTN BufLen; // Memory size in bytes diff --git a/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHci.c b/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHci.c index 55c7806279..e36ff8c02a 100644 --- a/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHci.c +++ b/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHci.c @@ -1,6 +1,6 @@ /** @file - Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.
+ Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -108,13 +108,13 @@ DumpUicCmdExecResult ( break; case 0x08: DEBUG ((EFI_D_VERBOSE, "UIC configuration command fails - PEER_COMMUNICATION_FAILURE\n")); - break; + break; case 0x09: DEBUG ((EFI_D_VERBOSE, "UIC configuration command fails - BUSY\n")); break; case 0x0A: DEBUG ((EFI_D_VERBOSE, "UIC configuration command fails - DME_FAILURE\n")); - break; + break; default : ASSERT (FALSE); break; @@ -125,7 +125,7 @@ DumpUicCmdExecResult ( break; case 0x01: DEBUG ((EFI_D_VERBOSE, "UIC control command fails - FAILURE\n")); - break; + break; default : ASSERT (FALSE); break; @@ -171,7 +171,7 @@ DumpQueryResponseResult ( break; case 0xFE: DEBUG ((EFI_D_VERBOSE, "Query Response with Invalid Opcode\n")); - break; + break; case 0xFF: DEBUG ((EFI_D_VERBOSE, "Query Response with General Failure\n")); break; @@ -243,7 +243,7 @@ UfsFillTsfOfQueryReqUpiu ( SwapLittleEndianToBigEndian ((UINT8*)&Length, sizeof (Length)); TsfBase->Length = Length; } - + if (Opcode == UtpQueryFuncOpcodeWrAttr) { SwapLittleEndianToBigEndian ((UINT8*)&Value, sizeof (Value)); TsfBase->Value = Value; @@ -731,7 +731,7 @@ VOID UfsStartExecCmd ( IN UFS_PEIM_HC_PRIVATE_DATA *Private, IN UINT8 Slot - ) + ) { UINTN UfsHcBase; UINTN Address; @@ -739,7 +739,7 @@ UfsStartExecCmd ( UfsHcBase = Private->UfsHcBase; - Address = UfsHcBase + UFS_HC_UTRLRSR_OFFSET; + Address = UfsHcBase + UFS_HC_UTRLRSR_OFFSET; Data = MmioRead32 (Address); if ((Data & UFS_HC_UTRLRSR) != UFS_HC_UTRLRSR) { MmioWrite32 (Address, UFS_HC_UTRLRSR); @@ -760,7 +760,7 @@ VOID UfsStopExecCmd ( IN UFS_PEIM_HC_PRIVATE_DATA *Private, IN UINT8 Slot - ) + ) { UINTN UfsHcBase; UINTN Address; @@ -768,10 +768,10 @@ UfsStopExecCmd ( UfsHcBase = Private->UfsHcBase; - Address = UfsHcBase + UFS_HC_UTRLDBR_OFFSET; + Address = UfsHcBase + UFS_HC_UTRLDBR_OFFSET; Data = MmioRead32 (Address); if ((Data & (BIT0 << Slot)) != 0) { - Address = UfsHcBase + UFS_HC_UTRLCLR_OFFSET; + Address = UfsHcBase + UFS_HC_UTRLCLR_OFFSET; Data = MmioRead32 (Address); MmioWrite32 (Address, (Data & ~(BIT0 << Slot))); } @@ -839,7 +839,7 @@ UfsRwDeviceDesc ( if (EFI_ERROR (Status)) { return Status; } - + Trd = ((UTP_TRD*)Private->UtpTrlBase) + Slot; // // Fill transfer request descriptor to this slot. @@ -863,8 +863,8 @@ UfsRwDeviceDesc ( // // Wait for the completion of the transfer request. - // - Address = Private->UfsHcBase + UFS_HC_UTRLDBR_OFFSET; + // + Address = Private->UfsHcBase + UFS_HC_UTRLDBR_OFFSET; Status = UfsWaitMemSet (Address, BIT0 << Slot, 0, Packet.Timeout); if (EFI_ERROR (Status)) { goto Exit; @@ -953,7 +953,7 @@ UfsRwAttributes ( if (EFI_ERROR (Status)) { return Status; } - + Trd = ((UTP_TRD*)Private->UtpTrlBase) + Slot; // // Fill transfer request descriptor to this slot. @@ -977,8 +977,8 @@ UfsRwAttributes ( // // Wait for the completion of the transfer request. - // - Address = Private->UfsHcBase + UFS_HC_UTRLDBR_OFFSET; + // + Address = Private->UfsHcBase + UFS_HC_UTRLDBR_OFFSET; Status = UfsWaitMemSet (Address, BIT0 << Slot, 0, Packet.Timeout); if (EFI_ERROR (Status)) { goto Exit; @@ -1091,8 +1091,8 @@ UfsRwFlags ( // // Wait for the completion of the transfer request. - // - Address = Private->UfsHcBase + UFS_HC_UTRLDBR_OFFSET; + // + Address = Private->UfsHcBase + UFS_HC_UTRLDBR_OFFSET; Status = UfsWaitMemSet (Address, BIT0 << Slot, 0, Packet.Timeout); if (EFI_ERROR (Status)) { goto Exit; @@ -1249,8 +1249,8 @@ UfsExecNopCmds ( // // Wait for the completion of the transfer request. - // - Address = Private->UfsHcBase + UFS_HC_UTRLDBR_OFFSET; + // + Address = Private->UfsHcBase + UFS_HC_UTRLDBR_OFFSET; Status = UfsWaitMemSet (Address, BIT0 << Slot, 0, UFS_TIMEOUT); if (EFI_ERROR (Status)) { goto Exit; @@ -1335,8 +1335,8 @@ UfsExecScsiCmds ( // // Wait for the completion of the transfer request. - // - Address = Private->UfsHcBase + UFS_HC_UTRLDBR_OFFSET; + // + Address = Private->UfsHcBase + UFS_HC_UTRLDBR_OFFSET; Status = UfsWaitMemSet (Address, BIT0 << Slot, 0, Packet->Timeout); if (EFI_ERROR (Status)) { goto Exit; @@ -1348,7 +1348,7 @@ UfsExecScsiCmds ( Response = (UTP_RESPONSE_UPIU*)(CmdDescBase + Trd->RuO * sizeof (UINT32)); SenseDataLen = Response->SenseDataLen; SwapLittleEndianToBigEndian ((UINT8*)&SenseDataLen, sizeof (UINT16)); - + if ((Packet->SenseDataLength != 0) && (Packet->SenseData != NULL)) { CopyMem (Packet->SenseData, Response->SenseData, SenseDataLen); Packet->SenseDataLength = (UINT8)SenseDataLen; @@ -1458,7 +1458,7 @@ UfsExecUicCommands ( // // UFS 2.0 spec section 5.3.1 Offset:0x20 IS.Bit10 UIC Command Completion Status (UCCS) - // This bit is set to '1' by the host controller upon completion of a UIC command. + // This bit is set to '1' by the host controller upon completion of a UIC command. // Address = UfsHcBase + UFS_HC_IS_OFFSET; Data = MmioRead32 (Address); @@ -1481,7 +1481,7 @@ UfsExecUicCommands ( // // Check value of HCS.DP and make sure that there is a device attached to the Link. // - Address = UfsHcBase + UFS_HC_STATUS_OFFSET; + Address = UfsHcBase + UFS_HC_STATUS_OFFSET; Data = MmioRead32 (Address); if ((Data & UFS_HC_HCS_DP) == 0) { Address = UfsHcBase + UFS_HC_IS_OFFSET; @@ -1614,11 +1614,11 @@ UfsInitTaskManagementRequestList ( EFI_PHYSICAL_ADDRESS CmdDescPhyAddr; VOID *CmdDescMapping; EFI_STATUS Status; - + // // Initial h/w and s/w context for future operations. // - Address = Private->UfsHcBase + UFS_HC_CAP_OFFSET; + Address = Private->UfsHcBase + UFS_HC_CAP_OFFSET; Data = MmioRead32 (Address); Private->Capabilities = Data; @@ -1642,9 +1642,9 @@ UfsInitTaskManagementRequestList ( // Program the UTP Task Management Request List Base Address and UTP Task Management // Request List Base Address with a 64-bit address allocated at step 6. // - Address = Private->UfsHcBase + UFS_HC_UTMRLBA_OFFSET; + Address = Private->UfsHcBase + UFS_HC_UTMRLBA_OFFSET; MmioWrite32 (Address, (UINT32)(UINTN)CmdDescPhyAddr); - Address = Private->UfsHcBase + UFS_HC_UTMRLBAU_OFFSET; + Address = Private->UfsHcBase + UFS_HC_UTMRLBAU_OFFSET; MmioWrite32 (Address, (UINT32)RShiftU64 ((UINT64)CmdDescPhyAddr, 32)); Private->UtpTmrlBase = (VOID*)(UINTN)CmdDescHost; Private->Nutmrs = Nutmrs; @@ -1654,7 +1654,7 @@ UfsInitTaskManagementRequestList ( // Enable the UTP Task Management Request List by setting the UTP Task Management // Request List RunStop Register (UTMRLRSR) to '1'. // - Address = Private->UfsHcBase + UFS_HC_UTMRLRSR_OFFSET; + Address = Private->UfsHcBase + UFS_HC_UTMRLRSR_OFFSET; MmioWrite32 (Address, UFS_HC_UTMRLRSR); return EFI_SUCCESS; @@ -1681,11 +1681,11 @@ UfsInitTransferRequestList ( EFI_PHYSICAL_ADDRESS CmdDescPhyAddr; VOID *CmdDescMapping; EFI_STATUS Status; - + // // Initial h/w and s/w context for future operations. // - Address = Private->UfsHcBase + UFS_HC_CAP_OFFSET; + Address = Private->UfsHcBase + UFS_HC_CAP_OFFSET; Data = MmioRead32 (Address); Private->Capabilities = Data; @@ -1709,19 +1709,19 @@ UfsInitTransferRequestList ( // Program the UTP Transfer Request List Base Address and UTP Transfer Request List // Base Address with a 64-bit address allocated at step 8. // - Address = Private->UfsHcBase + UFS_HC_UTRLBA_OFFSET; + Address = Private->UfsHcBase + UFS_HC_UTRLBA_OFFSET; MmioWrite32 (Address, (UINT32)(UINTN)CmdDescPhyAddr); - Address = Private->UfsHcBase + UFS_HC_UTRLBAU_OFFSET; + Address = Private->UfsHcBase + UFS_HC_UTRLBAU_OFFSET; MmioWrite32 (Address, (UINT32)RShiftU64 ((UINT64)CmdDescPhyAddr, 32)); Private->UtpTrlBase = (VOID*)(UINTN)CmdDescHost; Private->Nutrs = Nutrs; Private->TrlMapping = CmdDescMapping; - + // // Enable the UTP Transfer Request List by setting the UTP Transfer Request List // RunStop Register (UTRLRSR) to '1'. // - Address = Private->UfsHcBase + UFS_HC_UTRLRSR_OFFSET; + Address = Private->UfsHcBase + UFS_HC_UTRLRSR_OFFSET; MmioWrite32 (Address, UFS_HC_UTRLRSR); return EFI_SUCCESS; @@ -1803,14 +1803,14 @@ UfsControllerStop ( // Enable the UTP Task Management Request List by setting the UTP Task Management // Request List RunStop Register (UTMRLRSR) to '1'. // - Address = Private->UfsHcBase + UFS_HC_UTMRLRSR_OFFSET; + Address = Private->UfsHcBase + UFS_HC_UTMRLRSR_OFFSET; MmioWrite32 (Address, 0); // // Enable the UTP Transfer Request List by setting the UTP Transfer Request List // RunStop Register (UTRLRSR) to '1'. // - Address = Private->UfsHcBase + UFS_HC_UTRLRSR_OFFSET; + Address = Private->UfsHcBase + UFS_HC_UTRLRSR_OFFSET; MmioWrite32 (Address, 0); // diff --git a/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHci.h b/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHci.h index 0a0cf71894..69fae956ce 100644 --- a/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHci.h +++ b/MdeModulePkg/Bus/Ufs/UfsBlockIoPei/UfsHci.h @@ -2,7 +2,7 @@ UfsPassThruDxe driver is used to produce EFI_EXT_SCSI_PASS_THRU protocol interface for upper layer application to execute UFS-supported SCSI cmds. - Copyright (c) 2014, Intel Corporation. All rights reserved.
+ Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -153,7 +153,7 @@ typedef struct { // UFSHCI 2.0 Spec Section 5.2.5 Offset 18h: AHIT - Auto-Hibernate Idle Timer // typedef struct { - UINT32 Ahitv:10; // Auto-Hibernate Idle Timer Value + UINT32 Ahitv:10; // Auto-Hibernate Idle Timer Value UINT32 Ts:3; // Timer scale UINT32 Rsvd1:19; } UFS_HC_AHIT; @@ -165,19 +165,19 @@ typedef struct { UINT16 Utrcs:1; // UTP Transfer Request Completion Status UINT16 Udepri:1; // UIC DME_ENDPOINT_RESET Indication UINT16 Ue:1; // UIC Error - UINT16 Utms:1; // UIC Test Mode Status + UINT16 Utms:1; // UIC Test Mode Status - UINT16 Upms:1; // UIC Power Mode Status - UINT16 Uhxs:1; // UIC Hibernate Exit Status - UINT16 Uhes:1; // UIC Hibernate Enter Status - UINT16 Ulls:1; // UIC Link Lost Status + UINT16 Upms:1; // UIC Power Mode Status + UINT16 Uhxs:1; // UIC Hibernate Exit Status + UINT16 Uhes:1; // UIC Hibernate Enter Status + UINT16 Ulls:1; // UIC Link Lost Status - UINT16 Ulss:1; // UIC Link Startup Status - UINT16 Utmrcs:1; // UTP Task Management Request Completion Status - UINT16 Uccs:1; // UIC Command Completion Status - UINT16 Dfes:1; // Device Fatal Error Status + UINT16 Ulss:1; // UIC Link Startup Status + UINT16 Utmrcs:1; // UTP Task Management Request Completion Status + UINT16 Uccs:1; // UIC Command Completion Status + UINT16 Dfes:1; // Device Fatal Error Status - UINT16 Utpes:1; // UTP Error Status + UINT16 Utpes:1; // UTP Error Status UINT16 Rsvd1:3; UINT16 Hcfes:1; // Host Controller Fatal Error Status @@ -194,9 +194,9 @@ typedef struct { UINT16 Uee:1; // UIC Error Enable UINT16 Utmse:1; // UIC Test Mode Status Enable - UINT16 Upmse:1; // UIC Power Mode Status Enable + UINT16 Upmse:1; // UIC Power Mode Status Enable UINT16 Uhxse:1; // UIC Hibernate Exit Status Enable - UINT16 Uhese:1; // UIC Hibernate Enter Status Enable + UINT16 Uhese:1; // UIC Hibernate Enter Status Enable UINT16 Ullse:1; // UIC Link Lost Status Enable UINT16 Ulsse:1; // UIC Link Startup Status Enable @@ -450,22 +450,22 @@ typedef struct { // UINT32 Rsvd6:7; UINT32 UcdBa:25; /* UTP Command Descriptor Base Address */ - + // // DW5 // UINT32 UcdBaU; /* UTP Command Descriptor Base Address Upper 32-bits */ - + // // DW6 // - UINT16 RuL; /* Response UPIU Length */ + UINT16 RuL; /* Response UPIU Length */ UINT16 RuO; /* Response UPIU Offset */ // // DW7 // - UINT16 PrdtL; /* PRDT Length */ + UINT16 PrdtL; /* PRDT Length */ UINT16 PrdtO; /* PRDT Offset */ } UTP_TRD; @@ -475,12 +475,12 @@ typedef struct { // UINT32 Rsvd1:2; UINT32 DbAddr:30; /* Data Base Address */ - + // // DW1 // UINT32 DbAddrU; /* Data Base Address Upper 32-bits */ - + // // DW2 // @@ -846,7 +846,7 @@ typedef struct { // DW4 - DW11 // UTP_TM_REQ_UPIU TmReq; /* Task Management Request UPIU */ - + // // DW12 - DW19 // @@ -972,7 +972,7 @@ typedef struct { typedef enum { UfsUtpQueryResponseSuccess = 0x00, UfsUtpQueryResponseParamNotReadable = 0xF6, - UfsUtpQueryResponseParamNotWriteable = 0xF7, + UfsUtpQueryResponseParamNotWriteable = 0xF7, UfsUtpQueryResponseParamAlreadyWritten = 0xF8, UfsUtpQueryResponseInvalidLen = 0xF9, UfsUtpQueryResponseInvalidVal = 0xFA, @@ -1305,7 +1305,7 @@ typedef enum { UfsFlagPurgeEn = 0x06, UfsFlagPhyResRemoval = 0x08, UfsFlagBusyRtc = 0x09, - UfsFlagPermDisFwUpdate = 0x0B + UfsFlagPermDisFwUpdate = 0x0B } UFS_FLAGS_IDN; // diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/ComponentName.c b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/ComponentName.c index 7da21110e3..35ead36567 100644 --- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/ComponentName.c +++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/ComponentName.c @@ -1,13 +1,13 @@ /** @file - Copyright (c) 2014, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php + Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ #include "UfsPassThru.h" @@ -32,18 +32,18 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gUfsPassThruComponent GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mUfsPassThruDriverNameTable[] = { - { + { "eng;en", L"Universal Flash Storage (UFS) Pass Thru Driver" }, - { + { NULL, NULL } }; GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mUfsPassThruControllerNameTable[] = { - { + { "eng;en", L"Universal Flash Storage (UFS) Host Controller" }, diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c index e24eb40333..ea329618dc 100644 --- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c +++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.c @@ -1,6 +1,6 @@ /** @file - Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.
+ Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -18,7 +18,7 @@ // UFS_PASS_THRU_PRIVATE_DATA gUfsPassThruTemplate = { UFS_PASS_THRU_SIG, // Signature - NULL, // Handle + NULL, // Handle { // ExtScsiPassThruMode 0xFFFFFFFF, EFI_EXT_SCSI_PASS_THRU_ATTRIBUTES_PHYSICAL | EFI_EXT_SCSI_PASS_THRU_ATTRIBUTES_LOGICAL | EFI_EXT_SCSI_PASS_THRU_ATTRIBUTES_NONBLOCKIO, @@ -209,7 +209,7 @@ UfsPassThruPassThru ( if ((Private->Luns.BitMask & (BIT0 << Index)) == 0) { continue; } - + if (Private->Luns.Lun[Index] == UfsLun) { break; } @@ -413,7 +413,7 @@ UfsPassThruBuildDevicePath ( if ((Private->Luns.BitMask & (BIT0 << Index)) == 0) { continue; } - + if (Private->Luns.Lun[Index] == UfsLun) { break; } @@ -504,7 +504,7 @@ UfsPassThruGetTargetLun ( if ((Private->Luns.BitMask & (BIT0 << Index)) == 0) { continue; } - + if (Private->Luns.Lun[Index] == UfsLun) { break; } @@ -730,7 +730,7 @@ UfsPassThruDriverBindingSupported ( This->DriverBindingHandle, Controller ); - + return EFI_SUCCESS; } @@ -883,8 +883,8 @@ UfsPassThruDriverBindingStart ( // // UFS 2.0 spec Section 13.1.3.3: - // At the end of the UFS Interconnect Layer initialization on both host and device side, - // the host shall send a NOP OUT UPIU to verify that the device UTP Layer is ready. + // At the end of the UFS Interconnect Layer initialization on both host and device side, + // the host shall send a NOP OUT UPIU to verify that the device UTP Layer is ready. // Status = UfsExecNopCmds (Private); if (EFI_ERROR (Status)) { @@ -955,7 +955,7 @@ UfsPassThruDriverBindingStart ( Error: if (Private != NULL) { if (Private->TmrlMapping != NULL) { - UfsHc->Unmap (UfsHc, Private->TmrlMapping); + UfsHc->Unmap (UfsHc, Private->TmrlMapping); } if (Private->UtpTmrlBase != NULL) { UfsHc->FreeBuffer (UfsHc, EFI_SIZE_TO_PAGES (Private->Nutmrs * sizeof (UTP_TMRD)), Private->UtpTmrlBase); diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.h b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.h index 6c71983258..b8937842b8 100644 --- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.h +++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.h @@ -1,6 +1,6 @@ /** @file - Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.
+ Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -35,7 +35,7 @@ #define UFS_PASS_THRU_SIG SIGNATURE_32 ('U', 'F', 'S', 'P') // -// Lun 0~7 is for 8 common luns. +// Lun 0~7 is for 8 common luns. // Lun 8~11 is for those 4 well known luns (Refer to UFS 2.0 spec Table 10.58 for details): // Lun 8: REPORT LUNS // Lun 9: UFS DEVICE @@ -59,7 +59,7 @@ typedef struct { for(Entry = (ListHead)->ForwardLink, NextEntry = Entry->ForwardLink;\ Entry != (ListHead); Entry = NextEntry, NextEntry = Entry->ForwardLink) -typedef struct _UFS_PASS_THRU_PRIVATE_DATA { +typedef struct _UFS_PASS_THRU_PRIVATE_DATA { UINT32 Signature; EFI_HANDLE Handle; EFI_EXT_SCSI_PASS_THRU_MODE ExtScsiPassThruMode; diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.uni b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.uni index 85c16c1074..1addc23773 100644 --- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.uni +++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThru.uni @@ -1,16 +1,16 @@ // /** @file -// The UfsPassThruDxe driver is used to provide support on accessing UFS device. +// The UfsPassThruDxe driver is used to provide support on accessing UFS device. // // It produces an EFI_EXT_SCSI_PASS_THRU_PROTOCOL interface for upper layer to send // SCSI cmd to UFS device. // -// Copyright (c) 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruDxe.inf b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruDxe.inf index 467c533ceb..93b6424020 100644 --- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruDxe.inf +++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruDxe.inf @@ -1,7 +1,7 @@ ## @file # Description file for the Universal Flash Storage (UFS) Pass Thru driver. # -# Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -28,8 +28,8 @@ # # VALID_ARCHITECTURES = IA32 X64 IPF EBC # -# DRIVER_BINDING = gUfsPassThruDriverBinding -# COMPONENT_NAME = gUfsPassThruComponentName +# DRIVER_BINDING = gUfsPassThruDriverBinding +# COMPONENT_NAME = gUfsPassThruComponentName # [Sources] diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruExtra.uni b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruExtra.uni index 4f188f0610..2c8bd01d5d 100644 --- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruExtra.uni +++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruExtra.uni @@ -1,7 +1,7 @@ // /** @file // UfsPassThruDxe Localized Strings and Content // -// Copyright (c) 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "UFS PassThru UEFI Driver" diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c index 4b7df74501..e868c8c07e 100644 --- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c +++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.c @@ -2,7 +2,7 @@ UfsPassThruDxe driver is used to produce EFI_EXT_SCSI_PASS_THRU protocol interface for upper layer application to execute UFS-supported SCSI cmds. - Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.
+ Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -179,13 +179,13 @@ DumpUicCmdExecResult ( break; case 0x08: DEBUG ((DEBUG_VERBOSE, "UIC configuration command fails - PEER_COMMUNICATION_FAILURE\n")); - break; + break; case 0x09: DEBUG ((DEBUG_VERBOSE, "UIC configuration command fails - BUSY\n")); break; case 0x0A: DEBUG ((DEBUG_VERBOSE, "UIC configuration command fails - DME_FAILURE\n")); - break; + break; default : ASSERT (FALSE); break; @@ -196,7 +196,7 @@ DumpUicCmdExecResult ( break; case 0x01: DEBUG ((DEBUG_VERBOSE, "UIC control command fails - FAILURE\n")); - break; + break; default : ASSERT (FALSE); break; @@ -242,7 +242,7 @@ DumpQueryResponseResult ( break; case 0xFE: DEBUG ((DEBUG_VERBOSE, "Query Response with Invalid Opcode\n")); - break; + break; case 0xFF: DEBUG ((DEBUG_VERBOSE, "Query Response with General Failure\n")); break; @@ -314,7 +314,7 @@ UfsFillTsfOfQueryReqUpiu ( SwapLittleEndianToBigEndian ((UINT8*)&Length, sizeof (Length)); TsfBase->Length = Length; } - + if (Opcode == UtpQueryFuncOpcodeWrAttr) { SwapLittleEndianToBigEndian ((UINT8*)&Value, sizeof (Value)); TsfBase->Value = Value; @@ -790,7 +790,7 @@ EFI_STATUS UfsStartExecCmd ( IN UFS_PASS_THRU_PRIVATE_DATA *Private, IN UINT8 Slot - ) + ) { UINT32 Data; EFI_STATUS Status; @@ -826,7 +826,7 @@ EFI_STATUS UfsStopExecCmd ( IN UFS_PASS_THRU_PRIVATE_DATA *Private, IN UINT8 Slot - ) + ) { UINT32 Data; EFI_STATUS Status; @@ -940,7 +940,7 @@ UfsSendDmRequestRetry ( if (EFI_ERROR (Status)) { return Status; } - + Trd = ((UTP_TRD*)Private->UtpTrlBase) + Slot; // // Fill transfer request descriptor to this slot. @@ -1337,7 +1337,7 @@ UfsExecNopCmds ( // // Wait for the completion of the transfer request. - // + // Status = UfsWaitMemSet (Private, UFS_HC_UTRLDBR_OFFSET, BIT0 << Slot, 0, UFS_TIMEOUT); if (EFI_ERROR (Status)) { goto Exit; @@ -1503,7 +1503,7 @@ UfsExecScsiCmds ( // // Wait for the completion of the transfer request. - // + // Status = UfsWaitMemSet (Private, UFS_HC_UTRLDBR_OFFSET, BIT0 << TransReq->Slot, 0, Packet->Timeout); if (EFI_ERROR (Status)) { goto Exit; @@ -1516,7 +1516,7 @@ UfsExecScsiCmds ( ASSERT (Response != NULL); SenseDataLen = Response->SenseDataLen; SwapLittleEndianToBigEndian ((UINT8*)&SenseDataLen, sizeof (UINT16)); - + if ((Packet->SenseDataLength != 0) && (Packet->SenseData != NULL)) { CopyMem (Packet->SenseData, Response->SenseData, SenseDataLen); Packet->SenseDataLength = (UINT8)SenseDataLen; @@ -1649,7 +1649,7 @@ UfsExecUicCommands ( // // UFS 2.0 spec section 5.3.1 Offset:0x20 IS.Bit10 UIC Command Completion Status (UCCS) - // This bit is set to '1' by the host controller upon completion of a UIC command. + // This bit is set to '1' by the host controller upon completion of a UIC command. // Status = UfsWaitMemSet (Private, UFS_HC_IS_OFFSET, UFS_HC_IS_UCCS, UFS_HC_IS_UCCS, UFS_TIMEOUT); if (EFI_ERROR (Status)) { @@ -1907,7 +1907,7 @@ UfsInitTaskManagementRequestList ( EFI_PHYSICAL_ADDRESS CmdDescPhyAddr; VOID *CmdDescMapping; EFI_STATUS Status; - + // // Initial h/w and s/w context for future operations. // @@ -1978,7 +1978,7 @@ UfsInitTransferRequestList ( UINT8 Nutrs; VOID *CmdDescHost; EFI_PHYSICAL_ADDRESS CmdDescPhyAddr; - VOID *CmdDescMapping; + VOID *CmdDescMapping; EFI_STATUS Status; // @@ -2019,7 +2019,7 @@ UfsInitTransferRequestList ( } Private->UtpTrlBase = CmdDescHost; - Private->Nutrs = Nutrs; + Private->Nutrs = Nutrs; Private->TrlMapping = CmdDescMapping; // diff --git a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.h b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.h index 0a0cf71894..69fae956ce 100644 --- a/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.h +++ b/MdeModulePkg/Bus/Ufs/UfsPassThruDxe/UfsPassThruHci.h @@ -2,7 +2,7 @@ UfsPassThruDxe driver is used to produce EFI_EXT_SCSI_PASS_THRU protocol interface for upper layer application to execute UFS-supported SCSI cmds. - Copyright (c) 2014, Intel Corporation. All rights reserved.
+ Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -153,7 +153,7 @@ typedef struct { // UFSHCI 2.0 Spec Section 5.2.5 Offset 18h: AHIT - Auto-Hibernate Idle Timer // typedef struct { - UINT32 Ahitv:10; // Auto-Hibernate Idle Timer Value + UINT32 Ahitv:10; // Auto-Hibernate Idle Timer Value UINT32 Ts:3; // Timer scale UINT32 Rsvd1:19; } UFS_HC_AHIT; @@ -165,19 +165,19 @@ typedef struct { UINT16 Utrcs:1; // UTP Transfer Request Completion Status UINT16 Udepri:1; // UIC DME_ENDPOINT_RESET Indication UINT16 Ue:1; // UIC Error - UINT16 Utms:1; // UIC Test Mode Status + UINT16 Utms:1; // UIC Test Mode Status - UINT16 Upms:1; // UIC Power Mode Status - UINT16 Uhxs:1; // UIC Hibernate Exit Status - UINT16 Uhes:1; // UIC Hibernate Enter Status - UINT16 Ulls:1; // UIC Link Lost Status + UINT16 Upms:1; // UIC Power Mode Status + UINT16 Uhxs:1; // UIC Hibernate Exit Status + UINT16 Uhes:1; // UIC Hibernate Enter Status + UINT16 Ulls:1; // UIC Link Lost Status - UINT16 Ulss:1; // UIC Link Startup Status - UINT16 Utmrcs:1; // UTP Task Management Request Completion Status - UINT16 Uccs:1; // UIC Command Completion Status - UINT16 Dfes:1; // Device Fatal Error Status + UINT16 Ulss:1; // UIC Link Startup Status + UINT16 Utmrcs:1; // UTP Task Management Request Completion Status + UINT16 Uccs:1; // UIC Command Completion Status + UINT16 Dfes:1; // Device Fatal Error Status - UINT16 Utpes:1; // UTP Error Status + UINT16 Utpes:1; // UTP Error Status UINT16 Rsvd1:3; UINT16 Hcfes:1; // Host Controller Fatal Error Status @@ -194,9 +194,9 @@ typedef struct { UINT16 Uee:1; // UIC Error Enable UINT16 Utmse:1; // UIC Test Mode Status Enable - UINT16 Upmse:1; // UIC Power Mode Status Enable + UINT16 Upmse:1; // UIC Power Mode Status Enable UINT16 Uhxse:1; // UIC Hibernate Exit Status Enable - UINT16 Uhese:1; // UIC Hibernate Enter Status Enable + UINT16 Uhese:1; // UIC Hibernate Enter Status Enable UINT16 Ullse:1; // UIC Link Lost Status Enable UINT16 Ulsse:1; // UIC Link Startup Status Enable @@ -450,22 +450,22 @@ typedef struct { // UINT32 Rsvd6:7; UINT32 UcdBa:25; /* UTP Command Descriptor Base Address */ - + // // DW5 // UINT32 UcdBaU; /* UTP Command Descriptor Base Address Upper 32-bits */ - + // // DW6 // - UINT16 RuL; /* Response UPIU Length */ + UINT16 RuL; /* Response UPIU Length */ UINT16 RuO; /* Response UPIU Offset */ // // DW7 // - UINT16 PrdtL; /* PRDT Length */ + UINT16 PrdtL; /* PRDT Length */ UINT16 PrdtO; /* PRDT Offset */ } UTP_TRD; @@ -475,12 +475,12 @@ typedef struct { // UINT32 Rsvd1:2; UINT32 DbAddr:30; /* Data Base Address */ - + // // DW1 // UINT32 DbAddrU; /* Data Base Address Upper 32-bits */ - + // // DW2 // @@ -846,7 +846,7 @@ typedef struct { // DW4 - DW11 // UTP_TM_REQ_UPIU TmReq; /* Task Management Request UPIU */ - + // // DW12 - DW19 // @@ -972,7 +972,7 @@ typedef struct { typedef enum { UfsUtpQueryResponseSuccess = 0x00, UfsUtpQueryResponseParamNotReadable = 0xF6, - UfsUtpQueryResponseParamNotWriteable = 0xF7, + UfsUtpQueryResponseParamNotWriteable = 0xF7, UfsUtpQueryResponseParamAlreadyWritten = 0xF8, UfsUtpQueryResponseInvalidLen = 0xF9, UfsUtpQueryResponseInvalidVal = 0xFA, @@ -1305,7 +1305,7 @@ typedef enum { UfsFlagPurgeEn = 0x06, UfsFlagPhyResRemoval = 0x08, UfsFlagBusyRtc = 0x09, - UfsFlagPermDisFwUpdate = 0x0B + UfsFlagPermDisFwUpdate = 0x0B } UFS_FLAGS_IDN; // diff --git a/MdeModulePkg/Bus/Usb/UsbBotPei/BotPeim.c b/MdeModulePkg/Bus/Usb/UsbBotPei/BotPeim.c index 55c4a537fa..e483660161 100644 --- a/MdeModulePkg/Bus/Usb/UsbBotPei/BotPeim.c +++ b/MdeModulePkg/Bus/Usb/UsbBotPei/BotPeim.c @@ -1,8 +1,8 @@ /** @file BOT Transportation implementation. -Copyright (c) 2006, Intel Corporation. All rights reserved.
- +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The diff --git a/MdeModulePkg/Bus/Usb/UsbBotPei/BotPeim.h b/MdeModulePkg/Bus/Usb/UsbBotPei/BotPeim.h index 07235c397b..81275562e1 100644 --- a/MdeModulePkg/Bus/Usb/UsbBotPei/BotPeim.h +++ b/MdeModulePkg/Bus/Usb/UsbBotPei/BotPeim.h @@ -1,8 +1,8 @@ /** @file BOT Transportation implementation. -Copyright (c) 2006, Intel Corporation. All rights reserved.
- +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The @@ -173,7 +173,7 @@ PeiUsbRead10 ( IN UINTN NumberOfBlocks ); -/** +/** Check if there is media according to sense data. @param SenseData Pointer to sense data. @@ -189,7 +189,7 @@ IsNoMedia ( IN UINTN SenseCounts ); -/** +/** Check if there is media error according to sense data. @param SenseData Pointer to sense data. @@ -205,7 +205,7 @@ IsMediaError ( IN UINTN SenseCounts ); -/** +/** Check if media is changed according to sense data. @param SenseData Pointer to sense data. diff --git a/MdeModulePkg/Bus/Usb/UsbBotPei/PeiAtapi.c b/MdeModulePkg/Bus/Usb/UsbBotPei/PeiAtapi.c index 72bde756eb..6873350c41 100644 --- a/MdeModulePkg/Bus/Usb/UsbBotPei/PeiAtapi.c +++ b/MdeModulePkg/Bus/Usb/UsbBotPei/PeiAtapi.c @@ -1,8 +1,8 @@ /** @file Pei USB ATATPI command implementations. -Copyright (c) 1999 - 2017, Intel Corporation. All rights reserved.
- +Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The @@ -475,7 +475,7 @@ PeiUsbRead10 ( return Status; } -/** +/** Check if there is media according to sense data. @param SenseData Pointer to sense data. @@ -526,7 +526,7 @@ IsNoMedia ( return NoMedia; } -/** +/** Check if there is media error according to sense data. @param SenseData Pointer to sense data. @@ -603,7 +603,7 @@ IsMediaError ( return Error; } -/** +/** Check if media is changed according to sense data. @param SenseData Pointer to sense data. diff --git a/MdeModulePkg/Bus/Usb/UsbBotPei/PeiUsbLib.c b/MdeModulePkg/Bus/Usb/UsbBotPei/PeiUsbLib.c index 46c1a06444..4f20c71144 100644 --- a/MdeModulePkg/Bus/Usb/UsbBotPei/PeiUsbLib.c +++ b/MdeModulePkg/Bus/Usb/UsbBotPei/PeiUsbLib.c @@ -1,8 +1,8 @@ /** @file Common Libarary for PEI USB. -Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
- +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The diff --git a/MdeModulePkg/Bus/Usb/UsbBotPei/PeiUsbLib.h b/MdeModulePkg/Bus/Usb/UsbBotPei/PeiUsbLib.h index eafccfdbf8..6d39b764eb 100644 --- a/MdeModulePkg/Bus/Usb/UsbBotPei/PeiUsbLib.h +++ b/MdeModulePkg/Bus/Usb/UsbBotPei/PeiUsbLib.h @@ -1,8 +1,8 @@ /** @file Common Libarary for PEI USB. -Copyright (c) 1999 - 2010, Intel Corporation. All rights reserved.
- +Copyright (c) 1999 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The @@ -34,7 +34,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #define USB_DEV_SET_FEATURE_REQ_TYPE_D 0x00 // Receiver : Device #define USB_DEV_SET_FEATURE_REQ_TYPE_I 0x01 // Receiver : Interface #define USB_DEV_SET_FEATURE_REQ_TYPE_E 0x02 // Receiver : Endpoint - + #define USB_DEV_SET_ADDRESS 0x05 #define USB_DEV_SET_ADDRESS_REQ_TYPE 0x00 diff --git a/MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPei.uni b/MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPei.uni index 30d49d5c41..2477a14b1f 100644 --- a/MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPei.uni +++ b/MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPei.uni @@ -3,14 +3,14 @@ // // The USB mass storage device PEIM driver is used to support recovery from USB devices. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions // of the BSD License which accompanies this distribution. The // full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPeiExtra.uni b/MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPeiExtra.uni index 3e6eb63e02..402a6ee00f 100644 --- a/MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPeiExtra.uni +++ b/MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPeiExtra.uni @@ -1,7 +1,7 @@ // /** @file // UsbBotPei Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions @@ -14,8 +14,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "USB PEI Module for Recovery" diff --git a/MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPeim.c b/MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPeim.c index 5e18306652..d53727defc 100644 --- a/MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPeim.c +++ b/MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPeim.c @@ -1,7 +1,7 @@ /** @file -Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
- +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The @@ -69,8 +69,8 @@ PeiBotDetectMedia ( ); /** - Initializes the Usb Bot. - + Initializes the Usb Bot. + @param FileHandle Handle of the file being invoked. @param PeiServices Describes the list of possible PEI Services. @@ -119,8 +119,8 @@ PeimInitializeUsbBot ( } /** - UsbIo installation notification function. - + UsbIo installation notification function. + This function finds out all the current USB IO PPIs in the system and add them into private data. @@ -292,16 +292,16 @@ InitUsbBot ( /** Gets the count of block I/O devices that one specific block driver detects. - This function is used for getting the count of block I/O devices that one + This function is used for getting the count of block I/O devices that one specific block driver detects. To the PEI ATAPI driver, it returns the number - of all the detected ATAPI devices it detects during the enumeration process. - To the PEI legacy floppy driver, it returns the number of all the legacy - devices it finds during its enumeration process. If no device is detected, - then the function will return zero. - - @param[in] PeiServices General-purpose services that are available + of all the detected ATAPI devices it detects during the enumeration process. + To the PEI legacy floppy driver, it returns the number of all the legacy + devices it finds during its enumeration process. If no device is detected, + then the function will return zero. + + @param[in] PeiServices General-purpose services that are available to every PEIM. - @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI + @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI instance. @param[out] NumberBlockDevices The number of block I/O devices discovered. @@ -326,27 +326,27 @@ BotGetNumberOfBlockDevices ( /** Gets a block device's media information. - This function will provide the caller with the specified block device's media - information. If the media changes, calling this function will update the media + This function will provide the caller with the specified block device's media + information. If the media changes, calling this function will update the media information accordingly. @param[in] PeiServices General-purpose services that are available to every PEIM @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI instance. - @param[in] DeviceIndex Specifies the block device to which the function wants - to talk. Because the driver that implements Block I/O - PPIs will manage multiple block devices, the PPIs that - want to talk to a single device must specify the + @param[in] DeviceIndex Specifies the block device to which the function wants + to talk. Because the driver that implements Block I/O + PPIs will manage multiple block devices, the PPIs that + want to talk to a single device must specify the device index that was assigned during the enumeration - process. This index is a number from one to + process. This index is a number from one to NumberBlockDevices. - @param[out] MediaInfo The media information of the specified block media. - The caller is responsible for the ownership of this + @param[out] MediaInfo The media information of the specified block media. + The caller is responsible for the ownership of this data structure. - - @retval EFI_SUCCESS Media information about the specified block device + + @retval EFI_SUCCESS Media information about the specified block device was obtained successfully. - @retval EFI_DEVICE_ERROR Cannot get the media information due to a hardware + @retval EFI_DEVICE_ERROR Cannot get the media information due to a hardware error. **/ @@ -393,31 +393,31 @@ BotGetMediaInfo ( /** Reads the requested number of blocks from the specified block device. - The function reads the requested number of blocks from the device. All the + The function reads the requested number of blocks from the device. All the blocks are read, or an error is returned. If there is no media in the device, the function returns EFI_NO_MEDIA. - @param[in] PeiServices General-purpose services that are available to + @param[in] PeiServices General-purpose services that are available to every PEIM. @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI instance. - @param[in] DeviceIndex Specifies the block device to which the function wants - to talk. Because the driver that implements Block I/O - PPIs will manage multiple block devices, the PPIs that - want to talk to a single device must specify the device - index that was assigned during the enumeration process. + @param[in] DeviceIndex Specifies the block device to which the function wants + to talk. Because the driver that implements Block I/O + PPIs will manage multiple block devices, the PPIs that + want to talk to a single device must specify the device + index that was assigned during the enumeration process. This index is a number from one to NumberBlockDevices. @param[in] StartLBA The starting logical block address (LBA) to read from on the device @param[in] BufferSize The size of the Buffer in bytes. This number must be a multiple of the intrinsic block size of the device. @param[out] Buffer A pointer to the destination buffer for the data. - The caller is responsible for the ownership of the + The caller is responsible for the ownership of the buffer. - + @retval EFI_SUCCESS The data was read correctly from the device. - @retval EFI_DEVICE_ERROR The device reported an error while attempting + @retval EFI_DEVICE_ERROR The device reported an error while attempting to perform the read operation. - @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not + @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid, or the buffer is not properly aligned. @retval EFI_NO_MEDIA There is no media in the device. @retval EFI_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of diff --git a/MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPeim.h b/MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPeim.h index 3ae8c67b35..692147ed62 100644 --- a/MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPeim.h +++ b/MdeModulePkg/Bus/Usb/UsbBotPei/UsbBotPeim.h @@ -1,8 +1,8 @@ /** @file Usb BOT Peim definition. -Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
- +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The @@ -34,16 +34,16 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** Gets the count of block I/O devices that one specific block driver detects. - This function is used for getting the count of block I/O devices that one + This function is used for getting the count of block I/O devices that one specific block driver detects. To the PEI ATAPI driver, it returns the number - of all the detected ATAPI devices it detects during the enumeration process. - To the PEI legacy floppy driver, it returns the number of all the legacy - devices it finds during its enumeration process. If no device is detected, - then the function will return zero. - - @param[in] PeiServices General-purpose services that are available + of all the detected ATAPI devices it detects during the enumeration process. + To the PEI legacy floppy driver, it returns the number of all the legacy + devices it finds during its enumeration process. If no device is detected, + then the function will return zero. + + @param[in] PeiServices General-purpose services that are available to every PEIM. - @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI + @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI instance. @param[out] NumberBlockDevices The number of block I/O devices discovered. @@ -61,27 +61,27 @@ BotGetNumberOfBlockDevices ( /** Gets a block device's media information. - This function will provide the caller with the specified block device's media - information. If the media changes, calling this function will update the media + This function will provide the caller with the specified block device's media + information. If the media changes, calling this function will update the media information accordingly. @param[in] PeiServices General-purpose services that are available to every PEIM @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI instance. - @param[in] DeviceIndex Specifies the block device to which the function wants - to talk. Because the driver that implements Block I/O - PPIs will manage multiple block devices, the PPIs that - want to talk to a single device must specify the + @param[in] DeviceIndex Specifies the block device to which the function wants + to talk. Because the driver that implements Block I/O + PPIs will manage multiple block devices, the PPIs that + want to talk to a single device must specify the device index that was assigned during the enumeration - process. This index is a number from one to + process. This index is a number from one to NumberBlockDevices. - @param[out] MediaInfo The media information of the specified block media. - The caller is responsible for the ownership of this + @param[out] MediaInfo The media information of the specified block media. + The caller is responsible for the ownership of this data structure. - @retval EFI_SUCCESS Media information about the specified block device + @retval EFI_SUCCESS Media information about the specified block device was obtained successfully. - @retval EFI_DEVICE_ERROR Cannot get the media information due to a hardware + @retval EFI_DEVICE_ERROR Cannot get the media information due to a hardware error. **/ @@ -97,31 +97,31 @@ BotGetMediaInfo ( /** Reads the requested number of blocks from the specified block device. - The function reads the requested number of blocks from the device. All the + The function reads the requested number of blocks from the device. All the blocks are read, or an error is returned. If there is no media in the device, the function returns EFI_NO_MEDIA. - @param[in] PeiServices General-purpose services that are available to + @param[in] PeiServices General-purpose services that are available to every PEIM. @param[in] This Indicates the EFI_PEI_RECOVERY_BLOCK_IO_PPI instance. - @param[in] DeviceIndex Specifies the block device to which the function wants - to talk. Because the driver that implements Block I/O - PPIs will manage multiple block devices, the PPIs that - want to talk to a single device must specify the device - index that was assigned during the enumeration process. + @param[in] DeviceIndex Specifies the block device to which the function wants + to talk. Because the driver that implements Block I/O + PPIs will manage multiple block devices, the PPIs that + want to talk to a single device must specify the device + index that was assigned during the enumeration process. This index is a number from one to NumberBlockDevices. @param[in] StartLBA The starting logical block address (LBA) to read from on the device @param[in] BufferSize The size of the Buffer in bytes. This number must be a multiple of the intrinsic block size of the device. @param[out] Buffer A pointer to the destination buffer for the data. - The caller is responsible for the ownership of the + The caller is responsible for the ownership of the buffer. @retval EFI_SUCCESS The data was read correctly from the device. - @retval EFI_DEVICE_ERROR The device reported an error while attempting + @retval EFI_DEVICE_ERROR The device reported an error while attempting to perform the read operation. - @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not + @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid, or the buffer is not properly aligned. @retval EFI_NO_MEDIA There is no media in the device. @retval EFI_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of diff --git a/MdeModulePkg/Bus/Usb/UsbBotPei/UsbPeim.h b/MdeModulePkg/Bus/Usb/UsbBotPei/UsbPeim.h index c62b99d4a1..ec2c4ff351 100644 --- a/MdeModulePkg/Bus/Usb/UsbBotPei/UsbPeim.h +++ b/MdeModulePkg/Bus/Usb/UsbBotPei/UsbPeim.h @@ -1,8 +1,8 @@ /** @file Usb Peim definition. -Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
- +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c index 7c58fe8d36..26821c28ee 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c @@ -2,7 +2,7 @@ Usb Bus Driver Binding and Bus IO Protocol. -Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -862,7 +862,7 @@ UsbIoPortReset ( Dev->Address = DevAddress; gBS->Stall (USB_SET_DEVICE_ADDRESS_STALL); - + if (EFI_ERROR (Status)) { // // It may fail due to device disconnection or other reasons. @@ -1036,7 +1036,7 @@ UsbBusBuildProtocol ( RootIf->Signature = USB_INTERFACE_SIGNATURE; RootIf->Device = RootHub; RootIf->DevicePath = UsbBus->DevicePath; - + // // Report Status Code here since we will enumerate the USB devices // @@ -1045,7 +1045,7 @@ UsbBusBuildProtocol ( (EFI_IO_BUS_USB | EFI_IOB_PC_DETECT), UsbBus->DevicePath ); - + Status = mUsbRootHubApi.Init (RootIf); if (EFI_ERROR (Status)) { @@ -1157,7 +1157,7 @@ UsbBusControllerDriverSupported ( // if (RemainingDevicePath != NULL) { // - // Check if RemainingDevicePath is the End of Device Path Node, + // Check if RemainingDevicePath is the End of Device Path Node, // if yes, go on checking other conditions // if (!IsDevicePathEnd (RemainingDevicePath)) { @@ -1166,13 +1166,13 @@ UsbBusControllerDriverSupported ( // check its validation // DevicePathNode.DevPath = RemainingDevicePath; - + if ((DevicePathNode.DevPath->Type != MESSAGING_DEVICE_PATH) || (DevicePathNode.DevPath->SubType != MSG_USB_DP && DevicePathNode.DevPath->SubType != MSG_USB_CLASS_DP && DevicePathNode.DevPath->SubType != MSG_USB_WWID_DP )) { - + return EFI_UNSUPPORTED; } } @@ -1208,7 +1208,7 @@ UsbBusControllerDriverSupported ( if (Status == EFI_ALREADY_STARTED) { return EFI_SUCCESS; } - + if (EFI_ERROR (Status)) { return Status; } @@ -1235,7 +1235,7 @@ UsbBusControllerDriverSupported ( Controller ); } - + // // Open the EFI Device Path protocol needed to perform the supported test // @@ -1362,7 +1362,7 @@ UsbBusControllerDriverStart ( // // If RemainingDevicePath is the End of Device Path Node, // skip enumerate any device and return EFI_SUCESSS - // + // return EFI_SUCCESS; } } diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.h b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.h index 9ede83ab7e..be82e25879 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.h +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.h @@ -2,7 +2,7 @@ Usb Bus Driver Binding and Bus IO Protocol. -Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -123,7 +123,7 @@ typedef struct _USB_HUB_API USB_HUB_API; // // Send general device request timeout. -// +// // The USB Specification 2.0, section 11.24.1 recommends a value of // 50 milliseconds. We use a value of 500 milliseconds to work // around slower hubs and devices. diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf index b7b30cc937..30d59adb34 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.inf @@ -1,7 +1,7 @@ ## @file # The Usb Bus Dxe driver is used to enumerate and manage all attached usb devices. # -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -29,7 +29,7 @@ # # VALID_ARCHITECTURES = IA32 X64 IPF EBC ARM AARCH64 # -# DRIVER_BINDING = mUsbBusDriverBinding +# DRIVER_BINDING = mUsbBusDriverBinding # COMPONENT_NAME = mUsbBusComponentName # COMPONENT_NAME2 = mUsbBusComponentName2 # @@ -66,7 +66,7 @@ gEfiUsbIoProtocolGuid ## BY_START ## TO_START ## BY_START - gEfiDevicePathProtocolGuid + gEfiDevicePathProtocolGuid gEfiUsb2HcProtocolGuid ## TO_START gEfiUsbHcProtocolGuid ## TO_START diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.uni b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.uni index f147a0d37f..1339fb1ff7 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.uni +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxe.uni @@ -3,13 +3,13 @@ // // The USB Bus DXE driver is used to enumerate and manage all attached USB devices. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxeExtra.uni b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxeExtra.uni index 6b92980c83..c62565449a 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxeExtra.uni +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBusDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // UsbBusDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "USB Bus DXE Driver" diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.c index fba60dae16..061e4622e8 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.c +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbDesc.c @@ -2,7 +2,7 @@ Manage Usb Descriptor List -Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -361,7 +361,7 @@ UsbParseConfigDesc ( Len -= Consumed; // - // Make allowances for devices that return extra data at the + // Make allowances for devices that return extra data at the // end of their config descriptors // while (Len >= sizeof (EFI_USB_INTERFACE_DESCRIPTOR)) { @@ -689,7 +689,7 @@ UsbBuildLangTable ( Max = (Desc->Length - 2) / 2; Max = MIN(Max, USB_MAX_LANG_ID); - + Point = Desc->String; for (Index = 0; Index < Max; Index++) { UsbDev->LangId[Index] = *Point; diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c index 62645d9bde..13edbeeec5 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbEnumer.c @@ -2,7 +2,7 @@ Usb bus enumeration support. -Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -33,9 +33,9 @@ UsbGetEndpointDesc ( USB_ENDPOINT_DESC *EpDesc; UINT8 Index; UINT8 NumEndpoints; - + NumEndpoints = UsbIf->IfSetting->Desc.NumEndpoints; - + for (Index = 0; Index < NumEndpoints; Index++) { EpDesc = UsbIf->IfSetting->Endpoints[Index]; @@ -279,7 +279,7 @@ UsbConnectDriver ( // twisted TPL used. It should be no problem for us to connect // or disconnect at CALLBACK. // - + // // Only recursively wanted usb child device // @@ -493,13 +493,13 @@ UsbDisconnectDriver ( if (!EFI_ERROR (Status)) { UsbIf->IsManaged = FALSE; } - + DEBUG (( EFI_D_INFO, "UsbDisconnectDriver: TPL after disconnect is %d, %d\n", (UINT32)UsbGetCurrentTpl(), Status)); ASSERT (UsbGetCurrentTpl () == TPL_CALLBACK); gBS->RaiseTPL (OldTpl); } - + return Status; } @@ -524,7 +524,7 @@ UsbRemoveConfig ( // Remove each interface of the device // ReturnStatus = EFI_SUCCESS; - for (Index = 0; Index < Device->NumOfInterface; Index++) { + for (Index = 0; Index < Device->NumOfInterface; Index++) { ASSERT (Index < USB_MAX_INTERFACE); UsbIf = Device->Interfaces[Index]; @@ -683,11 +683,11 @@ UsbEnumerateNewDev ( Parent = HubIf->Device; Bus = Parent->Bus; - HubApi = HubIf->HubApi; + HubApi = HubIf->HubApi; Address = Bus->MaxDevices; gBS->Stall (USB_WAIT_PORT_STABLE_STALL); - + // // Hub resets the device for at least 10 milliseconds. // Host learns device speed. If device is of low/full speed @@ -698,7 +698,7 @@ UsbEnumerateNewDev ( Status = HubApi->ResetPort (HubIf, Port); if (EFI_ERROR (Status)) { DEBUG ((EFI_D_ERROR, "UsbEnumerateNewDev: failed to reset port %d - %r\n", Port, Status)); - + return Status; } DEBUG (( EFI_D_INFO, "UsbEnumerateNewDev: hub port %d is reset\n", Port)); @@ -927,60 +927,60 @@ UsbEnumeratePort ( // connect/disconnect. Other three events are: ENABLE, SUSPEND, RESET. // ENABLE/RESET is used to reset port. SUSPEND isn't supported. // - - if (USB_BIT_IS_SET (PortState.PortChangeStatus, USB_PORT_STAT_C_OVERCURRENT)) { + + if (USB_BIT_IS_SET (PortState.PortChangeStatus, USB_PORT_STAT_C_OVERCURRENT)) { if (USB_BIT_IS_SET (PortState.PortStatus, USB_PORT_STAT_OVERCURRENT)) { // // Case1: - // Both OverCurrent and OverCurrentChange set, means over current occurs, + // Both OverCurrent and OverCurrentChange set, means over current occurs, // which probably is caused by short circuit. It has to wait system hardware // to perform recovery. // DEBUG (( EFI_D_ERROR, "UsbEnumeratePort: Critical Over Current\n", Port)); return EFI_DEVICE_ERROR; - - } + + } // // Case2: - // Only OverCurrentChange set, means system has been recoveried from + // Only OverCurrentChange set, means system has been recoveried from // over current. As a result, all ports are nearly power-off, so - // it's necessary to detach and enumerate all ports again. + // it's necessary to detach and enumerate all ports again. // - DEBUG (( EFI_D_ERROR, "UsbEnumeratePort: 2.0 device Recovery Over Current\n", Port)); + DEBUG (( EFI_D_ERROR, "UsbEnumeratePort: 2.0 device Recovery Over Current\n", Port)); } - if (USB_BIT_IS_SET (PortState.PortChangeStatus, USB_PORT_STAT_C_ENABLE)) { + if (USB_BIT_IS_SET (PortState.PortChangeStatus, USB_PORT_STAT_C_ENABLE)) { // // Case3: // 1.1 roothub port reg doesn't reflect over-current state, while its counterpart - // on 2.0 roothub does. When over-current has influence on 1.1 device, the port + // on 2.0 roothub does. When over-current has influence on 1.1 device, the port // would be disabled, so it's also necessary to detach and enumerate again. // DEBUG (( EFI_D_ERROR, "UsbEnumeratePort: 1.1 device Recovery Over Current\n", Port)); } - + if (USB_BIT_IS_SET (PortState.PortChangeStatus, USB_PORT_STAT_C_CONNECTION)) { // // Case4: - // Device connected or disconnected normally. + // Device connected or disconnected normally. // DEBUG ((EFI_D_INFO, "UsbEnumeratePort: Device Connect/Disconnect Normally\n", Port)); } - // + // // Following as the above cases, it's safety to remove and create again. // Child = UsbFindChild (HubIf, Port); - + if (Child != NULL) { DEBUG (( EFI_D_INFO, "UsbEnumeratePort: device at port %d removed from root hub %p\n", Port, HubIf)); UsbRemoveDevice (Child); } - + if (USB_BIT_IS_SET (PortState.PortStatus, USB_PORT_STAT_CONNECTION)) { // - // Now, new device connected, enumerate and configure the device + // Now, new device connected, enumerate and configure the device // DEBUG (( EFI_D_INFO, "UsbEnumeratePort: new device connected at port %d\n", Port)); if (USB_BIT_IS_SET (PortState.PortChangeStatus, USB_PORT_STAT_C_RESET)) { @@ -988,11 +988,11 @@ UsbEnumeratePort ( } else { Status = UsbEnumerateNewDev (HubIf, Port, TRUE); } - + } else { DEBUG (( EFI_D_INFO, "UsbEnumeratePort: device disconnected event on port %d\n", Port)); } - + HubApi->ClearPortChange (HubIf, Port); return Status; } @@ -1017,7 +1017,7 @@ UsbHubEnumeration ( UINT8 Bit; UINT8 Index; USB_DEVICE *Child; - + ASSERT (Context != NULL); HubIf = (USB_INTERFACE *) Context; @@ -1082,7 +1082,7 @@ UsbRootHubEnumeration ( DEBUG (( EFI_D_INFO, "UsbEnumeratePort: The device disconnect fails at port %d from root hub %p, try again\n", Index, RootHub)); UsbRemoveDevice (Child); } - + UsbEnumeratePort (RootHub, Index); } } diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c index a962f76638..2ce5726e63 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.c @@ -2,7 +2,7 @@ Unified interface for RootHub and Hub. -Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -716,10 +716,10 @@ UsbHubInit ( Depth = (UINT16)(HubIf->Device->Tier - 1); DEBUG ((EFI_D_INFO, "UsbHubInit: Set Hub Depth as 0x%x\n", Depth)); UsbHubCtrlSetHubDepth (HubIf->Device, Depth); - + for (Index = 0; Index < HubDesc->NumPorts; Index++) { UsbHubCtrlSetPortFeature (HubIf->Device, Index, USB_HUB_PORT_REMOTE_WAKE_MASK); - } + } } else { // // Feed power to all the hub ports. It should be ok diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.h b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.h index fe9f1f74c7..4cf8f1f9b1 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.h +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbHub.h @@ -96,7 +96,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #define USB_HUB_SUBCLASS_CODE 0x00 // -// Host software return timeout if port status doesn't change +// Host software return timeout if port status doesn't change // after 500ms(LOOP * STALL = 5000 * 0.1ms), set by experience // #define USB_WAIT_PORT_STS_CHANGE_LOOP 5000 diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c index 75d9b03af0..e9b5fefb9a 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c @@ -2,7 +2,7 @@ Wrapper function for usb host controller interface. -Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -1163,7 +1163,7 @@ UsbBusAddWantedUsbIoDP ( DevicePathPtr = DuplicateDevicePath ((EFI_DEVICE_PATH_PROTOCOL *) &mAllUsbClassDevicePath); } else if (!IsDevicePathEnd (RemainingDevicePath)) { // - // If RemainingDevicePath isn't the End of Device Path Node, + // If RemainingDevicePath isn't the End of Device Path Node, // Create new Usb device path according to the usb part in remaining device path // DevicePathPtr = GetUsbDPFromFullDP (RemainingDevicePath); @@ -1171,7 +1171,7 @@ UsbBusAddWantedUsbIoDP ( // // If RemainingDevicePath is the End of Device Path Node, // skip enumerate any device and return EFI_SUCESSS - // + // return EFI_SUCCESS; } diff --git a/MdeModulePkg/Bus/Usb/UsbBusPei/HubPeim.c b/MdeModulePkg/Bus/Usb/UsbBusPei/HubPeim.c index ac930ee8ea..806602511c 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusPei/HubPeim.c +++ b/MdeModulePkg/Bus/Usb/UsbBusPei/HubPeim.c @@ -2,7 +2,7 @@ Usb Hub Request Support In PEI Phase Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
- + This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The @@ -440,7 +440,7 @@ PeiDoHubConfig ( HubDescriptor = (EFI_USB_HUB_DESCRIPTOR *) HubDescBuffer; // - // Get the hub descriptor + // Get the hub descriptor // Status = PeiUsbHubReadDesc ( PeiServices, diff --git a/MdeModulePkg/Bus/Usb/UsbBusPei/HubPeim.h b/MdeModulePkg/Bus/Usb/UsbBusPei/HubPeim.h index 341f6f32e3..385a14ec0d 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusPei/HubPeim.h +++ b/MdeModulePkg/Bus/Usb/UsbBusPei/HubPeim.h @@ -2,7 +2,7 @@ Constants definitions for Usb Hub Peim Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
- + This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The diff --git a/MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.c b/MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.c index 42be13ac3b..c5e599e2f7 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.c +++ b/MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.c @@ -1,8 +1,8 @@ /** @file Common Libarary for PEI USB -Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
- +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The diff --git a/MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.h b/MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.h index 1ace89fbc3..35f47a35ec 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.h +++ b/MdeModulePkg/Bus/Usb/UsbBusPei/PeiUsbLib.h @@ -1,8 +1,8 @@ /** @file Common Libarary for PEI USB -Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
- +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The diff --git a/MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.inf b/MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.inf index 734619a2fa..0d81bf8dc2 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.inf +++ b/MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.inf @@ -1,7 +1,7 @@ ## @file # The Usb Bus Peim driver is used to support recovery from usb device. # -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions @@ -54,7 +54,7 @@ [Pcd] gEfiMdePkgTokenSpaceGuid.PcdUsbTransferTimeoutValue ## CONSUMES - + [Ppis] gPeiUsbIoPpiGuid ## PRODUCES gPeiUsbHostControllerPpiGuid ## SOMETIMES_CONSUMES diff --git a/MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.uni b/MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.uni index bd18fdbfec..672c6761a5 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.uni +++ b/MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPei.uni @@ -3,14 +3,14 @@ // // The USB Bus PEIM driver is used to support recovery from USB devices. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions // of the BSD License which accompanies this distribution. The // full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPeiExtra.uni b/MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPeiExtra.uni index a84da95a47..4b784a3b0c 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPeiExtra.uni +++ b/MdeModulePkg/Bus/Usb/UsbBusPei/UsbBusPeiExtra.uni @@ -1,7 +1,7 @@ // /** @file // UsbBusPei Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions @@ -14,8 +14,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "USB Bus PEI Module for Recovery" diff --git a/MdeModulePkg/Bus/Usb/UsbBusPei/UsbIoPeim.c b/MdeModulePkg/Bus/Usb/UsbBusPei/UsbIoPeim.c index d13a7ee0a3..5c659401ae 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusPei/UsbIoPeim.c +++ b/MdeModulePkg/Bus/Usb/UsbBusPei/UsbIoPeim.c @@ -1,8 +1,8 @@ /** @file The module is used to implement Usb Io PPI interfaces. -Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
- +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The @@ -19,7 +19,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** Submits control transfer to a target USB device. - + @param PeiServices The pointer of EFI_PEI_SERVICES. @param This The pointer of PEI_USB_IO_PPI. @param Request USB device request to send. @@ -132,11 +132,11 @@ PeiUsbControlTransfer ( /** Submits bulk transfer to a bulk endpoint of a USB device. - + @param PeiServices The pointer of EFI_PEI_SERVICES. @param This The pointer of PEI_USB_IO_PPI. @param DeviceEndpoint Endpoint number and its direction in bit 7. - @param Data A pointer to the buffer of data to transmit + @param Data A pointer to the buffer of data to transmit from or receive into. @param DataLength The lenght of the data buffer. @param Timeout Indicates the maximum time, in millisecond, which the diff --git a/MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.c b/MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.c index a4bb4d7aa7..10d5232e59 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.c +++ b/MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.c @@ -1,8 +1,8 @@ /** @file The module to produce Usb Bus PPI. -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
- +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The @@ -37,7 +37,7 @@ EFI_PEI_PPI_DESCRIPTOR mUsbIoPpiList = { /** The enumeration routine to detect device change. - + @param PeiServices Describes the list of possible PEI Services. @param UsbHcPpi The pointer of PEI_USB_HOST_CONTROLLER_PPI instance. @param Usb2HcPpi The pointer of PEI_USB2_HOST_CONTROLLER_PPI instance. @@ -56,7 +56,7 @@ PeiUsbEnumeration ( /** Configure new detected usb device. - + @param PeiServices Describes the list of possible PEI Services. @param PeiUsbDevice The pointer of PEI_USB_DEVICE instance. @param Port The port to be configured. @@ -77,7 +77,7 @@ PeiConfigureUsbDevice ( /** Get all configurations from a detected usb device. - + @param PeiServices Describes the list of possible PEI Services. @param PeiUsbDevice The pointer of PEI_USB_DEVICE instance. @@ -94,7 +94,7 @@ PeiUsbGetAllConfiguration ( /** Get the start position of next wanted descriptor. - + @param Buffer Buffer containing data to parse. @param Length Buffer length. @param DescType Descriptor type. @@ -116,7 +116,7 @@ GetExpectedDescriptor ( /** The entrypoint of the module, it will enumerate all HCs. - + @param FileHandle Handle of the file being invoked. @param PeiServices Describes the list of possible PEI Services. @@ -142,7 +142,7 @@ PeimInitializeUsb ( } // - // gPeiUsbHostControllerPpiGuid and gPeiUsb2HostControllerPpiGuid should not + // gPeiUsbHostControllerPpiGuid and gPeiUsb2HostControllerPpiGuid should not // be produced at the same time // Index = 0; @@ -176,18 +176,18 @@ PeimInitializeUsb ( Index, NULL, (VOID **) &Usb2HcPpi - ); + ); if (EFI_ERROR (Status)) { // // No more host controller, break out // break; - } - PeiUsbEnumeration ((EFI_PEI_SERVICES **) PeiServices, NULL, Usb2HcPpi); + } + PeiUsbEnumeration ((EFI_PEI_SERVICES **) PeiServices, NULL, Usb2HcPpi); Index++; } } - + if (Index == 0) { return EFI_UNSUPPORTED; } @@ -198,7 +198,7 @@ PeimInitializeUsb ( /** The Hub Enumeration just scans the hub ports one time. It also doesn't support hot-plug. - + @param PeiServices Describes the list of possible PEI Services. @param PeiUsbDevice The pointer of PEI_USB_DEVICE instance. @param CurrentAddress The DeviceAddress of usb device. @@ -289,13 +289,13 @@ PeiHubEnumeration ( NewPeiUsbDevice->IsHub = 0x0; NewPeiUsbDevice->DownStreamPortNo = 0x0; - if (((PortStatus.PortChangeStatus & USB_PORT_STAT_C_RESET) == 0) || + if (((PortStatus.PortChangeStatus & USB_PORT_STAT_C_RESET) == 0) || ((PortStatus.PortStatus & (USB_PORT_STAT_CONNECTION | USB_PORT_STAT_ENABLE)) == 0)) { // - // If the port already has reset change flag and is connected and enabled, skip the port reset logic. + // If the port already has reset change flag and is connected and enabled, skip the port reset logic. // PeiResetHubPort (PeiServices, UsbIoPpi, (UINT8)(Index + 1)); - + PeiHubGetPortStatus ( PeiServices, UsbIoPpi, @@ -406,7 +406,7 @@ PeiHubEnumeration ( /** The enumeration routine to detect device change. - + @param PeiServices Describes the list of possible PEI Services. @param UsbHcPpi The pointer of PEI_USB_HOST_CONTROLLER_PPI instance. @param Usb2HcPpi The pointer of PEI_USB2_HOST_CONTROLLER_PPI instance. @@ -440,7 +440,7 @@ PeiUsbEnumeration ( PeiServices, Usb2HcPpi, (UINT8 *) &NumOfRootPort - ); + ); } else if (UsbHcPpi != NULL) { UsbHcPpi->GetRootHubPortNumber ( PeiServices, @@ -464,7 +464,7 @@ PeiUsbEnumeration ( Usb2HcPpi, (UINT8) Index, &PortStatus - ); + ); } else { UsbHcPpi->GetRootHubPortStatus ( PeiServices, @@ -515,10 +515,10 @@ PeiUsbEnumeration ( PeiUsbDevice->IsHub = 0x0; PeiUsbDevice->DownStreamPortNo = 0x0; - if (((PortStatus.PortChangeStatus & USB_PORT_STAT_C_RESET) == 0) || + if (((PortStatus.PortChangeStatus & USB_PORT_STAT_C_RESET) == 0) || ((PortStatus.PortStatus & (USB_PORT_STAT_CONNECTION | USB_PORT_STAT_ENABLE)) == 0)) { // - // If the port already has reset change flag and is connected and enabled, skip the port reset logic. + // If the port already has reset change flag and is connected and enabled, skip the port reset logic. // ResetRootPort ( PeiServices, @@ -550,7 +550,7 @@ PeiUsbEnumeration ( Usb2HcPpi, (UINT8) Index, EfiUsbPortResetChange - ); + ); } else { UsbHcPpi->ClearRootHubPortFeature ( PeiServices, @@ -650,7 +650,7 @@ PeiUsbEnumeration ( /** Configure new detected usb device. - + @param PeiServices Describes the list of possible PEI Services. @param PeiUsbDevice The pointer of PEI_USB_DEVICE instance. @param Port The port to be configured. @@ -767,7 +767,7 @@ PeiConfigureUsbDevice ( /** Get all configurations from a detected usb device. - + @param PeiServices Describes the list of possible PEI Services. @param PeiUsbDevice The pointer of PEI_USB_DEVICE instance. @@ -920,7 +920,7 @@ PeiUsbGetAllConfiguration ( /** Get the start position of next wanted descriptor. - + @param Buffer Buffer containing data to parse. @param Length Buffer length. @param DescType Descriptor type. @@ -998,7 +998,7 @@ GetExpectedDescriptor ( /** Send reset signal over the given root hub port. - + @param PeiServices Describes the list of possible PEI Services. @param UsbHcPpi The pointer of PEI_USB_HOST_CONTROLLER_PPI instance. @param Usb2HcPpi The pointer of PEI_USB2_HOST_CONTROLLER_PPI instance. @@ -1022,7 +1022,7 @@ ResetRootPort ( if (Usb2HcPpi != NULL) { MicroSecondDelay (200 * 1000); - + // // reset root port // @@ -1032,12 +1032,12 @@ ResetRootPort ( PortNum, EfiUsbPortReset ); - + if (EFI_ERROR (Status)) { DEBUG ((EFI_D_ERROR, "SetRootHubPortFeature EfiUsbPortReset Failed\n")); return; } - + // // Drive the reset signal for at least 50ms. Check USB 2.0 Spec // section 7.1.7.5 for timing requirements. @@ -1053,7 +1053,7 @@ ResetRootPort ( PortNum, EfiUsbPortReset ); - + if (EFI_ERROR (Status)) { DEBUG ((EFI_D_ERROR, "ClearRootHubPortFeature EfiUsbPortReset Failed\n")); return; @@ -1073,7 +1073,7 @@ ResetRootPort ( Usb2HcPpi, PortNum, &PortStatus - ); + ); if (EFI_ERROR (Status)) { return; } @@ -1103,7 +1103,7 @@ ResetRootPort ( PortNum, EfiUsbPortConnectChange ); - + // // Set port enable // @@ -1113,18 +1113,18 @@ ResetRootPort ( PortNum, EfiUsbPortEnable ); - + Usb2HcPpi->ClearRootHubPortFeature ( PeiServices, Usb2HcPpi, PortNum, EfiUsbPortEnableChange ); - + MicroSecondDelay ((RetryIndex + 1) * 50 * 1000); } else { MicroSecondDelay (200 * 1000); - + // // reset root port // @@ -1134,18 +1134,18 @@ ResetRootPort ( PortNum, EfiUsbPortReset ); - + if (EFI_ERROR (Status)) { DEBUG ((EFI_D_ERROR, "SetRootHubPortFeature EfiUsbPortReset Failed\n")); return; } - + // // Drive the reset signal for at least 50ms. Check USB 2.0 Spec // section 7.1.7.5 for timing requirements. // MicroSecondDelay (USB_SET_ROOT_PORT_RESET_STALL); - + // // clear reset root port // @@ -1155,12 +1155,12 @@ ResetRootPort ( PortNum, EfiUsbPortReset ); - + if (EFI_ERROR (Status)) { DEBUG ((EFI_D_ERROR, "ClearRootHubPortFeature EfiUsbPortReset Failed\n")); return; } - + MicroSecondDelay (USB_CLR_ROOT_PORT_RESET_STALL); // @@ -1175,7 +1175,7 @@ ResetRootPort ( UsbHcPpi, PortNum, &PortStatus - ); + ); if (EFI_ERROR (Status)) { return; } @@ -1205,7 +1205,7 @@ ResetRootPort ( PortNum, EfiUsbPortConnectChange ); - + // // Set port enable // @@ -1215,14 +1215,14 @@ ResetRootPort ( PortNum, EfiUsbPortEnable ); - + UsbHcPpi->ClearRootHubPortFeature ( PeiServices, UsbHcPpi, PortNum, EfiUsbPortEnableChange ); - + MicroSecondDelay ((RetryIndex + 1) * 50 * 1000); } return; diff --git a/MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.h b/MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.h index dff8eeb202..1610974537 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.h +++ b/MdeModulePkg/Bus/Usb/UsbBusPei/UsbPeim.h @@ -1,8 +1,8 @@ /** @file Usb Peim definition. -Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
- +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The @@ -88,7 +88,7 @@ typedef struct { #define USB_WAIT_PORT_STS_CHANGE_STALL (100) // -// Host software return timeout if port status doesn't change +// Host software return timeout if port status doesn't change // after 500ms(LOOP * STALL = 5000 * 0.1ms), set by experience // #define USB_WAIT_PORT_STS_CHANGE_LOOP 5000 @@ -112,7 +112,7 @@ typedef struct { /** Submits control transfer to a target USB device. - + @param PeiServices The pointer of EFI_PEI_SERVICES. @param This The pointer of PEI_USB_IO_PPI. @param Request USB device request to send. @@ -144,11 +144,11 @@ PeiUsbControlTransfer ( /** Submits bulk transfer to a bulk endpoint of a USB device. - + @param PeiServices The pointer of EFI_PEI_SERVICES. @param This The pointer of PEI_USB_IO_PPI. @param DeviceEndpoint Endpoint number and its direction in bit 7. - @param Data A pointer to the buffer of data to transmit + @param Data A pointer to the buffer of data to transmit from or receive into. @param DataLength The lenght of the data buffer. @param Timeout Indicates the maximum time, in millisecond, which the @@ -233,7 +233,7 @@ PeiUsbPortReset ( /** Send reset signal over the given root hub port. - + @param PeiServices Describes the list of possible PEI Services. @param UsbHcPpi The pointer of PEI_USB_HOST_CONTROLLER_PPI instance. @param Usb2HcPpi The pointer of PEI_USB2_HOST_CONTROLLER_PPI instance. diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c b/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c index 722350f609..40f8399942 100644 --- a/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c +++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/EfiKey.c @@ -765,9 +765,9 @@ USBKeyboardWaitForKey ( // // Enter critical section - // + // OldTpl = gBS->RaiseTPL (TPL_NOTIFY); - + // // WaitforKey doesn't suppor the partial key. // Considering if the partial keystroke is enabled, there maybe a partial @@ -1223,7 +1223,7 @@ KeyNotifyProcessHandler ( while (TRUE) { // // Enter critical section - // + // OldTpl = gBS->RaiseTPL (TPL_NOTIFY); Status = Dequeue (&UsbKeyboardDevice->EfiKeyQueueForNotify, &KeyData, sizeof (KeyData)); // diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf b/MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf index 7939a1857d..41f0d9ab9b 100644 --- a/MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf +++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.inf @@ -12,7 +12,7 @@ # 2. Universal Serial Bus HID Usage Tables, ver 1.12 # 3. UEFI Specification, v2.1 # -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -39,7 +39,7 @@ # # VALID_ARCHITECTURES = IA32 X64 IPF EBC ARM AARCH64 # -# DRIVER_BINDING = gUsbKeyboardDriverBinding +# DRIVER_BINDING = gUsbKeyboardDriverBinding # COMPONENT_NAME = gUsbKeyboardComponentName # COMPONENT_NAME2 = gUsbKeyboardComponentName2 # @@ -87,7 +87,7 @@ # Otherwise, USB keyboard module tries to use its carried default layout. # gEfiHiiDatabaseProtocolGuid ## SOMETIMES_CONSUMES - + [FeaturePcd] gEfiMdeModulePkgTokenSpaceGuid.PcdDisableDefaultKeyboardLayoutInUsbKbDriver ## CONSUMES diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.uni b/MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.uni index 7dcbf12353..9bf6c3e950 100644 --- a/MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.uni +++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxe.uni @@ -12,13 +12,13 @@ // 2. Universal Serial Bus HID Usage Tables, ver 1.12 // 3. UEFI Specification, v2.1 // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxeExtra.uni b/MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxeExtra.uni index 6a76634878..fe4c747d5a 100644 --- a/MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxeExtra.uni +++ b/MdeModulePkg/Bus/Usb/UsbKbDxe/UsbKbDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // UsbKbDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "USB Keyboard DXE Driver" diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMass.h b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMass.h index ebfb254de6..7dd7871dc3 100644 --- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMass.h +++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMass.h @@ -1,8 +1,8 @@ /** @file - Definition of USB Mass Storage Class and its value, USB Mass Transport Protocol, + Definition of USB Mass Storage Class and its value, USB Mass Transport Protocol, and other common definitions. -Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c index 3bf6e6a81f..dd5950c54c 100644 --- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c +++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.c @@ -224,7 +224,7 @@ UsbBootExecCmd ( If the device isn't ready, wait for it. If the device is ready and error occurs, retry the command again until it exceeds the limit of retrial times. - + @param UsbMass The device to issue commands to @param Cmd The command to execute @param CmdLen The length of the command @@ -412,7 +412,7 @@ UsbBootInquiry ( @retval EFI_SUCCESS The disk geometry is successfully retrieved. @retval EFI_NOT_READY The returned block size is zero. @retval Other READ CAPACITY 16 bytes command execution failed. - + **/ EFI_STATUS UsbBootReadCapacity16 ( @@ -442,7 +442,7 @@ UsbBootReadCapacity16 ( ZeroMem ((CapacityCmd + 2), 8); CapacityCmd[13] = sizeof (CapacityData); - + Status = UsbBootExecCmdWithRetry ( UsbMass, CapacityCmd, @@ -464,13 +464,13 @@ UsbBootReadCapacity16 ( Media->LastBlock = SwapBytes64 (ReadUnaligned64 ((CONST UINT64 *) &(CapacityData.LastLba7))); BlockSize = SwapBytes32 (ReadUnaligned32 ((CONST UINT32 *) &(CapacityData.BlockSize3))); - + Media->LowestAlignedLba = (CapacityData.LowestAlignLogic2 << 8) | CapacityData.LowestAlignLogic1; Media->LogicalBlocksPerPhysicalBlock = (1 << CapacityData.LogicPerPhysical); if (BlockSize == 0) { // - // Get sense data + // Get sense data // return UsbBootRequestSense (UsbMass); } else { @@ -494,7 +494,7 @@ UsbBootReadCapacity16 ( @retval EFI_SUCCESS The disk geometry is successfully retrieved. @retval EFI_NOT_READY The returned block size is zero. @retval Other READ CAPACITY command execution failed. - + **/ EFI_STATUS UsbBootReadCapacity ( @@ -538,7 +538,7 @@ UsbBootReadCapacity ( BlockSize = SwapBytes32 (ReadUnaligned32 ((CONST UINT32 *) CapacityData.BlockLen)); if (BlockSize == 0) { // - // Get sense data + // Get sense data // return UsbBootRequestSense (UsbMass); } else { diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.h b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.h index f8a0708350..d4042e320d 100644 --- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.h +++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBoot.h @@ -2,7 +2,7 @@ Definition of the command set of USB Mass Storage Specification for Bootability, Revision 1.0. -Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -21,7 +21,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // INQUIRY/REQUEST_SENSE are "No Timeout Commands" as specified // by Multi-Media Commands (MMC) set. // Others are "Group 1 Timeout Commands". That is, -// they should be retried if driver is ready. +// they should be retried if driver is ready. // #define USB_BOOT_INQUIRY_OPCODE 0x12 #define USB_BOOT_REQUEST_SENSE_OPCODE 0x03 @@ -82,17 +82,17 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // // Mass command timeout, refers to specification[USB20-9.2.6.1] // -// USB2.0 Spec define the up-limit timeout 5s for all command. USB floppy, -// USB CD-Rom and iPod devices are much slower than USB key when reponse +// USB2.0 Spec define the up-limit timeout 5s for all command. USB floppy, +// USB CD-Rom and iPod devices are much slower than USB key when reponse // most of commands, So we set 5s as timeout here. -// +// #define USB_BOOT_GENERAL_CMD_TIMEOUT (5 * USB_MASS_1_SECOND) // // The required commands are INQUIRY, READ CAPACITY, TEST UNIT READY, // READ10, WRITE10, and REQUEST SENSE. The BLOCK_IO protocol uses LBA // so it isn't necessary to issue MODE SENSE / READ FORMAT CAPACITY -// command to retrieve the disk gemotrics. +// command to retrieve the disk gemotrics. // #pragma pack(1) typedef struct { diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.c b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.c index 477bfa7952..3bd18b2a3e 100644 --- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.c +++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.c @@ -2,7 +2,7 @@ Implementation of the USB mass storage Bulk-Only Transport protocol, according to USB Mass Storage Class Bulk-Only Transport, Revision 1.0. -Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -272,7 +272,7 @@ UsbBotDataTransfer ( ); if (EFI_ERROR (Status)) { if (USB_IS_ERROR (Result, EFI_USB_ERR_STALL)) { - DEBUG ((EFI_D_INFO, "UsbBotDataTransfer: (%r)\n", Status)); + DEBUG ((EFI_D_INFO, "UsbBotDataTransfer: (%r)\n", Status)); DEBUG ((EFI_D_INFO, "UsbBotDataTransfer: DataIn Stall\n")); UsbClearEndpointStall (UsbBot->UsbIo, Endpoint->EndpointAddress); } else if (USB_IS_ERROR (Result, EFI_USB_ERR_NAK)) { diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.h b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.h index 502c6703bf..9bc007f93c 100644 --- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.h +++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassBot.h @@ -3,7 +3,7 @@ based on the "Universal Serial Bus Mass Storage Class Bulk-Only Transport" Revision 1.0, September 31, 1999. -Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -43,7 +43,7 @@ extern USB_MASS_TRANSPORT mUsbBotTransport; // // Usb Bot wait device reset complete, set by experience -// +// #define USB_BOT_RESET_DEVICE_STALL (100 * USB_MASS_1_MILLISECOND) // diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassCbi.c b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassCbi.c index 3f6201d053..44e377bb8f 100644 --- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassCbi.c +++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassCbi.c @@ -4,7 +4,7 @@ Notice: it is being obsoleted by the standard body in favor of the BOT (Bulk-Only Transport). -Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -147,7 +147,7 @@ UsbCbiInit ( } else { FreePool (UsbCbi); } - + return EFI_SUCCESS; ON_ERROR: diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassCbi.h b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassCbi.h index b414a46fde..70be9296c7 100644 --- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassCbi.h +++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassCbi.h @@ -2,7 +2,7 @@ Defination for the USB mass storage Control/Bulk/Interrupt (CBI) transport, according to USB Mass Storage Class Control/Bulk/Interrupt (CBI) Transport, Revision 1.1. -Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -27,7 +27,7 @@ extern USB_MASS_TRANSPORT mUsbCbi1Transport; #define USB_CBI_MAX_RETRY 3 // // Time to wait for USB CBI reset to complete, set by experience -// +// #define USB_CBI_RESET_DEVICE_STALL (50 * USB_MASS_1_MILLISECOND) // // USB CBI transport timeout, set by experience diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassDiskInfo.c b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassDiskInfo.c index 1fa8543e2b..e0f9b4b49c 100644 --- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassDiskInfo.c +++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassDiskInfo.c @@ -1,7 +1,7 @@ /** @file This file is used to implement the EFI_DISK_INFO_PROTOCOL interface. -Copyright (c) 2011, Intel Corporation. All rights reserved.
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -26,7 +26,7 @@ EFI_DISK_INFO_PROTOCOL gUsbDiskInfoProtocolTemplate = { Initialize the installation of DiskInfo protocol. This function prepares for the installation of DiskInfo protocol on the child handle. - By default, it installs DiskInfo protocol with USB interface GUID. + By default, it installs DiskInfo protocol with USB interface GUID. @param[in] UsbMass The pointer of USB_MASS_DEVICE. @@ -42,7 +42,7 @@ InitializeDiskInfo ( /** Provides inquiry information for the controller type. - + This function is used to get inquiry data. Data format of Identify data is defined by the Interface GUID. @@ -51,9 +51,9 @@ InitializeDiskInfo ( @param[in, out] InquiryDataSize Pointer to the value for the inquiry data size. @retval EFI_SUCCESS The command was accepted without any errors. - @retval EFI_NOT_FOUND Device does not support this data class - @retval EFI_DEVICE_ERROR Error reading InquiryData from device - @retval EFI_BUFFER_TOO_SMALL InquiryDataSize not big enough + @retval EFI_NOT_FOUND Device does not support this data class + @retval EFI_DEVICE_ERROR Error reading InquiryData from device + @retval EFI_BUFFER_TOO_SMALL InquiryDataSize not big enough **/ EFI_STATUS @@ -85,16 +85,16 @@ UsbDiskInfoInquiry ( This function is used to get identify data. Data format of Identify data is defined by the Interface GUID. - @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL + @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance. @param[in, out] IdentifyData Pointer to a buffer for the identify data. @param[in, out] IdentifyDataSize Pointer to the value for the identify data size. @retval EFI_SUCCESS The command was accepted without any errors. - @retval EFI_NOT_FOUND Device does not support this data class - @retval EFI_DEVICE_ERROR Error reading IdentifyData from device - @retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough + @retval EFI_NOT_FOUND Device does not support this data class + @retval EFI_DEVICE_ERROR Error reading IdentifyData from device + @retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough **/ EFI_STATUS @@ -110,8 +110,8 @@ UsbDiskInfoIdentify ( /** Provides sense data information for the controller type. - - This function is used to get sense data. + + This function is used to get sense data. Data format of Sense data is defined by the Interface GUID. @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance. @@ -141,7 +141,7 @@ UsbDiskInfoSenseData ( /** This function is used to get controller information. - @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance. + @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance. @param[out] IdeChannel Pointer to the Ide Channel number. Primary or secondary. @param[out] IdeDevice Pointer to the Ide Device number. Master or slave. diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassDiskInfo.h b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassDiskInfo.h index e0a32ca8ee..c206040e78 100644 --- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassDiskInfo.h +++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassDiskInfo.h @@ -1,7 +1,7 @@ /** @file Header file for EFI_DISK_INFO_PROTOCOL interface. -Copyright (c) 2011, Intel Corporation. All rights reserved.
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -19,7 +19,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. Initialize the installation of DiskInfo protocol. This function prepares for the installation of DiskInfo protocol on the child handle. - By default, it installs DiskInfo protocol with USB interface GUID. + By default, it installs DiskInfo protocol with USB interface GUID. @param UsbMass The pointer of USB_MASS_DEVICE. @@ -32,7 +32,7 @@ InitializeDiskInfo ( /** Provides inquiry information for the controller type. - + This function is used to get inquiry data. Data format of Identify data is defined by the Interface GUID. @@ -41,9 +41,9 @@ InitializeDiskInfo ( @param[in, out] InquiryDataSize Pointer to the value for the inquiry data size. @retval EFI_SUCCESS The command was accepted without any errors. - @retval EFI_NOT_FOUND Device does not support this data class - @retval EFI_DEVICE_ERROR Error reading InquiryData from device - @retval EFI_BUFFER_TOO_SMALL InquiryDataSize not big enough + @retval EFI_NOT_FOUND Device does not support this data class + @retval EFI_DEVICE_ERROR Error reading InquiryData from device + @retval EFI_BUFFER_TOO_SMALL InquiryDataSize not big enough **/ EFI_STATUS @@ -60,16 +60,16 @@ UsbDiskInfoInquiry ( This function is used to get identify data. Data format of Identify data is defined by the Interface GUID. - @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL + @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance. @param[in, out] IdentifyData Pointer to a buffer for the identify data. @param[in, out] IdentifyDataSize Pointer to the value for the identify data size. @retval EFI_SUCCESS The command was accepted without any errors. - @retval EFI_NOT_FOUND Device does not support this data class - @retval EFI_DEVICE_ERROR Error reading IdentifyData from device - @retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough + @retval EFI_NOT_FOUND Device does not support this data class + @retval EFI_DEVICE_ERROR Error reading IdentifyData from device + @retval EFI_BUFFER_TOO_SMALL IdentifyDataSize not big enough **/ EFI_STATUS @@ -82,8 +82,8 @@ UsbDiskInfoIdentify ( /** Provides sense data information for the controller type. - - This function is used to get sense data. + + This function is used to get sense data. Data format of Sense data is defined by the Interface GUID. @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance. @@ -110,7 +110,7 @@ UsbDiskInfoSenseData ( /** This function is used to get controller information. - @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance. + @param[in] This Pointer to the EFI_DISK_INFO_PROTOCOL instance. @param[out] IdeChannel Pointer to the Ide Channel number. Primary or secondary. @param[out] IdeDevice Pointer to the Ide Device number. Master or slave. diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.c b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.c index 448bcc2f80..62bf3c5883 100644 --- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.c +++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.c @@ -16,7 +16,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #define USB_MASS_TRANSPORT_COUNT 3 // -// Array of USB transport interfaces. +// Array of USB transport interfaces. // USB_MASS_TRANSPORT *mUsbMassTransport[USB_MASS_TRANSPORT_COUNT] = { &mUsbCbi0Transport, @@ -36,7 +36,7 @@ EFI_DRIVER_BINDING_PROTOCOL gUSBMassDriverBinding = { /** Reset the block device. - This function implements EFI_BLOCK_IO_PROTOCOL.Reset(). + This function implements EFI_BLOCK_IO_PROTOCOL.Reset(). It resets the block device hardware. ExtendedVerification is ignored in this implementation. @@ -76,7 +76,7 @@ UsbMassReset ( /** Reads the requested number of blocks from the device. - This function implements EFI_BLOCK_IO_PROTOCOL.ReadBlocks(). + This function implements EFI_BLOCK_IO_PROTOCOL.ReadBlocks(). It reads the requested number of blocks from the device. All the blocks are read, or an error is returned. @@ -191,7 +191,7 @@ ON_EXIT: /** Writes a specified number of blocks to the device. - This function implements EFI_BLOCK_IO_PROTOCOL.WriteBlocks(). + This function implements EFI_BLOCK_IO_PROTOCOL.WriteBlocks(). It writes a specified number of blocks to the device. All blocks are written, or an error is returned. @@ -295,7 +295,7 @@ UsbMassWriteBlocks ( Status = UsbBootWriteBlocks16 (UsbMass, Lba, TotalBlock, Buffer); } else { Status = UsbBootWriteBlocks (UsbMass, (UINT32) Lba, TotalBlock, Buffer); - } + } if (EFI_ERROR (Status)) { DEBUG ((EFI_D_ERROR, "UsbMassWriteBlocks: UsbBootWriteBlocks (%r) -> Reset\n", Status)); @@ -402,7 +402,7 @@ UsbMassInitTransport ( EFI_USB_INTERFACE_DESCRIPTOR Interface; UINT8 Index; EFI_STATUS Status; - + Status = gBS->OpenProtocol ( Controller, &gEfiUsbIoProtocolGuid, @@ -415,12 +415,12 @@ UsbMassInitTransport ( if (EFI_ERROR (Status)) { return Status; } - + Status = UsbIo->UsbGetInterfaceDescriptor (UsbIo, &Interface); if (EFI_ERROR (Status)) { goto ON_EXIT; } - + Status = EFI_UNSUPPORTED; // @@ -443,7 +443,7 @@ UsbMassInitTransport ( } // - // For BOT device, try to get its max LUN. + // For BOT device, try to get its max LUN. // If max LUN is 0, then it is a non-lun device. // Otherwise, it is a multi-lun device. // @@ -458,7 +458,7 @@ ON_EXIT: This->DriverBindingHandle, Controller ); - return Status; + return Status; } /** @@ -495,14 +495,14 @@ UsbMassInitMultiLun ( ASSERT (MaxLun > 0); ReturnStatus = EFI_NOT_FOUND; - for (Index = 0; Index <= MaxLun; Index++) { + for (Index = 0; Index <= MaxLun; Index++) { DEBUG ((EFI_D_INFO, "UsbMassInitMultiLun: Start to initialize No.%d logic unit\n", Index)); - + UsbIo = NULL; UsbMass = AllocateZeroPool (sizeof (USB_MASS_DEVICE)); ASSERT (UsbMass != NULL); - + UsbMass->Signature = USB_MASS_SIGNATURE; UsbMass->UsbIo = UsbIo; UsbMass->BlockIo.Media = &UsbMass->BlockIoMedia; @@ -514,7 +514,7 @@ UsbMassInitMultiLun ( UsbMass->Transport = Transport; UsbMass->Context = Context; UsbMass->Lun = Index; - + // // Initialize the media parameter data for EFI_BLOCK_IO_MEDIA of Block I/O Protocol. // @@ -531,11 +531,11 @@ UsbMassInitMultiLun ( LunNode.Header.Type = MESSAGING_DEVICE_PATH; LunNode.Header.SubType = MSG_DEVICE_LOGICAL_UNIT_DP; LunNode.Lun = UsbMass->Lun; - + SetDevicePathNodeLength (&LunNode.Header, sizeof (LunNode)); - + UsbMass->DevicePath = AppendDevicePathNode (DevicePath, &LunNode.Header); - + if (UsbMass->DevicePath == NULL) { DEBUG ((EFI_D_ERROR, "UsbMassInitMultiLun: failed to create device logic unit device path\n")); Status = EFI_OUT_OF_RESOURCES; @@ -558,7 +558,7 @@ UsbMassInitMultiLun ( &UsbMass->DiskInfo, NULL ); - + if (EFI_ERROR (Status)) { DEBUG ((EFI_D_ERROR, "UsbMassInitMultiLun: InstallMultipleProtocolInterfaces (%r)\n", Status)); FreePool (UsbMass->DevicePath); @@ -597,7 +597,7 @@ UsbMassInitMultiLun ( ReturnStatus = EFI_SUCCESS; DEBUG ((EFI_D_INFO, "UsbMassInitMultiLun: Success to initialize No.%d logic unit\n", Index)); } - + return ReturnStatus; } @@ -642,7 +642,7 @@ UsbMassInitNonLun ( DEBUG ((EFI_D_ERROR, "UsbMassInitNonLun: OpenUsbIoProtocol By Driver (%r)\n", Status)); goto ON_ERROR; } - + UsbMass->Signature = USB_MASS_SIGNATURE; UsbMass->Controller = Controller; UsbMass->UsbIo = UsbIo; @@ -654,7 +654,7 @@ UsbMassInitNonLun ( UsbMass->OpticalStorage = FALSE; UsbMass->Transport = Transport; UsbMass->Context = Context; - + // // Initialize the media parameter data for EFI_BLOCK_IO_MEDIA of Block I/O Protocol. // @@ -663,7 +663,7 @@ UsbMassInitNonLun ( DEBUG ((EFI_D_ERROR, "UsbMassInitNonLun: UsbMassInitMedia (%r)\n", Status)); goto ON_ERROR; } - + InitializeDiskInfo (UsbMass); Status = gBS->InstallMultipleProtocolInterfaces ( @@ -692,7 +692,7 @@ ON_ERROR: Controller ); } - return Status; + return Status; } @@ -804,7 +804,7 @@ USBMassDriverBindingStart ( VOID *Context; UINT8 MaxLun; EFI_STATUS Status; - EFI_USB_IO_PROTOCOL *UsbIo; + EFI_USB_IO_PROTOCOL *UsbIo; EFI_TPL OldTpl; OldTpl = gBS->RaiseTPL (TPL_CALLBACK); @@ -824,7 +824,7 @@ USBMassDriverBindingStart ( // Initialize data for device that does not support multiple LUNSs. // Status = UsbMassInitNonLun (This, Controller, Transport, Context); - if (EFI_ERROR (Status)) { + if (EFI_ERROR (Status)) { DEBUG ((EFI_D_ERROR, "USBMassDriverBindingStart: UsbMassInitNonLun (%r)\n", Status)); } } else { @@ -839,7 +839,7 @@ USBMassDriverBindingStart ( Controller, EFI_OPEN_PROTOCOL_BY_DRIVER ); - + if (EFI_ERROR (Status)) { DEBUG ((EFI_D_ERROR, "USBMassDriverBindingStart: OpenDevicePathProtocol By Driver (%r)\n", Status)); goto Exit; @@ -853,7 +853,7 @@ USBMassDriverBindingStart ( Controller, EFI_OPEN_PROTOCOL_BY_DRIVER ); - + if (EFI_ERROR (Status)) { DEBUG ((EFI_D_ERROR, "USBMassDriverBindingStart: OpenUsbIoProtocol By Driver (%r)\n", Status)); gBS->CloseProtocol ( @@ -941,7 +941,7 @@ USBMassDriverBindingStop ( Controller, EFI_OPEN_PROTOCOL_GET_PROTOCOL ); - + if (EFI_ERROR(Status)) { // // This is a 2nd type handle(multi-lun root), it needs to close devicepath @@ -962,13 +962,13 @@ USBMassDriverBindingStop ( DEBUG ((EFI_D_INFO, "Success to stop multi-lun root handle\n")); return EFI_SUCCESS; } - + // // This is a 1st type handle(non-multi-lun), which only needs to uninstall // Block I/O Protocol, close USB I/O Protocol and free mass device. // UsbMass = USB_MASS_DEVICE_FROM_BLOCK_IO (BlockIo); - + // // Uninstall Block I/O protocol from the device handle, // then call the transport protocol to stop itself. @@ -984,24 +984,24 @@ USBMassDriverBindingStop ( if (EFI_ERROR (Status)) { return Status; } - + gBS->CloseProtocol ( Controller, &gEfiUsbIoProtocolGuid, This->DriverBindingHandle, Controller ); - + UsbMass->Transport->CleanUp (UsbMass->Context); FreePool (UsbMass); - + DEBUG ((EFI_D_INFO, "Success to stop non-multi-lun root handle\n")); return EFI_SUCCESS; - } + } // // This is a 3rd type handle(multi-lun), which needs uninstall - // Block I/O Protocol and Device Path Protocol, close USB I/O Protocol and + // Block I/O Protocol and Device Path Protocol, close USB I/O Protocol and // free mass device for all children. // AllChildrenStopped = TRUE; @@ -1030,7 +1030,7 @@ USBMassDriverBindingStop ( This->DriverBindingHandle, ChildHandleBuffer[Index] ); - + Status = gBS->UninstallMultipleProtocolInterfaces ( ChildHandleBuffer[Index], &gEfiDevicePathProtocolGuid, @@ -1041,14 +1041,14 @@ USBMassDriverBindingStop ( &UsbMass->DiskInfo, NULL ); - + if (EFI_ERROR (Status)) { // // Fail to uninstall Block I/O Protocol and Device Path Protocol, so re-open USB I/O Protocol by child. // AllChildrenStopped = FALSE; DEBUG ((EFI_D_ERROR, "Fail to stop No.%d multi-lun child handle when uninstalling blockio and devicepath\n", (UINT32)Index)); - + gBS->OpenProtocol ( Controller, &gEfiUsbIoProtocolGuid, @@ -1071,7 +1071,7 @@ USBMassDriverBindingStop ( if (!AllChildrenStopped) { return EFI_DEVICE_ERROR; } - + DEBUG ((EFI_D_INFO, "Success to stop all %d multi-lun children handles\n", (UINT32) NumberOfChildren)); return EFI_SUCCESS; } diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.h b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.h index 0f013c1ad7..b17d88e397 100644 --- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.h +++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassImpl.h @@ -2,7 +2,7 @@ Definitions of functions for Driver Binding Protocol and Block I/O Protocol, and other internal definitions. -Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -107,7 +107,7 @@ USBMassDriverBindingStop ( /** Reset the block device. - This function implements EFI_BLOCK_IO_PROTOCOL.Reset(). + This function implements EFI_BLOCK_IO_PROTOCOL.Reset(). It resets the block device hardware. ExtendedVerification is ignored in this implementation. @@ -129,7 +129,7 @@ UsbMassReset ( /** Reads the requested number of blocks from the device. - This function implements EFI_BLOCK_IO_PROTOCOL.ReadBlocks(). + This function implements EFI_BLOCK_IO_PROTOCOL.ReadBlocks(). It reads the requested number of blocks from the device. All the blocks are read, or an error is returned. @@ -163,7 +163,7 @@ UsbMassReadBlocks ( /** Writes a specified number of blocks to the device. - This function implements EFI_BLOCK_IO_PROTOCOL.WriteBlocks(). + This function implements EFI_BLOCK_IO_PROTOCOL.WriteBlocks(). It writes a specified number of blocks to the device. All blocks are written, or an error is returned. diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf index 26d15c7679..1fdd43443f 100644 --- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf +++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.inf @@ -13,7 +13,7 @@ # 3. USB Mass Storage Class Bulk-Only Transport, Revision 1.0. # 4. UEFI Specification, v2.1 # -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -40,7 +40,7 @@ # # VALID_ARCHITECTURES = IA32 X64 IPF EBC # -# DRIVER_BINDING = gUSBMassDriverBinding +# DRIVER_BINDING = gUSBMassDriverBinding # COMPONENT_NAME = gUsbMassStorageComponentName # COMPONENT_NAME2 = gUsbMassStorageComponentName2 # diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.uni b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.uni index 80960be0a5..b29a4bfcac 100644 --- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.uni +++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxe.uni @@ -13,13 +13,13 @@ // 3. USB Mass Storage Class Bulk-Only Transport, Revision 1.0. // 4. UEFI Specification, v2.1 // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxeExtra.uni b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxeExtra.uni index 4e09a8d3e1..c3cba65c8f 100644 --- a/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxeExtra.uni +++ b/MdeModulePkg/Bus/Usb/UsbMassStorageDxe/UsbMassStorageDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // UsbMassStorageDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "USB Mass Storage DXE Driver" diff --git a/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointer.c b/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointer.c index 9fe92441b8..965195ca34 100644 --- a/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointer.c +++ b/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointer.c @@ -1,7 +1,7 @@ /** @file USB Mouse Driver that manages USB mouse and produces Absolute Pointer Protocol. -Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -91,7 +91,7 @@ USBMouseAbsolutePointerDriverBindingSupported ( if (EFI_ERROR (Status)) { return Status; } - + // // Use the USB I/O Protocol interface to check whether Controller is // a mouse device that can be managed by this driver. @@ -100,14 +100,14 @@ USBMouseAbsolutePointerDriverBindingSupported ( if (!IsUsbMouse (UsbIo)) { Status = EFI_UNSUPPORTED; } - + gBS->CloseProtocol ( Controller, &gEfiUsbIoProtocolGuid, This->DriverBindingHandle, Controller ); - + return Status; } @@ -161,12 +161,12 @@ USBMouseAbsolutePointerDriverBindingStart ( (VOID **) &UsbIo, This->DriverBindingHandle, Controller, - EFI_OPEN_PROTOCOL_BY_DRIVER + EFI_OPEN_PROTOCOL_BY_DRIVER ); if (EFI_ERROR (Status)) { goto ErrorExit1; } - + UsbMouseAbsolutePointerDevice = AllocateZeroPool (sizeof (USB_MOUSE_ABSOLUTE_POINTER_DEV)); ASSERT (UsbMouseAbsolutePointerDevice != NULL); @@ -271,8 +271,8 @@ USBMouseAbsolutePointerDriverBindingStart ( // Initialize and install EFI Absolute Pointer Protocol. // UsbMouseAbsolutePointerDevice->AbsolutePointerProtocol.GetState = GetMouseAbsolutePointerState; - UsbMouseAbsolutePointerDevice->AbsolutePointerProtocol.Reset = UsbMouseAbsolutePointerReset; - UsbMouseAbsolutePointerDevice->AbsolutePointerProtocol.Mode = &UsbMouseAbsolutePointerDevice->Mode; + UsbMouseAbsolutePointerDevice->AbsolutePointerProtocol.Reset = UsbMouseAbsolutePointerReset; + UsbMouseAbsolutePointerDevice->AbsolutePointerProtocol.Mode = &UsbMouseAbsolutePointerDevice->Mode; Status = gBS->CreateEvent ( EVT_NOTIFY_WAIT, @@ -470,7 +470,7 @@ USBMouseAbsolutePointerDriverBindingStop ( // Free all resources. // gBS->CloseEvent (UsbMouseAbsolutePointerDevice->AbsolutePointerProtocol.WaitForInput); - + if (UsbMouseAbsolutePointerDevice->DelayedRecoveryEvent != NULL) { gBS->CloseEvent (UsbMouseAbsolutePointerDevice->DelayedRecoveryEvent); UsbMouseAbsolutePointerDevice->DelayedRecoveryEvent = NULL; @@ -596,7 +596,7 @@ InitializeUsbMouseDevice ( Total = 0; Start = FALSE; - Head = (USB_DESC_HEAD *)Buf; + Head = (USB_DESC_HEAD *)Buf; MouseHidDesc = NULL; // @@ -784,7 +784,7 @@ OnMouseInterruptComplete ( // // Delete & Submit this interrupt again - // Handler of DelayedRecoveryEvent triggered by timer will re-submit the interrupt. + // Handler of DelayedRecoveryEvent triggered by timer will re-submit the interrupt. // UsbIo->UsbAsyncInterruptTransfer ( UsbIo, @@ -856,15 +856,15 @@ OnMouseInterruptComplete ( /** Retrieves the current state of a pointer device. - @param This A pointer to the EFI_ABSOLUTE_POINTER_PROTOCOL instance. + @param This A pointer to the EFI_ABSOLUTE_POINTER_PROTOCOL instance. @param MouseState A pointer to the state information on the pointer device. @retval EFI_SUCCESS The state of the pointer device was returned in State. @retval EFI_NOT_READY The state of the pointer device has not changed since the last call to - GetState(). + GetState(). @retval EFI_DEVICE_ERROR A device error occurred while attempting to retrieve the pointer device's - current state. - @retval EFI_INVALID_PARAMETER State is NULL. + current state. + @retval EFI_INVALID_PARAMETER State is NULL. **/ EFI_STATUS diff --git a/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointer.h b/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointer.h index 08b8d56dd8..b1ea7d2b74 100644 --- a/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointer.h +++ b/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointer.h @@ -1,7 +1,7 @@ /** @file Helper routine and corresponding data struct used by USB Mouse Absolute Pointer Driver. -Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -311,15 +311,15 @@ UsbMouseAbsolutePointerComponentNameGetControllerName ( /** Retrieves the current state of a pointer device. - @param This A pointer to the EFI_ABSOLUTE_POINTER_PROTOCOL instance. + @param This A pointer to the EFI_ABSOLUTE_POINTER_PROTOCOL instance. @param MouseState A pointer to the state information on the pointer device. @retval EFI_SUCCESS The state of the pointer device was returned in State. @retval EFI_NOT_READY The state of the pointer device has not changed since the last call to - GetState(). + GetState(). @retval EFI_DEVICE_ERROR A device error occurred while attempting to retrieve the pointer device's - current state. - @retval EFI_INVALID_PARAMETER State is NULL. + current state. + @retval EFI_INVALID_PARAMETER State is NULL. **/ EFI_STATUS diff --git a/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointerDxe.inf b/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointerDxe.inf index af10382d52..10e74b9783 100644 --- a/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointerDxe.inf +++ b/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointerDxe.inf @@ -9,7 +9,7 @@ # 1. Universal Serial Bus HID Firmware Specification, ver 1.11 # 2. UEFI Specification, v2.1 # -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -36,7 +36,7 @@ # # VALID_ARCHITECTURES = IA32 X64 IPF EBC # -# DRIVER_BINDING = gUsbMouseAbsolutePointerDriverBinding +# DRIVER_BINDING = gUsbMouseAbsolutePointerDriverBinding # COMPONENT_NAME = gUsbMouseAbsolutePointerComponentName # COMPONENT_NAME2 = gUsbMouseAbsolutePointerComponentName2 # diff --git a/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointerDxe.uni b/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointerDxe.uni index f3d1b1d64d..327021327d 100644 --- a/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointerDxe.uni +++ b/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointerDxe.uni @@ -9,13 +9,13 @@ // 1. Universal Serial Bus HID Firmware Specification, ver 1.11 // 2. UEFI Specification, v2.1 // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointerDxeExtra.uni b/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointerDxeExtra.uni index ea9f4d9659..ab9b12ab99 100644 --- a/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointerDxeExtra.uni +++ b/MdeModulePkg/Bus/Usb/UsbMouseAbsolutePointerDxe/UsbMouseAbsolutePointerDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // UsbMouseAbsolutePointerDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "USB Tablet Pointer DXE Driver" diff --git a/MdeModulePkg/Bus/Usb/UsbMouseDxe/MouseHid.c b/MdeModulePkg/Bus/Usb/UsbMouseDxe/MouseHid.c index ec6a420c14..2594b7b2f0 100644 --- a/MdeModulePkg/Bus/Usb/UsbMouseDxe/MouseHid.c +++ b/MdeModulePkg/Bus/Usb/UsbMouseDxe/MouseHid.c @@ -1,7 +1,7 @@ /** @file Helper functions to parse HID report descriptor and items. -Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -160,7 +160,7 @@ GetItemData ( There are three item types: Main, Global, and Local. This function parses these types of HID items according to tag info. - + @param UsbMouse The instance of USB_MOUSE_DEV @param HidItem The HID item to parse diff --git a/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c b/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c index 0ad5616d96..9324994975 100644 --- a/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c +++ b/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.c @@ -1,7 +1,7 @@ /** @file USB Mouse Driver that manages USB mouse and produces Simple Pointer Protocol. -Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -335,7 +335,7 @@ USBMouseDriverBindingStart ( ); goto ErrorExit; } - + UsbMouseDevice->ControllerNameTable = NULL; AddUnicodeString2 ( "eng", @@ -596,7 +596,7 @@ InitializeUsbMouseDevice ( Total = 0; Start = FALSE; - Head = (USB_DESC_HEAD *)Buf; + Head = (USB_DESC_HEAD *)Buf; MouseHidDesc = NULL; // @@ -782,7 +782,7 @@ OnMouseInterruptComplete ( // // Delete & Submit this interrupt again - // Handler of DelayedRecoveryEvent triggered by timer will re-submit the interrupt. + // Handler of DelayedRecoveryEvent triggered by timer will re-submit the interrupt. // UsbIo->UsbAsyncInterruptTransfer ( UsbIo, @@ -839,16 +839,16 @@ OnMouseInterruptComplete ( /** Retrieves the current state of a pointer device. - - @param This A pointer to the EFI_SIMPLE_POINTER_PROTOCOL instance. + + @param This A pointer to the EFI_SIMPLE_POINTER_PROTOCOL instance. @param MouseState A pointer to the state information on the pointer device. - + @retval EFI_SUCCESS The state of the pointer device was returned in State. @retval EFI_NOT_READY The state of the pointer device has not changed since the last call to - GetState(). + GetState(). @retval EFI_DEVICE_ERROR A device error occurred while attempting to retrieve the pointer device's - current state. - @retval EFI_INVALID_PARAMETER MouseState is NULL. + current state. + @retval EFI_INVALID_PARAMETER MouseState is NULL. **/ EFI_STATUS @@ -892,13 +892,13 @@ GetMouseState ( } -/** +/** Resets the pointer device hardware. - + @param This A pointer to the EFI_SIMPLE_POINTER_PROTOCOL instance. @param ExtendedVerification Indicates that the driver may perform a more exhaustive verification operation of the device during reset. - + @retval EFI_SUCCESS The device was reset. @retval EFI_DEVICE_ERROR The device is not functioning correctly and could not be reset. @@ -937,7 +937,7 @@ UsbMouseReset ( @param Event Event to be signaled when there's input from mouse. @param Context Points to USB_MOUSE_DEV instance. - + **/ VOID EFIAPI diff --git a/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.h b/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.h index 0dab9de11d..b0484d93ba 100644 --- a/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.h +++ b/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouse.h @@ -1,7 +1,7 @@ /** @file Helper routine and corresponding data struct used by USB Mouse Driver. -Copyright (c) 2004 - 2012, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -310,16 +310,16 @@ UsbMouseComponentNameGetControllerName ( /** Retrieves the current state of a pointer device. - - @param This A pointer to the EFI_SIMPLE_POINTER_PROTOCOL instance. + + @param This A pointer to the EFI_SIMPLE_POINTER_PROTOCOL instance. @param MouseState A pointer to the state information on the pointer device. - + @retval EFI_SUCCESS The state of the pointer device was returned in State. @retval EFI_NOT_READY The state of the pointer device has not changed since the last call to - GetState(). + GetState(). @retval EFI_DEVICE_ERROR A device error occurred while attempting to retrieve the pointer device's - current state. - @retval EFI_INVALID_PARAMETER MouseState is NULL. + current state. + @retval EFI_INVALID_PARAMETER MouseState is NULL. **/ EFI_STATUS @@ -329,13 +329,13 @@ GetMouseState ( OUT EFI_SIMPLE_POINTER_STATE *MouseState ); -/** +/** Resets the pointer device hardware. - + @param This A pointer to the EFI_SIMPLE_POINTER_PROTOCOL instance. @param ExtendedVerification Indicates that the driver may perform a more exhaustive verification operation of the device during reset. - + @retval EFI_SUCCESS The device was reset. @retval EFI_DEVICE_ERROR The device is not functioning correctly and could not be reset. @@ -352,7 +352,7 @@ UsbMouseReset ( @param Event Event to be signaled when there's input from mouse. @param Context Points to USB_MOUSE_DEV instance. - + **/ VOID EFIAPI diff --git a/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouseDxe.inf b/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouseDxe.inf index 13d8859f98..5bea024d20 100644 --- a/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouseDxe.inf +++ b/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouseDxe.inf @@ -9,7 +9,7 @@ # 1. Universal Serial Bus HID Firmware Specification, ver 1.11 # 2. UEFI Specification, v2.1 # -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -36,7 +36,7 @@ # # VALID_ARCHITECTURES = IA32 X64 IPF EBC # -# DRIVER_BINDING = gUsbMouseDriverBinding +# DRIVER_BINDING = gUsbMouseDriverBinding # COMPONENT_NAME = gUsbMouseComponentName # COMPONENT_NAME2 = gUsbMouseComponentName2 # diff --git a/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouseDxe.uni b/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouseDxe.uni index a7313ce7a6..8d04b8eb47 100644 --- a/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouseDxe.uni +++ b/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouseDxe.uni @@ -9,13 +9,13 @@ // 1. Universal Serial Bus HID Firmware Specification, ver 1.11 // 2. UEFI Specification, v2.1 // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouseDxeExtra.uni b/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouseDxeExtra.uni index 49769a99e7..28f3ea37ab 100644 --- a/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouseDxeExtra.uni +++ b/MdeModulePkg/Bus/Usb/UsbMouseDxe/UsbMouseDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // UsbMouseDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "USB Mouse DXE Driver" diff --git a/MdeModulePkg/Core/Dxe/Dispatcher/Dependency.c b/MdeModulePkg/Core/Dxe/Dispatcher/Dependency.c index 1d8a57b879..0afed413fd 100644 --- a/MdeModulePkg/Core/Dxe/Dispatcher/Dependency.c +++ b/MdeModulePkg/Core/Dxe/Dispatcher/Dependency.c @@ -5,7 +5,7 @@ if a driver can be scheduled for execution. The criteria for schedulability is that the dependency expression is satisfied. -Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -409,7 +409,7 @@ CoreIsSchedulable ( case EFI_DEP_REPLACE_TRUE: CopyMem (&DriverGuid, Iterator + 1, sizeof (EFI_GUID)); DEBUG ((DEBUG_DISPATCH, " PUSH GUID(%g) = TRUE\n", &DriverGuid)); - + Status = PushBool (TRUE); if (EFI_ERROR (Status)) { DEBUG ((DEBUG_DISPATCH, " RESULT = FALSE (Unexpected error)\n")); diff --git a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c index 4c6ca761a6..f72c47a9e5 100644 --- a/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c +++ b/MdeModulePkg/Core/Dxe/Dispatcher/Dispatcher.c @@ -26,7 +26,7 @@ Depex - Dependency Expresion. SOR - Schedule On Request - Don't schedule if this bit is set. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -335,13 +335,13 @@ CoreSchedule ( CoreReleaseDispatcherLock (); DEBUG ((DEBUG_DISPATCH, "Schedule FFS(%g) - EFI_SUCCESS\n", DriverName)); - + return EFI_SUCCESS; } } - + DEBUG ((DEBUG_DISPATCH, "Schedule FFS(%g) - EFI_NOT_FOUND\n", DriverName)); - + return EFI_NOT_FOUND; } @@ -418,7 +418,7 @@ CoreDispatcher ( EFI_CORE_DRIVER_ENTRY *DriverEntry; BOOLEAN ReadyToRun; EFI_EVENT DxeDispatchEvent; - + PERF_FUNCTION_BEGIN (); if (gDispatcherRunning) { @@ -512,10 +512,10 @@ CoreDispatcher ( CoreReleaseDispatcherLock (); - + if (DriverEntry->IsFvImage) { // - // Produce a firmware volume block protocol for FvImage so it gets dispatched from. + // Produce a firmware volume block protocol for FvImage so it gets dispatched from. // Status = CoreProcessFvImageFile (DriverEntry->Fv, DriverEntry->FvHandle, &DriverEntry->FileName); } else { @@ -526,9 +526,9 @@ CoreDispatcher ( sizeof (DriverEntry->ImageHandle) ); ASSERT (DriverEntry->ImageHandle != NULL); - + Status = CoreStartImage (DriverEntry->ImageHandle, NULL, NULL); - + REPORT_STATUS_CODE_WITH_EXTENDED_DATA ( EFI_PROGRESS_CODE, (EFI_SOFTWARE_DXE_CORE | EFI_SW_PC_INIT_END), @@ -692,17 +692,17 @@ FvHasBeenProcessed ( /** Remember that Fv protocol on FvHandle has had it's drivers placed on the - mDiscoveredList. This fucntion adds entries on the mFvHandleList if new + mDiscoveredList. This fucntion adds entries on the mFvHandleList if new entry is different from one in mFvHandleList by checking FvImage Guid. Items are never removed/freed from the mFvHandleList. @param FvHandle The handle of a FV that has been processed @return A point to new added FvHandle entry. If FvHandle with the same FvImage guid - has been added, NULL will return. + has been added, NULL will return. **/ -KNOWN_HANDLE * +KNOWN_HANDLE * FvIsBeingProcesssed ( IN EFI_HANDLE FvHandle ) @@ -1247,7 +1247,7 @@ CoreFwVolEventProtocolNotify ( KnownHandle = FvIsBeingProcesssed (FvHandle); if (KnownHandle == NULL) { // - // The FV with the same FV name guid has already been processed. + // The FV with the same FV name guid has already been processed. // So lets skip it! // continue; @@ -1337,7 +1337,7 @@ CoreFwVolEventProtocolNotify ( if (!EFI_ERROR (Status)) { // // If SMM depex section is found, this FV image is invalid to be supported. - // ASSERT FALSE to report this FV image. + // ASSERT FALSE to report this FV image. // FreePool (DepexBuffer); ASSERT (FALSE); @@ -1359,7 +1359,7 @@ CoreFwVolEventProtocolNotify ( ); if (EFI_ERROR (Status)) { // - // If no depex section, produce a firmware volume block protocol for it so it gets dispatched from. + // If no depex section, produce a firmware volume block protocol for it so it gets dispatched from. // CoreProcessFvImageFile (Fv, FvHandle, &NameGuid); } else { diff --git a/MdeModulePkg/Core/Dxe/DxeCore.uni b/MdeModulePkg/Core/Dxe/DxeCore.uni index 0b4450dbbe..f4386e3609 100644 --- a/MdeModulePkg/Core/Dxe/DxeCore.uni +++ b/MdeModulePkg/Core/Dxe/DxeCore.uni @@ -3,13 +3,13 @@ // // It provides an implementation of DXE Core that is compliant with DXE CIS. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Core/Dxe/DxeCoreExtra.uni b/MdeModulePkg/Core/Dxe/DxeCoreExtra.uni index d04eaf4958..e26f39cba2 100644 --- a/MdeModulePkg/Core/Dxe/DxeCoreExtra.uni +++ b/MdeModulePkg/Core/Dxe/DxeCoreExtra.uni @@ -1,7 +1,7 @@ // /** @file // DxeCore Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Core DXE Services Driver" diff --git a/MdeModulePkg/Core/Dxe/DxeMain.h b/MdeModulePkg/Core/Dxe/DxeMain.h index 07b86ba696..7ec82388a3 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain.h +++ b/MdeModulePkg/Core/Dxe/DxeMain.h @@ -2,7 +2,7 @@ The internal header file includes the common header files, defines internal structure and functions used by DxeCore module. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -198,43 +198,43 @@ typedef struct { typedef struct { UINTN Signature; /// Image handle - EFI_HANDLE Handle; + EFI_HANDLE Handle; /// Image type - UINTN Type; + UINTN Type; /// If entrypoint has been called - BOOLEAN Started; + BOOLEAN Started; /// The image's entry point - EFI_IMAGE_ENTRY_POINT EntryPoint; + EFI_IMAGE_ENTRY_POINT EntryPoint; /// loaded image protocol - EFI_LOADED_IMAGE_PROTOCOL Info; + EFI_LOADED_IMAGE_PROTOCOL Info; /// Location in memory - EFI_PHYSICAL_ADDRESS ImageBasePage; + EFI_PHYSICAL_ADDRESS ImageBasePage; /// Number of pages - UINTN NumberOfPages; + UINTN NumberOfPages; /// Original fixup data - CHAR8 *FixupData; + CHAR8 *FixupData; /// Tpl of started image - EFI_TPL Tpl; + EFI_TPL Tpl; /// Status returned by started image - EFI_STATUS Status; + EFI_STATUS Status; /// Size of ExitData from started image - UINTN ExitDataSize; + UINTN ExitDataSize; /// Pointer to exit data from started image - VOID *ExitData; + VOID *ExitData; /// Pointer to pool allocation for context save/restore - VOID *JumpBuffer; + VOID *JumpBuffer; /// Pointer to buffer for context save/restore - BASE_LIBRARY_JUMP_BUFFER *JumpContext; + BASE_LIBRARY_JUMP_BUFFER *JumpContext; /// Machine type from PE image - UINT16 Machine; + UINT16 Machine; /// EBC Protocol pointer - EFI_EBC_PROTOCOL *Ebc; + EFI_EBC_PROTOCOL *Ebc; /// Runtime image list - EFI_RUNTIME_IMAGE_ENTRY *RuntimeData; + EFI_RUNTIME_IMAGE_ENTRY *RuntimeData; /// Pointer to Loaded Image Device Path Protocol - EFI_DEVICE_PATH_PROTOCOL *LoadedImageDevicePath; + EFI_DEVICE_PATH_PROTOCOL *LoadedImageDevicePath; /// PeCoffLoader ImageContext - PE_COFF_LOADER_IMAGE_CONTEXT ImageContext; + PE_COFF_LOADER_IMAGE_CONTEXT ImageContext; /// Status returned by LoadImage() service. EFI_STATUS LoadImageStatus; } LOADED_IMAGE_PRIVATE_DATA; @@ -1180,8 +1180,8 @@ CoreConnectHandlesByKey ( @retval EFI_NOT_FOUND 1) There are no EFI_DRIVER_BINDING_PROTOCOL instances present in the system. 2) No drivers were connected to ControllerHandle. - @retval EFI_SECURITY_VIOLATION - The user has no permission to start UEFI device drivers on the device path + @retval EFI_SECURITY_VIOLATION + The user has no permission to start UEFI device drivers on the device path associated with the ControllerHandle or specified by the RemainingDevicePath. **/ @@ -1426,10 +1426,10 @@ CoreInternalFreePool ( @retval EFI_LOAD_ERROR Image was not loaded because the image format was corrupt or not understood. @retval EFI_DEVICE_ERROR Image was not loaded because the device returned a read error. - @retval EFI_ACCESS_DENIED Image was not loaded because the platform policy prohibits the + @retval EFI_ACCESS_DENIED Image was not loaded because the platform policy prohibits the image from being loaded. NULL is returned in *ImageHandle. - @retval EFI_SECURITY_VIOLATION Image was loaded and an ImageHandle was created with a - valid EFI_LOADED_IMAGE_PROTOCOL. However, the current + @retval EFI_SECURITY_VIOLATION Image was loaded and an ImageHandle was created with a + valid EFI_LOADED_IMAGE_PROTOCOL. However, the current platform policy specifies that the image should not be started. **/ @@ -1836,7 +1836,7 @@ CoreGetMemorySpaceDescriptor ( @param Attributes Specified attributes @retval EFI_SUCCESS The attributes were set for the memory region. - @retval EFI_INVALID_PARAMETER Length is zero. + @retval EFI_INVALID_PARAMETER Length is zero. @retval EFI_UNSUPPORTED The processor does not support one or more bytes of the memory resource range specified by BaseAddress and Length. @retval EFI_UNSUPPORTED The bit mask of attributes is not support for the memory resource @@ -2671,7 +2671,7 @@ CoreReleaseLock ( ); /** - Read data from Firmware Block by FVB protocol Read. + Read data from Firmware Block by FVB protocol Read. The data may cross the multi block ranges. @param Fvb The FW_VOL_BLOCK_PROTOCOL instance from which to read data. diff --git a/MdeModulePkg/Core/Dxe/DxeMain.inf b/MdeModulePkg/Core/Dxe/DxeMain.inf index d2e7360ed4..68fa0a01d9 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain.inf +++ b/MdeModulePkg/Core/Dxe/DxeMain.inf @@ -2,16 +2,16 @@ # This is core module in DXE phase. # # It provides an implementation of DXE Core that is compliant with DXE CIS. -# +# # Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# +# ## [Defines] @@ -182,7 +182,7 @@ gEfiWatchdogTimerArchProtocolGuid ## CONSUMES [FeaturePcd] - gEfiMdeModulePkgTokenSpaceGuid.PcdFrameworkCompatibilitySupport ## CONSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdFrameworkCompatibilitySupport ## CONSUMES [Pcd] gEfiMdeModulePkgTokenSpaceGuid.PcdLoadFixAddressBootTimeCodePageNumber ## SOMETIMES_CONSUMES diff --git a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c index 3f753738a2..fc46022c3c 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c +++ b/MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c @@ -260,7 +260,7 @@ DxeMain ( } Status = InitializeCpuExceptionHandlersEx (VectorInfoList, NULL); ASSERT_EFI_ERROR (Status); - + // // Initialize Debug Agent to support source level debug in DXE phase // @@ -532,7 +532,7 @@ DxeMain ( REPORT_STATUS_CODE ( EFI_ERROR_CODE | EFI_ERROR_MAJOR, (EFI_SOFTWARE_DXE_CORE | EFI_SW_DXE_CORE_EC_NO_ARCH) - ); + ); } ASSERT_EFI_ERROR (Status); @@ -780,7 +780,7 @@ CoreExitBootServices ( Status = CoreTerminateMemoryMap (MapKey); if (EFI_ERROR (Status)) { // - // Notify other drivers that ExitBootServices fail + // Notify other drivers that ExitBootServices fail // CoreNotifySignalList (&gEventExitBootServicesFailedGuid); return Status; diff --git a/MdeModulePkg/Core/Dxe/DxeMain/DxeProtocolNotify.c b/MdeModulePkg/Core/Dxe/DxeMain/DxeProtocolNotify.c index ea7c6107b4..ac9edf72e8 100644 --- a/MdeModulePkg/Core/Dxe/DxeMain/DxeProtocolNotify.c +++ b/MdeModulePkg/Core/Dxe/DxeMain/DxeProtocolNotify.c @@ -3,7 +3,7 @@ the Dxe Core. The mArchProtocols[] array represents a list of events that represent the Architectural Protocols. -Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -206,7 +206,7 @@ GenericProtocolNotify ( } /** - Creates an event for each entry in a table that is fired everytime a Protocol + Creates an event for each entry in a table that is fired everytime a Protocol of a specific type is installed. @param Entry Pointer to EFI_CORE_PROTOCOL_NOTIFY_ENTRY. @@ -245,7 +245,7 @@ CoreNotifyOnProtocolEntryTable ( } /** - Creates an events for the Architectural Protocols and the optional protocols + Creates an events for the Architectural Protocols and the optional protocols that are fired everytime a Protocol of a specific type is installed. **/ diff --git a/MdeModulePkg/Core/Dxe/Event/Tpl.c b/MdeModulePkg/Core/Dxe/Event/Tpl.c index e3caf832b8..28b91977c3 100644 --- a/MdeModulePkg/Core/Dxe/Event/Tpl.c +++ b/MdeModulePkg/Core/Dxe/Event/Tpl.c @@ -1,7 +1,7 @@ /** @file Task priority (TPL) functions. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -28,7 +28,7 @@ CoreSetInterruptState ( { EFI_STATUS Status; BOOLEAN InSmm; - + if (gCpu == NULL) { return; } diff --git a/MdeModulePkg/Core/Dxe/FwVol/FwVol.c b/MdeModulePkg/Core/Dxe/FwVol/FwVol.c index 2f5867b59d..93ddcc3591 100644 --- a/MdeModulePkg/Core/Dxe/FwVol/FwVol.c +++ b/MdeModulePkg/Core/Dxe/FwVol/FwVol.c @@ -3,7 +3,7 @@ Layers on top of Firmware Block protocol to produce a file abstraction of FV based files. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -34,8 +34,8 @@ FV_DEVICE mFvDevice = { FvReadFile, FvReadFileSection, FvWriteFile, - FvGetNextFile, - sizeof (UINTN), + FvGetNextFile, + sizeof (UINTN), NULL, FvGetVolumeInfo, FvSetVolumeInfo @@ -56,7 +56,7 @@ FV_DEVICE mFvDevice = { // FFS helper functions // /** - Read data from Firmware Block by FVB protocol Read. + Read data from Firmware Block by FVB protocol Read. The data may cross the multi block ranges. @param Fvb The FW_VOL_BLOCK_PROTOCOL instance from which to read data. @@ -86,7 +86,7 @@ ReadFvbData ( UINTN BlockIndex; UINTN ReadDataSize; EFI_STATUS Status; - + // // Try read data in current block // @@ -102,7 +102,7 @@ ReadFvbData ( // return Status; } - + // // Data crosses the blocks, read data from next block // @@ -118,7 +118,7 @@ ReadFvbData ( // // Read data from the crossing blocks // - BlockIndex = 0; + BlockIndex = 0; while (BlockIndex < NumberOfBlocks && DataSize >= BlockSize) { Status = Fvb->Read (Fvb, *StartLba + BlockIndex, 0, &BlockSize, Data); if (EFI_ERROR (Status)) { @@ -128,20 +128,20 @@ ReadFvbData ( DataSize -= BlockSize; BlockIndex ++; } - + // // Data doesn't exceed the current block range. // if (DataSize < BlockSize) { break; } - + // // Data must be got from the next block range. // *StartLba += NumberOfBlocks; } - + // // read the remaining data // @@ -151,7 +151,7 @@ ReadFvbData ( return Status; } } - + // // Update Lba and Offset used by the following read. // @@ -189,7 +189,7 @@ GetFwVolHeader ( EFI_LBA StartLba; UINTN Offset; UINT8 *Buffer; - + // // Read the standard FV header // @@ -418,9 +418,9 @@ FvCheck ( HeaderSize = 0; } } - + // - // read the FV data + // read the FV data // for (; Index < BlockMap->NumBlocks; Index ++) { Status = Fvb->Read (Fvb, @@ -715,7 +715,7 @@ NotifyFwVolBlock ( // Inherit the authentication status from FVB. // FvDevice->AuthenticationStatus = GetFvbAuthenticationStatus (Fvb); - + if (!EFI_ERROR (FvCheck (FvDevice))) { // // Install an New FV protocol on the existing handle diff --git a/MdeModulePkg/Core/Dxe/FwVolBlock/FwVolBlock.c b/MdeModulePkg/Core/Dxe/FwVolBlock/FwVolBlock.c index f7fb18ae15..100aa28dff 100644 --- a/MdeModulePkg/Core/Dxe/FwVolBlock/FwVolBlock.c +++ b/MdeModulePkg/Core/Dxe/FwVolBlock/FwVolBlock.c @@ -4,7 +4,7 @@ It consumes FV HOBs and creates read-only Firmare Volume Block protocol instances for each of them. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -542,7 +542,7 @@ ProduceFVBProtocolOnBuffer ( CoreFreePool (FvbDev); return EFI_OUT_OF_RESOURCES; } - + // // Last, fill in the cache with the linear address of the blocks // @@ -582,11 +582,11 @@ ProduceFVBProtocolOnBuffer ( return EFI_OUT_OF_RESOURCES; } CopyGuid ( - &((FV_PIWG_DEVICE_PATH *)FvbDev->DevicePath)->FvDevPath.FvName, + &((FV_PIWG_DEVICE_PATH *)FvbDev->DevicePath)->FvDevPath.FvName, (GUID *)(UINTN)(BaseAddress + FwVolHeader->ExtHeaderOffset) ); } - + // // // Attach FvVolBlock Protocol to new handle diff --git a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c index e17e98230b..d9c65a8045 100644 --- a/MdeModulePkg/Core/Dxe/Gcd/Gcd.c +++ b/MdeModulePkg/Core/Dxe/Gcd/Gcd.c @@ -126,7 +126,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 *mGcdIoTypeNames[] = { "NonExist", // EfiGcdIoTypeNonExistent "Reserved", // EfiGcdIoTypeReserved "I/O ", // EfiGcdIoTypeIo - "Unknown " // EfiGcdIoTypeMaximum + "Unknown " // EfiGcdIoTypeMaximum }; /// @@ -146,7 +146,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 *mGcdAllocationTypeNames[] = { PcdDebugPrintErrorLevel has the DEBUG_GCD bit set. @param InitialMap TRUE if the initial GCD Memory Map is being dumped. Otherwise, FALSE. - + **/ VOID EFIAPI @@ -159,7 +159,7 @@ CoreDumpGcdMemorySpaceMap ( UINTN NumberOfDescriptors; EFI_GCD_MEMORY_SPACE_DESCRIPTOR *MemorySpaceMap; UINTN Index; - + Status = CoreGetMemorySpaceMap (&NumberOfDescriptors, &MemorySpaceMap); ASSERT (Status == EFI_SUCCESS && MemorySpaceMap != NULL); @@ -169,11 +169,11 @@ CoreDumpGcdMemorySpaceMap ( DEBUG ((DEBUG_GCD, "GCDMemType Range Capabilities Attributes \n")); DEBUG ((DEBUG_GCD, "========== ================================= ================ ================\n")); for (Index = 0; Index < NumberOfDescriptors; Index++) { - DEBUG ((DEBUG_GCD, "%a %016lx-%016lx %016lx %016lx%c\n", + DEBUG ((DEBUG_GCD, "%a %016lx-%016lx %016lx %016lx%c\n", mGcdMemoryTypeNames[MIN (MemorySpaceMap[Index].GcdMemoryType, EfiGcdMemoryTypeMaximum)], - MemorySpaceMap[Index].BaseAddress, + MemorySpaceMap[Index].BaseAddress, MemorySpaceMap[Index].BaseAddress + MemorySpaceMap[Index].Length - 1, - MemorySpaceMap[Index].Capabilities, + MemorySpaceMap[Index].Capabilities, MemorySpaceMap[Index].Attributes, MemorySpaceMap[Index].ImageHandle == NULL ? ' ' : '*' )); @@ -184,11 +184,11 @@ CoreDumpGcdMemorySpaceMap ( } /** - Dump the entire contents if the GCD I/O Space Map using DEBUG() macros when + Dump the entire contents if the GCD I/O Space Map using DEBUG() macros when PcdDebugPrintErrorLevel has the DEBUG_GCD bit set. @param InitialMap TRUE if the initial GCD I/O Map is being dumped. Otherwise, FALSE. - + **/ VOID EFIAPI @@ -201,20 +201,20 @@ CoreDumpGcdIoSpaceMap ( UINTN NumberOfDescriptors; EFI_GCD_IO_SPACE_DESCRIPTOR *IoSpaceMap; UINTN Index; - + Status = CoreGetIoSpaceMap (&NumberOfDescriptors, &IoSpaceMap); ASSERT (Status == EFI_SUCCESS && IoSpaceMap != NULL); - + if (InitialMap) { DEBUG ((DEBUG_GCD, "GCD:Initial GCD I/O Space Map\n")); - } - + } + DEBUG ((DEBUG_GCD, "GCDIoType Range \n")); DEBUG ((DEBUG_GCD, "========== =================================\n")); for (Index = 0; Index < NumberOfDescriptors; Index++) { - DEBUG ((DEBUG_GCD, "%a %016lx-%016lx%c\n", + DEBUG ((DEBUG_GCD, "%a %016lx-%016lx%c\n", mGcdIoTypeNames[MIN (IoSpaceMap[Index].GcdIoType, EfiGcdIoTypeMaximum)], - IoSpaceMap[Index].BaseAddress, + IoSpaceMap[Index].BaseAddress, IoSpaceMap[Index].BaseAddress + IoSpaceMap[Index].Length - 1, IoSpaceMap[Index].ImageHandle == NULL ? ' ' : '*' )); @@ -223,11 +223,11 @@ CoreDumpGcdIoSpaceMap ( FreePool (IoSpaceMap); ); } - + /** Validate resource descriptor HOB's attributes. - If Attributes includes some memory resource's settings, it should include + If Attributes includes some memory resource's settings, it should include the corresponding capabilites also. @param Attributes Resource descriptor HOB attributes. @@ -876,13 +876,13 @@ CoreConvertSpace ( // CpuArchAttributes = ConverToCpuArchAttributes (Attributes); // - // CPU arch attributes include page attributes and cache attributes. + // CPU arch attributes include page attributes and cache attributes. // Only page attributes supports to be cleared, but not cache attributes. // Caller is expected to use GetMemorySpaceDescriptor() to get the current // attributes, AND/OR attributes, and then calls SetMemorySpaceAttributes() // to set the new attributes. // So 0 CPU arch attributes should not happen as memory should always have - // a cache attribute (no matter UC or WB, etc). + // a cache attribute (no matter UC or WB, etc). // // Here, 0 CPU arch attributes will be filtered to be compatible with the // case that caller just calls SetMemorySpaceAttributes() with none CPU @@ -1293,7 +1293,7 @@ Done: DEBUG ((DEBUG_GCD, " (BaseAddress = %016lx)", *BaseAddress)); } DEBUG ((DEBUG_GCD, "\n")); - + if ((Operation & GCD_MEMORY_SPACE_OPERATION) != 0) { CoreReleaseGcdMemoryLock (); CoreDumpGcdMemorySpaceMap (FALSE); @@ -1384,7 +1384,7 @@ CoreAllocateMemorySpace ( DEBUG ((DEBUG_GCD, " Alignment = %016lx\n", LShiftU64 (1, Alignment))); DEBUG ((DEBUG_GCD, " ImageHandle = %p\n", ImageHandle)); DEBUG ((DEBUG_GCD, " DeviceHandle = %p\n", DeviceHandle)); - + return CoreAllocateSpace ( GCD_ALLOCATE_MEMORY_OPERATION, GcdAllocateType, @@ -1516,7 +1516,7 @@ CoreRemoveMemorySpace ( ) { DEBUG ((DEBUG_GCD, "GCD:RemoveMemorySpace(Base=%016lx,Length=%016lx)\n", BaseAddress, Length)); - + return CoreConvertSpace (GCD_REMOVE_MEMORY_OPERATION, (EFI_GCD_MEMORY_TYPE) 0, (EFI_GCD_IO_TYPE) 0, BaseAddress, Length, 0, 0); } @@ -1605,7 +1605,7 @@ CoreGetMemorySpaceDescriptor ( @param Attributes Specified attributes @retval EFI_SUCCESS The attributes were set for the memory region. - @retval EFI_INVALID_PARAMETER Length is zero. + @retval EFI_INVALID_PARAMETER Length is zero. @retval EFI_UNSUPPORTED The processor does not support one or more bytes of the memory resource range specified by BaseAddress and Length. @retval EFI_UNSUPPORTED The bit mask of attributes is not support for the memory resource @@ -1762,7 +1762,7 @@ CoreAddIoSpace ( { DEBUG ((DEBUG_GCD, "GCD:AddIoSpace(Base=%016lx,Length=%016lx)\n", BaseAddress, Length)); DEBUG ((DEBUG_GCD, " GcdIoType = %a\n", mGcdIoTypeNames[MIN (GcdIoType, EfiGcdIoTypeMaximum)])); - + // // Make sure parameters are valid // @@ -1812,7 +1812,7 @@ CoreAllocateIoSpace ( DEBUG ((DEBUG_GCD, " Alignment = %016lx\n", LShiftU64 (1, Alignment))); DEBUG ((DEBUG_GCD, " ImageHandle = %p\n", ImageHandle)); DEBUG ((DEBUG_GCD, " DeviceHandle = %p\n", DeviceHandle)); - + return CoreAllocateSpace ( GCD_ALLOCATE_IO_OPERATION, GcdAllocateType, @@ -1868,7 +1868,7 @@ CoreRemoveIoSpace ( ) { DEBUG ((DEBUG_GCD, "GCD:RemoveIoSpace(Base=%016lx,Length=%016lx)\n", BaseAddress, Length)); - + return CoreConvertSpace (GCD_REMOVE_IO_OPERATION, (EFI_GCD_MEMORY_TYPE) 0, (EFI_GCD_IO_TYPE) 0, BaseAddress, Length, 0, 0); } @@ -2138,15 +2138,15 @@ CoreInitializeMemoryServices ( // Cache the PHIT HOB for later use // PhitHob = Hob.HandoffInformationTable; - + if (PcdGet64(PcdLoadModuleAtFixAddressEnable) != 0) { - ReservedCodePageNumber = PcdGet32(PcdLoadFixAddressRuntimeCodePageNumber); - ReservedCodePageNumber += PcdGet32(PcdLoadFixAddressBootTimeCodePageNumber); - - // - // cache the Top address for loading modules at Fixed Address - // - gLoadModuleAtFixAddressConfigurationTable.DxeCodeTopAddress = PhitHob->EfiMemoryTop + ReservedCodePageNumber = PcdGet32(PcdLoadFixAddressRuntimeCodePageNumber); + ReservedCodePageNumber += PcdGet32(PcdLoadFixAddressBootTimeCodePageNumber); + + // + // cache the Top address for loading modules at Fixed Address + // + gLoadModuleAtFixAddressConfigurationTable.DxeCodeTopAddress = PhitHob->EfiMemoryTop + EFI_PAGES_TO_SIZE(ReservedCodePageNumber); } // @@ -2213,14 +2213,14 @@ CoreInitializeMemoryServices ( Length = PageAlignLength (ResourceHob->PhysicalStart + ResourceHob->ResourceLength - BaseAddress); if (Length < MinimalMemorySizeNeeded) { // - // If that range is not large enough to intialize the DXE Core, then + // If that range is not large enough to intialize the DXE Core, then // Compute range between PHIT EfiFreeMemoryBottom and PHIT EfiFreeMemoryTop // BaseAddress = PageAlignAddress (PhitHob->EfiFreeMemoryBottom); Length = PageAlignLength (PhitHob->EfiFreeMemoryTop - BaseAddress); if (Length < MinimalMemorySizeNeeded) { // - // If that range is not large enough to intialize the DXE Core, then + // If that range is not large enough to intialize the DXE Core, then // Compute range between the start of the Resource Descriptor HOB and the start of the HOB List // BaseAddress = PageAlignAddress (ResourceHob->PhysicalStart); @@ -2297,7 +2297,7 @@ CoreInitializeMemoryServices ( // BaseAddress = TestedMemoryBaseAddress; Length = TestedMemoryLength; - Attributes = ResourceHob->ResourceAttribute; + Attributes = ResourceHob->ResourceAttribute; HighAddress = ResourceHob->PhysicalStart; } } @@ -2403,7 +2403,7 @@ CoreInitializeGcdServices ( InsertHeadList (&mGcdMemorySpaceMap, &Entry->Link); CoreDumpGcdMemorySpaceMap (TRUE); - + // // Initialize the GCD I/O Space Map // @@ -2415,7 +2415,7 @@ CoreInitializeGcdServices ( InsertHeadList (&mGcdIoSpaceMap, &Entry->Link); CoreDumpGcdIoSpaceMap (TRUE); - + // // Walk the HOB list and add all resource descriptors to the GCD // diff --git a/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c b/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c index ab3cc0c07e..9b42753724 100644 --- a/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c +++ b/MdeModulePkg/Core/Dxe/Hand/DriverSupport.c @@ -1,7 +1,7 @@ /** @file Support functions to connect/disconnect UEFI Driver model Protocol -Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -40,8 +40,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @retval EFI_NOT_FOUND 1) There are no EFI_DRIVER_BINDING_PROTOCOL instances present in the system. 2) No drivers were connected to ControllerHandle. - @retval EFI_SECURITY_VIOLATION - The user has no permission to start UEFI device drivers on the device path + @retval EFI_SECURITY_VIOLATION + The user has no permission to start UEFI device drivers on the device path associated with the ControllerHandle or specified by the RemainingDevicePath. **/ @@ -112,7 +112,7 @@ CoreConnectController ( } } } - + Handle = ControllerHandle; // diff --git a/MdeModulePkg/Core/Dxe/Hand/Handle.c b/MdeModulePkg/Core/Dxe/Hand/Handle.c index 86a4065733..0eb014abba 100644 --- a/MdeModulePkg/Core/Dxe/Hand/Handle.c +++ b/MdeModulePkg/Core/Dxe/Hand/Handle.c @@ -1,7 +1,7 @@ /** @file UEFI handle & protocol handling. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -604,7 +604,7 @@ CoreInstallMultipleProtocolInterfaces ( CoreUninstallProtocolInterface (*Handle, Protocol, Interface); } VA_END (Args); - + *Handle = OldHandle; } @@ -1314,7 +1314,7 @@ Done: form of EFI_OPEN_PROTOCOL_INFORMATION_ENTRY structures. @param EntryCount Number of EntryBuffer entries - @retval EFI_SUCCESS The open protocol information was returned in EntryBuffer, + @retval EFI_SUCCESS The open protocol information was returned in EntryBuffer, and the number of entries was returned EntryCount. @retval EFI_NOT_FOUND Handle does not support the protocol specified by Protocol. @retval EFI_OUT_OF_RESOURCES There are not enough resources available to allocate EntryBuffer. diff --git a/MdeModulePkg/Core/Dxe/Hand/Handle.h b/MdeModulePkg/Core/Dxe/Hand/Handle.h index 28f762265a..2a1d5879cd 100644 --- a/MdeModulePkg/Core/Dxe/Hand/Handle.h +++ b/MdeModulePkg/Core/Dxe/Hand/Handle.h @@ -1,7 +1,7 @@ /** @file Support functions for managing protocol. -Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -26,7 +26,7 @@ typedef struct { /// All handles list of IHANDLE LIST_ENTRY AllHandles; /// List of PROTOCOL_INTERFACE's for this handle - LIST_ENTRY Protocols; + LIST_ENTRY Protocols; UINTN LocateRequest; /// The Handle Database Key value when this handle was last created or modified UINT64 Key; @@ -44,13 +44,13 @@ typedef struct { typedef struct { UINTN Signature; /// Link Entry inserted to mProtocolDatabase - LIST_ENTRY AllEntries; + LIST_ENTRY AllEntries; /// ID of the protocol - EFI_GUID ProtocolID; + EFI_GUID ProtocolID; /// All protocol interfaces - LIST_ENTRY Protocols; + LIST_ENTRY Protocols; /// Registerd notification handlers - LIST_ENTRY Notify; + LIST_ENTRY Notify; } PROTOCOL_ENTRY; @@ -63,17 +63,17 @@ typedef struct { typedef struct { UINTN Signature; /// Link on IHANDLE.Protocols - LIST_ENTRY Link; + LIST_ENTRY Link; /// Back pointer - IHANDLE *Handle; + IHANDLE *Handle; /// Link on PROTOCOL_ENTRY.Protocols - LIST_ENTRY ByProtocol; + LIST_ENTRY ByProtocol; /// The protocol ID - PROTOCOL_ENTRY *Protocol; + PROTOCOL_ENTRY *Protocol; /// The interface value - VOID *Interface; + VOID *Interface; /// OPEN_PROTOCOL_DATA list - LIST_ENTRY OpenList; + LIST_ENTRY OpenList; UINTN OpenListCount; } PROTOCOL_INTERFACE; @@ -83,7 +83,7 @@ typedef struct { typedef struct { UINTN Signature; ///Link on PROTOCOL_INTERFACE.OpenList - LIST_ENTRY Link; + LIST_ENTRY Link; EFI_HANDLE AgentHandle; EFI_HANDLE ControllerHandle; @@ -101,11 +101,11 @@ typedef struct { UINTN Signature; PROTOCOL_ENTRY *Protocol; /// All notifications for this protocol - LIST_ENTRY Link; + LIST_ENTRY Link; /// Event to notify - EFI_EVENT Event; + EFI_EVENT Event; /// Last position notified - LIST_ENTRY *Position; + LIST_ENTRY *Position; } PROTOCOL_NOTIFY; diff --git a/MdeModulePkg/Core/Dxe/Hand/Locate.c b/MdeModulePkg/Core/Dxe/Hand/Locate.c index 3cc146f381..4ec6130c5c 100644 --- a/MdeModulePkg/Core/Dxe/Hand/Locate.c +++ b/MdeModulePkg/Core/Dxe/Hand/Locate.c @@ -1,7 +1,7 @@ /** @file Locate handle functions -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -457,7 +457,7 @@ CoreLocateDevicePath ( if (IsDevicePathEndInstance (TmpDevicePath)) { // // If DevicePath is a multi-instance device path, - // the function will operate on the first instance + // the function will operate on the first instance // break; } @@ -522,7 +522,7 @@ CoreLocateDevicePath ( return EFI_INVALID_PARAMETER; } *Device = BestDevice; - + // // Return the remaining part of the device path // diff --git a/MdeModulePkg/Core/Dxe/Image/Image.c b/MdeModulePkg/Core/Dxe/Image/Image.c index adeb4bf313..eddca140ee 100644 --- a/MdeModulePkg/Core/Dxe/Image/Image.c +++ b/MdeModulePkg/Core/Dxe/Image/Image.c @@ -1,7 +1,7 @@ /** @file Core image handling services to load and unload PeImage. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -73,7 +73,7 @@ LOADED_IMAGE_PRIVATE_DATA mCorePrivateImage = { // // The field is define for Loading modules at fixed address feature to tracker the PEI code // memory range usage. It is a bit mapped array in which every bit indicates the correspoding memory page -// available or not. +// available or not. // GLOBAL_REMOVE_IF_UNREFERENCED UINT64 *mDxeCodeMemoryRangeUsageBitMap=NULL; @@ -108,7 +108,7 @@ GetMachineTypeName ( ) { UINTN Index; - + for (Index = 0; Index < sizeof(mMachineTypeInfo)/sizeof(mMachineTypeInfo[0]); Index++) { if (mMachineTypeInfo[Index].MachineType == MachineType) { return mMachineTypeInfo[Index].MachineTypeName; @@ -138,7 +138,7 @@ CoreInitializeImageServices ( UINT64 DxeCoreImageLength; VOID *DxeCoreEntryPoint; EFI_PEI_HOB_POINTERS DxeCoreHob; - + // // Searching for image hob // @@ -158,7 +158,7 @@ CoreInitializeImageServices ( DxeCoreImageLength = DxeCoreHob.MemoryAllocationModule->MemoryAllocationHeader.MemoryLength; DxeCoreEntryPoint = (VOID *) (UINTN) DxeCoreHob.MemoryAllocationModule->EntryPoint; gDxeCoreFileName = &DxeCoreHob.MemoryAllocationModule->ModuleName; - + // // Initialize the fields for an internal driver // @@ -263,11 +263,11 @@ CoreReadImageFile ( /** To check memory usage bit map array to figure out if the memory range the image will be loaded in is available or not. If memory range is available, the function will mark the corresponding bits to 1 which indicates the memory range is used. - The function is only invoked when load modules at fixed address feature is enabled. - + The function is only invoked when load modules at fixed address feature is enabled. + @param ImageBase The base address the image will be loaded at. @param ImageSize The size of the image - + @retval EFI_SUCCESS The memory range the image will be loaded in is available @retval EFI_NOT_FOUND The memory range the image will be loaded in is not available **/ @@ -278,23 +278,23 @@ CheckAndMarkFixLoadingMemoryUsageBitMap ( ) { UINT32 DxeCodePageNumber; - UINT64 DxeCodeSize; + UINT64 DxeCodeSize; EFI_PHYSICAL_ADDRESS DxeCodeBase; UINTN BaseOffsetPageNumber; UINTN TopOffsetPageNumber; UINTN Index; // // The DXE code range includes RuntimeCodePage range and Boot time code range. - // + // DxeCodePageNumber = PcdGet32(PcdLoadFixAddressRuntimeCodePageNumber); DxeCodePageNumber += PcdGet32(PcdLoadFixAddressBootTimeCodePageNumber); DxeCodeSize = EFI_PAGES_TO_SIZE(DxeCodePageNumber); DxeCodeBase = gLoadModuleAtFixAddressConfigurationTable.DxeCodeTopAddress - DxeCodeSize; - + // - // If the memory usage bit map is not initialized, do it. Every bit in the array + // If the memory usage bit map is not initialized, do it. Every bit in the array // indicate the status of the corresponding memory page, available or not - // + // if (mDxeCodeMemoryRangeUsageBitMap == NULL) { mDxeCodeMemoryRangeUsageBitMap = AllocateZeroPool(((DxeCodePageNumber/64) + 1)*sizeof(UINT64)); } @@ -309,11 +309,11 @@ CheckAndMarkFixLoadingMemoryUsageBitMap ( // if (gLoadModuleAtFixAddressConfigurationTable.DxeCodeTopAddress < ImageBase + ImageSize || DxeCodeBase > ImageBase) { - return EFI_NOT_FOUND; - } + return EFI_NOT_FOUND; + } // // Test if the memory is avalaible or not. - // + // BaseOffsetPageNumber = EFI_SIZE_TO_PAGES((UINT32)(ImageBase - DxeCodeBase)); TopOffsetPageNumber = EFI_SIZE_TO_PAGES((UINT32)(ImageBase + ImageSize - DxeCodeBase)); for (Index = BaseOffsetPageNumber; Index < TopOffsetPageNumber; Index ++) { @@ -321,17 +321,17 @@ CheckAndMarkFixLoadingMemoryUsageBitMap ( // // This page is already used. // - return EFI_NOT_FOUND; + return EFI_NOT_FOUND; } } - + // // Being here means the memory range is available. So mark the bits for the memory range - // + // for (Index = BaseOffsetPageNumber; Index < TopOffsetPageNumber; Index ++) { mDxeCodeMemoryRangeUsageBitMap[Index / 64] |= LShiftU64(1, (Index % 64)); } - return EFI_SUCCESS; + return EFI_SUCCESS; } /** @@ -358,10 +358,10 @@ GetPeCoffImageFixLoadingAssignedAddress( UINT16 NumberOfSections; IMAGE_FILE_HANDLE *Handle; UINT64 ValueInSectionHeader; - + Status = EFI_NOT_FOUND; - + // // Get PeHeader pointer // @@ -395,30 +395,30 @@ GetPeCoffImageFixLoadingAssignedAddress( } Status = EFI_NOT_FOUND; - + if ((SectionHeader.Characteristics & EFI_IMAGE_SCN_CNT_CODE) == 0) { // // Build tool will save the address in PointerToRelocations & PointerToLineNumbers fields in the first section header - // that doesn't point to code section in image header, as well as ImageBase field of image header. And there is an - // assumption that when the feature is enabled, if a module is assigned a loading address by tools, PointerToRelocations + // that doesn't point to code section in image header, as well as ImageBase field of image header. And there is an + // assumption that when the feature is enabled, if a module is assigned a loading address by tools, PointerToRelocations // & PointerToLineNumbers fields should NOT be Zero, or else, these 2 fields should be set to Zero // ValueInSectionHeader = ReadUnaligned64((UINT64*)&SectionHeader.PointerToRelocations); if (ValueInSectionHeader != 0) { // - // When the feature is configured as load module at fixed absolute address, the ImageAddress field of ImageContext + // When the feature is configured as load module at fixed absolute address, the ImageAddress field of ImageContext // hold the spcified address. If the feature is configured as load module at fixed offset, ImageAddress hold an offset // relative to top address // if ((INT64)PcdGet64(PcdLoadModuleAtFixAddressEnable) < 0) { - ImageContext->ImageAddress = gLoadModuleAtFixAddressConfigurationTable.DxeCodeTopAddress + (INT64)(INTN)ImageContext->ImageAddress; + ImageContext->ImageAddress = gLoadModuleAtFixAddressConfigurationTable.DxeCodeTopAddress + (INT64)(INTN)ImageContext->ImageAddress; } // // Check if the memory range is available. // Status = CheckAndMarkFixLoadingMemoryUsageBitMap (ImageContext->ImageAddress, (UINTN)(ImageContext->ImageSize + ImageContext->SectionAlignment)); } - break; + break; } SectionHeaderOffset += sizeof (EFI_IMAGE_SECTION_HEADER); } @@ -541,17 +541,17 @@ CoreLoadPeImage ( if (EFI_ERROR (Status)) { // - // If the code memory is not ready, invoke CoreAllocatePage with AllocateAnyPages to load the driver. - // + // If the code memory is not ready, invoke CoreAllocatePage with AllocateAnyPages to load the driver. + // DEBUG ((EFI_D_INFO|EFI_D_LOAD, "LOADING MODULE FIXED ERROR: Loading module at fixed address failed since specified memory is not available.\n")); - + Status = CoreAllocatePages ( AllocateAnyPages, (EFI_MEMORY_TYPE) (Image->ImageContext.ImageCodeMemoryType), Image->NumberOfPages, &Image->ImageContext.ImageAddress - ); - } + ); + } } else { if (Image->ImageContext.ImageAddress >= 0x100000 || Image->ImageContext.RelocationsStripped) { Status = CoreAllocatePages ( @@ -1030,10 +1030,10 @@ CoreUnloadAndCloseImage ( @retval EFI_LOAD_ERROR Image was not loaded because the image format was corrupt or not understood. @retval EFI_DEVICE_ERROR Image was not loaded because the device returned a read error. - @retval EFI_ACCESS_DENIED Image was not loaded because the platform policy prohibits the + @retval EFI_ACCESS_DENIED Image was not loaded because the platform policy prohibits the image from being loaded. NULL is returned in *ImageHandle. - @retval EFI_SECURITY_VIOLATION Image was loaded and an ImageHandle was created with a - valid EFI_LOADED_IMAGE_PROTOCOL. However, the current + @retval EFI_SECURITY_VIOLATION Image was loaded and an ImageHandle was created with a + valid EFI_LOADED_IMAGE_PROTOCOL. However, the current platform policy specifies that the image should not be started. **/ @@ -1145,7 +1145,7 @@ CoreLoadImageCommon ( // Get the source file buffer by its device path. // FHand.Source = GetFileBufferByFilePath ( - BootPolicy, + BootPolicy, FilePath, &FHand.SourceSize, &AuthenticationStatus @@ -1417,10 +1417,10 @@ Done: @retval EFI_LOAD_ERROR Image was not loaded because the image format was corrupt or not understood. @retval EFI_DEVICE_ERROR Image was not loaded because the device returned a read error. - @retval EFI_ACCESS_DENIED Image was not loaded because the platform policy prohibits the + @retval EFI_ACCESS_DENIED Image was not loaded because the platform policy prohibits the image from being loaded. NULL is returned in *ImageHandle. - @retval EFI_SECURITY_VIOLATION Image was loaded and an ImageHandle was created with a - valid EFI_LOADED_IMAGE_PROTOCOL. However, the current + @retval EFI_SECURITY_VIOLATION Image was loaded and an ImageHandle was created with a + valid EFI_LOADED_IMAGE_PROTOCOL. However, the current platform policy specifies that the image should not be started. **/ @@ -1453,10 +1453,10 @@ CoreLoadImage ( EFI_LOAD_PE_IMAGE_ATTRIBUTE_RUNTIME_REGISTRATION | EFI_LOAD_PE_IMAGE_ATTRIBUTE_DEBUG_IMAGE_INFO_TABLE_REGISTRATION ); - Handle = NULL; + Handle = NULL; if (!EFI_ERROR (Status)) { // - // ImageHandle will be valid only Status is success. + // ImageHandle will be valid only Status is success. // Handle = *ImageHandle; } @@ -1498,10 +1498,10 @@ CoreLoadImage ( @retval EFI_LOAD_ERROR Image was not loaded because the image format was corrupt or not understood. @retval EFI_DEVICE_ERROR Image was not loaded because the device returned a read error. - @retval EFI_ACCESS_DENIED Image was not loaded because the platform policy prohibits the + @retval EFI_ACCESS_DENIED Image was not loaded because the platform policy prohibits the image from being loaded. NULL is returned in *ImageHandle. - @retval EFI_SECURITY_VIOLATION Image was loaded and an ImageHandle was created with a - valid EFI_LOADED_IMAGE_PROTOCOL. However, the current + @retval EFI_SECURITY_VIOLATION Image was loaded and an ImageHandle was created with a + valid EFI_LOADED_IMAGE_PROTOCOL. However, the current platform policy specifies that the image should not be started. **/ @@ -1538,10 +1538,10 @@ CoreLoadImageEx ( Attribute ); - Handle = NULL; + Handle = NULL; if (!EFI_ERROR (Status)) { // - // ImageHandle will be valid only Status is success. + // ImageHandle will be valid only Status is success. // Handle = *ImageHandle; } diff --git a/MdeModulePkg/Core/Dxe/Image/Image.h b/MdeModulePkg/Core/Dxe/Image/Image.h index 7fb8c9368e..5cff84fee0 100644 --- a/MdeModulePkg/Core/Dxe/Image/Image.h +++ b/MdeModulePkg/Core/Dxe/Image/Image.h @@ -1,7 +1,7 @@ /** @file Data structure and functions to load and unload PeImage. -Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -21,7 +21,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. typedef struct { UINTN Signature; /// Image handle - EFI_HANDLE Handle; + EFI_HANDLE Handle; EFI_PE32_IMAGE_PROTOCOL Pe32Image; } LOAD_PE32_IMAGE_PRIVATE_DATA; @@ -70,10 +70,10 @@ typedef struct { @retval EFI_LOAD_ERROR Image was not loaded because the image format was corrupt or not understood. @retval EFI_DEVICE_ERROR Image was not loaded because the device returned a read error. - @retval EFI_ACCESS_DENIED Image was not loaded because the platform policy prohibits the + @retval EFI_ACCESS_DENIED Image was not loaded because the platform policy prohibits the image from being loaded. NULL is returned in *ImageHandle. - @retval EFI_SECURITY_VIOLATION Image was loaded and an ImageHandle was created with a - valid EFI_LOADED_IMAGE_PROTOCOL. However, the current + @retval EFI_SECURITY_VIOLATION Image was loaded and an ImageHandle was created with a + valid EFI_LOADED_IMAGE_PROTOCOL. However, the current platform policy specifies that the image should not be started. **/ diff --git a/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c b/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c index a91a719b4d..83ed43a16e 100644 --- a/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c +++ b/MdeModulePkg/Core/Dxe/Mem/MemoryProfileRecord.c @@ -1,7 +1,7 @@ /** @file Support routines for UEFI memory profile. - Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -76,10 +76,10 @@ GLOBAL_REMOVE_IF_UNREFERENCED UINTN mMemoryProfileDriverPathS @param[in, out] ProfileSize On entry, points to the size in bytes of the ProfileBuffer. On return, points to the size of the data returned in ProfileBuffer. @param[out] ProfileBuffer Profile buffer. - + @return EFI_SUCCESS Get the memory profile data successfully. @return EFI_UNSUPPORTED Memory profile is unsupported. - @return EFI_BUFFER_TO_SMALL The ProfileSize is too small for the resulting data. + @return EFI_BUFFER_TO_SMALL The ProfileSize is too small for the resulting data. ProfileSize is updated with the size required. **/ @@ -514,7 +514,7 @@ NeedRecordThisDriver ( // return TRUE; } - + // // Record FilePath without END node. // @@ -1572,10 +1572,10 @@ MemoryProfileCopyData ( @param[in, out] ProfileSize On entry, points to the size in bytes of the ProfileBuffer. On return, points to the size of the data returned in ProfileBuffer. @param[out] ProfileBuffer Profile buffer. - + @return EFI_SUCCESS Get the memory profile data successfully. @return EFI_UNSUPPORTED Memory profile is unsupported. - @return EFI_BUFFER_TO_SMALL The ProfileSize is too small for the resulting data. + @return EFI_BUFFER_TO_SMALL The ProfileSize is too small for the resulting data. ProfileSize is updated with the size required. **/ diff --git a/MdeModulePkg/Core/Dxe/Mem/Page.c b/MdeModulePkg/Core/Dxe/Mem/Page.c index 8d5d03a6d9..3b4cc08e7c 100644 --- a/MdeModulePkg/Core/Dxe/Mem/Page.c +++ b/MdeModulePkg/Core/Dxe/Mem/Page.c @@ -1,7 +1,7 @@ /** @file UEFI Memory page management functions. -Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -93,7 +93,7 @@ EFI_MEMORY_TYPE_INFORMATION gMemoryTypeInformation[EfiMaxMemoryType + 1] = { }; // // Only used when load module at fixed address feature is enabled. True means the memory is alreay successfully allocated -// and ready to load the module in to specified address.or else, the memory is not ready and module will be loaded at a +// and ready to load the module in to specified address.or else, the memory is not ready and module will be loaded at a // address assigned by DXE core. // GLOBAL_REMOVE_IF_UNREFERENCED BOOLEAN gLoadFixedAddressCodeMemoryReady = FALSE; @@ -178,22 +178,22 @@ CoreAddRange ( ASSERT_LOCKED (&gMemoryLock); DEBUG ((DEBUG_PAGE, "AddRange: %lx-%lx to %d\n", Start, End, Type)); - - // - // If memory of type EfiConventionalMemory is being added that includes the page - // starting at address 0, then zero the page starting at address 0. This has - // two benifits. It helps find NULL pointer bugs and it also maximizes - // compatibility with operating systems that may evaluate memory in this page - // for legacy data structures. If memory of any other type is added starting - // at address 0, then do not zero the page at address 0 because the page is being + + // + // If memory of type EfiConventionalMemory is being added that includes the page + // starting at address 0, then zero the page starting at address 0. This has + // two benifits. It helps find NULL pointer bugs and it also maximizes + // compatibility with operating systems that may evaluate memory in this page + // for legacy data structures. If memory of any other type is added starting + // at address 0, then do not zero the page at address 0 because the page is being // used for other purposes. - // + // if (Type == EfiConventionalMemory && Start == 0 && (End >= EFI_PAGE_SIZE - 1)) { if ((PcdGet8 (PcdNullPointerDetectionPropertyMask) & BIT0) == 0) { SetMem ((VOID *)(UINTN)Start, EFI_PAGE_SIZE, 0); } } - + // // Memory map being altered so updated key // @@ -454,8 +454,8 @@ PromoteMemoryResource ( return Promoted; } /** - This function try to allocate Runtime code & Boot time code memory range. If LMFA enabled, 2 patchable PCD - PcdLoadFixAddressRuntimeCodePageNumber & PcdLoadFixAddressBootTimeCodePageNumber which are set by tools will record the + This function try to allocate Runtime code & Boot time code memory range. If LMFA enabled, 2 patchable PCD + PcdLoadFixAddressRuntimeCodePageNumber & PcdLoadFixAddressBootTimeCodePageNumber which are set by tools will record the size of boot time and runtime code. **/ @@ -473,7 +473,7 @@ CoreLoadingFixedAddressHook ( // // Make sure these 2 areas are not initialzied. // - if (!gLoadFixedAddressCodeMemoryReady) { + if (!gLoadFixedAddressCodeMemoryReady) { RuntimeCodePageNumber = PcdGet32(PcdLoadFixAddressRuntimeCodePageNumber); BootTimeCodePageNumber= PcdGet32(PcdLoadFixAddressBootTimeCodePageNumber); RuntimeCodeBase = (EFI_PHYSICAL_ADDRESS)(gLoadModuleAtFixAddressConfigurationTable.DxeCodeTopAddress - EFI_PAGES_TO_SIZE (RuntimeCodePageNumber)); @@ -489,7 +489,7 @@ CoreLoadingFixedAddressHook ( ); if (EFI_ERROR(Status)) { // - // Runtime memory allocation failed + // Runtime memory allocation failed // return; } @@ -504,19 +504,19 @@ CoreLoadingFixedAddressHook ( ); if (EFI_ERROR(Status)) { // - // boot memory allocation failed. Free Runtime code range and will try the allocation again when - // new memory range is installed. - // - CoreFreePages ( + // boot memory allocation failed. Free Runtime code range and will try the allocation again when + // new memory range is installed. + // + CoreFreePages ( RuntimeCodeBase, RuntimeCodePageNumber ); return; } gLoadFixedAddressCodeMemoryReady = TRUE; - } + } return; -} +} /** Called to initialize the memory map and add descriptors to @@ -545,7 +545,7 @@ CoreAddMemoryDescriptor ( EFI_STATUS Status; UINTN Index; UINTN FreeIndex; - + if ((Start & EFI_PAGE_MASK) != 0) { return; } @@ -568,7 +568,7 @@ CoreAddMemoryDescriptor ( if (PcdGet64(PcdLoadModuleAtFixAddressEnable) != 0) { CoreLoadingFixedAddressHook(); } - + // // Check to see if the statistics for the different memory types have already been established // @@ -576,7 +576,7 @@ CoreAddMemoryDescriptor ( return; } - + // // Loop through each memory type in the order specified by the gMemoryTypeInformation[] array // @@ -1163,10 +1163,10 @@ FindFreePages ( // if ((UINT32)NewType < EfiMaxMemoryType && MaxAddress >= mMemoryTypeStatistics[NewType].MaximumAddress) { Start = CoreFindFreePagesI ( - mMemoryTypeStatistics[NewType].MaximumAddress, - mMemoryTypeStatistics[NewType].BaseAddress, - NoPages, - NewType, + mMemoryTypeStatistics[NewType].MaximumAddress, + mMemoryTypeStatistics[NewType].BaseAddress, + NoPages, + NewType, Alignment, NeedGuard ); @@ -1190,9 +1190,9 @@ FindFreePages ( } // - // The allocation did not succeed in any of the prefered bins even after - // promoting resources. Attempt to find free pages anywhere is the requested - // address range. If this allocation fails, then there are not enough + // The allocation did not succeed in any of the prefered bins even after + // promoting resources. Attempt to find free pages anywhere is the requested + // address range. If this allocation fails, then there are not enough // resources anywhere to satisfy the request. // Start = CoreFindFreePagesI (MaxAddress, 0, NoPages, NewType, Alignment, @@ -1311,7 +1311,7 @@ CoreInternalAllocatePages ( End = Start + NumberOfBytes - 1; if ((Start >= End) || - (Start > MaxAddress) || + (Start > MaxAddress) || (End > MaxAddress)) { return EFI_NOT_FOUND; } @@ -1571,7 +1571,7 @@ MergeMemoryMapDescriptor ( // // Check to see if MemoryMapDescriptor is immediately above MemoryMap // - if (MemoryMap->PhysicalStart + EFI_PAGES_TO_SIZE ((UINTN)MemoryMap->NumberOfPages) == MemoryMapDescriptor->PhysicalStart) { + if (MemoryMap->PhysicalStart + EFI_PAGES_TO_SIZE ((UINTN)MemoryMap->NumberOfPages) == MemoryMapDescriptor->PhysicalStart) { // // Merge MemoryMapDescriptor into MemoryMap // @@ -1604,7 +1604,7 @@ MergeMemoryMapDescriptor ( // // MemoryMapDescrtiptor could not be merged with any descriptors in MemoryMap. // - // Return the slot immediately after MemoryMapDescriptor as the next available + // Return the slot immediately after MemoryMapDescriptor as the next available // slot in the MemoryMap array // return NEXT_MEMORY_DESCRIPTOR (MemoryMapDescriptor, DescriptorSize); @@ -1678,7 +1678,7 @@ CoreGetMemoryMap ( NumberOfEntries = 0; for (Link = mGcdMemorySpaceMap.ForwardLink; Link != &mGcdMemorySpaceMap; Link = Link->ForwardLink) { GcdMapEntry = CR (Link, EFI_GCD_MAP_ENTRY, Link, EFI_GCD_MAP_SIGNATURE); - if ((GcdMapEntry->GcdMemoryType == EfiGcdMemoryTypePersistent) || + if ((GcdMapEntry->GcdMemoryType == EfiGcdMemoryTypePersistent) || (GcdMapEntry->GcdMemoryType == EfiGcdMemoryTypeReserved) || ((GcdMapEntry->GcdMemoryType == EfiGcdMemoryTypeMemoryMappedIo) && ((GcdMapEntry->Attributes & EFI_MEMORY_RUNTIME) == EFI_MEMORY_RUNTIME))) { @@ -1764,13 +1764,13 @@ CoreGetMemoryMap ( } // - // Check to see if the new Memory Map Descriptor can be merged with an + // Check to see if the new Memory Map Descriptor can be merged with an // existing descriptor if they are adjacent and have the same attributes // MemoryMap = MergeMemoryMapDescriptor (MemoryMapStart, MemoryMap, Size); } - + ZeroMem (&MergeGcdMapEntry, sizeof (MergeGcdMapEntry)); GcdMapEntry = NULL; for (Link = mGcdMemorySpaceMap.ForwardLink; ; Link = Link->ForwardLink) { @@ -1779,8 +1779,8 @@ CoreGetMemoryMap ( // Merge adjacent same type and attribute GCD memory range // GcdMapEntry = CR (Link, EFI_GCD_MAP_ENTRY, Link, EFI_GCD_MAP_SIGNATURE); - - if ((MergeGcdMapEntry.Capabilities == GcdMapEntry->Capabilities) && + + if ((MergeGcdMapEntry.Capabilities == GcdMapEntry->Capabilities) && (MergeGcdMapEntry.Attributes == GcdMapEntry->Attributes) && (MergeGcdMapEntry.GcdMemoryType == GcdMapEntry->GcdMemoryType) && (MergeGcdMapEntry.GcdIoType == GcdMapEntry->GcdIoType)) { @@ -1793,19 +1793,19 @@ CoreGetMemoryMap ( ((MergeGcdMapEntry.GcdMemoryType == EfiGcdMemoryTypeMemoryMappedIo) && ((MergeGcdMapEntry.Attributes & EFI_MEMORY_RUNTIME) == EFI_MEMORY_RUNTIME))) { // - // Page Align GCD range is required. When it is converted to EFI_MEMORY_DESCRIPTOR, - // it will be recorded as page PhysicalStart and NumberOfPages. + // Page Align GCD range is required. When it is converted to EFI_MEMORY_DESCRIPTOR, + // it will be recorded as page PhysicalStart and NumberOfPages. // ASSERT ((MergeGcdMapEntry.BaseAddress & EFI_PAGE_MASK) == 0); ASSERT (((MergeGcdMapEntry.EndAddress - MergeGcdMapEntry.BaseAddress + 1) & EFI_PAGE_MASK) == 0); - - // + + // // Create EFI_MEMORY_DESCRIPTOR for every Reserved and runtime MMIO GCD entries // MemoryMap->PhysicalStart = MergeGcdMapEntry.BaseAddress; MemoryMap->VirtualStart = 0; MemoryMap->NumberOfPages = RShiftU64 ((MergeGcdMapEntry.EndAddress - MergeGcdMapEntry.BaseAddress + 1), EFI_PAGE_SHIFT); - MemoryMap->Attribute = (MergeGcdMapEntry.Attributes & ~EFI_MEMORY_PORT_IO) | + MemoryMap->Attribute = (MergeGcdMapEntry.Attributes & ~EFI_MEMORY_PORT_IO) | (MergeGcdMapEntry.Capabilities & (EFI_MEMORY_RP | EFI_MEMORY_WP | EFI_MEMORY_XP | EFI_MEMORY_RO | EFI_MEMORY_UC | EFI_MEMORY_UCE | EFI_MEMORY_WC | EFI_MEMORY_WT | EFI_MEMORY_WB)); @@ -1820,33 +1820,33 @@ CoreGetMemoryMap ( } // - // Check to see if the new Memory Map Descriptor can be merged with an + // Check to see if the new Memory Map Descriptor can be merged with an // existing descriptor if they are adjacent and have the same attributes // MemoryMap = MergeMemoryMapDescriptor (MemoryMapStart, MemoryMap, Size); } - + if (MergeGcdMapEntry.GcdMemoryType == EfiGcdMemoryTypePersistent) { // - // Page Align GCD range is required. When it is converted to EFI_MEMORY_DESCRIPTOR, - // it will be recorded as page PhysicalStart and NumberOfPages. + // Page Align GCD range is required. When it is converted to EFI_MEMORY_DESCRIPTOR, + // it will be recorded as page PhysicalStart and NumberOfPages. // ASSERT ((MergeGcdMapEntry.BaseAddress & EFI_PAGE_MASK) == 0); ASSERT (((MergeGcdMapEntry.EndAddress - MergeGcdMapEntry.BaseAddress + 1) & EFI_PAGE_MASK) == 0); - // + // // Create EFI_MEMORY_DESCRIPTOR for every Persistent GCD entries // MemoryMap->PhysicalStart = MergeGcdMapEntry.BaseAddress; MemoryMap->VirtualStart = 0; MemoryMap->NumberOfPages = RShiftU64 ((MergeGcdMapEntry.EndAddress - MergeGcdMapEntry.BaseAddress + 1), EFI_PAGE_SHIFT); - MemoryMap->Attribute = MergeGcdMapEntry.Attributes | EFI_MEMORY_NV | + MemoryMap->Attribute = MergeGcdMapEntry.Attributes | EFI_MEMORY_NV | (MergeGcdMapEntry.Capabilities & (EFI_MEMORY_RP | EFI_MEMORY_WP | EFI_MEMORY_XP | EFI_MEMORY_RO | EFI_MEMORY_UC | EFI_MEMORY_UCE | EFI_MEMORY_WC | EFI_MEMORY_WT | EFI_MEMORY_WB)); MemoryMap->Type = EfiPersistentMemory; - + // - // Check to see if the new Memory Map Descriptor can be merged with an + // Check to see if the new Memory Map Descriptor can be merged with an // existing descriptor if they are adjacent and have the same attributes // MemoryMap = MergeMemoryMapDescriptor (MemoryMapStart, MemoryMap, Size); diff --git a/MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c b/MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c index fda6d44043..4a9217fa76 100644 --- a/MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c +++ b/MdeModulePkg/Core/Dxe/Misc/DebugImageInfo.c @@ -2,7 +2,7 @@ Support functions for managing debug image info table when loading and unloading images. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -65,9 +65,9 @@ CoreInitializeDebugImageInfoTable ( Memory = MAX_ADDRESS; } Status = CoreAllocatePages ( - AllocateMaxAddress, + AllocateMaxAddress, EfiBootServicesData, - RealPages, + RealPages, &Memory ); if (EFI_ERROR (Status)) { @@ -80,16 +80,16 @@ CoreInitializeDebugImageInfoTable ( // as close to the top of memory as feasible. // Status = CoreAllocatePages ( - AllocateAnyPages, + AllocateAnyPages, EfiBootServicesData, - RealPages, + RealPages, &Memory ); ASSERT_EFI_ERROR (Status); if (EFI_ERROR (Status)) { return; } - } + } // // Free overallocated pages @@ -121,13 +121,13 @@ CoreInitializeDebugImageInfoTable ( // // Initialize EFI_SYSTEM_TABLE_POINTER structure - // + // mDebugTable->Signature = EFI_SYSTEM_TABLE_SIGNATURE; mDebugTable->EfiSystemTableBase = (EFI_PHYSICAL_ADDRESS) (UINTN) gDxeCoreST; mDebugTable->Crc32 = 0; - + // - // Install the EFI_SYSTEM_TABLE_POINTER structure in the EFI System + // Install the EFI_SYSTEM_TABLE_POINTER structure in the EFI System // Configuration Table // Status = CoreInstallConfigurationTable (&gEfiDebugImageInfoTableGuid, &mDebugInfoTableHeader); @@ -182,7 +182,7 @@ CoreNewDebugImageInfoEntry ( mDebugInfoTableHeader.UpdateStatus |= EFI_DEBUG_IMAGE_INFO_UPDATE_IN_PROGRESS; Table = mDebugInfoTableHeader.EfiDebugImageInfoTable; - + if (mDebugInfoTableHeader.TableSize < mMaxTableEntries) { // // We still have empty entires in the Table, find the first empty entry. diff --git a/MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c b/MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c index 35156aea14..43e5be8b54 100644 --- a/MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c +++ b/MdeModulePkg/Core/Dxe/Misc/MemoryAttributesTable.c @@ -1,7 +1,7 @@ /** @file UEFI MemoryAttributesTable support -Copyright (c) 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -201,7 +201,7 @@ InstallMemoryAttributesTable ( if (mMemoryAttributesTable != NULL) { FreePool (mMemoryAttributesTable); } - mMemoryAttributesTable = MemoryAttributesTable; + mMemoryAttributesTable = MemoryAttributesTable; } /** @@ -237,7 +237,7 @@ InstallMemoryAttributesTableOnReadyToBoot ( ) { InstallMemoryAttributesTable (); - mMemoryAttributesTableReadyToBoot = TRUE; + mMemoryAttributesTableReadyToBoot = TRUE; } /** diff --git a/MdeModulePkg/Core/Dxe/Misc/Stall.c b/MdeModulePkg/Core/Dxe/Misc/Stall.c index 95a561546f..171d5c0220 100644 --- a/MdeModulePkg/Core/Dxe/Misc/Stall.c +++ b/MdeModulePkg/Core/Dxe/Misc/Stall.c @@ -1,7 +1,7 @@ /** @file UEFI Miscellaneous boot Services Stall service implementation -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -19,8 +19,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "DxeMain.h" /** - Internal worker function to call the Metronome Architectural Protocol for - the number of ticks specified by the UINT64 Counter value. WaitForTick() + Internal worker function to call the Metronome Architectural Protocol for + the number of ticks specified by the UINT64 Counter value. WaitForTick() service of the Metronome Architectural Protocol uses a UINT32 for the number of ticks to wait, so this function loops when Counter is larger than 0xffffffff. @@ -69,7 +69,7 @@ CoreStall ( // if ((UINT64) Microseconds > 0x1999999999999999ULL) { // - // Microseconds is too large to multiple by 10 first. Perform the divide + // Microseconds is too large to multiple by 10 first. Perform the divide // operation first and loop 10 times to avoid 64-bit math overflow. // Counter = DivU64x32Remainder ( @@ -79,11 +79,11 @@ CoreStall ( ); for (Index = 0; Index < 10; Index++) { CoreInternalWaitForTick (Counter); - } + } if (Remainder != 0) { // - // If Remainder was not zero, then normally, Counter would be rounded + // If Remainder was not zero, then normally, Counter would be rounded // up by 1 tick. In this case, since a loop for 10 counts was used // to emulate the multiply by 10 operation, Counter needs to be rounded // up by 10 counts. diff --git a/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c b/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c index 9561ae1766..a1d5316c65 100644 --- a/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c +++ b/MdeModulePkg/Core/Dxe/SectionExtraction/CoreSectionExtraction.c @@ -27,7 +27,7 @@ 3) A support protocol is not found, and the data is not available to be read without it. This results in EFI_PROTOCOL_ERROR. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -67,7 +67,7 @@ typedef struct { UINTN EncapsulatedStreamHandle; EFI_GUID *EncapsulationGuid; // - // If the section REQUIRES an extraction protocol, register for RPN + // If the section REQUIRES an extraction protocol, register for RPN // when the required GUIDed extraction protocol becomes available. // EFI_EVENT Event; @@ -499,7 +499,7 @@ ChildIsType ( @return TRUE The GuidedSectionGuid could be identified, and the pointer to the Guided Section Extraction Protocol will be returned to *GuidedSectionExtraction. - @return FALSE The GuidedSectionGuid could not be identified, or + @return FALSE The GuidedSectionGuid could not be identified, or the Guided Section Extraction Protocol has not been installed yet. **/ @@ -561,9 +561,9 @@ NotifyGuidedExtraction ( UINTN NewStreamBufferSize; UINT32 AuthenticationStatus; RPN_EVENT_CONTEXT *Context; - + Context = RpnContext; - + GuidedHeader = (EFI_GUID_DEFINED_SECTION *) (Context->ParentStream->StreamBuffer + Context->ChildNode->OffsetInStream); ASSERT (GuidedHeader->CommonHeader.Type == EFI_SECTION_GUID_DEFINED); @@ -612,7 +612,7 @@ NotifyGuidedExtraction ( gBS->CloseEvent (Event); Context->ChildNode->Event = NULL; FreePool (Context); -} +} /** Constructor for RPN event when a missing GUIDED_SECTION_EXTRACTION_PROTOCOL appears... @@ -628,16 +628,16 @@ CreateGuidedExtractionRpnEvent ( ) { RPN_EVENT_CONTEXT *Context; - + // // Allocate new event structure and context // Context = AllocatePool (sizeof (RPN_EVENT_CONTEXT)); ASSERT (Context != NULL); - + Context->ChildNode = ChildNode; Context->ParentStream = ParentStream; - + Context->ChildNode->Event = EfiCreateProtocolNotifyEvent ( Context->ChildNode->EncapsulationGuid, TPL_NOTIFY, @@ -893,8 +893,8 @@ CreateChildNode ( // if ((GuidedSectionAttributes & EFI_GUIDED_SECTION_PROCESSING_REQUIRED) != 0) { // - // If the section REQUIRES an extraction protocol, register for RPN - // when the required GUIDed extraction protocol becomes available. + // If the section REQUIRES an extraction protocol, register for RPN + // when the required GUIDed extraction protocol becomes available. // CreateGuidedExtractionRpnEvent (Stream, Node); } else { diff --git a/MdeModulePkg/Core/DxeIplPeim/Arm/DxeLoadFunc.c b/MdeModulePkg/Core/DxeIplPeim/Arm/DxeLoadFunc.c index 3acc4544b4..176d361f19 100644 --- a/MdeModulePkg/Core/DxeIplPeim/Arm/DxeLoadFunc.c +++ b/MdeModulePkg/Core/DxeIplPeim/Arm/DxeLoadFunc.c @@ -1,7 +1,7 @@ /** @file - ARM specifc functionality for DxeLoad. - -Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
+ ARM specifc functionality for DxeLoad. + +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
Portions copyright (c) 2008 - 2009, Apple Inc. All rights reserved.
This program and the accompanying materials @@ -65,7 +65,7 @@ HandOffToDxeCore ( // // Update the contents of BSP stack HOB to reflect the real stack info passed to DxeCore. - // + // UpdateStackHob ((EFI_PHYSICAL_ADDRESS)(UINTN) BaseOfStack, STACK_SIZE); SwitchStack ( diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.uni b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.uni index 1a319c209c..24b3ea4433 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIpl.uni +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIpl.uni @@ -5,13 +5,13 @@ // PPI to discover and dispatch the DXE Foundation and components that are // needed to run the DXE Foundation. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeIplExtra.uni b/MdeModulePkg/Core/DxeIplPeim/DxeIplExtra.uni index 883a246dc8..75b17fe91d 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeIplExtra.uni +++ b/MdeModulePkg/Core/DxeIplPeim/DxeIplExtra.uni @@ -1,7 +1,7 @@ // /** @file // DxeIpl Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Core DXE Services Initial Program Loader" diff --git a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c index 178bac47e4..8bc0caf8a1 100644 --- a/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c +++ b/MdeModulePkg/Core/DxeIplPeim/DxeLoad.c @@ -67,7 +67,7 @@ CONST EFI_PEI_NOTIFY_DESCRIPTOR mMemoryDiscoveredNotifyList = { @param PeiServices Describes the list of possible PEI Services. @retval EFI_SUCESS The entry point of DXE IPL PEIM executes successfully. - @retval Others Some error occurs during the execution of this function. + @retval Others Some error occurs during the execution of this function. **/ EFI_STATUS @@ -87,8 +87,8 @@ PeimInitializeDxeIpl ( Status = PeiServicesRegisterForShadow (FileHandle); if (Status == EFI_SUCCESS) { // - // EFI_SUCESS means it is the first time to call register for shadow. - // + // EFI_SUCESS means it is the first time to call register for shadow. + // return Status; } @@ -116,7 +116,7 @@ PeimInitializeDxeIpl ( // and section extraction. // Status = InstallIplPermanentMemoryPpis (NULL, NULL, NULL); - ASSERT_EFI_ERROR (Status); + ASSERT_EFI_ERROR (Status); } else { // // Install memory discovered PPI notification to install PPIs for @@ -160,7 +160,7 @@ InstallIplPermanentMemoryPpis ( EFI_PEI_PPI_DESCRIPTOR *GuidPpi; // - // Get custom extract guided section method guid list + // Get custom extract guided section method guid list // ExtractHandlerNumber = ExtractGuidedSectionGetGuidList (&ExtractHandlerGuidTable); @@ -189,7 +189,7 @@ InstallIplPermanentMemoryPpis ( } /** - Validate variable data for the MemoryTypeInformation. + Validate variable data for the MemoryTypeInformation. @param MemoryData Variable data. @param MemoryDataSize Variable data length. @@ -236,16 +236,16 @@ ValidateMemoryTypeInfoVariable ( } /** - Main entry point to last PEIM. + Main entry point to last PEIM. This function finds DXE Core in the firmware volume and transfer the control to DXE core. - + @param This Entry point for DXE IPL PPI. @param PeiServices General purpose services available to every PEIM. @param HobList Address to the Pei HOB list. - - @return EFI_SUCCESS DXE core was successfully loaded. + + @return EFI_SUCCESS DXE core was successfully loaded. @return EFI_OUT_OF_RESOURCES There are not enough resources to load DXE core. **/ @@ -295,7 +295,7 @@ DxeLoadCore ( ); } ASSERT_EFI_ERROR (Status); - + Status = S3Resume->S3RestoreConfig2 (S3Resume); ASSERT_EFI_ERROR (Status); } else if (BootMode == BOOT_IN_RECOVERY_MODE) { @@ -310,7 +310,7 @@ DxeLoadCore ( if (EFI_ERROR (Status)) { DEBUG ((DEBUG_ERROR, "Locate Recovery PPI Failed.(Status = %r)\n", Status)); // - // Report Status code the failure of locating Recovery PPI + // Report Status code the failure of locating Recovery PPI // REPORT_STATUS_CODE ( EFI_ERROR_CODE | EFI_ERROR_MAJOR, @@ -350,8 +350,8 @@ DxeLoadCore ( ); if (!EFI_ERROR (Status)) { DataSize = sizeof (MemoryData); - Status = Variable->GetVariable ( - Variable, + Status = Variable->GetVariable ( + Variable, EFI_MEMORY_TYPE_INFORMATION_VARIABLE_NAME, &gEfiMemoryTypeInformationGuid, NULL, @@ -441,7 +441,7 @@ DxeLoadCore ( instance that contains DxeCore. @return FileHandle of DxeCore to load DxeCore. - + **/ EFI_PEI_FILE_HANDLE DxeIplFindDxeCore ( @@ -452,7 +452,7 @@ DxeIplFindDxeCore ( UINTN Instance; EFI_PEI_FV_HANDLE VolumeHandle; EFI_PEI_FILE_HANDLE FileHandle; - + Instance = 0; while (TRUE) { // @@ -467,7 +467,7 @@ DxeIplFindDxeCore ( REPORT_STATUS_CODE (EFI_PROGRESS_CODE, (EFI_SOFTWARE_PEI_MODULE | EFI_SW_PEI_CORE_EC_DXE_CORRUPT)); } ASSERT_EFI_ERROR (Status); - + // // Find the DxeCore file type from the beginning in this firmware volume. // @@ -520,7 +520,7 @@ DxeIplFindDxeCore ( output buffer. If the input section's GuidedSectionHeader. Attributes field has the - EFI_GUIDED_SECTION_AUTH_STATUS_VALID + EFI_GUIDED_SECTION_AUTH_STATUS_VALID bit as clear, AuthenticationStatus must return zero. These bits reflect the @@ -530,14 +530,14 @@ DxeIplFindDxeCore ( EFI_SUCCESS, the value of AuthenticationStatus is undefined. - + @retval EFI_SUCCESS The InputSection was successfully processed and the section contents were returned. - + @retval EFI_OUT_OF_RESOURCES The system has insufficient resources to process the request. - + @retval EFI_INVALID_PARAMETER The GUID in InputSection does not match this instance of the GUIDed Section Extraction PPI. @@ -558,7 +558,7 @@ CustomGuidedSectionExtract ( UINT32 ScratchBufferSize; UINT32 OutputBufferSize; UINT16 SectionAttribute; - + // // Init local variable // @@ -573,12 +573,12 @@ CustomGuidedSectionExtract ( &ScratchBufferSize, &SectionAttribute ); - + if (EFI_ERROR (Status)) { DEBUG ((DEBUG_ERROR, "GetInfo from guided section Failed - %r\n", Status)); return Status; } - + if (ScratchBufferSize != 0) { // // Allocate scratch buffer @@ -589,7 +589,7 @@ CustomGuidedSectionExtract ( } } - if (((SectionAttribute & EFI_GUIDED_SECTION_PROCESSING_REQUIRED) != 0) && OutputBufferSize > 0) { + if (((SectionAttribute & EFI_GUIDED_SECTION_PROCESSING_REQUIRED) != 0) && OutputBufferSize > 0) { // // Allocate output buffer // @@ -599,9 +599,9 @@ CustomGuidedSectionExtract ( } DEBUG ((DEBUG_INFO, "Customized Guided section Memory Size required is 0x%x and address is 0x%p\n", OutputBufferSize, *OutputBuffer)); } - + Status = ExtractGuidedSectionDecode ( - InputSection, + InputSection, OutputBuffer, ScratchBuffer, AuthenticationStatus @@ -613,9 +613,9 @@ CustomGuidedSectionExtract ( DEBUG ((DEBUG_ERROR, "Extract guided section Failed - %r\n", Status)); return Status; } - + *OutputSize = (UINTN) OutputBufferSize; - + return EFI_SUCCESS; } @@ -627,7 +627,7 @@ CustomGuidedSectionExtract ( This function looks up the compression type field in the input section and applies the appropriate compression algorithm to compress the section to a callee allocated buffer. - + @param This Points to this instance of the EFI_PEI_DECOMPRESS_PEI PPI. @param CompressionSection Points to the compressed section. @@ -635,14 +635,14 @@ CustomGuidedSectionExtract ( sections. @param OutputSize Holds the returned size of the decompress section streams. - + @retval EFI_SUCCESS The section was decompressed successfully. OutputBuffer contains the resulting data and OutputSize contains the resulting size. **/ EFI_STATUS -EFIAPI +EFIAPI Decompress ( IN CONST EFI_PEI_DECOMPRESS_PPI *This, IN CONST EFI_COMPRESSION_SECTION *CompressionSection, @@ -676,7 +676,7 @@ Decompress ( UncompressedLength = CompressionSection->UncompressedLength; CompressionType = CompressionSection->CompressionType; } - + // // This is a compression set, expand it // @@ -791,8 +791,8 @@ UpdateStackHob ( while ((Hob.Raw = GetNextHob (EFI_HOB_TYPE_MEMORY_ALLOCATION, Hob.Raw)) != NULL) { if (CompareGuid (&gEfiHobMemoryAllocStackGuid, &(Hob.MemoryAllocationStack->AllocDescriptor.Name))) { // - // Build a new memory allocation HOB with old stack info with EfiBootServicesData type. Need to - // avoid this region be reclaimed by DXE core as the IDT built in SEC might be on stack, and some + // Build a new memory allocation HOB with old stack info with EfiBootServicesData type. Need to + // avoid this region be reclaimed by DXE core as the IDT built in SEC might be on stack, and some // PEIMs may also keep key information on stack // BuildMemoryAllocationHob ( diff --git a/MdeModulePkg/Core/DxeIplPeim/Ebc/DxeLoadFunc.c b/MdeModulePkg/Core/DxeIplPeim/Ebc/DxeLoadFunc.c index f06bd75891..07904aceda 100644 --- a/MdeModulePkg/Core/DxeIplPeim/Ebc/DxeLoadFunc.c +++ b/MdeModulePkg/Core/DxeIplPeim/Ebc/DxeLoadFunc.c @@ -1,7 +1,7 @@ /** @file EBC-specific functionality for DxeLoad. -Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -58,7 +58,7 @@ HandOffToDxeCore ( // // Update the contents of BSP stack HOB to reflect the real stack info passed to DxeCore. - // + // UpdateStackHob ((EFI_PHYSICAL_ADDRESS)(UINTN) BaseOfStack, STACK_SIZE); // diff --git a/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c b/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c index 0ec60893ee..d5aa0474b0 100644 --- a/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c +++ b/MdeModulePkg/Core/DxeIplPeim/Ia32/DxeLoadFunc.c @@ -1,7 +1,7 @@ /** @file Ia32-specific functionality for DxeLoad. -Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
Copyright (c) 2017, AMD Incorporated. All rights reserved.
This program and the accompanying materials @@ -73,7 +73,7 @@ Create4GPageTablesIa32Pae ( IN EFI_PHYSICAL_ADDRESS StackBase, IN UINTN StackSize ) -{ +{ UINT8 PhysicalAddressBits; EFI_PHYSICAL_ADDRESS PhysicalAddress; UINTN IndexOfPdpEntries; @@ -112,7 +112,7 @@ Create4GPageTablesIa32Pae ( // // Each Directory Pointer entries points to a page of Page Directory entires. // So allocate space for them and fill them in in the IndexOfPageDirectoryEntries loop. - // + // PageDirectoryEntry = (VOID *) PageAddress; PageAddress += SIZE_4KB; diff --git a/MdeModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c b/MdeModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c index b75a4489bf..81efcfe93d 100644 --- a/MdeModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c +++ b/MdeModulePkg/Core/DxeIplPeim/X64/DxeLoadFunc.c @@ -1,7 +1,7 @@ /** @file x64-specifc functionality for DxeLoad. -Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -97,7 +97,7 @@ HandOffToDxeCore ( ASSERT (PcdGetBool (PcdSetNxForStack) == FALSE); ASSERT (PcdGetBool (PcdCpuStackGuard) == FALSE); } - + // // End of PEI phase signal // @@ -110,7 +110,7 @@ HandOffToDxeCore ( // // Update the contents of BSP stack HOB to reflect the real stack info passed to DxeCore. - // + // UpdateStackHob ((EFI_PHYSICAL_ADDRESS)(UINTN) BaseOfStack, STACK_SIZE); // diff --git a/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c b/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c index d7a86c0d30..496e219913 100644 --- a/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c +++ b/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c @@ -1,9 +1,9 @@ /** @file - x64 Virtual Memory Management Services in the form of an IA-32 driver. + x64 Virtual Memory Management Services in the form of an IA-32 driver. Used to establish a 1:1 Virtual to Physical Mapping that is required to enter Long Mode (x64 64-bit mode). - While we make a 1:1 mapping (identity mapping) for all physical pages + While we make a 1:1 mapping (identity mapping) for all physical pages we still need to use the MTRR's to ensure that the cachability attributes for all memory regions is correct. @@ -15,7 +15,7 @@ 2) IA-32 Intel(R) Architecture Software Developer's Manual Volume 2:Instruction Set Reference, Intel 3) IA-32 Intel(R) Architecture Software Developer's Manual Volume 3:System Programmer's Guide, Intel -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
Copyright (c) 2017, AMD Incorporated. All rights reserved.
This program and the accompanying materials @@ -26,7 +26,7 @@ http://opensource.org/licenses/bsd-license.php THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -**/ +**/ #include "DxeIpl.h" #include "VirtualMemory.h" @@ -574,7 +574,7 @@ CreateIdentityMappingPageTables ( IN EFI_PHYSICAL_ADDRESS StackBase, IN UINTN StackSize ) -{ +{ UINT32 RegEax; UINT32 RegEdx; UINT8 PhysicalAddressBits; @@ -647,7 +647,7 @@ CreateIdentityMappingPageTables ( } // - // Pre-allocate big pages to avoid later allocations. + // Pre-allocate big pages to avoid later allocations. // if (!Page1GSupport) { TotalPagesNum = (NumberOfPdpEntriesNeeded + 1) * NumberOfPml4EntriesNeeded + 1; @@ -682,7 +682,7 @@ CreateIdentityMappingPageTables ( if (Page1GSupport) { PageDirectory1GEntry = (VOID *) PageDirectoryPointerEntry; - + for (IndexOfPageDirectoryEntries = 0; IndexOfPageDirectoryEntries < 512; IndexOfPageDirectoryEntries++, PageDirectory1GEntry++, PageAddress += SIZE_1GB) { if (ToSplitPageTable (PageAddress, SIZE_1GB, StackBase, StackSize)) { Split1GPageTo2M (PageAddress, (UINT64 *) PageDirectory1GEntry, StackBase, StackSize); @@ -701,7 +701,7 @@ CreateIdentityMappingPageTables ( // // Each Directory Pointer entries points to a page of Page Directory entires. // So allocate space for them and fill them in in the IndexOfPageDirectoryEntries loop. - // + // PageDirectoryEntry = (VOID *) BigPageAddress; BigPageAddress += SIZE_4KB; diff --git a/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.h b/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.h index e7959b2cf0..85457ff937 100644 --- a/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.h +++ b/MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.h @@ -1,5 +1,5 @@ /** @file - x64 Long Mode Virtual Memory Management Definitions + x64 Long Mode Virtual Memory Management Definitions References: 1) IA-32 Intel(R) Architecture Software Developer's Manual Volume 1:Basic Architecture, Intel @@ -7,7 +7,7 @@ 3) IA-32 Intel(R) Architecture Software Developer's Manual Volume 3:System Programmer's Guide, Intel 4) AMD64 Architecture Programmer's Manual Volume 2: System Programming -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
Copyright (c) 2017, AMD Incorporated. All rights reserved.
This program and the accompanying materials @@ -18,7 +18,7 @@ http://opensource.org/licenses/bsd-license.php THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -**/ +**/ #ifndef _VIRTUAL_MEMORY_H_ #define _VIRTUAL_MEMORY_H_ @@ -110,7 +110,7 @@ typedef union { UINT64 CacheDisabled:1; // 0 = Cached, 1=Non-Cached UINT64 Accessed:1; // 0 = Not accessed, 1 = Accessed (set by CPU) UINT64 Dirty:1; // 0 = Not Dirty, 1 = written by processor on access to page - UINT64 MustBe1:1; // Must be 1 + UINT64 MustBe1:1; // Must be 1 UINT64 Global:1; // 0 = Not global page, 1 = global page TLB not cleared on CR3 write UINT64 Available:3; // Available for use by system software UINT64 PAT:1; // @@ -134,7 +134,7 @@ typedef union { UINT64 CacheDisabled:1; // 0 = Cached, 1=Non-Cached UINT64 Accessed:1; // 0 = Not accessed, 1 = Accessed (set by CPU) UINT64 Dirty:1; // 0 = Not Dirty, 1 = written by processor on access to page - UINT64 MustBe1:1; // Must be 1 + UINT64 MustBe1:1; // Must be 1 UINT64 Global:1; // 0 = Not global page, 1 = global page TLB not cleared on CR3 write UINT64 Available:3; // Available for use by system software UINT64 PAT:1; // @@ -223,9 +223,9 @@ CreateIdentityMappingPageTables ( /** - + Fix up the vector number in the vector code. - + @param VectorBase Base address of the vector handler. @param VectorNum Index of vector. @@ -239,11 +239,11 @@ AsmVectorFixup ( /** - + Get the information of vector template. - + @param TemplateBase Base address of the template code. - + @return Size of the Template code. **/ @@ -313,4 +313,4 @@ AllocatePageTableMemory ( IN UINTN Pages ); -#endif +#endif diff --git a/MdeModulePkg/Core/Pei/BootMode/BootMode.c b/MdeModulePkg/Core/Pei/BootMode/BootMode.c index 39afeba838..af7d8b1058 100644 --- a/MdeModulePkg/Core/Pei/BootMode/BootMode.c +++ b/MdeModulePkg/Core/Pei/BootMode/BootMode.c @@ -4,15 +4,15 @@ SetBootMode() See PI Specification volume I, chapter 9 Boot Paths for additional information on the boot mode. - -Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -35,7 +35,7 @@ PeiGetBootMode ( IN OUT EFI_BOOT_MODE *BootMode ) { - PEI_CORE_INSTANCE *PrivateData; + PEI_CORE_INSTANCE *PrivateData; EFI_HOB_HANDOFF_INFO_TABLE *HandOffHob; @@ -44,13 +44,13 @@ PeiGetBootMode ( } PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS(PeiServices); - + HandOffHob = (PrivateData->HobList.HandoffInformationTable); - + *BootMode = HandOffHob->BootMode; - - return EFI_SUCCESS; + + return EFI_SUCCESS; } @@ -71,16 +71,16 @@ PeiSetBootMode ( IN EFI_BOOT_MODE BootMode ) { - PEI_CORE_INSTANCE *PrivateData; + PEI_CORE_INSTANCE *PrivateData; EFI_HOB_HANDOFF_INFO_TABLE *HandOffHob; PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS(PeiServices); - + HandOffHob = (PrivateData->HobList.HandoffInformationTable); - + HandOffHob->BootMode = BootMode; - return EFI_SUCCESS; + return EFI_SUCCESS; } diff --git a/MdeModulePkg/Core/Pei/CpuIo/CpuIo.c b/MdeModulePkg/Core/Pei/CpuIo/CpuIo.c index c82c221540..e065a6c988 100644 --- a/MdeModulePkg/Core/Pei/CpuIo/CpuIo.c +++ b/MdeModulePkg/Core/Pei/CpuIo/CpuIo.c @@ -1,19 +1,19 @@ /** @file The default version of EFI_PEI_CPU_IO_PPI support published by PeiServices in PeiCore initialization phase. - + EFI_PEI_CPU_IO_PPI is installed by some platform or chipset-specific PEIM that abstracts the processor-visible I/O operations. When PeiCore is started, the default version of EFI_PEI_CPU_IO_PPI will be assigned to PeiServices table. - -Copyright (c) 2009, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -52,12 +52,12 @@ EFI_PEI_CPU_IO_PPI gPeiDefaultCpuIoPpi = { /** Memory-based read services. - - This function is to perform the Memory Access Read service based on installed - instance of the EFI_PEI_CPU_IO_PPI. - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then - return EFI_NOT_YET_AVAILABLE. - + + This function is to perform the Memory Access Read service based on installed + instance of the EFI_PEI_CPU_IO_PPI. + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + return EFI_NOT_YET_AVAILABLE. + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @@ -67,7 +67,7 @@ EFI_PEI_CPU_IO_PPI gPeiDefaultCpuIoPpi = { @param Buffer A pointer to the buffer of data. @retval EFI_SUCCESS The function completed successfully. - @retval EFI_NOT_YET_AVAILABLE The service has not been installed. + @retval EFI_NOT_YET_AVAILABLE The service has not been installed. **/ EFI_STATUS EFIAPI @@ -82,15 +82,15 @@ PeiDefaultMemRead ( { return EFI_NOT_AVAILABLE_YET; } - + /** Memory-based write services. - - This function is to perform the Memory Access Write service based on installed - instance of the EFI_PEI_CPU_IO_PPI. - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then - return EFI_NOT_YET_AVAILABLE. - + + This function is to perform the Memory Access Write service based on installed + instance of the EFI_PEI_CPU_IO_PPI. + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + return EFI_NOT_YET_AVAILABLE. + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @@ -100,7 +100,7 @@ PeiDefaultMemRead ( @param Buffer A pointer to the buffer of data. @retval EFI_SUCCESS The function completed successfully. - @retval EFI_NOT_YET_AVAILABLE The service has not been installed. + @retval EFI_NOT_YET_AVAILABLE The service has not been installed. **/ EFI_STATUS EFIAPI @@ -118,11 +118,11 @@ PeiDefaultMemWrite ( /** IO-based read services. - + This function is to perform the IO-base read service for the EFI_PEI_CPU_IO_PPI. - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then - return EFI_NOT_YET_AVAILABLE. - + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + return EFI_NOT_YET_AVAILABLE. + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @@ -150,11 +150,11 @@ PeiDefaultIoRead ( /** IO-based write services. - + This function is to perform the IO-base write service for the EFI_PEI_CPU_IO_PPI. - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then - return EFI_NOT_YET_AVAILABLE. - + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + return EFI_NOT_YET_AVAILABLE. + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @@ -182,10 +182,10 @@ PeiDefaultIoWrite ( /** 8-bit I/O read operations. - - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return 0. - + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Address The physical address of the access. @@ -205,10 +205,10 @@ PeiDefaultIoRead8 ( /** Reads an 16-bit I/O port. - - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return 0. - + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Address The physical address of the access. @@ -228,10 +228,10 @@ PeiDefaultIoRead16 ( /** Reads an 32-bit I/O port. - - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return 0. - + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Address The physical address of the access. @@ -251,10 +251,10 @@ PeiDefaultIoRead32 ( /** Reads an 64-bit I/O port. - - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return 0. - + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Address The physical address of the access. @@ -276,7 +276,7 @@ PeiDefaultIoRead64 ( 8-bit I/O write operations. If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then do nothing. - + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Address The physical address of the access. @@ -291,13 +291,13 @@ PeiDefaultIoWrite8 ( IN UINT8 Data ) { -} +} /** 16-bit I/O write operations. If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then do nothing. - + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Address The physical address of the access. @@ -318,7 +318,7 @@ PeiDefaultIoWrite16 ( 32-bit I/O write operations. If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then do nothing. - + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Address The physical address of the access. @@ -339,7 +339,7 @@ PeiDefaultIoWrite32 ( 64-bit I/O write operations. If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then do nothing. - + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Address The physical address of the access. @@ -359,9 +359,9 @@ PeiDefaultIoWrite64 ( /** 8-bit memory read operations. - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return 0. - + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Address The physical address of the access. @@ -378,14 +378,14 @@ PeiDefaultMemRead8 ( ) { return 0; -} +} /** 16-bit memory read operations. - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return 0. - + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Address The physical address of the access. @@ -402,14 +402,14 @@ PeiDefaultMemRead16 ( ) { return 0; -} +} /** 32-bit memory read operations. - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return 0. - + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Address The physical address of the access. @@ -426,14 +426,14 @@ PeiDefaultMemRead32 ( ) { return 0; -} +} /** 64-bit memory read operations. - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return 0. - + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Address The physical address of the access. @@ -450,13 +450,13 @@ PeiDefaultMemRead64 ( ) { return 0; -} +} /** 8-bit memory write operations. If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then do nothing. - + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Address The physical address of the access. @@ -472,13 +472,13 @@ PeiDefaultMemWrite8 ( IN UINT8 Data ) { -} +} /** 16-bit memory write operations. If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then do nothing. - + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Address The physical address of the access. @@ -494,7 +494,7 @@ PeiDefaultMemWrite16 ( IN UINT16 Data ) { -} +} /** 32-bit memory write operations. @@ -516,13 +516,13 @@ PeiDefaultMemWrite32 ( IN UINT32 Data ) { -} +} /** 64-bit memory write operations. If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then do nothing. - + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Address The physical address of the access. @@ -538,4 +538,4 @@ PeiDefaultMemWrite64 ( IN UINT64 Data ) { -} +} diff --git a/MdeModulePkg/Core/Pei/Dependency/Dependency.c b/MdeModulePkg/Core/Pei/Dependency/Dependency.c index e71566b5a7..32003a0114 100644 --- a/MdeModulePkg/Core/Pei/Dependency/Dependency.c +++ b/MdeModulePkg/Core/Pei/Dependency/Dependency.c @@ -5,14 +5,14 @@ if a driver can be scheduled for execution. The criteria for schedulability is that the dependency expression is satisfied. -Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -42,17 +42,17 @@ IsPpiInstalled ( VOID *PeiInstance; EFI_STATUS Status; EFI_GUID PpiGuid; - + // // If there is no GUID to evaluate, just return current result on stack. // if (Stack->Operator == NULL) { return Stack->Result; } - + // // Copy the Guid into a locale variable so that there are no - // possibilities of alignment faults for cross-compilation + // possibilities of alignment faults for cross-compilation // environments such as Intel?Itanium(TM). // CopyMem(&PpiGuid, Stack->Operator, sizeof(EFI_GUID)); @@ -70,7 +70,7 @@ IsPpiInstalled ( if (EFI_ERROR(Status)) { return FALSE; } - + return TRUE; } @@ -111,12 +111,12 @@ PeimDispatchReadiness ( while (TRUE) { switch (*(Iterator++)) { - + // - // For performance reason we put the frequently used items in front of + // For performance reason we put the frequently used items in front of // the rarely used items // - + case (EFI_DEP_PUSH): // // Check to make sure the dependency grammar doesn't overflow the @@ -137,8 +137,8 @@ PeimDispatchReadiness ( StackPtr++; break; - case (EFI_DEP_AND): - case (EFI_DEP_OR): + case (EFI_DEP_AND): + case (EFI_DEP_OR): if (*(Iterator - 1) == EFI_DEP_AND) { DEBUG ((DEBUG_DISPATCH, " AND\n")); } else { @@ -163,11 +163,11 @@ PeimDispatchReadiness ( // evaluation of the POPed operator. Otherwise, don't POP the second // operator since it will now evaluate to the final result on the // next operand that causes a POP. - // + // StackPtr--; // - // Iterator has increased by 1 after we retrieve the operand, so here we - // should get the value pointed by (Iterator - 1), in order to obtain the + // Iterator has increased by 1 after we retrieve the operand, so here we + // should get the value pointed by (Iterator - 1), in order to obtain the // same operand. // if (*(Iterator - 1) == EFI_DEP_AND) { @@ -182,7 +182,7 @@ PeimDispatchReadiness ( } } break; - + case (EFI_DEP_END): DEBUG ((DEBUG_DISPATCH, " END\n")); StackPtr--; @@ -197,7 +197,7 @@ PeimDispatchReadiness ( DEBUG ((DEBUG_DISPATCH, " RESULT = %a\n", IsPpiInstalled (PeiServices, StackPtr) ? "TRUE" : "FALSE")); return IsPpiInstalled (PeiServices, StackPtr); - case (EFI_DEP_NOT): + case (EFI_DEP_NOT): DEBUG ((DEBUG_DISPATCH, " NOT\n")); // // Check to make sure the dependency grammar doesn't underflow the @@ -229,8 +229,8 @@ PeimDispatchReadiness ( return FALSE; } // - // Iterator has increased by 1 after we retrieve the operand, so here we - // should get the value pointed by (Iterator - 1), in order to obtain the + // Iterator has increased by 1 after we retrieve the operand, so here we + // should get the value pointed by (Iterator - 1), in order to obtain the // same operand. // if (*(Iterator - 1) == EFI_DEP_TRUE) { diff --git a/MdeModulePkg/Core/Pei/Dependency/Dependency.h b/MdeModulePkg/Core/Pei/Dependency/Dependency.h index 5021ce056b..1c648b501d 100644 --- a/MdeModulePkg/Core/Pei/Dependency/Dependency.h +++ b/MdeModulePkg/Core/Pei/Dependency/Dependency.h @@ -1,15 +1,15 @@ /** @file This module contains data specific to dependency expressions and local function prototypes. - -Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c index c4f629dadf..f6bb35a5fe 100644 --- a/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c +++ b/MdeModulePkg/Core/Pei/Dispatcher/Dispatcher.c @@ -1,7 +1,7 @@ /** @file EFI PEI Core dispatch services - -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+ +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -44,9 +44,9 @@ DiscoverPeimsAndOrderWithApriori ( EFI_GUID *FileGuid; EFI_PEI_FIRMWARE_VOLUME_PPI *FvPpi; EFI_FV_FILE_INFO FileInfo; - + FvPpi = CoreFileHandle->FvPpi; - + // // Walk the FV and find all the PEIMs and the Apriori file. // @@ -182,15 +182,15 @@ DiscoverPeimsAndOrderWithApriori ( // // This is the minimum memory required by DxeCore initialization. When LMFA feature enabled, -// This part of memory still need reserved on the very top of memory so that the DXE Core could +// This part of memory still need reserved on the very top of memory so that the DXE Core could // use these memory for data initialization. This macro should be sync with the same marco // defined in DXE Core. // #define MINIMUM_INITIAL_MEMORY_SIZE 0x10000 /** - This function is to test if the memory range described in resource HOB is available or not. - - This function should only be invoked when Loading Module at Fixed Address(LMFA) feature is enabled. Some platform may allocate the + This function is to test if the memory range described in resource HOB is available or not. + + This function should only be invoked when Loading Module at Fixed Address(LMFA) feature is enabled. Some platform may allocate the memory before PeiLoadFixAddressHook in invoked. so this function is to test if the memory range described by the input resource HOB is available or not. @@ -203,41 +203,41 @@ PeiLoadFixAddressIsMemoryRangeAvailable ( IN EFI_HOB_RESOURCE_DESCRIPTOR *ResourceHob ) { - EFI_HOB_MEMORY_ALLOCATION *MemoryHob; - BOOLEAN IsAvailable; - EFI_PEI_HOB_POINTERS Hob; - + EFI_HOB_MEMORY_ALLOCATION *MemoryHob; + BOOLEAN IsAvailable; + EFI_PEI_HOB_POINTERS Hob; + IsAvailable = TRUE; - if (PrivateData == NULL || ResourceHob == NULL) { - return FALSE; - } - // + if (PrivateData == NULL || ResourceHob == NULL) { + return FALSE; + } + // // test if the memory range describe in the HOB is already allocated. // for (Hob.Raw = PrivateData->HobList.Raw; !END_OF_HOB_LIST(Hob); Hob.Raw = GET_NEXT_HOB(Hob)) { - // - // See if this is a memory allocation HOB // - if (GET_HOB_TYPE (Hob) == EFI_HOB_TYPE_MEMORY_ALLOCATION) { + // See if this is a memory allocation HOB + // + if (GET_HOB_TYPE (Hob) == EFI_HOB_TYPE_MEMORY_ALLOCATION) { MemoryHob = Hob.MemoryAllocation; - if(MemoryHob->AllocDescriptor.MemoryBaseAddress == ResourceHob->PhysicalStart && + if(MemoryHob->AllocDescriptor.MemoryBaseAddress == ResourceHob->PhysicalStart && MemoryHob->AllocDescriptor.MemoryBaseAddress + MemoryHob->AllocDescriptor.MemoryLength == ResourceHob->PhysicalStart + ResourceHob->ResourceLength) { IsAvailable = FALSE; - break; + break; } } } - + return IsAvailable; - + } /** Hook function for Loading Module at Fixed Address feature - + This function should only be invoked when Loading Module at Fixed Address(LMFA) feature is enabled. When feature is - configured as Load Modules at Fix Absolute Address, this function is to validate the top address assigned by user. When - feature is configured as Load Modules at Fixed Offset, the functino is to find the top address which is TOLM-TSEG in general. - And also the function will re-install PEI memory. + configured as Load Modules at Fix Absolute Address, this function is to validate the top address assigned by user. When + feature is configured as Load Modules at Fixed Offset, the functino is to find the top address which is TOLM-TSEG in general. + And also the function will re-install PEI memory. @param PrivateData Pointer to the private data passed in from caller @@ -251,7 +251,7 @@ PeiLoadFixAddressHook( UINT64 PeiMemorySize; UINT64 TotalReservedMemorySize; UINT64 MemoryRangeEnd; - EFI_PHYSICAL_ADDRESS HighAddress; + EFI_PHYSICAL_ADDRESS HighAddress; EFI_HOB_RESOURCE_DESCRIPTOR *ResourceHob; EFI_HOB_RESOURCE_DESCRIPTOR *NextResourceHob; EFI_HOB_RESOURCE_DESCRIPTOR *CurrentResourceHob; @@ -273,89 +273,89 @@ PeiLoadFixAddressHook( // // The top reserved memory include 3 parts: the topest range is for DXE core initialization with the size MINIMUM_INITIAL_MEMORY_SIZE // then RuntimeCodePage range and Boot time code range. - // + // TotalReservedMemorySize = MINIMUM_INITIAL_MEMORY_SIZE + EFI_PAGES_TO_SIZE(PcdGet32(PcdLoadFixAddressRuntimeCodePageNumber)); - TotalReservedMemorySize+= EFI_PAGES_TO_SIZE(PcdGet32(PcdLoadFixAddressBootTimeCodePageNumber)) ; + TotalReservedMemorySize+= EFI_PAGES_TO_SIZE(PcdGet32(PcdLoadFixAddressBootTimeCodePageNumber)) ; // // PEI memory range lies below the top reserved memory - // + // TotalReservedMemorySize += PeiMemorySize; - + DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO: PcdLoadFixAddressRuntimeCodePageNumber= 0x%x.\n", PcdGet32(PcdLoadFixAddressRuntimeCodePageNumber))); DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO: PcdLoadFixAddressBootTimeCodePageNumber= 0x%x.\n", PcdGet32(PcdLoadFixAddressBootTimeCodePageNumber))); - DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO: PcdLoadFixAddressPeiCodePageNumber= 0x%x.\n", PcdGet32(PcdLoadFixAddressPeiCodePageNumber))); + DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO: PcdLoadFixAddressPeiCodePageNumber= 0x%x.\n", PcdGet32(PcdLoadFixAddressPeiCodePageNumber))); DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO: Total Reserved Memory Size = 0x%lx.\n", TotalReservedMemorySize)); // - // Loop through the system memory typed hob to merge the adjacent memory range + // Loop through the system memory typed hob to merge the adjacent memory range // for (Hob.Raw = PrivateData->HobList.Raw; !END_OF_HOB_LIST(Hob); Hob.Raw = GET_NEXT_HOB(Hob)) { - // - // See if this is a resource descriptor HOB + // + // See if this is a resource descriptor HOB // if (GET_HOB_TYPE (Hob) == EFI_HOB_TYPE_RESOURCE_DESCRIPTOR) { - - ResourceHob = Hob.ResourceDescriptor; + + ResourceHob = Hob.ResourceDescriptor; // // If range described in this hob is not system memory or heigher than MAX_ADDRESS, ignored. // if (ResourceHob->ResourceType != EFI_RESOURCE_SYSTEM_MEMORY || ResourceHob->PhysicalStart + ResourceHob->ResourceLength > MAX_ADDRESS) { continue; - } - - for (NextHob.Raw = PrivateData->HobList.Raw; !END_OF_HOB_LIST(NextHob); NextHob.Raw = GET_NEXT_HOB(NextHob)) { + } + + for (NextHob.Raw = PrivateData->HobList.Raw; !END_OF_HOB_LIST(NextHob); NextHob.Raw = GET_NEXT_HOB(NextHob)) { if (NextHob.Raw == Hob.Raw){ continue; - } + } // // See if this is a resource descriptor HOB // if (GET_HOB_TYPE (NextHob) == EFI_HOB_TYPE_RESOURCE_DESCRIPTOR) { - + NextResourceHob = NextHob.ResourceDescriptor; // // test if range described in this NextResourceHob is system memory and have the same attribute. // Note: Here is a assumption that system memory should always be healthy even without test. - // + // if (NextResourceHob->ResourceType == EFI_RESOURCE_SYSTEM_MEMORY && (((NextResourceHob->ResourceAttribute^ResourceHob->ResourceAttribute)&(~EFI_RESOURCE_ATTRIBUTE_TESTED)) == 0)){ - + // // See if the memory range described in ResourceHob and NextResourceHob is adjacent // - if ((ResourceHob->PhysicalStart <= NextResourceHob->PhysicalStart && - ResourceHob->PhysicalStart + ResourceHob->ResourceLength >= NextResourceHob->PhysicalStart)|| + if ((ResourceHob->PhysicalStart <= NextResourceHob->PhysicalStart && + ResourceHob->PhysicalStart + ResourceHob->ResourceLength >= NextResourceHob->PhysicalStart)|| (ResourceHob->PhysicalStart >= NextResourceHob->PhysicalStart&& ResourceHob->PhysicalStart <= NextResourceHob->PhysicalStart + NextResourceHob->ResourceLength)) { - + MemoryRangeEnd = ((ResourceHob->PhysicalStart + ResourceHob->ResourceLength)>(NextResourceHob->PhysicalStart + NextResourceHob->ResourceLength)) ? (ResourceHob->PhysicalStart + ResourceHob->ResourceLength):(NextResourceHob->PhysicalStart + NextResourceHob->ResourceLength); - - ResourceHob->PhysicalStart = (ResourceHob->PhysicalStart < NextResourceHob->PhysicalStart) ? + + ResourceHob->PhysicalStart = (ResourceHob->PhysicalStart < NextResourceHob->PhysicalStart) ? ResourceHob->PhysicalStart : NextResourceHob->PhysicalStart; - - + + ResourceHob->ResourceLength = (MemoryRangeEnd - ResourceHob->PhysicalStart); - + ResourceHob->ResourceAttribute = ResourceHob->ResourceAttribute & (~EFI_RESOURCE_ATTRIBUTE_TESTED); // // Delete the NextResourceHob by marking it as unused. // GET_HOB_TYPE (NextHob) = EFI_HOB_TYPE_UNUSED; - + } } - } + } } - } + } } // // Some platform is already allocated pages before the HOB re-org. Here to build dedicated resource HOB to describe // the allocated memory range // for (Hob.Raw = PrivateData->HobList.Raw; !END_OF_HOB_LIST(Hob); Hob.Raw = GET_NEXT_HOB(Hob)) { - // - // See if this is a memory allocation HOB + // + // See if this is a memory allocation HOB // if (GET_HOB_TYPE (Hob) == EFI_HOB_TYPE_MEMORY_ALLOCATION) { MemoryHob = Hob.MemoryAllocation; @@ -364,7 +364,7 @@ PeiLoadFixAddressHook( // See if this is a resource descriptor HOB // if (GET_HOB_TYPE (NextHob) == EFI_HOB_TYPE_RESOURCE_DESCRIPTOR) { - NextResourceHob = NextHob.ResourceDescriptor; + NextResourceHob = NextHob.ResourceDescriptor; // // If range described in this hob is not system memory or heigher than MAX_ADDRESS, ignored. // @@ -373,26 +373,26 @@ PeiLoadFixAddressHook( } // // If the range describe in memory allocation HOB belongs to the memroy range described by the resource hob - // - if (MemoryHob->AllocDescriptor.MemoryBaseAddress >= NextResourceHob->PhysicalStart && + // + if (MemoryHob->AllocDescriptor.MemoryBaseAddress >= NextResourceHob->PhysicalStart && MemoryHob->AllocDescriptor.MemoryBaseAddress + MemoryHob->AllocDescriptor.MemoryLength <= NextResourceHob->PhysicalStart + NextResourceHob->ResourceLength) { // // Build seperate resource hob for this allocated range - // + // if (MemoryHob->AllocDescriptor.MemoryBaseAddress > NextResourceHob->PhysicalStart) { BuildResourceDescriptorHob ( - EFI_RESOURCE_SYSTEM_MEMORY, + EFI_RESOURCE_SYSTEM_MEMORY, NextResourceHob->ResourceAttribute, - NextResourceHob->PhysicalStart, - (MemoryHob->AllocDescriptor.MemoryBaseAddress - NextResourceHob->PhysicalStart) + NextResourceHob->PhysicalStart, + (MemoryHob->AllocDescriptor.MemoryBaseAddress - NextResourceHob->PhysicalStart) ); } if (MemoryHob->AllocDescriptor.MemoryBaseAddress + MemoryHob->AllocDescriptor.MemoryLength < NextResourceHob->PhysicalStart + NextResourceHob->ResourceLength) { BuildResourceDescriptorHob ( - EFI_RESOURCE_SYSTEM_MEMORY, + EFI_RESOURCE_SYSTEM_MEMORY, NextResourceHob->ResourceAttribute, - MemoryHob->AllocDescriptor.MemoryBaseAddress + MemoryHob->AllocDescriptor.MemoryLength, - (NextResourceHob->PhysicalStart + NextResourceHob->ResourceLength -(MemoryHob->AllocDescriptor.MemoryBaseAddress + MemoryHob->AllocDescriptor.MemoryLength)) + MemoryHob->AllocDescriptor.MemoryBaseAddress + MemoryHob->AllocDescriptor.MemoryLength, + (NextResourceHob->PhysicalStart + NextResourceHob->ResourceLength -(MemoryHob->AllocDescriptor.MemoryBaseAddress + MemoryHob->AllocDescriptor.MemoryLength)) ); } NextResourceHob->PhysicalStart = MemoryHob->AllocDescriptor.MemoryBaseAddress; @@ -406,7 +406,7 @@ PeiLoadFixAddressHook( // // Try to find and validate the TOP address. - // + // if ((INT64)PcdGet64(PcdLoadModuleAtFixAddressEnable) > 0 ) { // // The LMFA feature is enabled as load module at fixed absolute address. @@ -417,11 +417,11 @@ PeiLoadFixAddressHook( // validate the Address. Loop the resource descriptor HOB to make sure the address is in valid memory range // if ((TopLoadingAddress & EFI_PAGE_MASK) != 0) { - DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED ERROR:Top Address 0x%lx is invalid since top address should be page align. \n", TopLoadingAddress)); - ASSERT (FALSE); + DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED ERROR:Top Address 0x%lx is invalid since top address should be page align. \n", TopLoadingAddress)); + ASSERT (FALSE); } // - // Search for a memory region that is below MAX_ADDRESS and in which TopLoadingAddress lies + // Search for a memory region that is below MAX_ADDRESS and in which TopLoadingAddress lies // for (Hob.Raw = PrivateData->HobList.Raw; !END_OF_HOB_LIST(Hob); Hob.Raw = GET_NEXT_HOB(Hob)) { // @@ -432,61 +432,61 @@ PeiLoadFixAddressHook( ResourceHob = Hob.ResourceDescriptor; // // See if this resource descrior HOB describes tested system memory below MAX_ADDRESS - // + // if (ResourceHob->ResourceType == EFI_RESOURCE_SYSTEM_MEMORY && ResourceHob->PhysicalStart + ResourceHob->ResourceLength <= MAX_ADDRESS) { // // See if Top address specified by user is valid. // - if (ResourceHob->PhysicalStart + TotalReservedMemorySize < TopLoadingAddress && - (ResourceHob->PhysicalStart + ResourceHob->ResourceLength - MINIMUM_INITIAL_MEMORY_SIZE) >= TopLoadingAddress && + if (ResourceHob->PhysicalStart + TotalReservedMemorySize < TopLoadingAddress && + (ResourceHob->PhysicalStart + ResourceHob->ResourceLength - MINIMUM_INITIAL_MEMORY_SIZE) >= TopLoadingAddress && PeiLoadFixAddressIsMemoryRangeAvailable(PrivateData, ResourceHob)) { - CurrentResourceHob = ResourceHob; + CurrentResourceHob = ResourceHob; CurrentHob = Hob; break; } } - } - } + } + } if (CurrentResourceHob != NULL) { DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO:Top Address 0x%lx is valid \n", TopLoadingAddress)); - TopLoadingAddress += MINIMUM_INITIAL_MEMORY_SIZE; + TopLoadingAddress += MINIMUM_INITIAL_MEMORY_SIZE; } else { - DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED ERROR:Top Address 0x%lx is invalid \n", TopLoadingAddress)); - DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED ERROR:The recommended Top Address for the platform is: \n")); + DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED ERROR:Top Address 0x%lx is invalid \n", TopLoadingAddress)); + DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED ERROR:The recommended Top Address for the platform is: \n")); // // Print the recomended Top address range. - // + // for (Hob.Raw = PrivateData->HobList.Raw; !END_OF_HOB_LIST(Hob); Hob.Raw = GET_NEXT_HOB(Hob)) { // // See if this is a resource descriptor HOB // if (GET_HOB_TYPE (Hob) == EFI_HOB_TYPE_RESOURCE_DESCRIPTOR) { - + ResourceHob = Hob.ResourceDescriptor; // // See if this resource descrior HOB describes tested system memory below MAX_ADDRESS - // + // if (ResourceHob->ResourceType == EFI_RESOURCE_SYSTEM_MEMORY && ResourceHob->PhysicalStart + ResourceHob->ResourceLength <= MAX_ADDRESS) { // // See if Top address specified by user is valid. // if (ResourceHob->ResourceLength > TotalReservedMemorySize && PeiLoadFixAddressIsMemoryRangeAvailable(PrivateData, ResourceHob)) { - DEBUG ((EFI_D_INFO, "(0x%lx, 0x%lx)\n", - (ResourceHob->PhysicalStart + TotalReservedMemorySize -MINIMUM_INITIAL_MEMORY_SIZE), - (ResourceHob->PhysicalStart + ResourceHob->ResourceLength -MINIMUM_INITIAL_MEMORY_SIZE) - )); + DEBUG ((EFI_D_INFO, "(0x%lx, 0x%lx)\n", + (ResourceHob->PhysicalStart + TotalReservedMemorySize -MINIMUM_INITIAL_MEMORY_SIZE), + (ResourceHob->PhysicalStart + ResourceHob->ResourceLength -MINIMUM_INITIAL_MEMORY_SIZE) + )); } } } - } + } // - // Assert here + // Assert here // - ASSERT (FALSE); - return; - } + ASSERT (FALSE); + return; + } } else { // // The LMFA feature is enabled as load module at fixed offset relative to TOLM @@ -497,15 +497,15 @@ PeiLoadFixAddressHook( // for (Hob.Raw = PrivateData->HobList.Raw; !END_OF_HOB_LIST(Hob); Hob.Raw = GET_NEXT_HOB(Hob)) { // - // See if this is a resource descriptor HOB + // See if this is a resource descriptor HOB // if (GET_HOB_TYPE (Hob) == EFI_HOB_TYPE_RESOURCE_DESCRIPTOR) { - - ResourceHob = Hob.ResourceDescriptor; + + ResourceHob = Hob.ResourceDescriptor; // // See if this resource descrior HOB describes tested system memory below MAX_ADDRESS // - if (ResourceHob->ResourceType == EFI_RESOURCE_SYSTEM_MEMORY && + if (ResourceHob->ResourceType == EFI_RESOURCE_SYSTEM_MEMORY && ResourceHob->PhysicalStart + ResourceHob->ResourceLength <= MAX_ADDRESS && ResourceHob->ResourceLength > TotalReservedMemorySize && PeiLoadFixAddressIsMemoryRangeAvailable(PrivateData, ResourceHob)) { // @@ -517,26 +517,26 @@ PeiLoadFixAddressHook( HighAddress = CurrentResourceHob->PhysicalStart; } } - } + } } if (CurrentResourceHob == NULL) { - DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED ERROR:The System Memory is too small\n")); + DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED ERROR:The System Memory is too small\n")); // - // Assert here + // Assert here // ASSERT (FALSE); - return; + return; } else { - TopLoadingAddress = CurrentResourceHob->PhysicalStart + CurrentResourceHob->ResourceLength ; - } + TopLoadingAddress = CurrentResourceHob->PhysicalStart + CurrentResourceHob->ResourceLength ; + } } - + if (CurrentResourceHob != NULL) { // // rebuild resource HOB for PEI memmory and reserved memory // BuildResourceDescriptorHob ( - EFI_RESOURCE_SYSTEM_MEMORY, + EFI_RESOURCE_SYSTEM_MEMORY, ( EFI_RESOURCE_ATTRIBUTE_PRESENT | EFI_RESOURCE_ATTRIBUTE_INITIALIZED | @@ -546,15 +546,15 @@ PeiLoadFixAddressHook( EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE | EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE ), - (TopLoadingAddress - TotalReservedMemorySize), - TotalReservedMemorySize + (TopLoadingAddress - TotalReservedMemorySize), + TotalReservedMemorySize ); // // rebuild resource for the remain memory if necessary // if (CurrentResourceHob->PhysicalStart < TopLoadingAddress - TotalReservedMemorySize) { BuildResourceDescriptorHob ( - EFI_RESOURCE_SYSTEM_MEMORY, + EFI_RESOURCE_SYSTEM_MEMORY, ( EFI_RESOURCE_ATTRIBUTE_PRESENT | EFI_RESOURCE_ATTRIBUTE_INITIALIZED | @@ -563,13 +563,13 @@ PeiLoadFixAddressHook( EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE | EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE ), - CurrentResourceHob->PhysicalStart, - (TopLoadingAddress - TotalReservedMemorySize - CurrentResourceHob->PhysicalStart) + CurrentResourceHob->PhysicalStart, + (TopLoadingAddress - TotalReservedMemorySize - CurrentResourceHob->PhysicalStart) ); } if (CurrentResourceHob->PhysicalStart + CurrentResourceHob->ResourceLength > TopLoadingAddress ) { BuildResourceDescriptorHob ( - EFI_RESOURCE_SYSTEM_MEMORY, + EFI_RESOURCE_SYSTEM_MEMORY, ( EFI_RESOURCE_ATTRIBUTE_PRESENT | EFI_RESOURCE_ATTRIBUTE_INITIALIZED | @@ -578,21 +578,21 @@ PeiLoadFixAddressHook( EFI_RESOURCE_ATTRIBUTE_WRITE_THROUGH_CACHEABLE | EFI_RESOURCE_ATTRIBUTE_WRITE_BACK_CACHEABLE ), - TopLoadingAddress, - (CurrentResourceHob->PhysicalStart + CurrentResourceHob->ResourceLength - TopLoadingAddress) + TopLoadingAddress, + (CurrentResourceHob->PhysicalStart + CurrentResourceHob->ResourceLength - TopLoadingAddress) ); } // // Delete CurrentHob by marking it as unused since the the memory range described by is rebuilt. // - GET_HOB_TYPE (CurrentHob) = EFI_HOB_TYPE_UNUSED; + GET_HOB_TYPE (CurrentHob) = EFI_HOB_TYPE_UNUSED; } // // Cache the top address for Loading Module at Fixed Address feature // PrivateData->LoadModuleAtFixAddressTopAddress = TopLoadingAddress - MINIMUM_INITIAL_MEMORY_SIZE; - DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO: Top address = 0x%lx\n", PrivateData->LoadModuleAtFixAddressTopAddress)); + DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED INFO: Top address = 0x%lx\n", PrivateData->LoadModuleAtFixAddressTopAddress)); // // reinstall the PEI memory relative to TopLoadingAddress // @@ -729,7 +729,7 @@ PeiCheckAndSwitchStack ( ASSERT (NewStackSize >= SecCoreData->StackSize); // - // Calculate stack offset and heap offset between temporary memory and new permement + // Calculate stack offset and heap offset between temporary memory and new permement // memory seperately. // TopOfOldStack = (UINTN)SecCoreData->StackBase + SecCoreData->StackSize; @@ -796,9 +796,9 @@ PeiCheckAndSwitchStack ( } // - // Temporary Ram Support PPI is provided by platform, it will copy + // Temporary Ram Support PPI is provided by platform, it will copy // temporary memory to permanent memory and do stack switching. - // After invoking Temporary Ram Support PPI, the following code's + // After invoking Temporary Ram Support PPI, the following code's // stack is in permanent memory. // TemporaryRamSupportPpi->TemporaryRamMigration ( @@ -961,7 +961,7 @@ PeiDispatcher ( EFI_PEI_FILE_HANDLE SaveCurrentFileHandle; EFI_FV_FILE_INFO FvFileInfo; PEI_CORE_FV_HANDLE *CoreFvHandle; - + PeiServices = (CONST EFI_PEI_SERVICES **) &Private->Ps; PeimEntryPoint = NULL; PeimFileHandle = NULL; @@ -1028,7 +1028,7 @@ PeiDispatcher ( // do { // - // In case that reenter PeiCore happens, the last pass record is still available. + // In case that reenter PeiCore happens, the last pass record is still available. // if (!Private->PeimDispatcherReenter) { Private->PeimNeedingDispatch = FALSE; @@ -1036,18 +1036,18 @@ PeiDispatcher ( } else { Private->PeimDispatcherReenter = FALSE; } - + for (FvCount = Private->CurrentPeimFvCount; FvCount < Private->FvCount; FvCount++) { CoreFvHandle = FindNextCoreFvHandle (Private, FvCount); ASSERT (CoreFvHandle != NULL); - + // // If the FV has corresponding EFI_PEI_FIRMWARE_VOLUME_PPI instance, then dispatch it. // if (CoreFvHandle->FvPpi == NULL) { continue; } - + Private->CurrentPeimFvCount = FvCount; if (Private->CurrentPeimCount == 0) { @@ -1297,7 +1297,7 @@ DepexSatisfied ( } else { DEBUG ((DEBUG_DISPATCH, "Evaluate PEI DEPEX for FFS(%g)\n", &FileInfo.FileName)); } - + if (PeimCount < Private->AprioriCount) { // // If its in the A priori file then we set Depex to TRUE diff --git a/MdeModulePkg/Core/Pei/FwVol/FwVol.c b/MdeModulePkg/Core/Pei/FwVol/FwVol.c index 4150b338b2..65c4855497 100644 --- a/MdeModulePkg/Core/Pei/FwVol/FwVol.c +++ b/MdeModulePkg/Core/Pei/FwVol/FwVol.c @@ -1,15 +1,15 @@ /** @file Pei Core Firmware File System service routines. - + Copyright (c) 2015 HP Development Company, L.P. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -19,12 +19,12 @@ EFI_PEI_NOTIFY_DESCRIPTOR mNotifyOnFvInfoList[] = { { EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK, &gEfiPeiFirmwareVolumeInfoPpiGuid, - FirmwareVolmeInfoPpiNotifyCallback + FirmwareVolmeInfoPpiNotifyCallback }, { (EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST), &gEfiPeiFirmwareVolumeInfo2PpiGuid, - FirmwareVolmeInfoPpiNotifyCallback + FirmwareVolmeInfoPpiNotifyCallback } }; @@ -61,7 +61,7 @@ PEI_FW_VOL_INSTANCE mPeiFfs3FwVol = { EFI_PEI_FIRMWARE_VOLUME_PPI_REVISION } }; - + EFI_PEI_PPI_DESCRIPTOR mPeiFfs2FvPpiList = { (EFI_PEI_PPI_DESCRIPTOR_PPI | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST), &gEfiFirmwareFileSystem2Guid, @@ -136,7 +136,7 @@ FfsAttributes2FvFileAttributes ( in the Attributes field. @param FfsHeader Pointer to FFS File Header. - @retval EFI_FFS_FILE_STATE File state is set by the highest none zero bit + @retval EFI_FFS_FILE_STATE File state is set by the highest none zero bit in the header State field. **/ EFI_FFS_FILE_STATE @@ -153,7 +153,7 @@ GetFileState( if (ErasePolarity != 0) { FileState = (EFI_FFS_FILE_STATE)~FileState; } - + // // Get file state set by its highest none zero bit. // @@ -163,7 +163,7 @@ GetFileState( } return HighestBit; -} +} /** Calculates the checksum of the header of a file. @@ -206,7 +206,7 @@ CalculateHeaderChecksum ( Find FV handler according to FileHandle in that FV. @param FileHandle Handle of file image - + @return Pointer to instance of PEI_CORE_FV_HANDLE. **/ PEI_CORE_FV_HANDLE* @@ -221,10 +221,10 @@ FileHandleToVolume ( PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS (GetPeiServicesTablePointer ()); BestIndex = PrivateData->FvCount; - + // // Find the best matched FV image that includes this FileHandle. - // FV may include the child FV, and they are in the same continuous space. + // FV may include the child FV, and they are in the same continuous space. // If FileHandle is from the child FV, the updated logic can find its matched FV. // for (Index = 0; Index < PrivateData->FvCount; Index++) { @@ -253,8 +253,8 @@ FileHandleToVolume ( FFS volume as defined by SearchType. The search starts from FileHeader inside the Firmware Volume defined by FwVolHeader. If SearchType is EFI_FV_FILETYPE_ALL, the first FFS file will return without check its file type. - If SearchType is PEI_CORE_INTERNAL_FFS_FILE_DISPATCH_TYPE, - the first PEIM, or COMBINED PEIM or FV file type FFS file will return. + If SearchType is PEI_CORE_INTERNAL_FFS_FILE_DISPATCH_TYPE, + the first PEIM, or COMBINED PEIM or FV file type FFS file will return. @param FvHandle Pointer to the FV header of the volume to search @param FileName File name @@ -288,7 +288,7 @@ FindFileEx ( UINT8 FileState; UINT8 DataCheckSum; BOOLEAN IsFfs3Fv; - + // // Convert the handle of FV to FV header for memory-mapped firmware volume // @@ -303,7 +303,7 @@ FindFileEx ( } else { ErasePolarity = 0; } - + // // If FileHeader is not specified (NULL) or FileName is not NULL, // start with the first file in the firmware volume. Otherwise, @@ -336,13 +336,13 @@ FindFileEx ( FileOccupiedSize = GET_OCCUPIED_SIZE (FileLength, 8); FfsFileHeader = (EFI_FFS_FILE_HEADER *)((UINT8 *)*FileHeader + FileOccupiedSize); } - + FileOffset = (UINT32) ((UINT8 *)FfsFileHeader - (UINT8 *)FwVolHeader); ASSERT (FileOffset <= 0xFFFFFFFF); while (FileOffset < (FvLength - sizeof (EFI_FFS_FILE_HEADER))) { // - // Get FileState which is the highest bit of the State + // Get FileState which is the highest bit of the State // FileState = GetFileState (ErasePolarity, FfsFileHeader); switch (FileState) { @@ -360,7 +360,7 @@ FindFileEx ( FfsFileHeader = (EFI_FFS_FILE_HEADER *) ((UINT8 *) FfsFileHeader + sizeof (EFI_FFS_FILE_HEADER)); } break; - + case EFI_FILE_DATA_VALID: case EFI_FILE_MARKED_FOR_UPDATE: if (CalculateHeaderChecksum (FfsFileHeader) != 0) { @@ -404,29 +404,29 @@ FindFileEx ( return EFI_SUCCESS; } } else if (SearchType == PEI_CORE_INTERNAL_FFS_FILE_DISPATCH_TYPE) { - if ((FfsFileHeader->Type == EFI_FV_FILETYPE_PEIM) || + if ((FfsFileHeader->Type == EFI_FV_FILETYPE_PEIM) || (FfsFileHeader->Type == EFI_FV_FILETYPE_COMBINED_PEIM_DRIVER) || - (FfsFileHeader->Type == EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE)) { - + (FfsFileHeader->Type == EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE)) { + *FileHeader = FfsFileHeader; return EFI_SUCCESS; } else if (AprioriFile != NULL) { if (FfsFileHeader->Type == EFI_FV_FILETYPE_FREEFORM) { if (CompareGuid (&FfsFileHeader->Name, &gPeiAprioriFileNameGuid)) { *AprioriFile = FfsFileHeader; - } - } + } + } } - } else if (((SearchType == FfsFileHeader->Type) || (SearchType == EFI_FV_FILETYPE_ALL)) && - (FfsFileHeader->Type != EFI_FV_FILETYPE_FFS_PAD)) { + } else if (((SearchType == FfsFileHeader->Type) || (SearchType == EFI_FV_FILETYPE_ALL)) && + (FfsFileHeader->Type != EFI_FV_FILETYPE_FFS_PAD)) { *FileHeader = FfsFileHeader; return EFI_SUCCESS; } - FileOffset += FileOccupiedSize; + FileOffset += FileOccupiedSize; FfsFileHeader = (EFI_FFS_FILE_HEADER *)((UINT8 *)FfsFileHeader + FileOccupiedSize); break; - + case EFI_FILE_DELETED: if (IS_FFS_FILE2 (FfsFileHeader)) { if (!IsFfs3Fv) { @@ -445,11 +445,11 @@ FindFileEx ( default: *FileHeader = NULL; return EFI_NOT_FOUND; - } + } } - + *FileHeader = NULL; - return EFI_NOT_FOUND; + return EFI_NOT_FOUND; } /** @@ -458,7 +458,7 @@ FindFileEx ( @param PrivateData - Pointer to PEI_CORE_INSTANCE. @param SecCoreData - Pointer to EFI_SEC_PEI_HAND_OFF. **/ -VOID +VOID PeiInitializeFv ( IN PEI_CORE_INSTANCE *PrivateData, IN CONST EFI_SEC_PEI_HAND_OFF *SecCoreData @@ -468,7 +468,7 @@ PeiInitializeFv ( EFI_PEI_FIRMWARE_VOLUME_PPI *FvPpi; EFI_PEI_FV_HANDLE FvHandle; EFI_FIRMWARE_VOLUME_HEADER *BfvHeader; - + // // Install FV_PPI for FFS2 file system. // @@ -480,7 +480,7 @@ PeiInitializeFv ( PeiServicesInstallPpi (&mPeiFfs3FvPpiList); BfvHeader = (EFI_FIRMWARE_VOLUME_HEADER *)SecCoreData->BootFirmwareVolumeBase; - + // // The FV_PPI in BFV's format should be installed. // @@ -491,7 +491,7 @@ PeiInitializeFv ( (VOID**)&FvPpi ); ASSERT_EFI_ERROR (Status); - + // // Get handle of BFV // @@ -511,15 +511,15 @@ PeiInitializeFv ( PrivateData->Fv[PrivateData->FvCount].FvHandle = FvHandle; PrivateData->Fv[PrivateData->FvCount].AuthenticationStatus = 0; DEBUG (( - EFI_D_INFO, - "The %dth FV start address is 0x%11p, size is 0x%08x, handle is 0x%p\n", - (UINT32) PrivateData->FvCount, - (VOID *) BfvHeader, + EFI_D_INFO, + "The %dth FV start address is 0x%11p, size is 0x%08x, handle is 0x%p\n", + (UINT32) PrivateData->FvCount, + (VOID *) BfvHeader, (UINT32) BfvHeader->FvLength, FvHandle - )); + )); PrivateData->FvCount ++; - + // // Post a call-back for the FvInfoPPI and FvInfo2PPI services to expose // additional Fvs to PeiCore. @@ -528,7 +528,7 @@ PeiInitializeFv ( ASSERT_EFI_ERROR (Status); } - + /** Process Firmware Volum Information once FvInfoPPI or FvInfo2PPI install. The FV Info will be registered into PeiCore private data structure. @@ -619,7 +619,7 @@ FirmwareVolmeInfoPpiNotifyCallback ( if (PrivateData->Fv[FvIndex].FvHandle == FvHandle) { if (IsFvInfo2 && (FvInfo2Ppi.AuthenticationStatus != PrivateData->Fv[FvIndex].AuthenticationStatus)) { PrivateData->Fv[FvIndex].AuthenticationStatus = FvInfo2Ppi.AuthenticationStatus; - DEBUG ((EFI_D_INFO, "Update AuthenticationStatus of the %dth FV to 0x%x!\n", FvIndex, FvInfo2Ppi.AuthenticationStatus)); + DEBUG ((EFI_D_INFO, "Update AuthenticationStatus of the %dth FV to 0x%x!\n", FvIndex, FvInfo2Ppi.AuthenticationStatus)); } DEBUG ((EFI_D_INFO, "The Fv %p has already been processed!\n", FvInfo2Ppi.FvInfo)); return EFI_SUCCESS; @@ -641,17 +641,17 @@ FirmwareVolmeInfoPpiNotifyCallback ( PrivateData->Fv[PrivateData->FvCount].AuthenticationStatus = FvInfo2Ppi.AuthenticationStatus; CurFvCount = PrivateData->FvCount; DEBUG (( - EFI_D_INFO, - "The %dth FV start address is 0x%11p, size is 0x%08x, handle is 0x%p\n", + EFI_D_INFO, + "The %dth FV start address is 0x%11p, size is 0x%08x, handle is 0x%p\n", (UINT32) CurFvCount, - (VOID *) FvInfo2Ppi.FvInfo, + (VOID *) FvInfo2Ppi.FvInfo, FvInfo2Ppi.FvInfoSize, FvHandle - )); + )); PrivateData->FvCount ++; // - // Scan and process the new discoveried FV for EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE + // Scan and process the new discoveried FV for EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE // FileHandle = NULL; do { @@ -676,17 +676,17 @@ FirmwareVolmeInfoPpiNotifyCallback ( continue; } } - + DEBUG ((EFI_D_INFO, "Found firmware volume Image File %p in FV[%d] %p\n", FileHandle, CurFvCount, FvHandle)); ProcessFvFile (PrivateData, &PrivateData->Fv[CurFvCount], FileHandle); } } while (FileHandle != NULL); } else { DEBUG ((EFI_D_ERROR, "Fail to process FV %p because no corresponding EFI_FIRMWARE_VOLUME_PPI is found!\n", FvInfo2Ppi.FvInfo)); - + AddUnknownFormatFvInfo (PrivateData, &FvInfo2Ppi); } - + return EFI_SUCCESS; } @@ -699,7 +699,7 @@ FirmwareVolmeInfoPpiNotifyCallback ( @return TRUE The GuidedSectionGuid could be identified, and the pointer to the Guided Section Extraction Ppi will be returned to *GuidedSectionExtraction. - @return FALSE The GuidedSectionGuid could not be identified, or + @return FALSE The GuidedSectionGuid could not be identified, or the Guided Section Extraction Ppi has not been installed yet. **/ @@ -740,10 +740,10 @@ VerifyGuidedSectionGuid ( } /** - Go through the file to search SectionType section. - Search within encapsulation sections (compression and GUIDed) recursively, + Go through the file to search SectionType section. + Search within encapsulation sections (compression and GUIDed) recursively, until the match section is found. - + @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation. @param SectionType Filter to find only section of this type. @param SectionInstance Pointer to the filter to find the specific instance of section. @@ -862,8 +862,8 @@ ProcessSection ( PeiServices, SectionType, SectionInstance, - PpiOutput, - PpiOutputSize, + PpiOutput, + PpiOutputSize, &TempOutputBuffer, &TempAuthenticationStatus, IsFfs3Fv @@ -946,8 +946,8 @@ ProcessSection ( PeiServices, SectionType, SectionInstance, - PpiOutput, - PpiOutputSize, + PpiOutput, + PpiOutputSize, &TempOutputBuffer, &TempAuthenticationStatus, IsFfs3Fv @@ -975,7 +975,7 @@ ProcessSection ( ParsedLength += SectionLength; Section = (EFI_COMMON_SECTION_HEADER *)((UINT8 *)Section + SectionLength); } - + return EFI_NOT_FOUND; } @@ -1003,12 +1003,12 @@ PeiFfsFindSectionData ( ) { PEI_CORE_FV_HANDLE *CoreFvHandle; - + CoreFvHandle = FileHandleToVolume (FileHandle); if ((CoreFvHandle == NULL) || (CoreFvHandle->FvPpi == NULL)) { return EFI_NOT_FOUND; } - + return CoreFvHandle->FvPpi->FindSectionByType (CoreFvHandle->FvPpi, SectionType, FileHandle, SectionData); } @@ -1038,7 +1038,7 @@ PeiFfsFindSectionData3 ( ) { PEI_CORE_FV_HANDLE *CoreFvHandle; - + CoreFvHandle = FileHandleToVolume (FileHandle); if ((CoreFvHandle == NULL) || (CoreFvHandle->FvPpi == NULL)) { return EFI_NOT_FOUND; @@ -1081,9 +1081,9 @@ PeiFfsFindNextFile ( ) { PEI_CORE_FV_HANDLE *CoreFvHandle; - + CoreFvHandle = FvHandleToCoreHandle (FvHandle); - + // // To make backward compatiblity, if can not find corresponding the handle of FV // then treat FV as build-in FFS2/FFS3 format and memory mapped FV that FV handle is pointed @@ -1091,12 +1091,12 @@ PeiFfsFindNextFile ( // if ((CoreFvHandle == NULL) && FeaturePcdGet (PcdFrameworkCompatibilitySupport)) { return FindFileEx (FvHandle, NULL, SearchType, FileHandle, NULL); - } - + } + if ((CoreFvHandle == NULL) || CoreFvHandle->FvPpi == NULL) { return EFI_NOT_FOUND; } - + return CoreFvHandle->FvPpi->FindFileByType (CoreFvHandle->FvPpi, SearchType, FvHandle, FileHandle); } @@ -1114,7 +1114,7 @@ PeiFfsFindNextFile ( @retval EFI_SUCCESS The volume was found. **/ -EFI_STATUS +EFI_STATUS EFIAPI PeiFfsFindNextVolume ( IN CONST EFI_PEI_SERVICES **PeiServices, @@ -1124,21 +1124,21 @@ PeiFfsFindNextVolume ( { PEI_CORE_INSTANCE *Private; PEI_CORE_FV_HANDLE *CoreFvHandle; - + if (VolumeHandle == NULL) { return EFI_INVALID_PARAMETER; } - + Private = PEI_CORE_INSTANCE_FROM_PS_THIS (PeiServices); - + CoreFvHandle = FindNextCoreFvHandle (Private, Instance); if (CoreFvHandle == NULL) { *VolumeHandle = NULL; return EFI_NOT_FOUND; } - + *VolumeHandle = CoreFvHandle->FvHandle; - + return EFI_SUCCESS; } @@ -1148,7 +1148,7 @@ PeiFfsFindNextVolume ( @param FileName A pointer to the name of the file to find within the firmware volume. @param VolumeHandle The firmware volume to search - @param FileHandle Upon exit, points to the found file's handle + @param FileHandle Upon exit, points to the found file's handle or NULL if it could not be found. @retval EFI_SUCCESS File was found. @@ -1157,7 +1157,7 @@ PeiFfsFindNextVolume ( **/ EFI_STATUS -EFIAPI +EFIAPI PeiFfsFindFileByName ( IN CONST EFI_GUID *FileName, IN EFI_PEI_FV_HANDLE VolumeHandle, @@ -1165,16 +1165,16 @@ PeiFfsFindFileByName ( ) { PEI_CORE_FV_HANDLE *CoreFvHandle; - + if ((VolumeHandle == NULL) || (FileName == NULL) || (FileHandle == NULL)) { return EFI_INVALID_PARAMETER; } - + CoreFvHandle = FvHandleToCoreHandle (VolumeHandle); if ((CoreFvHandle == NULL) || (CoreFvHandle->FvPpi == NULL)) { return EFI_NOT_FOUND; } - + return CoreFvHandle->FvPpi->FindFileByName (CoreFvHandle->FvPpi, FileName, &VolumeHandle, FileHandle); } @@ -1190,14 +1190,14 @@ PeiFfsFindFileByName ( **/ EFI_STATUS -EFIAPI +EFIAPI PeiFfsGetFileInfo ( IN EFI_PEI_FILE_HANDLE FileHandle, OUT EFI_FV_FILE_INFO *FileInfo ) { PEI_CORE_FV_HANDLE *CoreFvHandle; - + if ((FileHandle == NULL) || (FileInfo == NULL)) { return EFI_INVALID_PARAMETER; } @@ -1225,14 +1225,14 @@ PeiFfsGetFileInfo ( **/ EFI_STATUS -EFIAPI +EFIAPI PeiFfsGetFileInfo2 ( IN EFI_PEI_FILE_HANDLE FileHandle, OUT EFI_FV_FILE_INFO2 *FileInfo ) { PEI_CORE_FV_HANDLE *CoreFvHandle; - + if ((FileHandle == NULL) || (FileInfo == NULL)) { return EFI_INVALID_PARAMETER; } @@ -1274,24 +1274,24 @@ PeiFfsGetFileInfo2 ( **/ EFI_STATUS -EFIAPI +EFIAPI PeiFfsGetVolumeInfo ( IN EFI_PEI_FV_HANDLE VolumeHandle, OUT EFI_FV_INFO *VolumeInfo ) { PEI_CORE_FV_HANDLE *CoreHandle; - + if ((VolumeInfo == NULL) || (VolumeHandle == NULL)) { return EFI_INVALID_PARAMETER; } - + CoreHandle = FvHandleToCoreHandle (VolumeHandle); - + if ((CoreHandle == NULL) || (CoreHandle->FvPpi == NULL)) { return EFI_INVALID_PARAMETER; } - + return CoreHandle->FvPpi->GetVolumeInfo (CoreHandle->FvPpi, VolumeHandle, VolumeInfo); } @@ -1369,7 +1369,7 @@ GetFvUsedSize ( @retval EFI_OUT_OF_RESOURCES Can not allocate page when aligning FV image @retval EFI_SECURITY_VIOLATION Image is illegal @retval Others Can not find EFI_SECTION_FIRMWARE_VOLUME_IMAGE section - + **/ EFI_STATUS ProcessFvFile ( @@ -1410,7 +1410,7 @@ ProcessFvFile ( ParentFvHandle = ParentFvCoreHandle->FvHandle; ParentFvPpi = ParentFvCoreHandle->FvPpi; - + // // Find FvImage in FvFile // @@ -1492,10 +1492,10 @@ ProcessFvFile ( Status = ParentFvPpi->GetVolumeInfo (ParentFvPpi, ParentFvHandle, &ParentFvImageInfo); ASSERT_EFI_ERROR (Status); - + Status = ParentFvPpi->GetFileInfo (ParentFvPpi, ParentFvFileHandle, &FileInfo); ASSERT_EFI_ERROR (Status); - + // // Install FvInfo(2) Ppi // NOTE: FvInfo2 must be installed before FvInfo so that recursive processing of encapsulated @@ -1562,15 +1562,15 @@ ProcessFvFile ( buffer which contains the necessary information for creating the firmware volume handle. Normally, these values are derived from the EFI_FIRMWARE_VOLUME_INFO_PPI. - - + + @param This Points to this instance of the EFI_PEI_FIRMWARE_VOLUME_PPI. @param Buffer Points to the start of the buffer. @param BufferSize Size of the buffer. @param FvHandle Points to the returned firmware volume handle. The firmware volume handle must - be unique within the system. + be unique within the system. @retval EFI_SUCCESS Firmware volume handle created. @retval EFI_VOLUME_CORRUPTED Volume was corrupt. @@ -1586,19 +1586,19 @@ PeiFfsFvPpiProcessVolume ( ) { EFI_STATUS Status; - + ASSERT (FvHandle != NULL); - + if (Buffer == NULL) { return EFI_VOLUME_CORRUPTED; } - + // // The build-in EFI_PEI_FIRMWARE_VOLUME_PPI for FFS2/FFS3 support memory-mapped // FV image and the handle is pointed to Fv image's buffer. // *FvHandle = (EFI_PEI_FV_HANDLE) Buffer; - + // // Do verify for given FV buffer. // @@ -1609,12 +1609,12 @@ PeiFfsFvPpiProcessVolume ( } return EFI_SUCCESS; -} +} /** Finds the next file of the specified type. - This service enables PEI modules to discover additional firmware files. + This service enables PEI modules to discover additional firmware files. The FileHandle must be unique within the system. @param This Points to this instance of the @@ -1641,13 +1641,13 @@ PeiFfsFvPpiFindFileByType ( IN EFI_PEI_FV_HANDLE FvHandle, IN OUT EFI_PEI_FILE_HANDLE *FileHandle ) -{ +{ return FindFileEx (FvHandle, NULL, SearchType, FileHandle, NULL); } /** - Find a file within a volume by its name. - + Find a file within a volume by its name. + This service searches for files with a specific name, within either the specified firmware volume or all firmware volumes. @@ -1676,28 +1676,28 @@ PeiFfsFvPpiFindFileByName ( IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This, IN CONST EFI_GUID *FileName, IN EFI_PEI_FV_HANDLE *FvHandle, - OUT EFI_PEI_FILE_HANDLE *FileHandle + OUT EFI_PEI_FILE_HANDLE *FileHandle ) { EFI_STATUS Status; PEI_CORE_INSTANCE *PrivateData; UINTN Index; - + if ((FvHandle == NULL) || (FileName == NULL) || (FileHandle == NULL)) { return EFI_INVALID_PARAMETER; } - + if (*FvHandle != NULL) { Status = FindFileEx (*FvHandle, FileName, 0, FileHandle, NULL); if (Status == EFI_NOT_FOUND) { *FileHandle = NULL; } - } else { + } else { // // If *FvHandle = NULL, so search all FV for given filename // Status = EFI_NOT_FOUND; - + PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS (GetPeiServicesTablePointer()); for (Index = 0; Index < PrivateData->FvCount; Index ++) { // @@ -1712,17 +1712,17 @@ PeiFfsFvPpiFindFileByName ( } } } - - return Status; -} + + return Status; +} /** Returns information about a specific file. This function returns information about a specific file, including its file name, type, attributes, starting - address and size. - + address and size. + @param This Points to this instance of the EFI_PEI_FIRMWARE_VOLUME_PPI. @param FileHandle Handle of the file. @@ -1733,13 +1733,13 @@ PeiFfsFvPpiFindFileByName ( @retval EFI_INVALID_PARAMETER If FileHandle does not represent a valid file. @retval EFI_INVALID_PARAMETER If FileInfo is NULL. - -**/ + +**/ EFI_STATUS EFIAPI PeiFfsFvPpiGetFileInfo ( - IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This, - IN EFI_PEI_FILE_HANDLE FileHandle, + IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This, + IN EFI_PEI_FILE_HANDLE FileHandle, OUT EFI_FV_FILE_INFO *FileInfo ) { @@ -1770,14 +1770,14 @@ PeiFfsFvPpiGetFileInfo ( } // - // Get FileState which is the highest bit of the State + // Get FileState which is the highest bit of the State // FileState = GetFileState (ErasePolarity, (EFI_FFS_FILE_HEADER*)FileHandle); switch (FileState) { case EFI_FILE_DATA_VALID: case EFI_FILE_MARKED_FOR_UPDATE: - break; + break; default: return EFI_INVALID_PARAMETER; } @@ -1826,8 +1826,8 @@ PeiFfsFvPpiGetFileInfo ( EFI_STATUS EFIAPI PeiFfsFvPpiGetFileInfo2 ( - IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This, - IN EFI_PEI_FILE_HANDLE FileHandle, + IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This, + IN EFI_PEI_FILE_HANDLE FileHandle, OUT EFI_FV_FILE_INFO2 *FileInfo ) { @@ -1856,7 +1856,7 @@ PeiFfsFvPpiGetFileInfo2 ( /** This function returns information about the firmware volume. - + @param This Points to this instance of the EFI_PEI_FIRMWARE_VOLUME_PPI. @param FvHandle Handle to the firmware handle. @@ -1867,12 +1867,12 @@ PeiFfsFvPpiGetFileInfo2 ( @retval EFI_INVALID_PARAMETER FvHandle does not indicate a valid firmware volume or VolumeInfo is NULL. -**/ +**/ EFI_STATUS EFIAPI PeiFfsFvPpiGetVolumeInfo ( - IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This, - IN EFI_PEI_FV_HANDLE FvHandle, + IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This, + IN EFI_PEI_FV_HANDLE FvHandle, OUT EFI_FV_INFO *VolumeInfo ) { @@ -1882,10 +1882,10 @@ PeiFfsFvPpiGetVolumeInfo ( if ((VolumeInfo == NULL) || (FvHandle == NULL)) { return EFI_INVALID_PARAMETER; } - + // - // VolumeHandle may not align at 8 byte, - // but FvLength is UINT64 type, which requires FvHeader align at least 8 byte. + // VolumeHandle may not align at 8 byte, + // but FvLength is UINT64 type, which requires FvHeader align at least 8 byte. // So, Copy FvHeader into the local FvHeader structure. // CopyMem (&FwVolHeader, FvHandle, sizeof (EFI_FIRMWARE_VOLUME_HEADER)); @@ -1907,16 +1907,16 @@ PeiFfsFvPpiGetVolumeInfo ( FwVolExHeaderInfo = (EFI_FIRMWARE_VOLUME_EXT_HEADER*)(((UINT8 *)FvHandle) + FwVolHeader.ExtHeaderOffset); CopyMem (&VolumeInfo->FvName, &FwVolExHeaderInfo->FvName, sizeof(EFI_GUID)); } - - return EFI_SUCCESS; -} + + return EFI_SUCCESS; +} /** Find the next matching section in the firmware file. - + This service enables PEI modules to discover sections of a given type within a valid file. - + @param This Points to this instance of the EFI_PEI_FIRMWARE_VOLUME_PPI. @param SearchType A filter to find only sections of this @@ -1925,7 +1925,7 @@ PeiFfsFvPpiGetVolumeInfo ( search. @param SectionData Updated upon return to point to the section found. - + @retval EFI_SUCCESS Section was found. @retval EFI_NOT_FOUND Section of the specified type was not found. SectionData contains NULL. @@ -2021,8 +2021,8 @@ PeiFfsFvPpiFindSectionByType2 ( GetPeiServicesTablePointer (), SearchType, &Instance, - Section, - FileSize, + Section, + FileSize, SectionData, &ExtractedAuthenticationStatus, FwVolInstance->IsFfs3Fv @@ -2038,11 +2038,11 @@ PeiFfsFvPpiFindSectionByType2 ( /** Convert the handle of FV to pointer of corresponding PEI_CORE_FV_HANDLE. - + @param FvHandle The handle of a FV. - + @retval NULL if can not find. - @return Pointer of corresponding PEI_CORE_FV_HANDLE. + @return Pointer of corresponding PEI_CORE_FV_HANDLE. **/ PEI_CORE_FV_HANDLE * FvHandleToCoreHandle ( @@ -2051,25 +2051,25 @@ FvHandleToCoreHandle ( { UINTN Index; PEI_CORE_INSTANCE *PrivateData; - - PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS (GetPeiServicesTablePointer()); + + PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS (GetPeiServicesTablePointer()); for (Index = 0; Index < PrivateData->FvCount; Index ++) { if (FvHandle == PrivateData->Fv[Index].FvHandle) { return &PrivateData->Fv[Index]; } } - + return NULL; -} +} /** Get instance of PEI_CORE_FV_HANDLE for next volume according to given index. - + This routine also will install FvInfo ppi for FV hob in PI ways. - + @param Private Pointer of PEI_CORE_INSTANCE @param Instance The index of FV want to be searched. - + @return Instance of PEI_CORE_FV_HANDLE. **/ PEI_CORE_FV_HANDLE * @@ -2081,7 +2081,7 @@ FindNextCoreFvHandle ( UINTN Index; BOOLEAN Match; EFI_HOB_FIRMWARE_VOLUME *FvHob; - + // // Handle Framework FvHob and Install FvInfo Ppi for it. // @@ -2101,7 +2101,7 @@ FindNextCoreFvHandle ( break; } } - + // // Search whether FvHob has been cached into PeiCore's Unknown FV database. // If found, no need install new FvInfoPpi for it. @@ -2129,8 +2129,8 @@ FindNextCoreFvHandle ( NULL ); } - - FvHob = (EFI_HOB_FIRMWARE_VOLUME *)GetNextHob (EFI_HOB_TYPE_FV, (VOID *)((UINTN)FvHob + FvHob->Header.HobLength)); + + FvHob = (EFI_HOB_FIRMWARE_VOLUME *)GetNextHob (EFI_HOB_TYPE_FV, (VOID *)((UINTN)FvHob + FvHob->Header.HobLength)); } } @@ -2140,16 +2140,16 @@ FindNextCoreFvHandle ( } return &Private->Fv[Instance]; -} +} /** After PeiCore image is shadowed into permanent memory, all build-in FvPpi should - be re-installed with the instance in permanent memory and all cached FvPpi pointers in + be re-installed with the instance in permanent memory and all cached FvPpi pointers in PrivateData->Fv[] array should be fixed up to be pointed to the one in permanent memory. - + @param PrivateData Pointer to PEI_CORE_INSTANCE. -**/ +**/ VOID PeiReinitializeFv ( IN PEI_CORE_INSTANCE *PrivateData @@ -2219,17 +2219,17 @@ PeiReinitializeFv ( /** Report the information for a new discoveried FV in unknown third-party format. - + If the EFI_PEI_FIRMWARE_VOLUME_PPI has not been installed for third-party FV format, but the FV in this format has been discoveried, then this FV's information will be cached into PEI_CORE_INSTANCE's UnknownFvInfo array. Also a notification would be installed for unknown third-party FV format guid, if EFI_PEI_FIRMWARE_VOLUME_PPI is installed later by platform's PEIM, the original unknown third-party FV will be processed by using new installed EFI_PEI_FIRMWARE_VOLUME_PPI. - + @param PrivateData Point to instance of PEI_CORE_INSTANCE @param FvInfo2Ppi Point to FvInfo2 PPI. - + @retval EFI_OUT_OF_RESOURCES The FV info array in PEI_CORE_INSTANCE has no more spaces. @retval EFI_SUCCESS Success to add the information for unknown FV. **/ @@ -2240,14 +2240,14 @@ AddUnknownFormatFvInfo ( ) { PEI_CORE_UNKNOW_FORMAT_FV_INFO *NewUnknownFv; - + if (PrivateData->UnknownFvInfoCount + 1 >= PcdGet32 (PcdPeiCoreMaxFvSupported)) { return EFI_OUT_OF_RESOURCES; } - + NewUnknownFv = &PrivateData->UnknownFvInfo[PrivateData->UnknownFvInfoCount]; PrivateData->UnknownFvInfoCount ++; - + CopyGuid (&NewUnknownFv->FvFormat, &FvInfo2Ppi->FvFormat); NewUnknownFv->FvInfo = FvInfo2Ppi->FvInfo; NewUnknownFv->FvInfoSize = FvInfo2Ppi->FvInfoSize; @@ -2255,23 +2255,23 @@ AddUnknownFormatFvInfo ( NewUnknownFv->NotifyDescriptor.Flags = (EFI_PEI_PPI_DESCRIPTOR_NOTIFY_CALLBACK | EFI_PEI_PPI_DESCRIPTOR_TERMINATE_LIST); NewUnknownFv->NotifyDescriptor.Guid = &NewUnknownFv->FvFormat; NewUnknownFv->NotifyDescriptor.Notify = ThirdPartyFvPpiNotifyCallback; - + PeiServicesNotifyPpi (&NewUnknownFv->NotifyDescriptor); return EFI_SUCCESS; } /** Find the FV information according to third-party FV format guid. - + This routine also will remove the FV information found by given FV format guid from PrivateData->UnknownFvInfo[]. - + @param PrivateData Point to instance of PEI_CORE_INSTANCE @param Format Point to given FV format guid @param FvInfo On return, the pointer of FV information buffer @param FvInfoSize On return, the size of FV information buffer. @param AuthenticationStatus On return, the authentication status of FV information buffer. - + @retval EFI_NOT_FOUND The FV is not found for new installed EFI_PEI_FIRMWARE_VOLUME_PPI @retval EFI_SUCCESS Success to find a FV which could be processed by new installed EFI_PEI_FIRMWARE_VOLUME_PPI. **/ @@ -2293,15 +2293,15 @@ FindUnknownFormatFvInfo ( break; } } - + if (Index == PrivateData->UnknownFvInfoCount) { return EFI_NOT_FOUND; } - + *FvInfo = PrivateData->UnknownFvInfo[Index].FvInfo; *FvInfoSize = PrivateData->UnknownFvInfo[Index].FvInfoSize; *AuthenticationStatus = PrivateData->UnknownFvInfo[Index].AuthenticationStatus; - + // // Remove an entry from UnknownFvInfo array. // @@ -2311,18 +2311,18 @@ FindUnknownFormatFvInfo ( } PrivateData->UnknownFvInfoCount --; return EFI_SUCCESS; -} +} /** Notification callback function for EFI_PEI_FIRMWARE_VOLUME_PPI. - - When a EFI_PEI_FIRMWARE_VOLUME_PPI is installed to support new FV format, this + + When a EFI_PEI_FIRMWARE_VOLUME_PPI is installed to support new FV format, this routine is called to process all discoveried FVs in this format. - + @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation @param NotifyDescriptor Address of the notification descriptor data structure. @param Ppi Address of the PPI that was installed. - + @retval EFI_SUCCESS The notification callback is processed correctly. **/ EFI_STATUS @@ -2343,18 +2343,18 @@ ThirdPartyFvPpiNotifyCallback ( BOOLEAN IsProcessed; UINTN FvIndex; EFI_PEI_FILE_HANDLE FileHandle; - VOID *DepexData; + VOID *DepexData; UINTN CurFvCount; PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS (PeiServices); FvPpi = (EFI_PEI_FIRMWARE_VOLUME_PPI*) Ppi; - + do { Status = FindUnknownFormatFvInfo (PrivateData, NotifyDescriptor->Guid, &FvInfo, &FvInfoSize, &AuthenticationStatus); if (EFI_ERROR (Status)) { return EFI_SUCCESS; } - + // // Process new found FV and get FV handle. // @@ -2375,17 +2375,17 @@ ThirdPartyFvPpiNotifyCallback ( break; } } - + if (IsProcessed) { continue; } - + if (PrivateData->FvCount >= PcdGet32 (PcdPeiCoreMaxFvSupported)) { DEBUG ((EFI_D_ERROR, "The number of Fv Images (%d) exceed the max supported FVs (%d) in Pei", PrivateData->FvCount + 1, PcdGet32 (PcdPeiCoreMaxFvSupported))); DEBUG ((EFI_D_ERROR, "PcdPeiCoreMaxFvSupported value need be reconfigurated in DSC")); ASSERT (FALSE); } - + // // Update internal PEI_CORE_FV array. // @@ -2395,17 +2395,17 @@ ThirdPartyFvPpiNotifyCallback ( PrivateData->Fv[PrivateData->FvCount].AuthenticationStatus = AuthenticationStatus; CurFvCount = PrivateData->FvCount; DEBUG (( - EFI_D_INFO, - "The %dth FV start address is 0x%11p, size is 0x%08x, handle is 0x%p\n", + EFI_D_INFO, + "The %dth FV start address is 0x%11p, size is 0x%08x, handle is 0x%p\n", (UINT32) CurFvCount, - (VOID *) FvInfo, + (VOID *) FvInfo, FvInfoSize, FvHandle - )); + )); PrivateData->FvCount ++; // - // Scan and process the new discoveried FV for EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE + // Scan and process the new discoveried FV for EFI_FV_FILETYPE_FIRMWARE_VOLUME_IMAGE // FileHandle = NULL; do { @@ -2430,7 +2430,7 @@ ThirdPartyFvPpiNotifyCallback ( continue; } } - + DEBUG ((EFI_D_INFO, "Found firmware volume Image File %p in FV[%d] %p\n", FileHandle, CurFvCount, FvHandle)); ProcessFvFile (PrivateData, &PrivateData->Fv[CurFvCount], FileHandle); } diff --git a/MdeModulePkg/Core/Pei/FwVol/FwVol.h b/MdeModulePkg/Core/Pei/FwVol/FwVol.h index 1daeb6d97b..4a2451d71c 100644 --- a/MdeModulePkg/Core/Pei/FwVol/FwVol.h +++ b/MdeModulePkg/Core/Pei/FwVol/FwVol.h @@ -1,14 +1,14 @@ /** @file The internal header file for firmware volume related definitions. - -Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -43,15 +43,15 @@ typedef struct { buffer which contains the necessary information for creating the firmware volume handle. Normally, these values are derived from the EFI_FIRMWARE_VOLUME_INFO_PPI. - - + + @param This Points to this instance of the EFI_PEI_FIRMWARE_VOLUME_PPI. @param Buffer Points to the start of the buffer. @param BufferSize Size of the buffer. @param FvHandle Points to the returned firmware volume handle. The firmware volume handle must - be unique within the system. + be unique within the system. @retval EFI_SUCCESS Firmware volume handle created. @retval EFI_VOLUME_CORRUPTED Volume was corrupt. @@ -65,11 +65,11 @@ PeiFfsFvPpiProcessVolume ( IN UINTN BufferSize, OUT EFI_PEI_FV_HANDLE *FvHandle ); - + /** Finds the next file of the specified type. - This service enables PEI modules to discover additional firmware files. + This service enables PEI modules to discover additional firmware files. The FileHandle must be unique within the system. @param This Points to this instance of the @@ -87,7 +87,7 @@ PeiFfsFvPpiProcessVolume ( @retval EFI_SUCCESS The file was found. @retval EFI_NOT_FOUND The file was not found. FileHandle contains NULL. -**/ +**/ EFI_STATUS EFIAPI PeiFfsFvPpiFindFileByType ( @@ -98,8 +98,8 @@ PeiFfsFvPpiFindFileByType ( ); /** - Find a file within a volume by its name. - + Find a file within a volume by its name. + This service searches for files with a specific name, within either the specified firmware volume or all firmware volumes. @@ -121,22 +121,22 @@ PeiFfsFvPpiFindFileByType ( FileName was NULL. -**/ +**/ EFI_STATUS EFIAPI PeiFfsFvPpiFindFileByName ( IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This, IN CONST EFI_GUID *FileName, IN EFI_PEI_FV_HANDLE *FvHandle, - OUT EFI_PEI_FILE_HANDLE *FileHandle + OUT EFI_PEI_FILE_HANDLE *FileHandle ); /** Find the next matching section in the firmware file. - + This service enables PEI modules to discover sections of a given type within a valid file. - + @param This Points to this instance of the EFI_PEI_FIRMWARE_VOLUME_PPI. @param SearchType A filter to find only sections of this @@ -145,11 +145,11 @@ PeiFfsFvPpiFindFileByName ( search. @param SectionData Updated upon return to point to the section found. - + @retval EFI_SUCCESS Section was found. @retval EFI_NOT_FOUND Section of the specified type was not found. SectionData contains NULL. -**/ +**/ EFI_STATUS EFIAPI PeiFfsFvPpiFindSectionByType ( @@ -198,8 +198,8 @@ PeiFfsFvPpiFindSectionByType2 ( This function returns information about a specific file, including its file name, type, attributes, starting - address and size. - + address and size. + @param This Points to this instance of the EFI_PEI_FIRMWARE_VOLUME_PPI. @param FileHandle Handle of the file. @@ -210,13 +210,13 @@ PeiFfsFvPpiFindSectionByType2 ( @retval EFI_INVALID_PARAMETER If FileHandle does not represent a valid file. @retval EFI_INVALID_PARAMETER If FileInfo is NULL. - -**/ + +**/ EFI_STATUS EFIAPI PeiFfsFvPpiGetFileInfo ( - IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This, - IN EFI_PEI_FILE_HANDLE FileHandle, + IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This, + IN EFI_PEI_FILE_HANDLE FileHandle, OUT EFI_FV_FILE_INFO *FileInfo ); @@ -249,7 +249,7 @@ PeiFfsFvPpiGetFileInfo2 ( /** This function returns information about the firmware volume. - + @param This Points to this instance of the EFI_PEI_FIRMWARE_VOLUME_PPI. @param FvHandle Handle to the firmware handle. @@ -260,28 +260,28 @@ PeiFfsFvPpiGetFileInfo2 ( @retval EFI_INVALID_PARAMETER FvHandle does not indicate a valid firmware volume or VolumeInfo is NULL. -**/ +**/ EFI_STATUS EFIAPI PeiFfsFvPpiGetVolumeInfo ( - IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This, - IN EFI_PEI_FV_HANDLE FvHandle, + IN CONST EFI_PEI_FIRMWARE_VOLUME_PPI *This, + IN EFI_PEI_FV_HANDLE FvHandle, OUT EFI_FV_INFO *VolumeInfo ); /** Convert the handle of FV to pointer of corresponding PEI_CORE_FV_HANDLE. - + @param FvHandle The handle of a FV. - + @retval NULL if can not find. - @return Pointer of corresponding PEI_CORE_FV_HANDLE. + @return Pointer of corresponding PEI_CORE_FV_HANDLE. **/ PEI_CORE_FV_HANDLE * FvHandleToCoreHandle ( IN EFI_PEI_FV_HANDLE FvHandle ); - + /** Given the input file pointer, search for the next matching file in the FFS volume as defined by SearchType. The search starts from FileHeader inside @@ -310,17 +310,17 @@ FindFileEx ( /** Report the information for a new discoveried FV in unknown format. - + If the EFI_PEI_FIRMWARE_VOLUME_PPI has not been installed for specifical FV format, but the FV in this FV format has been discoveried, then the information of this FV will be cached into PEI_CORE_INSTANCE's UnknownFvInfo array. Also a notification would be installed for unknown FV format guid, if EFI_PEI_FIRMWARE_VOLUME_PPI is installed later by platform's PEIM, the original unknown FV will be processed by using new installed EFI_PEI_FIRMWARE_VOLUME_PPI. - + @param PrivateData Point to instance of PEI_CORE_INSTANCE @param FvInfo2Ppi Point to FvInfo2 PPI. - + @retval EFI_OUT_OF_RESOURCES The FV info array in PEI_CORE_INSTANCE has no more spaces. @retval EFI_SUCCESS Success to add the information for unknown FV. **/ @@ -329,19 +329,19 @@ AddUnknownFormatFvInfo ( IN PEI_CORE_INSTANCE *PrivateData, IN EFI_PEI_FIRMWARE_VOLUME_INFO2_PPI *FvInfo2Ppi ); - + /** Find the FV information according to FV format guid. - + This routine also will remove the FV information found by given FV format guid from PrivateData->UnknownFvInfo[]. - + @param PrivateData Point to instance of PEI_CORE_INSTANCE @param Format Point to given FV format guid @param FvInfo On return, the pointer of FV information buffer in given FV format guid @param FvInfoSize On return, the size of FV information buffer. @param AuthenticationStatus On return, the authentication status of FV information buffer. - + @retval EFI_NOT_FOUND The FV is not found for new installed EFI_PEI_FIRMWARE_VOLUME_PPI @retval EFI_SUCCESS Success to find a FV which could be processed by new installed EFI_PEI_FIRMWARE_VOLUME_PPI. **/ @@ -353,17 +353,17 @@ FindUnknownFormatFvInfo ( OUT UINT32 *FvInfoSize, OUT UINT32 *AuthenticationStatus ); - + /** Notification callback function for EFI_PEI_FIRMWARE_VOLUME_PPI. - - When a EFI_PEI_FIRMWARE_VOLUME_PPI is installed to support new FV format, this + + When a EFI_PEI_FIRMWARE_VOLUME_PPI is installed to support new FV format, this routine is called to process all discoveried FVs in this format. - + @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation @param NotifyDescriptor Address of the notification descriptor data structure. @param Ppi Address of the PPI that was installed. - + @retval EFI_SUCCESS The notification callback is processed correctly. **/ EFI_STATUS @@ -372,6 +372,6 @@ ThirdPartyFvPpiNotifyCallback ( IN EFI_PEI_SERVICES **PeiServices, IN EFI_PEI_NOTIFY_DESCRIPTOR *NotifyDescriptor, IN VOID *Ppi - ); - -#endif + ); + +#endif diff --git a/MdeModulePkg/Core/Pei/Hob/Hob.c b/MdeModulePkg/Core/Pei/Hob/Hob.c index bb9f3f744e..ed49e5be4a 100644 --- a/MdeModulePkg/Core/Pei/Hob/Hob.c +++ b/MdeModulePkg/Core/Pei/Hob/Hob.c @@ -1,14 +1,14 @@ /** @file This module provide Hand-Off Block manupulation. - -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -34,22 +34,22 @@ PeiGetHobList ( ) { PEI_CORE_INSTANCE *PrivateData; - + // // Only check this parameter in debug mode // - - DEBUG_CODE_BEGIN (); + + DEBUG_CODE_BEGIN (); if (HobList == NULL) { return EFI_INVALID_PARAMETER; } DEBUG_CODE_END (); - + PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS(PeiServices); *HobList = PrivateData->HobList.Raw; - return EFI_SUCCESS; + return EFI_SUCCESS; } @@ -90,7 +90,7 @@ PeiCreateHob ( HandOffHob = *Hob; // - // Check Length to avoid data overflow. + // Check Length to avoid data overflow. // if (0x10000 - Length <= 0x7) { return EFI_INVALID_PARAMETER; @@ -106,7 +106,7 @@ PeiCreateHob ( DEBUG ((EFI_D_ERROR, " FreeMemoryBottom - 0x%08x\n", (UINTN)HandOffHob->EfiFreeMemoryBottom)); return EFI_OUT_OF_RESOURCES; } - + *Hob = (VOID*) (UINTN) HandOffHob->EfiEndOfHobList; ((EFI_HOB_GENERIC_HEADER*) *Hob)->HobType = Type; ((EFI_HOB_GENERIC_HEADER*) *Hob)->HobLength = Length; @@ -114,14 +114,14 @@ PeiCreateHob ( HobEnd = (EFI_HOB_GENERIC_HEADER*) ((UINTN) *Hob + Length); HandOffHob->EfiEndOfHobList = (EFI_PHYSICAL_ADDRESS) (UINTN) HobEnd; - + HobEnd->HobType = EFI_HOB_TYPE_END_OF_HOB_LIST; HobEnd->HobLength = (UINT16) sizeof (EFI_HOB_GENERIC_HEADER); HobEnd->Reserved = 0; HobEnd++; HandOffHob->EfiFreeMemoryBottom = (EFI_PHYSICAL_ADDRESS) (UINTN) HobEnd; - return EFI_SUCCESS; + return EFI_SUCCESS; } /** @@ -222,14 +222,14 @@ PeiCoreBuildHobHandoffInfoTable ( Hob->Header.HobType = EFI_HOB_TYPE_HANDOFF; Hob->Header.HobLength = (UINT16) sizeof (EFI_HOB_HANDOFF_INFO_TABLE); Hob->Header.Reserved = 0; - + HobEnd->HobType = EFI_HOB_TYPE_END_OF_HOB_LIST; HobEnd->HobLength = (UINT16) sizeof (EFI_HOB_GENERIC_HEADER); HobEnd->Reserved = 0; Hob->Version = EFI_HOB_HANDOFF_TABLE_VERSION; Hob->BootMode = BootMode; - + Hob->EfiMemoryTop = MemoryBegin + MemoryLength; Hob->EfiMemoryBottom = MemoryBegin; Hob->EfiFreeMemoryTop = MemoryBegin + MemoryLength; diff --git a/MdeModulePkg/Core/Pei/Image/Image.c b/MdeModulePkg/Core/Pei/Image/Image.c index f07f488231..f84f2c77ad 100644 --- a/MdeModulePkg/Core/Pei/Image/Image.c +++ b/MdeModulePkg/Core/Pei/Image/Image.c @@ -50,7 +50,7 @@ PeiImageRead ( { CHAR8 *Destination8; CHAR8 *Source8; - + Destination8 = Buffer; Source8 = (CHAR8 *) ((UINTN) FileHandle + FileOffset); if (Destination8 != Source8) { @@ -119,10 +119,10 @@ GetImageReadFunction ( Private = PEI_CORE_INSTANCE_FROM_PS_THIS (GetPeiServicesTablePointer ()); MemoryBuffer = 0; - if (Private->PeiMemoryInstalled && (((Private->HobList.HandoffInformationTable->BootMode != BOOT_ON_S3_RESUME) && PcdGetBool (PcdShadowPeimOnBoot)) || + if (Private->PeiMemoryInstalled && (((Private->HobList.HandoffInformationTable->BootMode != BOOT_ON_S3_RESUME) && PcdGetBool (PcdShadowPeimOnBoot)) || ((Private->HobList.HandoffInformationTable->BootMode == BOOT_ON_S3_RESUME) && PcdGetBool (PcdShadowPeimOnS3Boot)))) { - // - // Shadow algorithm makes lots of non ANSI C assumptions and only works for IA32 and X64 + // + // Shadow algorithm makes lots of non ANSI C assumptions and only works for IA32 and X64 // compilers that have been tested // if (Private->ShadowedImageRead == NULL) { @@ -144,12 +144,12 @@ GetImageReadFunction ( /** To check memory usage bit map array to figure out if the memory range the image will be loaded in is available or not. If memory range is available, the function will mark the corresponding bits to 1 which indicates the memory range is used. - The function is only invoked when load modules at fixed address feature is enabled. - + The function is only invoked when load modules at fixed address feature is enabled. + @param Private Pointer to the private data passed in from caller @param ImageBase The base address the image will be loaded at. @param ImageSize The size of the image - + @retval EFI_SUCCESS The memory range the image will be loaded in is available @retval EFI_NOT_FOUND The memory range the image will be loaded in is not available **/ @@ -167,7 +167,7 @@ CheckAndMarkFixLoadingMemoryUsageBitMap ( UINT32 TopOffsetPageNumber; UINT32 Index; UINT64 *MemoryUsageBitMap; - + // // The reserved code range includes RuntimeCodePage range, Boot time code range and PEI code range. @@ -176,19 +176,19 @@ CheckAndMarkFixLoadingMemoryUsageBitMap ( DxeCodePageNumber += PcdGet32(PcdLoadFixAddressRuntimeCodePageNumber); ReservedCodeSize = EFI_PAGES_TO_SIZE(DxeCodePageNumber + PcdGet32(PcdLoadFixAddressPeiCodePageNumber)); PeiCodeBase = Private->LoadModuleAtFixAddressTopAddress - ReservedCodeSize; - + // // Test the memory range for loading the image in the PEI code range. // if ((Private->LoadModuleAtFixAddressTopAddress - EFI_PAGES_TO_SIZE(DxeCodePageNumber)) < (ImageBase + ImageSize) || - (PeiCodeBase > ImageBase)) { - return EFI_NOT_FOUND; + (PeiCodeBase > ImageBase)) { + return EFI_NOT_FOUND; } - + // // Test if the memory is avalaible or not. // - MemoryUsageBitMap = Private->PeiCodeMemoryRangeUsageBitMap; + MemoryUsageBitMap = Private->PeiCodeMemoryRangeUsageBitMap; BaseOffsetPageNumber = EFI_SIZE_TO_PAGES((UINT32)(ImageBase - PeiCodeBase)); TopOffsetPageNumber = EFI_SIZE_TO_PAGES((UINT32)(ImageBase + ImageSize - PeiCodeBase)); for (Index = BaseOffsetPageNumber; Index < TopOffsetPageNumber; Index ++) { @@ -196,17 +196,17 @@ CheckAndMarkFixLoadingMemoryUsageBitMap ( // // This page is already used. // - return EFI_NOT_FOUND; + return EFI_NOT_FOUND; } } - + // // Being here means the memory range is available. So mark the bits for the memory range - // + // for (Index = BaseOffsetPageNumber; Index < TopOffsetPageNumber; Index ++) { MemoryUsageBitMap[Index / 64] |= LShiftU64(1, (Index % 64)); } - return EFI_SUCCESS; + return EFI_SUCCESS; } /** @@ -236,7 +236,7 @@ GetPeCoffImageFixLoadingAssignedAddress( UINTN Size; UINT16 NumberOfSections; UINT64 ValueInSectionHeader; - + FixLoadingAddress = 0; Status = EFI_NOT_FOUND; @@ -338,7 +338,7 @@ GetPeCoffImageFixLoadingAssignedAddress( @retval EFI_SUCCESS The file was loaded and relocated @retval EFI_OUT_OF_RESOURCES There was not enough memory to load and relocate the PE/COFF file - @retval EFI_WARN_BUFFER_TOO_SMALL + @retval EFI_WARN_BUFFER_TOO_SMALL There is not enough heap to allocate the requested size. This will not prevent the XIP image from being invoked. @@ -377,7 +377,7 @@ LoadAndRelocatePeCoffImage ( if (EFI_ERROR (Status)) { return Status; } - + // // Initilize local IsS3Boot and IsRegisterForShadow variable // @@ -386,7 +386,7 @@ LoadAndRelocatePeCoffImage ( IsS3Boot = TRUE; } IsRegisterForShadow = FALSE; - if ((Private->CurrentFileHandle == FileHandle) + if ((Private->CurrentFileHandle == FileHandle) && (Private->Fv[Private->CurrentPeimFvCount].PeimState[Private->CurrentPeimCount] == PEIM_STATE_REGISTER_FOR_SHADOW)) { IsRegisterForShadow = TRUE; } @@ -403,13 +403,13 @@ LoadAndRelocatePeCoffImage ( // Status = PeiServicesFfsGetFileInfo (FileHandle, &FileInfo); ASSERT_EFI_ERROR (Status); - + // // Check whether the file type is PEI module. // IsPeiModule = FALSE; - if (FileInfo.FileType == EFI_FV_FILETYPE_PEI_CORE || - FileInfo.FileType == EFI_FV_FILETYPE_PEIM || + if (FileInfo.FileType == EFI_FV_FILETYPE_PEI_CORE || + FileInfo.FileType == EFI_FV_FILETYPE_PEIM || FileInfo.FileType == EFI_FV_FILETYPE_COMBINED_PEIM_DRIVER) { IsPeiModule = TRUE; } @@ -548,7 +548,7 @@ LoadAndRelocatePeCoffImage ( @retval EFI_SUCCESS Image is successfully loaded. @retval EFI_NOT_FOUND Fail to locate necessary PPI. @retval EFI_UNSUPPORTED Image Machine Type is not supported. - @retval EFI_WARN_BUFFER_TOO_SMALL + @retval EFI_WARN_BUFFER_TOO_SMALL There is not enough heap to allocate the requested size. This will not prevent the XIP image from being invoked. diff --git a/MdeModulePkg/Core/Pei/Memory/MemoryServices.c b/MdeModulePkg/Core/Pei/Memory/MemoryServices.c index 516311d091..4dc62d2262 100644 --- a/MdeModulePkg/Core/Pei/Memory/MemoryServices.c +++ b/MdeModulePkg/Core/Pei/Memory/MemoryServices.c @@ -1,14 +1,14 @@ /** @file EFI PEI Core memory services - -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -33,7 +33,7 @@ InitializeMemoryServices ( IN PEI_CORE_INSTANCE *OldCoreData ) { - + PrivateData->SwitchStackSignal = FALSE; // @@ -44,7 +44,7 @@ InitializeMemoryServices ( PrivateData->PeiMemoryInstalled = FALSE; PrivateData->HobList.Raw = SecCoreData->PeiTemporaryRamBase; - + PeiCoreBuildHobHandoffInfoTable ( BOOT_WITH_FULL_CONFIGURATION, (EFI_PHYSICAL_ADDRESS) (UINTN) SecCoreData->PeiTemporaryRamBase, @@ -56,7 +56,7 @@ InitializeMemoryServices ( // PrivateData->Ps = &(PrivateData->ServiceTableShadow); } - + return; } @@ -68,7 +68,7 @@ InitializeMemoryServices ( This routine will hold discoveried memory information into PeiCore's private data, and set SwitchStackSignal flag. After PEIM who discovery memory is dispatched, PeiDispatcher will migrate temporary memory to permenement memory. - + @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation. @param MemoryBegin Start of memory address. @param MemoryLength Length of memory. @@ -93,20 +93,20 @@ PeiInstallPeiMemory ( // PEI_SERVICE.InstallPeiMemory should only be called one time during whole PEI phase. // If it is invoked more than one time, ASSERT information is given for developer debugging in debug tip and // simply return EFI_SUCESS in release tip to ignore it. - // + // if (PrivateData->PeiMemoryInstalled) { DEBUG ((EFI_D_ERROR, "ERROR: PeiInstallPeiMemory is called more than once!\n")); ASSERT (FALSE); return EFI_SUCCESS; } - + PrivateData->PhysicalMemoryBegin = MemoryBegin; PrivateData->PhysicalMemoryLength = MemoryLength; PrivateData->FreePhysicalMemoryTop = MemoryBegin + MemoryLength; - + PrivateData->SwitchStackSignal = TRUE; - return EFI_SUCCESS; + return EFI_SUCCESS; } /** @@ -765,8 +765,8 @@ PeiFreePages ( /** Pool allocation service. Before permanent memory is discoveried, the pool will - be allocated the heap in the temporary memory. Genenrally, the size of heap in temporary - memory does not exceed to 64K, so the biggest pool size could be allocated is + be allocated the heap in the temporary memory. Genenrally, the size of heap in temporary + memory does not exceed to 64K, so the biggest pool size could be allocated is 64K. @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation. @@ -793,7 +793,7 @@ PeiAllocatePool ( // If some "post-memory" PEIM wishes to allocate larger pool, // it should use AllocatePages service instead. // - + // // Generally, the size of heap in temporary memory does not exceed to 64K, // HobLength is multiples of 8 bytes, so the maxmium size of pool is 0xFFF8 - sizeof (EFI_HOB_MEMORY_POOL) @@ -801,14 +801,14 @@ PeiAllocatePool ( if (Size > (0xFFF8 - sizeof (EFI_HOB_MEMORY_POOL))) { return EFI_OUT_OF_RESOURCES; } - + Status = PeiServicesCreateHob ( EFI_HOB_TYPE_MEMORY_POOL, (UINT16)(sizeof (EFI_HOB_MEMORY_POOL) + Size), (VOID **)&Hob ); ASSERT_EFI_ERROR (Status); - *Buffer = Hob+1; + *Buffer = Hob+1; return Status; } diff --git a/MdeModulePkg/Core/Pei/PciCfg2/PciCfg2.c b/MdeModulePkg/Core/Pei/PciCfg2/PciCfg2.c index a20e7c00c5..a6a6ad379b 100644 --- a/MdeModulePkg/Core/Pei/PciCfg2/PciCfg2.c +++ b/MdeModulePkg/Core/Pei/PciCfg2/PciCfg2.c @@ -1,26 +1,26 @@ /** @file The default version of EFI_PEI_PCI_CFG2_PPI support published by PeiServices in PeiCore initialization phase. - - EFI_PEI_PCI_CFG2_PPI is installed by the PEIM which supports a PCI root bridge. - When PeiCore is started, the default version of EFI_PEI_PCI_CFG2_PPI will be assigned + + EFI_PEI_PCI_CFG2_PPI is installed by the PEIM which supports a PCI root bridge. + When PeiCore is started, the default version of EFI_PEI_PCI_CFG2_PPI will be assigned to PeiServices table. - -Copyright (c) 2009, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ #include "PeiMain.h" /// -/// This default instance of EFI_PEI_PCI_CFG2_PPI install assigned to EFI_PEI_SERVICE.PciCfg +/// This default instance of EFI_PEI_PCI_CFG2_PPI install assigned to EFI_PEI_SERVICE.PciCfg /// when PeiCore's initialization. /// EFI_PEI_PCI_CFG2_PPI gPeiDefaultPciCfg2Ppi = { @@ -32,9 +32,9 @@ EFI_PEI_PCI_CFG2_PPI gPeiDefaultPciCfg2Ppi = { /** Reads from a given location in the PCI configuration space. - If the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM, then - return EFI_NOT_YET_AVAILABLE. - + If the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM, then + return EFI_NOT_YET_AVAILABLE. + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Width The width of the access. Enumerated in bytes. @@ -46,7 +46,7 @@ EFI_PEI_PCI_CFG2_PPI gPeiDefaultPciCfg2Ppi = { @retval EFI_SUCCESS The function completed successfully. @retval EFI_INVALID_PARAMETER The invalid access width. @retval EFI_NOT_YET_AVAILABLE If the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM. - + **/ EFI_STATUS EFIAPI @@ -64,9 +64,9 @@ PeiDefaultPciCfg2Read ( /** Write to a given location in the PCI configuration space. - If the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM, then - return EFI_NOT_YET_AVAILABLE. - + If the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM, then + return EFI_NOT_YET_AVAILABLE. + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Width The width of the access. Enumerated in bytes. @@ -90,13 +90,13 @@ PeiDefaultPciCfg2Write ( ) { return EFI_NOT_AVAILABLE_YET; -} +} /** This function performs a read-modify-write operation on the contents from a given location in the PCI configuration space. - If the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM, then - return EFI_NOT_YET_AVAILABLE. + If the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM, then + return EFI_NOT_YET_AVAILABLE. @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @@ -125,4 +125,4 @@ PeiDefaultPciCfg2Modify ( ) { return EFI_NOT_AVAILABLE_YET; -} +} diff --git a/MdeModulePkg/Core/Pei/PeiCoreExtra.uni b/MdeModulePkg/Core/Pei/PeiCoreExtra.uni index ec430fccae..f2cea6ca81 100644 --- a/MdeModulePkg/Core/Pei/PeiCoreExtra.uni +++ b/MdeModulePkg/Core/Pei/PeiCoreExtra.uni @@ -1,7 +1,7 @@ // /** @file // PeiCore Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Core PEI Services Module" diff --git a/MdeModulePkg/Core/Pei/PeiMain.h b/MdeModulePkg/Core/Pei/PeiMain.h index a1cdbc15d9..e2f8cd9c77 100644 --- a/MdeModulePkg/Core/Pei/PeiMain.h +++ b/MdeModulePkg/Core/Pei/PeiMain.h @@ -1,7 +1,7 @@ /** @file Definition of Pei Core Structures and Services - -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+ +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -88,7 +88,7 @@ typedef struct { INTN LastDispatchedInstall; /// /// index of last dispatched notify in Notify link list. - /// + /// INTN LastDispatchedNotify; /// /// Ppi database has the PcdPeiCoreMaxPpiSupported number of entries. @@ -157,7 +157,7 @@ typedef struct _PEI_CORE_INSTANCE PEI_CORE_INSTANCE; /** Function Pointer type for PeiCore function. - @param SecCoreData Points to a data structure containing SEC to PEI handoff data, such as the size + @param SecCoreData Points to a data structure containing SEC to PEI handoff data, such as the size and location of temporary RAM, the stack location and the BFV location. @param PpiList Points to a list of one or more PPI descriptors to be installed initially by the PEI core. An empty PPI list consists of a single descriptor with the end-tag @@ -183,18 +183,18 @@ EFI_STATUS /// struct _PEI_CORE_INSTANCE { UINTN Signature; - + /// /// Point to ServiceTableShadow /// EFI_PEI_SERVICES *Ps; PEI_PPI_DATABASE PpiData; - + /// /// The count of FVs which contains FFS and could be dispatched by PeiCore. /// UINTN FvCount; - + /// /// Pointer to the buffer with the PcdPeiCoreMaxFvSupported number of entries. /// Each entry is for one FV which contains FFS and could be dispatched by PeiCore. @@ -207,7 +207,7 @@ struct _PEI_CORE_INSTANCE { /// PEI_CORE_UNKNOW_FORMAT_FV_INFO *UnknownFvInfo; UINTN UnknownFvInfoCount; - + /// /// Pointer to the buffer with the PcdPeiCoreMaxPeimPerFv number of entries. /// @@ -240,15 +240,15 @@ struct _PEI_CORE_INSTANCE { PEICORE_FUNCTION_POINTER ShadowedPeiCore; CACHE_SECTION_DATA CacheSection; // - // For Loading modules at fixed address feature to cache the top address below which the - // Runtime code, boot time code and PEI memory will be placed. Please note that the offset between this field - // and Ps should not be changed since maybe user could get this top address by using the offet to Ps. + // For Loading modules at fixed address feature to cache the top address below which the + // Runtime code, boot time code and PEI memory will be placed. Please note that the offset between this field + // and Ps should not be changed since maybe user could get this top address by using the offet to Ps. // EFI_PHYSICAL_ADDRESS LoadModuleAtFixAddressTopAddress; // // The field is define for Loading modules at fixed address feature to tracker the PEI code // memory range usage. It is a bit mapped array in which every bit indicates the correspoding memory page - // available or not. + // available or not. // UINT64 *PeiCodeMemoryRangeUsageBitMap; // @@ -307,7 +307,7 @@ typedef struct { with the old core data. - @param SecCoreData Points to a data structure containing SEC to PEI handoff data, such as the size + @param SecCoreData Points to a data structure containing SEC to PEI handoff data, such as the size and location of temporary RAM, the stack location and the BFV location. @param PpiList Points to a list of one or more PPI descriptors to be installed initially by the PEI core. An empty PPI list consists of a single descriptor with the end-tag @@ -415,7 +415,7 @@ DepexSatisfied ( Initialize PPI services. @param PrivateData Pointer to the PEI Core data. - @param OldCoreData Pointer to old PEI Core data. + @param OldCoreData Pointer to old PEI Core data. NULL if being run in non-permament memory mode. **/ @@ -429,7 +429,7 @@ InitializePpiServices ( Migrate the Hob list from the temporary memory to PEI installed memory. - @param SecCoreData Points to a data structure containing SEC to PEI handoff data, such as the size + @param SecCoreData Points to a data structure containing SEC to PEI handoff data, such as the size and location of temporary RAM, the stack location and the BFV location. @param PrivateData Pointer to PeiCore's private data structure. @@ -847,7 +847,7 @@ PeiFfsFindNextVolume ( Initialize the memory services. @param PrivateData PeiCore's private data structure - @param SecCoreData Points to a data structure containing SEC to PEI handoff data, such as the size + @param SecCoreData Points to a data structure containing SEC to PEI handoff data, such as the size and location of temporary RAM, the stack location and the BFV location. @param OldCoreData Pointer to the PEI Core data. NULL if being run in non-permament memory mode. @@ -1158,7 +1158,7 @@ PeiFfsGetFileInfo ( **/ EFI_STATUS -EFIAPI +EFIAPI PeiFfsGetFileInfo2 ( IN EFI_PEI_FILE_HANDLE FileHandle, OUT EFI_FV_FILE_INFO2 *FileInfo @@ -1269,7 +1269,7 @@ SecurityPpiNotifyCallback ( @retval EFI_OUT_OF_RESOURCES Can not allocate page when aligning FV image @retval EFI_SECURITY_VIOLATION Image is illegal @retval Others Can not find EFI_SECTION_FIRMWARE_VOLUME_IMAGE section - + **/ EFI_STATUS ProcessFvFile ( @@ -1277,15 +1277,15 @@ ProcessFvFile ( IN PEI_CORE_FV_HANDLE *ParentFvCoreHandle, IN EFI_PEI_FILE_HANDLE ParentFvFileHandle ); - + /** Get instance of PEI_CORE_FV_HANDLE for next volume according to given index. - + This routine also will install FvInfo ppi for FV hob in PI ways. - + @param Private Pointer of PEI_CORE_INSTANCE @param Instance The index of FV want to be searched. - + @return Instance of PEI_CORE_FV_HANDLE. **/ PEI_CORE_FV_HANDLE * @@ -1293,19 +1293,19 @@ FindNextCoreFvHandle ( IN PEI_CORE_INSTANCE *Private, IN UINTN Instance ); - + // // Default EFI_PEI_CPU_IO_PPI support for EFI_PEI_SERVICES table when PeiCore initialization. -// +// /** Memory-based read services. - - This function is to perform the Memory Access Read service based on installed - instance of the EFI_PEI_CPU_IO_PPI. - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then - return EFI_NOT_YET_AVAILABLE. - + + This function is to perform the Memory Access Read service based on installed + instance of the EFI_PEI_CPU_IO_PPI. + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + return EFI_NOT_YET_AVAILABLE. + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @@ -1315,7 +1315,7 @@ FindNextCoreFvHandle ( @param Buffer A pointer to the buffer of data. @retval EFI_SUCCESS The function completed successfully. - @retval EFI_NOT_YET_AVAILABLE The service has not been installed. + @retval EFI_NOT_YET_AVAILABLE The service has not been installed. **/ EFI_STATUS EFIAPI @@ -1327,15 +1327,15 @@ PeiDefaultMemRead ( IN UINTN Count, IN OUT VOID *Buffer ); - + /** Memory-based write services. - - This function is to perform the Memory Access Write service based on installed - instance of the EFI_PEI_CPU_IO_PPI. - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then - return EFI_NOT_YET_AVAILABLE. - + + This function is to perform the Memory Access Write service based on installed + instance of the EFI_PEI_CPU_IO_PPI. + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + return EFI_NOT_YET_AVAILABLE. + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @@ -1345,7 +1345,7 @@ PeiDefaultMemRead ( @param Buffer A pointer to the buffer of data. @retval EFI_SUCCESS The function completed successfully. - @retval EFI_NOT_YET_AVAILABLE The service has not been installed. + @retval EFI_NOT_YET_AVAILABLE The service has not been installed. **/ EFI_STATUS EFIAPI @@ -1357,14 +1357,14 @@ PeiDefaultMemWrite ( IN UINTN Count, IN OUT VOID *Buffer ); - + /** IO-based read services. - + This function is to perform the IO-base read service for the EFI_PEI_CPU_IO_PPI. - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then - return EFI_NOT_YET_AVAILABLE. - + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + return EFI_NOT_YET_AVAILABLE. + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @@ -1386,14 +1386,14 @@ PeiDefaultIoRead ( IN UINTN Count, IN OUT VOID *Buffer ); - + /** IO-based write services. - + This function is to perform the IO-base write service for the EFI_PEI_CPU_IO_PPI. - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then - return EFI_NOT_YET_AVAILABLE. - + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + return EFI_NOT_YET_AVAILABLE. + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @@ -1415,13 +1415,13 @@ PeiDefaultIoWrite ( IN UINTN Count, IN OUT VOID *Buffer ); - + /** 8-bit I/O read operations. - - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return 0. - + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Address The physical address of the access. @@ -1435,13 +1435,13 @@ PeiDefaultIoRead8 ( IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address ); - + /** Reads an 16-bit I/O port. - - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return 0. - + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Address The physical address of the access. @@ -1455,13 +1455,13 @@ PeiDefaultIoRead16 ( IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address ); - + /** Reads an 32-bit I/O port. - - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return 0. - + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Address The physical address of the access. @@ -1475,13 +1475,13 @@ PeiDefaultIoRead32 ( IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address ); - + /** Reads an 64-bit I/O port. - - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return 0. - + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Address The physical address of the access. @@ -1495,7 +1495,7 @@ PeiDefaultIoRead64 ( IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address ); - + /** 8-bit I/O write operations. @@ -1512,7 +1512,7 @@ PeiDefaultIoWrite8 ( IN UINT64 Address, IN UINT8 Data ); - + /** 16-bit I/O write operations. @@ -1529,7 +1529,7 @@ PeiDefaultIoWrite16 ( IN UINT64 Address, IN UINT16 Data ); - + /** 32-bit I/O write operations. @@ -1546,7 +1546,7 @@ PeiDefaultIoWrite32 ( IN UINT64 Address, IN UINT32 Data ); - + /** 64-bit I/O write operations. @@ -1563,13 +1563,13 @@ PeiDefaultIoWrite64 ( IN UINT64 Address, IN UINT64 Data ); - + /** 8-bit memory read operations. - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return 0. - + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Address The physical address of the access. @@ -1584,13 +1584,13 @@ PeiDefaultMemRead8 ( IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address ); - + /** 16-bit memory read operations. - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return 0. - + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Address The physical address of the access. @@ -1605,13 +1605,13 @@ PeiDefaultMemRead16 ( IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address ); - + /** 32-bit memory read operations. - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return 0. - + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Address The physical address of the access. @@ -1626,13 +1626,13 @@ PeiDefaultMemRead32 ( IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address ); - + /** 64-bit memory read operations. - If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then + If the EFI_PEI_CPU_IO_PPI is not installed by platform/chipset PEIM, then return 0. - + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Address The physical address of the access. @@ -1647,7 +1647,7 @@ PeiDefaultMemRead64 ( IN CONST EFI_PEI_CPU_IO_PPI *This, IN UINT64 Address ); - + /** 8-bit memory write operations. @@ -1665,7 +1665,7 @@ PeiDefaultMemWrite8 ( IN UINT64 Address, IN UINT8 Data ); - + /** 16-bit memory write operations. @@ -1701,7 +1701,7 @@ PeiDefaultMemWrite32 ( IN UINT64 Address, IN UINT32 Data ); - + /** 64-bit memory write operations. @@ -1719,19 +1719,19 @@ PeiDefaultMemWrite64 ( IN UINT64 Address, IN UINT64 Data ); - -extern EFI_PEI_CPU_IO_PPI gPeiDefaultCpuIoPpi; + +extern EFI_PEI_CPU_IO_PPI gPeiDefaultCpuIoPpi; // // Default EFI_PEI_PCI_CFG2_PPI support for EFI_PEI_SERVICES table when PeiCore initialization. -// +// /** Reads from a given location in the PCI configuration space. - If the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM, then - return EFI_NOT_YET_AVAILABLE. - + If the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM, then + return EFI_NOT_YET_AVAILABLE. + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Width The width of the access. Enumerated in bytes. @@ -1743,7 +1743,7 @@ extern EFI_PEI_CPU_IO_PPI gPeiDefaultCpuIoPpi; @retval EFI_SUCCESS The function completed successfully. @retval EFI_INVALID_PARAMETER The invalid access width. @retval EFI_NOT_YET_AVAILABLE If the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM. - + **/ EFI_STATUS EFIAPI @@ -1754,13 +1754,13 @@ PeiDefaultPciCfg2Read ( IN UINT64 Address, IN OUT VOID *Buffer ); - + /** Write to a given location in the PCI configuration space. - If the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM, then - return EFI_NOT_YET_AVAILABLE. - + If the EFI_PEI_PCI_CFG2_PPI is not installed by platform/chipset PEIM, then + return EFI_NOT_YET_AVAILABLE. + @param PeiServices An indirect pointer to the PEI Services Table published by the PEI Foundation. @param This Pointer to local data for the interface. @param Width The width of the access. Enumerated in bytes. @@ -1782,7 +1782,7 @@ PeiDefaultPciCfg2Write ( IN UINT64 Address, IN OUT VOID *Buffer ); - + /** This function performs a read-modify-write operation on the contents from a given location in the PCI configuration space. @@ -1811,21 +1811,21 @@ PeiDefaultPciCfg2Modify ( IN UINT64 Address, IN VOID *SetBits, IN VOID *ClearBits - ); - + ); + extern EFI_PEI_PCI_CFG2_PPI gPeiDefaultPciCfg2Ppi; /** After PeiCore image is shadowed into permanent memory, all build-in FvPpi should - be re-installed with the instance in permanent memory and all cached FvPpi pointers in + be re-installed with the instance in permanent memory and all cached FvPpi pointers in PrivateData->Fv[] array should be fixed up to be pointed to the one in permanent memory. - + @param PrivateData Pointer to PEI_CORE_INSTANCE. -**/ +**/ VOID PeiReinitializeFv ( IN PEI_CORE_INSTANCE *PrivateData ); - + #endif diff --git a/MdeModulePkg/Core/Pei/PeiMain.inf b/MdeModulePkg/Core/Pei/PeiMain.inf index 7d9cdaa2f0..2fb01958e5 100644 --- a/MdeModulePkg/Core/Pei/PeiMain.inf +++ b/MdeModulePkg/Core/Pei/PeiMain.inf @@ -6,7 +6,7 @@ # 2) Dispatch PEIM from discovered FV. # 3) Handoff control to DxeIpl to load DXE core and enter DXE phase. # -# Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -81,10 +81,10 @@ ## CONSUMES ## UNDEFINED # Locate ppi ## CONSUMES ## GUID # Used to compare with FV's file system guid and get the FV's file system format gEfiFirmwareFileSystem3Guid - + [Ppis] gEfiPeiStatusCodePpiGuid ## SOMETIMES_CONSUMES # PeiReportStatusService is not ready if this PPI doesn't exist - gEfiPeiResetPpiGuid ## SOMETIMES_CONSUMES # PeiResetService is not ready if this PPI doesn't exist + gEfiPeiResetPpiGuid ## SOMETIMES_CONSUMES # PeiResetService is not ready if this PPI doesn't exist gEfiDxeIplPpiGuid ## CONSUMES gEfiPeiMemoryDiscoveredPpiGuid ## PRODUCES gEfiPeiDecompressPpiGuid ## SOMETIMES_CONSUMES @@ -103,7 +103,7 @@ gEfiPeiReset2PpiGuid ## SOMETIMES_CONSUMES gEfiSecHobDataPpiGuid ## SOMETIMES_CONSUMES -[Pcd] +[Pcd] gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxFvSupported ## CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPeimPerFv ## CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdPeiCoreMaxPpiSupported ## CONSUMES @@ -114,8 +114,8 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdLoadFixAddressBootTimeCodePageNumber ## SOMETIMES_CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdLoadFixAddressRuntimeCodePageNumber ## SOMETIMES_CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdLoadModuleAtFixAddressEnable ## CONSUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdShadowPeimOnS3Boot ## CONSUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdShadowPeimOnBoot ## CONSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdShadowPeimOnS3Boot ## CONSUMES + gEfiMdeModulePkgTokenSpaceGuid.PcdShadowPeimOnBoot ## CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdInitValueInTempStack ## CONSUMES # [BootMode] diff --git a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c b/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c index a52e6f0201..e3a301dfe0 100644 --- a/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c +++ b/MdeModulePkg/Core/Pei/PeiMain/PeiMain.c @@ -1,7 +1,7 @@ /** @file Pei Core Main Entry Point - -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+ +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -46,7 +46,7 @@ EFI_PEI_SERVICES gPs = { PeiFfsFindNextFile, PeiFfsFindSectionData, - PeiInstallPeiMemory, + PeiInstallPeiMemory, PeiAllocatePages, PeiAllocatePool, (EFI_PEI_COPY_MEM)CopyMem, @@ -70,7 +70,7 @@ EFI_PEI_SERVICES gPs = { /** Shadow PeiCore module from flash to installed memory. - + @param PrivateData PeiCore's private data structure @return PeiCore function address after shadowing. @@ -155,7 +155,7 @@ PeiCore ( EFI_HOB_HANDOFF_INFO_TABLE *HandoffInformationTable; EFI_PEI_TEMPORARY_RAM_DONE_PPI *TemporaryRamDonePpi; UINTN Index; - + // // Retrieve context passed into PEI Core // @@ -252,7 +252,7 @@ PeiCore ( // Indicate that PeiCore reenter // OldCoreData->PeimDispatcherReenter = TRUE; - + if (PcdGet64(PcdLoadModuleAtFixAddressEnable) != 0 && (OldCoreData->HobList.HandoffInformationTable->BootMode != BOOT_ON_S3_RESUME)) { // // if Loading Module at Fixed Address is enabled, allocate the PEI code memory range usage bit map array. @@ -270,12 +270,12 @@ PeiCore ( || (HandoffInformationTable->BootMode != BOOT_ON_S3_RESUME && PcdGetBool (PcdShadowPeimOnBoot))) { OldCoreData->ShadowedPeiCore = ShadowPeiCore (OldCoreData); } - + // // PEI Core has now been shadowed to memory. Restart PEI Core in memory. // OldCoreData->ShadowedPeiCore (SecCoreData, PpiList, OldCoreData); - + // // Should never reach here. // @@ -295,13 +295,13 @@ PeiCore ( CpuIo = (VOID*)PrivateData.ServiceTableShadow.CpuIo; PciCfg = (VOID*)PrivateData.ServiceTableShadow.PciCfg; - + CopyMem (&PrivateData.ServiceTableShadow, &gPs, sizeof (gPs)); - + PrivateData.ServiceTableShadow.CpuIo = CpuIo; PrivateData.ServiceTableShadow.PciCfg = PciCfg; } - + // // Cache a pointer to the PEI Services Table that is either in temporary memory or permanent memory // @@ -347,9 +347,9 @@ PeiCore ( ASSERT (PrivateData.FileHandles != NULL); } InitializePpiServices (&PrivateData, OldCoreData); - + // - // Update performance measurements + // Update performance measurements // if (OldCoreData == NULL) { PERF_EVENT ("SEC"); // Means the end of SEC phase. @@ -367,14 +367,14 @@ PeiCore ( // // Complete PEI Core Service initialization - // + // InitializeSecurityServices (&PrivateData.Ps, OldCoreData); InitializeDispatcherData (&PrivateData, OldCoreData, SecCoreData); InitializeImageServices (&PrivateData, OldCoreData); // // Perform PEI Core Phase specific actions - // + // if (OldCoreData == NULL) { // // Report Status Code EFI_SW_PC_INIT @@ -383,7 +383,7 @@ PeiCore ( EFI_PROGRESS_CODE, (EFI_SOFTWARE_PEI_CORE | EFI_SW_PC_INIT) ); - + // // If SEC provided the PpiList, process it. // diff --git a/MdeModulePkg/Core/Pei/Ppi/Ppi.c b/MdeModulePkg/Core/Pei/Ppi/Ppi.c index 082c379458..139cfeda05 100644 --- a/MdeModulePkg/Core/Pei/Ppi/Ppi.c +++ b/MdeModulePkg/Core/Pei/Ppi/Ppi.c @@ -1,7 +1,7 @@ /** @file EFI PEI Core PPI services - -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+ +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -19,7 +19,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. Initialize PPI services. @param PrivateData Pointer to the PEI Core data. - @param OldCoreData Pointer to old PEI Core data. + @param OldCoreData Pointer to old PEI Core data. NULL if being run in non-permament memory mode. **/ @@ -44,7 +44,7 @@ InitializePpiServices ( @param TempBottom Base of old temporary memory @param TempTop Top of old temporary memory @param Offset Offset of new memory to old temporary memory. - @param OffsetPositive Positive flag of Offset value. + @param OffsetPositive Positive flag of Offset value. **/ VOID @@ -105,7 +105,7 @@ ConvertSinglePpiPointer ( Migrate PPI Pointers from the temporary memory to PEI installed memory. - @param SecCoreData Points to a data structure containing SEC to PEI handoff data, such as the size + @param SecCoreData Points to a data structure containing SEC to PEI handoff data, such as the size and location of temporary RAM, the stack location and the BFV location. @param PrivateData Pointer to PeiCore's private data structure. @@ -145,7 +145,7 @@ ConvertPpiPointers ( PrivateData->HeapOffset, PrivateData->HeapOffsetPositive ); - + // // Convert PPI pointer in old Stack // @@ -156,7 +156,7 @@ ConvertPpiPointers ( PrivateData->StackOffset, PrivateData->StackOffsetPositive ); - + // // Convert PPI pointer in old TempRam Hole // @@ -164,7 +164,7 @@ ConvertPpiPointers ( if (PrivateData->HoleData[IndexHole].Size == 0) { continue; } - + ConvertSinglePpiPointer ( &PrivateData->PpiData.PpiListPtrs[Index], (UINTN)PrivateData->HoleData[IndexHole].Base, @@ -179,7 +179,7 @@ ConvertPpiPointers ( /** - This function installs an interface in the PEI PPI database by GUID. + This function installs an interface in the PEI PPI database by GUID. The purpose of the service is to publish an interface that other parties can use to call additional PEIMs. @@ -280,7 +280,7 @@ InternalPeiInstallPpi ( /** - This function installs an interface in the PEI PPI database by GUID. + This function installs an interface in the PEI PPI database by GUID. The purpose of the service is to publish an interface that other parties can use to call additional PEIMs. @@ -305,9 +305,9 @@ PeiInstallPpi ( /** - This function reinstalls an interface in the PEI PPI database by GUID. - The purpose of the service is to publish an interface that other parties can - use to replace an interface of the same name in the protocol database with a + This function reinstalls an interface in the PEI PPI database by GUID. + The purpose of the service is to publish an interface that other parties can + use to replace an interface of the same name in the protocol database with a different interface. @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation. @@ -450,8 +450,8 @@ PeiLocatePpi ( /** - This function installs a notification service to be called back when a given - interface is installed or reinstalled. The purpose of the service is to publish + This function installs a notification service to be called back when a given + interface is installed or reinstalled. The purpose of the service is to publish an interface that other parties can use to call additional PPIs that may materialize later. @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation. @@ -579,8 +579,8 @@ InternalPeiNotifyPpi ( /** - This function installs a notification service to be called back when a given - interface is installed or reinstalled. The purpose of the service is to publish + This function installs a notification service to be called back when a given + interface is installed or reinstalled. The purpose of the service is to publish an interface that other parties can use to call additional PPIs that may materialize later. @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation. diff --git a/MdeModulePkg/Core/Pei/Security/Security.c b/MdeModulePkg/Core/Pei/Security/Security.c index 763126057d..13c6368ffe 100644 --- a/MdeModulePkg/Core/Pei/Security/Security.c +++ b/MdeModulePkg/Core/Pei/Security/Security.c @@ -1,14 +1,14 @@ /** @file EFI PEI Core Security services - -Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -45,7 +45,7 @@ InitializeSecurityServices ( Provide a callback for when the security PPI is installed. This routine will cache installed security PPI into PeiCore's private data. - + @param PeiServices An indirect pointer to the EFI_PEI_SERVICES table published by the PEI Foundation. @param NotifyDescriptor The descriptor for the notification event. @param Ppi Pointer to the PPI in question. @@ -67,7 +67,7 @@ SecurityPpiNotifyCallback ( // Get PEI Core private data // PrivateData = PEI_CORE_INSTANCE_FROM_PS_THIS (PeiServices); - + // // If there isn't a security PPI installed, use the one from notification // diff --git a/MdeModulePkg/Core/Pei/StatusCode/StatusCode.c b/MdeModulePkg/Core/Pei/StatusCode/StatusCode.c index a7fb524ff4..5877b75055 100644 --- a/MdeModulePkg/Core/Pei/StatusCode/StatusCode.c +++ b/MdeModulePkg/Core/Pei/StatusCode/StatusCode.c @@ -1,14 +1,14 @@ /** @file Pei Core Status Code Support - -Copyright (c) 2006, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -35,7 +35,7 @@ EFIAPI PeiReportStatusCode ( IN CONST EFI_PEI_SERVICES **PeiServices, IN EFI_STATUS_CODE_TYPE CodeType, - IN EFI_STATUS_CODE_VALUE Value, + IN EFI_STATUS_CODE_VALUE Value, IN UINT32 Instance, IN CONST EFI_GUID *CallerId, IN CONST EFI_STATUS_CODE_DATA *Data OPTIONAL @@ -48,10 +48,10 @@ PeiReportStatusCode ( // Locate StatusCode Ppi. // Status = PeiServicesLocatePpi ( - &gEfiPeiStatusCodePpiGuid, - 0, - NULL, - (VOID **)&StatusCodePpi + &gEfiPeiStatusCodePpiGuid, + 0, + NULL, + (VOID **)&StatusCodePpi ); if (!EFI_ERROR (Status)) { @@ -63,11 +63,11 @@ PeiReportStatusCode ( CallerId, Data ); - - return Status; - } - - return EFI_NOT_AVAILABLE_YET; + + return Status; + } + + return EFI_NOT_AVAILABLE_YET; } diff --git a/MdeModulePkg/Core/PiSmmCore/Dependency.c b/MdeModulePkg/Core/PiSmmCore/Dependency.c index deaf4b445e..9a1f783575 100644 --- a/MdeModulePkg/Core/PiSmmCore/Dependency.c +++ b/MdeModulePkg/Core/PiSmmCore/Dependency.c @@ -5,14 +5,14 @@ if a driver can be scheduled for execution. The criteria for schedulability is that the dependency expression is satisfied. - Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.
- This program and the accompanying materials are licensed and made available - under the terms and conditions of the BSD License which accompanies this - distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php + Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -194,10 +194,10 @@ SmmIsSchedulable ( } DEBUG ((DEBUG_DISPATCH, "Evaluate SMM DEPEX for FFS(%g)\n", &DriverEntry->FileName)); - + if (DriverEntry->Depex == NULL) { // - // A NULL Depex means that the SMM driver is not built correctly. + // A NULL Depex means that the SMM driver is not built correctly. // All SMM drivers must have a valid depex expressiion. // DEBUG ((DEBUG_DISPATCH, " RESULT = FALSE (Depex is empty)\n")); diff --git a/MdeModulePkg/Core/PiSmmCore/Dispatcher.c b/MdeModulePkg/Core/PiSmmCore/Dispatcher.c index 0b3b5924d3..7ad0d34178 100644 --- a/MdeModulePkg/Core/PiSmmCore/Dispatcher.c +++ b/MdeModulePkg/Core/PiSmmCore/Dispatcher.c @@ -28,14 +28,14 @@ Depex - Dependency Expresion. Copyright (c) 2014, Hewlett-Packard Development Company, L.P. - Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.
- This program and the accompanying materials are licensed and made available - under the terms and conditions of the BSD License which accompanies this - distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php + Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -127,18 +127,18 @@ EFI_SECURITY2_ARCH_PROTOCOL *mSecurity2 = NULL; // // The global variable is defined for Loading modules at fixed address feature to track the SMM code // memory range usage. It is a bit mapped array in which every bit indicates the corresponding -// memory page available or not. +// memory page available or not. // GLOBAL_REMOVE_IF_UNREFERENCED UINT64 *mSmmCodeMemoryRangeUsageBitMap=NULL; /** To check memory usage bit map array to figure out if the memory range in which the image will be loaded is available or not. If memory range is available, the function will mark the corresponding bits to 1 which indicates the memory range is used. - The function is only invoked when load modules at fixed address feature is enabled. - + The function is only invoked when load modules at fixed address feature is enabled. + @param ImageBase The base address the image will be loaded at. @param ImageSize The size of the image - + @retval EFI_SUCCESS The memory range the image will be loaded in is available @retval EFI_NOT_FOUND The memory range the image will be loaded in is not available **/ @@ -149,7 +149,7 @@ CheckAndMarkFixLoadingMemoryUsageBitMap ( ) { UINT32 SmmCodePageNumber; - UINT64 SmmCodeSize; + UINT64 SmmCodeSize; EFI_PHYSICAL_ADDRESS SmmCodeBase; UINTN BaseOffsetPageNumber; UINTN TopOffsetPageNumber; @@ -160,11 +160,11 @@ CheckAndMarkFixLoadingMemoryUsageBitMap ( SmmCodePageNumber = PcdGet32(PcdLoadFixAddressSmmCodePageNumber); SmmCodeSize = EFI_PAGES_TO_SIZE (SmmCodePageNumber); SmmCodeBase = gLoadModuleAtFixAddressSmramBase; - + // - // If the memory usage bit map is not initialized, do it. Every bit in the array + // If the memory usage bit map is not initialized, do it. Every bit in the array // indicate the status of the corresponding memory page, available or not - // + // if (mSmmCodeMemoryRangeUsageBitMap == NULL) { mSmmCodeMemoryRangeUsageBitMap = AllocateZeroPool(((SmmCodePageNumber / 64) + 1)*sizeof(UINT64)); } @@ -178,11 +178,11 @@ CheckAndMarkFixLoadingMemoryUsageBitMap ( // see if the memory range for loading the image is in the SMM code range. // if (SmmCodeBase + SmmCodeSize < ImageBase + ImageSize || SmmCodeBase > ImageBase) { - return EFI_NOT_FOUND; - } + return EFI_NOT_FOUND; + } // // Test if the memory is avalaible or not. - // + // BaseOffsetPageNumber = EFI_SIZE_TO_PAGES((UINT32)(ImageBase - SmmCodeBase)); TopOffsetPageNumber = EFI_SIZE_TO_PAGES((UINT32)(ImageBase + ImageSize - SmmCodeBase)); for (Index = BaseOffsetPageNumber; Index < TopOffsetPageNumber; Index ++) { @@ -190,22 +190,22 @@ CheckAndMarkFixLoadingMemoryUsageBitMap ( // // This page is already used. // - return EFI_NOT_FOUND; + return EFI_NOT_FOUND; } } - + // // Being here means the memory range is available. So mark the bits for the memory range - // + // for (Index = BaseOffsetPageNumber; Index < TopOffsetPageNumber; Index ++) { mSmmCodeMemoryRangeUsageBitMap[Index / 64] |= LShiftU64(1, (Index % 64)); } - return EFI_SUCCESS; + return EFI_SUCCESS; } /** Get the fixed loading address from image header assigned by build tool. This function only be called when Loading module at Fixed address feature enabled. - + @param ImageContext Pointer to the image context structure that describes the PE/COFF image that needs to be examined by this function. @retval EFI_SUCCESS An fixed loading address is assigned to this image by build tools . @@ -398,7 +398,7 @@ SmmLoadImage ( &AuthenticationStatus ); } - + if (EFI_ERROR (Status)) { if (Buffer != NULL) { gBS->FreePool (Buffer); @@ -422,7 +422,7 @@ SmmLoadImage ( // // Verify the Authentication Status through the Security Architectural Protocol // Only on images that have been read using Firmware Volume protocol. - // All SMM images are from FV protocol. + // All SMM images are from FV protocol. // if (!EFI_ERROR (SecurityStatus) && (mSecurity != NULL)) { SecurityStatus = mSecurity->FileAuthenticationState ( @@ -436,7 +436,7 @@ SmmLoadImage ( Status = SecurityStatus; return Status; } - + // // Initialize ImageContext // @@ -468,7 +468,7 @@ SmmLoadImage ( // following statements is to bypass SmmFreePages // PageCount = 0; - DstBuffer = (UINTN)gLoadModuleAtFixAddressSmramBase; + DstBuffer = (UINTN)gLoadModuleAtFixAddressSmramBase; } else { DEBUG ((EFI_D_INFO|EFI_D_LOAD, "LOADING MODULE FIXED ERROR: Failed to load module at fixed address. \n")); // @@ -476,7 +476,7 @@ SmmLoadImage ( // PageCount = (UINTN)EFI_SIZE_TO_PAGES((UINTN)ImageContext.ImageSize + ImageContext.SectionAlignment); DstBuffer = (UINTN)(-1); - + Status = SmmAllocatePages ( AllocateMaxAddress, EfiRuntimeServicesCode, @@ -486,15 +486,15 @@ SmmLoadImage ( if (EFI_ERROR (Status)) { if (Buffer != NULL) { gBS->FreePool (Buffer); - } + } return Status; - } + } ImageContext.ImageAddress = (EFI_PHYSICAL_ADDRESS)DstBuffer; } } else { PageCount = (UINTN)EFI_SIZE_TO_PAGES((UINTN)ImageContext.ImageSize + ImageContext.SectionAlignment); DstBuffer = (UINTN)(-1); - + Status = SmmAllocatePages ( AllocateMaxAddress, EfiRuntimeServicesCode, @@ -507,7 +507,7 @@ SmmLoadImage ( } return Status; } - + ImageContext.ImageAddress = (EFI_PHYSICAL_ADDRESS)DstBuffer; } // @@ -549,7 +549,7 @@ SmmLoadImage ( // Save Image EntryPoint in DriverEntry // DriverEntry->ImageEntryPoint = ImageContext.EntryPoint; - DriverEntry->ImageBuffer = DstBuffer; + DriverEntry->ImageBuffer = DstBuffer; DriverEntry->NumberOfPage = PageCount; // @@ -698,20 +698,20 @@ SmmLoadImage ( // // Free buffer allocated by Fv->ReadSection. // - // The UEFI Boot Services FreePool() function must be used because Fv->ReadSection + // The UEFI Boot Services FreePool() function must be used because Fv->ReadSection // used the UEFI Boot Services AllocatePool() function // Status = gBS->FreePool(Buffer); if (!EFI_ERROR (Status) && EFI_ERROR (SecurityStatus)) { Status = SecurityStatus; } - return Status; + return Status; } /** Preprocess dependency expression and update DriverEntry to reflect the state of Before and After dependencies. If DriverEntry->Before - or DriverEntry->After is set it will never be cleared. + or DriverEntry->After is set it will never be cleared. @param DriverEntry DriverEntry element to update . @@ -810,7 +810,7 @@ SmmGetDepexSectionAndPreProccess ( drivers to run. Drain the mScheduledQueue and load and start a PE image for each driver. Search the mDiscoveredList to see if any driver can be placed on the mScheduledQueue. If no drivers are placed on the - mScheduledQueue exit the function. + mScheduledQueue exit the function. @retval EFI_SUCCESS All of the SMM Drivers that could be dispatched have been run and the SMM Entry Point has been @@ -945,11 +945,11 @@ SmmDispatcher ( if (!PreviousSmmEntryPointRegistered && gSmmCorePrivate->SmmEntryPointRegistered) { // - // Return immediately if the SMM Entry Point was registered by the SMM + // Return immediately if the SMM Entry Point was registered by the SMM // Driver that was just dispatched. The SMM IPL will reinvoke the SMM - // Core Dispatcher. This is required so SMM Mode may be enabled as soon - // as all the dependent SMM Drivers for SMM Mode have been dispatched. - // Once the SMM Entry Point has been registered, then SMM Mode will be + // Core Dispatcher. This is required so SMM Mode may be enabled as soon + // as all the dependent SMM Drivers for SMM Mode have been dispatched. + // Once the SMM Entry Point has been registered, then SMM Mode will be // used. // gRequestDispatch = TRUE; @@ -1437,14 +1437,14 @@ SmmDriverDispatchHandler ( // // Free data allocated by Fv->ReadSection () // - // The UEFI Boot Services FreePool() function must be used because Fv->ReadSection + // The UEFI Boot Services FreePool() function must be used because Fv->ReadSection // used the UEFI Boot Services AllocatePool() function // gBS->FreePool (AprioriFile); } // - // Execute the SMM Dispatcher on any newly discovered FVs and previously + // Execute the SMM Dispatcher on any newly discovered FVs and previously // discovered SMM drivers that have been discovered but not dispatched. // Status = SmmDispatcher (); @@ -1456,7 +1456,7 @@ SmmDriverDispatchHandler ( if (*CommBufferSize > 0) { if (Status == EFI_NOT_READY) { // - // If a the SMM Core Entry Point was just registered, then set flag to + // If a the SMM Core Entry Point was just registered, then set flag to // request the SMM Dispatcher to be restarted. // *(UINT8 *)CommBuffer = COMM_BUFFER_SMM_DISPATCH_RESTART; diff --git a/MdeModulePkg/Core/PiSmmCore/Handle.c b/MdeModulePkg/Core/PiSmmCore/Handle.c index 19faac8444..b6ce351ec0 100644 --- a/MdeModulePkg/Core/PiSmmCore/Handle.c +++ b/MdeModulePkg/Core/PiSmmCore/Handle.c @@ -1,14 +1,14 @@ /** @file SMM handle & protocol handling. - Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.
- This program and the accompanying materials are licensed and made available - under the terms and conditions of the BSD License which accompanies this - distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Core/PiSmmCore/InstallConfigurationTable.c b/MdeModulePkg/Core/PiSmmCore/InstallConfigurationTable.c index 867d1ac4b1..b25f5722e2 100644 --- a/MdeModulePkg/Core/PiSmmCore/InstallConfigurationTable.c +++ b/MdeModulePkg/Core/PiSmmCore/InstallConfigurationTable.c @@ -1,14 +1,14 @@ /** @file System Management System Table Services SmmInstallConfigurationTable service - Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.
- This program and the accompanying materials are licensed and made available - under the terms and conditions of the BSD License which accompanies this - distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Core/PiSmmCore/Locate.c b/MdeModulePkg/Core/PiSmmCore/Locate.c index c174a4dd03..3420170b0d 100644 --- a/MdeModulePkg/Core/PiSmmCore/Locate.c +++ b/MdeModulePkg/Core/PiSmmCore/Locate.c @@ -1,14 +1,14 @@ /** @file Locate handle functions - Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.
- This program and the accompanying materials are licensed and made available - under the terms and conditions of the BSD License which accompanies this - distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Core/PiSmmCore/Notify.c b/MdeModulePkg/Core/PiSmmCore/Notify.c index 0054fe66aa..6ff011e874 100644 --- a/MdeModulePkg/Core/PiSmmCore/Notify.c +++ b/MdeModulePkg/Core/PiSmmCore/Notify.c @@ -1,14 +1,14 @@ /** @file Support functions for UEFI protocol notification infrastructure. - Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.
- This program and the accompanying materials are licensed and made available - under the terms and conditions of the BSD License which accompanies this - distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php + Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -116,7 +116,7 @@ SmmRegisterProtocolNotify ( } if (Function == NULL) { - // + // // Get the protocol entry per Protocol // ProtEntry = SmmFindProtocolEntry ((EFI_GUID *) Protocol, FALSE); @@ -126,7 +126,7 @@ SmmRegisterProtocolNotify ( Link != &ProtEntry->Notify; Link = Link->ForwardLink) { // - // Compare the notification record + // Compare the notification record // if (ProtNotify == (CR(Link, PROTOCOL_NOTIFY, Link, PROTOCOL_NOTIFY_SIGNATURE))){ // @@ -143,7 +143,7 @@ SmmRegisterProtocolNotify ( // If the registration is not found // return EFI_NOT_FOUND; - } + } ProtNotify = NULL; diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c index 45f40e0e60..32c450d8a2 100644 --- a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c +++ b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.c @@ -2,13 +2,13 @@ SMM Core Main Entry Point Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
- This program and the accompanying materials are licensed and made available - under the terms and conditions of the BSD License which accompanies this - distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php + This program and the accompanying materials are licensed and made available + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -65,7 +65,7 @@ EFI_SMM_SYSTEM_TABLE2 gSmmCoreSmst = { // // Flag to determine if the platform has performed a legacy boot. -// If this flag is TRUE, then the runtime code and runtime data associated with the +// If this flag is TRUE, then the runtime code and runtime data associated with the // SMM IPL are converted to free memory, so the SMM Core must guarantee that is // does not touch of the code/data associated with the SMM IPL if this flag is TRUE. // @@ -82,7 +82,7 @@ BOOLEAN mDuringS3Resume = FALSE; // SMM_CORE_SMI_HANDLERS mSmmCoreSmiHandlers[] = { { SmmDriverDispatchHandler, &gEfiEventDxeDispatchGuid, NULL, TRUE }, - { SmmReadyToLockHandler, &gEfiDxeSmmReadyToLockProtocolGuid, NULL, TRUE }, + { SmmReadyToLockHandler, &gEfiDxeSmmReadyToLockProtocolGuid, NULL, TRUE }, { SmmLegacyBootHandler, &gEfiEventLegacyBootGuid, NULL, FALSE }, { SmmExitBootServicesHandler, &gEfiEventExitBootServicesGuid, NULL, FALSE }, { SmmReadyToBootHandler, &gEfiEventReadyToBootGuid, NULL, FALSE }, @@ -132,7 +132,7 @@ SmmEfiNotAvailableYetArg5 ( /** Software SMI handler that is called when a Legacy Boot event is signalled. The SMM - Core uses this signal to know that a Legacy Boot has been performed and that + Core uses this signal to know that a Legacy Boot has been performed and that gSmmCorePrivate that is shared between the UEFI and SMM execution environments can not be accessed from SMM anymore since that structure is considered free memory by a legacy OS. Then the SMM Core also install SMM Legacy Boot protocol to notify SMM @@ -316,9 +316,9 @@ SmmReadyToBootHandler ( /** Software SMI handler that is called when the DxeSmmReadyToLock protocol is added - or if gEfiEventReadyToBootGuid is signalled. This function unregisters the - Software SMIs that are nor required after SMRAM is locked and installs the - SMM Ready To Lock Protocol so SMM Drivers are informed that SMRAM is about + or if gEfiEventReadyToBootGuid is signalled. This function unregisters the + Software SMIs that are nor required after SMRAM is locked and installs the + SMM Ready To Lock Protocol so SMM Drivers are informed that SMRAM is about to be locked. It also verifies the SMM CPU I/O 2 Protocol has been installed and NULLs gBS and gST because they can not longer be used after SMRAM is locked. @@ -676,7 +676,7 @@ SmmEntryPoint ( gSmmCorePrivate->InSmm = TRUE; // - // Check to see if this is a Synchronous SMI sent through the SMM Communication + // Check to see if this is a Synchronous SMI sent through the SMM Communication // Protocol or an Asynchronous SMI // CommunicationBuffer = gSmmCorePrivate->CommunicationBuffer; @@ -703,9 +703,9 @@ SmmEntryPoint ( CommunicateHeader = (EFI_SMM_COMMUNICATE_HEADER *)CommunicationBuffer; BufferSize -= OFFSET_OF (EFI_SMM_COMMUNICATE_HEADER, Data); Status = SmiManage ( - &CommunicateHeader->HeaderGuid, - NULL, - CommunicateHeader->Data, + &CommunicateHeader->HeaderGuid, + NULL, + CommunicateHeader->Data, &BufferSize ); // @@ -723,7 +723,7 @@ SmmEntryPoint ( // Process Asynchronous SMI sources // SmiManage (NULL, NULL, NULL, NULL); - + // // Call platform hook after Smm Dispatch // @@ -826,7 +826,7 @@ SmmCoreInstallLoadedImage ( /** The Entry Point for SMM Core - Install DXE Protocols and reload SMM Core into SMRAM and register SMM Core + Install DXE Protocols and reload SMM Core into SMRAM and register SMM Core EntryPoint on the SMI vector. Note: This function is called for both DXE invocation and SMRAM invocation. diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.h b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.h index 2f6032646f..2d3447e338 100644 --- a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.h +++ b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.h @@ -3,13 +3,13 @@ internal structure and functions used by SmmCore module. Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
- This program and the accompanying materials are licensed and made available - under the terms and conditions of the BSD License which accompanies this - distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php + This program and the accompanying materials are licensed and made available + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -24,10 +24,10 @@ #include #include #include -#include -#include -#include -#include +#include +#include +#include +#include #include #include #include @@ -52,8 +52,8 @@ #include #include #include -#include -#include +#include +#include #include #include #include @@ -136,7 +136,7 @@ typedef struct { // PHYSICAL_ADDRESS ImageEntryPoint; // - // Image Buffer in SMRAM + // Image Buffer in SMRAM // PHYSICAL_ADDRESS ImageBuffer; // diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf index 09cffb879e..a2ff773a74 100644 --- a/MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf +++ b/MdeModulePkg/Core/PiSmmCore/PiSmmCore.inf @@ -46,19 +46,19 @@ [Packages] MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec - + [LibraryClasses] UefiDriverEntryPoint BaseLib BaseMemoryLib PeCoffLib PeCoffGetEntryPointLib - CacheMaintenanceLib + CacheMaintenanceLib DebugLib ReportStatusCodeLib - DevicePathLib - UefiLib - UefiBootServicesTableLib + DevicePathLib + UefiLib + UefiBootServicesTableLib MemoryAllocationLib PcdLib SmmCorePlatformHookLib diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmCoreExtra.uni b/MdeModulePkg/Core/PiSmmCore/PiSmmCoreExtra.uni index c1ed17534c..20c329575c 100644 --- a/MdeModulePkg/Core/PiSmmCore/PiSmmCoreExtra.uni +++ b/MdeModulePkg/Core/PiSmmCore/PiSmmCoreExtra.uni @@ -1,7 +1,7 @@ // /** @file // PiSmmCore Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Core SMM Services Driver" diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmCorePrivateData.h b/MdeModulePkg/Core/PiSmmCore/PiSmmCorePrivateData.h index 8aec7a6568..2bf9abe4cc 100644 --- a/MdeModulePkg/Core/PiSmmCore/PiSmmCorePrivateData.h +++ b/MdeModulePkg/Core/PiSmmCore/PiSmmCorePrivateData.h @@ -2,14 +2,14 @@ The internal header file that declared a data structure that is shared between the SMM IPL and the SMM Core. - Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.
- This program and the accompanying materials are licensed and made available - under the terms and conditions of the BSD License which accompanies this - distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php + Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -18,12 +18,12 @@ /// /// Define values for the communications buffer used when gEfiEventDxeDispatchGuid is -/// event signaled. This event is signaled by the DXE Core each time the DXE Core +/// event signaled. This event is signaled by the DXE Core each time the DXE Core /// dispatcher has completed its work. When this event is signaled, the SMM Core /// if notified, so the SMM Core can dispatch SMM drivers. If COMM_BUFFER_SMM_DISPATCH_ERROR /// is returned in the communication buffer, then an error occurred dispatching SMM -/// Drivers. If COMM_BUFFER_SMM_DISPATCH_SUCCESS is returned, then the SMM Core -/// dispatched all the drivers it could. If COMM_BUFFER_SMM_DISPATCH_RESTART is +/// Drivers. If COMM_BUFFER_SMM_DISPATCH_SUCCESS is returned, then the SMM Core +/// dispatched all the drivers it could. If COMM_BUFFER_SMM_DISPATCH_RESTART is /// returned, then the SMM Core just dispatched the SMM Driver that registered /// the SMM Entry Point enabling the use of SMM Mode. In this case, the SMM Core /// should be notified again to dispatch more SMM Drivers using SMM Mode. @@ -38,13 +38,13 @@ #define SMM_CORE_PRIVATE_DATA_SIGNATURE SIGNATURE_32 ('s', 'm', 'm', 'c') /// -/// Private structure that is used to share information between the SMM IPL and +/// Private structure that is used to share information between the SMM IPL and /// the SMM Core. This structure is allocated from memory of type EfiRuntimeServicesData. -/// Since runtime memory types are converted to available memory when a legacy boot -/// is performed, the SMM Core must not access any fields of this structure if a legacy -/// boot is performed. As a result, the SMM IPL must create an event notification -/// for the Legacy Boot event and notify the SMM Core that a legacy boot is being -/// performed. The SMM Core can then use this information to filter accesses to +/// Since runtime memory types are converted to available memory when a legacy boot +/// is performed, the SMM Core must not access any fields of this structure if a legacy +/// boot is performed. As a result, the SMM IPL must create an event notification +/// for the Legacy Boot event and notify the SMM Core that a legacy boot is being +/// performed. The SMM Core can then use this information to filter accesses to /// thos structure. /// typedef struct { @@ -70,43 +70,43 @@ typedef struct { EFI_SMRAM_DESCRIPTOR *SmramRanges; /// - /// The SMM Foundation Entry Point. The SMM Core fills in this field when the - /// SMM Core is initialized. The SMM IPL is responsbile for registering this entry - /// point with the SMM Configuration Protocol. The SMM Configuration Protocol may + /// The SMM Foundation Entry Point. The SMM Core fills in this field when the + /// SMM Core is initialized. The SMM IPL is responsbile for registering this entry + /// point with the SMM Configuration Protocol. The SMM Configuration Protocol may /// not be available at the time the SMM IPL and SMM Core are started, so the SMM IPL - /// sets up a protocol notification on the SMM Configuration Protocol and registers - /// the SMM Foundation Entry Point as soon as the SMM Configuration Protocol is + /// sets up a protocol notification on the SMM Configuration Protocol and registers + /// the SMM Foundation Entry Point as soon as the SMM Configuration Protocol is /// available. /// EFI_SMM_ENTRY_POINT SmmEntryPoint; - + /// /// Boolean flag set to TRUE while an SMI is being processed by the SMM Core. - /// + /// BOOLEAN SmmEntryPointRegistered; /// /// Boolean flag set to TRUE while an SMI is being processed by the SMM Core. - /// + /// BOOLEAN InSmm; /// /// This field is set by the SMM Core then the SMM Core is initialized. This field is /// used by the SMM Base 2 Protocol and SMM Communication Protocol implementations in - /// the SMM IPL. + /// the SMM IPL. /// EFI_SMM_SYSTEM_TABLE2 *Smst; /// - /// This field is used by the SMM Communicatioon Protocol to pass a buffer into + /// This field is used by the SMM Communicatioon Protocol to pass a buffer into /// a software SMI handler and for the software SMI handler to pass a buffer back to - /// the caller of the SMM Communication Protocol. + /// the caller of the SMM Communication Protocol. /// VOID *CommunicationBuffer; /// /// This field is used by the SMM Communicatioon Protocol to pass the size of a buffer, - /// in bytes, into a software SMI handler and for the software SMI handler to pass the + /// in bytes, into a software SMI handler and for the software SMI handler to pass the /// size, in bytes, of a buffer back to the caller of the SMM Communication Protocol. /// UINTN BufferSize; diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c b/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c index 7732693198..f8cbe1704b 100644 --- a/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c +++ b/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.c @@ -1,14 +1,14 @@ /** @file SMM IPL that produces SMM related runtime protocols and load the SMM Core into SMRAM - Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.
- This program and the accompanying materials are licensed and made available - under the terms and conditions of the BSD License which accompanies this - distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php + Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -92,10 +92,10 @@ SmmBase2GetSmstLocation ( /** Communicates with a registered handler. - - This function provides a service to send and receive messages from a registered - UEFI service. This function is part of the SMM Communication Protocol that may - be called in physical mode prior to SetVirtualAddressMap() and in virtual mode + + This function provides a service to send and receive messages from a registered + UEFI service. This function is part of the SMM Communication Protocol that may + be called in physical mode prior to SetVirtualAddressMap() and in virtual mode after SetVirtualAddressMap(). @param[in] This The EFI_SMM_COMMUNICATION_PROTOCOL instance. @@ -213,7 +213,7 @@ SmmIplSetVirtualAddressNotify ( ); // -// Data structure used to declare a table of protocol notifications and event +// Data structure used to declare a table of protocol notifications and event // notifications required by the SMM IPL // typedef struct { @@ -289,19 +289,19 @@ EFI_LOAD_FIXED_ADDRESS_CONFIGURATION_TABLE *mLMFAConfigurationTable = NULL; SMM_IPL_EVENT_NOTIFICATION mSmmIplEvents[] = { // // Declare protocol notification on the SMM Configuration protocol. When this notification is established, - // the associated event is immediately signalled, so the notification function will be executed and the + // the associated event is immediately signalled, so the notification function will be executed and the // SMM Configuration Protocol will be found if it is already in the handle database. // { TRUE, FALSE, &gEfiSmmConfigurationProtocolGuid, SmmIplSmmConfigurationEventNotify, &gEfiSmmConfigurationProtocolGuid, TPL_NOTIFY, NULL }, // - // Declare protocol notification on DxeSmmReadyToLock protocols. When this notification is established, - // the associated event is immediately signalled, so the notification function will be executed and the + // Declare protocol notification on DxeSmmReadyToLock protocols. When this notification is established, + // the associated event is immediately signalled, so the notification function will be executed and the // DXE SMM Ready To Lock Protocol will be found if it is already in the handle database. // { TRUE, TRUE, &gEfiDxeSmmReadyToLockProtocolGuid, SmmIplReadyToLockEventNotify, &gEfiDxeSmmReadyToLockProtocolGuid, TPL_CALLBACK, NULL }, // // Declare event notification on EndOfDxe event. When this notification is established, - // the associated event is immediately signalled, so the notification function will be executed and the + // the associated event is immediately signalled, so the notification function will be executed and the // SMM End Of Dxe Protocol will be found if it is already in the handle database. // { FALSE, TRUE, &gEfiEndOfDxeEventGroupGuid, SmmIplGuidedEventNotify, &gEfiEndOfDxeEventGroupGuid, TPL_CALLBACK, NULL }, @@ -321,8 +321,8 @@ SMM_IPL_EVENT_NOTIFICATION mSmmIplEvents[] = { // { FALSE, TRUE, &gEfiEventReadyToBootGuid, SmmIplReadyToLockEventNotify, &gEfiEventReadyToBootGuid, TPL_CALLBACK, NULL }, // - // Declare event notification on Legacy Boot Event Group. This is used to inform the SMM Core that the platform - // is performing a legacy boot operation, and that the UEFI environment is no longer available and the SMM Core + // Declare event notification on Legacy Boot Event Group. This is used to inform the SMM Core that the platform + // is performing a legacy boot operation, and that the UEFI environment is no longer available and the SMM Core // must guarantee that it does not access any UEFI related structures outside of SMRAM. // It is also to inform the SMM Core to notify SMM driver that system enter legacy boot. // @@ -338,7 +338,7 @@ SMM_IPL_EVENT_NOTIFICATION mSmmIplEvents[] = { // { FALSE, FALSE, &gEfiEventReadyToBootGuid, SmmIplGuidedEventNotify, &gEfiEventReadyToBootGuid, TPL_CALLBACK, NULL }, // - // Declare event notification on SetVirtualAddressMap() Event Group. This is used to convert gSmmCorePrivate + // Declare event notification on SetVirtualAddressMap() Event Group. This is used to convert gSmmCorePrivate // and mSmmControl2 from physical addresses to virtual addresses. // { FALSE, FALSE, &gEfiEventVirtualAddressChangeGuid, SmmIplSetVirtualAddressNotify, NULL, TPL_CALLBACK, NULL }, @@ -350,7 +350,7 @@ SMM_IPL_EVENT_NOTIFICATION mSmmIplEvents[] = { /** Find the maximum SMRAM cache range that covers the range specified by SmramRange. - + This function searches and joins all adjacent ranges of SmramRange into a range to be cached. @param SmramRange The SMRAM range to search from. @@ -388,7 +388,7 @@ GetSmramCacheRange ( } } } while (FoundAjacentRange); - + } /** @@ -439,11 +439,11 @@ SmmBase2GetSmstLocation ( if ((This == NULL) ||(Smst == NULL)) { return EFI_INVALID_PARAMETER; } - + if (!gSmmCorePrivate->InSmm) { return EFI_UNSUPPORTED; } - + *Smst = gSmmCorePrivate->Smst; return EFI_SUCCESS; @@ -451,10 +451,10 @@ SmmBase2GetSmstLocation ( /** Communicates with a registered handler. - - This function provides a service to send and receive messages from a registered - UEFI service. This function is part of the SMM Communication Protocol that may - be called in physical mode prior to SetVirtualAddressMap() and in virtual mode + + This function provides a service to send and receive messages from a registered + UEFI service. This function is part of the SMM Communication Protocol that may + be called in physical mode prior to SetVirtualAddressMap() and in virtual mode after SetVirtualAddressMap(). @param[in] This The EFI_SMM_COMMUNICATION_PROTOCOL instance. @@ -528,7 +528,7 @@ SmmCommunicationCommunicate ( } // - // Return status from software SMI + // Return status from software SMI // if (CommSize != NULL) { *CommSize = gSmmCorePrivate->BufferSize; @@ -552,7 +552,7 @@ SmmCommunicationCommunicate ( if ((!gSmmCorePrivate->InSmm) && (!mSmmAccess->OpenState || mSmmAccess->LockState)) { return EFI_INVALID_PARAMETER; } - + // // Save current InSmm state and set InSmm state to TRUE // @@ -564,9 +564,9 @@ SmmCommunicationCommunicate ( // TempCommSize -= OFFSET_OF (EFI_SMM_COMMUNICATE_HEADER, Data); Status = gSmmCorePrivate->Smst->SmiManage ( - &CommunicateHeader->HeaderGuid, - NULL, - CommunicateHeader->Data, + &CommunicateHeader->HeaderGuid, + NULL, + CommunicateHeader->Data, &TempCommSize ); TempCommSize += OFFSET_OF (EFI_SMM_COMMUNICATE_HEADER, Data); @@ -599,7 +599,7 @@ SmmIplGuidedEventNotify ( UINTN Size; // - // Use Guid to initialize EFI_SMM_COMMUNICATE_HEADER structure + // Use Guid to initialize EFI_SMM_COMMUNICATE_HEADER structure // CopyGuid (&mCommunicateHeader.HeaderGuid, (EFI_GUID *)Context); mCommunicateHeader.MessageLength = 1; @@ -664,26 +664,26 @@ SmmIplDxeDispatchEventNotify ( // Size = sizeof (mCommunicateHeader); SmmCommunicationCommunicate (&mSmmCommunication, &mCommunicateHeader, &Size); - + // // Return if there is no request to restart the SMM Core Dispatcher // if (mCommunicateHeader.Data[0] != COMM_BUFFER_SMM_DISPATCH_RESTART) { return; } - + // // Attempt to reset SMRAM cacheability to UC // Assume CPU AP is available at this time // Status = gDS->SetMemorySpaceAttributes( - mSmramCacheBase, + mSmramCacheBase, mSmramCacheSize, EFI_MEMORY_UC ); if (EFI_ERROR (Status)) { DEBUG ((DEBUG_WARN, "SMM IPL failed to reset SMRAM window to EFI_MEMORY_UC\n")); - } + } // // Close all SMRAM ranges to protect SMRAM @@ -730,7 +730,7 @@ SmmIplSmmConfigurationEventNotify ( ASSERT_EFI_ERROR (Status); // - // Set flag to indicate that the SMM Entry Point has been registered which + // Set flag to indicate that the SMM Entry Point has been registered which // means that SMIs are now fully operational. // gSmmCorePrivate->SmmEntryPointRegistered = TRUE; @@ -766,7 +766,7 @@ SmmIplReadyToLockEventNotify ( if (mSmmLocked) { return; } - + // // Make sure this notification is for this handler // @@ -777,7 +777,7 @@ SmmIplReadyToLockEventNotify ( } } else { // - // If SMM is not locked yet and we got here from gEfiEventReadyToBootGuid being + // If SMM is not locked yet and we got here from gEfiEventReadyToBootGuid being // signaled, then gEfiDxeSmmReadyToLockProtocolGuid was not installed as expected. // Print a warning on debug builds. // @@ -797,10 +797,10 @@ SmmIplReadyToLockEventNotify ( // Lock the SMRAM (Note: Locking SMRAM may not be supported on all platforms) // mSmmAccess->Lock (mSmmAccess); - + // - // Close protocol and event notification events that do not apply after the - // DXE SMM Ready To Lock Protocol has been installed or the Ready To Boot + // Close protocol and event notification events that do not apply after the + // DXE SMM Ready To Lock Protocol has been installed or the Ready To Boot // event has been signalled. // for (Index = 0; mSmmIplEvents[Index].NotifyFunction != NULL; Index++) { @@ -818,7 +818,7 @@ SmmIplReadyToLockEventNotify ( // Print debug message that the SMRAM window is now locked. // DEBUG ((DEBUG_INFO, "SMM IPL locked SMRAM window\n")); - + // // Set flag so this operation will not be performed again // @@ -874,7 +874,7 @@ GetPeCoffImageFixLoadingAssignedAddress( // Build tool will calculate the smm code size and then patch the PcdLoadFixAddressSmmCodePageNumber // SmmCodeSize = EFI_PAGES_TO_SIZE (PcdGet32(PcdLoadFixAddressSmmCodePageNumber)); - + FixLoadingAddress = 0; Status = EFI_NOT_FOUND; SmramBase = mLMFAConfigurationTable->SmramBase; @@ -905,9 +905,9 @@ GetPeCoffImageFixLoadingAssignedAddress( if (EFI_ERROR (Status)) { return Status; } - + Status = EFI_NOT_FOUND; - + if ((SectionHeader.Characteristics & EFI_IMAGE_SCN_CNT_CODE) == 0) { // // Build tool saves the offset to SMRAM base as image base in PointerToRelocations & PointerToLineNumbers fields in the @@ -941,7 +941,7 @@ GetPeCoffImageFixLoadingAssignedAddress( /** Load the SMM Core image into SMRAM and executes the SMM Core from SMRAM. - @param[in, out] SmramRange Descriptor for the range of SMRAM to reload the + @param[in, out] SmramRange Descriptor for the range of SMRAM to reload the currently executing image, the rang of SMRAM to hold SMM Core will be excluded. @param[in, out] SmramRangeSmmCore Descriptor for the range of SMRAM to hold SMM Core. @@ -967,19 +967,19 @@ ExecuteSmmCoreFromSmram ( // // Search all Firmware Volumes for a PE/COFF image in a file of type SMM_CORE - // + // Status = GetSectionFromAnyFvByFileType ( - EFI_FV_FILETYPE_SMM_CORE, + EFI_FV_FILETYPE_SMM_CORE, 0, - EFI_SECTION_PE32, + EFI_SECTION_PE32, 0, - &SourceBuffer, + &SourceBuffer, &SourceSize ); if (EFI_ERROR (Status)) { return Status; } - + // // Initilize ImageContext // @@ -994,7 +994,7 @@ ExecuteSmmCoreFromSmram ( return Status; } // - // if Loading module at Fixed Address feature is enabled, the SMM core driver will be loaded to + // if Loading module at Fixed Address feature is enabled, the SMM core driver will be loaded to // the address assigned by build tool. // if (PcdGet64(PcdLoadModuleAtFixAddressEnable) != 0) { @@ -1014,7 +1014,7 @@ ExecuteSmmCoreFromSmram ( } else { DEBUG ((EFI_D_INFO, "LOADING MODULE FIXED ERROR: Loading module at fixed address at address failed\n")); // - // Allocate memory for the image being loaded from the EFI_SRAM_DESCRIPTOR + // Allocate memory for the image being loaded from the EFI_SRAM_DESCRIPTOR // specified by SmramRange // PageCount = (UINTN)EFI_SIZE_TO_PAGES((UINTN)ImageContext.ImageSize + ImageContext.SectionAlignment); @@ -1035,7 +1035,7 @@ ExecuteSmmCoreFromSmram ( } } else { // - // Allocate memory for the image being loaded from the EFI_SRAM_DESCRIPTOR + // Allocate memory for the image being loaded from the EFI_SRAM_DESCRIPTOR // specified by SmramRange // PageCount = (UINTN)EFI_SIZE_TO_PAGES((UINTN)ImageContext.ImageSize + ImageContext.SectionAlignment); @@ -1054,7 +1054,7 @@ ExecuteSmmCoreFromSmram ( // ImageContext.ImageAddress = SmramRangeSmmCore->CpuStart; } - + ImageContext.ImageAddress += ImageContext.SectionAlignment - 1; ImageContext.ImageAddress &= ~((EFI_PHYSICAL_ADDRESS)ImageContext.SectionAlignment - 1); @@ -1532,10 +1532,10 @@ GetFullSmramRanges ( /** The Entry Point for SMM IPL - Load SMM Core into SMRAM, register SMM Core entry point for SMIs, install - SMM Base 2 Protocol and SMM Communication Protocol, and register for the + Load SMM Core into SMRAM, register SMM Core entry point for SMIs, install + SMM Base 2 Protocol and SMM Communication Protocol, and register for the critical events required to coordinate between DXE and SMM environments. - + @param ImageHandle The firmware allocated handle for the EFI image. @param SystemTable A pointer to the EFI System Table. @@ -1561,8 +1561,8 @@ SmmIplEntry ( EFI_GCD_MEMORY_SPACE_DESCRIPTOR MemDesc; // - // Fill in the image handle of the SMM IPL so the SMM Core can use this as the - // ParentImageHandle field of the Load Image Protocol for all SMM Drivers loaded + // Fill in the image handle of the SMM IPL so the SMM Core can use this as the + // ParentImageHandle field of the Load Image Protocol for all SMM Drivers loaded // by the SMM Core // mSmmCorePrivateData.SmmIplImageHandle = ImageHandle; @@ -1591,7 +1591,7 @@ SmmIplEntry ( // Print debug message that the SMRAM window is now open. // DEBUG ((DEBUG_INFO, "SMM IPL opened SMRAM window\n")); - + // // Find the largest SMRAM range between 1MB and 4GB that is at least 256KB - 4K in size // @@ -1618,8 +1618,8 @@ SmmIplEntry ( // // Print debug message showing SMRAM window that will be used by SMM IPL and SMM Core // - DEBUG ((DEBUG_INFO, "SMM IPL found SMRAM window %p - %p\n", - (VOID *)(UINTN)mCurrentSmramRange->CpuStart, + DEBUG ((DEBUG_INFO, "SMM IPL found SMRAM window %p - %p\n", + (VOID *)(UINTN)mCurrentSmramRange->CpuStart, (VOID *)(UINTN)(mCurrentSmramRange->CpuStart + mCurrentSmramRange->PhysicalSize - 1) )); @@ -1728,13 +1728,13 @@ SmmIplEntry ( // if (CpuArch != NULL) { SetAttrStatus = gDS->SetMemorySpaceAttributes( - mSmramCacheBase, + mSmramCacheBase, mSmramCacheSize, EFI_MEMORY_UC ); if (EFI_ERROR (SetAttrStatus)) { DEBUG ((DEBUG_WARN, "SMM IPL failed to reset SMRAM window to EFI_MEMORY_UC\n")); - } + } } } } else { @@ -1745,7 +1745,7 @@ SmmIplEntry ( } // - // If the SMM Core could not be loaded then close SMRAM window, free allocated + // If the SMM Core could not be loaded then close SMRAM window, free allocated // resources, and return an error so SMM IPL will be unloaded. // if (mCurrentSmramRange == NULL || EFI_ERROR (Status)) { @@ -1767,7 +1767,7 @@ SmmIplEntry ( return EFI_UNSUPPORTED; } - + // // Install SMM Base2 Protocol and SMM Communication Protocol // diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf b/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf index 07a765b5d2..445d2f5ced 100644 --- a/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf +++ b/MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf @@ -1,7 +1,7 @@ ## @file # This module provide an SMM CIS compliant implementation of SMM IPL. # -# Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -35,13 +35,13 @@ [Packages] MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec - + [LibraryClasses] UefiDriverEntryPoint BaseLib BaseMemoryLib PeCoffLib - CacheMaintenanceLib + CacheMaintenanceLib MemoryAllocationLib DebugLib UefiBootServicesTableLib @@ -51,7 +51,7 @@ DxeServicesLib PcdLib ReportStatusCodeLib - + [Protocols] gEfiSmmBase2ProtocolGuid ## PRODUCES gEfiSmmCommunicationProtocolGuid ## PRODUCES diff --git a/MdeModulePkg/Core/PiSmmCore/PiSmmIplExtra.uni b/MdeModulePkg/Core/PiSmmCore/PiSmmIplExtra.uni index 98410d8f0f..28cff7cf1a 100644 --- a/MdeModulePkg/Core/PiSmmCore/PiSmmIplExtra.uni +++ b/MdeModulePkg/Core/PiSmmCore/PiSmmIplExtra.uni @@ -1,7 +1,7 @@ // /** @file // PiSmmIpl Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Core SMM Services Initial Program Loader" diff --git a/MdeModulePkg/Core/PiSmmCore/Pool.c b/MdeModulePkg/Core/PiSmmCore/Pool.c index f30af2ae56..4885041388 100644 --- a/MdeModulePkg/Core/PiSmmCore/Pool.c +++ b/MdeModulePkg/Core/PiSmmCore/Pool.c @@ -1,14 +1,14 @@ /** @file SMM Memory pool management functions. - Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.
- This program and the accompanying materials are licensed and made available - under the terms and conditions of the BSD License which accompanies this - distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php + Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -16,7 +16,7 @@ LIST_ENTRY mSmmPoolLists[SmmPoolTypeMax][MAX_POOL_INDEX]; // -// To cache the SMRAM base since when Loading modules At fixed address feature is enabled, +// To cache the SMRAM base since when Loading modules At fixed address feature is enabled, // all module is assigned an offset relative the SMRAM base in build time. // GLOBAL_REMOVE_IF_UNREFERENCED EFI_PHYSICAL_ADDRESS gLoadModuleAtFixAddressSmramBase = 0; diff --git a/MdeModulePkg/Core/PiSmmCore/Smi.c b/MdeModulePkg/Core/PiSmmCore/Smi.c index 0c09e7fa10..99bfa0724c 100644 --- a/MdeModulePkg/Core/PiSmmCore/Smi.c +++ b/MdeModulePkg/Core/PiSmmCore/Smi.c @@ -2,13 +2,13 @@ SMI management. Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
- This program and the accompanying materials are licensed and made available - under the terms and conditions of the BSD License which accompanies this - distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php + This program and the accompanying materials are licensed and made available + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -113,7 +113,7 @@ SmiManage ( SMI_HANDLER *SmiHandler; BOOLEAN SuccessReturn; EFI_STATUS Status; - + Status = EFI_NOT_FOUND; SuccessReturn = FALSE; if (HandlerType == NULL) { @@ -171,7 +171,7 @@ SmiManage ( case EFI_WARN_INTERRUPT_SOURCE_QUIESCED: // // If at least one of the handlers returns EFI_WARN_INTERRUPT_SOURCE_QUIESCED - // then the function will return EFI_SUCCESS. + // then the function will return EFI_SUCCESS. // SuccessReturn = TRUE; break; diff --git a/MdeModulePkg/Core/PiSmmCore/SmramProfileRecord.c b/MdeModulePkg/Core/PiSmmCore/SmramProfileRecord.c index 410e0836fd..b586afa794 100644 --- a/MdeModulePkg/Core/PiSmmCore/SmramProfileRecord.c +++ b/MdeModulePkg/Core/PiSmmCore/SmramProfileRecord.c @@ -1,7 +1,7 @@ /** @file Support routines for SMRAM profile. - Copyright (c) 2014 - 2017, Intel Corporation. All rights reserved.
+ Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -99,10 +99,10 @@ DumpSmramInfo ( @param[in, out] ProfileSize On entry, points to the size in bytes of the ProfileBuffer. On return, points to the size of the data returned in ProfileBuffer. @param[out] ProfileBuffer Profile buffer. - + @return EFI_SUCCESS Get the memory profile data successfully. @return EFI_UNSUPPORTED Memory profile is unsupported. - @return EFI_BUFFER_TO_SMALL The ProfileSize is too small for the resulting data. + @return EFI_BUFFER_TO_SMALL The ProfileSize is too small for the resulting data. ProfileSize is updated with the size required. **/ @@ -594,7 +594,7 @@ NeedRecordThisDriver ( // return TRUE; } - + // // Record FilePath without end node. // @@ -1913,10 +1913,10 @@ Done: @param[in, out] ProfileSize On entry, points to the size in bytes of the ProfileBuffer. On return, points to the size of the data returned in ProfileBuffer. @param[out] ProfileBuffer Profile buffer. - + @return EFI_SUCCESS Get the memory profile data successfully. @return EFI_UNSUPPORTED Memory profile is unsupported. - @return EFI_BUFFER_TO_SMALL The ProfileSize is too small for the resulting data. + @return EFI_BUFFER_TO_SMALL The ProfileSize is too small for the resulting data. ProfileSize is updated with the size required. **/ @@ -1986,7 +1986,7 @@ SmramProfileProtocolRegisterImage ( EFI_SMM_DRIVER_ENTRY DriverEntry; VOID *EntryPointInImage; EFI_GUID *Name; - + ZeroMem (&DriverEntry, sizeof (DriverEntry)); Name = GetFileNameFromFilePath (FilePath); if (Name != NULL) { diff --git a/MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf b/MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf index 035aa9a596..d66c8b9f09 100644 --- a/MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf +++ b/MdeModulePkg/Core/RuntimeDxe/RuntimeDxe.inf @@ -5,7 +5,7 @@ # CalculateCrc32 boot services table, SetVirtualAddressMap & ConvertPointer # runtime services table. # -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -38,7 +38,7 @@ Crc32.c Runtime.h Runtime.c - + [Packages] MdePkg/MdePkg.dec @@ -57,9 +57,9 @@ [Protocols] gEfiRuntimeArchProtocolGuid ## PRODUCES gEfiLoadedImageProtocolGuid ## CONSUMES - + [depex] TRUE [UserExtensions.TianoCore."ExtraFiles"] - RuntimeDxeExtra.uni \ No newline at end of file + RuntimeDxeExtra.uni diff --git a/MdeModulePkg/Core/RuntimeDxe/RuntimeDxeExtra.uni b/MdeModulePkg/Core/RuntimeDxe/RuntimeDxeExtra.uni index 06bd6395e8..3f06164e09 100644 --- a/MdeModulePkg/Core/RuntimeDxe/RuntimeDxeExtra.uni +++ b/MdeModulePkg/Core/RuntimeDxe/RuntimeDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // RuntimeDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Core Runtime Services Driver" diff --git a/MdeModulePkg/Include/Guid/AcpiS3Context.h b/MdeModulePkg/Include/Guid/AcpiS3Context.h index de0f87cfb5..5e256f053b 100644 --- a/MdeModulePkg/Include/Guid/AcpiS3Context.h +++ b/MdeModulePkg/Include/Guid/AcpiS3Context.h @@ -1,7 +1,7 @@ /** @file Definitions for data structures used in S3 resume. -Copyright (c) 2011 - 2012, Intel Corporation. All rights reserved.
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions @@ -47,7 +47,7 @@ typedef struct { EFI_PHYSICAL_ADDRESS S3NvsPageTableAddress; EFI_PHYSICAL_ADDRESS BootScriptStackBase; UINT64 BootScriptStackSize; - EFI_PHYSICAL_ADDRESS S3DebugBufferAddress; + EFI_PHYSICAL_ADDRESS S3DebugBufferAddress; } ACPI_S3_CONTEXT; typedef struct { diff --git a/MdeModulePkg/Include/Guid/BootScriptExecutorVariable.h b/MdeModulePkg/Include/Guid/BootScriptExecutorVariable.h index 420ccea255..e9b70156eb 100644 --- a/MdeModulePkg/Include/Guid/BootScriptExecutorVariable.h +++ b/MdeModulePkg/Include/Guid/BootScriptExecutorVariable.h @@ -1,9 +1,9 @@ /** @file Define Name, GUID and data format for an EFI Variable that is used to save the entry point - of a code segment which will be loaded and executed by a standalone boot script + of a code segment which will be loaded and executed by a standalone boot script executor on S3 boot path. - Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions diff --git a/MdeModulePkg/Include/Guid/CapsuleVendor.h b/MdeModulePkg/Include/Guid/CapsuleVendor.h index 15ca1055b6..066bfca5a0 100644 --- a/MdeModulePkg/Include/Guid/CapsuleVendor.h +++ b/MdeModulePkg/Include/Guid/CapsuleVendor.h @@ -5,17 +5,17 @@ * the capsule GUID HOB data structure. The capsule HOB and variable can be used to store the capsule image start address and length. They are used by EDKII implementation of capsule update across a system reset. - + @par Note: EDKII implementation of capsule updating has discarded this capsule GUID HOB data structure and used one UEFI Capsule HOB (defined in PI Specification 1.2) instead. -Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -24,10 +24,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #define __EFI_CAPSULE_VENDOR_GUID_H__ /// -/// This guid is used as a variable GUID for the capsule variable +/// This guid is used as a variable GUID for the capsule variable /// if the capsule pointer is passed through reset via a variable. /// -/// This guid is also used as a hob GUID for the capsule data +/// This guid is also used as a hob GUID for the capsule data /// when the capsule pointer is passed from PEI phase to DXE phase. /// #define EFI_CAPSULE_VENDOR_GUID \ @@ -35,12 +35,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /// /// Name of capsule variable. -/// +/// #define EFI_CAPSULE_VARIABLE_NAME L"CapsuleUpdateData" /// /// The data structure of the capsule guid hob entry. -/// Note: EDKII implementation has discarded this structure and used +/// Note: EDKII implementation has discarded this structure and used /// UEFI_CAPSULE_HOB instead. /// typedef struct { diff --git a/MdeModulePkg/Include/Guid/ConnectConInEvent.h b/MdeModulePkg/Include/Guid/ConnectConInEvent.h index 28dd4b93de..a587eb85d8 100644 --- a/MdeModulePkg/Include/Guid/ConnectConInEvent.h +++ b/MdeModulePkg/Include/Guid/ConnectConInEvent.h @@ -1,8 +1,8 @@ /** @file - GUID for an event that is signaled on the first attempt to check for a keystroke + GUID for an event that is signaled on the first attempt to check for a keystroke from the ConIn device. - Copyright (c) 2012, Intel Corporation. All rights reserved.
+ Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/MdeModulePkg/Include/Guid/ConsoleInDevice.h b/MdeModulePkg/Include/Guid/ConsoleInDevice.h index 014594f188..6132124367 100644 --- a/MdeModulePkg/Include/Guid/ConsoleInDevice.h +++ b/MdeModulePkg/Include/Guid/ConsoleInDevice.h @@ -1,14 +1,14 @@ /** @file This GUID can be installed to the device handle to specify that the device is the console-in device. - -Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. + +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Include/Guid/ConsoleOutDevice.h b/MdeModulePkg/Include/Guid/ConsoleOutDevice.h index 4d7de3d83f..0d366ed78c 100644 --- a/MdeModulePkg/Include/Guid/ConsoleOutDevice.h +++ b/MdeModulePkg/Include/Guid/ConsoleOutDevice.h @@ -1,13 +1,13 @@ /** @file This GUID can be installed to the device handle to specify that the device is the console-out device. -Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Include/Guid/Crc32GuidedSectionExtraction.h b/MdeModulePkg/Include/Guid/Crc32GuidedSectionExtraction.h index 896f0767db..aebe4d45af 100644 --- a/MdeModulePkg/Include/Guid/Crc32GuidedSectionExtraction.h +++ b/MdeModulePkg/Include/Guid/Crc32GuidedSectionExtraction.h @@ -1,14 +1,14 @@ /** @file - This file defines CRC32 GUID to specify the CRC32 + This file defines CRC32 GUID to specify the CRC32 encapsulation scheme for the GUIDed section. -Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Include/Guid/DebugMask.h b/MdeModulePkg/Include/Guid/DebugMask.h index 1e6beb562e..3f5ae716c7 100644 --- a/MdeModulePkg/Include/Guid/DebugMask.h +++ b/MdeModulePkg/Include/Guid/DebugMask.h @@ -2,13 +2,13 @@ Debug Mask Protocol. -Copyright (c) 2011, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -29,7 +29,7 @@ typedef struct _EFI_DEBUG_MASK_PROTOCOL EFI_DEBUG_MASK_PROTOCOL; /// /// -/// +/// #define EFI_DEBUG_MASK_REVISION 0x00010000 // @@ -38,11 +38,11 @@ typedef struct _EFI_DEBUG_MASK_PROTOCOL EFI_DEBUG_MASK_PROTOCOL; typedef EFI_STATUS (EFIAPI * EFI_GET_DEBUG_MASK) ( - IN EFI_DEBUG_MASK_PROTOCOL *This, - IN OUT UINTN *CurrentDebugMask + IN EFI_DEBUG_MASK_PROTOCOL *This, + IN OUT UINTN *CurrentDebugMask ); -typedef +typedef EFI_STATUS (EFIAPI *EFI_SET_DEBUG_MASK) ( IN EFI_DEBUG_MASK_PROTOCOL *This, @@ -66,7 +66,7 @@ extern EFI_GUID gEfiDebugMaskProtocolGuid; /// #define EFI_GENERIC_VARIABLE_GUID \ { 0x59d1c24f, 0x50f1, 0x401a, {0xb1, 0x01, 0xf3, 0x3e, 0x0d, 0xae, 0xd4, 0x43} } - + #define DEBUG_MASK_VARIABLE_NAME L"EFIDebug" extern EFI_GUID gEfiGenericVariableGuid; diff --git a/MdeModulePkg/Include/Guid/DriverSampleHii.h b/MdeModulePkg/Include/Guid/DriverSampleHii.h index b5e1dbc099..101346aee1 100644 --- a/MdeModulePkg/Include/Guid/DriverSampleHii.h +++ b/MdeModulePkg/Include/Guid/DriverSampleHii.h @@ -1,13 +1,13 @@ /** @file - GUIDs used as HII FormSet and HII Package list GUID in Driver Sample driver. - -Copyright (c) 2011, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. + GUIDs used as HII FormSet and HII Package list GUID in Driver Sample driver. + +Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Include/Guid/EndOfS3Resume.h b/MdeModulePkg/Include/Guid/EndOfS3Resume.h index 853aa1afbc..c3d8ca0c13 100644 --- a/MdeModulePkg/Include/Guid/EndOfS3Resume.h +++ b/MdeModulePkg/Include/Guid/EndOfS3Resume.h @@ -1,15 +1,15 @@ /** @file - This GUID will be installed at the end of S3 resume phase as protocol in SMM environment. + This GUID will be installed at the end of S3 resume phase as protocol in SMM environment. It allows for SMM drivers to hook this point and do the required tasks. - Copyright (c) 2017, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php + Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Include/Guid/EventExitBootServiceFailed.h b/MdeModulePkg/Include/Guid/EventExitBootServiceFailed.h index aa34d459ba..38eeb8f3ac 100644 --- a/MdeModulePkg/Include/Guid/EventExitBootServiceFailed.h +++ b/MdeModulePkg/Include/Guid/EventExitBootServiceFailed.h @@ -2,7 +2,7 @@ GUID is the name of events used with ExitBootServices in order to be notified when this ExitBootServices Call is failed. - Copyright (c) 2012, Intel Corporation. All rights reserved.
+ Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -15,7 +15,7 @@ #ifndef __EVENT_EXIT_BOOT_FAILED_GUID_H__ #define __EVENT_EXIT_BOOT_FAILED_GUID_H__ - + #define EVENT_GROUP_EXIT_BOOT_SERVICES_FAILED \ { 0x4f6c5507, 0x232f, 0x4787, { 0xb9, 0x5e, 0x72, 0xf8, 0x62, 0x49, 0xc, 0xb1 } } diff --git a/MdeModulePkg/Include/Guid/FaultTolerantWrite.h b/MdeModulePkg/Include/Guid/FaultTolerantWrite.h index cb7b454b2b..167da46494 100644 --- a/MdeModulePkg/Include/Guid/FaultTolerantWrite.h +++ b/MdeModulePkg/Include/Guid/FaultTolerantWrite.h @@ -4,14 +4,14 @@ for FTW last write data has been done. The GUID hob will be only built if FTW last write was still in progress with SpareComplete set and DestinationComplete not set. -Copyright (c) 2013, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Include/Guid/HiiResourceSampleHii.h b/MdeModulePkg/Include/Guid/HiiResourceSampleHii.h index 2a86cad7bf..a7a4aa1c35 100644 --- a/MdeModulePkg/Include/Guid/HiiResourceSampleHii.h +++ b/MdeModulePkg/Include/Guid/HiiResourceSampleHii.h @@ -1,13 +1,13 @@ /** @file - GUID used as HII FormSet GUID in HII Resource Sample driver. - -Copyright (c) 2011, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. + GUID used as HII FormSet GUID in HII Resource Sample driver. + +Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Include/Guid/Ip4Config2Hii.h b/MdeModulePkg/Include/Guid/Ip4Config2Hii.h index b1b41b9230..e9082101b8 100644 --- a/MdeModulePkg/Include/Guid/Ip4Config2Hii.h +++ b/MdeModulePkg/Include/Guid/Ip4Config2Hii.h @@ -1,13 +1,13 @@ /** @file - GUIDs used as HII FormSet and HII Package list GUID in Ip4Dxe driver. - -Copyright (c) 2015, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. + GUIDs used as HII FormSet and HII Package list GUID in Ip4Dxe driver. + +Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Include/Guid/Ip4IScsiConfigHii.h b/MdeModulePkg/Include/Guid/Ip4IScsiConfigHii.h index 4eb4c828ff..f4031ec462 100644 --- a/MdeModulePkg/Include/Guid/Ip4IScsiConfigHii.h +++ b/MdeModulePkg/Include/Guid/Ip4IScsiConfigHii.h @@ -1,13 +1,13 @@ /** @file - GUIDs used as HII FormSet and HII Package list GUID in IP4 IScsiDxe driver. - -Copyright (c) 2011, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. + GUIDs used as HII FormSet and HII Package list GUID in IP4 IScsiDxe driver. + +Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Include/Guid/LoadModuleAtFixedAddress.h b/MdeModulePkg/Include/Guid/LoadModuleAtFixedAddress.h index ec467bbcb2..b755da6460 100644 --- a/MdeModulePkg/Include/Guid/LoadModuleAtFixedAddress.h +++ b/MdeModulePkg/Include/Guid/LoadModuleAtFixedAddress.h @@ -1,18 +1,18 @@ /** @file This file defines a configuration Table Guid for Load module at fixed address. - - This configuration table is to hold the top address below which the Dxe runtime code and - boot time code will be loaded and Tseg base. When this feature is enabled, Build tools will assigned + + This configuration table is to hold the top address below which the Dxe runtime code and + boot time code will be loaded and Tseg base. When this feature is enabled, Build tools will assigned module loading address relative to these two addresses. - -Copyright (c) 2010, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. + +Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Include/Guid/LzmaDecompress.h b/MdeModulePkg/Include/Guid/LzmaDecompress.h index 18a6552f9c..1a2187484d 100644 --- a/MdeModulePkg/Include/Guid/LzmaDecompress.h +++ b/MdeModulePkg/Include/Guid/LzmaDecompress.h @@ -1,13 +1,13 @@ /** @file Lzma Custom decompress algorithm Guid definition. -Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +http://opensource.org/licenses/bsd-license.php. + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -16,14 +16,14 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #define __LZMA_DECOMPRESS_GUID_H__ /// -/// The Global ID used to identify a section of an FFS file of type +/// The Global ID used to identify a section of an FFS file of type /// EFI_SECTION_GUID_DEFINED, whose contents have been compressed using LZMA. /// #define LZMA_CUSTOM_DECOMPRESS_GUID \ { 0xEE4E5898, 0x3914, 0x4259, { 0x9D, 0x6E, 0xDC, 0x7B, 0xD7, 0x94, 0x03, 0xCF } } /// -/// The Global ID used to identify a section of an FFS file of type +/// The Global ID used to identify a section of an FFS file of type /// EFI_SECTION_GUID_DEFINED, whose contents have been compressed using LZMA with X86 code Converter. /// #define LZMAF86_CUSTOM_DECOMPRESS_GUID \ diff --git a/MdeModulePkg/Include/Guid/MdeModuleHii.h b/MdeModulePkg/Include/Guid/MdeModuleHii.h index e2ebb55ef4..c1e587c54d 100644 --- a/MdeModulePkg/Include/Guid/MdeModuleHii.h +++ b/MdeModulePkg/Include/Guid/MdeModuleHii.h @@ -1,13 +1,13 @@ /** @file EDKII extented HII IFR guid opcodes. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Include/Guid/MdeModulePkgTokenSpace.h b/MdeModulePkg/Include/Guid/MdeModulePkgTokenSpace.h index 6ba7cd9df1..48e8d1c8de 100644 --- a/MdeModulePkg/Include/Guid/MdeModulePkgTokenSpace.h +++ b/MdeModulePkg/Include/Guid/MdeModulePkgTokenSpace.h @@ -1,13 +1,13 @@ /** @file - GUID for MdeModulePkg PCD Token Space. + GUID for MdeModulePkg PCD Token Space. -Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Include/Guid/MemoryProfile.h b/MdeModulePkg/Include/Guid/MemoryProfile.h index 777f950db7..2f94280269 100644 --- a/MdeModulePkg/Include/Guid/MemoryProfile.h +++ b/MdeModulePkg/Include/Guid/MemoryProfile.h @@ -1,7 +1,7 @@ /** @file Memory profile data structure. - Copyright (c) 2014 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -213,10 +213,10 @@ typedef struct _EDKII_MEMORY_PROFILE_PROTOCOL EDKII_MEMORY_PROFILE_PROTOCOL; @param[in, out] ProfileSize On entry, points to the size in bytes of the ProfileBuffer. On return, points to the size of the data returned in ProfileBuffer. @param[out] ProfileBuffer Profile buffer. - + @return EFI_SUCCESS Get the memory profile data successfully. @return EFI_UNSUPPORTED Memory profile is unsupported. - @return EFI_BUFFER_TO_SMALL The ProfileSize is too small for the resulting data. + @return EFI_BUFFER_TO_SMALL The ProfileSize is too small for the resulting data. ProfileSize is updated with the size required. **/ diff --git a/MdeModulePkg/Include/Guid/MemoryStatusCodeRecord.h b/MdeModulePkg/Include/Guid/MemoryStatusCodeRecord.h index 27d39e185e..904df9a62f 100644 --- a/MdeModulePkg/Include/Guid/MemoryStatusCodeRecord.h +++ b/MdeModulePkg/Include/Guid/MemoryStatusCodeRecord.h @@ -1,7 +1,7 @@ /** @file - GUID used to identify status code records HOB that originate from the PEI status code. - -Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+ GUID used to identify status code records HOB that originate from the PEI status code. + +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. @@ -17,9 +17,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #define __MEMORY_STATUS_CODE_RECORD_H__ /// -/// Global ID used to identify GUIDed HOBs that start with a structure of type -/// MEMORY_STATUSCODE_PACKET_HEADER, followed by an array of structures of type -/// MEMORY_STATUSCODE_RECORD. These GUIDed HOBs record all the information +/// Global ID used to identify GUIDed HOBs that start with a structure of type +/// MEMORY_STATUSCODE_PACKET_HEADER, followed by an array of structures of type +/// MEMORY_STATUSCODE_RECORD. These GUIDed HOBs record all the information /// passed into the ReportStatusCode() service of PEI Services Table. /// ///
@@ -38,7 +38,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED.
   }
 
 ///
-/// A header structure that is followed by an array of records that contain the 
+/// A header structure that is followed by an array of records that contain the
 /// parameters passed into the ReportStatusCode() service in the PEI Services Table.
 ///
 typedef struct {
@@ -57,7 +57,7 @@ typedef struct {
 } MEMORY_STATUSCODE_PACKET_HEADER;
 
 ///
-/// A header structure that is followed by an array of records that contain the 
+/// A header structure that is followed by an array of records that contain the
 /// parameters passed into the ReportStatusCode() service in the DXE Services Table.
 ///
 typedef struct {
@@ -76,7 +76,7 @@ typedef struct {
 } RUNTIME_MEMORY_STATUSCODE_HEADER;
 
 ///
-/// A structure that contains the parameters passed into the ReportStatusCode() 
+/// A structure that contains the parameters passed into the ReportStatusCode()
 /// service in the PEI Services Table.
 ///
 typedef struct {
diff --git a/MdeModulePkg/Include/Guid/MemoryTypeInformation.h b/MdeModulePkg/Include/Guid/MemoryTypeInformation.h
index 57896d9463..858c043b75 100644
--- a/MdeModulePkg/Include/Guid/MemoryTypeInformation.h
+++ b/MdeModulePkg/Include/Guid/MemoryTypeInformation.h
@@ -4,16 +4,16 @@
   * Memory Type Information Variable Name.
   * Memory Type Information GUID HOB data structure.
 
-  The memory type information HOB and variable can 
+  The memory type information HOB and variable can
   be used to store the information for each memory type in Variable or HOB.
 
-Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Include/Guid/MtcVendor.h b/MdeModulePkg/Include/Guid/MtcVendor.h index 77bc2ae1b8..34b6611ed1 100644 --- a/MdeModulePkg/Include/Guid/MtcVendor.h +++ b/MdeModulePkg/Include/Guid/MtcVendor.h @@ -1,13 +1,13 @@ /** @file - GUID is for MTC variable. - -Copyright (c) 2011, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. + GUID is for MTC variable. + +Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Include/Guid/PcdDataBaseHobGuid.h b/MdeModulePkg/Include/Guid/PcdDataBaseHobGuid.h index 1908eb84b3..8b51893f1c 100644 --- a/MdeModulePkg/Include/Guid/PcdDataBaseHobGuid.h +++ b/MdeModulePkg/Include/Guid/PcdDataBaseHobGuid.h @@ -1,13 +1,13 @@ /** @file Hob guid for Pcd DataBase. -Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Include/Guid/Performance.h b/MdeModulePkg/Include/Guid/Performance.h index 6e21ed03e6..72e39787a6 100644 --- a/MdeModulePkg/Include/Guid/Performance.h +++ b/MdeModulePkg/Include/Guid/Performance.h @@ -2,15 +2,15 @@ This file defines performance-related definitions, including the format of: * performance GUID HOB. * performance protocol interfaces. - * performance variables. + * performance variables. Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -36,7 +36,7 @@ typedef struct { typedef struct { EFI_PHYSICAL_ADDRESS Handle; - CHAR8 Token[PEI_PERFORMANCE_STRING_SIZE]; ///< Measured token string name. + CHAR8 Token[PEI_PERFORMANCE_STRING_SIZE]; ///< Measured token string name. CHAR8 Module[PEI_PERFORMANCE_STRING_SIZE]; ///< Module string name. UINT64 StartTimeStamp; ///< Start time point. UINT64 EndTimeStamp; ///< End time point. @@ -44,7 +44,7 @@ typedef struct { // // The header must be aligned at 8 bytes. -// +// typedef struct { UINT32 NumberOfEntries; ///< The number of all performance log entries. UINT32 Reserved; @@ -76,7 +76,7 @@ typedef struct _PERFORMANCE_EX_PROTOCOL PERFORMANCE_EX_PROTOCOL; typedef struct { EFI_PHYSICAL_ADDRESS Handle; - CHAR8 Token[DXE_PERFORMANCE_STRING_SIZE]; ///< Measured token string name. + CHAR8 Token[DXE_PERFORMANCE_STRING_SIZE]; ///< Measured token string name. CHAR8 Module[DXE_PERFORMANCE_STRING_SIZE]; ///< Module string name. UINT64 StartTimeStamp; ///< Start time point. UINT64 EndTimeStamp; ///< End time point. @@ -84,7 +84,7 @@ typedef struct { typedef struct { EFI_PHYSICAL_ADDRESS Handle; - CHAR8 Token[DXE_PERFORMANCE_STRING_SIZE]; ///< Measured token string name. + CHAR8 Token[DXE_PERFORMANCE_STRING_SIZE]; ///< Measured token string name. CHAR8 Module[DXE_PERFORMANCE_STRING_SIZE]; ///< Module string name. UINT64 StartTimeStamp; ///< Start time point. UINT64 EndTimeStamp; ///< End time point. @@ -215,7 +215,7 @@ EFI_STATUS @param LogEntryKey The key for the previous performance measurement log entry. If 0, then the first performance measurement log entry is retrieved. @param GaugeDataEntry Out parameter for the indirect pointer to the gauge data entry specified by LogEntryKey. - + @retval EFI_SUCCESS The GuageDataEntry is successfully found based on LogEntryKey. @retval EFI_NOT_FOUND There is no entry after the measurement referred to by LogEntryKey. @retval EFI_INVALID_PARAMETER The LogEntryKey is not a valid entry, or GaugeDataEntry is NULL. @@ -310,7 +310,7 @@ EFI_STATUS @param LogEntryKey The key for the previous performance measurement log entry. If 0, then the first performance measurement log entry is retrieved. @param GaugeDataEntryEx Out parameter for the indirect pointer to the extented gauge data entry specified by LogEntryKey. - + @retval EFI_SUCCESS The GuageDataEntryEx is successfully found based on LogEntryKey. @retval EFI_NOT_FOUND There is no entry after the measurement referred to by LogEntryKey. @retval EFI_INVALID_PARAMETER The LogEntryKey is not a valid entry, or GaugeDataEntryEx is NULL. diff --git a/MdeModulePkg/Include/Guid/PiSmmCommunicationRegionTable.h b/MdeModulePkg/Include/Guid/PiSmmCommunicationRegionTable.h index e3021ef267..300fe83cad 100644 --- a/MdeModulePkg/Include/Guid/PiSmmCommunicationRegionTable.h +++ b/MdeModulePkg/Include/Guid/PiSmmCommunicationRegionTable.h @@ -1,12 +1,12 @@ /** @file -Copyright (c) 2015, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +http://opensource.org/licenses/bsd-license.php. + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -25,14 +25,14 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // // This table is installed to UEFI configuration table by generic driver // or platform driver, at early DXE phase. -// +// // The EFI_MEMORY_DESCRIPTOR entry must contain at least one entry. // The entries must be normal memory region in EfiReservedMemoryType, EfiACPIMemoryNVS, // or EfiRuntimeServicesData. // If the Entry.Type is EfiConventionalMemory, it means this entry is free to use. // If the Entry.Type is other, it means this entry is occupied. // -// Any non-SMM component may put communication data there, then use +// Any non-SMM component may put communication data there, then use // UEFI defined SMM Communication ACPI Table, or PI defined EFI_SMM_COMMUNICATION_PROTOCOL // to communicate with SMI handler. The process is: // 1) Find an entry whose type is EfiConventional. diff --git a/MdeModulePkg/Include/Guid/PlatDriOverrideHii.h b/MdeModulePkg/Include/Guid/PlatDriOverrideHii.h index bd8e493ef9..b09cdc39ef 100644 --- a/MdeModulePkg/Include/Guid/PlatDriOverrideHii.h +++ b/MdeModulePkg/Include/Guid/PlatDriOverrideHii.h @@ -1,13 +1,13 @@ /** @file - GUIDs used as HII FormSet and HII Package list GUID in PlatDriOverride driver. - -Copyright (c) 2011, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. + GUIDs used as HII FormSet and HII Package list GUID in PlatDriOverride driver. + +Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Include/Guid/S3SmmInitDone.h b/MdeModulePkg/Include/Guid/S3SmmInitDone.h index 53fef8ed19..0412cf0be3 100644 --- a/MdeModulePkg/Include/Guid/S3SmmInitDone.h +++ b/MdeModulePkg/Include/Guid/S3SmmInitDone.h @@ -1,16 +1,16 @@ /** @file After S3 SMM initialization is done and before S3 boot script is executed, - this GUID is installed as PPI in PEI and protocol in SMM environment. + this GUID is installed as PPI in PEI and protocol in SMM environment. It allows for PEIMs or SMM drivers to hook this point and do the required tasks. - Copyright (c) 2018, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php + Copyright (c) 2018 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Include/Guid/StandardErrorDevice.h b/MdeModulePkg/Include/Guid/StandardErrorDevice.h index 7bc390241d..b717191c43 100644 --- a/MdeModulePkg/Include/Guid/StandardErrorDevice.h +++ b/MdeModulePkg/Include/Guid/StandardErrorDevice.h @@ -1,14 +1,14 @@ /** @file This GUID is installed to the device handler to specify that the device is a StdErr device. - -Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. + +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Include/Guid/StatusCodeCallbackGuid.h b/MdeModulePkg/Include/Guid/StatusCodeCallbackGuid.h index 2a83471a99..9eeab10aa2 100644 --- a/MdeModulePkg/Include/Guid/StatusCodeCallbackGuid.h +++ b/MdeModulePkg/Include/Guid/StatusCodeCallbackGuid.h @@ -1,15 +1,15 @@ /** @file GUID used to identify HOB for pointers to callback functios registered on PEI report status code router. - -Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. + +Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h b/MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h index f478f801b6..11f4c5fa3b 100644 --- a/MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h +++ b/MdeModulePkg/Include/Guid/StatusCodeDataTypeDebug.h @@ -1,14 +1,14 @@ /** @file - This file defines the GUID and data structure used to pass DEBUG() macro + This file defines the GUID and data structure used to pass DEBUG() macro information to the Status Code Protocol and Status Code PPI. -Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -30,11 +30,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #define EFI_STATUS_CODE_DATA_MAX_SIZE 200 /// -/// This structure contains the ErrorLevel passed into the DEBUG() macro, followed -/// by a 96-byte buffer that contains the variable argument list passed to the -/// DEBUG() macro that has been converted to a BASE_LIST. The 96-byte buffer is -/// followed by a Null-terminated ASCII string that is the Format string passed -/// to the DEBUG() macro. The maximum size of this structure is defined by +/// This structure contains the ErrorLevel passed into the DEBUG() macro, followed +/// by a 96-byte buffer that contains the variable argument list passed to the +/// DEBUG() macro that has been converted to a BASE_LIST. The 96-byte buffer is +/// followed by a Null-terminated ASCII string that is the Format string passed +/// to the DEBUG() macro. The maximum size of this structure is defined by /// EFI_STATUS_CODE_DATA_MAX_SIZE. /// typedef struct { diff --git a/MdeModulePkg/Include/Guid/StatusCodeDataTypeVariable.h b/MdeModulePkg/Include/Guid/StatusCodeDataTypeVariable.h index 9ea85f8099..f051fa43cb 100644 --- a/MdeModulePkg/Include/Guid/StatusCodeDataTypeVariable.h +++ b/MdeModulePkg/Include/Guid/StatusCodeDataTypeVariable.h @@ -1,10 +1,10 @@ /** @file - This file defines the GUID and data structure used to pass variable setting + This file defines the GUID and data structure used to pass variable setting failure information to the Status Code Protocol. -Copyright (c) 2014, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php. diff --git a/MdeModulePkg/Include/Guid/SystemNvDataGuid.h b/MdeModulePkg/Include/Guid/SystemNvDataGuid.h index 67c666259f..2232ab314b 100644 --- a/MdeModulePkg/Include/Guid/SystemNvDataGuid.h +++ b/MdeModulePkg/Include/Guid/SystemNvDataGuid.h @@ -1,17 +1,17 @@ -/** @file +/** @file This file defines NvDataFv GUID and FTW working block structures. - The NvDataFv GUID can be used as FileSystemGuid in EFI_FIRMWARE_VOLUME_HEADER if + The NvDataFv GUID can be used as FileSystemGuid in EFI_FIRMWARE_VOLUME_HEADER if this FV image contains NV data, such as NV variable data. This file also defines WorkingBlockSignature GUID for FTW working block signature. -Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Include/Guid/UsbKeyBoardLayout.h b/MdeModulePkg/Include/Guid/UsbKeyBoardLayout.h index 57d81643c6..b88a543f62 100644 --- a/MdeModulePkg/Include/Guid/UsbKeyBoardLayout.h +++ b/MdeModulePkg/Include/Guid/UsbKeyBoardLayout.h @@ -1,13 +1,13 @@ /** @file USB KeyBoard Layout GUIDs -Copyright (c) 2011, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Include/Guid/VariableIndexTable.h b/MdeModulePkg/Include/Guid/VariableIndexTable.h index ee0722fd48..4c86f0cced 100644 --- a/MdeModulePkg/Include/Guid/VariableIndexTable.h +++ b/MdeModulePkg/Include/Guid/VariableIndexTable.h @@ -2,13 +2,13 @@ The variable data structures are related to EDK II-specific implementation of UEFI variables. VariableFormat.h defines variable data headers and variable storage region headers. -Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Include/Guid/VlanConfigHii.h b/MdeModulePkg/Include/Guid/VlanConfigHii.h index 3848ce733d..3cd2f8bbb0 100644 --- a/MdeModulePkg/Include/Guid/VlanConfigHii.h +++ b/MdeModulePkg/Include/Guid/VlanConfigHii.h @@ -1,13 +1,13 @@ /** @file - GUIDs used as HII FormSet and HII Package list GUID in VlanConfig driver. - -Copyright (c) 2011, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. + GUIDs used as HII FormSet and HII Package list GUID in VlanConfig driver. + +Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Include/Guid/ZeroGuid.h b/MdeModulePkg/Include/Guid/ZeroGuid.h index 7ba8dda205..bf113a5ebd 100644 --- a/MdeModulePkg/Include/Guid/ZeroGuid.h +++ b/MdeModulePkg/Include/Guid/ZeroGuid.h @@ -1,13 +1,13 @@ /** @file GUID has all zero values. - -Copyright (c) 2011, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. + +Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Include/Library/BootLogoLib.h b/MdeModulePkg/Include/Library/BootLogoLib.h index cacdd29ded..4f017afd5c 100644 --- a/MdeModulePkg/Include/Library/BootLogoLib.h +++ b/MdeModulePkg/Include/Library/BootLogoLib.h @@ -2,7 +2,7 @@ This library is only intended to be used by PlatformBootManagerLib to show progress bar and LOGO. -Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at @@ -30,7 +30,7 @@ BootLogoEnableLogo ( /** - Use SystemTable ConOut to turn on video based Simple Text Out consoles. The + Use SystemTable ConOut to turn on video based Simple Text Out consoles. The Simple Text Out screens will now be synced up with all non-video output devices. @retval EFI_SUCCESS UGA devices are back in text mode and synced up. diff --git a/MdeModulePkg/Include/Library/CapsuleLib.h b/MdeModulePkg/Include/Library/CapsuleLib.h index 26c14a09cd..376cb39d38 100644 --- a/MdeModulePkg/Include/Library/CapsuleLib.h +++ b/MdeModulePkg/Include/Library/CapsuleLib.h @@ -2,13 +2,13 @@ This library class defines a set of interfaces for how to process capsule image updates. -Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -17,14 +17,14 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #define __CAPSULE_LIB_H__ /** - The firmware checks whether the capsule image is supported - by the CapsuleGuid in CapsuleHeader or if there is other specific information in + The firmware checks whether the capsule image is supported + by the CapsuleGuid in CapsuleHeader or if there is other specific information in the capsule image. Caution: This function may receive untrusted input. @param CapsuleHeader Pointer to the UEFI capsule image to be checked. - + @retval EFI_SUCESS Input capsule is supported by firmware. @retval EFI_UNSUPPORTED Input capsule is not supported by the firmware. **/ @@ -40,9 +40,9 @@ SupportCapsuleImage ( Caution: This function may receive untrusted input. - @param CapsuleHeader Pointer to the UEFI capsule image to be processed. - - @retval EFI_SUCESS Capsule Image processed successfully. + @param CapsuleHeader Pointer to the UEFI capsule image to be processed. + + @retval EFI_SUCESS Capsule Image processed successfully. @retval EFI_UNSUPPORTED Capsule image is not supported by the firmware. **/ EFI_STATUS diff --git a/MdeModulePkg/Include/Library/CpuExceptionHandlerLib.h b/MdeModulePkg/Include/Library/CpuExceptionHandlerLib.h index 8cc9bac760..751de6dacf 100644 --- a/MdeModulePkg/Include/Library/CpuExceptionHandlerLib.h +++ b/MdeModulePkg/Include/Library/CpuExceptionHandlerLib.h @@ -2,7 +2,7 @@ CPU Exception library provides the default CPU interrupt/exception handler. It also provides capability to register user interrupt/exception handler. - Copyright (c) 2012 - 2017, Intel Corporation. All rights reserved.
+ Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -88,15 +88,15 @@ typedef union { /** Initializes all CPU exceptions entries and provides the default exception handlers. - + Caller should try to get an array of interrupt and/or exception vectors that are in use and need to persist by EFI_VECTOR_HANDOFF_INFO defined in PI 1.3 specification. - If caller cannot get reserved vector list or it does not exists, set VectorInfo to NULL. + If caller cannot get reserved vector list or it does not exists, set VectorInfo to NULL. If VectorInfo is not NULL, the exception vectors will be initialized per vector attribute accordingly. @param[in] VectorInfo Pointer to reserved vector list. - - @retval EFI_SUCCESS CPU Exception Entries have been successfully initialized + + @retval EFI_SUCCESS CPU Exception Entries have been successfully initialized with default exception handlers. @retval EFI_INVALID_PARAMETER VectorInfo includes the invalid content if VectorInfo is not NULL. @retval EFI_UNSUPPORTED This function is not supported. @@ -140,15 +140,15 @@ InitializeCpuExceptionHandlersEx ( /** Initializes all CPU interrupt/exceptions entries and provides the default interrupt/exception handlers. - + Caller should try to get an array of interrupt and/or exception vectors that are in use and need to persist by EFI_VECTOR_HANDOFF_INFO defined in PI 1.3 specification. - If caller cannot get reserved vector list or it does not exists, set VectorInfo to NULL. + If caller cannot get reserved vector list or it does not exists, set VectorInfo to NULL. If VectorInfo is not NULL, the exception vectors will be initialized per vector attribute accordingly. @param[in] VectorInfo Pointer to reserved vector list. - - @retval EFI_SUCCESS All CPU interrupt/exception entries have been successfully initialized + + @retval EFI_SUCCESS All CPU interrupt/exception entries have been successfully initialized with default interrupt/exception handlers. @retval EFI_INVALID_PARAMETER VectorInfo includes the invalid content if VectorInfo is not NULL. @retval EFI_UNSUPPORTED This function is not supported. @@ -163,9 +163,9 @@ InitializeCpuInterruptHandlers ( /** Registers a function to be called from the processor interrupt handler. - This function registers and enables the handler specified by InterruptHandler for a processor - interrupt or exception type specified by InterruptType. If InterruptHandler is NULL, then the - handler for the processor interrupt or exception type specified by InterruptType is uninstalled. + This function registers and enables the handler specified by InterruptHandler for a processor + interrupt or exception type specified by InterruptType. If InterruptHandler is NULL, then the + handler for the processor interrupt or exception type specified by InterruptType is uninstalled. The installed handler is called once for each processor interrupt or exception. NOTE: This function should be invoked after InitializeCpuExceptionHandlers() or InitializeCpuInterruptHandlers() invoked, otherwise EFI_UNSUPPORTED returned. @@ -202,5 +202,5 @@ DumpCpuContext ( IN EFI_EXCEPTION_TYPE ExceptionType, IN EFI_SYSTEM_CONTEXT SystemContext ); - + #endif diff --git a/MdeModulePkg/Include/Library/CustomizedDisplayLib.h b/MdeModulePkg/Include/Library/CustomizedDisplayLib.h index 1689e2c4f6..f664778508 100644 --- a/MdeModulePkg/Include/Library/CustomizedDisplayLib.h +++ b/MdeModulePkg/Include/Library/CustomizedDisplayLib.h @@ -1,13 +1,13 @@ /** @file This library class defines a set of interfaces to customize Display module -Copyright (c) 2013, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -38,14 +38,14 @@ Statement **/ /** - This funtion defines Page Frame and Backgroud. - - Based on the above layout, it will be responsible for HeaderHeight, FooterHeight, - StatusBarHeight and Backgroud. And, it will reserve Screen for Statement. + This funtion defines Page Frame and Backgroud. + + Based on the above layout, it will be responsible for HeaderHeight, FooterHeight, + StatusBarHeight and Backgroud. And, it will reserve Screen for Statement. @param[in] FormData Form Data to be shown in Page. @param[out] ScreenForStatement Screen to be used for Statement. (Prompt, Value and Help) - + @return Status **/ EFI_STATUS @@ -59,7 +59,7 @@ DisplayPageFrame ( Clear Screen to the initial state. **/ VOID -EFIAPI +EFIAPI ClearDisplayPage ( VOID ); @@ -68,8 +68,8 @@ ClearDisplayPage ( This function updates customized key panel's help information. The library will prepare those Strings for the basic key, ESC, Enter, Up/Down/Left/Right, +/-. and arrange them in Footer panel. - - @param[in] FormData Form Data to be shown in Page. FormData has the highlighted statement. + + @param[in] FormData Form Data to be shown in Page. FormData has the highlighted statement. @param[in] Statement The statement current selected. @param[in] Selected Whether or not a tag be selected. TRUE means Enter has hit this question. **/ @@ -84,10 +84,10 @@ RefreshKeyHelp ( /** Update status bar. - This function updates the status bar on the bottom of menu screen. It just shows StatusBar. + This function updates the status bar on the bottom of menu screen. It just shows StatusBar. Original logic in this function should be splitted out. - @param[in] MessageType The type of message to be shown. InputError or Configuration Changed. + @param[in] MessageType The type of message to be shown. InputError or Configuration Changed. @param[in] State Show or Clear Message. **/ VOID @@ -98,13 +98,13 @@ UpdateStatusBar ( ); /** - Create popup window. + Create popup window. This function draws OEM/Vendor specific pop up windows. @param[out] Key User Input Key @param ... String to be shown in Popup. The variable argument list is terminated by a NULL. - + **/ VOID EFIAPI @@ -114,8 +114,8 @@ CreateDialog ( ); /** - Confirm how to handle the changed data. - + Confirm how to handle the changed data. + @return Action BROWSER_ACTION_SUBMIT, BROWSER_ACTION_DISCARD or other values. **/ UINTN @@ -127,7 +127,7 @@ ConfirmDataChange ( /** OEM specifies whether Setup exits Page by ESC key. - This function customized the behavior that whether Setup exits Page so that + This function customized the behavior that whether Setup exits Page so that system able to boot when configuration is not changed. @retval TRUE Exits FrontPage @@ -140,14 +140,14 @@ FormExitPolicy ( ); /** - Set Timeout value for a ceratain Form to get user response. - + Set Timeout value for a ceratain Form to get user response. + This function allows to set timeout value on a ceratain form if necessary. - If timeout is not zero, the form will exit if user has no response in timeout. - + If timeout is not zero, the form will exit if user has no response in timeout. + @param[in] FormData Form Data to be shown in Page - @return 0 No timeout for this form. + @return 0 No timeout for this form. @return > 0 Timeout value in 100 ns units. **/ UINT64 @@ -186,8 +186,8 @@ PrintStringAt ( @param Column The cursor position to print the string at. When it is -1, use current Position. @param Row The cursor position to print the string at. When it is -1, use current Position. @param String String pointer. - @param Width Width for String to be printed. If the print length of String < Width, - Space char (L' ') will be used to append String. + @param Width Width for String to be printed. If the print length of String < Width, + Space char (L' ') will be used to append String. @return Length of string printed to the console diff --git a/MdeModulePkg/Include/Library/DpcLib.h b/MdeModulePkg/Include/Library/DpcLib.h index c392e3e3d7..41a49892fe 100644 --- a/MdeModulePkg/Include/Library/DpcLib.h +++ b/MdeModulePkg/Include/Library/DpcLib.h @@ -1,13 +1,13 @@ /** @file DpcLib.h. - -Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. + +Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Include/Library/FileExplorerLib.h b/MdeModulePkg/Include/Library/FileExplorerLib.h index 2ae8ec6106..c077541102 100644 --- a/MdeModulePkg/Include/Library/FileExplorerLib.h +++ b/MdeModulePkg/Include/Library/FileExplorerLib.h @@ -2,13 +2,13 @@ This library class defines a set of interfaces for how to do file explorer. -Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -19,7 +19,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include /** - Choose a file in the specified directory. + Choose a file in the specified directory. If user input NULL for the RootDirectory, will choose file in the system. diff --git a/MdeModulePkg/Include/Library/HiiLib.h b/MdeModulePkg/Include/Library/HiiLib.h index 3d87677b2f..8d0ecca46a 100644 --- a/MdeModulePkg/Include/Library/HiiLib.h +++ b/MdeModulePkg/Include/Library/HiiLib.h @@ -1,14 +1,14 @@ /** @file Public include file for the HII Library -Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -29,7 +29,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. If an empty list of packages is passed in, then NULL is returned. If the size of the list of package is 0, then NULL is returned. - The variable arguments are pointers that point to package headers defined + The variable arguments are pointers that point to package headers defined by UEFI VFR compiler and StringGather tool. #pragma pack (push, 1) @@ -38,13 +38,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. EFI_HII_PACKAGE_HEADER PackageHeader; } EDKII_AUTOGEN_PACKAGES_HEADER; #pragma pack (pop) - + @param[in] PackageListGuid The GUID of the package list. - @param[in] DeviceHandle If not NULL, the Device Handle on which + @param[in] DeviceHandle If not NULL, the Device Handle on which an instance of DEVICE_PATH_PROTOCOL is installed. - This Device Handle uniquely defines the device that + This Device Handle uniquely defines the device that the added packages are associated with. - @param[in] ... The variable argument list that contains pointers + @param[in] ... The variable argument list that contains pointers to packages terminated by a NULL. @retval NULL An HII Handle has already been registered in the HII Database with @@ -81,37 +81,37 @@ HiiRemovePackages ( ; /** - This function creates a new string in String Package or updates an existing + This function creates a new string in String Package or updates an existing string in a String Package. If StringId is 0, then a new string is added to a String Package. If StringId is not zero, then a string in String Package is updated. If SupportedLanguages is NULL, then the string is added or updated for all the languages that the String Package supports. If SupportedLanguages - is not NULL, then the string is added or updated for the set of languages + is not NULL, then the string is added or updated for the set of languages specified by SupportedLanguages. - + If HiiHandle is NULL, then ASSERT(). If String is NULL, then ASSERT(). - @param[in] HiiHandle A handle that was previously registered in the + @param[in] HiiHandle A handle that was previously registered in the HII Database. - @param[in] StringId If zero, then a new string is created in the - String Package associated with HiiHandle. If - non-zero, then the string specified by StringId - is updated in the String Package associated - with HiiHandle. - @param[in] String A pointer to the Null-terminated Unicode string - to add or update in the String Package associated + @param[in] StringId If zero, then a new string is created in the + String Package associated with HiiHandle. If + non-zero, then the string specified by StringId + is updated in the String Package associated with HiiHandle. - @param[in] SupportedLanguages A pointer to a Null-terminated ASCII string of - language codes. If this parameter is NULL, then - String is added or updated in the String Package - associated with HiiHandle for all the languages - that the String Package supports. If this - parameter is not NULL, then String is added - or updated in the String Package associated with - HiiHandle for the set of languages specified by - SupportedLanguages. The format of - SupportedLanguages must follow the language + @param[in] String A pointer to the Null-terminated Unicode string + to add or update in the String Package associated + with HiiHandle. + @param[in] SupportedLanguages A pointer to a Null-terminated ASCII string of + language codes. If this parameter is NULL, then + String is added or updated in the String Package + associated with HiiHandle for all the languages + that the String Package supports. If this + parameter is not NULL, then String is added + or updated in the String Package associated with + HiiHandle for the set of languages specified by + SupportedLanguages. The format of + SupportedLanguages must follow the language format assumed in the HII Database. @retval 0 The string could not be added or updated in the String Package. @@ -130,21 +130,21 @@ HiiSetString ( /** Retrieves a string from a string package in a specific language. If the language - is not specified, then a string from a string package in the current platform - language is retrieved. If the string cannot be retrieved using the specified - language or the current platform language, then the string is retrieved from - the string package in the first language the string package supports. The - returned string is allocated using AllocatePool(). The caller is responsible + is not specified, then a string from a string package in the current platform + language is retrieved. If the string cannot be retrieved using the specified + language or the current platform language, then the string is retrieved from + the string package in the first language the string package supports. The + returned string is allocated using AllocatePool(). The caller is responsible for freeing the allocated buffer using FreePool(). - + If HiiHandle is NULL, then ASSERT(). If StringId is 0, then ASSERT(). @param[in] HiiHandle A handle that was previously registered in the HII Database. - @param[in] StringId The identifier of the string to retrieved from the string + @param[in] StringId The identifier of the string to retrieved from the string package associated with HiiHandle. - @param[in] Language The language of the string to retrieve. If this parameter - is NULL, then the current platform language is used. The + @param[in] Language The language of the string to retrieve. If this parameter + is NULL, then the current platform language is used. The format of Language must follow the language format assumed in the HII Database. @@ -162,24 +162,24 @@ HiiGetString ( ; /** - Retrieves a string from a string package named by GUID, in the specified language. - If the language is not specified, then a string from a string package in the - current platform language is retrieved. If the string cannot be retrieved - using the specified language or the current platform language, then the string - is retrieved from the string package in the first language the string package - supports. The returned string is allocated using AllocatePool(). The caller + Retrieves a string from a string package named by GUID, in the specified language. + If the language is not specified, then a string from a string package in the + current platform language is retrieved. If the string cannot be retrieved + using the specified language or the current platform language, then the string + is retrieved from the string package in the first language the string package + supports. The returned string is allocated using AllocatePool(). The caller is responsible for freeing the allocated buffer using FreePool(). - + If PackageListGuid is NULL, then ASSERT(). If StringId is 0, then ASSERT(). - @param[in] PackageListGuid The GUID of a package list that was previously + @param[in] PackageListGuid The GUID of a package list that was previously registered in the HII Database. - @param[in] StringId The identifier of the string to retrieved from the + @param[in] StringId The identifier of the string to retrieved from the string package associated with PackageListGuid. - @param[in] Language The language of the string to retrieve. If this - parameter is NULL, then the current platform - language is used. The format of Language must + @param[in] Language The language of the string to retrieve. If this + parameter is NULL, then the current platform + language is used. The format of Language must follow the language format assumed in the HII Database. @retval NULL The package list specified by PackageListGuid is not present in the @@ -204,12 +204,12 @@ HiiGetPackageString ( This function allocates the returned array using AllocatePool(). The caller is responsible for freeing the array with FreePool(). - @param[in] PackageListGuid An optional parameter that is used to request + @param[in] PackageListGuid An optional parameter that is used to request HII Handles associated with a specific Package List GUID. If this parameter is NULL, then all the HII Handles in the HII Database are returned. If this parameter is not NULL, - then zero or more HII Handles associated with + then zero or more HII Handles associated with PackageListGuid are returned. @retval NULL No HII handles were found in the HII database @@ -226,7 +226,7 @@ HiiGetHiiHandles ( /** This function allows a caller to extract the form set opcode form the Hii Handle. - The returned buffer is allocated using AllocatePool().The caller is responsible + The returned buffer is allocated using AllocatePool().The caller is responsible for freeing the allocated buffer using FreePool(). @param Handle The HII handle. @@ -248,12 +248,12 @@ HiiGetFormSetFromHiiHandle( ); /** - Retrieves a pointer to a Null-terminated ASCII string containing the list - of languages that an HII handle in the HII Database supports. The returned + Retrieves a pointer to a Null-terminated ASCII string containing the list + of languages that an HII handle in the HII Database supports. The returned string is allocated using AllocatePool(). The caller is responsible for freeing the returned string using FreePool(). The format of the returned string follows the language format assumed in the HII Database. - + If HiiHandle is NULL, then ASSERT(). @param[in] HiiHandle A handle that was previously registered in the HII Database. @@ -273,23 +273,23 @@ HiiGetSupportedLanguages ( ; /** - Allocates and returns a Null-terminated Unicode string using routing + Allocates and returns a Null-terminated Unicode string using routing information that includes a GUID, an optional Unicode string name, and a device - path. The string returned is allocated with AllocatePool(). The caller is + path. The string returned is allocated with AllocatePool(). The caller is responsible for freeing the allocated string with FreePool(). - + The format of a is as follows: GUID=32&NAME=NameLength&PATH=DevicePathSize @param[in] Guid The pointer to an EFI_GUID that is the routing information - GUID. Each of the 16 bytes in Guid is converted to + GUID. Each of the 16 bytes in Guid is converted to a 2 Unicode character hexadecimal string. This is an optional parameter that may be NULL. - @param[in] Name The pointer to a Null-terminated Unicode string that is - the routing information NAME. This is an optional - parameter that may be NULL. Each 16-bit Unicode - character in Name is converted to a 4 character Unicode + @param[in] Name The pointer to a Null-terminated Unicode string that is + the routing information NAME. This is an optional + parameter that may be NULL. Each 16-bit Unicode + character in Name is converted to a 4 character Unicode hexadecimal string. @param[in] DriverHandle The driver handle that supports a Device Path Protocol that is the routing information PATH. Each byte of @@ -311,23 +311,23 @@ HiiConstructConfigHdr ( /** Reset the default value specified by DefaultId to the driver - configuration specified by the Request string. + configuration specified by the Request string. NULL request string support depends on the ExportConfig interface of HiiConfigRouting protocol in UEFI specification. - - @param Request A null-terminated Unicode string in + + @param Request A null-terminated Unicode string in format. It can be NULL. If it is NULL, all configurations for the entirety of the current HII database will be reset. @param DefaultId Specifies the type of defaults to retrieve. - + @retval TRUE The default value was set successfully. @retval FALSE The default value was not found. **/ BOOLEAN -EFIAPI -HiiSetToDefaults ( +EFIAPI +HiiSetToDefaults ( IN CONST EFI_STRING Request, OPTIONAL IN UINT16 DefaultId ); @@ -337,17 +337,17 @@ HiiSetToDefaults ( NULL request string support depends on the ExportConfig interface of HiiConfigRouting protocol in the UEFI specification. - - @param Request A null-terminated Unicode string in + + @param Request A null-terminated Unicode string in format. It can be NULL. If it is NULL, all current configurations for the entirety of the current HII database will be validated. - + @retval TRUE The current configuration is valid. @retval FALSE The current configuration is invalid. **/ BOOLEAN -EFIAPI +EFIAPI HiiValidateSettings ( IN CONST EFI_STRING Request OPTIONAL ); @@ -377,11 +377,11 @@ HiiIsConfigHdrMatch ( Retrieves uncommitted data from the Form Browser and converts it to a binary buffer. - @param[in] VariableGuid The pointer to an EFI_GUID structure. This is an optional + @param[in] VariableGuid The pointer to an EFI_GUID structure. This is an optional parameter that may be NULL. - @param[in] VariableName The pointer to a Null-terminated Unicode string. This + @param[in] VariableName The pointer to a Null-terminated Unicode string. This is an optional parameter that may be NULL. - @param[in] BufferSize The length in bytes of buffer to hold retrieved data. + @param[in] BufferSize The length in bytes of buffer to hold retrieved data. @param[out] Buffer The buffer of data to be updated. @retval FALSE The uncommitted data could not be retrieved. @@ -411,7 +411,7 @@ HiiGetBrowserData ( @param[in] RequestElement An optional field to specify which part of the buffer data will be send back to Browser. If NULL, the whole buffer of data will be committed to - Browser. + Browser. ::= &OFFSET=&WIDTH=* @retval FALSE The uncommitted data could not be updated. @@ -436,9 +436,9 @@ HiiSetBrowserData ( /** Returns a UINT64 value that contains bitfields for Hour, Minute, and Second. - The lower 8-bits of Hour are placed in bits 0..7. The lower 8-bits of Minute - are placed in bits 8..15, and the lower 8-bits of Second are placed in bits - 16..23. This format was selected because it can be easily translated to + The lower 8-bits of Hour are placed in bits 0..7. The lower 8-bits of Minute + are placed in bits 8..15, and the lower 8-bits of Second are placed in bits + 16..23. This format was selected because it can be easily translated to an EFI_HII_TIME structure in an EFI_IFR_TYPE_VALUE union. @param Hour The hour value to be encoded. @@ -452,9 +452,9 @@ HiiSetBrowserData ( /** Returns a UINT64 value that contains bit fields for Year, Month, and Day. - The lower 16-bits of Year are placed in bits 0..15. The lower 8-bits of Month - are placed in bits 16..23, and the lower 8-bits of Day are placed in bits - 24..31. This format was selected because it can be easily translated to + The lower 16-bits of Year are placed in bits 0..15. The lower 8-bits of Month + are placed in bits 16..23, and the lower 8-bits of Day are placed in bits + 24..31. This format was selected because it can be easily translated to an EFI_HII_DATE structure in an EFI_IFR_TYPE_VALUE union. @param Year The year value to be encoded. @@ -467,7 +467,7 @@ HiiSetBrowserData ( (UINT64)((Year & 0xffff) | ((Month & 0xff) << 16) | ((Day & 0xff) << 24)) /** - Allocates and returns a new OpCode Handle. OpCode Handles must be freed with + Allocates and returns a new OpCode Handle. OpCode Handles must be freed with HiiFreeOpCodeHandle(). @retval NULL There are not enough resources to allocate a new OpCode Handle. @@ -595,14 +595,14 @@ HiiCreateDefaultOpCode ( @param[in] OpCodeHandle The handle to the buffer of opcodes. @param[in] Guid The pointer to EFI_GUID of this guided opcode. - @param[in] GuidOpCode The pointer to an EFI_IFR_GUID opcode. This is an + @param[in] GuidOpCode The pointer to an EFI_IFR_GUID opcode. This is an optional parameter that may be NULL. If this - parameter is NULL, then the GUID extension + parameter is NULL, then the GUID extension region of the created opcode is filled with zeros. - If this parameter is not NULL, then the GUID - extension region of GuidData will be copied to + If this parameter is not NULL, then the GUID + extension region of GuidData will be copied to the GUID extension region of the created opcode. - @param[in] OpCodeSize The size, in bytes, of created opcode. This value + @param[in] OpCodeSize The size, in bytes, of created opcode. This value must be >= sizeof(EFI_IFR_GUID). @retval NULL There is not enough space left in Buffer to add the opcode. @@ -705,7 +705,7 @@ HiiCreateGotoOpCode ( /** Create EFI_IFR_REF_OP, EFI_IFR_REF2_OP, EFI_IFR_REF3_OP and EFI_IFR_REF4_OP opcode. - When RefDevicePath is not zero, EFI_IFR_REF4 opcode will be created. + When RefDevicePath is not zero, EFI_IFR_REF4 opcode will be created. When RefDevicePath is zero and RefFormSetId is not NULL, EFI_IFR_REF3 opcode will be created. When RefDevicePath is zero, RefFormSetId is NULL and RefQuestionId is not zero, EFI_IFR_REF2 opcode will be created. When RefDevicePath is zero, RefFormSetId is NULL and RefQuestionId is zero, EFI_IFR_REF opcode will be created. @@ -719,11 +719,11 @@ HiiCreateGotoOpCode ( @param[in] Help The string ID for Help. @param[in] QuestionFlags The flags in Question Header @param[in] QuestionId Question ID. - @param[in] RefQuestionId The question on the form to which this link is referring. + @param[in] RefQuestionId The question on the form to which this link is referring. If its value is zero, then the link refers to the top of the form. - @param[in] RefFormSetId The form set to which this link is referring. If its value is NULL, and RefDevicePath is + @param[in] RefFormSetId The form set to which this link is referring. If its value is NULL, and RefDevicePath is zero, then the link is to the current form set. - @param[in] RefDevicePath The string identifier that specifies the string containing the text representation of + @param[in] RefDevicePath The string identifier that specifies the string containing the text representation of the device path to which the form set containing the form specified by FormId. If its value is zero, then the link refers to the current page. @@ -1050,26 +1050,26 @@ HiiCreateTimeOpCode ( ); /** - This function updates a form that has previously been registered with the HII + This function updates a form that has previously been registered with the HII Database. This function will perform at most one update operation. - - The form to update is specified by Handle, FormSetGuid, and FormId. Binary - comparisons of IFR opcodes are performed from the beginning of the form being - updated until an IFR opcode is found that exactly matches the first IFR opcode + + The form to update is specified by Handle, FormSetGuid, and FormId. Binary + comparisons of IFR opcodes are performed from the beginning of the form being + updated until an IFR opcode is found that exactly matches the first IFR opcode specified by StartOpCodeHandle. The following rules are used to determine if an insert, replace, or delete operation is performed: - - 1) If no matches are found, then NULL is returned. + + 1) If no matches are found, then NULL is returned. 2) If a match is found, and EndOpCodeHandle is NULL, then all of the IFR opcodes - from StartOpCodeHandle except the first opcode are inserted immediately after + from StartOpCodeHandle except the first opcode are inserted immediately after the matching IFR opcode in the form to be updated. - 3) If a match is found, and EndOpCodeHandle is not NULL, then a search is made - from the matching IFR opcode until an IFR opcode exactly matches the first + 3) If a match is found, and EndOpCodeHandle is not NULL, then a search is made + from the matching IFR opcode until an IFR opcode exactly matches the first IFR opcode specified by EndOpCodeHandle. If no match is found for the first IFR opcode specified by EndOpCodeHandle, then NULL is returned. If a match - is found, then all of the IFR opcodes between the start match and the end + is found, then all of the IFR opcodes between the start match and the end match are deleted from the form being updated and all of the IFR opcodes - from StartOpCodeHandle except the first opcode are inserted immediately after + from StartOpCodeHandle except the first opcode are inserted immediately after the matching start IFR opcode. If StartOpCcodeHandle only contains one IFR instruction, then the result of this operation will delete all of the IFR opcodes between the start end matches. @@ -1082,26 +1082,26 @@ HiiCreateTimeOpCode ( is an optional parameter that may be NULL. If it is NULL, all FormSet will be updated. @param[in] FormId The ID of the form to update. - @param[in] StartOpCodeHandle An OpCode Handle that contains the set of IFR + @param[in] StartOpCodeHandle An OpCode Handle that contains the set of IFR opcodes to be inserted or replaced in the form. - The first IFR instruction in StartOpCodeHandle - is used to find matching IFR opcode in the - form. + The first IFR instruction in StartOpCodeHandle + is used to find matching IFR opcode in the + form. @param[in] EndOpCodeHandle An OpCcode Handle that contains the IFR opcode that marks the end of a replace operation in the form. This is an optional parameter that may be NULL. If it is NULL, then the IFR - opcodes specified by StartOpCodeHandle are + opcodes specified by StartOpCodeHandle are inserted into the form. - + @retval EFI_OUT_OF_RESOURCES Not enough memory resources are allocated. @retval EFI_NOT_FOUND The following cases will return EFI_NOT_FOUND: - 1) The form specified by HiiHandle, FormSetGuid, + 1) The form specified by HiiHandle, FormSetGuid, and FormId could not be found in the HII Database. 2) No IFR opcodes in the target form match the first IFR opcode in StartOpCodeHandle. - 3) EndOpCOde is not NULL, and no IFR opcodes in the - target form following a matching start opcode match + 3) EndOpCOde is not NULL, and no IFR opcodes in the + target form following a matching start opcode match the first IFR opcode in EndOpCodeHandle. @retval EFI_SUCCESS The matched form is updated by StartOpcode. diff --git a/MdeModulePkg/Include/Library/HttpLib.h b/MdeModulePkg/Include/Library/HttpLib.h index 9975aea676..d3d7735d89 100644 --- a/MdeModulePkg/Include/Library/HttpLib.h +++ b/MdeModulePkg/Include/Library/HttpLib.h @@ -2,7 +2,7 @@ This library is used to share code between UEFI network stack modules. It provides the helper routines to parse the HTTP message byte stream. -Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -22,10 +22,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** Decode a percent-encoded URI component to the ASCII character. - - Decode the input component in Buffer according to RFC 3986. The caller is responsible to make + + Decode the input component in Buffer according to RFC 3986. The caller is responsible to make sure ResultBuffer points to a buffer with size equal or greater than ((AsciiStrSize (Buffer)) - in bytes. + in bytes. @param[in] Buffer The pointer to a percent-encoded URI component. @param[in] BufferLength Length of Buffer in bytes. @@ -34,7 +34,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @retval EFI_SUCCESS Successfully decoded the URI. @retval EFI_INVALID_PARAMETER Buffer is not a valid percent-encoded string. - + **/ EFI_STATUS EFIAPI @@ -61,7 +61,7 @@ UriPercentDecode ( @retval EFI_SUCCESS Successfully dereferenced the HTTP URL. @retval EFI_INVALID_PARAMETER UrlParser is NULL or Url is not a valid HTTP URL. @retval EFI_OUT_OF_RESOURCES Could not allocate needed resources. - + **/ EFI_STATUS EFIAPI @@ -86,7 +86,7 @@ HttpParseUrl ( @retval EFI_INVALID_PARAMETER Uri is NULL or HostName is NULL or UrlParser is invalid. @retval EFI_NOT_FOUND No hostName component in the URL. @retval EFI_OUT_OF_RESOURCES Could not allocate needed resources. - + **/ EFI_STATUS EFIAPI @@ -109,7 +109,7 @@ HttpUrlGetHostName ( @retval EFI_INVALID_PARAMETER Uri is NULL or Ip4Address is NULL or UrlParser is invalid. @retval EFI_NOT_FOUND No IPv4 address component in the URL. @retval EFI_OUT_OF_RESOURCES Could not allocate needed resources. - + **/ EFI_STATUS EFIAPI @@ -132,7 +132,7 @@ HttpUrlGetIp4 ( @retval EFI_INVALID_PARAMETER Uri is NULL or Ip6Address is NULL or UrlParser is invalid. @retval EFI_NOT_FOUND No IPv6 address component in the URL. @retval EFI_OUT_OF_RESOURCES Could not allocate needed resources. - + **/ EFI_STATUS EFIAPI @@ -155,7 +155,7 @@ HttpUrlGetIp6 ( @retval EFI_INVALID_PARAMETER Uri is NULL or Port is NULL or UrlParser is invalid. @retval EFI_NOT_FOUND No port number in the URL. @retval EFI_OUT_OF_RESOURCES Could not allocate needed resources. - + **/ EFI_STATUS EFIAPI @@ -179,7 +179,7 @@ HttpUrlGetPort ( @retval EFI_INVALID_PARAMETER Uri is NULL or HostName is NULL or UrlParser is invalid. @retval EFI_NOT_FOUND No hostName component in the URL. @retval EFI_OUT_OF_RESOURCES Could not allocate needed resources. - + **/ EFI_STATUS EFIAPI @@ -193,7 +193,7 @@ HttpUrlGetPath ( Release the resource of the URL parser. @param[in] UrlParser Pointer to the parser. - + **/ VOID EFIAPI @@ -231,7 +231,7 @@ typedef enum { @retval EFI_SUCCESS Continue to parser the message body. @retval Others Abort the parse. - + **/ typedef EFI_STATUS @@ -288,7 +288,7 @@ HttpInitMsgParser ( @retval EFI_INVALID_PARAMETER MsgParser is NULL or Body is NULL or BodyLength is 0. @retval EFI_ABORTED Operation aborted. @retval Other Error happened while parsing message body. - + **/ EFI_STATUS EFIAPI @@ -324,7 +324,7 @@ HttpIsMessageComplete ( @retval EFI_SUCCESS Successfully to get the entity length. @retval EFI_NOT_READY Entity length is not valid yet. @retval EFI_INVALID_PARAMETER MsgParser is NULL or ContentLength is NULL. - + **/ EFI_STATUS EFIAPI @@ -337,7 +337,7 @@ HttpGetEntityLength ( Release the resource of the message parser. @param[in] MsgParser Pointer to the message parser. - + **/ VOID EFIAPI diff --git a/MdeModulePkg/Include/Library/IpIoLib.h b/MdeModulePkg/Include/Library/IpIoLib.h index 61653b0418..fe136c16fc 100644 --- a/MdeModulePkg/Include/Library/IpIoLib.h +++ b/MdeModulePkg/Include/Library/IpIoLib.h @@ -2,13 +2,13 @@ This library is only intended to be used by UEFI network stack modules. It provides the combined IpIo layer on the EFI IP4 Protocol and EFI IP6 protocol. -Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -22,7 +22,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include // -// type and code define for ICMP protocol error +// type and code define for ICMP protocol error // from IP // #define ICMP_TYPE_UNREACH 3 @@ -48,20 +48,20 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. Get the IP header length from the struct EFI_IP4_HEADER. HeaderLength is Internet header length in 32-bit words, so HeaderLength<<2 is the real length of IP header. - + @param[out] HdrPtr A pointer to EFI_IP4_HEADER. - + @return The IP header length. **/ #define EFI_IP4_HEADER_LEN(HdrPtr) ((HdrPtr)->HeaderLength << 2) /** - To types of ICMP error which consist of ICMP header, IP header and original - datagram's data, get length from sum of ICMP header length, IP header length + To types of ICMP error which consist of ICMP header, IP header and original + datagram's data, get length from sum of ICMP header length, IP header length and first 64 bits of datagram's data length. - + @param[in] IpHdr A pointer to EFI_IP4_HEADER. - + @return The ICMP error length. **/ #define ICMP_ERRLEN(IpHdr) \ @@ -69,15 +69,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** Get the packet header from NET_BUF. - + @param[out] Buf A pointer to NET_BUF. @param[in] Type Header type. - + @return The pointer to packet header. **/ #define NET_PROTO_HDR(Buf, Type) ((Type *) ((Buf)->BlockOp[0].Head)) - + extern EFI_IP4_CONFIG_DATA mIp4IoDefaultIpConfigData; extern EFI_IP6_CONFIG_DATA mIp6IoDefaultIpConfigData; @@ -165,8 +165,8 @@ typedef struct _EFI_NET_SESSION_DATA { EFI_IP_ADDRESS Source; ///< Source IP of the received packet. EFI_IP_ADDRESS Dest; ///< Destination IP of the received packet. IP_IO_IP_HEADER IpHdr; ///< IP header of the received packet. - UINT32 IpHdrLen; ///< IP header length of the received packet. - ///< For IPv6, it includes the IP6 header + UINT32 IpHdrLen; ///< IP header length of the received packet. + ///< For IPv6, it includes the IP6 header ///< length and extension header length. For ///< IPv4, it includes the IP4 header length ///< and options length. @@ -175,19 +175,19 @@ typedef struct _EFI_NET_SESSION_DATA { /** The prototype is called back when an IP packet is received. - + @param[in] Status The result of the receive request. @param[in] IcmpErr Valid when Status is EFI_ICMP_ERROR. @param[in] NetSession The IP session for the received packet. @param[in] Pkt The packet received. @param[in] Context The data provided by the user for the received packet when the callback is registered in IP_IO_OPEN_DATA::RcvdContext. - + **/ typedef VOID (EFIAPI *PKT_RCVD_NOTIFY) ( - IN EFI_STATUS Status, + IN EFI_STATUS Status, IN UINT8 IcmpErr, IN EFI_NET_SESSION_DATA *NetSession, IN NET_BUF *Pkt, @@ -196,14 +196,14 @@ VOID /** The prototype is called back when an IP packet is sent. - + @param[in] Status Result of the IP packet being sent. @param[in] Context The data provided by user for the received packet when the callback is registered in IP_IO_OPEN_DATA::SndContext. - @param[in] Sender A Union type to specify a pointer of EFI_IP4_PROTOCOL + @param[in] Sender A Union type to specify a pointer of EFI_IP4_PROTOCOL or EFI_IP6_PROTOCOL. @param[in] NotifyData The Context data specified when calling IpIoSend() - + **/ typedef VOID @@ -228,7 +228,7 @@ typedef struct _IP_IO { /// The list used to maintain the IP instance for different sending purpose. /// LIST_ENTRY IpList; - + EFI_HANDLE Controller; EFI_HANDLE Image; EFI_HANDLE ChildHandle; @@ -246,7 +246,7 @@ typedef struct _IP_IO { /// /// Token and event used to get data from IP. /// - IP_IO_IP_COMPLETION_TOKEN RcvToken; + IP_IO_IP_COMPLETION_TOKEN RcvToken; /// /// List entry used to link the token passed to IP_IO. @@ -312,7 +312,7 @@ typedef struct _IP_IO_IP_INFO { Create a new IP_IO instance. If IpVersion is not IP_VERSION_4 or IP_VERSION_6, then ASSERT(). - + This function uses IP4/IP6 service binding protocol in Controller to create an IP4/IP6 child (aka IP4/IP6 instance). @@ -321,7 +321,7 @@ typedef struct _IP_IO_IP_INFO { @param[in] Controller The controller handle that has IP4 or IP6 service binding protocol installed. @param[in] IpVersion The version of the IP protocol to use, either - IPv4 or IPv6. + IPv4 or IPv6. @return The pointer to a newly created IP_IO instance, or NULL if failed. @@ -336,7 +336,7 @@ IpIoCreate ( /** Destroy an IP_IO instance. - + This function is paired with IpIoCreate(). The IP_IO will be closed first. Resource will be freed afterwards. See IpIoClose(). @@ -357,7 +357,7 @@ IpIoDestroy ( Stop an IP_IO instance. If Ip version is not IP_VERSION_4 or IP_VERSION_6, then ASSERT(). - + This function is paired with IpIoOpen(). The IP_IO will be unconfigured, and all pending send/receive tokens will be canceled. @@ -390,7 +390,7 @@ IpIoStop ( @retval EFI_SUCCESS The IP_IO instance opened with OpenData successfully. - @retval EFI_ACCESS_DENIED The IP_IO instance is configured, avoid to + @retval EFI_ACCESS_DENIED The IP_IO instance is configured, avoid to reopen it. @retval EFI_UNSUPPORTED IPv4 RawData mode is no supported. @retval EFI_INVALID_PARAMETER Invalid input parameter. @@ -406,7 +406,7 @@ IpIoOpen ( /** Send out an IP packet. - + This function is called after IpIoOpen(). The data to be sent is wrapped in Pkt. The IP instance wrapped in IpIo is used for sending by default but can be overriden by Sender. Other sending configs, like source address and gateway @@ -464,7 +464,7 @@ IpIoCancelTxToken ( If IpIo is NULL, then ASSERT(). If Ip version is not IP_VERSION_4 or IP_VERSION_6, then ASSERT(). - + The function is used to add the IP_IO to the IP_IO sending list. The caller can later use IpIoFindSender() to get the IP_IO and call IpIoSend() to send data. @@ -488,7 +488,7 @@ IpIoAddIp ( If Ip version is not IP_VERSION_4 or IP_VERSION_6, then ASSERT(). @param[in, out] IpInfo The pointer to the IP_IO_IP_INFO instance. - @param[in, out] IpConfigData The IP4 or IP6 configure data used to configure + @param[in, out] IpConfigData The IP4 or IP6 configure data used to configure the IP instance. If NULL, the IP instance is reset. If UseDefaultAddress is set to TRUE, and the configure operation succeeds, the default address information @@ -510,8 +510,8 @@ IpIoConfigIp ( Destroy an IP instance maintained in IpIo->IpList for sending purpose. - If Ip version is not IP_VERSION_4 or IP_VERSION_6, then ASSERT(). - + If Ip version is not IP_VERSION_4 or IP_VERSION_6, then ASSERT(). + This function pairs with IpIoAddIp(). The IpInfo is previously created by IpIoAddIp(). The IP_IO_IP_INFO::RefCnt is decremented and the IP instance will be dstroyed if the RefCnt is zero. @@ -530,7 +530,7 @@ IpIoRemoveIp ( /** Find the first IP protocol maintained in IpIo whose local address is the same as Src. - + This function is called when the caller needs the IpIo to send data to the specified Src. The IpIo was added previously by IpIoAddIp(). @@ -553,13 +553,13 @@ IpIoFindSender ( /** Get the ICMP error map information. - + The ErrorStatus will be returned. The IsHard and Notify are optional. If they are not NULL, this routine will fill them. @param[in] IcmpError IcmpError Type. @param[in] IpVersion The version of the IP protocol to use, - either IPv4 or IPv6. + either IPv4 or IPv6. @param[out] IsHard If TRUE, indicates that it is a hard error. @param[out] Notify If TRUE, SockError needs to be notified. @@ -580,23 +580,23 @@ IpIoGetIcmpErrStatus ( Refresh the remote peer's Neighbor Cache entries. This function is called when the caller needs the IpIo to refresh the existing - IPv6 neighbor cache entries since the neighbor is considered reachable by the - node has recently received a confirmation that packets sent recently to the - neighbor were received by its IP layer. + IPv6 neighbor cache entries since the neighbor is considered reachable by the + node has recently received a confirmation that packets sent recently to the + neighbor were received by its IP layer. @param[in] IpIo The pointer to an IP_IO instance @param[in] Neighbor The IP address of the neighbor @param[in] Timeout The time in 100-ns units that this entry will - remain in the neighbor cache. A value of - zero means that the entry is permanent. - A value of non-zero means that the entry is + remain in the neighbor cache. A value of + zero means that the entry is permanent. + A value of non-zero means that the entry is dynamic and will be deleted after Timeout. @retval EFI_SUCCESS The operation completed successfully. @retval EFI_NOT_STARTED The IpIo is not configured. @retval EFI_INVALID_PARAMETER The Neighbor Address is invalid. - @retval EFI_NOT_FOUND The neighbor cache entry is not in the - neighbor table. + @retval EFI_NOT_FOUND The neighbor cache entry is not in the + neighbor table. @retval EFI_UNSUPPORTED IP version is IPv4, which doesn't support neighbor cache refresh. @retval EFI_OUT_OF_RESOURCES Failed due to resource limitations. @@ -606,7 +606,7 @@ EFIAPI IpIoRefreshNeighbor ( IN IP_IO *IpIo, IN EFI_IP_ADDRESS *Neighbor, - IN UINT32 Timeout + IN UINT32 Timeout ); #endif diff --git a/MdeModulePkg/Include/Library/LockBoxLib.h b/MdeModulePkg/Include/Library/LockBoxLib.h index 80beb4d0f8..5921731419 100644 --- a/MdeModulePkg/Include/Library/LockBoxLib.h +++ b/MdeModulePkg/Include/Library/LockBoxLib.h @@ -109,7 +109,7 @@ UpdateLockBox ( @retval RETURN_SUCCESS the information is restored successfully. @retval RETURN_INVALID_PARAMETER the Guid is NULL, or one of Buffer and Length is NULL. - @retval RETURN_WRITE_PROTECTED Buffer and Length are NULL, but the LockBox has no + @retval RETURN_WRITE_PROTECTED Buffer and Length are NULL, but the LockBox has no LOCK_BOX_ATTRIBUTE_RESTORE_IN_PLACE attribute. @retval RETURN_BUFFER_TOO_SMALL the Length is too small to hold the confidential information. @retval RETURN_NOT_FOUND the requested GUID not found. diff --git a/MdeModulePkg/Include/Library/MemoryProfileLib.h b/MdeModulePkg/Include/Library/MemoryProfileLib.h index 8543801391..dd2b3aaad1 100644 --- a/MdeModulePkg/Include/Library/MemoryProfileLib.h +++ b/MdeModulePkg/Include/Library/MemoryProfileLib.h @@ -1,14 +1,14 @@ /** @file Provides services to record memory profile of multilevel caller. - Copyright (c) 2016, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php. - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php. + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Include/Library/NetLib.h b/MdeModulePkg/Include/Library/NetLib.h index b0bbaf22a7..ef7bc429c1 100644 --- a/MdeModulePkg/Include/Library/NetLib.h +++ b/MdeModulePkg/Include/Library/NetLib.h @@ -52,7 +52,7 @@ typedef UINT16 TCP_PORTNO; #define IP4_MASK_NUM 33 #define IP6_PREFIX_NUM 129 -#define IP4_MASK_MAX 32 +#define IP4_MASK_MAX 32 #define IP6_PREFIX_MAX 128 #define IP6_HOP_BY_HOP 0 @@ -416,14 +416,14 @@ NetGetIpClass ( /** Check whether the IP is a valid unicast address according to - the netmask. + the netmask. ASSERT if NetMask is zero. - + If all bits of the host address of IP are 0 or 1, IP is also not a valid unicast address, except when the originator is one of the endpoints of a point-to-point link with a 31-bit mask (RFC3021). - + @param[in] Ip The IP to check against. @param[in] NetMask The mask of the IP. @@ -593,7 +593,7 @@ NetPutUint32 ( /** Initialize a random seed using current time and monotonic count. - Get current time and monotonic count first. Then initialize a random seed + Get current time and monotonic count first. Then initialize a random seed based on some basic mathematics operation on the hour, day, minute, second, nanosecond and year of the current time and the monotonic count value. @@ -729,7 +729,7 @@ NetListInsertBefore ( /** Callback function which provided by user to remove one node in NetDestroyLinkList process. - + @param[in] Entry The entry to be removed. @param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList. @@ -753,7 +753,7 @@ EFI_STATUS If it has been removed, then restart the traversal from the head. If it hasn't been removed, then continue with the next node directly. This function will end the iterate and return the CallBack's last return value if error happens, - or retrun EFI_SUCCESS if 2 complete passes are made with no changes in the number of children in the list. + or retrun EFI_SUCCESS if 2 complete passes are made with no changes in the number of children in the list. @param[in] List The head of the list. @param[in] CallBack Pointer to the callback function to destroy one node in the list. @@ -1255,8 +1255,8 @@ NetLibGetMacString ( GET_STATUS command (PXE_STATFLAGS_GET_STATUS_NO_MEDIA_SUPPORTED). This routine will try to invoke Snp->GetStatus() to get the media status. If media is already present, it returns directly. If media is not present, it will stop SNP and then - restart SNP to get the latest media status. This provides an opportunity to get - the correct media status for old UNDI driver, which doesn't support reporting + restart SNP to get the latest media status. This provides an opportunity to get + the correct media status for old UNDI driver, which doesn't support reporting media status from GET_STATUS command. Note: there are two limitations for the current algorithm: 1) For UNDI with this capability, when the cable is not attached, there will @@ -1284,13 +1284,13 @@ NetLibDetectMedia ( ); /** - Detect media state for a network device. This routine will wait for a period of time at - a specified checking interval when a certain network is under connecting until connection + Detect media state for a network device. This routine will wait for a period of time at + a specified checking interval when a certain network is under connecting until connection process finishes or timeout. If Aip protocol is supported by low layer drivers, three kinds of media states can be detected: EFI_SUCCESS, EFI_NOT_READY and EFI_NO_MEDIA, represents - connected state, connecting state and no media state respectively. When function detects - the current state is EFI_NOT_READY, it will loop to wait for next time's check until state - turns to be EFI_SUCCESS or EFI_NO_MEDIA. If Aip protocol is not supported, function will + connected state, connecting state and no media state respectively. When function detects + the current state is EFI_NOT_READY, it will loop to wait for next time's check until state + turns to be EFI_SUCCESS or EFI_NO_MEDIA. If Aip protocol is not supported, function will call NetLibDetectMedia() and return state directly. @param[in] ServiceHandle The handle where network service binding protocols are @@ -1301,7 +1301,7 @@ NetLibDetectMedia ( @param[out] MediaState The pointer to the detected media state. @retval EFI_SUCCESS Media detection success. - @retval EFI_INVALID_PARAMETER ServiceHandle is not a valid network device handle or + @retval EFI_INVALID_PARAMETER ServiceHandle is not a valid network device handle or MediaState pointer is NULL. @retval EFI_DEVICE_ERROR A device error occurred. @retval EFI_TIMEOUT Network is connecting but timeout. @@ -1522,14 +1522,14 @@ NetLibStrToIp6andPrefix ( Convert one EFI_IPv6_ADDRESS to Null-terminated Unicode string. The text representation of address is defined in RFC 4291. - + @param[in] Ip6Address The pointer to the IPv6 address. @param[out] String The buffer to return the converted string. @param[in] StringSize The length in bytes of the input String. - + @retval EFI_SUCCESS Convert to string successfully. @retval EFI_INVALID_PARAMETER The input parameter is invalid. - @retval EFI_BUFFER_TOO_SMALL The BufferSize is too small for the result. BufferSize has been + @retval EFI_BUFFER_TOO_SMALL The BufferSize is too small for the result. BufferSize has been updated with the size needed to complete the request. **/ EFI_STATUS @@ -1862,7 +1862,7 @@ NetbufAllocSpace ( @param[in, out] Nbuf The pointer to the net buffer. @param[in] Len The length of the data to be trimmed. - @param[in] FromHead The flag to indicate whether trim data is from the + @param[in] FromHead The flag to indicate whether trim data is from the head (TRUE) or the tail (FALSE). @return The length of the actual trimmed data, which may be less @@ -2213,11 +2213,11 @@ NetIp6PseudoHeadChecksum ( ); /** - The function frees the net buffer which allocated by the IP protocol. It releases - only the net buffer and doesn't call the external free function. + The function frees the net buffer which allocated by the IP protocol. It releases + only the net buffer and doesn't call the external free function. - This function should be called after finishing the process of mIpSec->ProcessExt() - for outbound traffic. The (EFI_IPSEC2_PROTOCOL)->ProcessExt() allocates a new + This function should be called after finishing the process of mIpSec->ProcessExt() + for outbound traffic. The (EFI_IPSEC2_PROTOCOL)->ProcessExt() allocates a new buffer for the ESP, so there needs a function to free the old net buffer. @param[in] Nbuf The network buffer to be freed. @@ -2250,18 +2250,18 @@ NetLibGetSystemGuid ( If DomainName is NULL, then ASSERT(). - QName is a domain name represented as a sequence of labels, - where each label consists of a length octet followed by that - number of octets. The QName terminates with the zero - length octet for the null label of the root. Caller should + QName is a domain name represented as a sequence of labels, + where each label consists of a length octet followed by that + number of octets. The QName terminates with the zero + length octet for the null label of the root. Caller should take responsibility to free the buffer in returned pointer. - @param DomainName The pointer to the queried domain name string. + @param DomainName The pointer to the queried domain name string. @retval NULL Failed to fill QName. @return QName filled successfully. - -**/ + +**/ CHAR8 * EFIAPI NetLibCreateDnsQName ( diff --git a/MdeModulePkg/Include/Library/OemHookStatusCodeLib.h b/MdeModulePkg/Include/Library/OemHookStatusCodeLib.h index edd370deb6..e82db854d6 100644 --- a/MdeModulePkg/Include/Library/OemHookStatusCodeLib.h +++ b/MdeModulePkg/Include/Library/OemHookStatusCodeLib.h @@ -1,14 +1,14 @@ /** @file - OEM hook status code library. Platform can implement an instance to + OEM hook status code library. Platform can implement an instance to initialize the OEM devices to report status code information. -Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -22,7 +22,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @return Status of initialization of OEM status code device. - + **/ EFI_STATUS EFIAPI @@ -32,36 +32,36 @@ OemHookStatusCodeInitialize ( /** Report status code to OEM device. - - @param CodeType Indicates the type of status code being reported. - - @param Value Describes the current status of a hardware or software entity. - This includes both an operation and classification information + + @param CodeType Indicates the type of status code being reported. + + @param Value Describes the current status of a hardware or software entity. + This includes both an operation and classification information about the class and subclass. - For progress codes, the operation is the current activity. - For error codes, it is the exception. For debug codes, - it is not defined at this time. - Specific values are discussed in the Intel Platform Innovation + For progress codes, the operation is the current activity. + For error codes, it is the exception. For debug codes, + it is not defined at this time. + Specific values are discussed in the Intel Platform Innovation Framework for EFI Status Code Specification. - - @param Instance The enumeration of a hardware or software entity within the system. - A system may contain multiple entities that match a class/subclass - pairing. - The instance differentiates between them. An instance of 0 - indicates that instance information is unavailable, - not meaningful, or not relevant. Valid instance numbers + + @param Instance The enumeration of a hardware or software entity within the system. + A system may contain multiple entities that match a class/subclass + pairing. + The instance differentiates between them. An instance of 0 + indicates that instance information is unavailable, + not meaningful, or not relevant. Valid instance numbers start with 1. - @param CallerId This optional parameter may be used to identify the caller. - This parameter allows the status code driver to apply - different rules to different callers. - Type EFI_GUID is defined in InstallProtocolInterface() + @param CallerId This optional parameter may be used to identify the caller. + This parameter allows the status code driver to apply + different rules to different callers. + Type EFI_GUID is defined in InstallProtocolInterface() in the UEFI 2.0 Specification. @param Data This optional parameter may be used to pass additional data. - + @return The function always returns EFI_SUCCESS. **/ diff --git a/MdeModulePkg/Include/Library/PlatformBootManagerLib.h b/MdeModulePkg/Include/Library/PlatformBootManagerLib.h index 52745032e4..65630ce2bb 100644 --- a/MdeModulePkg/Include/Library/PlatformBootManagerLib.h +++ b/MdeModulePkg/Include/Library/PlatformBootManagerLib.h @@ -1,8 +1,8 @@ /** @file - Platform Boot Manager library definition. A platform can implement + Platform Boot Manager library definition. A platform can implement instances to support platform-specific behavior. -Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/MdeModulePkg/Include/Library/PlatformHookLib.h b/MdeModulePkg/Include/Library/PlatformHookLib.h index 0f265d49a3..3a42ccd1be 100644 --- a/MdeModulePkg/Include/Library/PlatformHookLib.h +++ b/MdeModulePkg/Include/Library/PlatformHookLib.h @@ -1,15 +1,15 @@ /** @file Platform hook library. Platform can provide an implementation of this - library class to provide hooks that may be required for some type of + library class to provide hooks that may be required for some type of platform initialization. -Copyright (c) 2010, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -20,13 +20,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** Performs platform specific initialization required for the CPU to access the hardware associated with a SerialPortLib instance. This function does - not intiailzie the serial port hardware itself. Instead, it initializes - hardware devices that are required for the CPU to access the serial port + not intiailzie the serial port hardware itself. Instead, it initializes + hardware devices that are required for the CPU to access the serial port hardware. This function may be called more than once. @retval RETURN_SUCCESS The platform specific initialization succeeded. @retval RETURN_DEVICE_ERROR The platform specific initialization could not be completed. - + **/ RETURN_STATUS EFIAPI diff --git a/MdeModulePkg/Include/Library/RecoveryLib.h b/MdeModulePkg/Include/Library/RecoveryLib.h index f49394a822..da5cb771bf 100644 --- a/MdeModulePkg/Include/Library/RecoveryLib.h +++ b/MdeModulePkg/Include/Library/RecoveryLib.h @@ -1,15 +1,15 @@ /** @file - Recovery library class defines a set of methods related recovery boot mode. + Recovery library class defines a set of methods related recovery boot mode. This library class is no longer used and modules using this library should directly locate EFI_PEI_RECOVERY_MODULE_PPI, defined in the PI 1.2 specification. -Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -19,7 +19,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** Calling this function causes the system to carry out a recovery boot path. - + @retval EFI_SUCCESS Recovery boot path succeeded. @retval Others Recovery boot path failure. diff --git a/MdeModulePkg/Include/Library/ResetSystemLib.h b/MdeModulePkg/Include/Library/ResetSystemLib.h index f98c9a6549..55d1923ae1 100644 --- a/MdeModulePkg/Include/Library/ResetSystemLib.h +++ b/MdeModulePkg/Include/Library/ResetSystemLib.h @@ -2,13 +2,13 @@ System reset Library Services. This library class defines a set of methods that reset the whole system. -Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -18,11 +18,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** This function causes a system-wide reset (cold reset), in which - all circuitry within the system returns to its initial state. This type of reset - is asynchronous to system operation and operates without regard to + all circuitry within the system returns to its initial state. This type of reset + is asynchronous to system operation and operates without regard to cycle boundaries. - If this function returns, it means that the system does not support cold reset. + If this function returns, it means that the system does not support cold reset. **/ VOID EFIAPI @@ -31,7 +31,7 @@ ResetCold ( ); /** - This function causes a system-wide initialization (warm reset), in which all processors + This function causes a system-wide initialization (warm reset), in which all processors are set to their initial state. Pending cycles are not corrupted. If this function returns, it means that the system does not support warm reset. @@ -43,9 +43,9 @@ ResetWarm ( ); /** - This function causes the system to enter a power state equivalent + This function causes the system to enter a power state equivalent to the ACPI G2/S5 or G3 states. - + If this function returns, it means that the system does not support shutdown reset. **/ VOID @@ -56,7 +56,7 @@ ResetShutdown ( /** This function causes the system to enter S3 and then wake up immediately. - + If this function returns, it means that the system does not support S3 feature. **/ VOID diff --git a/MdeModulePkg/Include/Library/ResetUtilityLib.h b/MdeModulePkg/Include/Library/ResetUtilityLib.h index c556dca729..b5c2c1492f 100644 --- a/MdeModulePkg/Include/Library/ResetUtilityLib.h +++ b/MdeModulePkg/Include/Library/ResetUtilityLib.h @@ -41,7 +41,7 @@ ResetPlatformSpecificGuid ( /** This function examines the DataSize and ResetData parameters passed to to ResetSystem() and detemrines if the ResetData contains a Null-terminated - Unicode string followed by a GUID specific subtype. If the GUID specific + Unicode string followed by a GUID specific subtype. If the GUID specific subtype is present, then a pointer to the GUID value in ResetData is returned. @param[in] DataSize The size, in bytes, of ResetData. @@ -64,7 +64,7 @@ GetResetPlatformSpecificGuid ( ); /** - This is a helper function that creates the reset data buffer that can be + This is a helper function that creates the reset data buffer that can be passed into ResetSystem(). The reset data buffer is returned in ResetData and contains ResetString diff --git a/MdeModulePkg/Include/Library/S3Lib.h b/MdeModulePkg/Include/Library/S3Lib.h index fcb8abd802..2a309034fa 100644 --- a/MdeModulePkg/Include/Library/S3Lib.h +++ b/MdeModulePkg/Include/Library/S3Lib.h @@ -3,13 +3,13 @@ This library class is no longer used and modules using this library should directly locate EFI_PEI_S3_RESUME_PPI, defined in the PI 1.2 specification. -Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -19,7 +19,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** This function is responsible for calling the S3 resume vector in the ACPI Tables. - + @retval EFI_SUCCESS Successfully restored the configuration from S3. @retval Others Failed to restore the configuration from S3. diff --git a/MdeModulePkg/Include/Library/SecurityManagementLib.h b/MdeModulePkg/Include/Library/SecurityManagementLib.h index de87d09c54..dd4d2e6f75 100644 --- a/MdeModulePkg/Include/Library/SecurityManagementLib.h +++ b/MdeModulePkg/Include/Library/SecurityManagementLib.h @@ -1,15 +1,15 @@ /** @file - This library class defines a set of interfaces to abstract the policy of + This library class defines a set of interfaces to abstract the policy of security measurement by managing the different security measurement services. The library instances can be implemented according to the different security policy. -Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -36,33 +36,33 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #define EFI_AUTH_OPERATION_IMAGE_REQUIRED 0x80000000 /** - The security handler is used to abstract platform-specific policy - from the DXE core response to an attempt to use a file that returns a - given status for the authentication check from the section extraction protocol. + The security handler is used to abstract platform-specific policy + from the DXE core response to an attempt to use a file that returns a + given status for the authentication check from the section extraction protocol. - The possible responses in a given SAP implementation may include locking - flash upon failure to authenticate, attestation logging for all signed drivers, - and other exception operations. The File parameter allows for possible logging + The possible responses in a given SAP implementation may include locking + flash upon failure to authenticate, attestation logging for all signed drivers, + and other exception operations. The File parameter allows for possible logging within the SAP of the driver. - + If File is NULL, then EFI_INVALID_PARAMETER is returned. - If the file specified by File with an authentication status specified by + If the file specified by File with an authentication status specified by AuthenticationStatus is safe for the DXE Core to use, then EFI_SUCCESS is returned. - If the file specified by File with an authentication status specified by - AuthenticationStatus is not safe for the DXE Core to use under any circumstances, + If the file specified by File with an authentication status specified by + AuthenticationStatus is not safe for the DXE Core to use under any circumstances, then EFI_ACCESS_DENIED is returned. - If the file specified by File with an authentication status specified by - AuthenticationStatus is not safe for the DXE Core to use at the time, but it - might be possible to use it at a future time, then EFI_SECURITY_VIOLATION is + If the file specified by File with an authentication status specified by + AuthenticationStatus is not safe for the DXE Core to use at the time, but it + might be possible to use it at a future time, then EFI_SECURITY_VIOLATION is returned. - FileBuffer will be NULL and FileSize will be 0 if the handler being called + FileBuffer will be NULL and FileSize will be 0 if the handler being called did not set EFI_AUTH_OPERATION_IMAGE_REQUIRED when it was registered. - @param[in] AuthenticationStatus + @param[in] AuthenticationStatus The authentication status returned from the security measurement services for the input file. @param[in] File The pointer to the device path of the file that is @@ -83,7 +83,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. used for any purpose. **/ -typedef +typedef EFI_STATUS (EFIAPI *SECURITY_FILE_AUTHENTICATION_STATE_HANDLER)( IN OUT UINT32 AuthenticationStatus, @@ -117,12 +117,12 @@ RegisterSecurityHandler ( Execute registered handlers until one returns an error and that error is returned. If none of the handlers return an error, then EFI_SUCCESS is returned. - Before exectue handler, get the image buffer by file device path if a handler + Before exectue handler, get the image buffer by file device path if a handler requires the image file. And return the image buffer to each handler when exectue handler. The handlers are executed in same order to their registered order. - @param[in] AuthenticationStatus + @param[in] AuthenticationStatus This is the authentication type returned from the Section Extraction protocol. See the Section Extraction Protocol Specification for details on this type. @@ -130,9 +130,9 @@ RegisterSecurityHandler ( being dispatched. This will optionally be used for logging. @retval EFI_SUCCESS The file specified by File authenticated when more - than one security handler services were registered, - or the file did not authenticate when no security - handler service was registered. And the platform policy + than one security handler services were registered, + or the file did not authenticate when no security + handler service was registered. And the platform policy dictates that the DXE Core may use File. @retval EFI_INVALID_PARAMETER File is NULL. @retval EFI_SECURITY_VIOLATION The file specified by File did not authenticate, and @@ -152,13 +152,13 @@ ExecuteSecurityHandlers ( ); /** - The security handler is used to abstracts security-specific functions from the DXE - Foundation of UEFI Image Verification, Trusted Computing Group (TCG) measured boot, - User Identity policy for image loading and consoles, and for purposes of - handling GUIDed section encapsulations. - - @param[in] AuthenticationStatus - The authentication status for the input file. + The security handler is used to abstracts security-specific functions from the DXE + Foundation of UEFI Image Verification, Trusted Computing Group (TCG) measured boot, + User Identity policy for image loading and consoles, and for purposes of + handling GUIDed section encapsulations. + + @param[in] AuthenticationStatus + The authentication status for the input file. @param[in] File The pointer to the device path of the file that is being dispatched. This will optionally be used for logging. @param[in] FileBuffer A pointer to the buffer with the UEFI file image @@ -188,7 +188,7 @@ ExecuteSecurityHandlers ( drivers from the device path specified by DevicePath. The image has been added into the list of the deferred images. **/ -typedef +typedef EFI_STATUS (EFIAPI *SECURITY2_FILE_AUTHENTICATION_HANDLER) ( IN UINT32 AuthenticationStatus, @@ -221,16 +221,16 @@ RegisterSecurity2Handler ( ); /** - Execute registered handlers based on input AuthenticationOperation until - one returns an error and that error is returned. - + Execute registered handlers based on input AuthenticationOperation until + one returns an error and that error is returned. + If none of the handlers return an error, then EFI_SUCCESS is returned. The handlers those satisfy AuthenticationOperation will only be executed. The handlers are executed in same order to their registered order. - @param[in] AuthenticationOperation + @param[in] AuthenticationOperation The operation type specifies which handlers will be executed. - @param[in] AuthenticationStatus + @param[in] AuthenticationStatus The authentication status for the input file. @param[in] File This is a pointer to the device path of the file that is being dispatched. This will optionally be used for logging. @@ -260,7 +260,7 @@ RegisterSecurity2Handler ( @retval EFI_SECURITY_VIOLATION FileBuffer is not NULL and the user has no permission to load drivers from the device path specified by DevicePath. The image has been added into the list of the deferred images. - @retval EFI_INVALID_PARAMETER File and FileBuffer are both NULL. + @retval EFI_INVALID_PARAMETER File and FileBuffer are both NULL. **/ EFI_STATUS EFIAPI diff --git a/MdeModulePkg/Include/Library/SmmCorePlatformHookLib.h b/MdeModulePkg/Include/Library/SmmCorePlatformHookLib.h index 773d0615b7..5771c5156f 100644 --- a/MdeModulePkg/Include/Library/SmmCorePlatformHookLib.h +++ b/MdeModulePkg/Include/Library/SmmCorePlatformHookLib.h @@ -2,13 +2,13 @@ Smm Core Platform Hook Library. This library class defines a set of platform hooks called by the SMM Core. -Copyright (c) 2011, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -18,9 +18,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** Performs platform specific tasks before invoking registered SMI handlers. - + This function performs platform specific tasks before invoking registered SMI handlers. - + @retval EFI_SUCCESS The platform hook completes successfully. @retval Other values The paltform hook cannot complete due to some error. @@ -34,9 +34,9 @@ PlatformHookBeforeSmmDispatch ( /** Performs platform specific tasks after invoking registered SMI handlers. - + This function performs platform specific tasks after invoking registered SMI handlers. - + @retval EFI_SUCCESS The platform hook completes successfully. @retval Other values The paltform hook cannot complete due to some error. @@ -46,5 +46,5 @@ EFIAPI PlatformHookAfterSmmDispatch ( VOID ); - + #endif diff --git a/MdeModulePkg/Include/Library/TcpIoLib.h b/MdeModulePkg/Include/Library/TcpIoLib.h index 22629dbcd5..e73bec2ee2 100644 --- a/MdeModulePkg/Include/Library/TcpIoLib.h +++ b/MdeModulePkg/Include/Library/TcpIoLib.h @@ -2,7 +2,7 @@ This library is used to share code between UEFI network stack modules. It provides the helper routines to access TCP service. -Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at
@@ -85,7 +85,7 @@ typedef struct { EFI_HANDLE Image; EFI_HANDLE Controller; EFI_HANDLE Handle; - + TCP_IO_PROTOCOL Tcp; TCP_IO_PROTOCOL NewTcp; TCP_IO_CONNECTION_TOKEN ConnToken; @@ -93,7 +93,7 @@ typedef struct { TCP_IO_IO_TOKEN RxToken; TCP_IO_CLOSE_TOKEN CloseToken; TCP_IO_LISTEN_TOKEN ListenToken; - + BOOLEAN IsConnDone; BOOLEAN IsTxDone; BOOLEAN IsRxDone; @@ -102,14 +102,14 @@ typedef struct { } TCP_IO; /** - Create a TCP socket with the specified configuration data. + Create a TCP socket with the specified configuration data. @param[in] Image The handle of the driver image. @param[in] Controller The handle of the controller. @param[in] TcpVersion The version of Tcp, TCP_VERSION_4 or TCP_VERSION_6. @param[in] ConfigData The Tcp configuration data. @param[out] TcpIo The TcpIo. - + @retval EFI_SUCCESS The TCP socket is created and configured. @retval EFI_INVALID_PARAMETER One or more parameters are invalid. @retval EFI_UNSUPPORTED One or more of the control options are not @@ -129,7 +129,7 @@ TcpIoCreateSocket ( ); /** - Destroy the socket. + Destroy the socket. @param[in] TcpIo The TcpIo which wraps the socket to be destroyed. @@ -145,7 +145,7 @@ TcpIoDestroySocket ( @param[in, out] TcpIo The TcpIo wrapping the TCP socket. @param[in] Timeout The time to wait for connection done. Set to NULL for infinite wait. - + @retval EFI_SUCCESS Connect to the other endpoint of the TCP socket successfully. @retval EFI_TIMEOUT Failed to connect to the other endpoint of the @@ -169,7 +169,7 @@ TcpIoConnect ( @param[in, out] TcpIo The TcpIo wrapping the TCP socket. @param[in] Timeout The time to wait for connection done. Set to NULL for infinite wait. - + @retval EFI_SUCCESS Connect to the other endpoint of the TCP socket successfully. @retval EFI_INVALID_PARAMETER One or more parameters are invalid. @@ -187,7 +187,7 @@ TcpIoAccept ( IN OUT TCP_IO *TcpIo, IN EFI_EVENT Timeout OPTIONAL ); - + /** Reset the socket. @@ -205,7 +205,7 @@ TcpIoReset ( @param[in] TcpIo The TcpIo wrapping the TCP socket. @param[in] Packet The packet to transmit. - + @retval EFI_SUCCESS The packet is trasmitted. @retval EFI_INVALID_PARAMETER One or more parameters are invalid. @retval EFI_UNSUPPORTED One or more of the control options are not diff --git a/MdeModulePkg/Include/Library/UdpIoLib.h b/MdeModulePkg/Include/Library/UdpIoLib.h index 9bfa80e143..ca65622adf 100644 --- a/MdeModulePkg/Include/Library/UdpIoLib.h +++ b/MdeModulePkg/Include/Library/UdpIoLib.h @@ -49,7 +49,7 @@ typedef struct { This prototype is used by both receive and sending when calling UdpIoRecvDatagram() or UdpIoSendDatagram(). When receiving, Netbuf is allocated by the - UDP access point and released by the user. When sending, the user allocates the the NetBuf, + UDP access point and released by the user. When sending, the user allocates the the NetBuf, which is then provided to the callback as a reference. @param[in] Packet The packet received or sent. @@ -97,7 +97,7 @@ typedef struct { /// This structure is used internally by UdpIo Library. /// /// Each transmit request is wrapped in an UDP_TX_TOKEN. Upon completion, -/// the CallBack will be called. There can be several transmit requests. All transmit +/// the CallBack will be called. There can be several transmit requests. All transmit /// requests are linked in a list. /// diff --git a/MdeModulePkg/Include/Library/UefiBootManagerLib.h b/MdeModulePkg/Include/Library/UefiBootManagerLib.h index 1d862a4b26..bfc0cb86f8 100644 --- a/MdeModulePkg/Include/Library/UefiBootManagerLib.h +++ b/MdeModulePkg/Include/Library/UefiBootManagerLib.h @@ -1,7 +1,7 @@ /** @file Provide Boot Manager related library APIs. -Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -60,14 +60,14 @@ typedef struct { // Used at runtime // EFI_STATUS Status; // Status returned from boot attempt gBS->StartImage () - CHAR16 *ExitData; // Exit data returned from gBS->StartImage () + CHAR16 *ExitData; // Exit data returned from gBS->StartImage () UINTN ExitDataSize; // Size of ExitData } EFI_BOOT_MANAGER_LOAD_OPTION; /** Returns an array of load options based on the EFI variable L"BootOrder"/L"DriverOrder" and the L"Boot####"/L"Driver####" variables impled by it. - #### is the hex value of the UINT16 in each BootOrder/DriverOrder entry. + #### is the hex value of the UINT16 in each BootOrder/DriverOrder entry. @param LoadOptionCount Returns number of entries in the array. @param LoadOptionType The type of the load option. @@ -163,7 +163,7 @@ EfiBootManagerVariableToLoadOption ( /** Create the Boot#### or Driver#### variable from the load option. - + @param LoadOption Pointer to the load option. @retval EFI_SUCCESS The variable was created. @@ -204,9 +204,9 @@ EfiBootManagerAddLoadOptionVariable ( /** Delete the load option according to the OptionNumber and OptionType. - + Only the BootOrder/DriverOrder is updated to remove the reference of the OptionNumber. - + @param OptionNumber Option number of the load option. @param OptionType Type of the load option. @@ -221,7 +221,7 @@ EfiBootManagerDeleteLoadOptionVariable ( ); /** - Sort the load options. The DriverOrder/BootOrder variables will be re-created to + Sort the load options. The DriverOrder/BootOrder variables will be re-created to reflect the new order. @param OptionType The type of the load option. @@ -237,7 +237,7 @@ EfiBootManagerSortLoadOptionVariable ( /** Return the index of the load option in the load option array. - The function consider two load options are equal when the + The function consider two load options are equal when the OptionType, Attributes, Description, FilePath and OptionalData are equal. @param Key Pointer to the load option to be found. @@ -292,7 +292,7 @@ typedef struct { /** Start the hot key service so that the key press can trigger the boot option. - @param HotkeyTriggered Return the waitable event and it will be signaled + @param HotkeyTriggered Return the waitable event and it will be signaled when a valid hot key is pressed. @retval EFI_SUCCESS The hot key service is started. @@ -391,7 +391,7 @@ EfiBootManagerHotkeyBoot ( 3. Non-BlockIo SimpleFileSystem - The boot option points to a device supporting SimpleFileSystem Protocol, but not supporting BlockIo protocol. - 4. LoadFile - The boot option points to the media supporting + 4. LoadFile - The boot option points to the media supporting LoadFile protocol. Reference: UEFI Spec chapter 3.3 Boot Option Variables Default Boot Behavior @@ -407,9 +407,9 @@ EfiBootManagerRefreshAllBootOption ( Attempt to boot the EFI boot option. This routine sets L"BootCurent" and signals the EFI ready to boot event. If the device path for the option starts with a BBS device path a legacy boot is attempted. Short form device paths are - also supported via this rountine. A device path starting with + also supported via this rountine. A device path starting with MEDIA_HARDDRIVE_DP, MSG_USB_WWID_DP, MSG_USB_CLASS_DP gets expaned out - to find the first device that matches. If the BootOption Device Path + to find the first device that matches. If the BootOption Device Path fails the removable media boot algorithm is attempted (\EFI\BOOTIA32.EFI, \EFI\BOOTX64.EFI,... only one file type is tried per processor type) @@ -467,7 +467,7 @@ EfiBootManagerGetLoadOptionBuffer ( ); /** - The function enumerates all the legacy boot options, creates them and + The function enumerates all the legacy boot options, creates them and registers them in the BootOrder variable. **/ typedef @@ -560,7 +560,7 @@ EfiBootManagerConnectAll ( @retval EFI_OUT_OF_RESOURCES There is no resource to create new handles. @retval EFI_NOT_FOUND Create the handle associate with one device path node failed. - @retval EFI_SECURITY_VIOLATION The user has no permission to start UEFI device + @retval EFI_SECURITY_VIOLATION The user has no permission to start UEFI device drivers on the DevicePath. **/ EFI_STATUS @@ -571,8 +571,8 @@ EfiBootManagerConnectDevicePath ( ); /** - This function will disconnect all current system handles. - + This function will disconnect all current system handles. + gBS->DisconnectController() is invoked for each handle exists in system handle buffer. If handle is a bus type handle, all childrens also are disconnected recursively by gBS->DisconnectController(). @@ -656,7 +656,7 @@ EfiBootManagerConnectConsoleVariable ( ); /** - Query all the children of VideoController and return the device paths of all the + Query all the children of VideoController and return the device paths of all the children that support GraphicsOutput protocol. @param VideoController PCI handle of video controller. @@ -698,7 +698,7 @@ typedef struct { EFI_HANDLE ChildHandle; /// - /// Driver health messages of the specify Driver + /// Driver health messages of the specify Driver /// EFI_DRIVER_HEALTH_HII_MESSAGE *MessageList; @@ -756,7 +756,7 @@ EfiBootManagerFreeDriverHealthInfo ( @param LoadOption Pointer to the load option. - @retval EFI_INVALID_PARAMETER The load option type is invalid, + @retval EFI_INVALID_PARAMETER The load option type is invalid, or the load option file path doesn't point to a valid file. @retval EFI_UNSUPPORTED The load option type is of LoadOptionTypeBoot. @retval EFI_SUCCESS The load option is inactive, or successfully loaded and executed. diff --git a/MdeModulePkg/Include/Library/UefiHiiServicesLib.h b/MdeModulePkg/Include/Library/UefiHiiServicesLib.h index 8c8beee555..a2f1b204da 100644 --- a/MdeModulePkg/Include/Library/UefiHiiServicesLib.h +++ b/MdeModulePkg/Include/Library/UefiHiiServicesLib.h @@ -2,15 +2,15 @@ Provides global variables that are pointers to the UEFI HII related protocols. All of the UEFI HII related protocols are optional, so the consumers of this library class must verify that the global variable pointers are not NULL before - use. + use. -Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Include/Ppi/AtaController.h b/MdeModulePkg/Include/Ppi/AtaController.h index 2333bef6aa..a24b496f9c 100644 --- a/MdeModulePkg/Include/Ppi/AtaController.h +++ b/MdeModulePkg/Include/Ppi/AtaController.h @@ -1,8 +1,8 @@ /** @file Define the PPI to abstract the functions that enable IDE and SATA channels, and to retrieve the base I/O port address for each of the enabled IDE and SATA channels. - -Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.
+ +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions @@ -19,7 +19,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #define _PEI_ATA_CONTROLLER_PPI_H_ /// -/// Global ID for the PEI_ATA_CONTROLLER_PPI. +/// Global ID for the PEI_ATA_CONTROLLER_PPI. /// #define PEI_ATA_CONTROLLER_PPI_GUID \ { \ @@ -32,50 +32,50 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. typedef struct _PEI_ATA_CONTROLLER_PPI PEI_ATA_CONTROLLER_PPI; /// -/// This bit is used in the ChannelMask parameter of EnableAtaChannel() to -/// disable the IDE channels. -/// This is designed for old generation chipset with PATA/SATA controllers. -/// It may be ignored in PPI implementation for new generation chipset without PATA controller. +/// This bit is used in the ChannelMask parameter of EnableAtaChannel() to +/// disable the IDE channels. +/// This is designed for old generation chipset with PATA/SATA controllers. +/// It may be ignored in PPI implementation for new generation chipset without PATA controller. /// #define PEI_ICH_IDE_NONE 0x00 /// -/// This bit is used in the ChannelMask parameter of EnableAtaChannel() to +/// This bit is used in the ChannelMask parameter of EnableAtaChannel() to /// enable the Primary IDE channel. -/// This is designed for old generation chipset with PATA/SATA controllers. -/// It may be ignored in PPI implementation for new generation chipset without PATA controller. +/// This is designed for old generation chipset with PATA/SATA controllers. +/// It may be ignored in PPI implementation for new generation chipset without PATA controller. /// #define PEI_ICH_IDE_PRIMARY 0x01 /// -/// This bit is used in the ChannelMask parameter of EnableAtaChannel() to +/// This bit is used in the ChannelMask parameter of EnableAtaChannel() to /// enable the Secondary IDE channel. -/// This is designed for old generation chipset with PATA/SATA controllers. -/// It may be ignored in PPI implementation for new generation chipset without PATA controller. +/// This is designed for old generation chipset with PATA/SATA controllers. +/// It may be ignored in PPI implementation for new generation chipset without PATA controller. /// #define PEI_ICH_IDE_SECONDARY 0x02 /// -/// This bit is used in the ChannelMask parameter of EnableAtaChannel() to +/// This bit is used in the ChannelMask parameter of EnableAtaChannel() to /// disable the SATA channel. -/// This is designed for old generation chipset with PATA/SATA controllers. -/// It may be ignored in PPI implementation for new generation chipset without PATA controller. +/// This is designed for old generation chipset with PATA/SATA controllers. +/// It may be ignored in PPI implementation for new generation chipset without PATA controller. /// #define PEI_ICH_SATA_NONE 0x04 /// -/// This bit is used in the ChannelMask parameter of EnableAtaChannel() to +/// This bit is used in the ChannelMask parameter of EnableAtaChannel() to /// enable the Primary SATA channel. -/// This is designed for old generation chipset with PATA/SATA controllers. -/// It may be ignored in PPI implementation for new generation chipset without PATA controller. +/// This is designed for old generation chipset with PATA/SATA controllers. +/// It may be ignored in PPI implementation for new generation chipset without PATA controller. /// #define PEI_ICH_SATA_PRIMARY 0x08 /// -/// This bit is used in the ChannelMask parameter of EnableAtaChannel() to +/// This bit is used in the ChannelMask parameter of EnableAtaChannel() to /// enable the Secondary SATA channel. -/// This is designed for old generation chipset with PATA/SATA controllers. -/// It may be ignored in PPI implementation for new generation chipset without PATA controller. +/// This is designed for old generation chipset with PATA/SATA controllers. +/// It may be ignored in PPI implementation for new generation chipset without PATA controller. /// #define PEI_ICH_SATA_SECONDARY 0x010 @@ -97,15 +97,15 @@ typedef struct { Sets IDE and SATA channels to an enabled or disabled state. This service enables or disables the IDE and SATA channels specified by ChannelMask. - It may ignore ChannelMask setting to enable or disable IDE and SATA channels based on the platform policy. - The number of the enabled channels will be returned by GET_IDE_REGS_BASE_ADDR() function. + It may ignore ChannelMask setting to enable or disable IDE and SATA channels based on the platform policy. + The number of the enabled channels will be returned by GET_IDE_REGS_BASE_ADDR() function. If the new state is set, then EFI_SUCCESS is returned. If the new state can not be set, then EFI_DEVICE_ERROR is returned. @param[in] PeiServices The pointer to the PEI Services Table. @param[in] This The pointer to this instance of the PEI_ATA_CONTROLLER_PPI. - @param[in] ChannelMask The bitmask that identifies the IDE and SATA channels to + @param[in] ChannelMask The bitmask that identifies the IDE and SATA channels to enable or disable. This parameter is optional. @retval EFI_SUCCESS The IDE or SATA channels were enabled or disabled successfully. @@ -121,18 +121,18 @@ EFI_STATUS ); /** - Retrieves the I/O port base addresses for command and control registers of the + Retrieves the I/O port base addresses for command and control registers of the enabled IDE/SATA channels. This service fills in the structure poionted to by IdeRegsBaseAddr with the I/O port base addresses for the command and control registers of the IDE and SATA - channels that were previously enabled in EnableAtaChannel(). The number of + channels that were previously enabled in EnableAtaChannel(). The number of enabled IDE and SATA channels is returned. @param[in] PeiServices The pointer to the PEI Services Table. @param[in] This The pointer to this instance of the PEI_ATA_CONTROLLER_PPI. - @param[out] IdeRegsBaseAddr The pointer to caller allocated space to return the - I/O port base addresses of the IDE and SATA channels + @param[out] IdeRegsBaseAddr The pointer to caller allocated space to return the + I/O port base addresses of the IDE and SATA channels that were previosuly enabled with EnableAtaChannel(). @return The number of enabled IDE and SATA channels in the platform. @@ -143,7 +143,7 @@ UINT32 (EFIAPI *GET_IDE_REGS_BASE_ADDR)( IN EFI_PEI_SERVICES **PeiServices, IN PEI_ATA_CONTROLLER_PPI *This, - OUT IDE_REGS_BASE_ADDR *IdeRegsBaseAddr + OUT IDE_REGS_BASE_ADDR *IdeRegsBaseAddr ); /// diff --git a/MdeModulePkg/Include/Ppi/SerialPortPei.h b/MdeModulePkg/Include/Ppi/SerialPortPei.h index 2b754f9cca..28c2328f9d 100644 --- a/MdeModulePkg/Include/Ppi/SerialPortPei.h +++ b/MdeModulePkg/Include/Ppi/SerialPortPei.h @@ -1,8 +1,8 @@ /** @file - PPI that is installed after the initialization of a serial stream device - is complete. + PPI that is installed after the initialization of a serial stream device + is complete. - Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.
+ Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/MdeModulePkg/Include/Ppi/SmmAccess.h b/MdeModulePkg/Include/Ppi/SmmAccess.h index d91374ef72..795c8815a9 100644 --- a/MdeModulePkg/Include/Ppi/SmmAccess.h +++ b/MdeModulePkg/Include/Ppi/SmmAccess.h @@ -5,13 +5,13 @@ It abstracts the location and characteristics of SMRAM. The expectation is that the north bridge or memory controller would publish this PPI. - The principal functionality found in the memory controller includes the following: + The principal functionality found in the memory controller includes the following: - Exposing the SMRAM to all non-SMM agents, or the "open" state - Shrouding the SMRAM to all but the SMM agents, or the "closed" state - - Preserving the system integrity, or "locking" the SMRAM, such that the settings cannot be - perturbed by either boot service or runtime agents + - Preserving the system integrity, or "locking" the SMRAM, such that the settings cannot be + perturbed by either boot service or runtime agents -Copyright (c) 2010, Intel Corporation. All rights reserved.
+Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions @@ -35,18 +35,18 @@ typedef struct _PEI_SMM_ACCESS_PPI PEI_SMM_ACCESS_PPI; /** Opens the SMRAM area to be accessible by a PEIM driver. - This function "opens" SMRAM so that it is visible while not inside of SMM. The function should - return EFI_UNSUPPORTED if the hardware does not support hiding of SMRAM. The function + This function "opens" SMRAM so that it is visible while not inside of SMM. The function should + return EFI_UNSUPPORTED if the hardware does not support hiding of SMRAM. The function should return EFI_DEVICE_ERROR if the SMRAM configuration is locked. @param PeiServices General purpose services available to every PEIM. @param This The pointer to the SMM Access Interface. @param DescriptorIndex The region of SMRAM to Open. - + @retval EFI_SUCCESS The region was successfully opened. @retval EFI_DEVICE_ERROR The region could not be opened because locked by chipset. @retval EFI_INVALID_PARAMETER The descriptor index was out of bounds. - + **/ typedef EFI_STATUS @@ -59,15 +59,15 @@ EFI_STATUS /** Inhibits access to the SMRAM. - This function "closes" SMRAM so that it is not visible while outside of SMM. The function should + This function "closes" SMRAM so that it is not visible while outside of SMM. The function should return EFI_UNSUPPORTED if the hardware does not support hiding of SMRAM. @param PeiServices General purpose services available to every PEIM. @param This The pointer to the SMM Access Interface. @param DescriptorIndex The region of SMRAM to Close. - + @retval EFI_SUCCESS The region was successfully closed. - @retval EFI_DEVICE_ERROR The region could not be closed because locked by chipset. + @retval EFI_DEVICE_ERROR The region could not be closed because locked by chipset. @retval EFI_INVALID_PARAMETER The descriptor index was out of bounds. **/ @@ -82,13 +82,13 @@ EFI_STATUS /** Inhibits access to the SMRAM. - This function prohibits access to the SMRAM region. This function is usually implemented such - that it is a write-once operation. + This function prohibits access to the SMRAM region. This function is usually implemented such + that it is a write-once operation. @param PeiServices General purpose services available to every PEIM. @param This The pointer to the SMM Access Interface. @param DescriptorIndex The region of SMRAM to Close. - + @retval EFI_SUCCESS The region was successfully locked. @retval EFI_DEVICE_ERROR The region could not be locked because at least one range is still open. @@ -112,7 +112,7 @@ EFI_STATUS buffer to contain the description information. @param SmramMap The buffer containing the data describing the Smram region descriptors. - + @retval EFI_BUFFER_TOO_SMALL The user did not provide a sufficient buffer. @retval EFI_SUCCESS The user provided a sufficiently-sized buffer. @@ -128,10 +128,10 @@ EFI_STATUS /// /// EFI SMM Access PPI is used to control the visibility of the SMRAM on the platform. -/// It abstracts the location and characteristics of SMRAM. The platform should report -/// all MMRAM via PEI_SMM_ACCESS_PPI. The expectation is that the north bridge or +/// It abstracts the location and characteristics of SMRAM. The platform should report +/// all MMRAM via PEI_SMM_ACCESS_PPI. The expectation is that the north bridge or /// memory controller would publish this PPI. -/// +/// struct _PEI_SMM_ACCESS_PPI { PEI_SMM_OPEN Open; PEI_SMM_CLOSE Close; diff --git a/MdeModulePkg/Include/Ppi/SmmCommunication.h b/MdeModulePkg/Include/Ppi/SmmCommunication.h index a22ed9f6d3..8ac86a443a 100644 --- a/MdeModulePkg/Include/Ppi/SmmCommunication.h +++ b/MdeModulePkg/Include/Ppi/SmmCommunication.h @@ -1,12 +1,12 @@ /** @file EFI SMM Communication PPI definition. - This Ppi provides a means of communicating between PEIM and SMI + This Ppi provides a means of communicating between PEIM and SMI handlers inside of SMM. This Ppi is produced and consumed only in S3 resume boot path. It is NOT available in normal boot path. -Copyright (c) 2010, Intel Corporation. All rights reserved.
+Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions @@ -32,7 +32,7 @@ typedef struct _EFI_PEI_SMM_COMMUNICATION_PPI EFI_PEI_SMM_COMMUNICATION_PPI; /** Communicates with a registered handler. - + This function provides a service to send and receive messages from a registered UEFI service. @param[in] This The EFI_PEI_SMM_COMMUNICATION_PPI instance. diff --git a/MdeModulePkg/Include/Ppi/SmmControl.h b/MdeModulePkg/Include/Ppi/SmmControl.h index 341a29ba2a..0c62196fb4 100644 --- a/MdeModulePkg/Include/Ppi/SmmControl.h +++ b/MdeModulePkg/Include/Ppi/SmmControl.h @@ -9,7 +9,7 @@ event from a platform chipset agent is an optional capability for both IA-32 and Itanium-based systems. - Copyright (c) 2010, Intel Corporation. All rights reserved.
+ Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions @@ -64,7 +64,7 @@ EFI_STATUS @param PeiServices General purpose services available to every PEIM. @param This The PEI_SMM_CONTROL_PPI instance. - @param Periodic Optional parameter to repeat at this period one + @param Periodic Optional parameter to repeat at this period one time or, if the Periodic Boolean is set, periodically. @retval EFI_SUCCESS The SMI/PMI has been engendered. @@ -85,7 +85,7 @@ EFI_STATUS /// - A processor driver to abstract the SMI/PMI IPI /// - The driver that abstracts the ASIC that is supporting the APM port, such as the ICH in an /// Intel chipset -/// +/// struct _PEI_SMM_CONTROL_PPI { PEI_SMM_ACTIVATE Trigger; PEI_SMM_DEACTIVATE Clear; diff --git a/MdeModulePkg/Include/Ppi/Usb2HostController.h b/MdeModulePkg/Include/Ppi/Usb2HostController.h index 7bcb341a94..5e0b300ca7 100644 --- a/MdeModulePkg/Include/Ppi/Usb2HostController.h +++ b/MdeModulePkg/Include/Ppi/Usb2HostController.h @@ -1,11 +1,11 @@ /** @file - Defines the USB Host Controller PPI that provides I/O services for a USB Host - Controller that may be used to access recovery devices. These interfaces are + Defines the USB Host Controller PPI that provides I/O services for a USB Host + Controller that may be used to access recovery devices. These interfaces are modeled on the UEFI 2.3 specification EFI_USB2_HOST_CONTROLLER_PROTOCOL. - Refer to section 16.1 of the UEFI 2.3 Specification for more information on + Refer to section 16.1 of the UEFI 2.3 Specification for more information on these interfaces. - -Copyright (c) 2010 - 2013, Intel Corporation. All rights reserved.
+ +Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions @@ -37,45 +37,45 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. typedef struct _PEI_USB2_HOST_CONTROLLER_PPI PEI_USB2_HOST_CONTROLLER_PPI; /** - Initiate a USB control transfer using a specific USB Host controller on the USB bus. + Initiate a USB control transfer using a specific USB Host controller on the USB bus. @param[in] PeiServices The pointer to the PEI Services Table. - @param[in] This The pointer to this instance of the + @param[in] This The pointer to this instance of the PEI_USB2_HOST_CONTROLLER_PPI. - @param[in] DeviceAddress Represents the address of the target device + @param[in] DeviceAddress Represents the address of the target device on the USB. @param[in] DeviceSpeed Indicates device speed. - @param[in] MaximumPacketLength Indicates the maximum packet size that the + @param[in] MaximumPacketLength Indicates the maximum packet size that the default control transfer endpoint is capable of sending or receiving. - @param[in] Request A pointer to the USB device request that + @param[in] Request A pointer to the USB device request that will be sent to the USB device. - @param[in] TransferDirection Specifies the data direction for the transfer. - There are three values available: + @param[in] TransferDirection Specifies the data direction for the transfer. + There are three values available: EfiUsbDataIn, EfiUsbDataOut and EfiUsbNoData. - @param[in,out] Data A pointer to the buffer of data that will + @param[in,out] Data A pointer to the buffer of data that will be transmitted to USB device or received from USB device. - @param[in,out] DataLength On input, indicates the size, in bytes, of + @param[in,out] DataLength On input, indicates the size, in bytes, of the data buffer specified by Data. - On output, indicates the amount of data + On output, indicates the amount of data actually transferred. - @param[in] TimeOut Indicates the maximum time, in milliseconds, + @param[in] TimeOut Indicates the maximum time, in milliseconds, that the transfer is allowed to complete. If Timeout is 0, then the caller must wait for the function to be completed until EFI_SUCCESS or EFI_DEVICE_ERROR is returned. @param[in] Translator A pointer to the transaction translator data. - @param[out] TransferResult A pointer to the detailed result information + @param[out] TransferResult A pointer to the detailed result information generated by this control transfer. @retval EFI_SUCCESS The control transfer was completed successfully. - @retval EFI_DEVICE_ERROR The control transfer failed due to host controller + @retval EFI_DEVICE_ERROR The control transfer failed due to host controller or device error. @retval EFI_INVALID_PARAMETER Some parameters are invalid. @retval EFI_OUT_OF_RESOURCES The control transfer could not be completed due to a lack of resources. @retval EFI_TIMEOUT The control transfer failed due to timeout. - + **/ typedef @@ -96,22 +96,22 @@ EFI_STATUS ); /** - Initiate a USB bulk transfer using a specific USB Host controller on the USB bus. + Initiate a USB bulk transfer using a specific USB Host controller on the USB bus. @param[in] PeiServices The pointer to the PEI Services Table. - @param[in] This The pointer to this instance of the + @param[in] This The pointer to this instance of the PEI_USB2_HOST_CONTROLLER_PPI. - @param[in] DeviceAddress Represents the address of the target device + @param[in] DeviceAddress Represents the address of the target device on the USB. - @param[in] EndPointAddress The combination of an endpoint number and + @param[in] EndPointAddress The combination of an endpoint number and an endpoint direction of the target USB device. @param[in] DeviceSpeed Indicates device speed. - @param[in] MaximumPacketLength Indicates the maximum packet size the target + @param[in] MaximumPacketLength Indicates the maximum packet size the target endpoint is capable of sending or receiving. - @param[in,out] Data Array of pointers to the buffers of data - that will be transmitted to USB device or + @param[in,out] Data Array of pointers to the buffers of data + that will be transmitted to USB device or received from USB device. - @param[in,out] DataLength When input, indicates the size, in bytes, of + @param[in,out] DataLength When input, indicates the size, in bytes, of the data buffers specified by Data. When output, indicates the data size actually transferred. @param[in,out] DataToggle A pointer to the data toggle value. @@ -121,7 +121,7 @@ EFI_STATUS the function to be completed until EFI_SUCCESS or EFI_DEVICE_ERROR is returned. @param[in] Translator A pointer to the transaction translator data. - @param[out] TransferResult A pointer to the detailed result information + @param[out] TransferResult A pointer to the detailed result information of the bulk transfer. @retval EFI_SUCCESS The bulk transfer was completed successfully. @@ -129,8 +129,8 @@ EFI_STATUS Caller should check TransferResult for detailed error information. @retval EFI_INVALID_PARAMETER Some parameters are invalid. @retval EFI_OUT_OF_RESOURCES The bulk transfer could not be submitted due to a lack of resources. - @retval EFI_TIMEOUT The bulk transfer failed due to timeout. - + @retval EFI_TIMEOUT The bulk transfer failed due to timeout. + **/ typedef @@ -140,7 +140,7 @@ EFI_STATUS IN PEI_USB2_HOST_CONTROLLER_PPI *This, IN UINT8 DeviceAddress, IN UINT8 EndPointAddress, - IN UINT8 DeviceSpeed, + IN UINT8 DeviceSpeed, IN UINTN MaximumPacketLength, IN OUT VOID *Data[EFI_USB_MAX_BULK_BUFFER_NUM], IN OUT UINTN *DataLength, @@ -154,10 +154,10 @@ EFI_STATUS Retrieves the number of root hub ports. @param[in] PeiServices The pointer to the PEI Services Table. - @param[in] This The pointer to this instance of the + @param[in] This The pointer to this instance of the PEI_USB2_HOST_CONTROLLER_PPI. - @param[out] PortNumber The pointer to the number of the root hub ports. - + @param[out] PortNumber The pointer to the number of the root hub ports. + @retval EFI_SUCCESS The port number was retrieved successfully. @retval EFI_INVALID_PARAMETER PortNumber is NULL. @@ -174,15 +174,15 @@ EFI_STATUS Retrieves the current status of a USB root hub port. @param[in] PeiServices The pointer to the PEI Services Table. - @param[in] This The pointer to this instance of the + @param[in] This The pointer to this instance of the PEI_USB2_HOST_CONTROLLER_PPI. - @param[in] PortNumber Specifies the root hub port from which the status is + @param[in] PortNumber Specifies the root hub port from which the status is to be retrieved. This value is zero based. - @param[out] PortStatus A pointer to the current port status bits and port + @param[out] PortStatus A pointer to the current port status bits and port status change bits. - - @retval EFI_SUCCESS The status of the USB root hub port specified by + + @retval EFI_SUCCESS The status of the USB root hub port specified by PortNumber was returned in PortStatus. @retval EFI_INVALID_PARAMETER PortNumber is invalid. @@ -200,18 +200,18 @@ EFI_STATUS Sets a feature for the specified root hub port. @param[in] PeiServices The pointer to the PEI Services Table. - @param[in] This The pointer to this instance of the + @param[in] This The pointer to this instance of the PEI_USB2_HOST_CONTROLLER_PPI. - @param[in] PortNumber Specifies the root hub port whose feature is requested + @param[in] PortNumber Specifies the root hub port whose feature is requested to be set. This value is zero based. - @param[in] PortFeature Indicates the feature selector associated with the feature + @param[in] PortFeature Indicates the feature selector associated with the feature set request. - - @retval EFI_SUCCESS The feature specified by PortFeature was set for + + @retval EFI_SUCCESS The feature specified by PortFeature was set for the USB root hub port specified by PortNumber. - @retval EFI_INVALID_PARAMETER PortNumber is invalid or PortFeature is invalid + @retval EFI_INVALID_PARAMETER PortNumber is invalid or PortFeature is invalid for this function. - @retval EFI_TIMEOUT The time out occurred + @retval EFI_TIMEOUT The time out occurred **/ typedef @@ -227,7 +227,7 @@ EFI_STATUS Clears a feature for the specified root hub port. @param[in] PeiServices The pointer to the PEI Services Table. - @param[in] This The pointer to this instance of the + @param[in] This The pointer to this instance of the PEI_USB2_HOST_CONTROLLER_PPI. @param[in] PortNumber Specifies the root hub port whose feature is requested to be cleared. @@ -251,7 +251,7 @@ EFI_STATUS /// /// This PPI contains a set of services to interact with the USB host controller. /// These interfaces are modeled on the UEFI 2.3 specification protocol -/// EFI_USB2_HOST_CONTROLLER_PROTOCOL. Refer to section 16.1 of the UEFI 2.3 +/// EFI_USB2_HOST_CONTROLLER_PROTOCOL. Refer to section 16.1 of the UEFI 2.3 /// Specification for more information on these interfaces. /// struct _PEI_USB2_HOST_CONTROLLER_PPI { diff --git a/MdeModulePkg/Include/Ppi/UsbController.h b/MdeModulePkg/Include/Ppi/UsbController.h index f0537ecb66..39e378b71d 100644 --- a/MdeModulePkg/Include/Ppi/UsbController.h +++ b/MdeModulePkg/Include/Ppi/UsbController.h @@ -1,8 +1,8 @@ /** @file - Define APIs to retrieve USB Host Controller Info such as controller type and + Define APIs to retrieve USB Host Controller Info such as controller type and I/O Port Base Address. -Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions @@ -63,11 +63,11 @@ typedef struct _PEI_USB_CONTROLLER_PPI PEI_USB_CONTROLLER_PPI; @param[in] ControllerId The ID of the USB controller. @param[out] ControllerType On output, returns the type of the USB controller. @param[out] BaseAddress On output, returns the base address of UHCI's I/O ports - if UHCI is enabled or the base address of EHCI's MMIO + if UHCI is enabled or the base address of EHCI's MMIO if EHCI is enabled. @retval EFI_SUCCESS USB controller attributes were returned successfully. - @retval EFI_INVALID_PARAMETER ControllerId is greater than the maximum number + @retval EFI_INVALID_PARAMETER ControllerId is greater than the maximum number of USB controller supported by this platform. **/ diff --git a/MdeModulePkg/Include/Ppi/UsbHostController.h b/MdeModulePkg/Include/Ppi/UsbHostController.h index 232a666734..627b0fda2c 100644 --- a/MdeModulePkg/Include/Ppi/UsbHostController.h +++ b/MdeModulePkg/Include/Ppi/UsbHostController.h @@ -1,11 +1,11 @@ /** @file - Defines the USB Host Controller PPI that provides I/O services for a USB Host - Controller that may be used to access recovery devices. These interfaces are + Defines the USB Host Controller PPI that provides I/O services for a USB Host + Controller that may be used to access recovery devices. These interfaces are modeled on the UEFI 2.3 specification EFI_USB2_HOST_CONTROLLER_PROTOCOL. - Refer to section 16.1 of the UEFI 2.3 Specification for more information on + Refer to section 16.1 of the UEFI 2.3 Specification for more information on these interfaces. - -Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.
+ +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions @@ -37,38 +37,38 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. typedef struct _PEI_USB_HOST_CONTROLLER_PPI PEI_USB_HOST_CONTROLLER_PPI; /** - Initiate a USB control transfer using a specific USB Host controller on the USB bus. + Initiate a USB control transfer using a specific USB Host controller on the USB bus. @param[in] PeiServices The pointer to the PEI Services Table. - @param[in] This The pointer to this instance of the + @param[in] This The pointer to this instance of the PEI_USB_HOST_CONTROLLER_PPI. - @param[in] DeviceAddress Represents the address of the target device + @param[in] DeviceAddress Represents the address of the target device on the USB. @param[in] DeviceSpeed Indicates device speed. - @param[in] MaximumPacketLength Indicates the maximum packet size that the + @param[in] MaximumPacketLength Indicates the maximum packet size that the default control transfer endpoint is capable of sending or receiving. - @param[in] Request A pointer to the USB device request that + @param[in] Request A pointer to the USB device request that will be sent to the USB device. - @param[in] TransferDirection Specifies the data direction for the transfer. - There are three values available: + @param[in] TransferDirection Specifies the data direction for the transfer. + There are three values available: EfiUsbDataIn, EfiUsbDataOut and EfiUsbNoData. - @param[in,out] Data A pointer to the buffer of data that will + @param[in,out] Data A pointer to the buffer of data that will be transmitted to USB device or received from USB device. - @param[in,out] DataLength On input, indicates the size, in bytes, of + @param[in,out] DataLength On input, indicates the size, in bytes, of the data buffer specified by Data. - On output, indicates the amount of data + On output, indicates the amount of data actually transferred. - @param[in] TimeOut Indicates the maximum time, in milliseconds, - that the transfer is allowed to complete. + @param[in] TimeOut Indicates the maximum time, in milliseconds, + that the transfer is allowed to complete. If Timeout is 0, then the caller must wait for the function to be completed until EFI_SUCCESS or EFI_DEVICE_ERROR is returned. - @param[out] TransferResult A pointer to the detailed result information + @param[out] TransferResult A pointer to the detailed result information generated by this control transfer. - @retval EFI_DEVICE_ERROR The control transfer failed due to host controller + @retval EFI_DEVICE_ERROR The control transfer failed due to host controller or device error. @retval EFI_SUCCESS The control transfer was completed successfully. @@ -90,21 +90,21 @@ EFI_STATUS ); /** - Initiate a USB bulk transfer using a specific USB Host controller on the USB bus. + Initiate a USB bulk transfer using a specific USB Host controller on the USB bus. @param[in] PeiServices The pointer to the PEI Services Table. - @param[in] This The pointer to this instance of the + @param[in] This The pointer to this instance of the PEI_USB_HOST_CONTROLLER_PPI. - @param[in] DeviceAddress Represents the address of the target device + @param[in] DeviceAddress Represents the address of the target device on the USB. - @param[in] EndPointAddress The combination of an endpoint number and + @param[in] EndPointAddress The combination of an endpoint number and an endpoint direction of the target USB device. - @param[in] MaximumPacketLength Indicates the maximum packet size the target + @param[in] MaximumPacketLength Indicates the maximum packet size the target endpoint is capable of sending or receiving. - @param[in,out] Data Array of pointers to the buffers of data - that will be transmitted to USB device or + @param[in,out] Data Array of pointers to the buffers of data + that will be transmitted to USB device or received from USB device. - @param[in,out] DataLength When input, indicates the size, in bytes, of + @param[in,out] DataLength When input, indicates the size, in bytes, of the data buffers specified by Data. When output, indicates the data size actually transferred. @param[in,out] DataToggle A pointer to the data toggle value. @@ -113,7 +113,7 @@ EFI_STATUS If Timeout is 0, then the caller must wait for the function to be completed until EFI_SUCCESS or EFI_DEVICE_ERROR is returned. - @param[out] TransferResult A pointer to the detailed result information + @param[out] TransferResult A pointer to the detailed result information of the bulk transfer. @retval EFI_SUCCESS The bulk transfer was completed successfully. @@ -140,12 +140,12 @@ EFI_STATUS Retrieves the number of root hub ports. @param[in] PeiServices The pointer to the PEI Services Table. - @param[in] This The pointer to this instance of the + @param[in] This The pointer to this instance of the PEI_USB_HOST_CONTROLLER_PPI. - @param[out] PortNumber The pointer to the number of the root hub ports. - + @param[out] PortNumber The pointer to the number of the root hub ports. + @retval EFI_SUCCESS The port number was retrieved successfully. - @retval EFI_DEVICE_ERROR An error was encountered while attempting to retrieve + @retval EFI_DEVICE_ERROR An error was encountered while attempting to retrieve the port number. @retval EFI_INVALID_PARAMETER PortNumber is NULL. @@ -162,15 +162,15 @@ EFI_STATUS Retrieves the current status of a USB root hub port. @param[in] PeiServices The pointer to the PEI Services Table. - @param[in] This The pointer to this instance of the + @param[in] This The pointer to this instance of the PEI_USB_HOST_CONTROLLER_PPI. - @param[in] PortNumber Specifies the root hub port from which the status is + @param[in] PortNumber Specifies the root hub port from which the status is to be retrieved. This value is zero based. - @param[out] PortStatus A pointer to the current port status bits and port + @param[out] PortStatus A pointer to the current port status bits and port status change bits. - - @retval EFI_SUCCESS The status of the USB root hub port specified by + + @retval EFI_SUCCESS The status of the USB root hub port specified by PortNumber was returned in PortStatus. @retval EFI_INVALID_PARAMETER PortNumber is invalid. @@ -188,16 +188,16 @@ EFI_STATUS Sets a feature for the specified root hub port. @param[in] PeiServices The pointer to the PEI Services Table. - @param[in] This The pointer to this instance of the + @param[in] This The pointer to this instance of the PEI_USB_HOST_CONTROLLER_PPI. - @param[in] PortNumber Specifies the root hub port whose feature is requested + @param[in] PortNumber Specifies the root hub port whose feature is requested to be set. This value is zero based. - @param[in] PortFeature Indicates the feature selector associated with the feature + @param[in] PortFeature Indicates the feature selector associated with the feature set request. - - @retval EFI_SUCCESS The feature specified by PortFeature was set for + + @retval EFI_SUCCESS The feature specified by PortFeature was set for the USB root hub port specified by PortNumber. - @retval EFI_INVALID_PARAMETER PortNumber is invalid or PortFeature is invalid + @retval EFI_INVALID_PARAMETER PortNumber is invalid or PortFeature is invalid for this function. **/ @@ -214,7 +214,7 @@ EFI_STATUS Clears a feature for the specified root hub port. @param[in] PeiServices The pointer to the PEI Services Table. - @param[in] This The pointer to this instance of the + @param[in] This The pointer to this instance of the PEI_USB_HOST_CONTROLLER_PPI. @param[in] PortNumber Specifies the root hub port whose feature is requested to be cleared. @@ -239,7 +239,7 @@ EFI_STATUS /// /// This PPI contains a set of services to interact with the USB host controller. /// These interfaces are modeled on the UEFI 2.3 specification protocol -/// EFI_USB2_HOST_CONTROLLER_PROTOCOL. Refer to section 16.1 of the UEFI 2.3 +/// EFI_USB2_HOST_CONTROLLER_PROTOCOL. Refer to section 16.1 of the UEFI 2.3 /// Specification for more information on these interfaces. /// struct _PEI_USB_HOST_CONTROLLER_PPI { diff --git a/MdeModulePkg/Include/Ppi/UsbIo.h b/MdeModulePkg/Include/Ppi/UsbIo.h index b024d4640a..fc52b8a48b 100644 --- a/MdeModulePkg/Include/Ppi/UsbIo.h +++ b/MdeModulePkg/Include/Ppi/UsbIo.h @@ -1,12 +1,12 @@ /** @file - Defines the PEI_USB_IO_PPI that the USB-related PEIM can use for I/O operations - on the USB BUS. This interface enables recovery from a - USB-class storage device, such as USB CD/DVD, USB hard drive, or USB FLASH + Defines the PEI_USB_IO_PPI that the USB-related PEIM can use for I/O operations + on the USB BUS. This interface enables recovery from a + USB-class storage device, such as USB CD/DVD, USB hard drive, or USB FLASH drive. These interfaces are modeled on the UEFI 2.3 specification EFI_USB_IO_PROTOCOL. - Refer to section 16.2.4 of the UEFI 2.3 Specification for more information on + Refer to section 16.2.4 of the UEFI 2.3 Specification for more information on these interfaces. -Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions @@ -42,29 +42,29 @@ typedef struct _PEI_USB_IO_PPI PEI_USB_IO_PPI; @param[in] PeiServices The pointer to the PEI Services Table. @param[in] This The pointer to this instance of the PEI_USB_IO_PPI. - @param[in] Request A pointer to the USB device request that will be + @param[in] Request A pointer to the USB device request that will be sent to the USB device. - @param[in] Direction Specifies the data direction for the transfer. There - are three values available: + @param[in] Direction Specifies the data direction for the transfer. There + are three values available: EfiUsbDataIn, EfiUsbDataOut and EfiUsbNoData. - @param[in] Timeout Indicates the maximum time, in milliseconds, that + @param[in] Timeout Indicates the maximum time, in milliseconds, that the transfer is allowed to complete. If Timeout is 0, then the caller must wait for the function to be completed until EFI_SUCCESS or EFI_DEVICE_ERROR is returned. - @param[in,out] Data A pointer to the buffer of data that will be + @param[in,out] Data A pointer to the buffer of data that will be transmitted to or received from the USB device. - @param[in] DataLength On input, indicates the size, in bytes, of the data + @param[in] DataLength On input, indicates the size, in bytes, of the data buffer specified by Data. - + @retval EFI_SUCCESS The control transfer was completed successfully. @retval EFI_INVALID_PARAMETER Some parameters are invalid. - @retval EFI_OUT_OF_RESOURCES The control transfer could not be completed due + @retval EFI_OUT_OF_RESOURCES The control transfer could not be completed due to a lack of resources. @retval EFI_TIMEOUT The control transfer failed due to timeout. - @retval EFI_DEVICE_ERROR The control transfer failed due to host controller + @retval EFI_DEVICE_ERROR The control transfer failed due to host controller or device error. - Caller should check TransferResult for detailed + Caller should check TransferResult for detailed error information. **/ @@ -95,12 +95,12 @@ EFI_STATUS @retval EFI_SUCCESS The bulk transfer completed successfully. @retval EFI_INVALID_PARAMETER Some parameters are invalid. - @retval EFI_OUT_OF_RESOURCES The bulk transfer could not be completed due to + @retval EFI_OUT_OF_RESOURCES The bulk transfer could not be completed due to a lack of resources. @retval EFI_TIMEOUT The bulk transfer failed due to timeout. - @retval EFI_DEVICE_ERROR The bulk transfer failed due to host controller + @retval EFI_DEVICE_ERROR The bulk transfer failed due to host controller or device error. - Caller should check TransferResult for detailed + Caller should check TransferResult for detailed error information. **/ @@ -124,7 +124,7 @@ EFI_STATUS @retval EFI_SUCCESS The interface descriptor was returned. @retval EFI_INVALID_PARAMETER Some parameters are invalid. - @retval EFI_DEVICE_ERROR A device error occurred, the function failed to + @retval EFI_DEVICE_ERROR A device error occurred, the function failed to get the interface descriptor. **/ @@ -146,7 +146,7 @@ EFI_STATUS @retval EFI_SUCCESS The endpoint descriptor was returned. @retval EFI_INVALID_PARAMETER Some parameters are invalid. - @retval EFI_DEVICE_ERROR A device error occurred, the function failed to + @retval EFI_DEVICE_ERROR A device error occurred, the function failed to get the endpoint descriptor. **/ @@ -180,7 +180,7 @@ EFI_STATUS /// /// This PPI contains a set of services to interact with the USB host controller. /// These interfaces are modeled on the UEFI 2.3 specification EFI_USB_IO_PROTOCOL. -/// Refer to section 16.2.4 of the UEFI 2.3 Specification for more information on +/// Refer to section 16.2.4 of the UEFI 2.3 Specification for more information on /// these interfaces. /// struct _PEI_USB_IO_PPI { diff --git a/MdeModulePkg/Include/Protocol/DisplayProtocol.h b/MdeModulePkg/Include/Protocol/DisplayProtocol.h index 8ea9350419..57fda68ca3 100644 --- a/MdeModulePkg/Include/Protocol/DisplayProtocol.h +++ b/MdeModulePkg/Include/Protocol/DisplayProtocol.h @@ -1,13 +1,13 @@ /** @file FormDiplay protocol to show Form -Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -20,7 +20,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #define EDKII_FORM_DISPLAY_ENGINE_PROTOCOL_GUID \ { 0x9bbe29e9, 0xfda1, 0x41ec, { 0xad, 0x52, 0x45, 0x22, 0x13, 0x74, 0x2d, 0x2e } } -// +// // Do nothing. // #define BROWSER_ACTION_NONE BIT16 @@ -101,11 +101,11 @@ typedef struct { /** Perform value check for a question. - + @param Form Form where Statement is in. @param Statement Value will check for it. @param Value New value will be checked. - + @retval Status Value Status **/ @@ -114,20 +114,20 @@ UINT32 (EFIAPI *VALIDATE_QUESTION) ( IN FORM_DISPLAY_ENGINE_FORM *Form, IN FORM_DISPLAY_ENGINE_STATEMENT *Statement, - IN EFI_HII_VALUE *Value, + IN EFI_HII_VALUE *Value, OUT STATEMENT_ERROR_INFO *ErrorInfo ); /** - Perform Password check. + Perform Password check. Passwork may be encrypted by driver that requires the specific check. - + @param Form Form where Password Statement is in. @param Statement Password statement @param PasswordString Password string to be checked. It may be NULL. NULL means to restore password. "" string can be used to checked whether old password does exist. - + @return Status Status of Password check. **/ typedef @@ -171,7 +171,7 @@ struct _FORM_DISPLAY_ENGINE_STATEMENT{ EFI_HII_VALUE CurrentValue; // // Flag to describe whether setting is changed or not. - // Displayer may depend on it to show it with the different color. + // Displayer may depend on it to show it with the different color. // BOOLEAN SettingChangedFlag; // @@ -192,7 +192,7 @@ struct _FORM_DISPLAY_ENGINE_STATEMENT{ // It may be NULL if any value is valid. // VALIDATE_QUESTION ValidateQuestion; - + // // Password additional check. It may be NULL when the additional check is not required. // @@ -212,7 +212,7 @@ struct _FORM_DISPLAY_ENGINE_STATEMENT{ typedef struct { UINTN Signature; LIST_ENTRY Link; - + EFI_INPUT_KEY *KeyData; // // Action is Discard, Default, Submit, Reset and Exit. @@ -240,7 +240,7 @@ struct _FORM_DISPLAY_ENGINE_FORM { // LIST_ENTRY StatementListHead; // - // Statement List outside of Form + // Statement List outside of Form // LIST_ENTRY StatementListOSF; // @@ -255,7 +255,7 @@ struct _FORM_DISPLAY_ENGINE_FORM { // HiiHandle can be used to get String, Image or Animation // EFI_HII_HANDLE HiiHandle; - + // // Form ID and Title. // @@ -289,13 +289,13 @@ struct _FORM_DISPLAY_ENGINE_FORM { // EFI_IMAGE_ID ImageId; EFI_ANIMATION_ID AnimationId; - + // - // If Status is error, display needs to handle it. + // If Status is error, display needs to handle it. // UINT32 BrowserStatus; // - // String for error status. It may be NULL. + // String for error status. It may be NULL. // EFI_STRING ErrorString; }; @@ -304,9 +304,9 @@ struct _FORM_DISPLAY_ENGINE_FORM { typedef struct { FORM_DISPLAY_ENGINE_STATEMENT *SelectedStatement; // Selected Statement and InputValue - + EFI_HII_VALUE InputValue; - + UINT32 Action; // If SelectedStatement is NULL, Action will be used. // Trig Action (Discard, Default, Submit, Reset and Exit) UINT16 DefaultId; @@ -314,10 +314,10 @@ typedef struct { /** Display one form, and return user input. - + @param FormData Form Data to be shown. @param UserInputData User input data. - + @retval EFI_SUCCESS Form Data is shown, and user input is got. **/ typedef @@ -338,8 +338,8 @@ VOID ); /** - Confirm how to handle the changed data. - + Confirm how to handle the changed data. + @return Action of Submit, Discard and None **/ typedef diff --git a/MdeModulePkg/Include/Protocol/Dpc.h b/MdeModulePkg/Include/Protocol/Dpc.h index 99293e2987..acabe2b8d6 100644 --- a/MdeModulePkg/Include/Protocol/Dpc.h +++ b/MdeModulePkg/Include/Protocol/Dpc.h @@ -2,13 +2,13 @@ EFI Deferred Procedure Call Protocol. -Copyright (c) 2007 - 2010, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -70,11 +70,11 @@ EFI_STATUS ); /** - Dispatch the queue of DPCs. - + Dispatch the queue of DPCs. + DPCs with DpcTpl value greater than the current TPL value are queued, and then DPCs - with DpcTpl value lower than the current TPL value are queued. All DPCs in the first - group (higher DpcTpl values) are invoked before DPCs in the second group (lower DpcTpl values). + with DpcTpl value lower than the current TPL value are queued. All DPCs in the first + group (higher DpcTpl values) are invoked before DPCs in the second group (lower DpcTpl values). @param This Protocol instance pointer. diff --git a/MdeModulePkg/Include/Protocol/EbcSimpleDebugger.h b/MdeModulePkg/Include/Protocol/EbcSimpleDebugger.h index 43b55b48eb..71911a3572 100644 --- a/MdeModulePkg/Include/Protocol/EbcSimpleDebugger.h +++ b/MdeModulePkg/Include/Protocol/EbcSimpleDebugger.h @@ -1,7 +1,7 @@ /** @file EBC Simple Debugger protocol for debug EBC code. -Copyright (c) 2011, Intel Corporation. All rights reserved.
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions @@ -71,7 +71,7 @@ VOID @param[in] This A pointer to the EFI_EBC_SIMPLE_DEBUGGER_PROTOCOL structure. @param[in] VmPtr A pointer to a VM context. - @param[in] DasmString Dump string buffer. + @param[in] DasmString Dump string buffer. @param[in] DasmStringSize Dump string size. @retval EFI_UNSUPPORTED No support for it. diff --git a/MdeModulePkg/Include/Protocol/EbcVmTest.h b/MdeModulePkg/Include/Protocol/EbcVmTest.h index 9eedca1906..a1bb46a0a7 100644 --- a/MdeModulePkg/Include/Protocol/EbcVmTest.h +++ b/MdeModulePkg/Include/Protocol/EbcVmTest.h @@ -1,7 +1,7 @@ /** @file EBC VM Test protocol for test purposes. -Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions @@ -144,7 +144,7 @@ EFI_STATUS @param[out] BufferLen Size of buffer that is required to store data. @retval EFI_UNSUPPORTED This functionality is unsupported. - @retval EFI_SUCCESS Successfully convert AsmText to the instruction. + @retval EFI_SUCCESS Successfully convert AsmText to the instruction. **/ typedef diff --git a/MdeModulePkg/Include/Protocol/EsrtManagement.h b/MdeModulePkg/Include/Protocol/EsrtManagement.h index 305fd5c908..f72cc0224b 100644 --- a/MdeModulePkg/Include/Protocol/EsrtManagement.h +++ b/MdeModulePkg/Include/Protocol/EsrtManagement.h @@ -1,13 +1,13 @@ /** @file The Esrt Management Protocol used to register/set/update an updatable firmware resource . -Copyright (c) 2015, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -31,11 +31,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. typedef struct _ESRT_MANAGEMENT_PROTOCOL ESRT_MANAGEMENT_PROTOCOL; /** - Get Variable name and data by Esrt Entry FwClass + Get Variable name and data by Esrt Entry FwClass + + @param[in] FwClass FwClass of Esrt entry to get + @param[in out] Entry Esrt entry returned - @param[in] FwClass FwClass of Esrt entry to get - @param[in out] Entry Esrt entry returned - @retval EFI_SUCCESS The variable saving this Esrt Entry exists. @retval EF_NOT_FOUND No correct variable found. @@ -46,13 +46,13 @@ EFI_STATUS IN EFI_GUID *FwClass, IN OUT EFI_SYSTEM_RESOURCE_ENTRY *Entry ); - + /** Update one ESRT entry in ESRT Cache. @param[in] Entry Esrt entry to be updated - + @retval EFI_SUCCESS Successfully update an ESRT entry in cache. @retval EFI_INVALID_PARAMETER Entry does't exist in ESRT Cache @retval EFI_WRITE_PROTECTED ESRT Cache repositoy is locked @@ -66,11 +66,11 @@ EFI_STATUS /** - Non-FMP instance to unregister Esrt Entry from ESRT Cache. + Non-FMP instance to unregister Esrt Entry from ESRT Cache. + + @param[in] FwClass FwClass of Esrt entry to Unregister - @param[in] FwClass FwClass of Esrt entry to Unregister - - @retval EFI_SUCCESS Insert all entries Successfully + @retval EFI_SUCCESS Insert all entries Successfully @retval EFI_NOT_FOUND FwClass does not exsit **/ @@ -116,10 +116,10 @@ EFI_STATUS /** - This function locks up Esrt repository to be readonly. It should be called + This function locks up Esrt repository to be readonly. It should be called before gEfiEndOfDxeEventGroupGuid event signaled - @retval EFI_SUCCESS Locks up FMP Non-FMP repository successfully + @retval EFI_SUCCESS Locks up FMP Non-FMP repository successfully **/ typedef diff --git a/MdeModulePkg/Include/Protocol/FaultTolerantWrite.h b/MdeModulePkg/Include/Protocol/FaultTolerantWrite.h index b96edfb68f..dc2a6e73ce 100644 --- a/MdeModulePkg/Include/Protocol/FaultTolerantWrite.h +++ b/MdeModulePkg/Include/Protocol/FaultTolerantWrite.h @@ -1,17 +1,17 @@ /** @file - Fault Tolerant Write protocol provides boot-time service for fault tolerant - write capability for block devices. The protocol provides for non-volatile - storage of the intermediate data and private information a caller would need to - recover from a critical fault, such as a power failure. - -Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. + Fault Tolerant Write protocol provides boot-time service for fault tolerant + write capability for block devices. The protocol provides for non-volatile + storage of the intermediate data and private information a caller would need to + recover from a critical fault, such as a power failure. + +Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Include/Protocol/FileExplorer.h b/MdeModulePkg/Include/Protocol/FileExplorer.h index 62daca3ab7..609f5bfec0 100644 --- a/MdeModulePkg/Include/Protocol/FileExplorer.h +++ b/MdeModulePkg/Include/Protocol/FileExplorer.h @@ -1,15 +1,15 @@ /** @file - This file explorer protocol defines defines a set of interfaces for + This file explorer protocol defines defines a set of interfaces for how to do file explorer. -Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -41,7 +41,7 @@ BOOLEAN ); /** - Choose a file in the specified directory. + Choose a file in the specified directory. If user input NULL for the RootDirectory, will choose file in the system. diff --git a/MdeModulePkg/Include/Protocol/FormBrowserEx.h b/MdeModulePkg/Include/Protocol/FormBrowserEx.h index 512de448d3..5d5aa8fa4e 100644 --- a/MdeModulePkg/Include/Protocol/FormBrowserEx.h +++ b/MdeModulePkg/Include/Protocol/FormBrowserEx.h @@ -1,14 +1,14 @@ /** @file - Extension Form Browser Protocol provides the services that can be used to + Extension Form Browser Protocol provides the services that can be used to register the different hot keys for the standard Browser actions described in UEFI specification. -Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -35,8 +35,8 @@ typedef EDKII_FORM_BROWSER_EXTENSION_PROTOCOL EFI_FORM_BROWSER_EXTENSION_PROTO #define BROWSER_KEEP_CURRENT 3 // -// Browser actions. They can be cominbed together. -// If more than one actions are specified, the action with low bit will be executed first. +// Browser actions. They can be cominbed together. +// If more than one actions are specified, the action with low bit will be executed first. // #define BROWSER_ACTION_UNREGISTER 0 #define BROWSER_ACTION_DISCARD BIT0 @@ -61,11 +61,11 @@ typedef enum { All hot keys have the same scope. The mixed hot keys with the different level are not supported. If no scope is set, the default scope will be FormSet level. After all registered hot keys are removed, previous Scope can reset to another level. - - @param[in] Scope Scope level to be set. - + + @param[in] Scope Scope level to be set. + @retval EFI_SUCCESS Scope is set correctly. - @retval EFI_INVALID_PARAMETER Scope is not the valid value specified in BROWSER_SETTING_SCOPE. + @retval EFI_INVALID_PARAMETER Scope is not the valid value specified in BROWSER_SETTING_SCOPE. @retval EFI_UNSPPORTED Scope level is different from current one that the registered hot keys have. **/ @@ -79,15 +79,15 @@ EFI_STATUS Register the hot key with its browser action, or unregistered the hot key. If the action value is zero, the hot key will be unregistered if it has been registered. If the same hot key has been registered, the new action and help string will override the previous ones. - + @param[in] KeyData A pointer to a buffer that describes the keystroke - information for the hot key. Its type is EFI_INPUT_KEY to + information for the hot key. Its type is EFI_INPUT_KEY to be supported by all ConsoleIn devices. - @param[in] Action Action value that describes what action will be trigged when the hot key is pressed. + @param[in] Action Action value that describes what action will be trigged when the hot key is pressed. @param[in] DefaultId Specifies the type of defaults to retrieve, which is only for DEFAULT action. @param[in] HelpString Help string that describes the hot key information. Its value may be NULL for the unregistered hot key. - + @retval EFI_SUCCESS Hot key is registered or unregistered. @retval EFI_INVALID_PARAMETER KeyData is NULL. **/ @@ -102,7 +102,7 @@ EFI_STATUS /** This handler is responsbile for the left things on normal boot after all UI forms are closed. - For example, it can continue to boot the first boot option. + For example, it can continue to boot the first boot option. It will be used only when EXIT action is trigged as system level. **/ @@ -113,11 +113,11 @@ VOID ); /** - Register Exit handler function. - When more than one handler function is registered, the latter one will override the previous one. - When NULL handler is specified, the previous Exit handler will be unregistered. - - @param[in] Handler Pointer to handler function. + Register Exit handler function. + When more than one handler function is registered, the latter one will override the previous one. + When NULL handler is specified, the previous Exit handler will be unregistered. + + @param[in] Handler Pointer to handler function. **/ typedef diff --git a/MdeModulePkg/Include/Protocol/FormBrowserEx2.h b/MdeModulePkg/Include/Protocol/FormBrowserEx2.h index 1ccc5bd964..ffb5059898 100644 --- a/MdeModulePkg/Include/Protocol/FormBrowserEx2.h +++ b/MdeModulePkg/Include/Protocol/FormBrowserEx2.h @@ -1,14 +1,14 @@ /** @file - Extension Form Browser Protocol provides the services that can be used to + Extension Form Browser Protocol provides the services that can be used to register the different hot keys for the standard Browser actions described in UEFI specification. -Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -48,8 +48,8 @@ BOOLEAN @retval EFI_SUCCESS Execute the request action succss. **/ -typedef -EFI_STATUS +typedef +EFI_STATUS (EFIAPI *EXECUTE_ACTION) ( IN UINT32 Action, IN UINT16 DefaultId @@ -92,7 +92,7 @@ typedef struct { EFI_FORM_ID FormId; // Find the form EFI_GUID FormSetGuid; // Find the formset. EFI_HII_HANDLE HiiHandle; // Find the HII handle - UINT32 Attribute; // Hide or grayout ... + UINT32 Attribute; // Hide or grayout ... } QUESTION_ATTRIBUTE_OVERRIDE; #define FORM_QUESTION_ATTRIBUTE_OVERRIDE_FROM_LINK(a) CR (a, QUESTION_ATTRIBUTE_OVERRIDE, Link, FORM_QUESTION_ATTRIBUTE_OVERRIDE_SIGNATURE) diff --git a/MdeModulePkg/Include/Protocol/GenericMemoryTest.h b/MdeModulePkg/Include/Protocol/GenericMemoryTest.h index 163e76d8f4..f0ac3d79f3 100644 --- a/MdeModulePkg/Include/Protocol/GenericMemoryTest.h +++ b/MdeModulePkg/Include/Protocol/GenericMemoryTest.h @@ -1,13 +1,13 @@ /** @file This protocol defines the generic memory test interfaces in Dxe phase. -Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -36,12 +36,12 @@ typedef enum { /** Initialize the generic memory test. - @param This The protocol instance pointer. - @param Level The coverage level of the memory test. - @param RequireSoftECCInit Indicate if the memory need software ECC init. + @param This The protocol instance pointer. + @param Level The coverage level of the memory test. + @param RequireSoftECCInit Indicate if the memory need software ECC init. - @retval EFI_SUCCESS The generic memory test is initialized correctly. - @retval EFI_NO_MEDIA The system had no memory to be tested. + @retval EFI_SUCCESS The generic memory test is initialized correctly. + @retval EFI_NO_MEDIA The system had no memory to be tested. **/ typedef @@ -56,12 +56,12 @@ EFI_STATUS /** Perform the memory test. - @param This The protocol instance pointer. - @param TestedMemorySize Return the tested extended memory size. - @param TotalMemorySize Return the whole system physical memory size. - The total memory size does not include memory in a slot with a disabled DIMM. + @param This The protocol instance pointer. + @param TestedMemorySize Return the tested extended memory size. + @param TotalMemorySize Return the whole system physical memory size. + The total memory size does not include memory in a slot with a disabled DIMM. @param ErrorOut TRUE if the memory error occured. - @param IfTestAbort Indicates that the user pressed "ESC" to skip the memory test. + @param IfTestAbort Indicates that the user pressed "ESC" to skip the memory test. @retval EFI_SUCCESS One block of memory passed the test. @retval EFI_NOT_FOUND All memory blocks have already been tested. @@ -82,7 +82,7 @@ EFI_STATUS /** Finish the memory test. - @param This The protocol instance pointer. + @param This The protocol instance pointer. @retval EFI_SUCCESS Success. All resources used in the memory test are freed. @@ -96,12 +96,12 @@ EFI_STATUS /** Provides the capability to test the compatible range used by some special drivers. - @param This The protocol instance pointer. + @param This The protocol instance pointer. @param StartAddress The start address of the compatible memory range that must be below 16M. - @param Length The compatible memory range's length. - - @retval EFI_SUCCESS The compatible memory range pass the memory test. + @param Length The compatible memory range's length. + + @retval EFI_SUCCESS The compatible memory range pass the memory test. @retval EFI_INVALID_PARAMETER The compatible memory range are not below Low 16M. **/ diff --git a/MdeModulePkg/Include/Protocol/LoadPe32Image.h b/MdeModulePkg/Include/Protocol/LoadPe32Image.h index b56dd37ad0..41bf17e0a4 100644 --- a/MdeModulePkg/Include/Protocol/LoadPe32Image.h +++ b/MdeModulePkg/Include/Protocol/LoadPe32Image.h @@ -3,13 +3,13 @@ Load Pe32 Image protocol enables loading and unloading EFI images into memory and executing those images. This protocol uses File Device Path to get an EFI image. -Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -52,10 +52,10 @@ typedef struct _EFI_PE32_IMAGE_PROTOCOL EFI_PE32_IMAGE_PROTOCOL; @retval EFI_LOAD_ERROR Image was not loaded because the image format was corrupt or not understood. @retval EFI_DEVICE_ERROR Image was not loaded because the device returned a read error. - @retval EFI_ACCESS_DENIED Image was not loaded because the platform policy prohibits the + @retval EFI_ACCESS_DENIED Image was not loaded because the platform policy prohibits the image from being loaded. NULL is returned in *ImageHandle. - @retval EFI_SECURITY_VIOLATION Image was loaded and an ImageHandle was created with a - valid EFI_LOADED_IMAGE_PROTOCOL. However, the current + @retval EFI_SECURITY_VIOLATION Image was loaded and an ImageHandle was created with a + valid EFI_LOADED_IMAGE_PROTOCOL. However, the current platform policy specifies that the image should not be started. **/ typedef diff --git a/MdeModulePkg/Include/Protocol/PlatformLogo.h b/MdeModulePkg/Include/Protocol/PlatformLogo.h index c25e7b04cb..3582ea2670 100644 --- a/MdeModulePkg/Include/Protocol/PlatformLogo.h +++ b/MdeModulePkg/Include/Protocol/PlatformLogo.h @@ -3,12 +3,12 @@ image with the display attribute. Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +http://opensource.org/licenses/bsd-license.php. + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Include/Protocol/Print2.h b/MdeModulePkg/Include/Protocol/Print2.h index 61b574e78a..dd5dd741c2 100644 --- a/MdeModulePkg/Include/Protocol/Print2.h +++ b/MdeModulePkg/Include/Protocol/Print2.h @@ -4,13 +4,13 @@ These protocols define basic print functions to print the format unicode and ascii string. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -219,26 +219,26 @@ UINTN /** Converts a decimal value to a Null-terminated Unicode string. - - Converts the decimal number specified by Value to a Null-terminated Unicode - string specified by Buffer containing at most Width characters. No padding of spaces + + Converts the decimal number specified by Value to a Null-terminated Unicode + string specified by Buffer containing at most Width characters. No padding of spaces is ever performed. If Width is 0, then a width of MAXIMUM_VALUE_CHARACTERS is assumed. This function returns the number of Unicode characters in Buffer, not including the Null-terminator. - If the conversion contains more than Width characters, this function returns + If the conversion contains more than Width characters, this function returns the first Width characters in the conversion, along with the total number of characters in the conversion. - Additional conversion parameters are specified in Flags. - + Additional conversion parameters are specified in Flags. + The Flags bit LEFT_JUSTIFY is always ignored. All conversions are left justified in Buffer. If Width is 0, PREFIX_ZERO is ignored in Flags. If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and commas are inserted every 3rd digit starting from the right. - If RADIX_HEX is set in Flags, then the output buffer will be + If RADIX_HEX is set in Flags, then the output buffer will be formatted in hexadecimal format. If Value is < 0 and RADIX_HEX is not set in Flags, then the fist character in Buffer is a '-'. - If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored, - then Buffer is padded with '0' characters so the combination of the optional '-' + If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored, + then Buffer is padded with '0' characters so the combination of the optional '-' sign character, '0' characters, digit characters for Value, and the Null-terminator add up to Width characters. If both COMMA_TYPE and RADIX_HEX are set in Flags, then ASSERT(). @@ -254,7 +254,7 @@ UINTN @param Value The 64-bit signed value to convert to a string. @param Width The maximum number of Unicode characters to place in Buffer, not including the Null-terminator. - + @return The number of Unicode characters in Buffer not including the Null-terminator. **/ @@ -455,28 +455,28 @@ UINTN /** Converts a decimal value to a Null-terminated ASCII string. - - Converts the decimal number specified by Value to a Null-terminated ASCII string + + Converts the decimal number specified by Value to a Null-terminated ASCII string specified by Buffer containing at most Width characters. No padding of spaces is ever performed. If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed. The number of ASCII characters in Buffer is returned not including the Null-terminator. If the conversion contains more than Width characters, then only the first Width characters are returned, and the total number of characters required to perform the conversion is returned. - Additional conversion parameters are specified in Flags. + Additional conversion parameters are specified in Flags. The Flags bit LEFT_JUSTIFY is always ignored. All conversions are left justified in Buffer. If Width is 0, PREFIX_ZERO is ignored in Flags. If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and commas are inserted every 3rd digit starting from the right. - If RADIX_HEX is set in Flags, then the output buffer will be + If RADIX_HEX is set in Flags, then the output buffer will be formatted in hexadecimal format. If Value is < 0 and RADIX_HEX is not set in Flags, then the fist character in Buffer is a '-'. - If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored, - then Buffer is padded with '0' characters so the combination of the optional '-' + If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored, + then Buffer is padded with '0' characters so the combination of the optional '-' sign character, '0' characters, digit characters for Value, and the Null-terminator add up to Width characters. - + If Buffer is NULL, then ASSERT(). If unsupported bits are set in Flags, then ASSERT(). If both COMMA_TYPE and RADIX_HEX are set in Flags, then ASSERT(). @@ -488,7 +488,7 @@ UINTN @param Value The 64-bit signed value to convert to a string. @param Width The maximum number of ASCII characters to place in Buffer, not including the Null-terminator. - + @return The number of ASCII characters in Buffer not including the Null-terminator. **/ diff --git a/MdeModulePkg/Include/Protocol/SmmFaultTolerantWrite.h b/MdeModulePkg/Include/Protocol/SmmFaultTolerantWrite.h index a12e53b740..ee8f03f4fd 100644 --- a/MdeModulePkg/Include/Protocol/SmmFaultTolerantWrite.h +++ b/MdeModulePkg/Include/Protocol/SmmFaultTolerantWrite.h @@ -1,18 +1,18 @@ /** @file SMM Fault Tolerant Write protocol is related to EDK II-specific implementation of FTW, - provides boot-time service for fault tolerant write capability for block devices in - EFI SMM environment. The protocol provides for non-volatile storage of the intermediate - data and private information a caller would need to recover from a critical fault, - such as a power failure. - -Copyright (c) 2010, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. + provides boot-time service for fault tolerant write capability for block devices in + EFI SMM environment. The protocol provides for non-volatile storage of the intermediate + data and private information a caller would need to recover from a critical fault, + such as a power failure. + +Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -27,10 +27,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. } // -// SMM Fault Tolerant Write protocol structure is the same as Fault Tolerant Write protocol. -// The SMM one is intend to run in SMM environment, which means it can be used by -// SMM drivers after ExitPmAuth. -// +// SMM Fault Tolerant Write protocol structure is the same as Fault Tolerant Write protocol. +// The SMM one is intend to run in SMM environment, which means it can be used by +// SMM drivers after ExitPmAuth. +// typedef EFI_FAULT_TOLERANT_WRITE_PROTOCOL EFI_SMM_FAULT_TOLERANT_WRITE_PROTOCOL; extern EFI_GUID gEfiSmmFaultTolerantWriteProtocolGuid; diff --git a/MdeModulePkg/Include/Protocol/SmmFirmwareVolumeBlock.h b/MdeModulePkg/Include/Protocol/SmmFirmwareVolumeBlock.h index 53480d9737..94a2340468 100644 --- a/MdeModulePkg/Include/Protocol/SmmFirmwareVolumeBlock.h +++ b/MdeModulePkg/Include/Protocol/SmmFirmwareVolumeBlock.h @@ -1,16 +1,16 @@ /** @file SMM Firmware Volume Block protocol is related to EDK II-specific implementation of - FVB driver, provides control over block-oriented firmware devices and is intended + FVB driver, provides control over block-oriented firmware devices and is intended to use in the EFI SMM environment. -Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +http://opensource.org/licenses/bsd-license.php. + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -25,10 +25,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. } // -// SMM Firmware Volume Block protocol structure is the same as Firmware Volume Block -// protocol. The SMM one is intend to run in SMM environment, which means it can be -// used by SMM drivers after ExitPmAuth. -// +// SMM Firmware Volume Block protocol structure is the same as Firmware Volume Block +// protocol. The SMM one is intend to run in SMM environment, which means it can be +// used by SMM drivers after ExitPmAuth. +// typedef EFI_FIRMWARE_VOLUME_BLOCK_PROTOCOL EFI_SMM_FIRMWARE_VOLUME_BLOCK_PROTOCOL; extern EFI_GUID gEfiSmmFirmwareVolumeBlockProtocolGuid; diff --git a/MdeModulePkg/Include/Protocol/SmmSwapAddressRange.h b/MdeModulePkg/Include/Protocol/SmmSwapAddressRange.h index 60a0a2c4a2..b5fe0488cf 100644 --- a/MdeModulePkg/Include/Protocol/SmmSwapAddressRange.h +++ b/MdeModulePkg/Include/Protocol/SmmSwapAddressRange.h @@ -1,20 +1,20 @@ /** @file - The EFI_SMM_SWAP_ADDRESS_RANGE_PROTOCOL is related to EDK II-specific implementation - and used to abstract the swap operation of boot block and backup block of FV in EFI - SMM environment. This swap is especially needed when updating the boot block of FV. - If a power failure happens during the boot block update, the swapped backup block - (now the boot block) can boot the machine with the old boot block backed up in it. - The swap operation is platform dependent, so other protocols such as SMM FTW (Fault + The EFI_SMM_SWAP_ADDRESS_RANGE_PROTOCOL is related to EDK II-specific implementation + and used to abstract the swap operation of boot block and backup block of FV in EFI + SMM environment. This swap is especially needed when updating the boot block of FV. + If a power failure happens during the boot block update, the swapped backup block + (now the boot block) can boot the machine with the old boot block backed up in it. + The swap operation is platform dependent, so other protocols such as SMM FTW (Fault Tolerant Write) should use this protocol instead of handling hardware directly. -Copyright (c) 2010, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -29,10 +29,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. } // -// SMM Swap Address Range protocol structure is the same as Swap Address Range protocol. -// The SMM one is intend to run in SMM environment, which means it can be used by -// SMM drivers after ExitPmAuth. -// +// SMM Swap Address Range protocol structure is the same as Swap Address Range protocol. +// The SMM one is intend to run in SMM environment, which means it can be used by +// SMM drivers after ExitPmAuth. +// typedef EFI_SWAP_ADDRESS_RANGE_PROTOCOL EFI_SMM_SWAP_ADDRESS_RANGE_PROTOCOL; extern EFI_GUID gEfiSmmSwapAddressRangeProtocolGuid; diff --git a/MdeModulePkg/Include/Protocol/SmmVariable.h b/MdeModulePkg/Include/Protocol/SmmVariable.h index 75ab6c3057..b593977fe1 100644 --- a/MdeModulePkg/Include/Protocol/SmmVariable.h +++ b/MdeModulePkg/Include/Protocol/SmmVariable.h @@ -2,14 +2,14 @@ EFI SMM Variable Protocol is related to EDK II-specific implementation of variables and intended for use as a means to store data in the EFI SMM environment. - Copyright (c) 2010, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php + Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -24,7 +24,7 @@ typedef struct _EFI_SMM_VARIABLE_PROTOCOL EFI_SMM_VARIABLE_PROTOCOL; /// -/// EFI SMM Variable Protocol is intended for use as a means +/// EFI SMM Variable Protocol is intended for use as a means /// to store data in the EFI SMM environment. /// struct _EFI_SMM_VARIABLE_PROTOCOL { @@ -36,4 +36,4 @@ struct _EFI_SMM_VARIABLE_PROTOCOL { extern EFI_GUID gEfiSmmVariableProtocolGuid; -#endif +#endif diff --git a/MdeModulePkg/Include/Protocol/SwapAddressRange.h b/MdeModulePkg/Include/Protocol/SwapAddressRange.h index 3ca87a0e6e..7a1fc17d46 100644 --- a/MdeModulePkg/Include/Protocol/SwapAddressRange.h +++ b/MdeModulePkg/Include/Protocol/SwapAddressRange.h @@ -1,18 +1,18 @@ /** @file -The EFI_SWAP_ADDRESS_RANGE_PROTOCOL is used to abstract the swap operation of boot block -and backup block of FV. This swap is especially needed when updating the boot block of FV. If a -power failure happens during the boot block update, the swapped backup block (now the boot block) -can boot the machine with the old boot block backed up in it. The swap operation is platform dependent, so +The EFI_SWAP_ADDRESS_RANGE_PROTOCOL is used to abstract the swap operation of boot block +and backup block of FV. This swap is especially needed when updating the boot block of FV. If a +power failure happens during the boot block update, the swapped backup block (now the boot block) +can boot the machine with the old boot block backed up in it. The swap operation is platform dependent, so other protocols such as FTW (Fault Tolerant Write) should use this protocol instead of handling hardware directly. -Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -40,17 +40,17 @@ typedef UINT8 EFI_SWAP_LOCK_CAPABILITY; // /** - This function gets the address range location of - boot block and backup block. + This function gets the address range location of + boot block and backup block. - @param This Indicates the calling context. + @param This Indicates the calling context. @param BootBlockBase The base address of current boot block. @param BootBlockSize The size (in bytes) of current boot block. @param BackupBlockBase The base address of current backup block. @param BackupBlockSize The size (in bytes) of current backup block. @retval EFI_SUCCESS The call was successful. - + **/ typedef EFI_STATUS @@ -65,12 +65,12 @@ EFI_STATUS /** This service checks if the boot block and backup block has been swapped. - @param This Indicates the calling context. - @param SwapState True if the boot block and backup block has been swapped. + @param This Indicates the calling context. + @param SwapState True if the boot block and backup block has been swapped. False if the boot block and backup block has not been swapped. @retval EFI_SUCCESS The call was successful. - + **/ typedef EFI_STATUS @@ -82,15 +82,15 @@ EFI_STATUS /** This service swaps the boot block and backup block, or swaps them back. - It also acquires and releases software swap lock during operation. The setting of the new swap state + It also acquires and releases software swap lock during operation. The setting of the new swap state is not affected by the old swap state. - @param This Indicates the calling context. + @param This Indicates the calling context. @param NewSwapState True to swap real boot block and backup block, False to swap them back. @retval EFI_SUCCESS The call was successful. @retval EFI_ABORTED Set swap state error. - + **/ typedef EFI_STATUS @@ -104,14 +104,14 @@ EFI_STATUS /** This service checks if a Real Time Clock (RTC) power failure happened. - If parameter RtcPowerFailed is true after the function returns, RTC power supply failed or was removed. + If parameter RtcPowerFailed is true after the function returns, RTC power supply failed or was removed. It is recommended to check RTC power status before calling GetSwapState(). - @param This Indicates the calling context. - @param RtcPowerFailed True if the RTC (Real Time Clock) power failed or was removed. + @param This Indicates the calling context. + @param RtcPowerFailed True if the RTC (Real Time Clock) power failed or was removed. @retval EFI_SUCCESS The call was successful. - + **/ typedef EFI_STATUS @@ -121,15 +121,15 @@ EFI_STATUS ); /** - This service returns all lock methods for swap operations that the current platform + This service returns all lock methods for swap operations that the current platform supports. Could be software lock, hardware lock, or unsupport lock. Note that software and hardware lock methods can be used simultaneously. @param This Indicates the calling context. - @param LockCapability The current lock method for swap operations. + @param LockCapability The current lock method for swap operations. @retval EFI_SUCCESS The call was successful. - + **/ typedef EFI_STATUS @@ -150,7 +150,7 @@ EFI_STATUS @param NewLockState True to acquire lock; False to release lock. @retval EFI_SUCCESS The call was successful. - + **/ typedef EFI_STATUS diff --git a/MdeModulePkg/Include/Protocol/UfsHostController.h b/MdeModulePkg/Include/Protocol/UfsHostController.h index 909c981729..694ae30315 100644 --- a/MdeModulePkg/Include/Protocol/UfsHostController.h +++ b/MdeModulePkg/Include/Protocol/UfsHostController.h @@ -2,13 +2,13 @@ EDKII Universal Flash Storage Host Controller Protocol. -Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -70,24 +70,24 @@ typedef enum { EdkiiUfsHcOperationMaximum } EDKII_UFS_HOST_CONTROLLER_OPERATION; -/** +/** Provides the UFS controller-specific addresses needed to access system memory. - + @param This A pointer to the EFI_UFS_HOST_CONTROLLER_PROTOCOL instance. @param Operation Indicates if the bus master is going to read or write to system memory. @param HostAddress The system memory address to map to the UFS controller. @param NumberOfBytes On input the number of bytes to map. On output the number of bytes - that were mapped. + that were mapped. @param DeviceAddress The resulting map address for the bus master UFS controller to use to - access the hosts HostAddress. + access the hosts HostAddress. @param Mapping A resulting value to pass to Unmap(). - + @retval EFI_SUCCESS The range was mapped for the returned NumberOfBytes. - @retval EFI_UNSUPPORTED The HostAddress cannot be mapped as a common buffer. + @retval EFI_UNSUPPORTED The HostAddress cannot be mapped as a common buffer. @retval EFI_INVALID_PARAMETER One or more parameters are invalid. @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources. @retval EFI_DEVICE_ERROR The system hardware could not map the requested address. - + **/ typedef EFI_STATUS @@ -100,15 +100,15 @@ EFI_STATUS OUT VOID **Mapping ); -/** +/** Completes the Map() operation and releases any corresponding resources. - - @param This A pointer to the EFI_UFS_HOST_CONTROLLER_PROTOCOL instance. + + @param This A pointer to the EFI_UFS_HOST_CONTROLLER_PROTOCOL instance. @param Mapping The mapping value returned from Map(). - + @retval EFI_SUCCESS The range was unmapped. @retval EFI_DEVICE_ERROR The data was not committed to the target system memory. - + **/ typedef EFI_STATUS @@ -117,25 +117,25 @@ EFI_STATUS IN VOID *Mapping ); -/** +/** Allocates pages that are suitable for an EfiUfsHcOperationBusMasterCommonBuffer - mapping. - + mapping. + @param This A pointer to the EFI_UFS_HOST_CONTROLLER_PROTOCOL instance. @param Type This parameter is not used and must be ignored. @param MemoryType The type of memory to allocate, EfiBootServicesData or - EfiRuntimeServicesData. - @param Pages The number of pages to allocate. + EfiRuntimeServicesData. + @param Pages The number of pages to allocate. @param HostAddress A pointer to store the base system memory address of the - allocated range. + allocated range. @param Attributes The requested bit mask of attributes for the allocated range. - + @retval EFI_SUCCESS The requested memory pages were allocated. @retval EFI_UNSUPPORTED Attributes is unsupported. The only legal attribute bits are - MEMORY_WRITE_COMBINE and MEMORY_CACHED. + MEMORY_WRITE_COMBINE and MEMORY_CACHED. @retval EFI_INVALID_PARAMETER One or more parameters are invalid. - @retval EFI_OUT_OF_RESOURCES The memory pages could not be allocated. - + @retval EFI_OUT_OF_RESOURCES The memory pages could not be allocated. + **/ typedef EFI_STATUS @@ -148,17 +148,17 @@ EFI_STATUS IN UINT64 Attributes ); -/** +/** Frees memory that was allocated with AllocateBuffer(). - - @param This A pointer to the EFI_UFS_HOST_CONTROLLER_PROTOCOL instance. - @param Pages The number of pages to free. - @param HostAddress The base system memory address of the allocated range. - + + @param This A pointer to the EFI_UFS_HOST_CONTROLLER_PROTOCOL instance. + @param Pages The number of pages to free. + @param HostAddress The base system memory address of the allocated range. + @retval EFI_SUCCESS The requested memory pages were freed. @retval EFI_INVALID_PARAMETER The memory range specified by HostAddress and Pages was not allocated with AllocateBuffer(). - + **/ typedef EFI_STATUS @@ -168,16 +168,16 @@ EFI_STATUS IN VOID *HostAddress ); -/** +/** Flushes all posted write transactions from the UFS bus to attached UFS device. - - @param This A pointer to the EFI_UFS_HOST_CONTROLLER_PROTOCOL instance. - + + @param This A pointer to the EFI_UFS_HOST_CONTROLLER_PROTOCOL instance. + @retval EFI_SUCCESS The posted write transactions were flushed from the UFS bus - to attached UFS device. + to attached UFS device. @retval EFI_DEVICE_ERROR The posted write transactions were not flushed from the UFS - bus to attached UFS device due to a hardware error. - + bus to attached UFS device due to a hardware error. + **/ typedef EFI_STATUS diff --git a/MdeModulePkg/Include/Protocol/VariableLock.h b/MdeModulePkg/Include/Protocol/VariableLock.h index a2a73bc161..f57daa4a2f 100644 --- a/MdeModulePkg/Include/Protocol/VariableLock.h +++ b/MdeModulePkg/Include/Protocol/VariableLock.h @@ -3,14 +3,14 @@ and intended for use as a means to mark a variable read-only after the event EFI_END_OF_DXE_EVENT_GUID is signaled. - Copyright (c) 2013, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php + Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -59,5 +59,5 @@ struct _EDKII_VARIABLE_LOCK_PROTOCOL { extern EFI_GUID gEdkiiVariableLockProtocolGuid; -#endif +#endif diff --git a/MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatformHookLibNull.c b/MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatformHookLibNull.c index bd1a31a36e..6c3144621d 100644 --- a/MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatformHookLibNull.c +++ b/MdeModulePkg/Library/BasePlatformHookLibNull/BasePlatformHookLibNull.c @@ -1,7 +1,7 @@ /** @file Null Platform Hook Library instance. - Copyright (c) 2010, Intel Corporation. All rights reserved.
+ Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -18,13 +18,13 @@ /** Performs platform specific initialization required for the CPU to access the hardware associated with a SerialPortLib instance. This function does - not intiailzie the serial port hardware itself. Instead, it initializes - hardware devices that are required for the CPU to access the serial port + not intiailzie the serial port hardware itself. Instead, it initializes + hardware devices that are required for the CPU to access the serial port hardware. This function may be called more than once. @retval RETURN_SUCCESS The platform specific initialization succeeded. @retval RETURN_DEVICE_ERROR The platform specific initialization could not be completed. - + **/ RETURN_STATUS EFIAPI diff --git a/MdeModulePkg/Library/BaseResetSystemLibNull/BaseResetSystemLibNull.c b/MdeModulePkg/Library/BaseResetSystemLibNull/BaseResetSystemLibNull.c index 1a1242640c..59d720895b 100644 --- a/MdeModulePkg/Library/BaseResetSystemLibNull/BaseResetSystemLibNull.c +++ b/MdeModulePkg/Library/BaseResetSystemLibNull/BaseResetSystemLibNull.c @@ -1,7 +1,7 @@ /** @file Null Reset System Library instance that only generates ASSERT() conditions. - Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -19,11 +19,11 @@ /** This function causes a system-wide reset (cold reset), in which - all circuitry within the system returns to its initial state. This type of reset + all circuitry within the system returns to its initial state. This type of reset is asynchronous to system operation and operates without regard to cycle boundaries. - If this function returns, it means that the system does not support cold reset. + If this function returns, it means that the system does not support cold reset. **/ VOID EFIAPI @@ -35,7 +35,7 @@ ResetCold ( } /** - This function causes a system-wide initialization (warm reset), in which all processors + This function causes a system-wide initialization (warm reset), in which all processors are set to their initial state. Pending cycles are not corrupted. If this function returns, it means that the system does not support warm reset. @@ -50,7 +50,7 @@ ResetWarm ( } /** - This function causes the system to enter a power state equivalent + This function causes the system to enter a power state equivalent to the ACPI G2/S5 or G3 states. If this function returns, it means that the system does not support shut down reset. diff --git a/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c b/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c index 6532c4d26d..d1a94b67eb 100644 --- a/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c +++ b/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.c @@ -2,7 +2,7 @@ 16550 UART Serial Port library functions (C) Copyright 2014 Hewlett-Packard Development Company, L.P.
- Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
Copyright (c) 2018, AMD Incorporated. All rights reserved.
This program and the accompanying materials @@ -65,11 +65,11 @@ typedef struct { } PCI_UART_DEVICE_INFO; /** - Read an 8-bit 16550 register. If PcdSerialUseMmio is TRUE, then the value is read from + Read an 8-bit 16550 register. If PcdSerialUseMmio is TRUE, then the value is read from MMIO space. If PcdSerialUseMmio is FALSE, then the value is read from I/O space. The - parameter Offset is added to the base address of the 16550 registers that is specified - by PcdSerialRegisterBase. - + parameter Offset is added to the base address of the 16550 registers that is specified + by PcdSerialRegisterBase. + @param Base The base address register of UART device. @param Offset The offset of the 16550 register to read. @@ -92,9 +92,9 @@ SerialPortReadRegister ( /** Write an 8-bit 16550 register. If PcdSerialUseMmio is TRUE, then the value is written to MMIO space. If PcdSerialUseMmio is FALSE, then the value is written to I/O space. The - parameter Offset is added to the base address of the 16550 registers that is specified - by PcdSerialRegisterBase. - + parameter Offset is added to the base address of the 16550 registers that is specified + by PcdSerialRegisterBase. + @param Base The base address register of UART device. @param Offset The offset of the 16550 register to write. @param Value The value to write to the 16550 register specified by Offset. @@ -117,11 +117,11 @@ SerialPortWriteRegister ( } /** - Update the value of an 16-bit PCI configuration register in a PCI device. If the - PCI Configuration register specified by PciAddress is already programmed with a - non-zero value, then return the current value. Otherwise update the PCI configuration + Update the value of an 16-bit PCI configuration register in a PCI device. If the + PCI Configuration register specified by PciAddress is already programmed with a + non-zero value, then return the current value. Otherwise update the PCI configuration register specified by PciAddress with the value specified by Value and return the - value programmed into the PCI configuration register. All values must be masked + value programmed into the PCI configuration register. All values must be masked using the bitmask specified by Mask. @param PciAddress PCI Library address of the PCI Configuration register to update. @@ -137,7 +137,7 @@ SerialPortLibUpdatePciRegister16 ( ) { UINT16 CurrentValue; - + CurrentValue = PciRead16 (PciAddress) & Mask; if (CurrentValue != 0) { return CurrentValue; @@ -146,11 +146,11 @@ SerialPortLibUpdatePciRegister16 ( } /** - Update the value of an 32-bit PCI configuration register in a PCI device. If the - PCI Configuration register specified by PciAddress is already programmed with a - non-zero value, then return the current value. Otherwise update the PCI configuration + Update the value of an 32-bit PCI configuration register in a PCI device. If the + PCI Configuration register specified by PciAddress is already programmed with a + non-zero value, then return the current value. Otherwise update the PCI configuration register specified by PciAddress with the value specified by Value and return the - value programmed into the PCI configuration register. All values must be masked + value programmed into the PCI configuration register. All values must be masked using the bitmask specified by Mask. @param PciAddress PCI Library address of the PCI Configuration register to update. @@ -168,7 +168,7 @@ SerialPortLibUpdatePciRegister32 ( ) { UINT32 CurrentValue; - + CurrentValue = PciRead32 (PciAddress) & Mask; if (CurrentValue != 0) { return CurrentValue; @@ -177,11 +177,11 @@ SerialPortLibUpdatePciRegister32 ( } /** - Retrieve the I/O or MMIO base address register for the PCI UART device. - - This function assumes Root Bus Numer is Zero, and enables I/O and MMIO in PCI UART - Device if they are not already enabled. - + Retrieve the I/O or MMIO base address register for the PCI UART device. + + This function assumes Root Bus Numer is Zero, and enables I/O and MMIO in PCI UART + Device if they are not already enabled. + @return The base address register of the UART device. **/ @@ -210,10 +210,10 @@ GetSerialRegisterBase ( // Get PCI Device Info // DeviceInfo = (PCI_UART_DEVICE_INFO *) PcdGetPtr (PcdSerialPciDeviceInfo); - + // // If PCI Device Info is empty, then assume fixed address UART and return PcdSerialRegisterBase - // + // if (DeviceInfo->Device == 0xff) { return (UINTN)PcdGet64 (PcdSerialRegisterBase); } @@ -225,17 +225,17 @@ GetSerialRegisterBase ( ParentMemoryLimit = 0xfff00000 >> 16; ParentIoBase = 0 >> 12; ParentIoLimit = 0xf000 >> 12; - + // // Enable I/O and MMIO in PCI Bridge - // Assume Root Bus Numer is Zero. + // Assume Root Bus Numer is Zero. // for (BusNumber = 0; (DeviceInfo + 1)->Device != 0xff; DeviceInfo++) { // // Compute PCI Lib Address to PCI to PCI Bridge // PciLibAddress = PCI_LIB_ADDRESS (BusNumber, DeviceInfo->Device, DeviceInfo->Function, 0); - + // // Retrieve and verify the bus numbers in the PCI to PCI Bridge // @@ -258,10 +258,10 @@ GetSerialRegisterBase ( if (MemoryLimit < MemoryBase) { return 0; } - + // // If PCI Bridge MMIO window is not in the address range decoded by the parent PCI Bridge, then return 0 - // + // if (MemoryBase < ParentMemoryBase || MemoryBase > ParentMemoryLimit || MemoryLimit > ParentMemoryLimit) { return 0; } @@ -280,17 +280,17 @@ GetSerialRegisterBase ( } else { IoBase = (PciRead16 (PciLibAddress + OFFSET_OF (PCI_TYPE01, Bridge.IoBaseUpper16)) << 4) | (IoBase >> 4); } - + // // If PCI Bridge I/O window is disabled, then return 0 // if (IoLimit < IoBase) { return 0; } - + // // If PCI Bridge I/O window is not in the address range decoded by the parent PCI Bridge, then return 0 - // + // if (IoBase < ParentIoBase || IoBase > ParentIoLimit || IoLimit > ParentIoLimit) { return 0; } @@ -303,7 +303,7 @@ GetSerialRegisterBase ( // Compute PCI Lib Address to PCI UART // PciLibAddress = PCI_LIB_ADDRESS (BusNumber, DeviceInfo->Device, DeviceInfo->Function, 0); - + // // Find the first IO or MMIO BAR // @@ -336,16 +336,16 @@ GetSerialRegisterBase ( // // Program UART BAR - // + // SerialRegisterBase = SerialPortLibUpdatePciRegister32 ( PciLibAddress + PCI_BASE_ADDRESSREG_OFFSET + BarIndex * 4, - (UINT32)PcdGet64 (PcdSerialRegisterBase), + (UINT32)PcdGet64 (PcdSerialRegisterBase), RegisterBaseMask ); // // Verify that the UART BAR is in the address range decoded by the parent PCI Bridge - // + // if (PcdGetBool (PcdSerialUseMmio)) { if (((SerialRegisterBase >> 16) & 0xfff0) < ParentMemoryBase || ((SerialRegisterBase >> 16) & 0xfff0) > ParentMemoryLimit) { return 0; @@ -355,7 +355,7 @@ GetSerialRegisterBase ( return 0; } } - + // // Enable I/O and MMIO in PCI UART Device if they are not already enabled // @@ -376,7 +376,7 @@ GetSerialRegisterBase ( SerialPortWriteRegister (SerialRegisterBase, R_UART_FCR, (UINT8)(PcdGet8 (PcdSerialFifoControl) & (B_UART_FCR_FIFOE | B_UART_FCR_FIFO64))); } } - + // // Get PCI Device Info // @@ -384,22 +384,22 @@ GetSerialRegisterBase ( // // Enable I/O or MMIO in PCI Bridge - // Assume Root Bus Numer is Zero. + // Assume Root Bus Numer is Zero. // for (BusNumber = 0; (DeviceInfo + 1)->Device != 0xff; DeviceInfo++) { // // Compute PCI Lib Address to PCI to PCI Bridge // PciLibAddress = PCI_LIB_ADDRESS (BusNumber, DeviceInfo->Device, DeviceInfo->Function, 0); - + // // Enable the I/O or MMIO decode windows in the PCI to PCI Bridge // PciOr16 ( - PciLibAddress + PCI_COMMAND_OFFSET, + PciLibAddress + PCI_COMMAND_OFFSET, PcdGetBool (PcdSerialUseMmio) ? EFI_PCI_COMMAND_MEMORY_SPACE : EFI_PCI_COMMAND_IO_SPACE ); - + // // Force D0 state if a Power Management and Status Register is specified // @@ -408,10 +408,10 @@ GetSerialRegisterBase ( PciAnd16 (PciLibAddress + DeviceInfo->PowerManagementStatusAndControlRegister, (UINT16)~(BIT0 | BIT1)); } } - + BusNumber = PciRead8 (PciLibAddress + PCI_BRIDGE_SECONDARY_BUS_REGISTER_OFFSET); } - + return SerialRegisterBase; } @@ -445,7 +445,7 @@ SerialPortWritable ( return (BOOLEAN) ((SerialPortReadRegister (SerialRegisterBase, R_UART_MSR) & (B_UART_MSR_DSR | B_UART_MSR_CTS)) == (B_UART_MSR_DSR | B_UART_MSR_CTS)); } else { // - // Wait for both DSR and CTS to be set OR for DSR to be clear. + // Wait for both DSR and CTS to be set OR for DSR to be clear. // DSR is set if a cable is connected. // CTS is set if it is ok to transmit data // @@ -465,11 +465,11 @@ SerialPortWritable ( /** Initialize the serial device hardware. - + If no initialization is required, then return RETURN_SUCCESS. If the serial device was successfully initialized, then return RETURN_SUCCESS. If the serial device could not be initialized, then return RETURN_DEVICE_ERROR. - + @retval RETURN_SUCCESS The serial device was initialized. @retval RETURN_DEVICE_ERROR The serial device could not be initialized. @@ -483,7 +483,7 @@ SerialPortInitialize ( RETURN_STATUS Status; UINTN SerialRegisterBase; UINT32 Divisor; - UINT32 CurrentDivisor; + UINT32 CurrentDivisor; BOOLEAN Initialized; // @@ -535,7 +535,7 @@ SerialPortInitialize ( // Verify that both the transmit FIFO and the shift register are empty. // while ((SerialPortReadRegister (SerialRegisterBase, R_UART_LSR) & (B_UART_LSR_TEMT | B_UART_LSR_TXRDY)) != (B_UART_LSR_TEMT | B_UART_LSR_TXRDY)); - + // // Configure baud rate // @@ -563,20 +563,20 @@ SerialPortInitialize ( // // Put Modem Control Register(MCR) into its reset state of 0x00. - // + // SerialPortWriteRegister (SerialRegisterBase, R_UART_MCR, 0x00); return RETURN_SUCCESS; } /** - Write data from buffer to serial device. + Write data from buffer to serial device. - Writes NumberOfBytes data bytes from Buffer to the serial device. + Writes NumberOfBytes data bytes from Buffer to the serial device. The number of bytes actually written to the serial device is returned. If the return value is less than NumberOfBytes, then the write operation failed. - If Buffer is NULL, then ASSERT(). + If Buffer is NULL, then ASSERT(). If NumberOfBytes is zero, then return 0. @@ -584,7 +584,7 @@ SerialPortInitialize ( @param NumberOfBytes Number of bytes to written to the serial device. @retval 0 NumberOfBytes is 0. - @retval >0 The number of bytes written to the serial device. + @retval >0 The number of bytes written to the serial device. If this value is less than NumberOfBytes, then the write operation failed. **/ @@ -608,7 +608,7 @@ SerialPortWrite ( if (SerialRegisterBase ==0) { return 0; } - + if (NumberOfBytes == 0) { // // Flush the hardware @@ -671,7 +671,7 @@ SerialPortWrite ( @param NumberOfBytes Number of bytes to read from the serial device. @retval 0 NumberOfBytes is 0. - @retval >0 The number of bytes read from the serial device. + @retval >0 The number of bytes read from the serial device. If this value is less than NumberOfBytes, then the read operation failed. **/ @@ -696,7 +696,7 @@ SerialPortRead ( } Mcr = (UINT8)(SerialPortReadRegister (SerialRegisterBase, R_UART_MCR) & ~B_UART_MCR_RTS); - + for (Result = 0; NumberOfBytes-- != 0; Result++, Buffer++) { // // Wait for the serial port to have some data. @@ -715,13 +715,13 @@ SerialPortRead ( // SerialPortWriteRegister (SerialRegisterBase, R_UART_MCR, Mcr); } - + // // Read byte from the receive buffer. // *Buffer = SerialPortReadRegister (SerialRegisterBase, R_UART_RXBUF); } - + return Result; } @@ -744,7 +744,7 @@ SerialPortPoll ( ) { UINTN SerialRegisterBase; - + SerialRegisterBase = GetSerialRegisterBase (); if (SerialRegisterBase ==0) { return FALSE; @@ -761,15 +761,15 @@ SerialPortPoll ( SerialPortWriteRegister (SerialRegisterBase, R_UART_MCR, (UINT8)(SerialPortReadRegister (SerialRegisterBase, R_UART_MCR) & ~B_UART_MCR_RTS)); } return TRUE; - } - + } + if (PcdGetBool (PcdSerialUseHardwareFlowControl)) { // // Set RTS to let the peer send some data // SerialPortWriteRegister (SerialRegisterBase, R_UART_MCR, (UINT8)(SerialPortReadRegister (SerialRegisterBase, R_UART_MCR) | B_UART_MCR_RTS)); } - + return FALSE; } diff --git a/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf b/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf index bb42f89676..64606b117f 100644 --- a/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf +++ b/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf @@ -1,7 +1,7 @@ ## @file # SerialPortLib instance for 16550 UART. # -# Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at @@ -33,7 +33,7 @@ [Sources] BaseSerialPortLib16550.c - + [Pcd] gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseMmio ## CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdSerialUseHardwareFlowControl ## CONSUMES diff --git a/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.uni b/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.uni index 04d88b37f3..110a2e3921 100644 --- a/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.uni +++ b/MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.uni @@ -3,13 +3,13 @@ // // SerialPortLib instance for 16550 UART. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c index e14c097510..3293e9e03c 100644 --- a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c +++ b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.c @@ -2,7 +2,7 @@ This library is only intended to be used by PlatformBootManagerLib to show progress bar and LOGO. -Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
Copyright (c) 2016, Microsoft Corporation
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. @@ -292,7 +292,7 @@ BootLogoEnableLogo ( Status = EFI_SUCCESS; } else { // - // More than one Logo displayed, get merged BltBuffer using VideoToBuffer operation. + // More than one Logo displayed, get merged BltBuffer using VideoToBuffer operation. // if (Blt != NULL) { FreePool (Blt); @@ -366,7 +366,7 @@ BootLogoEnableLogo ( } /** - Use SystemTable Conout to turn on video based Simple Text Out consoles. The + Use SystemTable Conout to turn on video based Simple Text Out consoles. The Simple Text Out screens will now be synced up with all non video output devices @retval EFI_SUCCESS UGA devices are back in text mode and synced up. diff --git a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf index 47969cc05a..a2afc9e089 100644 --- a/MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf +++ b/MdeModulePkg/Library/BootLogoLib/BootLogoLib.inf @@ -1,17 +1,17 @@ ## @file # This library is only intended to be used by PlatformBootManagerLib # to show progress bar and logo. -# -# Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.
+# +# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
# Copyright (c) 2016, Microsoft Corporation
# This program and the accompanying materials are licensed and made available under # the terms and conditions of the BSD License that accompanies this distribution. # The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php. -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# +# ## [Defines] @@ -31,7 +31,7 @@ [Sources] BootLogoLib.c - + [Packages] MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec @@ -49,7 +49,7 @@ [Protocols] gEfiGraphicsOutputProtocolGuid ## SOMETIMES_CONSUMES gEfiUgaDrawProtocolGuid |PcdUgaConsumeSupport ## SOMETIMES_CONSUMES - gEfiBootLogoProtocolGuid ## SOMETIMES_CONSUMES + gEfiBootLogoProtocolGuid ## SOMETIMES_CONSUMES gEdkiiBootLogo2ProtocolGuid ## SOMETIMES_CONSUMES gEfiUserManagerProtocolGuid ## CONSUMES gEdkiiPlatformLogoProtocolGuid ## CONSUMES diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BmLib.c b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BmLib.c index 0ef9bf0934..a12cf77dd5 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BmLib.c +++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BmLib.c @@ -1,7 +1,7 @@ /** @file Utility routines used by boot maintenance modules. -Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -70,7 +70,7 @@ EfiDevicePathInstanceCount ( } /** - Get a string from the Data Hub record based on + Get a string from the Data Hub record based on a device path. @param DevPath The device Path. diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c index fdcb56a9df..b4f4dff98d 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c +++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenance.c @@ -1,7 +1,7 @@ /** @file The functions for Boot Maintainence Main menu. -Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -61,7 +61,7 @@ HII_VENDOR_DEVICE_PATH mBmmHiiVendorDevicePath = { { END_DEVICE_PATH_TYPE, END_ENTIRE_DEVICE_PATH_SUBTYPE, - { + { (UINT8) (END_DEVICE_PATH_LENGTH), (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8) } @@ -118,9 +118,9 @@ CustomizeMenus ( /** This function will change video resolution and text mode - according to defined setup mode or defined boot mode + according to defined setup mode or defined boot mode - @param IsSetupMode Indicate mode is changed to setup mode or boot mode. + @param IsSetupMode Indicate mode is changed to setup mode or boot mode. @retval EFI_SUCCESS Mode is changed successfully. @retval Others Mode failed to be changed. @@ -147,13 +147,13 @@ BmmSetConsoleMode ( EFI_STATUS Status; UINTN Index; UINTN CurrentColumn; - UINTN CurrentRow; + UINTN CurrentRow; MaxGopMode = 0; MaxTextMode = 0; // - // Get current video resolution and text mode + // Get current video resolution and text mode // Status = gBS->HandleProtocol ( gST->ConsoleOutHandle, @@ -171,7 +171,7 @@ BmmSetConsoleMode ( ); if (EFI_ERROR (Status)) { SimpleTextOut = NULL; - } + } if ((GraphicsOutput == NULL) || (SimpleTextOut == NULL)) { return EFI_UNSUPPORTED; @@ -192,12 +192,12 @@ BmmSetConsoleMode ( NewHorizontalResolution = mBmmBootHorizontalResolution; NewVerticalResolution = mBmmBootVerticalResolution; NewColumns = mBmmBootTextModeColumn; - NewRows = mBmmBootTextModeRow; + NewRows = mBmmBootTextModeRow; } if (GraphicsOutput != NULL) { MaxGopMode = GraphicsOutput->Mode->MaxMode; - } + } if (SimpleTextOut != NULL) { MaxTextMode = SimpleTextOut->Mode->MaxMode; @@ -743,7 +743,7 @@ BootMaintExtractConfig ( @param[in] This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL. @param[in] Configuration A null-terminated Unicode string in - format. + format. @param[out] Progress A pointer to a string filled in with the offset of the most recent '&' before the first failing name / value pair (or the @@ -753,7 +753,7 @@ BootMaintExtractConfig ( successful. @retval EFI_SUCCESS The results have been distributed or are - awaiting distribution. + awaiting distribution. @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the results that must be stored awaiting possible future @@ -802,15 +802,15 @@ BootMaintRouteConfig ( } Status = gBS->LocateProtocol ( - &gEfiHiiConfigRoutingProtocolGuid, - NULL, + &gEfiHiiConfigRoutingProtocolGuid, + NULL, (VOID **)&ConfigRouting ); if (EFI_ERROR (Status)) { return Status; } - Private = BMM_CALLBACK_DATA_FROM_THIS (This); + Private = BMM_CALLBACK_DATA_FROM_THIS (This); // // Get Buffer Storage data from EFI variable // @@ -828,15 +828,15 @@ BootMaintRouteConfig ( &BufferSize, Progress ); - ASSERT_EFI_ERROR (Status); + ASSERT_EFI_ERROR (Status); // - // Compare new and old BMM configuration data and only do action for modified item to + // Compare new and old BMM configuration data and only do action for modified item to // avoid setting unnecessary non-volatile variable // // // Check data which located in BMM main page and save the settings if need - // + // if (CompareMem (&NewBmmData->BootNext, &OldBmmData->BootNext, sizeof (NewBmmData->BootNext)) != 0) { Status = Var_UpdateBootNext (Private); if (EFI_ERROR (Status)) { @@ -847,10 +847,10 @@ BootMaintRouteConfig ( // // Check data which located in Boot Options Menu and save the settings if need - // - if (CompareMem (NewBmmData->BootOptionDel, OldBmmData->BootOptionDel, sizeof (NewBmmData->BootOptionDel)) != 0) { - for (Index = 0; - ((Index < BootOptionMenu.MenuNumber) && (Index < (sizeof (NewBmmData->BootOptionDel) / sizeof (NewBmmData->BootOptionDel[0])))); + // + if (CompareMem (NewBmmData->BootOptionDel, OldBmmData->BootOptionDel, sizeof (NewBmmData->BootOptionDel)) != 0) { + for (Index = 0; + ((Index < BootOptionMenu.MenuNumber) && (Index < (sizeof (NewBmmData->BootOptionDel) / sizeof (NewBmmData->BootOptionDel[0])))); Index ++) { NewMenuEntry = BOpt_GetMenuEntry (&BootOptionMenu, Index); NewLoadContext = (BM_LOAD_CONTEXT *) NewMenuEntry->VariableContext; @@ -891,10 +891,10 @@ BootMaintRouteConfig ( // // Check data which located in Driver Options Menu and save the settings if need - // - if (CompareMem (NewBmmData->DriverOptionDel, OldBmmData->DriverOptionDel, sizeof (NewBmmData->DriverOptionDel)) != 0) { - for (Index = 0; - ((Index < DriverOptionMenu.MenuNumber) && (Index < (sizeof (NewBmmData->DriverOptionDel) / sizeof (NewBmmData->DriverOptionDel[0])))); + // + if (CompareMem (NewBmmData->DriverOptionDel, OldBmmData->DriverOptionDel, sizeof (NewBmmData->DriverOptionDel)) != 0) { + for (Index = 0; + ((Index < DriverOptionMenu.MenuNumber) && (Index < (sizeof (NewBmmData->DriverOptionDel) / sizeof (NewBmmData->DriverOptionDel[0])))); Index++) { NewMenuEntry = BOpt_GetMenuEntry (&DriverOptionMenu, Index); NewLoadContext = (BM_LOAD_CONTEXT *) NewMenuEntry->VariableContext; @@ -909,7 +909,7 @@ BootMaintRouteConfig ( } } - if (CompareMem (NewBmmData->DriverOptionOrder, OldBmmData->DriverOptionOrder, sizeof (NewBmmData->DriverOptionOrder)) != 0) { + if (CompareMem (NewBmmData->DriverOptionOrder, OldBmmData->DriverOptionOrder, sizeof (NewBmmData->DriverOptionOrder)) != 0) { Status = Var_UpdateDriverOrder (Private); if (EFI_ERROR (Status)) { Offset = OFFSET_OF (BMM_FAKE_NV_DATA, DriverOptionOrder); @@ -1128,14 +1128,14 @@ BootMaintCallback ( if (Value == NULL) { return EFI_INVALID_PARAMETER; } - + UpdatePageId (Private, QuestionId); if (QuestionId < FILE_OPTION_OFFSET) { if (QuestionId < CONFIG_OPTION_OFFSET) { switch (QuestionId) { case FORM_BOOT_ADD_ID: - // Leave BMM and enter FileExplorer. + // Leave BMM and enter FileExplorer. ChooseFile (NULL, L".efi", CreateBootOptionFromFile, &File); break; @@ -1213,7 +1213,7 @@ BootMaintCallback ( if ((Value == NULL) || (ActionRequest == NULL)) { return EFI_INVALID_PARAMETER; } - + if (QuestionId == KEY_VALUE_SAVE_AND_EXIT_BOOT) { CleanUselessBeforeSubmit (Private); CurrentFakeNVMap->BootOptionChanged = FALSE; @@ -1247,7 +1247,7 @@ BootMaintCallback ( CurrentFakeNVMap->BootOptionChanged = TRUE; } else if (QuestionId == KEY_VALUE_DRIVER_DESCRIPTION || QuestionId == KEY_VALUE_DRIVER_OPTION) { CurrentFakeNVMap->DriverOptionChanged = TRUE; - } + } if ((QuestionId >= BOOT_OPTION_DEL_QUESTION_ID) && (QuestionId < BOOT_OPTION_DEL_QUESTION_ID + MAX_MENU_NUMBER)) { if (Value->b){ @@ -1718,7 +1718,7 @@ BootMaintenanceManagerUiLibConstructor ( CreateUpdateData(); // - // Update boot maintenance manager page + // Update boot maintenance manager page // InitializeBmmConfig(mBmmCallbackInfo); diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManager.h b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManager.h index 99d1656b9e..e8288b53ad 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManager.h +++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManager.h @@ -1,7 +1,7 @@ /** @file Header file for boot maintenance module. -Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -333,7 +333,7 @@ typedef struct { } BM_MENU_ENTRY; typedef struct { - + UINTN Signature; EFI_HII_HANDLE BmmHiiHandle; @@ -355,7 +355,7 @@ typedef struct { // // BMM main formset callback data. // - + EFI_FORM_ID BmmCurrentPageId; EFI_FORM_ID BmmPreviousPageId; BOOLEAN BmmAskSaveOrNot; @@ -403,7 +403,7 @@ BOpt_GetBootOptions ( @return EFI_SUCESS The functin completes successfully. @retval EFI_OUT_OF_RESOURCES Not enough memory to compete the operation. - + **/ EFI_STATUS @@ -505,12 +505,12 @@ BOpt_GetMenuEntry ( ); /** - Get option number according to Boot#### and BootOrder variable. + Get option number according to Boot#### and BootOrder variable. The value is saved as #### + 1. @param CallbackData The BMM context data. **/ -VOID +VOID GetBootOrder ( IN BMM_CALLBACK_DATA *CallbackData ); @@ -519,9 +519,9 @@ GetBootOrder ( Get driver option order from globalc DriverOptionMenu. @param CallbackData The BMM context data. - + **/ -VOID +VOID GetDriverOrder ( IN BMM_CALLBACK_DATA *CallbackData ); @@ -596,11 +596,11 @@ ChangeVariableDevicePath ( /** Update the multi-instance device path of Terminal Device based on - the global TerminalMenu. If ChangeTernimal is TRUE, the terminal + the global TerminalMenu. If ChangeTernimal is TRUE, the terminal device path in the Terminal Device in TerminalMenu is also updated. @param DevicePath The multi-instance device path. - @param ChangeTerminal TRUE, then device path in the Terminal Device + @param ChangeTerminal TRUE, then device path in the Terminal Device in TerminalMenu is also updated; FALSE, no update. @return EFI_SUCCESS The function completes successfully. @@ -616,8 +616,8 @@ ChangeTerminalDevicePath ( // Variable operation by menu selection // /** - This function create a currently loaded Boot Option from - the BMM. It then appends this Boot Option to the end of + This function create a currently loaded Boot Option from + the BMM. It then appends this Boot Option to the end of the "BootOrder" list. It also append this Boot Opotion to the end of BootOptionMenu. @@ -635,9 +635,9 @@ Var_UpdateBootOption ( /** Delete Boot Option that represent a Deleted state in BootOptionMenu. - @retval EFI_SUCCESS If all boot load option EFI Variables corresponding to + @retval EFI_SUCCESS If all boot load option EFI Variables corresponding to BM_LOAD_CONTEXT marked for deletion is deleted - @return Others If failed to update the "BootOrder" variable after deletion. + @return Others If failed to update the "BootOrder" variable after deletion. **/ EFI_STATUS @@ -646,8 +646,8 @@ Var_DelBootOption ( ); /** - This function create a currently loaded Drive Option from - the BMM. It then appends this Driver Option to the end of + This function create a currently loaded Drive Option from + the BMM. It then appends this Driver Option to the end of the "DriverOrder" list. It append this Driver Opotion to the end of DriverOptionMenu. @@ -719,11 +719,11 @@ Var_UpdateErrorOutOption ( /** This function delete and build Out of Band console device. - + @param MenuIndex Menu index which user select in the terminal menu list. - + @retval EFI_SUCCESS The function complete successfully. - @return The EFI variable can not be saved. See gRT->SetVariable for detail return information. + @return The EFI variable can not be saved. See gRT->SetVariable for detail return information. **/ EFI_STATUS Var_UpdateOutOfBandOption ( @@ -731,7 +731,7 @@ Var_UpdateOutOfBandOption ( ); /** - This function update the "BootNext" EFI Variable. If there is no "BootNex" specified in BMM, + This function update the "BootNext" EFI Variable. If there is no "BootNex" specified in BMM, this EFI Variable is deleted. It also update the BMM context data specified the "BootNext" value. @@ -747,7 +747,7 @@ Var_UpdateBootNext ( ); /** - This function update the "BootOrder" EFI Variable based on BMM Formset's NV map. It then refresh + This function update the "BootOrder" EFI Variable based on BMM Formset's NV map. It then refresh BootOptionMenu with the new "BootOrder" list. @param CallbackData The BMM context data. @@ -816,7 +816,7 @@ RefreshUpdateData ( /** Clean up the dynamic opcode at label and form specified by - both LabelId. + both LabelId. @param LabelId It is both the Form ID and Label ID for opcode deletion. @@ -937,7 +937,7 @@ UpdateOptionPage( @param VarName A Null-terminated Unicode string that is the name of the vendor's variable. - + @param VarGuid A unique identifier for the vendor. @retval EFI_SUCCESS The variable was found and removed @@ -969,7 +969,7 @@ EfiDevicePathInstanceCount ( ); /** - Get a string from the Data Hub record based on + Get a string from the Data Hub record based on a device path. @param DevPath The device Path. @@ -1065,8 +1065,8 @@ InitBootMaintenance( @param CallbackData The BMM context data. -**/ -VOID +**/ +VOID GetConsoleInCheck ( IN BMM_CALLBACK_DATA *CallbackData ); @@ -1091,7 +1091,7 @@ GetConsoleOutCheck ( @param CallbackData The BMM context data. -**/ +**/ VOID GetConsoleErrCheck ( IN BMM_CALLBACK_DATA *CallbackData @@ -1112,9 +1112,9 @@ GetTerminalAttribute ( /** This function will change video resolution and text mode - according to defined setup mode or defined boot mode + according to defined setup mode or defined boot mode - @param IsSetupMode Indicate mode is changed to setup mode or boot mode. + @param IsSetupMode Indicate mode is changed to setup mode or boot mode. @retval EFI_SUCCESS Mode is changed successfully. @retval Others Mode failed to be changed. @@ -1195,7 +1195,7 @@ BootMaintExtractConfig ( @param[in] This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL. @param[in] Configuration A null-terminated Unicode string in - format. + format. @param[out] Progress A pointer to a string filled in with the offset of the most recent '&' before the first failing name / value pair (or the @@ -1205,7 +1205,7 @@ BootMaintExtractConfig ( successful. @retval EFI_SUCCESS The results have been distributed or are - awaiting distribution. + awaiting distribution. @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the results that must be stored awaiting possible future @@ -1262,7 +1262,7 @@ BootMaintCallback ( @retval FALSE Not exit caller function. **/ -BOOLEAN +BOOLEAN EFIAPI CreateBootOptionFromFile ( IN EFI_DEVICE_PATH_PROTOCOL *FilePath @@ -1276,7 +1276,7 @@ CreateBootOptionFromFile ( @retval TRUE Exit caller function. @retval FALSE Not exit caller function. **/ -BOOLEAN +BOOLEAN EFIAPI CreateDriverOptionFromFile ( IN EFI_DEVICE_PATH_PROTOCOL *FilePath @@ -1289,9 +1289,9 @@ CreateDriverOptionFromFile ( @retval TRUE Exit caller function. @retval FALSE Not exit caller function. - + **/ -BOOLEAN +BOOLEAN EFIAPI BootFromFile ( IN EFI_DEVICE_PATH_PROTOCOL *FilePath diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManager.vfr b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManager.vfr index b0a636f566..a14074a17a 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManager.vfr +++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManager.vfr @@ -1,15 +1,15 @@ ///** @file // Boot Maintenance Utility Formset // -// Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
+// Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
// This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -// +// //**/ #include "FormGuid.h" @@ -38,10 +38,10 @@ formset flags = INTERACTIVE, key = KEY_VALUE_TRIGGER_FORM_OPEN_ACTION; endif; - + label LABEL_FORM_MAIN_START; // - // This is where we will dynamically add a Action type op-code to show + // This is where we will dynamically add a Action type op-code to show // the platform information. // label LABEL_FORM_MAIN_END; @@ -144,7 +144,7 @@ formset text = STRING_TOKEN(STR_NO_SAVE_AND_EXIT), flags = INTERACTIVE, key = KEY_VALUE_NO_SAVE_AND_EXIT_BOOT; - + endform; form formid = FORM_BOOT_DEL_ID, @@ -181,7 +181,7 @@ formset form formid = FORM_DRV_ADD_FILE_ID, title = STRING_TOKEN(STR_FORM_DRV_ADD_DESC_TITLE); - + label FORM_DRV_ADD_FILE_ID; label LABEL_END; diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerStrings.uni b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerStrings.uni index 20b2a7744a..87e31737ae 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerStrings.uni +++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerStrings.uni @@ -1,15 +1,15 @@ ///** @file // String definitions for Boot Maintenance Utility. // -// Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
// This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -// +// //**/ /=# @@ -71,9 +71,9 @@ #language fr-FR "UEFI Optimized Boot" #string STR_FORM_UEFI_OPTIMIZED_BOOT_HELP #language en-US "Modify the UEFI Optimized Boot setting" #language fr-FR "Modify the UEFI Optimized Boot setting" -#string UEFI_OPTIMIZED_BOOT_DESCRIPTION #language en-US "UEFI Optimized Boot" +#string UEFI_OPTIMIZED_BOOT_DESCRIPTION #language en-US "UEFI Optimized Boot" #language fr-FR "UEFI Optimized Boot" -#string UEFI_OPTIMIZED_BOOT_HELP #language en-US "Check to enable UEFI Optimized Boot" +#string UEFI_OPTIMIZED_BOOT_HELP #language en-US "Check to enable UEFI Optimized Boot" #language fr-FR "Check to enable UEFI Optimized Boot" #string STR_FORM_CON_MAIN_TITLE #language en-US "Console Options" #language fr-FR "Console Options" diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf index def923b977..aad9d7678e 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf +++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootMaintenanceManagerUiLib.inf @@ -1,15 +1,15 @@ ## @file # Boot Maintenance Manager Library used by UiApp. # -# Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials are licensed and made available under # the terms and conditions of the BSD License that accompanies this distribution. # The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php. -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# +# ## [Defines] INF_VERSION = 0x00010005 @@ -62,7 +62,7 @@ UefiHiiServicesLib UefiBootManagerLib FileExplorerLib - + [Guids] gEfiGlobalVariableGuid ## SOMETIMES_PRODUCES ## Variable:L"BootNext" (The number of next boot option) ## SOMETIMES_PRODUCES ## Variable:L"BootXX" (Boot option variable) @@ -82,7 +82,7 @@ gEfiIfrTianoGuid ## SOMETIMES_CONSUMES ## GUID (Extended IFR Guid Opcode) gEfiIfrFrontPageGuid ## CONSUMES ## GUID gEfiIfrBootMaintenanceGuid ## CONSUMES ## GUID - + [Protocols] gEfiSimpleFileSystemProtocolGuid ## CONSUMES gEfiLoadFileProtocolGuid ## CONSUMES diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootOption.c b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootOption.c index 8680a51d78..a1a2e2a4e7 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootOption.c +++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/BootOption.c @@ -5,7 +5,7 @@ Boot option manipulation -Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -309,8 +309,8 @@ BOpt_GetBootOptions ( UINTN MenuCount; UINT8 *Ptr; EFI_BOOT_MANAGER_LOAD_OPTION *BootOption; - UINTN BootOptionCount; - + UINTN BootOptionCount; + MenuCount = 0; BootOrderListSize = 0; BootNextSize = 0; @@ -327,7 +327,7 @@ BOpt_GetBootOptions ( if (BootOrderList == NULL) { return EFI_NOT_FOUND; } - + // // Get the BootNext from the Var // @@ -346,7 +346,7 @@ BOpt_GetBootOptions ( if (((BootOption[Index].Attributes & LOAD_OPTION_HIDDEN) != 0) || ((BootOption[Index].Attributes & LOAD_OPTION_ACTIVE) == 0)) { continue; } - + UnicodeSPrint (BootString, sizeof (BootString), L"Boot%04x", BootOrderList[Index]); // // Get all loadoptions from the VAR @@ -415,13 +415,13 @@ BOpt_GetBootOptions ( NewLoadContext->FilePathListLength = *(UINT16 *) LoadOptionPtr; LoadOptionPtr += sizeof (UINT16); - + StringSize = StrSize((UINT16*)LoadOptionPtr); NewLoadContext->Description = AllocateZeroPool (StrSize((UINT16*)LoadOptionPtr)); ASSERT (NewLoadContext->Description != NULL); StrCpyS (NewLoadContext->Description, StrSize((UINT16*)LoadOptionPtr) / sizeof (UINT16), (UINT16*)LoadOptionPtr); - + ASSERT (NewLoadContext->Description != NULL); NewMenuEntry->DisplayString = NewLoadContext->Description; NewMenuEntry->DisplayStringToken = HiiSetString (CallbackData->BmmHiiHandle, 0, NewMenuEntry->DisplayString, NULL); @@ -437,7 +437,7 @@ BOpt_GetBootOptions ( ); NewMenuEntry->HelpString = UiDevicePathToStr (NewLoadContext->FilePathList); - NewMenuEntry->HelpStringToken = HiiSetString (CallbackData->BmmHiiHandle, 0, NewMenuEntry->HelpString, NULL); + NewMenuEntry->HelpStringToken = HiiSetString (CallbackData->BmmHiiHandle, 0, NewMenuEntry->HelpString, NULL); LoadOptionPtr += NewLoadContext->FilePathListLength; @@ -703,7 +703,7 @@ BOpt_GetDriverOptions ( if (DriverOrderList == NULL) { return EFI_NOT_FOUND; } - + for (Index = 0; Index < DriverOrderListSize / sizeof (UINT16); Index++) { UnicodeSPrint ( DriverString, @@ -767,7 +767,7 @@ BOpt_GetDriverOptions ( ); NewMenuEntry->HelpString = UiDevicePathToStr (NewLoadContext->FilePathList); - NewMenuEntry->HelpStringToken = HiiSetString (CallbackData->BmmHiiHandle, 0, NewMenuEntry->HelpString, NULL); + NewMenuEntry->HelpStringToken = HiiSetString (CallbackData->BmmHiiHandle, 0, NewMenuEntry->HelpString, NULL); LoadOptionPtr += NewLoadContext->FilePathListLength; @@ -803,29 +803,29 @@ BOpt_GetDriverOptions ( } /** - Get option number according to Boot#### and BootOrder variable. + Get option number according to Boot#### and BootOrder variable. The value is saved as #### + 1. @param CallbackData The BMM context data. **/ -VOID +VOID GetBootOrder ( IN BMM_CALLBACK_DATA *CallbackData ) { BMM_FAKE_NV_DATA *BmmConfig; UINT16 Index; - UINT16 OptionOrderIndex; + UINT16 OptionOrderIndex; UINTN DeviceType; BM_MENU_ENTRY *NewMenuEntry; - BM_LOAD_CONTEXT *NewLoadContext; + BM_LOAD_CONTEXT *NewLoadContext; ASSERT (CallbackData != NULL); - - DeviceType = (UINTN) -1; - BmmConfig = &CallbackData->BmmFakeNvData; + + DeviceType = (UINTN) -1; + BmmConfig = &CallbackData->BmmFakeNvData; ZeroMem (BmmConfig->BootOptionOrder, sizeof (BmmConfig->BootOptionOrder)); - + for (Index = 0, OptionOrderIndex = 0; ((Index < BootOptionMenu.MenuNumber) && (OptionOrderIndex < (sizeof (BmmConfig->BootOptionOrder) / sizeof (BmmConfig->BootOptionOrder[0])))); Index++) { @@ -844,34 +844,34 @@ GetBootOrder ( } } BmmConfig->BootOptionOrder[OptionOrderIndex++] = (UINT32) (NewMenuEntry->OptionNumber + 1); - } + } } /** Get driver option order from globalc DriverOptionMenu. @param CallbackData The BMM context data. - + **/ -VOID +VOID GetDriverOrder ( IN BMM_CALLBACK_DATA *CallbackData ) { BMM_FAKE_NV_DATA *BmmConfig; UINT16 Index; - UINT16 OptionOrderIndex; + UINT16 OptionOrderIndex; UINTN DeviceType; BM_MENU_ENTRY *NewMenuEntry; - BM_LOAD_CONTEXT *NewLoadContext; + BM_LOAD_CONTEXT *NewLoadContext; ASSERT (CallbackData != NULL); - - DeviceType = (UINTN) -1; - BmmConfig = &CallbackData->BmmFakeNvData; + + DeviceType = (UINTN) -1; + BmmConfig = &CallbackData->BmmFakeNvData; ZeroMem (BmmConfig->DriverOptionOrder, sizeof (BmmConfig->DriverOptionOrder)); - + for (Index = 0, OptionOrderIndex = 0; ((Index < DriverOptionMenu.MenuNumber) && (OptionOrderIndex < (sizeof (BmmConfig->DriverOptionOrder) / sizeof (BmmConfig->DriverOptionOrder[0])))); Index++) { @@ -890,8 +890,8 @@ GetDriverOrder ( } } BmmConfig->DriverOptionOrder[OptionOrderIndex++] = (UINT32) (NewMenuEntry->OptionNumber + 1); - } -} + } +} /** Boot the file specified by the input file path info. @@ -901,7 +901,7 @@ GetDriverOrder ( @retval TRUE Exit caller function. @retval FALSE Not exit caller function. **/ -BOOLEAN +BOOLEAN EFIAPI BootFromFile ( IN EFI_DEVICE_PATH_PROTOCOL *FilePath @@ -982,7 +982,7 @@ ReSendForm( @retval TRUE Exit caller function. @retval FALSE Not exit caller function. **/ -BOOLEAN +BOOLEAN EFIAPI CreateBootOptionFromFile ( IN EFI_DEVICE_PATH_PROTOCOL *FilePath @@ -1000,7 +1000,7 @@ CreateBootOptionFromFile ( @retval FALSE Not exit caller function. **/ -BOOLEAN +BOOLEAN EFIAPI CreateDriverOptionFromFile ( IN EFI_DEVICE_PATH_PROTOCOL *FilePath diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/ConsoleOption.c b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/ConsoleOption.c index b25c7a651b..55f079efa9 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/ConsoleOption.c +++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/ConsoleOption.c @@ -1,7 +1,7 @@ /** @file handles console redirection from boot manager -Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -100,11 +100,11 @@ UpdateComAttributeFromVariable ( /** Update the multi-instance device path of Terminal Device based on - the global TerminalMenu. If ChangeTernimal is TRUE, the terminal + the global TerminalMenu. If ChangeTernimal is TRUE, the terminal device path in the Terminal Device in TerminalMenu is also updated. @param DevicePath The multi-instance device path. - @param ChangeTerminal TRUE, then device path in the Terminal Device + @param ChangeTerminal TRUE, then device path in the Terminal Device in TerminalMenu is also updated; FALSE, no update. @return EFI_SUCCESS The function completes successfully. @@ -732,7 +732,7 @@ UpdateComAttributeFromVariable ( and BM_CONSOLE_ERR_CONTEXT_SELECT. @retval EFI_UNSUPPORTED The type passed in is not in the 3 types defined. - @retval EFI_NOT_FOUND If the EFI Variable defined in UEFI spec with name "ConOutDev", + @retval EFI_NOT_FOUND If the EFI Variable defined in UEFI spec with name "ConOutDev", "ConInDev" or "ConErrDev" doesn't exists. @retval EFI_OUT_OF_RESOURCES Not enough resource to complete the operations. @retval EFI_SUCCESS Function completes successfully. @@ -1021,14 +1021,14 @@ GetConsoleOutMode ( @param CallbackData The BMM context data. -**/ -VOID +**/ +VOID GetConsoleInCheck ( IN BMM_CALLBACK_DATA *CallbackData ) { UINT16 Index; - BM_MENU_ENTRY *NewMenuEntry; + BM_MENU_ENTRY *NewMenuEntry; UINT8 *ConInCheck; BM_CONSOLE_CONTEXT *NewConsoleContext; BM_TERMINAL_CONTEXT *NewTerminalContext; @@ -1037,9 +1037,9 @@ GetConsoleInCheck ( ConInCheck = &CallbackData->BmmFakeNvData.ConsoleInCheck[0]; for (Index = 0; ((Index < ConsoleInpMenu.MenuNumber) && \ - (Index < MAX_MENU_NUMBER)) ; Index++) { + (Index < MAX_MENU_NUMBER)) ; Index++) { NewMenuEntry = BOpt_GetMenuEntry (&ConsoleInpMenu, Index); - NewConsoleContext = (BM_CONSOLE_CONTEXT *) NewMenuEntry->VariableContext; + NewConsoleContext = (BM_CONSOLE_CONTEXT *) NewMenuEntry->VariableContext; ConInCheck[Index] = NewConsoleContext->IsActive; } @@ -1058,14 +1058,14 @@ GetConsoleInCheck ( @param CallbackData The BMM context data. -**/ -VOID +**/ +VOID GetConsoleOutCheck ( IN BMM_CALLBACK_DATA *CallbackData ) { UINT16 Index; - BM_MENU_ENTRY *NewMenuEntry; + BM_MENU_ENTRY *NewMenuEntry; UINT8 *ConOutCheck; BM_CONSOLE_CONTEXT *NewConsoleContext; BM_TERMINAL_CONTEXT *NewTerminalContext; @@ -1073,9 +1073,9 @@ GetConsoleOutCheck ( ASSERT (CallbackData != NULL); ConOutCheck = &CallbackData->BmmFakeNvData.ConsoleOutCheck[0]; for (Index = 0; ((Index < ConsoleOutMenu.MenuNumber) && \ - (Index < MAX_MENU_NUMBER)) ; Index++) { + (Index < MAX_MENU_NUMBER)) ; Index++) { NewMenuEntry = BOpt_GetMenuEntry (&ConsoleOutMenu, Index); - NewConsoleContext = (BM_CONSOLE_CONTEXT *) NewMenuEntry->VariableContext; + NewConsoleContext = (BM_CONSOLE_CONTEXT *) NewMenuEntry->VariableContext; ConOutCheck[Index] = NewConsoleContext->IsActive; } @@ -1094,14 +1094,14 @@ GetConsoleOutCheck ( @param CallbackData The BMM context data. -**/ -VOID +**/ +VOID GetConsoleErrCheck ( IN BMM_CALLBACK_DATA *CallbackData ) { UINT16 Index; - BM_MENU_ENTRY *NewMenuEntry; + BM_MENU_ENTRY *NewMenuEntry; UINT8 *ConErrCheck; BM_CONSOLE_CONTEXT *NewConsoleContext; BM_TERMINAL_CONTEXT *NewTerminalContext; @@ -1109,9 +1109,9 @@ GetConsoleErrCheck ( ASSERT (CallbackData != NULL); ConErrCheck = &CallbackData->BmmFakeNvData.ConsoleErrCheck[0]; for (Index = 0; ((Index < ConsoleErrMenu.MenuNumber) && \ - (Index < MAX_MENU_NUMBER)) ; Index++) { + (Index < MAX_MENU_NUMBER)) ; Index++) { NewMenuEntry = BOpt_GetMenuEntry (&ConsoleErrMenu, Index); - NewConsoleContext = (BM_CONSOLE_CONTEXT *) NewMenuEntry->VariableContext; + NewConsoleContext = (BM_CONSOLE_CONTEXT *) NewMenuEntry->VariableContext; ConErrCheck[Index] = NewConsoleContext->IsActive; } @@ -1131,22 +1131,22 @@ GetConsoleErrCheck ( @param CallbackData The BMM context data. **/ -VOID +VOID GetTerminalAttribute ( IN BMM_CALLBACK_DATA *CallbackData ) { BMM_FAKE_NV_DATA *CurrentFakeNVMap; BM_MENU_ENTRY *NewMenuEntry; - BM_TERMINAL_CONTEXT *NewTerminalContext; - UINT16 TerminalIndex; + BM_TERMINAL_CONTEXT *NewTerminalContext; + UINT16 TerminalIndex; UINT8 AttributeIndex; ASSERT (CallbackData != NULL); - CurrentFakeNVMap = &CallbackData->BmmFakeNvData; + CurrentFakeNVMap = &CallbackData->BmmFakeNvData; for (TerminalIndex = 0; ((TerminalIndex < TerminalMenu.MenuNumber) && \ - (TerminalIndex < MAX_MENU_NUMBER)); TerminalIndex++) { + (TerminalIndex < MAX_MENU_NUMBER)); TerminalIndex++) { NewMenuEntry = BOpt_GetMenuEntry (&TerminalMenu, TerminalIndex); NewTerminalContext = (BM_TERMINAL_CONTEXT *) NewMenuEntry->VariableContext; for (AttributeIndex = 0; AttributeIndex < sizeof (BaudRateList) / sizeof (BaudRateList [0]); AttributeIndex++) { @@ -1160,7 +1160,7 @@ GetTerminalAttribute ( NewTerminalContext->DataBitsIndex = AttributeIndex; break; } - } + } for (AttributeIndex = 0; AttributeIndex < ARRAY_SIZE (ParityList); AttributeIndex++) { if (NewTerminalContext->Parity == (UINT64) (ParityList[AttributeIndex].Value)) { @@ -1178,7 +1178,7 @@ GetTerminalAttribute ( CurrentFakeNVMap->COMBaudRate[TerminalIndex] = NewTerminalContext->BaudRateIndex; CurrentFakeNVMap->COMDataRate[TerminalIndex] = NewTerminalContext->DataBitsIndex; CurrentFakeNVMap->COMStopBits[TerminalIndex] = NewTerminalContext->StopBitsIndex; - CurrentFakeNVMap->COMParity[TerminalIndex] = NewTerminalContext->ParityIndex; + CurrentFakeNVMap->COMParity[TerminalIndex] = NewTerminalContext->ParityIndex; CurrentFakeNVMap->COMTerminalType[TerminalIndex] = NewTerminalContext->TerminalType; CurrentFakeNVMap->COMFlowControl[TerminalIndex] = NewTerminalContext->FlowControl; } diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/FormGuid.h b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/FormGuid.h index 299a149f60..186b2b7e23 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/FormGuid.h +++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/FormGuid.h @@ -1,7 +1,7 @@ /** @file Formset guids, form id and VarStore data structure for Boot Maintenance Manager. -Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -148,7 +148,7 @@ typedef struct { // At most 100 input/output/errorout device for console storage // UINT8 ConsoleCheck[MAX_MENU_NUMBER]; - + // // At most 100 input/output/errorout device for console storage // diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/UpdatePage.c b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/UpdatePage.c index b3cc3c88dd..f598c46a5a 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/UpdatePage.c +++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/UpdatePage.c @@ -1,7 +1,7 @@ /** @file Dynamically update the pages. -Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -28,16 +28,16 @@ CreateUpdateData ( // mStartOpCodeHandle = HiiAllocateOpCodeHandle (); ASSERT (mStartOpCodeHandle != NULL); - + mEndOpCodeHandle = HiiAllocateOpCodeHandle (); ASSERT (mEndOpCodeHandle != NULL); - + // // Create Hii Extend Label OpCode as the start opcode // mStartLabel = (EFI_IFR_GUID_LABEL *) HiiCreateGuidOpCode (mStartOpCodeHandle, &gEfiIfrTianoGuid, NULL, sizeof (EFI_IFR_GUID_LABEL)); mStartLabel->ExtendOpCode = EFI_IFR_EXTEND_OP_LABEL; - + // // Create Hii Extend Label OpCode as the end opcode // @@ -57,7 +57,7 @@ RefreshUpdateData ( { // // Free current updated date - // + // if (mStartOpCodeHandle != NULL) { HiiFreeOpCodeHandle (mStartOpCodeHandle); } @@ -78,7 +78,7 @@ RefreshUpdateData ( /** Add a "Go back to main page" tag in front of the form when there are no "Apply changes" and "Discard changes" tags in the end of the form. - + @param CallbackData The BMM context data. **/ @@ -162,7 +162,7 @@ UpdatePageEnd ( } /** - Clean up the dynamic opcode at label and form specified by both LabelId. + Clean up the dynamic opcode at label and form specified by both LabelId. @param LabelId It is both the Form ID and Label ID for opcode deletion. @param CallbackData The BMM context data. @@ -264,7 +264,7 @@ UpdateBootDelPage ( CallbackData->BmmFakeNvData.BootOptionDel[Index] = FALSE; CallbackData->BmmOldFakeNVData.BootOptionDel[Index] = FALSE; } - + HiiCreateCheckBoxOpCode ( mStartOpCodeHandle, (EFI_QUESTION_ID) (BOOT_OPTION_DEL_QUESTION_ID + Index), @@ -368,7 +368,7 @@ UpdateDrvDelPage ( } /** - Prepare the page to allow user to add description for + Prepare the page to allow user to add description for a Driver Option. @param CallbackData The BMM context data. @@ -582,8 +582,8 @@ UpdateOrderPage ( OptionOrder = NULL; QuestionId = 0; VarOffset = 0; - switch (UpdatePageId) { - + switch (UpdatePageId) { + case FORM_BOOT_CHG_ID: // // If the BootOptionOrder in the BmmFakeNvData are same with the date in the BmmOldFakeNVData, @@ -598,7 +598,7 @@ UpdateOrderPage ( QuestionId = BOOT_OPTION_ORDER_QUESTION_ID; VarOffset = BOOT_OPTION_ORDER_VAR_OFFSET; break; - + case FORM_DRV_CHG_ID: // // If the DriverOptionOrder in the BmmFakeNvData are same with the date in the BmmOldFakeNVData, @@ -613,12 +613,12 @@ UpdateOrderPage ( QuestionId = DRIVER_OPTION_ORDER_QUESTION_ID; VarOffset = DRIVER_OPTION_ORDER_VAR_OFFSET; break; - } - ASSERT (OptionOrder != NULL); - + } + ASSERT (OptionOrder != NULL); + OptionsOpCodeHandle = HiiAllocateOpCodeHandle (); ASSERT (OptionsOpCodeHandle != NULL); - + NewMenuEntry = NULL; for (OptionIndex = 0; (OptionOrder[OptionIndex] != 0 && OptionIndex < MAX_MENU_NUMBER); OptionIndex++) { BootOptionFound = FALSE; @@ -639,21 +639,21 @@ UpdateOrderPage ( ); } } - + if (OptionMenu->MenuNumber > 0) { - HiiCreateOrderedListOpCode ( - mStartOpCodeHandle, // Container for dynamic created opcodes - QuestionId, // Question ID - VARSTORE_ID_BOOT_MAINT, // VarStore ID - VarOffset, // Offset in Buffer Storage - STRING_TOKEN (STR_CHANGE_ORDER), // Question prompt text - STRING_TOKEN (STR_CHANGE_ORDER), // Question help text - 0, // Question flag + HiiCreateOrderedListOpCode ( + mStartOpCodeHandle, // Container for dynamic created opcodes + QuestionId, // Question ID + VARSTORE_ID_BOOT_MAINT, // VarStore ID + VarOffset, // Offset in Buffer Storage + STRING_TOKEN (STR_CHANGE_ORDER), // Question prompt text + STRING_TOKEN (STR_CHANGE_ORDER), // Question help text + 0, // Question flag 0, // Ordered list flag, e.g. EFI_IFR_UNIQUE_SET - EFI_IFR_TYPE_NUM_SIZE_32, // Data type of Question value - 100, // Maximum container - OptionsOpCodeHandle, // Option Opcode list - NULL // Default Opcode is NULL + EFI_IFR_TYPE_NUM_SIZE_32, // Data type of Question value + 100, // Maximum container + OptionsOpCodeHandle, // Option Opcode list + NULL // Default Opcode is NULL ); } @@ -730,7 +730,7 @@ UpdateConModePage ( if (EFI_ERROR (Status)) { continue; } - + // // Build mode string Column x Row // @@ -848,7 +848,7 @@ UpdateTerminalPage ( OptionsOpCodeHandle, NULL ); - + HiiFreeOpCodeHandle (OptionsOpCodeHandle); OptionsOpCodeHandle = HiiAllocateOpCodeHandle (); ASSERT (OptionsOpCodeHandle != NULL); @@ -1013,7 +1013,7 @@ UpdateTerminalPage ( UpdatePageEnd (CallbackData); } - + /** Update add boot/driver option page. diff --git a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/Variable.c b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/Variable.c index c1c55b0fb2..f934546829 100644 --- a/MdeModulePkg/Library/BootMaintenanceManagerUiLib/Variable.c +++ b/MdeModulePkg/Library/BootMaintenanceManagerUiLib/Variable.c @@ -1,7 +1,7 @@ /** @file Variable operation that will be used by bootmaint -Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -17,10 +17,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** Delete Boot Option that represent a Deleted state in BootOptionMenu. - @retval EFI_SUCCESS If all boot load option EFI Variables corresponding to + @retval EFI_SUCCESS If all boot load option EFI Variables corresponding to BM_LOAD_CONTEXT marked for deletion is deleted. @retval EFI_NOT_FOUND If can not find the boot option want to be deleted. - @return Others If failed to update the "BootOrder" variable after deletion. + @return Others If failed to update the "BootOrder" variable after deletion. **/ EFI_STATUS @@ -124,7 +124,7 @@ Var_DelDriverOption ( This function clear the EFI variable defined by ConsoleName and gEfiGlobalVariableGuid. It then build the multi-instance device - path by appending the device path of the Console (In/Out/Err) instance + path by appending the device path of the Console (In/Out/Err) instance in ConsoleMenu. Then it scan all corresponding console device by scanning Terminal (built from device supporting Serial I/O instances) devices in TerminalMenu. At last, it save a EFI variable specifed @@ -188,7 +188,7 @@ Var_UpdateConsoleOption ( ) { Vendor.Header.Type = MESSAGING_DEVICE_PATH; Vendor.Header.SubType = MSG_VENDOR_DP; - + ASSERT (NewTerminalContext->TerminalType < (ARRAY_SIZE (TerminalTypeGuid))); CopyMem ( &Vendor.Guid, @@ -261,7 +261,7 @@ Var_UpdateConsoleOutOption ( console device. @retval EFI_SUCCESS The function complete successfully. - @return The EFI variable can not be saved. See gRT->SetVariable for detail return information. + @return The EFI variable can not be saved. See gRT->SetVariable for detail return information. **/ EFI_STATUS Var_UpdateErrorOutOption ( @@ -272,8 +272,8 @@ Var_UpdateErrorOutOption ( } /** - This function create a currently loaded Drive Option from - the BMM. It then appends this Driver Option to the end of + This function create a currently loaded Drive Option from + the BMM. It then appends this Driver Option to the end of the "DriverOrder" list. It append this Driver Opotion to the end of DriverOptionMenu. @@ -401,8 +401,8 @@ Var_UpdateDriverOption ( } /** - This function create a currently loaded Boot Option from - the BMM. It then appends this Boot Option to the end of + This function create a currently loaded Boot Option from + the BMM. It then appends this Boot Option to the end of the "BootOrder" list. It also append this Boot Opotion to the end of BootOptionMenu. @@ -521,7 +521,7 @@ Var_UpdateBootOption ( } /** - This function update the "BootNext" EFI Variable. If there is + This function update the "BootNext" EFI Variable. If there is no "BootNext" specified in BMM, this EFI Variable is deleted. It also update the BMM context data specified the "BootNext" vaule. @@ -529,7 +529,7 @@ Var_UpdateBootOption ( @param CallbackData The BMM context data. @retval EFI_SUCCESS The function complete successfully. - @return The EFI variable can be saved. See gRT->SetVariable + @return The EFI variable can be saved. See gRT->SetVariable for detail return information. **/ @@ -633,7 +633,7 @@ Var_UpdateBootOrder ( BootOrder ); FreePool (BootOrder); - + BOpt_FreeMenu (&BootOptionMenu); BOpt_GetBootOptions (CallbackData); diff --git a/MdeModulePkg/Library/BootManagerUiLib/BootManager.c b/MdeModulePkg/Library/BootManagerUiLib/BootManager.c index 8e77632788..7f3edc3d3d 100644 --- a/MdeModulePkg/Library/BootManagerUiLib/BootManager.c +++ b/MdeModulePkg/Library/BootManagerUiLib/BootManager.c @@ -1,7 +1,7 @@ /** @file The boot manager reference implementation -Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at @@ -62,7 +62,7 @@ HII_VENDOR_DEVICE_PATH mBootManagerHiiVendorDevicePath = { { END_DEVICE_PATH_TYPE, END_ENTIRE_DEVICE_PATH_SUBTYPE, - { + { (UINT8) (END_DEVICE_PATH_LENGTH), (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8) } @@ -82,9 +82,9 @@ BOOT_MANAGER_CALLBACK_DATA gBootManagerPrivate = { /** This function will change video resolution and text mode - according to defined setup mode or defined boot mode + according to defined setup mode or defined boot mode - @param IsSetupMode Indicate mode is changed to setup mode or boot mode. + @param IsSetupMode Indicate mode is changed to setup mode or boot mode. @retval EFI_SUCCESS Mode is changed successfully. @retval Others Mode failed to be changed. @@ -111,13 +111,13 @@ BmSetConsoleMode ( EFI_STATUS Status; UINTN Index; UINTN CurrentColumn; - UINTN CurrentRow; + UINTN CurrentRow; MaxGopMode = 0; MaxTextMode = 0; // - // Get current video resolution and text mode + // Get current video resolution and text mode // Status = gBS->HandleProtocol ( gST->ConsoleOutHandle, @@ -156,7 +156,7 @@ BmSetConsoleMode ( NewHorizontalResolution = mBmBootHorizontalResolution; NewVerticalResolution = mBmBootVerticalResolution; NewColumns = mBmBootTextModeColumn; - NewRows = mBmBootTextModeRow; + NewRows = mBmBootTextModeRow; } if (GraphicsOutput != NULL) { @@ -340,7 +340,7 @@ BmSetupResetReminder ( /** Group the legacy boot options in the BootOption. - The routine assumes the boot options in the beginning that covers all the device + The routine assumes the boot options in the beginning that covers all the device types are ordered properly and re-position the following boot options just after the corresponding boot options with the same device type. For example: @@ -466,7 +466,7 @@ BmDevicePathToStr ( This function invokes Boot Manager. It then enumerate all boot options. If a boot option from the Boot Manager page is selected, Boot Manager will boot from this boot option. - + **/ VOID UpdateBootManager ( @@ -559,7 +559,7 @@ UpdateBootManager ( NeedEndOp = FALSE; HiiCreateEndOpCode (StartOpCodeHandle); } - + if (IsLegacyOption && DeviceType != ((BBS_BBS_DEVICE_PATH *) BootOption[Index].FilePath)->DeviceType) { if (NeedEndOp) { HiiCreateEndOpCode (StartOpCodeHandle); diff --git a/MdeModulePkg/Library/BootManagerUiLib/BootManagerStrings.uni b/MdeModulePkg/Library/BootManagerUiLib/BootManagerStrings.uni index 188a3abc8e..598369e38f 100644 --- a/MdeModulePkg/Library/BootManagerUiLib/BootManagerStrings.uni +++ b/MdeModulePkg/Library/BootManagerUiLib/BootManagerStrings.uni @@ -1,24 +1,24 @@ ///** @file // -// Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.
-// This program and the accompanying materials -// are licensed and made available under the terms and conditions of the BSD License -// which accompanies this distribution. The full text of the license may be found at -// http://opensource.org/licenses/bsd-license.php -// -// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -// +// Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+// This program and the accompanying materials +// are licensed and made available under the terms and conditions of the BSD License +// which accompanies this distribution. The full text of the license may be found at +// http://opensource.org/licenses/bsd-license.php +// +// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +// // Module Name: // // BootManagerStrings.uni -// +// // Abstract: -// +// // String definitions for Boot Manager formset. -// +// // Revision History: -// +// // --*/ /=# diff --git a/MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf b/MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf index 7983b07949..f6fc074b9d 100644 --- a/MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf +++ b/MdeModulePkg/Library/BootManagerUiLib/BootManagerUiLib.inf @@ -1,12 +1,12 @@ ## @file # Boot Manager Library used by UiApp. # -# Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials are licensed and made available under # the terms and conditions of the BSD License that accompanies this distribution. # The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php. -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # diff --git a/MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.c b/MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.c index 723e644e38..e1ed6df4ca 100644 --- a/MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.c +++ b/MdeModulePkg/Library/CpuExceptionHandlerLibNull/CpuExceptionHandlerLibNull.c @@ -1,7 +1,7 @@ /** @file CPU Exception Handler library implementition with empty functions. - Copyright (c) 2012 - 2017, Intel Corporation. All rights reserved.
+ Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -16,15 +16,15 @@ /** Initializes all CPU exceptions entries and provides the default exception handlers. - + Caller should try to get an array of interrupt and/or exception vectors that are in use and need to persist by EFI_VECTOR_HANDOFF_INFO defined in PI 1.3 specification. - If caller cannot get reserved vector list or it does not exists, set VectorInfo to NULL. + If caller cannot get reserved vector list or it does not exists, set VectorInfo to NULL. If VectorInfo is not NULL, the exception vectors will be initialized per vector attribute accordingly. @param[in] VectorInfo Pointer to reserved vector list. - - @retval EFI_SUCCESS CPU Exception Entries have been successfully initialized + + @retval EFI_SUCCESS CPU Exception Entries have been successfully initialized with default exception handlers. @retval EFI_INVALID_PARAMETER VectorInfo includes the invalid content if VectorInfo is not NULL. @retval EFI_UNSUPPORTED This function is not supported. @@ -41,15 +41,15 @@ InitializeCpuExceptionHandlers ( /** Initializes all CPU interrupt/exceptions entries and provides the default interrupt/exception handlers. - + Caller should try to get an array of interrupt and/or exception vectors that are in use and need to persist by EFI_VECTOR_HANDOFF_INFO defined in PI 1.3 specification. - If caller cannot get reserved vector list or it does not exists, set VectorInfo to NULL. + If caller cannot get reserved vector list or it does not exists, set VectorInfo to NULL. If VectorInfo is not NULL, the exception vectors will be initialized per vector attribute accordingly. @param[in] VectorInfo Pointer to reserved vector list. - - @retval EFI_SUCCESS All CPU interrupt/exception entries have been successfully initialized + + @retval EFI_SUCCESS All CPU interrupt/exception entries have been successfully initialized with default interrupt/exception handlers. @retval EFI_INVALID_PARAMETER VectorInfo includes the invalid content if VectorInfo is not NULL. @retval EFI_UNSUPPORTED This function is not supported. @@ -67,9 +67,9 @@ InitializeCpuInterruptHandlers ( /** Registers a function to be called from the processor interrupt handler. - This function registers and enables the handler specified by InterruptHandler for a processor - interrupt or exception type specified by InterruptType. If InterruptHandler is NULL, then the - handler for the processor interrupt or exception type specified by InterruptType is uninstalled. + This function registers and enables the handler specified by InterruptHandler for a processor + interrupt or exception type specified by InterruptType. If InterruptHandler is NULL, then the + handler for the processor interrupt or exception type specified by InterruptType is uninstalled. The installed handler is called once for each processor interrupt or exception. NOTE: This function should be invoked after InitializeCpuExceptionHandlers() or InitializeCpuInterruptHandlers() invoked, otherwise EFI_UNSUPPORTED returned. diff --git a/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.c b/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.c index e29892ff17..485815bbd2 100644 --- a/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.c +++ b/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.c @@ -2,13 +2,13 @@ This library class defines a set of interfaces to customize Display module -Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -44,14 +44,14 @@ Statement **/ /** - This funtion defines Page Frame and Backgroud. - - Based on the above layout, it will be responsible for HeaderHeight, FooterHeight, - StatusBarHeight and Backgroud. And, it will reserve Screen for Statement. + This funtion defines Page Frame and Backgroud. + + Based on the above layout, it will be responsible for HeaderHeight, FooterHeight, + StatusBarHeight and Backgroud. And, it will reserve Screen for Statement. @param[in] FormData Form Data to be shown in Page. @param[out] ScreenForStatement Screen to be used for Statement. (Prompt, Value and Help) - + @return Status **/ EFI_STATUS @@ -120,8 +120,8 @@ DisplayPageFrame ( This function updates customized key panel's help information. The library will prepare those Strings for the basic key, ESC, Enter, Up/Down/Left/Right, +/-. and arrange them in Footer panel. - - @param[in] FormData Form Data to be shown in Page. FormData has the highlighted statement. + + @param[in] FormData Form Data to be shown in Page. FormData has the highlighted statement. @param[in] Statement The statement current selected. @param[in] Selected Whether or not a tag be selected. TRUE means Enter has hit this question. **/ @@ -214,7 +214,7 @@ RefreshKeyHelp ( } else if (Statement->OpCode->OpCode == EFI_IFR_TIME_OP) { TimeOp = (EFI_IFR_TIME *) Statement->OpCode; HexDisplay = (TimeOp->Flags & EFI_IFR_DISPLAY_UINT_HEX) == EFI_IFR_DISPLAY_UINT_HEX; - } + } switch (Statement->OpCode->OpCode) { case EFI_IFR_ORDERED_LIST_OP: case EFI_IFR_ONE_OF_OP: @@ -232,7 +232,7 @@ RefreshKeyHelp ( if ((Statement->OpCode->OpCode == EFI_IFR_DATE_OP) || (Statement->OpCode->OpCode == EFI_IFR_TIME_OP)) { PrintAt ( - ColumnWidth1, + ColumnWidth1, StartColumnOfHelp, BottomRowOfHelp, L"%c%c%c%c%s", @@ -259,7 +259,7 @@ RefreshKeyHelp ( // // If it is a selected numeric with manual input, display different message // - if ((Statement->OpCode->OpCode == EFI_IFR_NUMERIC_OP) || + if ((Statement->OpCode->OpCode == EFI_IFR_NUMERIC_OP) || (Statement->OpCode->OpCode == EFI_IFR_DATE_OP) || (Statement->OpCode->OpCode == EFI_IFR_TIME_OP)) { ColumnStr2 = HexDisplay ? gHexNumericInput : gDecNumericInput; @@ -329,16 +329,16 @@ RefreshKeyHelp ( default: break; - } + } } /** Update status bar. - This function updates the status bar on the bottom of menu screen. It just shows StatusBar. + This function updates the status bar on the bottom of menu screen. It just shows StatusBar. Original logic in this function should be splitted out. - @param[in] MessageType The type of message to be shown. InputError or Configuration Changed. + @param[in] MessageType The type of message to be shown. InputError or Configuration Changed. @param[in] State Show or Clear Message. **/ VOID @@ -395,17 +395,17 @@ UpdateStatusBar ( default: break; - } + } } /** - Create popup window. It will replace CreateDialog(). + Create popup window. It will replace CreateDialog(). This function draws OEM/Vendor specific pop up windows. @param[out] Key User Input Key @param ... String to be shown in Popup. The variable argument list is terminated by a NULL. - + **/ VOID EFIAPI @@ -453,17 +453,17 @@ CreateDialog ( VA_START (Marker, Key); while ((String = VA_ARG (Marker, CHAR16 *)) != NULL) { LineNum ++; - + if ((LibGetStringWidth (String) / 2) > LargestString) { LargestString = (LibGetStringWidth (String) / 2); } - } + } VA_END (Marker); if ((LargestString + 2) > DimensionsWidth) { LargestString = DimensionsWidth - 2; } - + CurrentAttribute = gST->ConOut->Mode->Attribute; CursorVisible = gST->ConOut->Mode->CursorVisible; gST->ConOut->EnableCursor (gST->ConOut, FALSE); @@ -551,8 +551,8 @@ CreateDialog ( } /** - Confirm how to handle the changed data. - + Confirm how to handle the changed data. + @return Action BROWSER_ACTION_SUBMIT, BROWSER_ACTION_DISCARD or other values. **/ UINTN @@ -566,10 +566,10 @@ ConfirmDataChange ( EFI_INPUT_KEY Key; gST->ConIn->ReadKeyStroke (gST->ConIn, &Key); - + YesResponse = gYesResponse[0]; NoResponse = gNoResponse[0]; - + // // If NV flag is up, prompt user // @@ -581,7 +581,7 @@ ConfirmDataChange ( ((Key.UnicodeChar | UPPER_LOWER_CASE_OFFSET) != (NoResponse | UPPER_LOWER_CASE_OFFSET)) && ((Key.UnicodeChar | UPPER_LOWER_CASE_OFFSET) != (YesResponse | UPPER_LOWER_CASE_OFFSET)) ); - + if (Key.ScanCode == SCAN_ESC) { return BROWSER_ACTION_NONE; } else if ((Key.UnicodeChar | UPPER_LOWER_CASE_OFFSET) == (YesResponse | UPPER_LOWER_CASE_OFFSET)) { @@ -594,7 +594,7 @@ ConfirmDataChange ( /** OEM specifies whether Setup exits Page by ESC key. - This function customized the behavior that whether Setup exits Page so that + This function customized the behavior that whether Setup exits Page so that system able to boot when configuration is not changed. @retval TRUE Exits FrontPage @@ -610,14 +610,14 @@ FormExitPolicy ( } /** - Set Timeout value for a ceratain Form to get user response. - + Set Timeout value for a ceratain Form to get user response. + This function allows to set timeout value on a ceratain form if necessary. - If timeout is not zero, the form will exit if user has no response in timeout. - + If timeout is not zero, the form will exit if user has no response in timeout. + @param[in] FormData Form Data to be shown in Page - @return 0 No timeout for this form. + @return 0 No timeout for this form. @return > 0 Timeout value in 100 ns units. **/ UINT64 @@ -898,7 +898,7 @@ GetSubTitleTextColor ( Clear Screen to the initial state. **/ VOID -EFIAPI +EFIAPI ClearDisplayPage ( VOID ) @@ -950,7 +950,7 @@ CustomizedDisplayLibDestructor ( ) { HiiRemovePackages(mCDLStringPackHandle); - + FreeLibStrings (); return EFI_SUCCESS; diff --git a/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf b/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf index 23528948a3..4b1f6b4404 100644 --- a/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf +++ b/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf @@ -1,7 +1,7 @@ ## @file # Customize display library used by display engine. # -# Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.
+# Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -34,7 +34,7 @@ CustomizedDisplayLibInternal.h CustomizedDisplayLibInternal.c CustomizedDisplayLib.uni - + [Packages] MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec @@ -54,7 +54,7 @@ [Guids] gEfiIfrTianoGuid ## SOMETIMES_CONSUMES ## UNDEFINED - + [Protocols] [Pcd] @@ -62,4 +62,4 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserFieldTextColor ## CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserFieldTextHighlightColor ## CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserFieldBackgroundHighlightColor ## CONSUMES - gEfiMdeModulePkgTokenSpaceGuid.PcdFrontPageFormSetGuid ## CONSUMES \ No newline at end of file + gEfiMdeModulePkgTokenSpaceGuid.PcdFrontPageFormSetGuid ## CONSUMES diff --git a/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibInternal.c b/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibInternal.c index bc14a9dd76..b1629259f6 100644 --- a/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibInternal.c +++ b/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibInternal.c @@ -2,13 +2,13 @@ This library class defines a set of interfaces to customize Display module -Copyright (c) 2013-2015, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2013-2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -47,10 +47,10 @@ CHAR16 *gInputErrorMessage; Print banner info for front page. @param[in] FormData Form Data to be shown in Page - + **/ VOID -PrintBannerInfo ( +PrintBannerInfo ( IN FORM_DISPLAY_ENGINE_FORM *FormData ) { @@ -84,15 +84,15 @@ PrintBannerInfo ( ) { RowIdx = (UINT8) (Line - (UINT8) gScreenDimensions.TopRow); ColumnIdx = (UINT8) (Alignment - (UINT8) gScreenDimensions.LeftColumn); - + ASSERT (RowIdx < BANNER_HEIGHT && ColumnIdx < BANNER_COLUMNS); - + if (gBannerData!= NULL && gBannerData->Banner[RowIdx][ColumnIdx] != 0x0000) { StrFrontPageBanner = LibGetToken (gBannerData->Banner[RowIdx][ColumnIdx], FormData->HiiHandle); } else { continue; } - + switch (Alignment - gScreenDimensions.LeftColumn) { case 0: // @@ -100,7 +100,7 @@ PrintBannerInfo ( // PrintStringAt (gScreenDimensions.LeftColumn + BANNER_LEFT_COLUMN_INDENT, Line, StrFrontPageBanner); break; - + case 1: // // Handle center column @@ -111,7 +111,7 @@ PrintBannerInfo ( StrFrontPageBanner ); break; - + case 2: // // Handle right column @@ -123,7 +123,7 @@ PrintBannerInfo ( ); break; } - + FreePool (StrFrontPageBanner); } } @@ -159,7 +159,7 @@ PrintFramework ( ); return; } - + Buffer = AllocateZeroPool (0x10000); ASSERT (Buffer != NULL); Character = BOXDRAW_HORIZONTAL; @@ -187,7 +187,7 @@ PrintFramework ( PrintCharAt (gScreenDimensions.LeftColumn, Row, Character); PrintCharAt (gScreenDimensions.RightColumn - 1, Row, Character); } - + // // Print Form Title // @@ -239,7 +239,7 @@ PrintFramework ( Character = BOXDRAW_UP_LEFT; PrintCharAt ((UINTN) -1, (UINTN) -1, Character); - + FreePool (Buffer); } @@ -282,7 +282,7 @@ ProcessUserOpcode( } break; - case EFI_IFR_GUID_OP: + case EFI_IFR_GUID_OP: if (CompareGuid (&gEfiIfrTianoGuid, (EFI_GUID *)((CHAR8*) OpCodeData + sizeof (EFI_IFR_OP_HEADER)))) { // // Tiano specific GUIDed opcodes @@ -306,7 +306,7 @@ ProcessUserOpcode( gBannerData = AllocateZeroPool (sizeof (BANNER_DATA)); ASSERT (gBannerData != NULL); } - + CopyMem ( &gBannerData->Banner[((EFI_IFR_GUID_BANNER *) OpCodeData)->LineNumber][ ((EFI_IFR_GUID_BANNER *) OpCodeData)->Alignment], @@ -335,7 +335,7 @@ ProcessUserOpcode( /** Process some op codes which is out side of current form. - + @param FormData Pointer to the form data. @return EFI_SUCCESS Pass the statement success. @@ -386,7 +386,7 @@ ProcessExternedOpcode ( @return EFI_INVALID_PARAMETER The input screen info is not acceptable. **/ -EFI_STATUS +EFI_STATUS ScreenDiemensionInfoValidate ( IN FORM_DISPLAY_ENGINE_FORM *FormData ) @@ -395,7 +395,7 @@ ScreenDiemensionInfoValidate ( UINTN Index; // - // Calculate total number of Register HotKeys. + // Calculate total number of Register HotKeys. // Index = 0; if (!IsListEmpty (&FormData->HotKeyListHead)){ @@ -584,7 +584,7 @@ PrintHotKeyHelpString ( ColumnStr = gLibEmptyString; // - // Calculate total number of Register HotKeys. + // Calculate total number of Register HotKeys. // Index = 0; Link = GetFirstNode (&FormData->HotKeyListHead); @@ -607,7 +607,7 @@ PrintHotKeyHelpString ( CurrentRow = BottomRowOfHotKeyHelp - Index / 3; // - // Help string can't exceed ColumnWidth. One Row will show three Help information. + // Help string can't exceed ColumnWidth. One Row will show three Help information. // BakChar = L'\0'; if (StrLen (HotKey->HelpString) > ColumnIndexWidth) { @@ -632,7 +632,7 @@ PrintHotKeyHelpString ( Link = GetNextNode (&FormData->HotKeyListHead, Link); Index ++; } - + if (SetState) { // // Clear KeyHelp @@ -651,13 +651,13 @@ PrintHotKeyHelpString ( PrintStringAtWithWidth (CurrentCol, CurrentRow, gLibEmptyString, ColumnIndexWidth); } } - + return; } /** Get step info from numeric opcode. - + @param[in] OpCode The input numeric op code. @return step info for this opcode. @@ -671,24 +671,24 @@ LibGetFieldFromNum ( UINT64 Step; NumericOp = (EFI_IFR_NUMERIC *) OpCode; - + switch (NumericOp->Flags & EFI_IFR_NUMERIC_SIZE) { case EFI_IFR_NUMERIC_SIZE_1: Step = NumericOp->data.u8.Step; break; - + case EFI_IFR_NUMERIC_SIZE_2: Step = NumericOp->data.u16.Step; break; - + case EFI_IFR_NUMERIC_SIZE_4: Step = NumericOp->data.u32.Step; break; - + case EFI_IFR_NUMERIC_SIZE_8: Step = NumericOp->data.u64.Step; break; - + default: Step = 0; break; @@ -729,7 +729,7 @@ InitializeLibStrings ( gNvUpdateMessage = LibGetToken (STRING_TOKEN (NV_UPDATE_MESSAGE), mCDLStringPackHandle); gInputErrorMessage = LibGetToken (STRING_TOKEN (INPUT_ERROR_MESSAGE), mCDLStringPackHandle); - + // // SpaceBuffer; // @@ -770,7 +770,7 @@ FreeLibStrings ( FreePool (gNvUpdateMessage); FreePool (gInputErrorMessage); - + FreePool (mSpaceBuffer); } @@ -799,7 +799,7 @@ WaitForKeyStroke ( if (Status != EFI_NOT_READY) { continue; } - + gBS->WaitForEvent (1, &gST->ConIn->WaitForKey, &Index); } return Status; @@ -845,7 +845,7 @@ LibSetUnicodeMem ( **/ UINTN PrintInternal ( - IN UINTN Width, + IN UINTN Width, IN UINTN Column, IN UINTN Row, IN EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL *Out, diff --git a/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibInternal.h b/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibInternal.h index 7342b508b0..09a78854e5 100644 --- a/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibInternal.h +++ b/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibInternal.h @@ -2,13 +2,13 @@ This library class defines a set of interfaces to customize Display module -Copyright (c) 2013, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -121,10 +121,10 @@ extern CHAR16 *gInputErrorMessage; Print banner info for front page. @param[in] FormData Form Data to be shown in Page - + **/ VOID -PrintBannerInfo ( +PrintBannerInfo ( IN FORM_DISPLAY_ENGINE_FORM *FormData ); @@ -147,7 +147,7 @@ PrintFramework ( @return EFI_INVALID_PARAMETER The input screen info is not acceptable. **/ -EFI_STATUS +EFI_STATUS ScreenDiemensionInfoValidate ( IN FORM_DISPLAY_ENGINE_FORM *FormData ); @@ -201,10 +201,10 @@ PrintHotKeyHelpString ( IN FORM_DISPLAY_ENGINE_FORM *FormData, IN BOOLEAN SetState ); - + /** Get step info from numeric opcode. - + @param[in] OpCode The input numeric op code. @return step info for this opcode. @@ -285,7 +285,7 @@ PrintAt ( /** Process some op codes which is out side of current form. - + @param FormData Pointer to the form data. **/ diff --git a/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibModStrs.uni b/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibModStrs.uni index 4a58241571..33db2eb923 100644 --- a/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibModStrs.uni +++ b/MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLibModStrs.uni @@ -1,7 +1,7 @@ // /** @file // CustomizedDisplayLib Module Localized Abstract and Description Content // -// Copyright (c) 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,11 +13,11 @@ // **/ -#string STR_MODULE_ABSTRACT -#language en-US +#string STR_MODULE_ABSTRACT +#language en-US "Customize display library used by display engine." -#string STR_MODULE_DESCRIPTION -#language en-US +#string STR_MODULE_DESCRIPTION +#language en-US "Customize display library used by display engine." diff --git a/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c b/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c index ac8a975bf6..d39736764c 100644 --- a/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c +++ b/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManager.c @@ -1,7 +1,7 @@ /** @file The device manager reference implementation -Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -58,7 +58,7 @@ HII_VENDOR_DEVICE_PATH mDeviceManagerHiiVendorDevicePath = { { END_DEVICE_PATH_TYPE, END_ENTIRE_DEVICE_PATH_SUBTYPE, - { + { (UINT8) (END_DEVICE_PATH_LENGTH), (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8) } @@ -101,12 +101,12 @@ DmExtractDevicePathFromHiiHandle ( /** Get the mac address string from the device path. if the device path has the vlan, get the vanid also. - - @param MacAddressNode Device path begin with mac address + + @param MacAddressNode Device path begin with mac address @param PBuffer Output string buffer contain mac address. **/ -BOOLEAN +BOOLEAN GetMacAddressString( IN MAC_ADDR_DEVICE_PATH *MacAddressNode, OUT CHAR16 **PBuffer @@ -142,7 +142,7 @@ GetMacAddressString( *PBuffer = String; StrCpyS(String, BufferLen / sizeof (CHAR16), L"MAC:"); String += 4; - + // // Convert the MAC address into a unicode string. // @@ -202,7 +202,7 @@ GetMacAddressString( @retval EFI_SUCCESS Add the item is successful. @return Other values if failed to Add the item. **/ -BOOLEAN +BOOLEAN AddIdToMacDeviceList ( IN EFI_STRING MacAddrString ) @@ -252,7 +252,7 @@ AddIdToMacDeviceList ( if (TempDeviceList == NULL) { return FALSE; } - TempDeviceList[mMacDeviceList.CurListLen].PromptId = PromptId; + TempDeviceList[mMacDeviceList.CurListLen].PromptId = PromptId; TempDeviceList[mMacDeviceList.CurListLen].QuestionId = (EFI_QUESTION_ID) (mMacDeviceList.CurListLen + NETWORK_DEVICE_LIST_KEY_OFFSET); mMacDeviceList.NodeList = TempDeviceList; @@ -306,8 +306,8 @@ IsMacAddressDevicePath ( if (DEVICE_MANAGER_FORM_ID == NextShowFormId) { *NeedAddItem = TRUE; break; - } - + } + if (!GetMacAddressString((MAC_ADDR_DEVICE_PATH*)DevicePath, &Buffer)) { break; } @@ -321,7 +321,7 @@ IsMacAddressDevicePath ( if (NETWORK_DEVICE_LIST_FORM_ID == NextShowFormId) { // - // Same handle may has two network child handle, so the questionid + // Same handle may has two network child handle, so the questionid // has the offset of SAME_HANDLE_KEY_OFFSET. // if (AddIdToMacDeviceList (Buffer)) { @@ -351,7 +351,7 @@ IsMacAddressDevicePath ( @return FALSE Do not need to add the menu about the network. **/ -BOOLEAN +BOOLEAN IsNeedAddNetworkMenu ( IN EFI_HII_HANDLE Handle, IN EFI_FORM_ID NextShowFormId, @@ -360,7 +360,7 @@ IsNeedAddNetworkMenu ( { EFI_STATUS Status; UINTN EntryCount; - UINTN Index; + UINTN Index; EFI_HANDLE DriverHandle; EFI_HANDLE ControllerHandle; EFI_DEVICE_PATH_PROTOCOL *DevicePath; @@ -389,9 +389,9 @@ IsNeedAddNetworkMenu ( } TmpDevicePath = DevicePath; - // + // // Check whether this device path include mac address device path. - // If this path has mac address path, get the value whether need + // If this path has mac address path, get the value whether need // add this info to the menu and return. // Else check more about the child handle devcie path. // @@ -413,7 +413,7 @@ IsNeedAddNetworkMenu ( } if (!IsDevicePathEnd (TmpDevicePath)) { - return FALSE; + return FALSE; } // @@ -452,7 +452,7 @@ IsNeedAddNetworkMenu ( continue; } - // + // // Check whether this device path include mac address device path. // if (!IsMacAddressDevicePath(ChildDevicePath, NextShowFormId,&IsNeedAdd)) { @@ -472,7 +472,7 @@ IsNeedAddNetworkMenu ( } else { // // If need to update other form, return whether need to add to the menu. - // + // goto Done; } } @@ -481,9 +481,9 @@ IsNeedAddNetworkMenu ( Done: if (OpenInfoBuffer != NULL) { - FreePool (OpenInfoBuffer); + FreePool (OpenInfoBuffer); } - return IsNeedAdd; + return IsNeedAdd; } /** @@ -514,10 +514,10 @@ CreateDeviceManagerForm( EFI_STRING NewStringTitle; CHAR16 *DevicePathStr; EFI_STRING_ID DevicePathId; - EFI_IFR_FORM_SET *Buffer; - UINTN BufferSize; - UINT8 ClassGuidNum; - EFI_GUID *ClassGuid; + EFI_IFR_FORM_SET *Buffer; + UINTN BufferSize; + UINT8 ClassGuidNum; + EFI_GUID *ClassGuid; UINTN TempSize; UINT8 *Ptr; EFI_STATUS Status; @@ -599,7 +599,7 @@ CreateDeviceManagerForm( if (((EFI_IFR_OP_HEADER *) Ptr)->Length <= OFFSET_OF (EFI_IFR_FORM_SET, Flags)){ Ptr += ((EFI_IFR_OP_HEADER *) Ptr)->Length; continue; - } + } ClassGuidNum = (UINT8) (((EFI_IFR_FORM_SET *)Ptr)->Flags & 0x3); ClassGuid = (EFI_GUID *) (VOID *)(Ptr + sizeof (EFI_IFR_FORM_SET)); @@ -629,7 +629,7 @@ CreateDeviceManagerForm( // // Network device process - // + // if (IsNeedAddNetworkMenu (HiiHandles[Index], NextShowFormId,&AddItemCount)) { if (NextShowFormId == DEVICE_MANAGER_FORM_ID) { // @@ -679,7 +679,7 @@ CreateDeviceManagerForm( 0, (EFI_QUESTION_ID) (Index + DEVICE_KEY_OFFSET), 0, - &FormSetGuid, + &FormSetGuid, DevicePathId ); } @@ -899,7 +899,7 @@ DeviceManagerUiLibConstructor ( ASSERT (gDeviceManagerPrivate.HiiHandle != NULL); // - // Update boot manager page + // Update boot manager page // CreateDeviceManagerForm (DEVICE_MANAGER_FORM_ID); diff --git a/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerStrings.uni b/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerStrings.uni index 55d03d6239..f896cd8190 100644 --- a/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerStrings.uni +++ b/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerStrings.uni @@ -2,15 +2,15 @@ // // String definitions for the Device Manager. // -// Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.
+// Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
// This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -// +// //**/ /=# diff --git a/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf b/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf index 1dc665b940..d493b37baa 100644 --- a/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf +++ b/MdeModulePkg/Library/DeviceManagerUiLib/DeviceManagerUiLib.inf @@ -1,15 +1,15 @@ ## @file # Device Manager Library used by UiApp -# -# Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.
+# +# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials are licensed and made available under # the terms and conditions of the BSD License that accompanies this distribution. # The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php. -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# +# ## [Defines] INF_VERSION = 0x00010005 diff --git a/MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.c b/MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.c index b064240ccb..5b45c19981 100644 --- a/MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.c +++ b/MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.c @@ -1,7 +1,7 @@ /** @file Null Dxe Capsule Library instance does nothing and returns unsupport status. -Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -15,13 +15,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include /** - The firmware checks whether the capsule image is supported + The firmware checks whether the capsule image is supported by the CapsuleGuid in CapsuleHeader or other specific information in capsule image. Caution: This function may receive untrusted input. @param CapsuleHeader Point to the UEFI capsule image to be checked. - + @retval EFI_UNSUPPORTED Input capsule is not supported by the firmware. **/ EFI_STATUS @@ -39,8 +39,8 @@ SupportCapsuleImage ( Caution: This function may receive untrusted input. - @param CapsuleHeader Point to the UEFI capsule image to be processed. - + @param CapsuleHeader Point to the UEFI capsule image to be processed. + @retval EFI_UNSUPPORTED Capsule image is not supported by the firmware. **/ EFI_STATUS diff --git a/MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationServices.h b/MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationServices.h index 04ad3d6da3..6e8520bb08 100644 --- a/MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationServices.h +++ b/MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryAllocationServices.h @@ -2,16 +2,16 @@ Contains function prototypes for Memory Services in DxeCore. This header file borrows the DxeCore Memory Allocation services as the primitive - for memory allocation. + for memory allocation. - Copyright (c) 2008, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php + Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryProfileLib.c b/MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryProfileLib.c index 8f28b988f5..9fbe1222a7 100644 --- a/MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryProfileLib.c +++ b/MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryProfileLib.c @@ -1,14 +1,14 @@ /** @file Support routines for memory profile for DxeCore. - Copyright (c) 2016, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php. - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php. + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryProfileLibNull.c b/MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryProfileLibNull.c index 9ae0db8273..cc2403bd85 100644 --- a/MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryProfileLibNull.c +++ b/MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryProfileLibNull.c @@ -1,14 +1,14 @@ /** @file Null routines for memory profile for DxeCore. - Copyright (c) 2016, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php. - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php. + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryProfileServices.h b/MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryProfileServices.h index 619d7add9a..b713bfe718 100644 --- a/MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryProfileServices.h +++ b/MdeModulePkg/Library/DxeCoreMemoryAllocationLib/DxeCoreMemoryProfileServices.h @@ -4,14 +4,14 @@ This header file borrows the DxeCore Memory Profile services as the primitive for memory profile. - Copyright (c) 2016, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Library/DxeCoreMemoryAllocationLib/MemoryAllocationLib.c b/MdeModulePkg/Library/DxeCoreMemoryAllocationLib/MemoryAllocationLib.c index 95725c866f..3d01c27987 100644 --- a/MdeModulePkg/Library/DxeCoreMemoryAllocationLib/MemoryAllocationLib.c +++ b/MdeModulePkg/Library/DxeCoreMemoryAllocationLib/MemoryAllocationLib.c @@ -1,16 +1,16 @@ /** @file - Support routines for memory allocation routines based + Support routines for memory allocation routines based on DxeCore Memory Allocation services for DxeCore, with memory profile support. - Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -40,12 +40,12 @@ **/ VOID * InternalAllocatePages ( - IN EFI_MEMORY_TYPE MemoryType, + IN EFI_MEMORY_TYPE MemoryType, IN UINTN Pages ) { EFI_STATUS Status; - EFI_PHYSICAL_ADDRESS Memory; + EFI_PHYSICAL_ADDRESS Memory; if (Pages == 0) { return NULL; @@ -171,11 +171,11 @@ AllocateReservedPages ( must have been allocated on a previous call to the page allocation services of the Memory Allocation Library. If it is not possible to free allocated pages, then this function will perform no actions. - + If Buffer was not allocated with a page allocation function in the Memory Allocation Library, then ASSERT(). If Pages is zero, then ASSERT(). - + @param Buffer Pointer to the buffer of pages to free. @param Pages The number of 4 KB pages to free. @@ -214,7 +214,7 @@ FreePages ( **/ VOID * InternalAllocateAlignedPages ( - IN EFI_MEMORY_TYPE MemoryType, + IN EFI_MEMORY_TYPE MemoryType, IN UINTN Pages, IN UINTN Alignment ) @@ -230,7 +230,7 @@ InternalAllocateAlignedPages ( // Alignment must be a power of two or zero. // ASSERT ((Alignment & (Alignment - 1)) == 0); - + if (Pages == 0) { return NULL; } @@ -244,7 +244,7 @@ InternalAllocateAlignedPages ( // Make sure that Pages plus EFI_SIZE_TO_PAGES (Alignment) does not overflow. // ASSERT (RealPages > Pages); - + Status = CoreAllocatePages (AllocateAnyPages, MemoryType, RealPages, &Memory); if (EFI_ERROR (Status)) { return NULL; @@ -287,7 +287,7 @@ InternalAllocateAlignedPages ( alignment specified by Alignment. The allocated buffer is returned. If Pages is 0, then NULL is returned. If there is not enough memory at the specified alignment remaining to satisfy the request, then NULL is returned. - + If Alignment is not a power of two and Alignment is not zero, then ASSERT(). If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT(). @@ -328,7 +328,7 @@ AllocateAlignedPages ( alignment specified by Alignment. The allocated buffer is returned. If Pages is 0, then NULL is returned. If there is not enough memory at the specified alignment remaining to satisfy the request, then NULL is returned. - + If Alignment is not a power of two and Alignment is not zero, then ASSERT(). If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT(). @@ -369,7 +369,7 @@ AllocateAlignedRuntimePages ( alignment specified by Alignment. The allocated buffer is returned. If Pages is 0, then NULL is returned. If there is not enough memory at the specified alignment remaining to satisfy the request, then NULL is returned. - + If Alignment is not a power of two and Alignment is not zero, then ASSERT(). If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT(). @@ -409,13 +409,13 @@ AllocateAlignedReservedPages ( Frees the number of 4KB pages specified by Pages from the buffer specified by Buffer. Buffer must have been allocated on a previous call to the aligned page allocation services of the Memory - Allocation Library. If it is not possible to free allocated pages, then this function will + Allocation Library. If it is not possible to free allocated pages, then this function will perform no actions. - + If Buffer was not allocated with an aligned page allocation function in the Memory Allocation Library, then ASSERT(). If Pages is zero, then ASSERT(). - + @param Buffer Pointer to the buffer of pages to free. @param Pages The number of 4 KB pages to free. @@ -449,7 +449,7 @@ FreeAlignedPages ( **/ VOID * InternalAllocatePool ( - IN EFI_MEMORY_TYPE MemoryType, + IN EFI_MEMORY_TYPE MemoryType, IN UINTN AllocationSize ) { @@ -583,9 +583,9 @@ AllocateReservedPool ( **/ VOID * InternalAllocateZeroPool ( - IN EFI_MEMORY_TYPE PoolType, + IN EFI_MEMORY_TYPE PoolType, IN UINTN AllocationSize - ) + ) { VOID *Memory; @@ -709,7 +709,7 @@ AllocateReservedZeroPool ( allocated buffer. If AllocationSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. If Buffer is NULL, then ASSERT(). - If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). + If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). @param PoolType The type of pool to allocate. @param AllocationSize The number of bytes to allocate and zero. @@ -720,10 +720,10 @@ AllocateReservedZeroPool ( **/ VOID * InternalAllocateCopyPool ( - IN EFI_MEMORY_TYPE PoolType, + IN EFI_MEMORY_TYPE PoolType, IN UINTN AllocationSize, IN CONST VOID *Buffer - ) + ) { VOID *Memory; @@ -735,7 +735,7 @@ InternalAllocateCopyPool ( Memory = CopyMem (Memory, Buffer, AllocationSize); } return Memory; -} +} /** Copies a buffer to an allocated buffer of type EfiBootServicesData. @@ -744,9 +744,9 @@ InternalAllocateCopyPool ( AllocationSize bytes from Buffer to the newly allocated buffer, and returns a pointer to the allocated buffer. If AllocationSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. - + If Buffer is NULL, then ASSERT(). - If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). + If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). @param AllocationSize The number of bytes to allocate and zero. @param Buffer The buffer to copy to the allocated buffer. @@ -784,9 +784,9 @@ AllocateCopyPool ( AllocationSize bytes from Buffer to the newly allocated buffer, and returns a pointer to the allocated buffer. If AllocationSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. - + If Buffer is NULL, then ASSERT(). - If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). + If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). @param AllocationSize The number of bytes to allocate and zero. @param Buffer The buffer to copy to the allocated buffer. @@ -824,9 +824,9 @@ AllocateRuntimeCopyPool ( AllocationSize bytes from Buffer to the newly allocated buffer, and returns a pointer to the allocated buffer. If AllocationSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. - + If Buffer is NULL, then ASSERT(). - If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). + If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). @param AllocationSize The number of bytes to allocate and zero. @param Buffer The buffer to copy to the allocated buffer. @@ -861,19 +861,19 @@ AllocateReservedCopyPool ( Reallocates a buffer of a specified memory type. Allocates and zeros the number bytes specified by NewSize from memory of the type - specified by PoolType. If OldBuffer is not NULL, then the smaller of OldSize and - NewSize bytes are copied from OldBuffer to the newly allocated buffer, and - OldBuffer is freed. A pointer to the newly allocated buffer is returned. - If NewSize is 0, then a valid buffer of 0 size is returned. If there is not + specified by PoolType. If OldBuffer is not NULL, then the smaller of OldSize and + NewSize bytes are copied from OldBuffer to the newly allocated buffer, and + OldBuffer is freed. A pointer to the newly allocated buffer is returned. + If NewSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. - + If the allocation of the new buffer is successful and the smaller of NewSize and OldSize is greater than (MAX_ADDRESS - OldBuffer + 1), then ASSERT(). @param PoolType The type of pool to allocate. @param OldSize The size, in bytes, of OldBuffer. @param NewSize The size, in bytes, of the buffer to reallocate. - @param OldBuffer The buffer to copy to the allocated buffer. This is an optional + @param OldBuffer The buffer to copy to the allocated buffer. This is an optional parameter that may be NULL. @return A pointer to the allocated buffer or NULL if allocation fails. @@ -881,7 +881,7 @@ AllocateReservedCopyPool ( **/ VOID * InternalReallocatePool ( - IN EFI_MEMORY_TYPE PoolType, + IN EFI_MEMORY_TYPE PoolType, IN UINTN OldSize, IN UINTN NewSize, IN VOID *OldBuffer OPTIONAL @@ -901,18 +901,18 @@ InternalReallocatePool ( Reallocates a buffer of type EfiBootServicesData. Allocates and zeros the number bytes specified by NewSize from memory of type - EfiBootServicesData. If OldBuffer is not NULL, then the smaller of OldSize and - NewSize bytes are copied from OldBuffer to the newly allocated buffer, and - OldBuffer is freed. A pointer to the newly allocated buffer is returned. - If NewSize is 0, then a valid buffer of 0 size is returned. If there is not + EfiBootServicesData. If OldBuffer is not NULL, then the smaller of OldSize and + NewSize bytes are copied from OldBuffer to the newly allocated buffer, and + OldBuffer is freed. A pointer to the newly allocated buffer is returned. + If NewSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. - + If the allocation of the new buffer is successful and the smaller of NewSize and OldSize is greater than (MAX_ADDRESS - OldBuffer + 1), then ASSERT(). @param OldSize The size, in bytes, of OldBuffer. @param NewSize The size, in bytes, of the buffer to reallocate. - @param OldBuffer The buffer to copy to the allocated buffer. This is an optional + @param OldBuffer The buffer to copy to the allocated buffer. This is an optional parameter that may be NULL. @return A pointer to the allocated buffer or NULL if allocation fails. @@ -946,10 +946,10 @@ ReallocatePool ( Reallocates a buffer of type EfiRuntimeServicesData. Allocates and zeros the number bytes specified by NewSize from memory of type - EfiRuntimeServicesData. If OldBuffer is not NULL, then the smaller of OldSize and - NewSize bytes are copied from OldBuffer to the newly allocated buffer, and - OldBuffer is freed. A pointer to the newly allocated buffer is returned. - If NewSize is 0, then a valid buffer of 0 size is returned. If there is not + EfiRuntimeServicesData. If OldBuffer is not NULL, then the smaller of OldSize and + NewSize bytes are copied from OldBuffer to the newly allocated buffer, and + OldBuffer is freed. A pointer to the newly allocated buffer is returned. + If NewSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. If the allocation of the new buffer is successful and the smaller of NewSize and OldSize @@ -957,7 +957,7 @@ ReallocatePool ( @param OldSize The size, in bytes, of OldBuffer. @param NewSize The size, in bytes, of the buffer to reallocate. - @param OldBuffer The buffer to copy to the allocated buffer. This is an optional + @param OldBuffer The buffer to copy to the allocated buffer. This is an optional parameter that may be NULL. @return A pointer to the allocated buffer or NULL if allocation fails. @@ -991,10 +991,10 @@ ReallocateRuntimePool ( Reallocates a buffer of type EfiReservedMemoryType. Allocates and zeros the number bytes specified by NewSize from memory of type - EfiReservedMemoryType. If OldBuffer is not NULL, then the smaller of OldSize and - NewSize bytes are copied from OldBuffer to the newly allocated buffer, and - OldBuffer is freed. A pointer to the newly allocated buffer is returned. - If NewSize is 0, then a valid buffer of 0 size is returned. If there is not + EfiReservedMemoryType. If OldBuffer is not NULL, then the smaller of OldSize and + NewSize bytes are copied from OldBuffer to the newly allocated buffer, and + OldBuffer is freed. A pointer to the newly allocated buffer is returned. + If NewSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. If the allocation of the new buffer is successful and the smaller of NewSize and OldSize @@ -1002,7 +1002,7 @@ ReallocateRuntimePool ( @param OldSize The size, in bytes, of OldBuffer. @param NewSize The size, in bytes, of the buffer to reallocate. - @param OldBuffer The buffer to copy to the allocated buffer. This is an optional + @param OldBuffer The buffer to copy to the allocated buffer. This is an optional parameter that may be NULL. @return A pointer to the allocated buffer or NULL if allocation fails. @@ -1039,7 +1039,7 @@ ReallocateReservedPool ( Frees the buffer specified by Buffer. Buffer must have been allocated on a previous call to the pool allocation services of the Memory Allocation Library. If it is not possible to free pool resources, then this function will perform no actions. - + If Buffer was not allocated with a pool allocation function in the Memory Allocation Library, then ASSERT(). diff --git a/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c b/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c index efff5134c7..57a14e8796 100644 --- a/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c +++ b/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.c @@ -3,7 +3,7 @@ This library provides the performance measurement interfaces and initializes performance logging for DXE phase. It first initializes its private global data structure for - performance logging and saves the performance GUIDed HOB passed from PEI phase. + performance logging and saves the performance GUIDed HOB passed from PEI phase. It initializes DXE phase performance logging by publishing the Performance and PerformanceEx Protocol, which are consumed by DxePerformanceLib to logging performance data in DXE phase. diff --git a/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.inf b/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.inf index 3e77f9cd57..8fab47ff02 100644 --- a/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.inf +++ b/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.inf @@ -1,24 +1,24 @@ ## @file # Performance library instance mainly for DxeCore usage. -# +# # This library provides the performance measurement interfaces and initializes performance # logging for DXE phase. It first initializes its private global data structure for -# performance logging and saves the performance GUIDed HOB passed from PEI phase. +# performance logging and saves the performance GUIDed HOB passed from PEI phase. # It initializes DXE phase performance logging by publishing the Performance and PerformanceEx Protocol, # which is consumed by DxePerformanceLib to logging performance data in DXE phase. # This library is mainly used by DxeCore to start performance logging to ensure that # Performance and PerformanceEx Protocol are installed at the very beginning of DXE phase. -# +# # Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# (C) Copyright 2016 Hewlett Packard Enterprise Development LP
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# +# ## [Defines] diff --git a/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.uni b/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.uni index dcdb8ae5c4..f9f2853d69 100644 --- a/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.uni +++ b/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLib.uni @@ -9,13 +9,13 @@ // This library is mainly used by DxeCore to start performance logging to ensure that // Performance and PerformanceEx Protocol are installed at the very beginning of DXE phase. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLibInternal.h b/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLibInternal.h index a96f408150..2b214e2e57 100644 --- a/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLibInternal.h +++ b/MdeModulePkg/Library/DxeCorePerformanceLib/DxeCorePerformanceLibInternal.h @@ -14,7 +14,7 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ - + #ifndef _DXE_CORE_PERFORMANCE_LIB_INTERNAL_H_ #define _DXE_CORE_PERFORMANCE_LIB_INTERNAL_H_ diff --git a/MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.c b/MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.c index 5f2892823b..13aaaacecd 100644 --- a/MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.c +++ b/MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.c @@ -1,17 +1,17 @@ /** @file - This library registers CRC32 guided section handler + This library registers CRC32 guided section handler to parse CRC32 encapsulation section and extract raw data. It uses UEFI boot service CalculateCrc32 to authenticate 32 bit CRC value. -Copyright (c) 2007 - 2011, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -39,7 +39,7 @@ typedef struct { /** GetInfo gets raw data size and attribute of the input guided section. - It first checks whether the input guid section is supported. + It first checks whether the input guid section is supported. If not, EFI_INVALID_PARAMETER will return. @param InputSection Buffer containing the input GUIDed section to be processed. @@ -47,7 +47,7 @@ typedef struct { @param ScratchBufferSize The size of ScratchBuffer. @param SectionAttribute The attribute of the input guided section. - @retval EFI_SUCCESS The size of destination buffer, the size of scratch buffer and + @retval EFI_SUCCESS The size of destination buffer, the size of scratch buffer and the attribute of the input section are successfully retrieved. @retval EFI_INVALID_PARAMETER The GUID in InputSection does not match this instance guid. @@ -100,7 +100,7 @@ Crc32GuidedSectionGetInfo ( Extraction handler tries to extract raw data from the input guided section. It also does authentication check for 32bit CRC value in the input guided section. - It first checks whether the input guid section is supported. + It first checks whether the input guid section is supported. If not, EFI_INVALID_PARAMETER will return. @param InputSection Buffer containing the input GUIDed section to be processed. @@ -137,7 +137,7 @@ Crc32GuidedSectionHandler ( &(((EFI_GUID_DEFINED_SECTION2 *) InputSection)->SectionDefinitionGuid))) { return EFI_INVALID_PARAMETER; } - + // // Get section Crc32 checksum. // @@ -159,7 +159,7 @@ Crc32GuidedSectionHandler ( &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid))) { return EFI_INVALID_PARAMETER; } - + // // Get section Crc32 checksum. // diff --git a/MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf b/MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf index d244897ab6..7a8efbf8cf 100644 --- a/MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf +++ b/MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.inf @@ -1,13 +1,13 @@ ## @file # Dxe Crc32 Guided Section Extract library. # -# This library doesn't produce any library class. The constructor function uses +# This library doesn't produce any library class. The constructor function uses # ExtractGuidedSectionLib service to register CRC32 guided section handler # that parses CRC32 encapsulation section and extracts raw data. # # It uses UEFI boot service CalculateCrc32 to authenticate 32 bit CRC value. # -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License diff --git a/MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.uni b/MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.uni index d28cdf0fba..2e91ca529f 100644 --- a/MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.uni +++ b/MdeModulePkg/Library/DxeCrc32GuidedSectionExtractLib/DxeCrc32GuidedSectionExtractLib.uni @@ -4,10 +4,10 @@ // This library doesn't produce any library class. The constructor function uses // ExtractGuidedSectionLib service to register CRC32 guided section handler // that parses CRC32 encapsulation section and extracts raw data. -// +// // It uses UEFI boot service CalculateCrc32 to authenticate 32 bit CRC value. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License diff --git a/MdeModulePkg/Library/DxeDebugPrintErrorLevelLib/DxeDebugPrintErrorLevelLib.c b/MdeModulePkg/Library/DxeDebugPrintErrorLevelLib/DxeDebugPrintErrorLevelLib.c index 0ba88d8eeb..613850f5e9 100644 --- a/MdeModulePkg/Library/DxeDebugPrintErrorLevelLib/DxeDebugPrintErrorLevelLib.c +++ b/MdeModulePkg/Library/DxeDebugPrintErrorLevelLib/DxeDebugPrintErrorLevelLib.c @@ -1,10 +1,10 @@ /** @file - Debug Print Error Level library instance that provide compatibility with the + Debug Print Error Level library instance that provide compatibility with the "err" shell command. This includes support for the Debug Mask Protocol supports for global debug print error level mask stored in an EFI Variable. This library instance only support DXE Phase modules. - Copyright (c) 2011, Intel Corporation. All rights reserved.
+ Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -32,7 +32,7 @@ it in CurrentDebugMask. @param This The protocol instance pointer. - @param CurrentDebugMask Pointer to the debug print error level mask that + @param CurrentDebugMask Pointer to the debug print error level mask that is returned. @retval EFI_SUCCESS The current debug print error level mask was @@ -45,8 +45,8 @@ EFI_STATUS EFIAPI GetDebugMask ( - IN EFI_DEBUG_MASK_PROTOCOL *This, - IN OUT UINTN *CurrentDebugMask + IN EFI_DEBUG_MASK_PROTOCOL *This, + IN OUT UINTN *CurrentDebugMask ); /** @@ -79,7 +79,7 @@ EFI_DEBUG_MASK_PROTOCOL mDebugMaskProtocol = { }; /// -/// Global variable that is set to TRUE after the first attempt is made to +/// Global variable that is set to TRUE after the first attempt is made to /// retrieve the global error level mask through the EFI Varibale Services. /// This variable prevents the EFI Variable Services from being called fort /// every DEBUG() macro. @@ -91,9 +91,9 @@ BOOLEAN mGlobalErrorLevelInitialized = FALSE; /// module that is using this library instance. This variable is initially /// set to the PcdDebugPrintErrorLevel value. If the EFI Variable exists that /// contains the global debug print error level mask, then that overrides the -/// PcdDebugPrintErrorLevel value. The EFI Variable can optionally be +/// PcdDebugPrintErrorLevel value. The EFI Variable can optionally be /// discovered via a HOB so early DXE drivers can access the variable. If the -/// Debug Mask Protocol SetDebugMask() service is called, then that overrides +/// Debug Mask Protocol SetDebugMask() service is called, then that overrides /// the PcdDebugPrintErrorLevel and the EFI Variable setting. /// UINT32 mDebugPrintErrorLevel = 0; @@ -107,12 +107,12 @@ UINT32 mDebugPrintErrorLevel = 0; EFI_SYSTEM_TABLE *mSystemTable = NULL; /** - The constructor function caches the PCI Express Base Address and creates a + The constructor function caches the PCI Express Base Address and creates a Set Virtual Address Map event to convert physical address to virtual addresses. - + @param ImageHandle The firmware allocated handle for the EFI image. @param SystemTable A pointer to the EFI System Table. - + @retval EFI_SUCCESS The constructor completed successfully. @retval Other value The constructor did not complete successfully. @@ -125,15 +125,15 @@ DxeDebugPrintErrorLevelLibConstructor ( ) { EFI_STATUS Status; - + // // Initialize the error level mask from PCD setting. // mDebugPrintErrorLevel = PcdGet32 (PcdDebugPrintErrorLevel); - + // // Install Debug Mask Protocol onto ImageHandle - // + // mSystemTable = SystemTable; Status = SystemTable->BootServices->InstallMultipleProtocolInterfaces ( &ImageHandle, @@ -144,22 +144,22 @@ DxeDebugPrintErrorLevelLibConstructor ( // // Attempt to retrieve the global debug print error level mask from the EFI Variable // If the EFI Variable can not be accessed when this module's library constructors are - // executed a HOB can be used to set the global debug print error level. If no value + // executed a HOB can be used to set the global debug print error level. If no value // was found then the EFI Variable access will be reattempted on every DEBUG() print // from this module until the EFI Variable services are available. // GetDebugPrintErrorLevel (); - + return Status; } /** - The destructor function frees any allocated buffers and closes the Set Virtual + The destructor function frees any allocated buffers and closes the Set Virtual Address Map event. - + @param ImageHandle The firmware allocated handle for the EFI image. @param SystemTable A pointer to the EFI System Table. - + @retval EFI_SUCCESS The destructor completed successfully. @retval Other value The destructor did not complete successfully. @@ -173,7 +173,7 @@ DxeDebugPrintErrorLevelLibDestructor ( { // // Uninstall the Debug Mask Protocol from ImageHandle - // + // return SystemTable->BootServices->UninstallMultipleProtocolInterfaces ( ImageHandle, &gEfiDebugMaskProtocolGuid, &mDebugMaskProtocol, @@ -207,13 +207,13 @@ GetDebugPrintErrorLevel ( if (mSystemTable == NULL) { return PcdGet32 (PcdDebugPrintErrorLevel); } - + // - // Check to see if an attempt has been made to retrieve the global debug print + // Check to see if an attempt has been made to retrieve the global debug print // error level mask. Since this library instance stores the global debug print // error level mask in an EFI Variable, the EFI Variable should only be accessed // once to reduce the overhead of reading the EFI Variable on every debug print - // + // if (!mGlobalErrorLevelInitialized) { // // Make sure the TPL Level is low enough for EFI Variable Services to be called @@ -222,15 +222,15 @@ GetDebugPrintErrorLevel ( mSystemTable->BootServices->RestoreTPL (CurrentTpl); if (CurrentTpl <= TPL_CALLBACK) { // - // Attempt to retrieve the global debug print error level mask from the + // Attempt to retrieve the global debug print error level mask from the // EFI Variable // Size = sizeof (GlobalErrorLevel); Status = mSystemTable->RuntimeServices->GetVariable ( - DEBUG_MASK_VARIABLE_NAME, - &gEfiGenericVariableGuid, - NULL, - &Size, + DEBUG_MASK_VARIABLE_NAME, + &gEfiGenericVariableGuid, + NULL, + &Size, &GlobalErrorLevel ); if (Status != EFI_NOT_AVAILABLE_YET) { @@ -270,9 +270,9 @@ GetDebugPrintErrorLevel ( /** Sets the global debug print error level mask fpr the entire platform. - + @param ErrorLevel Global debug print error level - + @retval TRUE The debug print error level mask was sucessfully set. @retval FALSE The debug print error level mask could not be set. @@ -304,18 +304,18 @@ SetDebugPrintErrorLevel ( GlobalErrorLevel = (UINTN)ErrorLevel; Size = sizeof (GlobalErrorLevel); Status = mSystemTable->RuntimeServices->SetVariable ( - DEBUG_MASK_VARIABLE_NAME, - &gEfiGenericVariableGuid, + DEBUG_MASK_VARIABLE_NAME, + &gEfiGenericVariableGuid, (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS), Size, &GlobalErrorLevel ); if (!EFI_ERROR (Status)) { // - // If the EFI Variable was updated, then update the mask value for this + // If the EFI Variable was updated, then update the mask value for this // module and return TRUE. // - mGlobalErrorLevelInitialized = TRUE; + mGlobalErrorLevelInitialized = TRUE; mDebugPrintErrorLevel = ErrorLevel; return TRUE; } @@ -332,7 +332,7 @@ SetDebugPrintErrorLevel ( it in CurrentDebugMask. @param This The protocol instance pointer. - @param CurrentDebugMask Pointer to the debug print error level mask that + @param CurrentDebugMask Pointer to the debug print error level mask that is returned. @retval EFI_SUCCESS The current debug print error level mask was @@ -345,14 +345,14 @@ SetDebugPrintErrorLevel ( EFI_STATUS EFIAPI GetDebugMask ( - IN EFI_DEBUG_MASK_PROTOCOL *This, - IN OUT UINTN *CurrentDebugMask + IN EFI_DEBUG_MASK_PROTOCOL *This, + IN OUT UINTN *CurrentDebugMask ) { if (CurrentDebugMask == NULL) { return EFI_INVALID_PARAMETER; } - + // // Retrieve the current debug mask from mDebugPrintErrorLevel // diff --git a/MdeModulePkg/Library/DxeDebugPrintErrorLevelLib/DxeDebugPrintErrorLevelLib.inf b/MdeModulePkg/Library/DxeDebugPrintErrorLevelLib/DxeDebugPrintErrorLevelLib.inf index b471af7a88..69a41f40c7 100644 --- a/MdeModulePkg/Library/DxeDebugPrintErrorLevelLib/DxeDebugPrintErrorLevelLib.inf +++ b/MdeModulePkg/Library/DxeDebugPrintErrorLevelLib/DxeDebugPrintErrorLevelLib.inf @@ -3,7 +3,7 @@ # This includes support for the Debug Mask Protocol supports for global debug print error level mask # stored in an EFI Variable. This library instance only support DXE Phase modules. # -# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -22,7 +22,7 @@ FILE_GUID = 1D564EC9-9373-49a4-9E3F-E4D7B9974C84 MODULE_TYPE = DXE_DRIVER VERSION_STRING = 1.0 - LIBRARY_CLASS = DebugPrintErrorLevelLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER UEFI_APPLICATION UEFI_DRIVER + LIBRARY_CLASS = DebugPrintErrorLevelLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER UEFI_APPLICATION UEFI_DRIVER CONSTRUCTOR = DxeDebugPrintErrorLevelLibConstructor DESTRUCTOR = DxeDebugPrintErrorLevelLibDestructor @@ -40,10 +40,10 @@ [LibraryClasses] PcdLib HobLib - + [Protocols] gEfiDebugMaskProtocolGuid ## PRODUCES - + [Guids] ## SOMETIMES_PRODUCES ## Variable:L"EFIDebug" ## SOMETIMES_CONSUMES ## Variable:L"EFIDebug" diff --git a/MdeModulePkg/Library/DxeDpcLib/DpcLib.c b/MdeModulePkg/Library/DxeDpcLib/DpcLib.c index ddc3e0adda..03149bcfc7 100644 --- a/MdeModulePkg/Library/DxeDpcLib/DpcLib.c +++ b/MdeModulePkg/Library/DxeDpcLib/DpcLib.c @@ -1,7 +1,7 @@ /** @file Help functions to access UDP service. - -Copyright (c) 2005 - 2007, Intel Corporation. All rights reserved.
+ +Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.uni b/MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.uni index 84e72e1c46..e2a9c21c63 100644 --- a/MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.uni +++ b/MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.uni @@ -3,13 +3,13 @@ // // This library instance provides the DPC service by consuming EFI DPC Protocol. // -// Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Library/DxeFileExplorerProtocol/DxeFileExplorerProtocol.c b/MdeModulePkg/Library/DxeFileExplorerProtocol/DxeFileExplorerProtocol.c index e1fca76f5b..8c22a3fe54 100644 --- a/MdeModulePkg/Library/DxeFileExplorerProtocol/DxeFileExplorerProtocol.c +++ b/MdeModulePkg/Library/DxeFileExplorerProtocol/DxeFileExplorerProtocol.c @@ -1,12 +1,12 @@ /** @file Instance of file explorer Library based on gEfiFileExplorerProtocolGuid. - Implement the file explorer library instance by wrap the interface + Implement the file explorer library instance by wrap the interface provided in the file explorer protocol. This protocol is defined as the internal - protocol related to this implementation, not in the public spec. So, this + protocol related to this implementation, not in the public spec. So, this library instance is only for this code base. -Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -30,13 +30,13 @@ EFI_FILE_EXPLORER_PROTOCOL *mProtocol = NULL; /** The constructor function caches the pointer to file explorer protocol. - + The constructor function locates Print2 protocol from protocol database. - It will ASSERT() if that operation fails and it will always return EFI_SUCCESS. + It will ASSERT() if that operation fails and it will always return EFI_SUCCESS. @param ImageHandle The firmware allocated handle for the EFI image. @param SystemTable A pointer to the EFI System Table. - + @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS. **/ @@ -61,7 +61,7 @@ FileExplorerConstructor ( } /** - Choose a file in the specified directory. + Choose a file in the specified directory. If user input NULL for the RootDirectory, will choose file in the system. diff --git a/MdeModulePkg/Library/DxeFileExplorerProtocol/DxeFileExplorerProtocol.inf b/MdeModulePkg/Library/DxeFileExplorerProtocol/DxeFileExplorerProtocol.inf index 5725a9b4ab..9db58cb8f6 100644 --- a/MdeModulePkg/Library/DxeFileExplorerProtocol/DxeFileExplorerProtocol.inf +++ b/MdeModulePkg/Library/DxeFileExplorerProtocol/DxeFileExplorerProtocol.inf @@ -1,7 +1,7 @@ ## @file # Library instance that implements File explorer Library class based on protocol gEfiFileExplorerProtocolGuid. # -# Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.
+# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -38,4 +38,4 @@ gEfiFileExplorerProtocolGuid ## CONSUMES [Depex.common.DXE_DRIVER, Depex.common.DXE_RUNTIME_DRIVER, Depex.common.DXE_SAL_DRIVER, Depex.common.DXE_SMM_DRIVER] - gEfiFileExplorerProtocolGuid \ No newline at end of file + gEfiFileExplorerProtocolGuid diff --git a/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c b/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c index 9774670d7c..5fbb50d03a 100644 --- a/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c +++ b/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.c @@ -2,7 +2,7 @@ This library is used to share code between UEFI network stack modules. It provides the helper routines to parse the HTTP message byte stream. -Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -20,10 +20,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** Decode a percent-encoded URI component to the ASCII character. - - Decode the input component in Buffer according to RFC 3986. The caller is responsible to make + + Decode the input component in Buffer according to RFC 3986. The caller is responsible to make sure ResultBuffer points to a buffer with size equal or greater than ((AsciiStrSize (Buffer)) - in bytes. + in bytes. @param[in] Buffer The pointer to a percent-encoded URI component. @param[in] BufferLength Length of Buffer in bytes. @@ -32,7 +32,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @retval EFI_SUCCESS Successfully decoded the URI. @retval EFI_INVALID_PARAMETER Buffer is not a valid percent-encoded string. - + **/ EFI_STATUS EFIAPI @@ -50,13 +50,13 @@ UriPercentDecode ( if (Buffer == NULL || BufferLength == 0 || ResultBuffer == NULL) { return EFI_INVALID_PARAMETER; } - + Index = 0; Offset = 0; HexStr[2] = '\0'; while (Index < BufferLength) { if (Buffer[Index] == '%') { - if (Index + 1 >= BufferLength || Index + 2 >= BufferLength || + if (Index + 1 >= BufferLength || Index + 2 >= BufferLength || !NET_IS_HEX_CHAR (Buffer[Index+1]) || !NET_IS_HEX_CHAR (Buffer[Index+2])) { return EFI_INVALID_PARAMETER; } @@ -72,7 +72,7 @@ UriPercentDecode ( } *ResultLength = (UINT32) Offset; - + return EFI_SUCCESS; } @@ -82,8 +82,8 @@ UriPercentDecode ( @param[in] Char Next character. @param[in] State Current value of the parser state machine. - @param[in] IsRightBracket TRUE if there is an sign ']' in the authority component and - indicates the next part is ':' before Port. + @param[in] IsRightBracket TRUE if there is an sign ']' in the authority component and + indicates the next part is ':' before Port. @return Updated state value. **/ @@ -116,27 +116,27 @@ NetHttpParseAuthorityChar ( break; case UrlParserHost: - case UrlParserHostStart: + case UrlParserHostStart: if (Char == '[') { return UrlParserHostIpv6; } - + if (Char == ':') { return UrlParserPortStart; } - + return UrlParserHost; - - case UrlParserHostIpv6: + + case UrlParserHostIpv6: if (Char == ']') { *IsRightBracket = TRUE; } - + if (Char == ':' && *IsRightBracket) { return UrlParserPortStart; } return UrlParserHostIpv6; - + case UrlParserPort: case UrlParserPortStart: return UrlParserPort; @@ -173,7 +173,7 @@ NetHttpParseAuthority ( UINT32 Field; UINT32 OldField; BOOLEAN IsrightBracket; - + ASSERT ((UrlParser->FieldBitMap & BIT (HTTP_URI_FIELD_AUTHORITY)) != 0); // @@ -203,7 +203,7 @@ NetHttpParseAuthority ( case UrlParserUserInfo: Field = HTTP_URI_FIELD_USERINFO; break; - + case UrlParserHost: Field = HTTP_URI_FIELD_HOST; break; @@ -211,7 +211,7 @@ NetHttpParseAuthority ( case UrlParserHostIpv6: Field = HTTP_URI_FIELD_HOST; break; - + case UrlParserPort: Field = HTTP_URI_FIELD_PORT; break; @@ -259,12 +259,12 @@ NetHttpParseUrlChar ( if (Char == ' ' || Char == '\r' || Char == '\n') { return UrlParserStateMax; } - + // // http_URL = "http:" "//" host [ ":" port ] [ abs_path [ "?" query ]] - // + // // Request-URI = "*" | absolute-URI | path-absolute | authority - // + // // absolute-URI = scheme ":" hier-part [ "?" query ] // path-absolute = "/" [ segment-nz *( "/" segment ) ] // authority = [ userinfo "@" ] host [ ":" port ] @@ -333,7 +333,7 @@ NetHttpParseUrlChar ( case UrlParserFragmentStart: return UrlParserFragment; - + default: break; } @@ -375,7 +375,7 @@ HttpParseUrl ( HTTP_URL_PARSER *Parser; Parser = NULL; - + if (Url == NULL || Length == 0 || UrlParser == NULL) { return EFI_INVALID_PARAMETER; } @@ -384,7 +384,7 @@ HttpParseUrl ( if (Parser == NULL) { return EFI_OUT_OF_RESOURCES; } - + if (IsConnectMethod) { // // According to RFC 2616, the authority form is only used by the CONNECT method. @@ -407,7 +407,7 @@ HttpParseUrl ( case UrlParserStateMax: FreePool (Parser); return EFI_INVALID_PARAMETER; - + case UrlParserSchemeColon: case UrlParserSchemeColonSlash: case UrlParserSchemeColonSlashSlash: @@ -417,7 +417,7 @@ HttpParseUrl ( // Skip all the delimiting char: "://" "?" "@" // continue; - + case UrlParserScheme: Field = HTTP_URI_FIELD_SCHEME; break; @@ -474,7 +474,7 @@ HttpParseUrl ( } *UrlParser = Parser; - return EFI_SUCCESS; + return EFI_SUCCESS; } /** @@ -491,7 +491,7 @@ HttpParseUrl ( @retval EFI_INVALID_PARAMETER Uri is NULL or HostName is NULL or UrlParser is invalid. @retval EFI_NOT_FOUND No hostName component in the URL. @retval EFI_OUT_OF_RESOURCES Could not allocate needed resources. - + **/ EFI_STATUS EFIAPI @@ -520,7 +520,7 @@ HttpUrlGetHostName ( if (Name == NULL) { return EFI_OUT_OF_RESOURCES; } - + Status = UriPercentDecode ( Url + Parser->FieldData[HTTP_URI_FIELD_HOST].Offset, Parser->FieldData[HTTP_URI_FIELD_HOST].Length, @@ -551,7 +551,7 @@ HttpUrlGetHostName ( @retval EFI_INVALID_PARAMETER Uri is NULL or Ip4Address is NULL or UrlParser is invalid. @retval EFI_NOT_FOUND No IPv4 address component in the URL. @retval EFI_OUT_OF_RESOURCES Could not allocate needed resources. - + **/ EFI_STATUS EFIAPI @@ -565,7 +565,7 @@ HttpUrlGetIp4 ( EFI_STATUS Status; UINT32 ResultLength; HTTP_URL_PARSER *Parser; - + if (Url == NULL || UrlParser == NULL || Ip4Address == NULL) { return EFI_INVALID_PARAMETER; } @@ -580,7 +580,7 @@ HttpUrlGetIp4 ( if (Ip4String == NULL) { return EFI_OUT_OF_RESOURCES; } - + Status = UriPercentDecode ( Url + Parser->FieldData[HTTP_URI_FIELD_HOST].Offset, Parser->FieldData[HTTP_URI_FIELD_HOST].Length, @@ -612,7 +612,7 @@ HttpUrlGetIp4 ( @retval EFI_INVALID_PARAMETER Uri is NULL or Ip6Address is NULL or UrlParser is invalid. @retval EFI_NOT_FOUND No IPv6 address component in the URL. @retval EFI_OUT_OF_RESOURCES Could not allocate needed resources. - + **/ EFI_STATUS EFIAPI @@ -628,7 +628,7 @@ HttpUrlGetIp6 ( EFI_STATUS Status; UINT32 ResultLength; HTTP_URL_PARSER *Parser; - + if (Url == NULL || UrlParser == NULL || Ip6Address == NULL) { return EFI_INVALID_PARAMETER; } @@ -656,7 +656,7 @@ HttpUrlGetIp6 ( if (Ip6String == NULL) { return EFI_OUT_OF_RESOURCES; } - + Status = UriPercentDecode ( Ptr + 1, Length - 2, @@ -667,7 +667,7 @@ HttpUrlGetIp6 ( FreePool (Ip6String); return Status; } - + Ip6String[ResultLength] = '\0'; Status = NetLibAsciiStrToIp6 (Ip6String, Ip6Address); FreePool (Ip6String); @@ -688,7 +688,7 @@ HttpUrlGetIp6 ( @retval EFI_INVALID_PARAMETER Uri is NULL or Port is NULL or UrlParser is invalid. @retval EFI_NOT_FOUND No port number in the URL. @retval EFI_OUT_OF_RESOURCES Could not allocate needed resources. - + **/ EFI_STATUS EFIAPI @@ -771,7 +771,7 @@ ON_EXIT: @retval EFI_INVALID_PARAMETER Uri is NULL or HostName is NULL or UrlParser is invalid. @retval EFI_NOT_FOUND No hostName component in the URL. @retval EFI_OUT_OF_RESOURCES Could not allocate needed resources. - + **/ EFI_STATUS EFIAPI @@ -800,7 +800,7 @@ HttpUrlGetPath ( if (PathStr == NULL) { return EFI_OUT_OF_RESOURCES; } - + Status = UriPercentDecode ( Url + Parser->FieldData[HTTP_URI_FIELD_PATH].Offset, Parser->FieldData[HTTP_URI_FIELD_PATH].Length, @@ -821,7 +821,7 @@ HttpUrlGetPath ( Release the resource of the URL parser. @param[in] UrlParser Pointer to the parser. - + **/ VOID EFIAPI @@ -835,9 +835,9 @@ HttpUrlFreeParser ( /** Find a specified header field according to the field name. - @param[in] HeaderCount Number of HTTP header structures in Headers list. + @param[in] HeaderCount Number of HTTP header structures in Headers list. @param[in] Headers Array containing list of HTTP headers. - @param[in] FieldName Null terminated string which describes a field name. + @param[in] FieldName Null terminated string which describes a field name. @return Pointer to the found header or NULL. @@ -975,7 +975,7 @@ HttpIoParseContentLengthHeader ( @param[in] Headers Array containing list of HTTP headers. @return The message is "chunked" transfer-coding (TRUE) or not (FALSE). - + **/ BOOLEAN HttpIoIsChunked ( @@ -1072,7 +1072,7 @@ HttpInitMsgParser ( { EFI_STATUS Status; HTTP_BODY_PARSER *Parser; - + if (HeaderCount != 0 && Headers == NULL) { return EFI_INVALID_PARAMETER; } @@ -1087,7 +1087,7 @@ HttpInitMsgParser ( } Parser->State = BodyParserBodyStart; - + // // Determine the message length according to RFC 2616. // 1. Check whether the message "MUST NOT" have a message-body. @@ -1108,7 +1108,7 @@ HttpInitMsgParser ( // 4. Range header is not supported now, so we won't meet media type "multipart/byteranges". // 5. By server closing the connection // - + // // Set state to skip body parser if the message shouldn't have a message body. // @@ -1151,7 +1151,7 @@ HttpParseMessageBody ( UINTN LengthForCallback; EFI_STATUS Status; HTTP_BODY_PARSER *Parser; - + if (BodyLength == 0 || Body == NULL) { return EFI_INVALID_PARAMETER; } @@ -1195,7 +1195,7 @@ HttpParseMessageBody ( switch (Parser->State) { case BodyParserStateMax: return EFI_ABORTED; - + case BodyParserBodyIdentity: // // Identity transfer-coding, just notify user to save the body data. @@ -1265,7 +1265,7 @@ HttpParseMessageBody ( } Char++; break; - + case BodyParserChunkSizeEndCR: if (*Char != '\n') { Parser->State = BodyParserStateMax; @@ -1274,7 +1274,7 @@ HttpParseMessageBody ( Char++; if (Parser->CurrentChunkSize == 0) { // - // The last chunk has been parsed and now assumed the state + // The last chunk has been parsed and now assumed the state // of HttpBodyParse is ParserLastCRLF. So it need to decide // whether the rest message is trailer or last CRLF in the next round. // @@ -1285,10 +1285,10 @@ HttpParseMessageBody ( Parser->State = BodyParserChunkDataStart; Parser->CurrentChunkParsedSize = 0; break; - + case BodyParserLastCRLF: // - // Judge the byte is belong to the Last CRLF or trailer, and then + // Judge the byte is belong to the Last CRLF or trailer, and then // configure the state of HttpBodyParse to corresponding state. // if (*Char == '\r') { @@ -1299,7 +1299,7 @@ HttpParseMessageBody ( Parser->State = BodyParserTrailer; break; } - + case BodyParserLastCRLFEnd: if (*Char == '\n') { Parser->State = BodyParserComplete; @@ -1320,13 +1320,13 @@ HttpParseMessageBody ( Parser->State = BodyParserStateMax; break; } - + case BodyParserTrailer: if (*Char == '\r') { Parser->State = BodyParserChunkSizeEndCR; } Char++; - break; + break; case BodyParserChunkDataStart: // @@ -1350,7 +1350,7 @@ HttpParseMessageBody ( Parser->CurrentChunkParsedSize += LengthForCallback; if (Parser->CurrentChunkParsedSize == Parser->CurrentChunkSize) { Parser->State = BodyParserChunkDataEnd; - } + } break; case BodyParserChunkDataEnd: @@ -1369,7 +1369,7 @@ HttpParseMessageBody ( } Char++; Parser->State = BodyParserChunkSizeStart; - break; + break; default: break; @@ -1424,7 +1424,7 @@ HttpIsMessageComplete ( @retval EFI_SUCCESS Successfully to get the entity length. @retval EFI_NOT_READY Entity length is not valid yet. @retval EFI_INVALID_PARAMETER MsgParser is NULL or ContentLength is NULL. - + **/ EFI_STATUS EFIAPI @@ -1453,7 +1453,7 @@ HttpGetEntityLength ( Release the resource of the message parser. @param[in] MsgParser Pointer to the message parser. - + **/ VOID EFIAPI @@ -1619,19 +1619,19 @@ HttpGetFieldNameAndValue ( while (TRUE) { if (*FieldValueStr == ' ' || *FieldValueStr == '\t') { // - // Boundary condition check. + // Boundary condition check. // if ((UINTN) EndofHeader - (UINTN) FieldValueStr < 1) { - return NULL; + return NULL; } - + FieldValueStr ++; } else if (*FieldValueStr == '\r') { // - // Boundary condition check. + // Boundary condition check. // if ((UINTN) EndofHeader - (UINTN) FieldValueStr < 3) { - return NULL; + return NULL; } if (*(FieldValueStr + 1) == '\n' && (*(FieldValueStr + 2) == ' ' || *(FieldValueStr + 2) == '\t')) { @@ -1755,7 +1755,7 @@ HttpGenRequestMessage ( // 3. If we do not have a Request, HeaderCount should be zero // 4. If we do not have Request and Headers, we need at least a message-body // - if ((Message == NULL || RequestMsg == NULL || RequestMsgSize == NULL) || + if ((Message == NULL || RequestMsg == NULL || RequestMsgSize == NULL) || (Message->Data.Request != NULL && Url == NULL) || (Message->Data.Request != NULL && Message->HeaderCount == 0) || (Message->Data.Request == NULL && Message->HeaderCount != 0) || @@ -2069,7 +2069,7 @@ HttpIsValidHttpHeader ( if (DeleteList[Index] == NULL) { continue; } - + if (AsciiStrCmp (FieldName, DeleteList[Index]) == 0) { return FALSE; } diff --git a/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf b/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf index 92b9b91239..d6d5391b3a 100644 --- a/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf +++ b/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.inf @@ -1,7 +1,7 @@ ## @file # It provides the helper routines to parse the HTTP message byte stream. # -# Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
# (C) Copyright 2016 Hewlett Packard Enterprise Development LP
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -45,4 +45,4 @@ NetLib [Protocols] - gEfiHttpUtilitiesProtocolGuid ## SOMETIMES_CONSUMES \ No newline at end of file + gEfiHttpUtilitiesProtocolGuid ## SOMETIMES_CONSUMES diff --git a/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.uni b/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.uni index bde5004b56..452f125d95 100644 --- a/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.uni +++ b/MdeModulePkg/Library/DxeHttpLib/DxeHttpLib.uni @@ -3,13 +3,13 @@ // // This library instance provides the helper routines to parse the HTTP message byte stream. // -// Copyright (c) 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c b/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c index 66c7fec6c5..fafc26894d 100644 --- a/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c +++ b/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.c @@ -78,11 +78,11 @@ GLOBAL_REMOVE_IF_UNREFERENCED ICMP_ERROR_INFO mIcmp6ErrMap[10] = { {FALSE, TRUE}, // ICMP6_ERR_UNREACH_NET {FALSE, TRUE}, // ICMP6_ERR_UNREACH_HOST {TRUE, TRUE}, // ICMP6_ERR_UNREACH_PROTOCOL - {TRUE, TRUE}, // ICMP6_ERR_UNREACH_PORT + {TRUE, TRUE}, // ICMP6_ERR_UNREACH_PORT {TRUE, TRUE}, // ICMP6_ERR_PACKAGE_TOOBIG {FALSE, TRUE}, // ICMP6_ERR_TIMXCEED_HOPLIMIT {FALSE, TRUE}, // ICMP6_ERR_TIMXCEED_REASS - {FALSE, TRUE}, // ICMP6_ERR_PARAMPROB_HEADER + {FALSE, TRUE}, // ICMP6_ERR_PARAMPROB_HEADER {FALSE, TRUE}, // ICMP6_ERR_PARAMPROB_NEXHEADER {FALSE, TRUE} // ICMP6_ERR_PARAMPROB_IPV6OPTION }; @@ -258,7 +258,7 @@ IpIoCloseProtocolDestroyIpChild ( } /** - This function handles ICMPv4 packets. It is the worker function of + This function handles ICMPv4 packets. It is the worker function of IpIoIcmpHandler. @param[in] IpIo Pointer to the IP_IO instance. @@ -283,19 +283,19 @@ IpIoIcmpv4Handler ( UINT8 Type; UINT8 Code; UINT32 TrimBytes; - + ASSERT (IpIo != NULL); ASSERT (Pkt != NULL); ASSERT (Session != NULL); ASSERT (IpIo->IpVersion == IP_VERSION_4); - + // // Check the ICMP packet length. // if (Pkt->TotalSize < sizeof (IP4_ICMP_ERROR_HEAD)) { return EFI_ABORTED; } - + IcmpHdr = NET_PROTO_HDR (Pkt, IP4_ICMP_ERROR_HEAD); IpHdr = (EFI_IP4_HEADER *) (&IcmpHdr->IpHead); @@ -387,20 +387,20 @@ IpIoIcmpv4Handler ( TrimBytes = (UINT32) (PayLoadHdr - (UINT8 *) IcmpHdr); NetbufTrim (Pkt, TrimBytes, TRUE); - + // - // If the input packet has invalid format, and TrimBytes is larger than + // If the input packet has invalid format, and TrimBytes is larger than // the packet size, the NetbufTrim might trim the packet to zero. // if (Pkt->TotalSize != 0) { IpIo->PktRcvdNotify (EFI_ICMP_ERROR, IcmpErr, Session, Pkt, IpIo->RcvdContext); } - return EFI_SUCCESS; + return EFI_SUCCESS; } /** - This function handles ICMPv6 packets. It is the worker function of + This function handles ICMPv6 packets. It is the worker function of IpIoIcmpHandler. @param[in] IpIo Pointer to the IP_IO instance. @@ -447,7 +447,7 @@ IpIoIcmpv6Handler ( // // Analyze the ICMPv6 Error in this ICMPv6 packet - // + // switch (Type) { case ICMP_V6_DEST_UNREACHABLE: switch (Code) { @@ -506,7 +506,7 @@ IpIoIcmpv6Handler ( default: return EFI_ABORTED; - } + } // // Notify user the ICMPv6 packet only containing payload except @@ -517,7 +517,7 @@ IpIoIcmpv6Handler ( NextHeader = IpHdr->NextHeader; PayLoadHdr = (UINT8 *) ((UINT8 *) IcmpHdr + sizeof (IP6_ICMP_ERROR_HEAD)); Flag = TRUE; - + do { switch (NextHeader) { case EFI_IP_PROTO_UDP: @@ -555,11 +555,11 @@ IpIoIcmpv6Handler ( } while (Flag); TrimBytes = (UINT32) (PayLoadHdr - (UINT8 *) IcmpHdr); - + NetbufTrim (Pkt, TrimBytes, TRUE); // - // If the input packet has invalid format, and TrimBytes is larger than + // If the input packet has invalid format, and TrimBytes is larger than // the packet size, the NetbufTrim might trim the packet to zero. // if (Pkt->TotalSize != 0) { @@ -634,7 +634,7 @@ IpIoExtFree ( @param[in] Dest Pointer to the destination IP address. @param[in] Override Pointer to the overriden IP_IO data. - @return Pointer to the data structure created to wrap the packet. If any error occurs, + @return Pointer to the data structure created to wrap the packet. If any error occurs, then return NULL. **/ @@ -650,7 +650,7 @@ IpIoCreateSndEntry ( ) { IP_IO_SEND_ENTRY *SndEntry; - EFI_EVENT Event; + EFI_EVENT Event; EFI_STATUS Status; NET_FRAGMENT *ExtFragment; UINT32 FragmentCount; @@ -700,7 +700,7 @@ IpIoCreateSndEntry ( } // - // Build a fragment table to contain the fragments in the packet. + // Build a fragment table to contain the fragments in the packet. // if (IpIo->IpVersion == IP_VERSION_4) { ExtFragment = (NET_FRAGMENT *) TxData->Ip4TxData.FragmentTable; @@ -757,7 +757,7 @@ IpIoCreateSndEntry ( Ip6TxData->FragmentCount = FragmentCount; Ip6TxData->ExtHdrsLength = 0; Ip6TxData->ExtHdrs = NULL; - + // // Set the fields of SndToken // @@ -804,7 +804,7 @@ ON_ERROR: /** Destroy the SndEntry. - + This function pairs with IpIoCreateSndEntry(). @param[in] SndEntry Pointer to the send entry to be destroyed. @@ -1120,19 +1120,19 @@ IpIoListenHandlerDpc ( if (!NetIp6IsValidUnicast(&RxData->Ip6RxData.Header->SourceAddress)) { goto CleanUp; } - + if (RxData->Ip6RxData.DataLength == 0) { // // Discard zero length data payload packet. // goto CleanUp; } - + // // The fragment should always be valid for non-zero length packet. // ASSERT (RxData->Ip6RxData.FragmentCount != 0); - + // // Create a netbuffer representing IPv6 packet // @@ -1152,19 +1152,19 @@ IpIoListenHandlerDpc ( // Create a net session // CopyMem ( - &Session.Source, + &Session.Source, &RxData->Ip6RxData.Header->SourceAddress, sizeof(EFI_IPv6_ADDRESS) ); CopyMem ( - &Session.Dest, - &RxData->Ip6RxData.Header->DestinationAddress, + &Session.Dest, + &RxData->Ip6RxData.Header->DestinationAddress, sizeof(EFI_IPv6_ADDRESS) ); Session.IpHdr.Ip6Hdr = RxData->Ip6RxData.Header; Session.IpHdrLen = RxData->Ip6RxData.HeaderLength; Session.IpVersion = IP_VERSION_6; - } + } if (EFI_SUCCESS == Status) { @@ -1186,7 +1186,7 @@ CleanUp: if (IpIo->IpVersion == IP_VERSION_4){ gBS->SignalEvent (RxData->Ip4RxData.RecycleSignal); } else { - gBS->SignalEvent (RxData->Ip6RxData.RecycleSignal); + gBS->SignalEvent (RxData->Ip6RxData.RecycleSignal); } Resume: @@ -1223,7 +1223,7 @@ IpIoListenHandler ( Create a new IP_IO instance. If IpVersion is not IP_VERSION_4 or IP_VERSION_6, then ASSERT(). - + This function uses IP4/IP6 service binding protocol in Controller to create an IP4/IP6 child (aka IP4/IP6 instance). @@ -1232,7 +1232,7 @@ IpIoListenHandler ( @param[in] Controller The controller handle that has IP4 or IP6 service binding protocol installed. @param[in] IpVersion The version of the IP protocol to use, either - IPv4 or IPv6. + IPv4 or IPv6. @return Pointer to a newly created IP_IO instance, or NULL if failed. @@ -1287,7 +1287,7 @@ IpIoCreate ( Controller, Image, &IpIo->ChildHandle, - IpVersion, + IpVersion, (VOID **) & (IpIo->Ip) ); if (EFI_ERROR (Status)) { @@ -1324,7 +1324,7 @@ ReleaseIpIo: @retval EFI_SUCCESS The IP_IO instance opened with OpenData successfully. - @retval EFI_ACCESS_DENIED The IP_IO instance is configured, avoid to + @retval EFI_ACCESS_DENIED The IP_IO instance is configured, avoid to reopen it. @retval EFI_UNSUPPORTED IPv4 RawData mode is no supported. @retval EFI_INVALID_PARAMETER Invalid input parameter. @@ -1369,7 +1369,7 @@ IpIoOpen ( IpIo->StationIp = EFI_NTOHL (OpenData->IpConfigData.Ip4CfgData.StationAddress); IpIo->SubnetMask = EFI_NTOHL (OpenData->IpConfigData.Ip4CfgData.SubnetMask); } - + Status = IpIo->Ip.Ip4->Configure ( IpIo->Ip.Ip4, &OpenData->IpConfigData.Ip4CfgData @@ -1377,7 +1377,7 @@ IpIoOpen ( } else { Status = IpIo->Ip.Ip6->Configure ( - IpIo->Ip.Ip6, + IpIo->Ip.Ip6, &OpenData->IpConfigData.Ip6CfgData ); } @@ -1450,7 +1450,7 @@ IpIoOpen ( Stop an IP_IO instance. If Ip version is not IP_VERSION_4 or IP_VERSION_6, then ASSERT(). - + This function is paired with IpIoOpen(). The IP_IO will be unconfigured and all the pending send/receive tokens will be canceled. @@ -1532,7 +1532,7 @@ IpIoStop ( /** Destroy an IP_IO instance. - + This function is paired with IpIoCreate(). The IP_IO will be closed first. Resource will be freed afterwards. See IpIoCloseProtocolDestroyIpChild(). @@ -1550,7 +1550,7 @@ IpIoDestroy ( ) { EFI_STATUS Status; - + // // Stop the IpIo. // @@ -1580,7 +1580,7 @@ IpIoDestroy ( /** Send out an IP packet. - + This function is called after IpIoOpen(). The data to be sent is wrapped in Pkt. The IP instance wrapped in IpIo is used for sending by default but can be overriden by Sender. Other sending configs, like source address and gateway @@ -1720,7 +1720,7 @@ IpIoCancelTxToken ( If IpIo is NULL, then ASSERT(). If Ip version is not IP_VERSION_4 or IP_VERSION_6, then ASSERT(). - + The function is used to add the IP_IO to the IP_IO sending list. The caller can later use IpIoFindSender() to get the IP_IO and call IpIoSend() to send data. @@ -1883,9 +1883,9 @@ IpIoConfigIp ( if (((EFI_IP4_CONFIG_DATA *) IpConfigData)->UseDefaultAddress) { Status = Ip.Ip4->GetModeData ( - Ip.Ip4, - &Ip4ModeData, - NULL, + Ip.Ip4, + &Ip4ModeData, + NULL, NULL ); if (EFI_ERROR (Status)) { @@ -1898,12 +1898,12 @@ IpIoConfigIp ( } CopyMem ( - &IpInfo->Addr.Addr, - &((EFI_IP4_CONFIG_DATA *) IpConfigData)->StationAddress, + &IpInfo->Addr.Addr, + &((EFI_IP4_CONFIG_DATA *) IpConfigData)->StationAddress, sizeof (IP4_ADDR) ); CopyMem ( - &IpInfo->PreMask.SubnetMask, + &IpInfo->PreMask.SubnetMask, &((EFI_IP4_CONFIG_DATA *) IpConfigData)->SubnetMask, sizeof (IP4_ADDR) ); @@ -1961,11 +1961,11 @@ IpIoConfigIp ( } else { Status = EFI_NO_MAPPING; return Status; - } + } CopyMem ( - &IpInfo->Addr, - &Ip6ModeData.ConfigData.StationAddress, + &IpInfo->Addr, + &Ip6ModeData.ConfigData.StationAddress, sizeof (EFI_IPv6_ADDRESS) ); @@ -1976,7 +1976,7 @@ IpIoConfigIp ( if (EFI_ERROR (Status)) { Ip.Ip6->Configure (Ip.Ip6, NULL); } - } + } } else { // // The IP instance is reset, set the stored Addr and SubnetMask to zero. @@ -1994,7 +1994,7 @@ IpIoConfigIp ( sending purpose. If Ip version is not IP_VERSION_4 or IP_VERSION_6, then ASSERT(). - + This function pairs with IpIoAddIp(). The IpInfo is previously created by IpIoAddIp(). The IP_IO_IP_INFO::RefCnt is decremented and the IP instance will be dstroyed if the RefCnt is zero. @@ -2012,7 +2012,7 @@ IpIoRemoveIp ( { UINT8 IpVersion; - + if (IpIo == NULL || IpInfo == NULL) { return; } @@ -2070,7 +2070,7 @@ IpIoRemoveIp ( /** Find the first IP protocol maintained in IpIo whose local address is the same as Src. - + This function is called when the caller needs the IpIo to send data to the specified Src. The IpIo was added previously by IpIoAddIp(). @@ -2124,7 +2124,7 @@ IpIoFindSender ( if (EFI_IP6_EQUAL (&IpInfo->Addr.v6, &Src->v6)) { *IpIo = IpIoPtr; - return IpInfo; + return IpInfo; } } } @@ -2139,13 +2139,13 @@ IpIoFindSender ( /** Get the ICMP error map information. - + The ErrorStatus will be returned. The IsHard and Notify are optional. If they are not NULL, this routine will fill them. @param[in] IcmpError IcmpError Type. @param[in] IpVersion The version of the IP protocol to use, - either IPv4 or IPv6. + either IPv4 or IPv6. @param[out] IsHard If TRUE, indicates that it is a hard error. @param[out] Notify If TRUE, SockError needs to be notified. @@ -2217,12 +2217,12 @@ IpIoGetIcmpErrStatus ( case ICMP6_ERR_UNREACH_HOST: case ICMP6_ERR_TIMXCEED_HOPLIMIT: - case ICMP6_ERR_TIMXCEED_REASS: + case ICMP6_ERR_TIMXCEED_REASS: return EFI_HOST_UNREACHABLE; case ICMP6_ERR_UNREACH_PROTOCOL: return EFI_PROTOCOL_UNREACHABLE; - + case ICMP6_ERR_UNREACH_PORT: return EFI_PORT_UNREACHABLE; @@ -2251,23 +2251,23 @@ IpIoGetIcmpErrStatus ( Refresh the remote peer's Neighbor Cache entries. This function is called when the caller needs the IpIo to refresh the existing - IPv6 neighbor cache entries since the neighbor is considered reachable by the - node has recently received a confirmation that packets sent recently to the - neighbor were received by its IP layer. + IPv6 neighbor cache entries since the neighbor is considered reachable by the + node has recently received a confirmation that packets sent recently to the + neighbor were received by its IP layer. @param[in] IpIo Pointer to an IP_IO instance @param[in] Neighbor The IP address of the neighbor @param[in] Timeout Time in 100-ns units that this entry will - remain in the neighbor cache. A value of - zero means that the entry is permanent. - A value of non-zero means that the entry is + remain in the neighbor cache. A value of + zero means that the entry is permanent. + A value of non-zero means that the entry is dynamic and will be deleted after Timeout. @retval EFI_SUCCESS The operation is completed successfully. @retval EFI_NOT_STARTED The IpIo is not configured. @retval EFI_INVALID_PARAMETER Neighbor Address is invalid. - @retval EFI_NOT_FOUND The neighbor cache entry is not in the - neighbor table. + @retval EFI_NOT_FOUND The neighbor cache entry is not in the + neighbor table. @retval EFI_UNSUPPORTED IP version is IPv4, which doesn't support neighbor cache refresh. @retval EFI_OUT_OF_RESOURCES Failed due to resource limit. @@ -2277,7 +2277,7 @@ EFIAPI IpIoRefreshNeighbor ( IN IP_IO *IpIo, IN EFI_IP_ADDRESS *Neighbor, - IN UINT32 Timeout + IN UINT32 Timeout ) { EFI_IP6_PROTOCOL *Ip; diff --git a/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.uni b/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.uni index 755d29911b..2a82881b6a 100644 --- a/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.uni +++ b/MdeModulePkg/Library/DxeIpIoLib/DxeIpIoLib.uni @@ -3,13 +3,13 @@ // // This library instance provides IP services upon EFI IPv4/IPv6 Protocols. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c index 90d2e3e64d..bf8f5523e6 100644 --- a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c +++ b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.c @@ -648,10 +648,10 @@ NetGetIpClass ( /** Check whether the IP is a valid unicast address according to - the netmask. + the netmask. ASSERT if NetMask is zero. - + If all bits of the host address of IP are 0 or 1, IP is also not a valid unicast address, except when the originator is one of the endpoints of a point-to-point link with a 31-bit mask (RFC3021). @@ -670,7 +670,7 @@ NetIp4IsUnicast ( ) { ASSERT (NetMask != 0); - + if (Ip == 0 || IP4_IS_LOCAL_BROADCAST (Ip)) { return FALSE; } @@ -895,7 +895,7 @@ Ip6Swap128 ( /** Initialize a random seed using current time and monotonic count. - Get current time and monotonic count first. Then initialize a random seed + Get current time and monotonic count first. Then initialize a random seed based on some basic mathematics operation on the hour, day, minute, second, nanosecond and year of the current time and the monotonic count value. @@ -1132,7 +1132,7 @@ NetListInsertBefore ( If it has been removed, then restart the traversal from the head. If it hasn't been removed, then continue with the next node directly. This function will end the iterate and return the CallBack's last return value if error happens, - or retrun EFI_SUCCESS if 2 complete passes are made with no changes in the number of children in the list. + or retrun EFI_SUCCESS if 2 complete passes are made with no changes in the number of children in the list. @param[in] List The head of the list. @param[in] CallBack Pointer to the callback function to destroy one node in the list. @@ -1219,7 +1219,7 @@ NetIsInHandleBuffer ( ) { UINTN Index; - + if (NumberOfChildren == 0 || ChildHandleBuffer == NULL) { return FALSE; } @@ -1810,7 +1810,7 @@ NetLibDefaultUnload ( if (DriverBinding->ImageHandle != ImageHandle) { continue; } - + // // Disconnect the driver specified by ImageHandle from all // the devices in the handle database. @@ -1822,16 +1822,16 @@ NetLibDefaultUnload ( NULL ); } - + // // Uninstall all the protocols installed in the driver entry point - // + // gBS->UninstallProtocolInterface ( DriverBinding->DriverBindingHandle, &gEfiDriverBindingProtocolGuid, DriverBinding ); - + Status = gBS->HandleProtocol ( DeviceHandleBuffer[Index], &gEfiComponentNameProtocolGuid, @@ -2576,13 +2576,13 @@ Exit: /** - Detect media state for a network device. This routine will wait for a period of time at - a specified checking interval when a certain network is under connecting until connection + Detect media state for a network device. This routine will wait for a period of time at + a specified checking interval when a certain network is under connecting until connection process finishs or timeout. If Aip protocol is supported by low layer drivers, three kinds of media states can be detected: EFI_SUCCESS, EFI_NOT_READY and EFI_NO_MEDIA, represents - connected state, connecting state and no media state respectively. When function detects - the current state is EFI_NOT_READY, it will loop to wait for next time's check until state - turns to be EFI_SUCCESS or EFI_NO_MEDIA. If Aip protocol is not supported, function will + connected state, connecting state and no media state respectively. When function detects + the current state is EFI_NOT_READY, it will loop to wait for next time's check until state + turns to be EFI_SUCCESS or EFI_NO_MEDIA. If Aip protocol is not supported, function will call NetLibDetectMedia() and return state directly. @param[in] ServiceHandle The handle where network service binding protocols are @@ -2593,7 +2593,7 @@ Exit: @param[out] MediaState The pointer to the detected media state. @retval EFI_SUCCESS Media detection success. - @retval EFI_INVALID_PARAMETER ServiceHandle is not a valid network device handle or + @retval EFI_INVALID_PARAMETER ServiceHandle is not a valid network device handle or MediaState pointer is NULL. @retval EFI_DEVICE_ERROR A device error occurred. @retval EFI_TIMEOUT Network is connecting but timeout. @@ -2697,7 +2697,7 @@ NetLibDetectMediaWaitTimeout ( } // - // Loop to check media state + // Loop to check media state // Timer = NULL; @@ -2758,10 +2758,10 @@ NetLibDetectMediaWaitTimeout ( from DHCP). If the controller handle does not have the EFI_IP4_CONFIG2_PROTOCOL installed, the - default address is static. If failed to get the policy from Ip4 Config2 Protocol, + default address is static. If failed to get the policy from Ip4 Config2 Protocol, the default address is static. Otherwise, get the result from Ip4 Config2 Protocol. - @param[in] Controller The controller handle which has the EFI_IP4_CONFIG2_PROTOCOL + @param[in] Controller The controller handle which has the EFI_IP4_CONFIG2_PROTOCOL relative with the default address to judge. @retval TRUE If the default address is static. @@ -2775,12 +2775,12 @@ NetLibDefaultAddressIsStatic ( { EFI_STATUS Status; EFI_IP4_CONFIG2_PROTOCOL *Ip4Config2; - UINTN DataSize; + UINTN DataSize; EFI_IP4_CONFIG2_POLICY Policy; BOOLEAN IsStatic; Ip4Config2 = NULL; - + DataSize = sizeof (EFI_IP4_CONFIG2_POLICY); IsStatic = TRUE; @@ -2797,11 +2797,11 @@ NetLibDefaultAddressIsStatic ( if (EFI_ERROR (Status)) { goto ON_EXIT; } - + IsStatic = (BOOLEAN) (Policy == Ip4Config2PolicyStatic); ON_EXIT: - + return IsStatic; } @@ -3132,14 +3132,14 @@ NetLibStrToIp6andPrefix ( Convert one EFI_IPv6_ADDRESS to Null-terminated Unicode string. The text representation of address is defined in RFC 4291. - + @param[in] Ip6Address The pointer to the IPv6 address. @param[out] String The buffer to return the converted string. @param[in] StringSize The length in bytes of the input String. - + @retval EFI_SUCCESS Convert to string successfully. @retval EFI_INVALID_PARAMETER The input parameter is invalid. - @retval EFI_BUFFER_TOO_SMALL The BufferSize is too small for the result. BufferSize has been + @retval EFI_BUFFER_TOO_SMALL The BufferSize is too small for the result. BufferSize has been updated with the size needed to complete the request. **/ EFI_STATUS @@ -3165,7 +3165,7 @@ NetLibIp6ToStr ( // // Convert the UINT8 array to an UINT16 array for easy handling. - // + // ZeroMem (Ip6Addr, sizeof (Ip6Addr)); for (Index = 0; Index < 16; Index++) { Ip6Addr[Index / 2] |= (Ip6Address->Addr[Index] << ((1 - (Index % 2)) << 3)); @@ -3197,7 +3197,7 @@ NetLibIp6ToStr ( } } } - + if (CurrentZerosStart != DEFAULT_ZERO_START && CurrentZerosLength > 2) { if (LongestZerosStart == DEFAULT_ZERO_START || LongestZerosLength < CurrentZerosLength) { LongestZerosStart = CurrentZerosStart; @@ -3218,7 +3218,7 @@ NetLibIp6ToStr ( } Ptr += UnicodeSPrint(Ptr, 10, L"%x", Ip6Addr[Index]); } - + if (LongestZerosStart != DEFAULT_ZERO_START && LongestZerosStart + LongestZerosLength == 8) { *Ptr++ = L':'; } @@ -3281,7 +3281,7 @@ NetLibGetSystemGuid ( // return EFI_NOT_FOUND; } - + // // SMBIOS tables are byte packed so we need to do a byte copy to // prevend alignment faults on Itanium-based platform. @@ -3295,12 +3295,12 @@ NetLibGetSystemGuid ( // 1. Formatted section; 2. Unformatted string section. So, 2 steps are needed // to skip one SMBIOS structure. // - + // // Step 1: Skip over formatted section. // String = (CHAR8 *) (Smbios.Raw + Smbios.Hdr->Length); - + // // Step 2: Skip over unformated string section. // @@ -3318,7 +3318,7 @@ NetLibGetSystemGuid ( // Smbios.Raw = (UINT8 *)++String; break; - } + } } while (TRUE); } while (Smbios.Raw < SmbiosEnd.Raw); return EFI_NOT_FOUND; @@ -3328,19 +3328,19 @@ NetLibGetSystemGuid ( Create Dns QName according the queried domain name. If DomainName is NULL, then ASSERT(). - - QName is a domain name represented as a sequence of labels, - where each label consists of a length octet followed by that - number of octets. The QName terminates with the zero - length octet for the null label of the root. Caller should + + QName is a domain name represented as a sequence of labels, + where each label consists of a length octet followed by that + number of octets. The QName terminates with the zero + length octet for the null label of the root. Caller should take responsibility to free the buffer in returned pointer. - @param DomainName The pointer to the queried domain name string. + @param DomainName The pointer to the queried domain name string. @retval NULL Failed to fill QName. @return QName filled successfully. - -**/ + +**/ CHAR8 * EFIAPI NetLibCreateDnsQName ( @@ -3362,10 +3362,10 @@ NetLibCreateDnsQName ( Tail = NULL; // - // One byte for first label length, one byte for terminated length zero. + // One byte for first label length, one byte for terminated length zero. // QueryNameSize = StrLen (DomainName) + 2; - + if (QueryNameSize > DNS_MAX_NAME_SIZE) { return NULL; } @@ -3374,7 +3374,7 @@ NetLibCreateDnsQName ( if (QueryName == NULL) { return NULL; } - + Header = QueryName; Tail = Header + 1; Len = 0; diff --git a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf index ad0727c42f..c31a04bb72 100644 --- a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf +++ b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.inf @@ -1,7 +1,7 @@ ## @file # This library instance provides the basic network services. # -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# (C) Copyright 2015 Hewlett Packard Enterprise Development LP
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -64,4 +64,4 @@ gEfiIp4Config2ProtocolGuid ## SOMETIMES_CONSUMES gEfiComponentNameProtocolGuid ## SOMETIMES_CONSUMES gEfiComponentName2ProtocolGuid ## SOMETIMES_CONSUMES - gEfiAdapterInformationProtocolGuid ## SOMETIMES_CONSUMES \ No newline at end of file + gEfiAdapterInformationProtocolGuid ## SOMETIMES_CONSUMES diff --git a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.uni b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.uni index c324a50a61..2d6039a4fe 100644 --- a/MdeModulePkg/Library/DxeNetLib/DxeNetLib.uni +++ b/MdeModulePkg/Library/DxeNetLib/DxeNetLib.uni @@ -3,13 +3,13 @@ // // This library instance provides the basic network services. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Library/DxeNetLib/NetBuffer.c b/MdeModulePkg/Library/DxeNetLib/NetBuffer.c index d0e2b9f2a8..9d333659d6 100644 --- a/MdeModulePkg/Library/DxeNetLib/NetBuffer.c +++ b/MdeModulePkg/Library/DxeNetLib/NetBuffer.c @@ -1,7 +1,7 @@ /** @file Network library functions providing net buffer operation support. -Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -1847,11 +1847,11 @@ NetIp6PseudoHeadChecksum ( } /** - The function frees the net buffer which allocated by the IP protocol. It releases - only the net buffer and doesn't call the external free function. + The function frees the net buffer which allocated by the IP protocol. It releases + only the net buffer and doesn't call the external free function. - This function should be called after finishing the process of mIpSec->ProcessExt() - for outbound traffic. The (EFI_IPSEC2_PROTOCOL)->ProcessExt() allocates a new + This function should be called after finishing the process of mIpSec->ProcessExt() + for outbound traffic. The (EFI_IPSEC2_PROTOCOL)->ProcessExt() allocates a new buffer for the ESP, so there needs a function to free the old net buffer. @param[in] Nbuf The network buffer to be freed. @@ -1868,7 +1868,7 @@ NetIpSecNetbufFree ( Nbuf->RefCnt--; if (Nbuf->RefCnt == 0) { - + // // Update Vector only when NBuf is to be released. That is, // all the sharing of Nbuf increse Vector's RefCnt by one @@ -1883,14 +1883,14 @@ NetIpSecNetbufFree ( } // - // If NET_VECTOR_OWN_FIRST is set, release the first block since it is + // If NET_VECTOR_OWN_FIRST is set, release the first block since it is // allocated by us // if ((Nbuf->Vector->Flag & NET_VECTOR_OWN_FIRST) != 0) { FreePool (Nbuf->Vector->Block[0].Bulk); } FreePool (Nbuf->Vector); - FreePool (Nbuf); - } + FreePool (Nbuf); + } } diff --git a/MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.c b/MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.c index 664e8261af..befef0f2e5 100644 --- a/MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.c +++ b/MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.c @@ -6,7 +6,7 @@ to log performance data. If both PerformanceEx and Performance Protocol is not available, it does not log any performance information. - Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -226,7 +226,7 @@ EndPerformanceMeasurementEx ( UINTN EFIAPI GetPerformanceMeasurementEx ( - IN UINTN LogEntryKey, + IN UINTN LogEntryKey, OUT CONST VOID **Handle, OUT CONST CHAR8 **Token, OUT CONST CHAR8 **Module, diff --git a/MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf b/MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf index c7d06a3a1b..d9c7e833b5 100644 --- a/MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf +++ b/MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.inf @@ -1,20 +1,20 @@ ## @file # Performance library instance used in DXE phase. -# +# # This library instance provides infrastructure for DXE phase drivers to log performance # data. It consumes PerformanceEx or Performance Protocol published by DxeCorePerformanceLib # to log performance data. If both PerformanceEx and Performance Protocol are not available, # it does not log any performance information. -# +# # Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# +# ## [Defines] diff --git a/MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.uni b/MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.uni index 0c04cb0529..317e405df6 100644 --- a/MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.uni +++ b/MdeModulePkg/Library/DxePerformanceLib/DxePerformanceLib.uni @@ -6,13 +6,13 @@ // to log performance data. If both PerformanceEx and Performance Protocol are not available, // it does not log any performance information. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Library/DxePrintLibPrint2Protocol/PrintLib.c b/MdeModulePkg/Library/DxePrintLibPrint2Protocol/PrintLib.c index e09520c81b..4f69673767 100644 --- a/MdeModulePkg/Library/DxePrintLibPrint2Protocol/PrintLib.c +++ b/MdeModulePkg/Library/DxePrintLibPrint2Protocol/PrintLib.c @@ -1,12 +1,12 @@ /** @file Instance of Print Library based on gEfiPrint2SProtocolGuid. - Implement the print library instance by wrap the interface + Implement the print library instance by wrap the interface provided in the Print2S protocol. This protocol is defined as the internal - protocol related to this implementation, not in the public spec. So, this + protocol related to this implementation, not in the public spec. So, this library instance is only for this code base. -Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -47,13 +47,13 @@ EFI_PRINT2S_PROTOCOL *mPrint2SProtocol = NULL; /** The constructor function caches the pointer to Print2S protocol. - + The constructor function locates Print2S protocol from protocol database. - It will ASSERT() if that operation fails and it will always return EFI_SUCCESS. + It will ASSERT() if that operation fails and it will always return EFI_SUCCESS. @param ImageHandle The firmware allocated handle for the EFI image. @param SystemTable A pointer to the EFI System Table. - + @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS. **/ @@ -79,7 +79,7 @@ PrintLibConstructor ( /** - Worker function that converts a VA_LIST to a BASE_LIST based on a Null-terminated + Worker function that converts a VA_LIST to a BASE_LIST based on a Null-terminated format string. @param AsciiFormat TRUE if Format is an ASCII string. FALSE if Format is a Unicode string. @@ -151,11 +151,11 @@ DxePrintLibPrint2ProtocolVaListToBaseList ( FormatCharacter = ((*Format & 0xff) | ((BytesPerFormatCharacter == 1) ? 0 : (*(Format + 1) << 8))) & FormatMask; switch (FormatCharacter) { - case '.': - case '-': - case '+': - case ' ': - case ',': + case '.': + case '-': + case '+': + case ' ': + case ',': case '0': case '1': case '2': @@ -168,7 +168,7 @@ DxePrintLibPrint2ProtocolVaListToBaseList ( case '9': break; case 'L': - case 'l': + case 'l': Long = TRUE; break; case '*': @@ -177,7 +177,7 @@ DxePrintLibPrint2ProtocolVaListToBaseList ( case '\0': // // Make no output if Format string terminates unexpectedly when - // looking up for flag, width, precision and type. + // looking up for flag, width, precision and type. // Format -= BytesPerFormatCharacter; // @@ -187,8 +187,8 @@ DxePrintLibPrint2ProtocolVaListToBaseList ( Done = TRUE; break; } - } - + } + // // Handle each argument type // @@ -604,26 +604,26 @@ UnicodeSPrintAsciiFormat ( [ATTENTION] This function is deprecated for security reason. Converts a decimal value to a Null-terminated Unicode string. - - Converts the decimal number specified by Value to a Null-terminated Unicode - string specified by Buffer containing at most Width characters. No padding of spaces + + Converts the decimal number specified by Value to a Null-terminated Unicode + string specified by Buffer containing at most Width characters. No padding of spaces is ever performed. If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed. The number of Unicode characters in Buffer is returned not including the Null-terminator. If the conversion contains more than Width characters, then only the first - Width characters are returned, and the total number of characters + Width characters are returned, and the total number of characters required to perform the conversion is returned. - Additional conversion parameters are specified in Flags. - + Additional conversion parameters are specified in Flags. + The Flags bit LEFT_JUSTIFY is always ignored. All conversions are left justified in Buffer. If Width is 0, PREFIX_ZERO is ignored in Flags. If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and commas are inserted every 3rd digit starting from the right. - If RADIX_HEX is set in Flags, then the output buffer will be + If RADIX_HEX is set in Flags, then the output buffer will be formatted in hexadecimal format. If Value is < 0 and RADIX_HEX is not set in Flags, then the fist character in Buffer is a '-'. - If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored, - then Buffer is padded with '0' characters so the combination of the optional '-' + If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored, + then Buffer is padded with '0' characters so the combination of the optional '-' sign character, '0' characters, digit characters for Value, and the Null-terminator add up to Width characters. If both COMMA_TYPE and RADIX_HEX are set in Flags, then ASSERT(). @@ -639,7 +639,7 @@ UnicodeSPrintAsciiFormat ( @param Value The 64-bit signed value to convert to a string. @param Width The maximum number of Unicode characters to place in Buffer, not including the Null-terminator. - + @return The number of Unicode characters in Buffer not including the Null-terminator. **/ @@ -1083,29 +1083,29 @@ AsciiSPrintUnicodeFormat ( [ATTENTION] This function is deprecated for security reason. Converts a decimal value to a Null-terminated ASCII string. - - Converts the decimal number specified by Value to a Null-terminated ASCII string - specified by Buffer containing at most Width characters. No padding of spaces + + Converts the decimal number specified by Value to a Null-terminated ASCII string + specified by Buffer containing at most Width characters. No padding of spaces is ever performed. If Width is 0 then a width of MAXIMUM_VALUE_CHARACTERS is assumed. The number of ASCII characters in Buffer is returned not including the Null-terminator. If the conversion contains more than Width characters, then only the first Width characters are returned, and the total number of characters required to perform the conversion is returned. - Additional conversion parameters are specified in Flags. + Additional conversion parameters are specified in Flags. The Flags bit LEFT_JUSTIFY is always ignored. All conversions are left justified in Buffer. If Width is 0, PREFIX_ZERO is ignored in Flags. If COMMA_TYPE is set in Flags, then PREFIX_ZERO is ignored in Flags, and commas are inserted every 3rd digit starting from the right. - If RADIX_HEX is set in Flags, then the output buffer will be + If RADIX_HEX is set in Flags, then the output buffer will be formatted in hexadecimal format. If Value is < 0 and RADIX_HEX is not set in Flags, then the fist character in Buffer is a '-'. - If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored, - then Buffer is padded with '0' characters so the combination of the optional '-' + If PREFIX_ZERO is set in Flags and PREFIX_ZERO is not being ignored, + then Buffer is padded with '0' characters so the combination of the optional '-' sign character, '0' characters, digit characters for Value, and the Null-terminator add up to Width characters. - + If Buffer is NULL, then ASSERT(). If unsupported bits are set in Flags, then ASSERT(). If both COMMA_TYPE and RADIX_HEX are set in Flags, then ASSERT(). @@ -1117,7 +1117,7 @@ AsciiSPrintUnicodeFormat ( @param Value The 64-bit signed value to convert to a string. @param Width The maximum number of ASCII characters to place in Buffer, not including the Null-terminator. - + @return The number of ASCII characters in Buffer not including the Null-terminator. **/ @@ -1256,8 +1256,8 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 mHexStr[] = {'0','1','2','3','4','5',' **/ CHAR8 * InternalPrintLibValueToString ( - IN OUT CHAR8 *Buffer, - IN INT64 Value, + IN OUT CHAR8 *Buffer, + IN INT64 Value, IN UINTN Radix ) { @@ -1279,21 +1279,21 @@ InternalPrintLibValueToString ( } /** - Worker function that produces a Null-terminated string in an output buffer + Worker function that produces a Null-terminated string in an output buffer based on a Null-terminated format string and a VA_LIST argument list. - VSPrint function to process format and place the results in Buffer. Since a - VA_LIST is used this routine allows the nesting of Vararg routines. Thus + VSPrint function to process format and place the results in Buffer. Since a + VA_LIST is used this routine allows the nesting of Vararg routines. Thus this is the main print working routine. If COUNT_ONLY_NO_PRINT is set in Flags, Buffer will not be modified at all. - @param[out] Buffer The character buffer to print the results of the + @param[out] Buffer The character buffer to print the results of the parsing of Format into. - @param[in] BufferSize The maximum number of characters to put into + @param[in] BufferSize The maximum number of characters to put into buffer. @param[in] Flags Initial flags value. - Can only have FORMAT_UNICODE, OUTPUT_UNICODE, + Can only have FORMAT_UNICODE, OUTPUT_UNICODE, and COUNT_ONLY_NO_PRINT set. @param[in] Format A Null-terminated format string. @param[in] VaListMarker VA_LIST style variable argument list consumed by @@ -1317,11 +1317,11 @@ InternalPrintLibSPrintMarker ( ); /** - Worker function that produces a Null-terminated string in an output buffer + Worker function that produces a Null-terminated string in an output buffer based on a Null-terminated format string and variable argument list. - VSPrint function to process format and place the results in Buffer. Since a - VA_LIST is used this routine allows the nesting of Vararg routines. Thus + VSPrint function to process format and place the results in Buffer. Since a + VA_LIST is used this routine allows the nesting of Vararg routines. Thus this is the main print working routine @param StartOfBuffer The character buffer to print the results of the parsing @@ -1407,7 +1407,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 * CONST mStatusString[] = { @param Buffer The buffer to place the Unicode or ASCII string. @param EndBuffer The end of the input Buffer. No characters will be - placed after that. + placed after that. @param Length The count of character to be placed into Buffer. (Negative value indicates no buffer fill.) @param Character The character to be placed into Buffer. @@ -1426,7 +1426,7 @@ InternalPrintLibFillBuffer ( ) { INTN Index; - + for (Index = 0; Index < Length && Buffer < EndBuffer; Index++) { *Buffer = (CHAR8) Character; if (Increment != 1) { @@ -1439,21 +1439,21 @@ InternalPrintLibFillBuffer ( } /** - Worker function that produces a Null-terminated string in an output buffer + Worker function that produces a Null-terminated string in an output buffer based on a Null-terminated format string and a VA_LIST argument list. - VSPrint function to process format and place the results in Buffer. Since a - VA_LIST is used this routine allows the nesting of Vararg routines. Thus + VSPrint function to process format and place the results in Buffer. Since a + VA_LIST is used this routine allows the nesting of Vararg routines. Thus this is the main print working routine. If COUNT_ONLY_NO_PRINT is set in Flags, Buffer will not be modified at all. - @param[out] Buffer The character buffer to print the results of the + @param[out] Buffer The character buffer to print the results of the parsing of Format into. - @param[in] BufferSize The maximum number of characters to put into + @param[in] BufferSize The maximum number of characters to put into buffer. @param[in] Flags Initial flags value. - Can only have FORMAT_UNICODE, OUTPUT_UNICODE, + Can only have FORMAT_UNICODE, OUTPUT_UNICODE, and COUNT_ONLY_NO_PRINT set. @param[in] Format A Null-terminated format string. @param[in] VaListMarker VA_LIST style variable argument list consumed by @@ -1509,7 +1509,7 @@ InternalPrintLibSPrintMarker ( // // If you change this code be sure to match the 2 versions of this function. - // Nearly identical logic is found in the BasePrintLib and + // Nearly identical logic is found in the BasePrintLib and // DxePrintLibPrint2Protocol (both PrintLib instances). // @@ -1630,24 +1630,24 @@ InternalPrintLibSPrintMarker ( Format += BytesPerFormatCharacter; FormatCharacter = ((*Format & 0xff) | ((BytesPerFormatCharacter == 1) ? 0 : (*(Format + 1) << 8))) & FormatMask; switch (FormatCharacter) { - case '.': - Flags |= PRECISION; + case '.': + Flags |= PRECISION; break; - case '-': - Flags |= LEFT_JUSTIFY; + case '-': + Flags |= LEFT_JUSTIFY; break; - case '+': - Flags |= PREFIX_SIGN; + case '+': + Flags |= PREFIX_SIGN; break; - case ' ': - Flags |= PREFIX_BLANK; + case ' ': + Flags |= PREFIX_BLANK; break; - case ',': - Flags |= COMMA_TYPE; + case ',': + Flags |= COMMA_TYPE; break; case 'L': - case 'l': - Flags |= LONG_TYPE; + case 'l': + Flags |= LONG_TYPE; break; case '*': if ((Flags & PRECISION) == 0) { @@ -1691,11 +1691,11 @@ InternalPrintLibSPrintMarker ( Precision = Count; } break; - + case '\0': // // Make no output if Format string terminates unexpectedly when - // looking up for flag, width, precision and type. + // looking up for flag, width, precision and type. // Format -= BytesPerFormatCharacter; Precision = 0; @@ -1706,7 +1706,7 @@ InternalPrintLibSPrintMarker ( Done = TRUE; break; } - } + } // // Handle each argument type @@ -1746,9 +1746,9 @@ InternalPrintLibSPrintMarker ( // // 'd', 'u', 'x', and 'X' that are not preceded by 'l' or 'L' are assumed to be type "int". // This assumption is made so the format string definition is compatible with the ANSI C - // Specification for formatted strings. It is recommended that the Base Types be used - // everywhere, but in this one case, compliance with ANSI C is more important, and - // provides an implementation that is compatible with that largest possible set of CPU + // Specification for formatted strings. It is recommended that the Base Types be used + // everywhere, but in this one case, compliance with ANSI C is more important, and + // provides an implementation that is compatible with that largest possible set of CPU // architectures. This is why the type "int" is used in this one case. // if (BaseListMarker == NULL) { @@ -1786,9 +1786,9 @@ InternalPrintLibSPrintMarker ( // // 'd', 'u', 'x', and 'X' that are not preceded by 'l' or 'L' are assumed to be type "int". // This assumption is made so the format string definition is compatible with the ANSI C - // Specification for formatted strings. It is recommended that the Base Types be used - // everywhere, but in this one case, compliance with ANSI C is more important, and - // provides an implementation that is compatible with that largest possible set of CPU + // Specification for formatted strings. It is recommended that the Base Types be used + // everywhere, but in this one case, compliance with ANSI C is more important, and + // provides an implementation that is compatible with that largest possible set of CPU // architectures. This is why the type "unsigned int" is used in this one case. // Value = (unsigned int)Value; @@ -1800,9 +1800,9 @@ InternalPrintLibSPrintMarker ( // // 'd', 'u', 'x', and 'X' that are not preceded by 'l' or 'L' are assumed to be type "int". // This assumption is made so the format string definition is compatible with the ANSI C - // Specification for formatted strings. It is recommended that the Base Types be used - // everywhere, but in this one case, compliance with ANSI C is more important, and - // provides an implementation that is compatible with that largest possible set of CPU + // Specification for formatted strings. It is recommended that the Base Types be used + // everywhere, but in this one case, compliance with ANSI C is more important, and + // provides an implementation that is compatible with that largest possible set of CPU // architectures. This is why the type "unsigned int" is used in this one case. // Value = (unsigned int)Value; @@ -1816,7 +1816,7 @@ InternalPrintLibSPrintMarker ( Count = 0; } ArgumentString = (CHAR8 *)ValueBuffer + Count; - + Digits = Count % 3; if (Digits != 0) { Digits = 3 - Digits; @@ -1889,7 +1889,7 @@ InternalPrintLibSPrintMarker ( GuidData3 = ReadUnaligned16 (&(TmpGuid->Data3)); InternalPrintLibSPrint ( ValueBuffer, - MAXIMUM_VALUE_CHARACTERS, + MAXIMUM_VALUE_CHARACTERS, 0, "%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x", GuidData1, @@ -1910,9 +1910,9 @@ InternalPrintLibSPrintMarker ( case 't': if (BaseListMarker == NULL) { - TmpTime = VA_ARG (VaListMarker, TIME *); + TmpTime = VA_ARG (VaListMarker, TIME *); } else { - TmpTime = BASE_ARG (BaseListMarker, TIME *); + TmpTime = BASE_ARG (BaseListMarker, TIME *); } if (TmpTime == NULL) { ArgumentString = ""; @@ -1997,7 +1997,7 @@ InternalPrintLibSPrintMarker ( break; } break; - + case '\r': Format += BytesPerFormatCharacter; FormatCharacter = ((*Format & 0xff) | ((BytesPerFormatCharacter == 1) ? 0 : (*(Format + 1) << 8))) & FormatMask; @@ -2173,7 +2173,7 @@ InternalPrintLibSPrintMarker ( } /** - Returns the number of characters that would be produced by if the formatted + Returns the number of characters that would be produced by if the formatted output were produced not including the Null-terminator. If FormatString is not aligned on a 16-bit boundary, then ASSERT(). @@ -2186,7 +2186,7 @@ InternalPrintLibSPrintMarker ( @param[in] FormatString A Null-terminated Unicode format string. @param[in] Marker VA_LIST marker for the variable argument list. - @return The number of characters that would be produced, not including the + @return The number of characters that would be produced, not including the Null-terminator. **/ UINTN @@ -2201,7 +2201,7 @@ SPrintLength ( } /** - Returns the number of characters that would be produced by if the formatted + Returns the number of characters that would be produced by if the formatted output were produced not including the Null-terminator. If FormatString is NULL, then ASSERT() and 0 is returned. @@ -2212,7 +2212,7 @@ SPrintLength ( @param[in] FormatString A Null-terminated ASCII format string. @param[in] Marker VA_LIST marker for the variable argument list. - @return The number of characters that would be produced, not including the + @return The number of characters that would be produced, not including the Null-terminator. **/ UINTN diff --git a/MdeModulePkg/Library/DxeReportStatusCodeLib/ReportStatusCodeLib.c b/MdeModulePkg/Library/DxeReportStatusCodeLib/ReportStatusCodeLib.c index ce843cc47f..b28dc5c3bb 100644 --- a/MdeModulePkg/Library/DxeReportStatusCodeLib/ReportStatusCodeLib.c +++ b/MdeModulePkg/Library/DxeReportStatusCodeLib/ReportStatusCodeLib.c @@ -1,7 +1,7 @@ /** @file Report Status Code Library for DXE Phase. - Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -109,7 +109,7 @@ InternalReportStatusCode ( // return mReportStatusCodeLibStatusCodeProtocol->ReportStatusCode (Type, Value, Instance, (EFI_GUID *)CallerId, Data); } - + return EFI_UNSUPPORTED; } @@ -505,7 +505,7 @@ ReportStatusCodeEx ( // Tpl = gBS->RaiseTPL (TPL_HIGH_LEVEL); gBS->RestoreTPL (Tpl); - + StatusCodeData = NULL; if (Tpl <= TPL_NOTIFY) { // diff --git a/MdeModulePkg/Library/DxeResetSystemLib/DxeResetSystemLib.c b/MdeModulePkg/Library/DxeResetSystemLib/DxeResetSystemLib.c index 76bca223ae..ea4878cab1 100644 --- a/MdeModulePkg/Library/DxeResetSystemLib/DxeResetSystemLib.c +++ b/MdeModulePkg/Library/DxeResetSystemLib/DxeResetSystemLib.c @@ -18,11 +18,11 @@ /** This function causes a system-wide reset (cold reset), in which - all circuitry within the system returns to its initial state. This type of reset + all circuitry within the system returns to its initial state. This type of reset is asynchronous to system operation and operates without regard to cycle boundaries. - If this function returns, it means that the system does not support cold reset. + If this function returns, it means that the system does not support cold reset. **/ VOID EFIAPI @@ -34,7 +34,7 @@ ResetCold ( } /** - This function causes a system-wide initialization (warm reset), in which all processors + This function causes a system-wide initialization (warm reset), in which all processors are set to their initial state. Pending cycles are not corrupted. If this function returns, it means that the system does not support warm reset. @@ -49,7 +49,7 @@ ResetWarm ( } /** - This function causes the system to enter a power state equivalent + This function causes the system to enter a power state equivalent to the ACPI G2/S5 or G3 states. If this function returns, it means that the system does not support shut down reset. diff --git a/MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.c b/MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.c index aa4d93b6f3..65d788bc68 100644 --- a/MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.c +++ b/MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.c @@ -1,7 +1,7 @@ /** @file Provides generic security measurement functions for DXE module. -Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -68,8 +68,8 @@ ReallocateSecurityHandlerTable ( // Reallocate memory for security info structure. // mSecurityTable = ReallocatePool ( - mMaxNumberOfSecurityHandler * sizeof (SECURITY_INFO), - (mMaxNumberOfSecurityHandler + SECURITY_HANDLER_TABLE_SIZE) * sizeof (SECURITY_INFO), + mMaxNumberOfSecurityHandler * sizeof (SECURITY_INFO), + (mMaxNumberOfSecurityHandler + SECURITY_HANDLER_TABLE_SIZE) * sizeof (SECURITY_INFO), mSecurityTable ); @@ -88,7 +88,7 @@ ReallocateSecurityHandlerTable ( } /** - Check whether an operation is valid according to the requirement of current operation, + Check whether an operation is valid according to the requirement of current operation, which must make sure that the measure image operation is the last one. @param CurrentAuthOperation Current operation. @@ -102,14 +102,14 @@ CheckAuthenticationOperation ( IN UINT32 CurrentAuthOperation, IN UINT32 CheckAuthOperation ) -{ +{ // // Make sure new auth operation can be recognized. // ASSERT ((CheckAuthOperation & ~(EFI_AUTH_IMAGE_OPERATION_MASK | EFI_AUTH_OPERATION_AUTHENTICATION_STATE | EFI_AUTH_OPERATION_IMAGE_REQUIRED)) == 0); - + // - // When current operation includes measure image operation, + // When current operation includes measure image operation, // only another measure image operation or none operation will be allowed. // if ((CurrentAuthOperation & EFI_AUTH_OPERATION_MEASURE_IMAGE) == EFI_AUTH_OPERATION_MEASURE_IMAGE) { @@ -120,9 +120,9 @@ CheckAuthenticationOperation ( return FALSE; } } - + // - // When current operation doesn't include measure image operation, + // When current operation doesn't include measure image operation, // any new operation will be allowed. // return TRUE; @@ -184,12 +184,12 @@ RegisterSecurityHandler ( Execute registered handlers until one returns an error and that error is returned. If none of the handlers return an error, then EFI_SUCCESS is returned. - Before exectue handler, get the image buffer by file device path if a handler + Before exectue handler, get the image buffer by file device path if a handler requires the image file. And return the image buffer to each handler when exectue handler. The handlers are executed in same order to their registered order. - @param[in] AuthenticationStatus + @param[in] AuthenticationStatus This is the authentication type returned from the Section Extraction protocol. See the Section Extraction Protocol Specification for details on this type. @@ -197,9 +197,9 @@ RegisterSecurityHandler ( being dispatched. This will optionally be used for logging. @retval EFI_SUCCESS The file specified by File did authenticate when more - than one security handler services were registered, - or the file did not authenticate when no security - handler service was registered. And the platform policy + than one security handler services were registered, + or the file did not authenticate when no security + handler service was registered. And the platform policy dictates that the DXE Core may use File. @retval EFI_INVALID_PARAMETER File is NULL. @retval EFI_SECURITY_VIOLATION The file specified by File did not authenticate, and @@ -226,7 +226,7 @@ ExecuteSecurityHandlers ( EFI_HANDLE Handle; EFI_DEVICE_PATH_PROTOCOL *Node; EFI_DEVICE_PATH_PROTOCOL *FilePathToVerfiy; - + if (FilePath == NULL) { return EFI_INVALID_PARAMETER; } @@ -237,7 +237,7 @@ ExecuteSecurityHandlers ( if (mNumberOfSecurityHandler == 0) { return EFI_SUCCESS; } - + Status = EFI_SUCCESS; FileBuffer = NULL; FileSize = 0; @@ -309,8 +309,8 @@ ReallocateSecurity2HandlerTable ( // Reallocate memory for security info structure. // mSecurity2Table = ReallocatePool ( - mMaxNumberOfSecurity2Handler * sizeof (SECURITY2_INFO), - (mMaxNumberOfSecurity2Handler + SECURITY_HANDLER_TABLE_SIZE) * sizeof (SECURITY2_INFO), + mMaxNumberOfSecurity2Handler * sizeof (SECURITY2_INFO), + (mMaxNumberOfSecurity2Handler + SECURITY_HANDLER_TABLE_SIZE) * sizeof (SECURITY2_INFO), mSecurity2Table ); @@ -329,17 +329,17 @@ ReallocateSecurity2HandlerTable ( } /** - Check whether an operation is valid according to the requirement of current operation, + Check whether an operation is valid according to the requirement of current operation, which must make sure that the measure image operation is the last one. - + If AuthenticationOperation is not recongnized, return FALSE. If AuthenticationOperation is EFI_AUTH_OPERATION_NONE, return FALSE. If AuthenticationOperation includes security operation and authentication operation, return FALSE. If the previous register handler can't be executed before the later register handler, return FALSE. - + @param CurrentAuthOperation Current operation. @param CheckAuthOperation Operation to be checked. - + @retval TRUE Operation is valid for current operation. @retval FALSE Operation is invalid for current operation. **/ @@ -348,21 +348,21 @@ CheckAuthentication2Operation ( IN UINT32 CurrentAuthOperation, IN UINT32 CheckAuthOperation ) -{ +{ // // Make sure new auth operation can be recognized. // if (CheckAuthOperation == EFI_AUTH_OPERATION_NONE) { return FALSE; } - if ((CheckAuthOperation & ~(EFI_AUTH_IMAGE_OPERATION_MASK | - EFI_AUTH_NONE_IMAGE_OPERATION_MASK | + if ((CheckAuthOperation & ~(EFI_AUTH_IMAGE_OPERATION_MASK | + EFI_AUTH_NONE_IMAGE_OPERATION_MASK | EFI_AUTH_OPERATION_IMAGE_REQUIRED)) != 0) { return FALSE; } // - // When current operation includes measure image operation, + // When current operation includes measure image operation, // only another measure image or none image operation will be allowed. // if ((CurrentAuthOperation & EFI_AUTH_OPERATION_MEASURE_IMAGE) == EFI_AUTH_OPERATION_MEASURE_IMAGE) { @@ -373,7 +373,7 @@ CheckAuthentication2Operation ( return FALSE; } } - + // // Any other operation will be allowed. // @@ -434,16 +434,16 @@ RegisterSecurity2Handler ( } /** - Execute registered handlers based on input AuthenticationOperation until - one returns an error and that error is returned. - + Execute registered handlers based on input AuthenticationOperation until + one returns an error and that error is returned. + If none of the handlers return an error, then EFI_SUCCESS is returned. The handlers those satisfy AuthenticationOperation will only be executed. The handlers are executed in same order to their registered order. - @param[in] AuthenticationOperation + @param[in] AuthenticationOperation The operation type specifies which handlers will be executed. - @param[in] AuthenticationStatus + @param[in] AuthenticationStatus The authentication status for the input file. @param[in] File This is a pointer to the device path of the file that is being dispatched. This will optionally be used for logging. @@ -461,7 +461,7 @@ RegisterSecurity2Handler ( @retval EFI_SUCCESS FileBuffer is NULL and current user has permission to start UEFI device drivers on the device path specified by DevicePath. @retval EFI_SECURITY_VIOLATION The file specified by File or FileBuffer did not - authenticate, and the platform policy dictates that + authenticate, and the platform policy dictates that the file should be placed in the untrusted state. @retval EFI_SECURITY_VIOLATION FileBuffer FileBuffer is NULL and the user has no permission to start UEFI device drivers on the device path specified @@ -472,7 +472,7 @@ RegisterSecurity2Handler ( @retval EFI_ACCESS_DENIED The file specified by File did not authenticate, and the platform policy dictates that the DXE Foundation may not use File. - @retval EFI_INVALID_PARAMETER File and FileBuffer are both NULL. + @retval EFI_INVALID_PARAMETER File and FileBuffer are both NULL. **/ EFI_STATUS EFIAPI diff --git a/MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf b/MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf index 0f8a13b99d..41d8ff8fd1 100644 --- a/MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf +++ b/MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf @@ -3,7 +3,7 @@ # # This library provides generic security measurement functions for DXE module. # -# Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.
+# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -22,7 +22,7 @@ FILE_GUID = 7F61122C-19DF-47c3-BA0D-6C1149E30FA1 MODULE_TYPE = DXE_DRIVER VERSION_STRING = 1.0 - LIBRARY_CLASS = SecurityManagementLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER + LIBRARY_CLASS = SecurityManagementLib|DXE_CORE DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER # # The following information is for reference only and not required by the build tools. diff --git a/MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib.c b/MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib.c index d8d0684273..353174724e 100644 --- a/MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib.c +++ b/MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib.c @@ -5,7 +5,7 @@ StartPerformanceMeasurement(), EndPerformanceMeasurement(), StartPerformanceMeasurementEx() and EndPerformanceMeasurementEx() are not implemented. - Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -313,7 +313,7 @@ EndPerformanceMeasurement ( UINTN EFIAPI GetByPerformanceProtocol ( - IN UINTN LogEntryKey, + IN UINTN LogEntryKey, OUT CONST VOID **Handle, OUT CONST CHAR8 **Token, OUT CONST CHAR8 **Module, @@ -450,12 +450,12 @@ GetAllSmmGaugeData ( mSmmPerformanceBuffer = (UINT8 *) (UINTN) Entry->PhysicalStart; // - // Initialize communicate buffer + // Initialize communicate buffer // SmmCommBufferHeader = (EFI_SMM_COMMUNICATE_HEADER *)mSmmPerformanceBuffer; SmmPerfCommData = (SMM_PERF_COMMUNICATE *)SmmCommBufferHeader->Data; ZeroMem((UINT8*)SmmPerfCommData, sizeof(SMM_PERF_COMMUNICATE)); - + CopyGuid (&SmmCommBufferHeader->HeaderGuid, &gSmmPerformanceProtocolGuid); SmmCommBufferHeader->MessageLength = sizeof(SMM_PERF_COMMUNICATE); CommSize = SMM_PERFORMANCE_COMMUNICATION_BUFFER_SIZE; @@ -482,7 +482,7 @@ GetAllSmmGaugeData ( // // Get all SMM gauge data - // + // SmmPerfCommData->Function = SMM_PERF_FUNCTION_GET_GAUGE_DATA; SmmPerfCommData->GaugeData = (GAUGE_DATA_ENTRY *) Buffer; EntriesGot = 0; @@ -589,12 +589,12 @@ GetAllSmmGaugeDataEx ( ASSERT (Index < PiSmmCommunicationRegionTable->NumberOfEntries); mSmmPerformanceBuffer = (UINT8 *) (UINTN) Entry->PhysicalStart; // - // Initialize communicate buffer + // Initialize communicate buffer // SmmCommBufferHeader = (EFI_SMM_COMMUNICATE_HEADER *)mSmmPerformanceBuffer; SmmPerfCommData = (SMM_PERF_COMMUNICATE_EX *)SmmCommBufferHeader->Data; ZeroMem((UINT8*)SmmPerfCommData, sizeof(SMM_PERF_COMMUNICATE_EX)); - + CopyGuid (&SmmCommBufferHeader->HeaderGuid, &gSmmPerformanceExProtocolGuid); SmmCommBufferHeader->MessageLength = sizeof(SMM_PERF_COMMUNICATE_EX); CommSize = SMM_PERFORMANCE_COMMUNICATION_BUFFER_SIZE; @@ -621,7 +621,7 @@ GetAllSmmGaugeDataEx ( // // Get all SMM gauge data - // + // SmmPerfCommData->Function = SMM_PERF_FUNCTION_GET_GAUGE_DATA; SmmPerfCommData->GaugeDataEx = (GAUGE_DATA_ENTRY_EX *) Buffer; EntriesGot = 0; @@ -691,7 +691,7 @@ GetAllSmmGaugeDataEx ( UINTN EFIAPI GetPerformanceMeasurementEx ( - IN UINTN LogEntryKey, + IN UINTN LogEntryKey, OUT CONST VOID **Handle, OUT CONST CHAR8 **Token, OUT CONST CHAR8 **Module, diff --git a/MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib.inf b/MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib.inf index 2b057704f8..f4d94c23e8 100644 --- a/MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib.inf +++ b/MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib.inf @@ -1,19 +1,19 @@ ## @file # Performance library instance used in DXE phase to dump SMM performance data. -# +# # This library instance allows a DXE driver or UEFI application to dump both PEI/DXE and SMM performance data. # StartPerformanceMeasurement(), EndPerformanceMeasurement(), StartPerformanceMeasurementEx() # and EndPerformanceMeasurementEx() are not implemented. -# -# Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.
+# +# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# +# ## [Defines] diff --git a/MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib.uni b/MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib.uni index 96c5762256..6db8cff7a4 100644 --- a/MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib.uni +++ b/MdeModulePkg/Library/DxeSmmPerformanceLib/DxeSmmPerformanceLib.uni @@ -5,13 +5,13 @@ // StartPerformanceMeasurement(), EndPerformanceMeasurement(), StartPerformanceMeasurementEx() // and EndPerformanceMeasurementEx() are not implemented. // -// Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.c b/MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.c index fd85d0e787..bf15a78fd3 100644 --- a/MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.c +++ b/MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.c @@ -2,7 +2,7 @@ This library is used to share code between UEFI network stack modules. It provides the helper routines to access TCP service. -Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at
@@ -23,7 +23,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include /** - The common notify function associated with various TcpIo events. + The common notify function associated with various TcpIo events. @param[in] Event The event signaled. @param[in] Context The context. @@ -111,14 +111,14 @@ ON_EXIT: } /** - Create a TCP socket with the specified configuration data. + Create a TCP socket with the specified configuration data. @param[in] Image The handle of the driver image. @param[in] Controller The handle of the controller. @param[in] TcpVersion The version of Tcp, TCP_VERSION_4 or TCP_VERSION_6. @param[in] ConfigData The Tcp configuration data. @param[out] TcpIo The TcpIo. - + @retval EFI_SUCCESS The TCP socket is created and configured. @retval EFI_INVALID_PARAMETER One or more parameters are invalid. @retval EFI_UNSUPPORTED One or more of the control options are not @@ -176,7 +176,7 @@ TcpIoCreateSocket ( // // Create the TCP child instance and get the TCP protocol. - // + // Status = NetLibCreateServiceChild ( Controller, Image, @@ -395,9 +395,9 @@ ON_ERROR: return Status; } - + /** - Destroy the socket. + Destroy the socket. @param[in] TcpIo The TcpIo which wraps the socket to be destroyed. @@ -531,7 +531,7 @@ TcpIoDestroySocket ( @param[in, out] TcpIo The TcpIo wrapping the TCP socket. @param[in] Timeout The time to wait for connection done. Set to NULL for infinite wait. - + @retval EFI_SUCCESS Connect to the other endpoint of the TCP socket successfully. @retval EFI_TIMEOUT Failed to connect to the other endpoint of the @@ -604,7 +604,7 @@ TcpIoConnect ( @param[in, out] TcpIo The TcpIo wrapping the TCP socket. @param[in] Timeout The time to wait for connection done. Set to NULL for infinite wait. - + @retval EFI_SUCCESS Connect to the other endpoint of the TCP socket successfully. @retval EFI_INVALID_PARAMETER One or more parameters are invalid. @@ -671,7 +671,7 @@ TcpIoAccept ( } // - // The new TCP instance handle created for the established connection is + // The new TCP instance handle created for the established connection is // in ListenToken. // if (!EFI_ERROR (Status)) { @@ -680,7 +680,7 @@ TcpIoAccept ( } else { ProtocolGuid = &gEfiTcp6ProtocolGuid; } - + Status = gBS->OpenProtocol ( TcpIo->ListenToken.Tcp4Token.NewChildHandle, ProtocolGuid, @@ -719,7 +719,7 @@ TcpIoReset ( Tcp4 = NULL; Tcp6 = NULL; - if (TcpIo->TcpVersion == TCP_VERSION_4) { + if (TcpIo->TcpVersion == TCP_VERSION_4) { TcpIo->CloseToken.Tcp4Token.AbortOnClose = TRUE; Tcp4 = TcpIo->Tcp.Tcp4; Status = Tcp4->Close (Tcp4, &TcpIo->CloseToken.Tcp4Token); @@ -744,13 +744,13 @@ TcpIoReset ( } } - + /** Transmit the Packet to the other endpoint of the socket. @param[in] TcpIo The TcpIo wrapping the TCP socket. @param[in] Packet The packet to transmit. - + @retval EFI_SUCCESS The packet is trasmitted. @retval EFI_INVALID_PARAMETER One or more parameters are invalid. @retval EFI_UNSUPPORTED One or more of the control options are not @@ -779,7 +779,7 @@ TcpIoTransmit ( if (TcpIo->TcpVersion == TCP_VERSION_4) { - Size = sizeof (EFI_TCP4_TRANSMIT_DATA) + + Size = sizeof (EFI_TCP4_TRANSMIT_DATA) + (Packet->BlockOpNum - 1) * sizeof (EFI_TCP4_FRAGMENT_DATA); } else if (TcpIo->TcpVersion == TCP_VERSION_6) { Size = sizeof (EFI_TCP6_TRANSMIT_DATA) + @@ -825,7 +825,7 @@ TcpIoTransmit ( if (Tcp4 == NULL) { goto ON_EXIT; } - + Status = Tcp4->Transmit (Tcp4, &TcpIo->TxToken.Tcp4Token); } else { TcpIo->TxToken.Tcp6Token.Packet.TxData = (EFI_TCP6_TRANSMIT_DATA *) Data; @@ -929,7 +929,7 @@ TcpIoReceive ( } if (Tcp6 == NULL) { - return EFI_DEVICE_ERROR; + return EFI_DEVICE_ERROR; } } else { @@ -961,11 +961,11 @@ TcpIoReceive ( } else { Status = Tcp6->Receive (Tcp6, &TcpIo->RxToken.Tcp6Token); } - + if (EFI_ERROR (Status)) { goto ON_EXIT; } - + while (!TcpIo->IsRxDone && ((Timeout == NULL) || EFI_ERROR (gBS->CheckEvent (Timeout)))) { // // Poll until some data is received or an error occurs. diff --git a/MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf b/MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf index 1b29dcec48..2dc74a73e2 100644 --- a/MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf +++ b/MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.inf @@ -1,7 +1,7 @@ ## @file # This library instance provides TCP services by EFI TCPv4/TCPv6 Protocols. -# -# Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
+# +# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at diff --git a/MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.uni b/MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.uni index 7623613383..693dd37dea 100644 --- a/MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.uni +++ b/MdeModulePkg/Library/DxeTcpIoLib/DxeTcpIoLib.uni @@ -3,13 +3,13 @@ // // This library instance provides TCP services by EFI TCPv4/TCPv6 Protocols. // -// Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf b/MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf index ce6e996a51..3e541ee6ee 100644 --- a/MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf +++ b/MdeModulePkg/Library/DxeUdpIoLib/DxeUdpIoLib.inf @@ -1,7 +1,7 @@ ## @file # This library instance provides UDP services by consuming EFI UDPv4/UDPv6 Protocols. -# -# Copyright (c) 2008 - 2017, Intel Corporation. All rights reserved.
+# +# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at diff --git a/MdeModulePkg/Library/DxeUdpIoLib/DxeUpdIoLib.uni b/MdeModulePkg/Library/DxeUdpIoLib/DxeUpdIoLib.uni index 7218f59acf..2bdaa8346a 100644 --- a/MdeModulePkg/Library/DxeUdpIoLib/DxeUpdIoLib.uni +++ b/MdeModulePkg/Library/DxeUdpIoLib/DxeUpdIoLib.uni @@ -3,13 +3,13 @@ // // This library instance provides UDP services by consuming EFI UDPv4/UDPv6 Protocols. // -// Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c b/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c index 9182751ad7..d9ce57f8f4 100644 --- a/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c +++ b/MdeModulePkg/Library/FileExplorerLib/FileExplorer.c @@ -1,7 +1,7 @@ /** @file File explorer related functions. -Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at @@ -61,7 +61,7 @@ HII_VENDOR_DEVICE_PATH FeHiiVendorDevicePath = { { END_DEVICE_PATH_TYPE, END_ENTIRE_DEVICE_PATH_SUBTYPE, - { + { (UINT8) (END_DEVICE_PATH_LENGTH), (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8) } @@ -554,7 +554,7 @@ LibFileInfo ( Buffer = NULL; BufferSize = 0; - + Status = FHand->GetInfo ( FHand, InfoType, @@ -691,19 +691,19 @@ LibAppendFileName ( Size1 = StrSize (Str1); Size2 = StrSize (Str2); - + // // Check overflow // if (((MAX_UINTN - Size1) < Size2) || ((MAX_UINTN - Size1 - Size2) < sizeof(CHAR16))) { return NULL; } - + MaxLen = (Size1 + Size2 + sizeof (CHAR16))/ sizeof (CHAR16); Str = AllocateZeroPool (Size1 + Size2 + sizeof (CHAR16)); ASSERT (Str != NULL); - TmpStr = AllocateZeroPool (Size1 + Size2 + sizeof (CHAR16)); + TmpStr = AllocateZeroPool (Size1 + Size2 + sizeof (CHAR16)); ASSERT (TmpStr != NULL); StrCpyS (Str, MaxLen, Str1); @@ -724,7 +724,7 @@ LibAppendFileName ( // // - // Use TmpStr as a backup, as StrCpyS in BaseLib does not handle copy of two strings + // Use TmpStr as a backup, as StrCpyS in BaseLib does not handle copy of two strings // that overlap. // StrCpyS (TmpStr, MaxLen, Ptr + 3); @@ -736,7 +736,7 @@ LibAppendFileName ( // // - // Use TmpStr as a backup, as StrCpyS in BaseLib does not handle copy of two strings + // Use TmpStr as a backup, as StrCpyS in BaseLib does not handle copy of two strings // that overlap. // StrCpyS (TmpStr, MaxLen, Ptr + 2); @@ -750,7 +750,7 @@ LibAppendFileName ( } FreePool (TmpStr); - + return Str; } @@ -845,7 +845,7 @@ LibFindFileSystem ( VolumeLabel, MenuEntry->HelpString ); - MenuEntry->DisplayStringToken = HiiSetString ( + MenuEntry->DisplayStringToken = HiiSetString ( gFileExplorerPrivate.FeHiiHandle, 0, MenuEntry->DisplayString, @@ -871,16 +871,16 @@ LibFindFileSystem ( /** Find the file handle from the input menu info. - + @param MenuEntry Input Menu info. @param RetFileHandle Return the file handle for the input device path. - + @retval EFI_SUCESS Find the file handle success. @retval Other Find the file handle failure. **/ EFI_STATUS LibGetFileHandleFromMenu ( - IN MENU_ENTRY *MenuEntry, + IN MENU_ENTRY *MenuEntry, OUT EFI_FILE_HANDLE *RetFileHandle ) { @@ -917,18 +917,18 @@ LibGetFileHandleFromMenu ( /** Find the file handle from the input device path info. - + @param RootDirectory Device path info. @param RetFileHandle Return the file handle for the input device path. @param ParentFileName Parent file name. @param DeviceHandle Driver handle for this partition. - + @retval EFI_SUCESS Find the file handle success. @retval Other Find the file handle failure. **/ EFI_STATUS LibGetFileHandleFromDevicePath ( - IN EFI_DEVICE_PATH_PROTOCOL *RootDirectory, + IN EFI_DEVICE_PATH_PROTOCOL *RootDirectory, OUT EFI_FILE_HANDLE *RetFileHandle, OUT UINT16 **ParentFileName, OUT EFI_HANDLE *DeviceHandle @@ -953,12 +953,12 @@ LibGetFileHandleFromDevicePath ( if (EFI_ERROR (Status)) { return Status; } - + Status = gBS->HandleProtocol (Handle, &gEfiSimpleFileSystemProtocolGuid, (VOID**)&Volume); if (EFI_ERROR (Status)) { return Status; } - + // // Open the Volume to get the File System handle // @@ -974,7 +974,7 @@ LibGetFileHandleFromDevicePath ( *RetFileHandle = FileHandle; return EFI_SUCCESS; } - + // // Duplicate the device path to avoid the access to unaligned device path node. // Because the device path consists of one or more FILE PATH MEDIA DEVICE PATH @@ -990,7 +990,7 @@ LibGetFileHandleFromDevicePath ( Status = EFI_OUT_OF_RESOURCES; goto Done; } - + // // Parse each MEDIA_FILEPATH_DP node. There may be more than one, since the // directory information and filename can be seperate. The goal is to inch @@ -1123,11 +1123,11 @@ LibCreateNewFile ( /** Find files under current directory. - + All files and sub-directories in current directory will be stored in DirectoryMenu for future use. - @param FileHandle Parent file handle. + @param FileHandle Parent file handle. @param FileName Parent file name. @param DeviceHandle Driver handle for this partition. @@ -1223,7 +1223,7 @@ LibFindFiles ( } else { NewMenuEntry->DisplayString = LibStrDuplicate (DirInfo->FileName); } - + NewMenuEntry->DisplayStringToken = HiiSetString ( gFileExplorerPrivate.FeHiiHandle, 0, @@ -1459,7 +1459,7 @@ LibGetDevicePath ( } /** - Choose a file in the specified directory. + Choose a file in the specified directory. If user input NULL for the RootDirectory, will choose file in the system. @@ -1612,7 +1612,7 @@ FileExplorerLibConstructor ( // Status = gBS->LocateProtocol (&gEfiFormBrowser2ProtocolGuid, NULL, (VOID **) &gFileExplorerPrivate.FormBrowser2); ASSERT_EFI_ERROR (Status); - + InitializeListHead (&gFileExplorerPrivate.FsOptionMenu->Head); return EFI_SUCCESS; @@ -1647,7 +1647,7 @@ FileExplorerLibDestructor ( NULL ); ASSERT_EFI_ERROR (Status); - + HiiRemovePackages (gFileExplorerPrivate.FeHiiHandle); } diff --git a/MdeModulePkg/Library/FileExplorerLib/FileExplorer.h b/MdeModulePkg/Library/FileExplorerLib/FileExplorer.h index b9a84fb667..bf1450dbd5 100644 --- a/MdeModulePkg/Library/FileExplorerLib/FileExplorer.h +++ b/MdeModulePkg/Library/FileExplorerLib/FileExplorer.h @@ -1,14 +1,14 @@ /** @file File explorer lib. -Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ #ifndef _FILE_EXPLORER_H_ @@ -226,8 +226,8 @@ EFI_STATUS LibUpdateFileExplorer ( IN UINT16 KeyValue ); - - + + /** Get the device path info saved in the menu structure. @@ -239,4 +239,4 @@ LibGetDevicePath ( IN UINT16 KeyValue ); -#endif +#endif diff --git a/MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf b/MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf index 75071d9541..5d9822d95f 100644 --- a/MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf +++ b/MdeModulePkg/Library/FileExplorerLib/FileExplorerLib.inf @@ -1,15 +1,15 @@ ## @file # library defines a set of interfaces for how to do file explorer. -# -# Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.
+# +# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials are licensed and made available under # the terms and conditions of the BSD License that accompanies this distribution. # The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php. -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# +# ## [Defines] INF_VERSION = 0x00010005 @@ -52,7 +52,7 @@ [Guids] gEfiFileSystemVolumeLabelInfoIdGuid ## SOMETIMES_CONSUMES ## GUID (Indicate the information type is volume) gEfiIfrTianoGuid ## SOMETIMES_CONSUMES ## GUID (Extended IFR Guid Opcode) - + [Protocols] gEfiSimpleFileSystemProtocolGuid ## SOMETIMES_CONSUMES gEfiHiiConfigAccessProtocolGuid ## PRODUCES @@ -60,4 +60,4 @@ gEfiDevicePathToTextProtocolGuid ## PRODUCES [Depex.common.DXE_DRIVER] - gEfiFormBrowser2ProtocolGuid AND gEfiHiiDatabaseProtocolGuid \ No newline at end of file + gEfiFormBrowser2ProtocolGuid AND gEfiHiiDatabaseProtocolGuid diff --git a/MdeModulePkg/Library/FileExplorerLib/FileExplorerString.uni b/MdeModulePkg/Library/FileExplorerLib/FileExplorerString.uni index e16adb66fc..64f4a5884f 100644 --- a/MdeModulePkg/Library/FileExplorerLib/FileExplorerString.uni +++ b/MdeModulePkg/Library/FileExplorerLib/FileExplorerString.uni @@ -1,24 +1,24 @@ ///** @file // -// Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
-// This program and the accompanying materials -// are licensed and made available under the terms and conditions of the BSD License -// which accompanies this distribution. The full text of the license may be found at -// http://opensource.org/licenses/bsd-license.php -// -// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -// +// Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+// This program and the accompanying materials +// are licensed and made available under the terms and conditions of the BSD License +// which accompanies this distribution. The full text of the license may be found at +// http://opensource.org/licenses/bsd-license.php +// +// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +// // Module Name: // // FileExplorerString.uni -// +// // Abstract: -// +// // String definitions for file exporer library. -// +// // Revision History: -// +// // --*/ /=# diff --git a/MdeModulePkg/Library/FileExplorerLib/FileExplorerVfr.vfr b/MdeModulePkg/Library/FileExplorerLib/FileExplorerVfr.vfr index b2bf94d5c7..b969d97a8c 100644 --- a/MdeModulePkg/Library/FileExplorerLib/FileExplorerVfr.vfr +++ b/MdeModulePkg/Library/FileExplorerLib/FileExplorerVfr.vfr @@ -2,7 +2,7 @@ // // File Explorer Formset // -// Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.
+// Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
// This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at @@ -82,4 +82,4 @@ formset key = KEY_VALUE_NO_CREATE_FOLDER_AND_EXIT; endform; -endformset; \ No newline at end of file +endformset; diff --git a/MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.c b/MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.c index 5d7b52c06e..c40dfea398 100644 --- a/MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.c +++ b/MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.c @@ -1,6 +1,6 @@ /** @file -Copyright (c) 2010, Intel Corporation. All rights reserved.
+Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions @@ -103,7 +103,7 @@ UpdateLockBox ( @retval RETURN_SUCCESS the information is restored successfully. @retval RETURN_INVALID_PARAMETER the Guid is NULL, or one of Buffer and Length is NULL. - @retval RETURN_WRITE_PROTECTED Buffer and Length are NULL, but the LockBox has no + @retval RETURN_WRITE_PROTECTED Buffer and Length are NULL, but the LockBox has no LOCK_BOX_ATTRIBUTE_RESTORE_IN_PLACE attribute. @retval RETURN_BUFFER_TOO_SMALL the Length is too small to hold the confidential information. @retval RETURN_NOT_FOUND the requested GUID not found. diff --git a/MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.inf b/MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.inf index 1018a69e81..d824c59281 100644 --- a/MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.inf +++ b/MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.inf @@ -1,7 +1,7 @@ ## @file # NULL LockBox library instance. # -# Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions @@ -27,7 +27,7 @@ # # The following information is for reference only and not required by the build tools. # -# VALID_ARCHITECTURES = IA32 X64 +# VALID_ARCHITECTURES = IA32 X64 # [Sources] diff --git a/MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.uni b/MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.uni index e8164cccdc..6b961e51aa 100644 --- a/MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.uni +++ b/MdeModulePkg/Library/LockBoxNullLib/LockBoxNullLib.uni @@ -3,14 +3,14 @@ // // NULL LockBox library instance. // -// Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions // of the BSD License which accompanies this distribution. The // full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Library/LzmaCustomDecompressLib/F86GuidedSectionExtraction.c b/MdeModulePkg/Library/LzmaCustomDecompressLib/F86GuidedSectionExtraction.c index b02dc515f8..29150d375a 100644 --- a/MdeModulePkg/Library/LzmaCustomDecompressLib/F86GuidedSectionExtraction.c +++ b/MdeModulePkg/Library/LzmaCustomDecompressLib/F86GuidedSectionExtraction.c @@ -1,10 +1,10 @@ /** @file - LZMA Decompress GUIDed Section Extraction Library, which produces LZMA custom + LZMA Decompress GUIDed Section Extraction Library, which produces LZMA custom decompression algorithm with the converter for the different arch code. It wraps Lzma decompress interfaces to GUIDed Section Extraction interfaces and registers them into GUIDed handler table. - Copyright (c) 2012, Intel Corporation. All rights reserved.
+ Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -22,16 +22,16 @@ Examines a GUIDed section and returns the size of the decoded buffer and the size of an scratch buffer required to actually decode the data in a GUIDed section. - Examines a GUIDed section specified by InputSection. + Examines a GUIDed section specified by InputSection. If GUID for InputSection does not match the GUID that this handler supports, - then RETURN_UNSUPPORTED is returned. + then RETURN_UNSUPPORTED is returned. If the required information can not be retrieved from InputSection, then RETURN_INVALID_PARAMETER is returned. If the GUID of InputSection does match the GUID that this handler supports, then the size required to hold the decoded buffer is returned in OututBufferSize, the size of an optional scratch buffer is returned in ScratchSize, and the Attributes field from EFI_GUID_DEFINED_SECTION header of InputSection is returned in SectionAttribute. - + If InputSection is NULL, then ASSERT(). If OutputBufferSize is NULL, then ASSERT(). If ScratchBufferSize is NULL, then ASSERT(). @@ -100,16 +100,16 @@ LzmaArchGuidedSectionGetInfo ( /** Decompress a LZAM compressed GUIDed section into a caller allocated output buffer. - - Decodes the GUIDed section specified by InputSection. - If GUID for InputSection does not match the GUID that this handler supports, then RETURN_UNSUPPORTED is returned. + + Decodes the GUIDed section specified by InputSection. + If GUID for InputSection does not match the GUID that this handler supports, then RETURN_UNSUPPORTED is returned. If the data in InputSection can not be decoded, then RETURN_INVALID_PARAMETER is returned. If the GUID of InputSection does match the GUID that this handler supports, then InputSection is decoded into the buffer specified by OutputBuffer and the authentication status of this decode operation is returned in AuthenticationStatus. If the decoded buffer is identical to the data in InputSection, then OutputBuffer is set to point at the data in InputSection. Otherwise, the decoded data will be placed in caller allocated buffer specified by OutputBuffer. - + If InputSection is NULL, then ASSERT(). If OutputBuffer is NULL, then ASSERT(). If ScratchBuffer is NULL and this decode operation requires a scratch buffer, then ASSERT(). @@ -117,10 +117,10 @@ LzmaArchGuidedSectionGetInfo ( @param[in] InputSection A pointer to a GUIDed section of an FFS formatted file. - @param[out] OutputBuffer A pointer to a buffer that contains the result of a decode operation. + @param[out] OutputBuffer A pointer to a buffer that contains the result of a decode operation. @param[out] ScratchBuffer A caller allocated buffer that may be required by this function - as a scratch buffer to perform the decode operation. - @param[out] AuthenticationStatus + as a scratch buffer to perform the decode operation. + @param[out] AuthenticationStatus A pointer to the authentication status of the decoded output buffer. See the definition of authentication status in the EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI section of the PI Specification. EFI_AUTH_STATUS_PLATFORM_OVERRIDE must @@ -147,7 +147,7 @@ LzmaArchGuidedSectionExtraction ( UINT32 X86State; UINT32 OutputBufferSize; UINT32 ScratchBufferSize; - + ASSERT (OutputBuffer != NULL); ASSERT (InputSection != NULL); @@ -178,7 +178,7 @@ LzmaArchGuidedSectionExtraction ( ); // - // After decompress, the data need to be converted to the raw data. + // After decompress, the data need to be converted to the raw data. // if (!EFI_ERROR (Status)) { Status = LzmaUefiDecompressGetInfo ( @@ -187,13 +187,13 @@ LzmaArchGuidedSectionExtraction ( &OutputBufferSize, &ScratchBufferSize ); - + if (!EFI_ERROR (Status)) { x86_Convert_Init(X86State); x86_Convert(*OutputBuffer, OutputBufferSize, 0, &X86State, 0); } } - + return Status; } diff --git a/MdeModulePkg/Library/LzmaCustomDecompressLib/GuidedSectionExtraction.c b/MdeModulePkg/Library/LzmaCustomDecompressLib/GuidedSectionExtraction.c index 7ef9fbbfc6..c15fa8bc0f 100644 --- a/MdeModulePkg/Library/LzmaCustomDecompressLib/GuidedSectionExtraction.c +++ b/MdeModulePkg/Library/LzmaCustomDecompressLib/GuidedSectionExtraction.c @@ -3,7 +3,7 @@ It wraps Lzma decompress interfaces to GUIDed Section Extraction interfaces and registers them into GUIDed handler table. - Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -20,16 +20,16 @@ Examines a GUIDed section and returns the size of the decoded buffer and the size of an scratch buffer required to actually decode the data in a GUIDed section. - Examines a GUIDed section specified by InputSection. + Examines a GUIDed section specified by InputSection. If GUID for InputSection does not match the GUID that this handler supports, - then RETURN_UNSUPPORTED is returned. + then RETURN_UNSUPPORTED is returned. If the required information can not be retrieved from InputSection, then RETURN_INVALID_PARAMETER is returned. If the GUID of InputSection does match the GUID that this handler supports, then the size required to hold the decoded buffer is returned in OututBufferSize, the size of an optional scratch buffer is returned in ScratchSize, and the Attributes field from EFI_GUID_DEFINED_SECTION header of InputSection is returned in SectionAttribute. - + If InputSection is NULL, then ASSERT(). If OutputBufferSize is NULL, then ASSERT(). If ScratchBufferSize is NULL, then ASSERT(). @@ -98,16 +98,16 @@ LzmaGuidedSectionGetInfo ( /** Decompress a LZAM compressed GUIDed section into a caller allocated output buffer. - - Decodes the GUIDed section specified by InputSection. - If GUID for InputSection does not match the GUID that this handler supports, then RETURN_UNSUPPORTED is returned. + + Decodes the GUIDed section specified by InputSection. + If GUID for InputSection does not match the GUID that this handler supports, then RETURN_UNSUPPORTED is returned. If the data in InputSection can not be decoded, then RETURN_INVALID_PARAMETER is returned. If the GUID of InputSection does match the GUID that this handler supports, then InputSection is decoded into the buffer specified by OutputBuffer and the authentication status of this decode operation is returned in AuthenticationStatus. If the decoded buffer is identical to the data in InputSection, then OutputBuffer is set to point at the data in InputSection. Otherwise, the decoded data will be placed in caller allocated buffer specified by OutputBuffer. - + If InputSection is NULL, then ASSERT(). If OutputBuffer is NULL, then ASSERT(). If ScratchBuffer is NULL and this decode operation requires a scratch buffer, then ASSERT(). @@ -115,10 +115,10 @@ LzmaGuidedSectionGetInfo ( @param[in] InputSection A pointer to a GUIDed section of an FFS formatted file. - @param[out] OutputBuffer A pointer to a buffer that contains the result of a decode operation. + @param[out] OutputBuffer A pointer to a buffer that contains the result of a decode operation. @param[out] ScratchBuffer A caller allocated buffer that may be required by this function - as a scratch buffer to perform the decode operation. - @param[out] AuthenticationStatus + as a scratch buffer to perform the decode operation. + @param[out] AuthenticationStatus A pointer to the authentication status of the decoded output buffer. See the definition of authentication status in the EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI section of the PI Specification. EFI_AUTH_STATUS_PLATFORM_OVERRIDE must @@ -197,6 +197,6 @@ LzmaDecompressLibConstructor ( &gLzmaCustomDecompressGuid, LzmaGuidedSectionGetInfo, LzmaGuidedSectionExtraction - ); + ); } diff --git a/MdeModulePkg/Library/LzmaCustomDecompressLib/LZMA-SDK-README.txt b/MdeModulePkg/Library/LzmaCustomDecompressLib/LZMA-SDK-README.txt index 7a6a77f952..0824bd75cd 100644 --- a/MdeModulePkg/Library/LzmaCustomDecompressLib/LZMA-SDK-README.txt +++ b/MdeModulePkg/Library/LzmaCustomDecompressLib/LZMA-SDK-README.txt @@ -1,4 +1,4 @@ LzmaCustomDecompressLib is based on the LZMA SDK 16.04. LZMA SDK 16.04 was placed in the public domain on 2016-10-04. It was released on the -http://www.7-zip.org/sdk.html website. \ No newline at end of file +http://www.7-zip.org/sdk.html website. diff --git a/MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaDecompress.c b/MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaDecompress.c index cdf4c08cab..501a15d99d 100644 --- a/MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaDecompress.c +++ b/MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaDecompress.c @@ -1,7 +1,7 @@ /** @file LZMA Decompress interfaces - Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -105,15 +105,15 @@ GetDecodedSizeOfBuf( // /** - Given a Lzma compressed source buffer, this function retrieves the size of - the uncompressed buffer and the size of the scratch buffer required + Given a Lzma compressed source buffer, this function retrieves the size of + the uncompressed buffer and the size of the scratch buffer required to decompress the compressed source buffer. - Retrieves the size of the uncompressed buffer and the temporary scratch buffer + Retrieves the size of the uncompressed buffer and the temporary scratch buffer required to decompress the buffer specified by Source and SourceSize. - The size of the uncompressed buffer is returned in DestinationSize, + The size of the uncompressed buffer is returned in DestinationSize, the size of the scratch buffer is returned in ScratchSize, and RETURN_SUCCESS is returned. - This function does not have scratch buffer available to perform a thorough + This function does not have scratch buffer available to perform a thorough checking of the validity of the source data. It just retrieves the "Original Size" field from the LZMA_HEADER_SIZE beginning bytes of the source data and output it as DestinationSize. And ScratchSize is specific to the decompression implementation. @@ -126,11 +126,11 @@ GetDecodedSizeOfBuf( that will be generated when the compressed buffer specified by Source and SourceSize is decompressed. @param ScratchSize A pointer to the size, in bytes, of the scratch buffer that - is required to decompress the compressed buffer specified + is required to decompress the compressed buffer specified by Source and SourceSize. - @retval RETURN_SUCCESS The size of the uncompressed data was returned - in DestinationSize and the size of the scratch + @retval RETURN_SUCCESS The size of the uncompressed data was returned + in DestinationSize and the size of the scratch buffer was returned in ScratchSize. **/ @@ -158,8 +158,8 @@ LzmaUefiDecompressGetInfo ( Decompresses a Lzma compressed source buffer. Extracts decompressed data to its original form. - If the compressed source data specified by Source is successfully decompressed - into Destination, then RETURN_SUCCESS is returned. If the compressed source data + If the compressed source data specified by Source is successfully decompressed + into Destination, then RETURN_SUCCESS is returned. If the compressed source data specified by Source is not in a valid compressed data format, then RETURN_INVALID_PARAMETER is returned. @@ -167,13 +167,13 @@ LzmaUefiDecompressGetInfo ( @param SourceSize The size of source buffer. @param Destination The destination buffer to store the decompressed data @param Scratch A temporary scratch buffer that is used to perform the decompression. - This is an optional parameter that may be NULL if the + This is an optional parameter that may be NULL if the required scratch buffer size is 0. - - @retval RETURN_SUCCESS Decompression completed successfully, and + + @retval RETURN_SUCCESS Decompression completed successfully, and the uncompressed buffer is returned in Destination. - @retval RETURN_INVALID_PARAMETER - The source buffer specified by Source is corrupted + @retval RETURN_INVALID_PARAMETER + The source buffer specified by Source is corrupted (not in a valid compressed format). **/ RETURN_STATUS @@ -195,7 +195,7 @@ LzmaUefiDecompress ( AllocFuncs.Functions.Free = SzFree; AllocFuncs.Buffer = Scratch; AllocFuncs.BufferSize = SCRATCH_BUFFER_REQUEST_SIZE; - + DecodedBufSize = (SizeT)GetDecodedSizeOfBuf((UINT8*)Source); EncodedDataSize = (SizeT) (SourceSize - LZMA_HEADER_SIZE); diff --git a/MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaDecompressLibInternal.h b/MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaDecompressLibInternal.h index 3096e91dbe..ac91d66009 100644 --- a/MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaDecompressLibInternal.h +++ b/MdeModulePkg/Library/LzmaCustomDecompressLib/LzmaDecompressLibInternal.h @@ -1,7 +1,7 @@ /** @file LZMA Decompress Library internal header file declares Lzma decompress interfaces. - Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -23,15 +23,15 @@ #include /** - Given a Lzma compressed source buffer, this function retrieves the size of - the uncompressed buffer and the size of the scratch buffer required + Given a Lzma compressed source buffer, this function retrieves the size of + the uncompressed buffer and the size of the scratch buffer required to decompress the compressed source buffer. - Retrieves the size of the uncompressed buffer and the temporary scratch buffer + Retrieves the size of the uncompressed buffer and the temporary scratch buffer required to decompress the buffer specified by Source and SourceSize. - The size of the uncompressed buffer is returned in DestinationSize, + The size of the uncompressed buffer is returned in DestinationSize, the size of the scratch buffer is returned in ScratchSize, and RETURN_SUCCESS is returned. - This function does not have scratch buffer available to perform a thorough + This function does not have scratch buffer available to perform a thorough checking of the validity of the source data. It just retrieves the "Original Size" field from the LZMA_HEADER_SIZE beginning bytes of the source data and output it as DestinationSize. And ScratchSize is specific to the decompression implementation. @@ -44,11 +44,11 @@ that will be generated when the compressed buffer specified by Source and SourceSize is decompressed. @param ScratchSize A pointer to the size, in bytes, of the scratch buffer that - is required to decompress the compressed buffer specified + is required to decompress the compressed buffer specified by Source and SourceSize. - @retval RETURN_SUCCESS The size of the uncompressed data was returned - in DestinationSize and the size of the scratch + @retval RETURN_SUCCESS The size of the uncompressed data was returned + in DestinationSize and the size of the scratch buffer was returned in ScratchSize. **/ @@ -65,8 +65,8 @@ LzmaUefiDecompressGetInfo ( Decompresses a Lzma compressed source buffer. Extracts decompressed data to its original form. - If the compressed source data specified by Source is successfully decompressed - into Destination, then RETURN_SUCCESS is returned. If the compressed source data + If the compressed source data specified by Source is successfully decompressed + into Destination, then RETURN_SUCCESS is returned. If the compressed source data specified by Source is not in a valid compressed data format, then RETURN_INVALID_PARAMETER is returned. @@ -74,13 +74,13 @@ LzmaUefiDecompressGetInfo ( @param SourceSize The size of source buffer. @param Destination The destination buffer to store the decompressed data @param Scratch A temporary scratch buffer that is used to perform the decompression. - This is an optional parameter that may be NULL if the + This is an optional parameter that may be NULL if the required scratch buffer size is 0. - - @retval RETURN_SUCCESS Decompression completed successfully, and + + @retval RETURN_SUCCESS Decompression completed successfully, and the uncompressed buffer is returned in Destination. - @retval RETURN_INVALID_PARAMETER - The source buffer specified by Source is corrupted + @retval RETURN_INVALID_PARAMETER + The source buffer specified by Source is corrupted (not in a valid compressed format). **/ RETURN_STATUS diff --git a/MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.c b/MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.c index 0df144fe79..3ccd17254f 100644 --- a/MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.c +++ b/MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.c @@ -1,7 +1,7 @@ /** @file Null instance of OEM Hook Status Code Library with empty functions. - Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -30,20 +30,20 @@ OemHookStatusCodeInitialize ( /** Report status code to OEM device. - + @param CodeType Indicates the type of status code being reported. - @param Value Describes the current status of a hardware or software entity. - This included information about the class and subclass that is used to classify the entity - as well as an operation. For progress codes, the operation is the current activity. - For error codes, it is the exception. For debug codes, it is not defined at this time. - @param Instance The enumeration of a hardware or software entity within the system. - A system may contain multiple entities that match a class/subclass pairing. - The instance differentiates between them. An instance of 0 indicates that instance information is unavailable, + @param Value Describes the current status of a hardware or software entity. + This included information about the class and subclass that is used to classify the entity + as well as an operation. For progress codes, the operation is the current activity. + For error codes, it is the exception. For debug codes, it is not defined at this time. + @param Instance The enumeration of a hardware or software entity within the system. + A system may contain multiple entities that match a class/subclass pairing. + The instance differentiates between them. An instance of 0 indicates that instance information is unavailable, not meaningful, or not relevant. Valid instance numbers start with 1. - @param CallerId This optional parameter may be used to identify the caller. - This parameter allows the status code driver to apply different rules to different callers. + @param CallerId This optional parameter may be used to identify the caller. + This parameter allows the status code driver to apply different rules to different callers. @param Data This optional parameter may be used to pass additional data - + @retval EFI_SUCCESS Always return EFI_SUCCESS. **/ diff --git a/MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf b/MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf index 32ed1a41bf..34555761a0 100644 --- a/MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf +++ b/MdeModulePkg/Library/OemHookStatusCodeLibNull/OemHookStatusCodeLibNull.inf @@ -1,7 +1,7 @@ ## @file # Null instance of OEM Hook Status Code Library with empty functions. # -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -20,7 +20,7 @@ FILE_GUID = 54D2878F-25CD-4a2b-8420-EBD18E609C76 MODULE_TYPE = DXE_DRIVER VERSION_STRING = 1.0 - LIBRARY_CLASS = OemHookStatusCodeLib + LIBRARY_CLASS = OemHookStatusCodeLib # # The following information is for reference only and not required by the build tools. @@ -32,4 +32,4 @@ OemHookStatusCodeLibNull.c [Packages] - MdePkg/MdePkg.dec \ No newline at end of file + MdePkg/MdePkg.dec diff --git a/MdeModulePkg/Library/PeiCrc32GuidedSectionExtractLib/PeiCrc32GuidedSectionExtractLib.c b/MdeModulePkg/Library/PeiCrc32GuidedSectionExtractLib/PeiCrc32GuidedSectionExtractLib.c index 34f1e17006..fd71239f40 100644 --- a/MdeModulePkg/Library/PeiCrc32GuidedSectionExtractLib/PeiCrc32GuidedSectionExtractLib.c +++ b/MdeModulePkg/Library/PeiCrc32GuidedSectionExtractLib/PeiCrc32GuidedSectionExtractLib.c @@ -1,16 +1,16 @@ /** @file - This library registers CRC32 guided section handler + This library registers CRC32 guided section handler to parse CRC32 encapsulation section and extract raw data. -Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -37,7 +37,7 @@ typedef struct { /** GetInfo gets raw data size and attribute of the input guided section. - It first checks whether the input guid section is supported. + It first checks whether the input guid section is supported. If not, EFI_INVALID_PARAMETER will return. @param InputSection Buffer containing the input GUIDed section to be processed. @@ -45,7 +45,7 @@ typedef struct { @param ScratchBufferSize The size of ScratchBuffer. @param SectionAttribute The attribute of the input guided section. - @retval EFI_SUCCESS The size of destination buffer, the size of scratch buffer and + @retval EFI_SUCCESS The size of destination buffer, the size of scratch buffer and the attribute of the input section are successfully retrieved. @retval EFI_INVALID_PARAMETER The GUID in InputSection does not match this instance guid. @@ -98,7 +98,7 @@ Crc32GuidedSectionGetInfo ( Extraction handler tries to extract raw data from the input guided section. It also does authentication check for 32bit CRC value in the input guided section. - It first checks whether the input guid section is supported. + It first checks whether the input guid section is supported. If not, EFI_INVALID_PARAMETER will return. @param InputSection Buffer containing the input GUIDed section to be processed. @@ -133,7 +133,7 @@ Crc32GuidedSectionHandler ( &(((EFI_GUID_DEFINED_SECTION2 *) InputSection)->SectionDefinitionGuid))) { return EFI_INVALID_PARAMETER; } - + // // Get section Crc32 checksum. // @@ -155,7 +155,7 @@ Crc32GuidedSectionHandler ( &(((EFI_GUID_DEFINED_SECTION *) InputSection)->SectionDefinitionGuid))) { return EFI_INVALID_PARAMETER; } - + // // Get section Crc32 checksum. // diff --git a/MdeModulePkg/Library/PeiCrc32GuidedSectionExtractLib/PeiCrc32GuidedSectionExtractLib.inf b/MdeModulePkg/Library/PeiCrc32GuidedSectionExtractLib/PeiCrc32GuidedSectionExtractLib.inf index 45fd141f01..c1d6f27992 100644 --- a/MdeModulePkg/Library/PeiCrc32GuidedSectionExtractLib/PeiCrc32GuidedSectionExtractLib.inf +++ b/MdeModulePkg/Library/PeiCrc32GuidedSectionExtractLib/PeiCrc32GuidedSectionExtractLib.inf @@ -1,11 +1,11 @@ ## @file # Pei Crc32 Guided Section Extract library. # -# This library doesn't produce any library class. The constructor function uses +# This library doesn't produce any library class. The constructor function uses # ExtractGuidedSectionLib service to register CRC32 guided section handler # that parses CRC32 encapsulation section and extracts raw data. # -# Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License diff --git a/MdeModulePkg/Library/PeiDebugPrintHobLib/PeiDebugPrintHobLib.c b/MdeModulePkg/Library/PeiDebugPrintHobLib/PeiDebugPrintHobLib.c index 4bcf0030a0..6314842dd0 100644 --- a/MdeModulePkg/Library/PeiDebugPrintHobLib/PeiDebugPrintHobLib.c +++ b/MdeModulePkg/Library/PeiDebugPrintHobLib/PeiDebugPrintHobLib.c @@ -25,7 +25,7 @@ /** The constructor reads variable and sets HOB - + @param FileHandle The handle of FFS header the loaded driver. @param PeiServices The pointer to the PEI services. @@ -44,7 +44,7 @@ PeiDebugPrintHobLibConstructor ( UINTN Size; UINT64 GlobalErrorLevel; UINT32 HobErrorLevel; - + Status = PeiServicesLocatePpi ( &gEfiPeiReadOnlyVariable2PpiGuid, 0, @@ -53,8 +53,8 @@ PeiDebugPrintHobLibConstructor ( ); if (!EFI_ERROR (Status)) { Size = sizeof (GlobalErrorLevel); - Status = Variable->GetVariable ( - Variable, + Status = Variable->GetVariable ( + Variable, DEBUG_MASK_VARIABLE_NAME, &gEfiGenericVariableGuid, NULL, diff --git a/MdeModulePkg/Library/PeiDebugPrintHobLib/PeiDebugPrintHobLib.inf b/MdeModulePkg/Library/PeiDebugPrintHobLib/PeiDebugPrintHobLib.inf index 0380dee01f..aeed739f26 100644 --- a/MdeModulePkg/Library/PeiDebugPrintHobLib/PeiDebugPrintHobLib.inf +++ b/MdeModulePkg/Library/PeiDebugPrintHobLib/PeiDebugPrintHobLib.inf @@ -3,7 +3,7 @@ # HOB that contains the debug mask. # # Copyright (c) 2011, Apple, Inc. All rights reserved.
-# Copyright (c) 2012 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -47,4 +47,4 @@ gEfiGenericVariableGuid [Depex] - gEfiPeiReadOnlyVariable2PpiGuid \ No newline at end of file + gEfiPeiReadOnlyVariable2PpiGuid diff --git a/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c b/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c index 96c9b30987..6f0f416273 100644 --- a/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c +++ b/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/DebugLib.c @@ -30,8 +30,8 @@ /** Prints a debug message to the debug output device if the specified error level is enabled. - If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function - GetDebugPrintErrorLevel (), then print the message specified by Format and the + If any bit in ErrorLevel is also set in DebugPrintErrorLevelLib function + GetDebugPrintErrorLevel (), then print the message specified by Format and the associated variable argument list to the debug output device. If Format is NULL, then ASSERT(). @@ -41,7 +41,7 @@ @param ErrorLevel The error level of the debug message. @param Format Format string for the debug message to print. - @param ... Variable argument list whose contents are accessed + @param ... Variable argument list whose contents are accessed based on the format string specified by Format. **/ @@ -75,7 +75,7 @@ DebugPrint ( // // Compute the total size of the record. - // Note that the passing-in format string and variable parameters will be constructed to + // Note that the passing-in format string and variable parameters will be constructed to // the following layout: // // Buffer->|------------------------| @@ -173,7 +173,7 @@ DebugPrint ( if (*Format == '\0') { // // Make no output if Format string terminates unexpectedly when - // looking up for flag, width, precision and type. + // looking up for flag, width, precision and type. // Format--; } @@ -183,7 +183,7 @@ DebugPrint ( // break; } - + // // Pack variable arguments into the storage area following EFI_DEBUG_INFO. // @@ -206,7 +206,7 @@ DebugPrint ( // // If the converted BASE_LIST is larger than the 12 * sizeof (UINT64) allocated bytes, then ASSERT() - // This indicates that the DEBUG() macro is passing in more argument than can be handled by + // This indicates that the DEBUG() macro is passing in more argument than can be handled by // the EFI_DEBUG_INFO record // ASSERT ((CHAR8 *)BaseListMarker <= FormatString); @@ -236,14 +236,14 @@ DebugPrint ( } /** - Prints an assert message containing a filename, line number, and description. + Prints an assert message containing a filename, line number, and description. This may be followed by a breakpoint or a dead loop. Print a message of the form "ASSERT (): \n" - to the debug output device. If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of - PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if - DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then - CpuDeadLoop() is called. If neither of these bits are set, then this function + to the debug output device. If DEBUG_PROPERTY_ASSERT_BREAKPOINT_ENABLED bit of + PcdDebugProperyMask is set then CpuBreakpoint() is called. Otherwise, if + DEBUG_PROPERTY_ASSERT_DEADLOOP_ENABLED bit of PcdDebugProperyMask is set then + CpuDeadLoop() is called. If neither of these bits are set, then this function returns immediately after the message is printed to the debug output device. DebugAssert() must actively prevent recursion. If DebugAssert() is called while processing another DebugAssert(), then DebugAssert() must return immediately. @@ -367,14 +367,14 @@ DebugAssert ( /** Fills a target buffer with PcdDebugClearMemoryValue, and returns the target buffer. - This function fills Length bytes of Buffer with the value specified by + This function fills Length bytes of Buffer with the value specified by PcdDebugClearMemoryValue, and returns Buffer. If Buffer is NULL, then ASSERT(). - If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). + If Length is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). @param Buffer Pointer to the target buffer to be filled with PcdDebugClearMemoryValue. - @param Length Number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue. + @param Length Number of bytes in Buffer to fill with zeros PcdDebugClearMemoryValue. @return Buffer Pointer to the target buffer filled with PcdDebugClearMemoryValue. @@ -395,7 +395,7 @@ DebugClearMemory ( /** Returns TRUE if ASSERT() macros are enabled. - This function returns TRUE if the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of + This function returns TRUE if the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is set. Otherwise FALSE is returned. @retval TRUE The DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is set. @@ -412,10 +412,10 @@ DebugAssertEnabled ( } -/** +/** Returns TRUE if DEBUG() macros are enabled. - This function returns TRUE if the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of + This function returns TRUE if the DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of PcdDebugProperyMask is set. Otherwise FALSE is returned. @retval TRUE The DEBUG_PROPERTY_DEBUG_PRINT_ENABLED bit of PcdDebugProperyMask is set. @@ -432,10 +432,10 @@ DebugPrintEnabled ( } -/** +/** Returns TRUE if DEBUG_CODE() macros are enabled. - This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of + This function returns TRUE if the DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugProperyMask is set. Otherwise FALSE is returned. @retval TRUE The DEBUG_PROPERTY_DEBUG_CODE_ENABLED bit of PcdDebugProperyMask is set. @@ -452,10 +452,10 @@ DebugCodeEnabled ( } -/** +/** Returns TRUE if DEBUG_CLEAR_MEMORY() macro is enabled. - This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of + This function returns TRUE if the DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set. Otherwise FALSE is returned. @retval TRUE The DEBUG_PROPERTY_CLEAR_MEMORY_ENABLED bit of PcdDebugProperyMask is set. diff --git a/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf b/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf index 55446672d7..12a063f5b8 100644 --- a/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf +++ b/MdeModulePkg/Library/PeiDxeDebugLibReportStatusCode/PeiDxeDebugLibReportStatusCode.inf @@ -2,7 +2,7 @@ # Debug Library based on report status code library # # Debug Library for PEIMs and DXE drivers that sends debug messages to ReportStatusCode -# Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -36,7 +36,7 @@ [Packages] MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec - + [LibraryClasses] PcdLib ReportStatusCodeLib diff --git a/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c b/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c index cd1b0e34ef..8a65a2a747 100644 --- a/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c +++ b/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.c @@ -4,7 +4,7 @@ This file implements all APIs in Performance Library class in MdePkg. It creates performance logging GUIDed HOB on the first performance logging and then logs the performance data to the GUIDed HOB. Due to the limitation of temporary RAM, the maximum - number of performance logging entry is specified by PcdMaxPeiPerformanceLogEntries or + number of performance logging entry is specified by PcdMaxPeiPerformanceLogEntries or PcdMaxPeiPerformanceLogEntries16. Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
diff --git a/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf b/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf index ce49db1c8d..cad3a120a2 100644 --- a/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf +++ b/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.inf @@ -1,20 +1,20 @@ -## @file +## @file # Performance library instance used in PEI phase. -# +# # This library provides the performance measurement interfaces in PEI phase, it creates # and consumes GUIDed HOB for performance logging. The GUIDed HOB is passed to DXE phase -# so that it can be taken over by DxeCorePerformanceLib. -# +# so that it can be taken over by DxeCorePerformanceLib. +# # Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# (C) Copyright 2016 Hewlett Packard Enterprise Development LP
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# +# ## [Defines] diff --git a/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.uni b/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.uni index 79a50d3505..243c2e53ef 100644 --- a/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.uni +++ b/MdeModulePkg/Library/PeiPerformanceLib/PeiPerformanceLib.uni @@ -5,13 +5,13 @@ // and consumes GUIDed HOB for performance logging. The GUIDed HOB is passed to DXE phase // so that it can be taken over by DxeCorePerformanceLib. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.c b/MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.c index d77c6e544b..f39a21b711 100644 --- a/MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.c +++ b/MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.c @@ -3,9 +3,9 @@ This library instance is no longer used and module using this library class should update to directly locate EFI_PEI_RECOVERY_MODULE_PPI defined - in PI 1.2 specification. + in PI 1.2 specification. -Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -20,7 +20,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** Calling this function causes the system do recovery boot path. - + @retval EFI_UNSUPPORTED Recovery is not supported. **/ EFI_STATUS diff --git a/MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.inf b/MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.inf index 6c565acc40..70c9a88491 100644 --- a/MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.inf +++ b/MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.inf @@ -1,18 +1,18 @@ -## @file +## @file # Null Recovery library instance for PEIM module # This library instance is no longer used and module using this library # class should update to directly locate EFI_PEI_RECOVERY_MODULE_PPI defined -# in PI 1.2 specification. -# -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+# in PI 1.2 specification. +# +# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# +# ## [Defines] diff --git a/MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.uni b/MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.uni index f02af2f624..14385297f4 100644 --- a/MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.uni +++ b/MdeModulePkg/Library/PeiRecoveryLibNull/PeiRecoveryLibNull.uni @@ -5,13 +5,13 @@ // class should update to directly locate EFI_PEI_RECOVERY_MODULE_PPI defined // in PI 1.2 specification. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf b/MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf index f66ce80cd5..5b1df7e2bb 100644 --- a/MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf +++ b/MdeModulePkg/Library/PeiReportStatusCodeLib/PeiReportStatusCodeLib.inf @@ -5,7 +5,7 @@ # code via PEI Status Code Service. If the service is not available, it then tries calling # OEM Hook Status Code Library. # -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -25,7 +25,7 @@ MODULE_TYPE = PEIM VERSION_STRING = 1.0 LIBRARY_CLASS = ReportStatusCodeLib|SEC PEIM PEI_CORE - + # # The following information is for reference only and not required by the build tools. # diff --git a/MdeModulePkg/Library/PeiResetSystemLib/PeiResetSystemLib.c b/MdeModulePkg/Library/PeiResetSystemLib/PeiResetSystemLib.c index 30225d73a5..d8219775d1 100644 --- a/MdeModulePkg/Library/PeiResetSystemLib/PeiResetSystemLib.c +++ b/MdeModulePkg/Library/PeiResetSystemLib/PeiResetSystemLib.c @@ -18,11 +18,11 @@ /** This function causes a system-wide reset (cold reset), in which - all circuitry within the system returns to its initial state. This type of reset + all circuitry within the system returns to its initial state. This type of reset is asynchronous to system operation and operates without regard to cycle boundaries. - If this function returns, it means that the system does not support cold reset. + If this function returns, it means that the system does not support cold reset. **/ VOID EFIAPI @@ -34,7 +34,7 @@ ResetCold ( } /** - This function causes a system-wide initialization (warm reset), in which all processors + This function causes a system-wide initialization (warm reset), in which all processors are set to their initial state. Pending cycles are not corrupted. If this function returns, it means that the system does not support warm reset. @@ -49,7 +49,7 @@ ResetWarm ( } /** - This function causes the system to enter a power state equivalent + This function causes the system to enter a power state equivalent to the ACPI G2/S5 or G3 states. If this function returns, it means that the system does not support shut down reset. diff --git a/MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.c b/MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.c index 82882b8706..d0b53917f9 100644 --- a/MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.c +++ b/MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.c @@ -3,9 +3,9 @@ This library instance is no longer used and module using this library class should update to directly locate EFI_PEI_S3_RESUME_PPI defined - in PI 1.2 specification. + in PI 1.2 specification. -Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -20,7 +20,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** This function is responsible for calling the S3 resume vector in the ACPI Tables. - + @retval EFI_SUCESS Success to restore config from S3. @retval Others Fail to restore config from S3. **/ diff --git a/MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.inf b/MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.inf index f582054870..f408d7f528 100644 --- a/MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.inf +++ b/MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.inf @@ -2,15 +2,15 @@ # Null S3 library instance for PEIM module. # This library instance is no longer used and module using this library # class should update to directly locate EFI_PEI_S3_RESUME_PPI defined -# in PI 1.2 specification. -# -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+# in PI 1.2 specification. +# +# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # diff --git a/MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.uni b/MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.uni index 0814fa7249..5a8a91a12e 100644 --- a/MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.uni +++ b/MdeModulePkg/Library/PeiS3LibNull/PeiS3LibNull.uni @@ -5,13 +5,13 @@ // class should update to directly locate EFI_PEI_S3_RESUME_PPI defined // in PI 1.2 specification. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/MemoryAllocationLib.c b/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/MemoryAllocationLib.c index 4216a12d18..895fa2062a 100644 --- a/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/MemoryAllocationLib.c +++ b/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/MemoryAllocationLib.c @@ -1,24 +1,24 @@ /** @file Support routines for memory allocation routines based on SMM Core internal functions, with memory profile support. - + The PI System Management Mode Core Interface Specification only allows the use - of EfiRuntimeServicesCode and EfiRuntimeServicesData memory types for memory - allocations as the SMRAM space should be reserved after BDS phase. The functions - in the Memory Allocation Library use EfiBootServicesData as the default memory - allocation type. For this SMM specific instance of the Memory Allocation Library, - EfiRuntimeServicesData is used as the default memory type for all allocations. - In addition, allocation for the Reserved memory types are not supported and will + of EfiRuntimeServicesCode and EfiRuntimeServicesData memory types for memory + allocations as the SMRAM space should be reserved after BDS phase. The functions + in the Memory Allocation Library use EfiBootServicesData as the default memory + allocation type. For this SMM specific instance of the Memory Allocation Library, + EfiRuntimeServicesData is used as the default memory type for all allocations. + In addition, allocation for the Reserved memory types are not supported and will always return NULL. - Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -52,7 +52,7 @@ BufferInSmram ( UINTN Index; for (Index = 0; Index < mSmmCoreMemoryAllocLibSmramRangeCount; Index ++) { - if (((EFI_PHYSICAL_ADDRESS) (UINTN) Buffer >= mSmmCoreMemoryAllocLibSmramRanges[Index].CpuStart) && + if (((EFI_PHYSICAL_ADDRESS) (UINTN) Buffer >= mSmmCoreMemoryAllocLibSmramRanges[Index].CpuStart) && ((EFI_PHYSICAL_ADDRESS) (UINTN) Buffer < (mSmmCoreMemoryAllocLibSmramRanges[Index].CpuStart + mSmmCoreMemoryAllocLibSmramRanges[Index].PhysicalSize))) { return TRUE; } @@ -76,12 +76,12 @@ BufferInSmram ( **/ VOID * InternalAllocatePages ( - IN EFI_MEMORY_TYPE MemoryType, + IN EFI_MEMORY_TYPE MemoryType, IN UINTN Pages ) { EFI_STATUS Status; - EFI_PHYSICAL_ADDRESS Memory; + EFI_PHYSICAL_ADDRESS Memory; if (Pages == 0) { return NULL; @@ -194,11 +194,11 @@ AllocateReservedPages ( must have been allocated on a previous call to the page allocation services of the Memory Allocation Library. If it is not possible to free allocated pages, then this function will perform no actions. - + If Buffer was not allocated with a page allocation function in the Memory Allocation Library, then ASSERT(). If Pages is zero, then ASSERT(). - + @param Buffer Pointer to the buffer of pages to free. @param Pages The number of 4 KB pages to free. @@ -249,7 +249,7 @@ FreePages ( **/ VOID * InternalAllocateAlignedPages ( - IN EFI_MEMORY_TYPE MemoryType, + IN EFI_MEMORY_TYPE MemoryType, IN UINTN Pages, IN UINTN Alignment ) @@ -265,7 +265,7 @@ InternalAllocateAlignedPages ( // Alignment must be a power of two or zero. // ASSERT ((Alignment & (Alignment - 1)) == 0); - + if (Pages == 0) { return NULL; } @@ -279,7 +279,7 @@ InternalAllocateAlignedPages ( // Make sure that Pages plus EFI_SIZE_TO_PAGES (Alignment) does not overflow. // ASSERT (RealPages > Pages); - + Status = SmmAllocatePages (AllocateAnyPages, MemoryType, RealPages, &Memory); if (EFI_ERROR (Status)) { return NULL; @@ -322,7 +322,7 @@ InternalAllocateAlignedPages ( alignment specified by Alignment. The allocated buffer is returned. If Pages is 0, then NULL is returned. If there is not enough memory at the specified alignment remaining to satisfy the request, then NULL is returned. - + If Alignment is not a power of two and Alignment is not zero, then ASSERT(). If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT(). @@ -363,7 +363,7 @@ AllocateAlignedPages ( alignment specified by Alignment. The allocated buffer is returned. If Pages is 0, then NULL is returned. If there is not enough memory at the specified alignment remaining to satisfy the request, then NULL is returned. - + If Alignment is not a power of two and Alignment is not zero, then ASSERT(). If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT(). @@ -404,7 +404,7 @@ AllocateAlignedRuntimePages ( alignment specified by Alignment. The allocated buffer is returned. If Pages is 0, then NULL is returned. If there is not enough memory at the specified alignment remaining to satisfy the request, then NULL is returned. - + If Alignment is not a power of two and Alignment is not zero, then ASSERT(). If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT(). @@ -431,13 +431,13 @@ AllocateAlignedReservedPages ( Frees the number of 4KB pages specified by Pages from the buffer specified by Buffer. Buffer must have been allocated on a previous call to the aligned page allocation services of the Memory - Allocation Library. If it is not possible to free allocated pages, then this function will + Allocation Library. If it is not possible to free allocated pages, then this function will perform no actions. - + If Buffer was not allocated with an aligned page allocation function in the Memory Allocation Library, then ASSERT(). If Pages is zero, then ASSERT(). - + @param Buffer Pointer to the buffer of pages to free. @param Pages The number of 4 KB pages to free. @@ -483,7 +483,7 @@ FreeAlignedPages ( **/ VOID * InternalAllocatePool ( - IN EFI_MEMORY_TYPE MemoryType, + IN EFI_MEMORY_TYPE MemoryType, IN UINTN AllocationSize ) { @@ -604,9 +604,9 @@ AllocateReservedPool ( **/ VOID * InternalAllocateZeroPool ( - IN EFI_MEMORY_TYPE PoolType, + IN EFI_MEMORY_TYPE PoolType, IN UINTN AllocationSize - ) + ) { VOID *Memory; @@ -717,7 +717,7 @@ AllocateReservedZeroPool ( allocated buffer. If AllocationSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. If Buffer is NULL, then ASSERT(). - If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). + If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). @param PoolType The type of pool to allocate. @param AllocationSize The number of bytes to allocate and zero. @@ -728,10 +728,10 @@ AllocateReservedZeroPool ( **/ VOID * InternalAllocateCopyPool ( - IN EFI_MEMORY_TYPE PoolType, + IN EFI_MEMORY_TYPE PoolType, IN UINTN AllocationSize, IN CONST VOID *Buffer - ) + ) { VOID *Memory; @@ -743,7 +743,7 @@ InternalAllocateCopyPool ( Memory = CopyMem (Memory, Buffer, AllocationSize); } return Memory; -} +} /** Copies a buffer to an allocated buffer of type EfiRuntimeServicesData. @@ -752,9 +752,9 @@ InternalAllocateCopyPool ( AllocationSize bytes from Buffer to the newly allocated buffer, and returns a pointer to the allocated buffer. If AllocationSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. - + If Buffer is NULL, then ASSERT(). - If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). + If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). @param AllocationSize The number of bytes to allocate and zero. @param Buffer The buffer to copy to the allocated buffer. @@ -792,9 +792,9 @@ AllocateCopyPool ( AllocationSize bytes from Buffer to the newly allocated buffer, and returns a pointer to the allocated buffer. If AllocationSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. - + If Buffer is NULL, then ASSERT(). - If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). + If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). @param AllocationSize The number of bytes to allocate and zero. @param Buffer The buffer to copy to the allocated buffer. @@ -832,9 +832,9 @@ AllocateRuntimeCopyPool ( AllocationSize bytes from Buffer to the newly allocated buffer, and returns a pointer to the allocated buffer. If AllocationSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. - + If Buffer is NULL, then ASSERT(). - If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). + If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). @param AllocationSize The number of bytes to allocate and zero. @param Buffer The buffer to copy to the allocated buffer. @@ -856,19 +856,19 @@ AllocateReservedCopyPool ( Reallocates a buffer of a specified memory type. Allocates and zeros the number bytes specified by NewSize from memory of the type - specified by PoolType. If OldBuffer is not NULL, then the smaller of OldSize and - NewSize bytes are copied from OldBuffer to the newly allocated buffer, and - OldBuffer is freed. A pointer to the newly allocated buffer is returned. - If NewSize is 0, then a valid buffer of 0 size is returned. If there is not + specified by PoolType. If OldBuffer is not NULL, then the smaller of OldSize and + NewSize bytes are copied from OldBuffer to the newly allocated buffer, and + OldBuffer is freed. A pointer to the newly allocated buffer is returned. + If NewSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. - + If the allocation of the new buffer is successful and the smaller of NewSize and OldSize is greater than (MAX_ADDRESS - OldBuffer + 1), then ASSERT(). @param PoolType The type of pool to allocate. @param OldSize The size, in bytes, of OldBuffer. @param NewSize The size, in bytes, of the buffer to reallocate. - @param OldBuffer The buffer to copy to the allocated buffer. This is an optional + @param OldBuffer The buffer to copy to the allocated buffer. This is an optional parameter that may be NULL. @return A pointer to the allocated buffer or NULL if allocation fails. @@ -876,7 +876,7 @@ AllocateReservedCopyPool ( **/ VOID * InternalReallocatePool ( - IN EFI_MEMORY_TYPE PoolType, + IN EFI_MEMORY_TYPE PoolType, IN UINTN OldSize, IN UINTN NewSize, IN VOID *OldBuffer OPTIONAL @@ -896,18 +896,18 @@ InternalReallocatePool ( Reallocates a buffer of type EfiRuntimeServicesData. Allocates and zeros the number bytes specified by NewSize from memory of type - EfiRuntimeServicesData. If OldBuffer is not NULL, then the smaller of OldSize and - NewSize bytes are copied from OldBuffer to the newly allocated buffer, and - OldBuffer is freed. A pointer to the newly allocated buffer is returned. - If NewSize is 0, then a valid buffer of 0 size is returned. If there is not + EfiRuntimeServicesData. If OldBuffer is not NULL, then the smaller of OldSize and + NewSize bytes are copied from OldBuffer to the newly allocated buffer, and + OldBuffer is freed. A pointer to the newly allocated buffer is returned. + If NewSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. - + If the allocation of the new buffer is successful and the smaller of NewSize and OldSize is greater than (MAX_ADDRESS - OldBuffer + 1), then ASSERT(). @param OldSize The size, in bytes, of OldBuffer. @param NewSize The size, in bytes, of the buffer to reallocate. - @param OldBuffer The buffer to copy to the allocated buffer. This is an optional + @param OldBuffer The buffer to copy to the allocated buffer. This is an optional parameter that may be NULL. @return A pointer to the allocated buffer or NULL if allocation fails. @@ -941,10 +941,10 @@ ReallocatePool ( Reallocates a buffer of type EfiRuntimeServicesData. Allocates and zeros the number bytes specified by NewSize from memory of type - EfiRuntimeServicesData. If OldBuffer is not NULL, then the smaller of OldSize and - NewSize bytes are copied from OldBuffer to the newly allocated buffer, and - OldBuffer is freed. A pointer to the newly allocated buffer is returned. - If NewSize is 0, then a valid buffer of 0 size is returned. If there is not + EfiRuntimeServicesData. If OldBuffer is not NULL, then the smaller of OldSize and + NewSize bytes are copied from OldBuffer to the newly allocated buffer, and + OldBuffer is freed. A pointer to the newly allocated buffer is returned. + If NewSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. If the allocation of the new buffer is successful and the smaller of NewSize and OldSize @@ -952,7 +952,7 @@ ReallocatePool ( @param OldSize The size, in bytes, of OldBuffer. @param NewSize The size, in bytes, of the buffer to reallocate. - @param OldBuffer The buffer to copy to the allocated buffer. This is an optional + @param OldBuffer The buffer to copy to the allocated buffer. This is an optional parameter that may be NULL. @return A pointer to the allocated buffer or NULL if allocation fails. @@ -986,10 +986,10 @@ ReallocateRuntimePool ( Reallocates a buffer of type EfiReservedMemoryType. Allocates and zeros the number bytes specified by NewSize from memory of type - EfiReservedMemoryType. If OldBuffer is not NULL, then the smaller of OldSize and - NewSize bytes are copied from OldBuffer to the newly allocated buffer, and - OldBuffer is freed. A pointer to the newly allocated buffer is returned. - If NewSize is 0, then a valid buffer of 0 size is returned. If there is not + EfiReservedMemoryType. If OldBuffer is not NULL, then the smaller of OldSize and + NewSize bytes are copied from OldBuffer to the newly allocated buffer, and + OldBuffer is freed. A pointer to the newly allocated buffer is returned. + If NewSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. If the allocation of the new buffer is successful and the smaller of NewSize and OldSize @@ -997,7 +997,7 @@ ReallocateRuntimePool ( @param OldSize The size, in bytes, of OldBuffer. @param NewSize The size, in bytes, of the buffer to reallocate. - @param OldBuffer The buffer to copy to the allocated buffer. This is an optional + @param OldBuffer The buffer to copy to the allocated buffer. This is an optional parameter that may be NULL. @return A pointer to the allocated buffer or NULL if allocation fails. @@ -1021,7 +1021,7 @@ ReallocateReservedPool ( Frees the buffer specified by Buffer. Buffer must have been allocated on a previous call to the pool allocation services of the Memory Allocation Library. If it is not possible to free pool resources, then this function will perform no actions. - + If Buffer was not allocated with a pool allocation function in the Memory Allocation Library, then ASSERT(). diff --git a/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAllocationServices.h b/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAllocationServices.h index a2b89acf5d..3ff0d15e29 100644 --- a/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAllocationServices.h +++ b/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAllocationServices.h @@ -2,16 +2,16 @@ Contains function prototypes for Memory Services in the SMM Core. This header file borrows the PiSmmCore Memory Allocation services as the primitive - for memory allocation. + for memory allocation. - Copyright (c) 2008 - 2015, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php + Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -44,43 +44,43 @@ typedef struct { EFI_SMRAM_DESCRIPTOR *SmramRanges; /// - /// The SMM Foundation Entry Point. The SMM Core fills in this field when the - /// SMM Core is initialized. The SMM IPL is responsbile for registering this entry - /// point with the SMM Configuration Protocol. The SMM Configuration Protocol may + /// The SMM Foundation Entry Point. The SMM Core fills in this field when the + /// SMM Core is initialized. The SMM IPL is responsbile for registering this entry + /// point with the SMM Configuration Protocol. The SMM Configuration Protocol may /// not be available at the time the SMM IPL and SMM Core are started, so the SMM IPL - /// sets up a protocol notification on the SMM Configuration Protocol and registers - /// the SMM Foundation Entry Point as soon as the SMM Configuration Protocol is + /// sets up a protocol notification on the SMM Configuration Protocol and registers + /// the SMM Foundation Entry Point as soon as the SMM Configuration Protocol is /// available. /// EFI_SMM_ENTRY_POINT SmmEntryPoint; - + /// /// Boolean flag set to TRUE while an SMI is being processed by the SMM Core. - /// + /// BOOLEAN SmmEntryPointRegistered; /// /// Boolean flag set to TRUE while an SMI is being processed by the SMM Core. - /// + /// BOOLEAN InSmm; /// /// This field is set by the SMM Core then the SMM Core is initialized. This field is /// used by the SMM Base 2 Protocol and SMM Communication Protocol implementations in - /// the SMM IPL. + /// the SMM IPL. /// EFI_SMM_SYSTEM_TABLE2 *Smst; /// - /// This field is used by the SMM Communicatioon Protocol to pass a buffer into + /// This field is used by the SMM Communicatioon Protocol to pass a buffer into /// a software SMI handler and for the software SMI handler to pass a buffer back to - /// the caller of the SMM Communication Protocol. + /// the caller of the SMM Communication Protocol. /// VOID *CommunicationBuffer; /// /// This field is used by the SMM Communicatioon Protocol to pass the size of a buffer, - /// in bytes, into a software SMI handler and for the software SMI handler to pass the + /// in bytes, into a software SMI handler and for the software SMI handler to pass the /// size, in bytes, of a buffer back to the caller of the SMM Communication Protocol. /// UINTN BufferSize; diff --git a/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryProfileLib.c b/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryProfileLib.c index ffae2212a8..afebbbd54b 100644 --- a/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryProfileLib.c +++ b/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryProfileLib.c @@ -1,14 +1,14 @@ /** @file Support routines for memory profile for PiSmmCore. - Copyright (c) 2016, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php. - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php. + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryProfileLibNull.c b/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryProfileLibNull.c index 6f6c2ebc91..df9f19e721 100644 --- a/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryProfileLibNull.c +++ b/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryProfileLibNull.c @@ -1,14 +1,14 @@ /** @file Null routines for memory profile for PiSmmCore. - Copyright (c) 2016, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php. - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php. + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryProfileServices.h b/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryProfileServices.h index 29923ea0a2..29f39336c3 100644 --- a/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryProfileServices.h +++ b/MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryProfileServices.h @@ -4,14 +4,14 @@ This header file borrows the PiSmmCore Memory Profile services as the primitive for memory profile. - Copyright (c) 2016, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiSmmCoreSmmServicesTableLib.c b/MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiSmmCoreSmmServicesTableLib.c index 788fafae35..c1ea294433 100644 --- a/MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiSmmCoreSmmServicesTableLib.c +++ b/MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiSmmCoreSmmServicesTableLib.c @@ -1,7 +1,7 @@ /** @file SMM Core SMM Services Table Library. - Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.
+ Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -40,14 +40,14 @@ SmmCoreSmmServicesTableLibConstructor ( } /** - This function allows the caller to determine if the driver is executing in + This function allows the caller to determine if the driver is executing in System Management Mode(SMM). - This function returns TRUE if the driver is executing in SMM and FALSE if the + This function returns TRUE if the driver is executing in SMM and FALSE if the driver is not executing in SMM. @retval TRUE The driver is executing in System Management Mode (SMM). - @retval FALSE The driver is not executing in System Management Mode (SMM). + @retval FALSE The driver is not executing in System Management Mode (SMM). **/ BOOLEAN diff --git a/MdeModulePkg/Library/PlatformVarCleanupLib/VfrStrings.uni b/MdeModulePkg/Library/PlatformVarCleanupLib/VfrStrings.uni index d30512329f..e36f7a5d7d 100644 --- a/MdeModulePkg/Library/PlatformVarCleanupLib/VfrStrings.uni +++ b/MdeModulePkg/Library/PlatformVarCleanupLib/VfrStrings.uni @@ -1,7 +1,7 @@ ///** @file // String definitions for platform variable cleanup. // -// Copyright (c) 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
// This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at @@ -32,4 +32,4 @@ #string STR_SAVE_AND_EXIT #language en-US "Commit Changes and Exit" #language fr-FR "fr-FR: Commit Changes and Exit" #string STR_NO_SAVE_AND_EXIT #language en-US "Discard Changes and Exit" - #language fr-FR "fr-FR: Discard Changes and Exit" \ No newline at end of file + #language fr-FR "fr-FR: Discard Changes and Exit" diff --git a/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c b/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c index da5fa7b094..e3de4f117a 100644 --- a/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c +++ b/MdeModulePkg/Library/ResetUtilityLib/ResetUtility.c @@ -56,7 +56,7 @@ ResetPlatformSpecificGuid ( /** This function examines the DataSize and ResetData parameters passed to to ResetSystem() and detemrines if the ResetData contains a Null-terminated - Unicode string followed by a GUID specific subtype. If the GUID specific + Unicode string followed by a GUID specific subtype. If the GUID specific subtype is present, then a pointer to the GUID value in ResetData is returned. @param[in] DataSize The size, in bytes, of ResetData. @@ -107,7 +107,7 @@ GetResetPlatformSpecificGuid ( } /** - This is a helper function that creates the reset data buffer that can be + This is a helper function that creates the reset data buffer that can be passed into ResetSystem(). The reset data buffer is returned in ResetData and contains ResetString @@ -179,7 +179,7 @@ BuildResetData ( if (ResetString == NULL) { ResetString = L""; // Use an empty string. } - + // // Calculate the total buffer required for ResetData. // @@ -215,6 +215,6 @@ BuildResetData ( if (ExtraDataSize > 0) { CopyMem (Data, ExtraData, ExtraDataSize); } - + return RETURN_SUCCESS; } diff --git a/MdeModulePkg/Library/ResetUtilityLib/ResetUtilityLib.inf b/MdeModulePkg/Library/ResetUtilityLib/ResetUtilityLib.inf index 2a4e53a8a6..4760b1972d 100644 --- a/MdeModulePkg/Library/ResetUtilityLib/ResetUtilityLib.inf +++ b/MdeModulePkg/Library/ResetUtilityLib/ResetUtilityLib.inf @@ -7,10 +7,10 @@ # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# +# ## [Defines] INF_VERSION = 0x00010017 diff --git a/MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/ReportStatusCodeLib.c b/MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/ReportStatusCodeLib.c index e533af3d33..b73103517a 100644 --- a/MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/ReportStatusCodeLib.c +++ b/MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/ReportStatusCodeLib.c @@ -1,7 +1,7 @@ /** @file API implementation for instance of Report Status Code Library. - Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -54,11 +54,11 @@ InternalGetReportStatusCode ( if (mReportStatusCodeLibStatusCodeProtocol != NULL) { return; } - + if (mHaveExitedBootServices) { return; } - + // // Check gBS just in case ReportStatusCode is called before gBS is initialized. // @@ -106,9 +106,9 @@ ReportStatusCodeLibExitBootServices ( { // // Locate the report status code service before enter runtime. - // + // InternalGetReportStatusCode (); - + mHaveExitedBootServices = TRUE; } @@ -120,7 +120,7 @@ ReportStatusCodeLibExitBootServices ( @param ImageHandle The firmware allocated handle for the EFI image. @param SystemTable A pointer to the EFI System Table. - + @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS. **/ @@ -135,12 +135,12 @@ ReportStatusCodeLibConstructor ( // // Cache the report status code service - // + // InternalGetReportStatusCode (); // // Register notify function for EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE - // + // Status = gBS->CreateEventEx ( EVT_NOTIFY_SIGNAL, TPL_NOTIFY, @@ -153,7 +153,7 @@ ReportStatusCodeLibConstructor ( // // Register notify function for EVT_SIGNAL_EXIT_BOOT_SERVICES - // + // Status = gBS->CreateEventEx ( EVT_NOTIFY_SIGNAL, TPL_NOTIFY, @@ -169,13 +169,13 @@ ReportStatusCodeLibConstructor ( /** The destructor function of Runtime DXE Report Status Code Lib. - + The destructor function frees memory allocated by constructor, and closes related events. - It will ASSERT() if that related operation fails and it will always return EFI_SUCCESS. + It will ASSERT() if that related operation fails and it will always return EFI_SUCCESS. @param ImageHandle The firmware allocated handle for the EFI image. @param SystemTable A pointer to the EFI System Table. - + @retval EFI_SUCCESS The constructor always returns EFI_SUCCESS. **/ @@ -246,7 +246,7 @@ InternalReportStatusCode ( // return mReportStatusCodeLibStatusCodeProtocol->ReportStatusCode (Type, Value, Instance, (EFI_GUID *)CallerId, Data); } - + return EFI_UNSUPPORTED; } @@ -641,7 +641,7 @@ ReportStatusCodeEx ( if (gBS == NULL || gBS->AllocatePool == NULL || gBS->FreePool == NULL) { return EFI_UNSUPPORTED; } - + // // Allocate space for the Status Code Header and its buffer // diff --git a/MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/RuntimeDxeReportStatusCodeLib.inf b/MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/RuntimeDxeReportStatusCodeLib.inf index 49d9933b58..9f03e2a1ed 100644 --- a/MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/RuntimeDxeReportStatusCodeLib.inf +++ b/MdeModulePkg/Library/RuntimeDxeReportStatusCodeLib/RuntimeDxeReportStatusCodeLib.inf @@ -1,7 +1,7 @@ ## @file # Report status code library instance which supports logging message in DXE & runtime phase. # -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -31,7 +31,7 @@ [Sources] ReportStatusCodeLib.c - + [Packages] MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec diff --git a/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.inf b/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.inf index 61b9283665..88052f8037 100644 --- a/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.inf +++ b/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.inf @@ -1,22 +1,22 @@ ## @file # Performance library instance used by SMM Core. -# +# # This library provides the performance measurement interfaces and initializes performance # logging for the SMM phase. # It initializes SMM phase performance logging by publishing the SMM Performance and PerformanceEx Protocol, # which is consumed by SmmPerformanceLib to logging performance data in SMM phase. # This library is mainly used by SMM Core to start performance logging to ensure that # SMM Performance and PerformanceEx Protocol are installed at the very beginning of SMM phase. -# +# # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# +# ## [Defines] diff --git a/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.uni b/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.uni index c3264fcfb9..09968ab9f8 100644 --- a/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.uni +++ b/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLib.uni @@ -8,13 +8,13 @@ // This library is mainly used by SMM Core to start performance logging to ensure that // SMM Performance and PerformanceEx Protocol are installed at the very beginning of SMM phase. // -// Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLibInternal.h b/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLibInternal.h index 76f2498473..2c710bd9c1 100644 --- a/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLibInternal.h +++ b/MdeModulePkg/Library/SmmCorePerformanceLib/SmmCorePerformanceLibInternal.h @@ -14,7 +14,7 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ - + #ifndef _SMM_CORE_PERFORMANCE_LIB_INTERNAL_H_ #define _SMM_CORE_PERFORMANCE_LIB_INTERNAL_H_ @@ -33,7 +33,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include #include -#include +#include #include #include #include diff --git a/MdeModulePkg/Library/SmmCorePlatformHookLibNull/SmmCorePlatformHookLibNull.c b/MdeModulePkg/Library/SmmCorePlatformHookLibNull/SmmCorePlatformHookLibNull.c index ef38c8fdf5..5381a49c0f 100644 --- a/MdeModulePkg/Library/SmmCorePlatformHookLibNull/SmmCorePlatformHookLibNull.c +++ b/MdeModulePkg/Library/SmmCorePlatformHookLibNull/SmmCorePlatformHookLibNull.c @@ -1,7 +1,7 @@ /** @file Null instance of SmmCorePlatformHookLibNull. - Copyright (c) 2011, Intel Corporation. All rights reserved.
+ Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -16,9 +16,9 @@ /** Performs platform specific tasks before invoking registered SMI handlers. - + This function performs platform specific tasks before invoking registered SMI handlers. - + @retval EFI_SUCCESS The platform hook completes successfully. @retval Other values The paltform hook cannot complete due to some error. @@ -35,9 +35,9 @@ PlatformHookBeforeSmmDispatch ( /** Performs platform specific tasks after invoking registered SMI handlers. - + This function performs platform specific tasks after invoking registered SMI handlers. - + @retval EFI_SUCCESS The platform hook completes successfully. @retval Other values The paltform hook cannot complete due to some error. diff --git a/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.c b/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.c index 9b6f0bedbd..ac8bcd2ff7 100644 --- a/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.c +++ b/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.c @@ -387,7 +387,7 @@ UpdateLockBox ( @retval RETURN_SUCCESS the information is restored successfully. @retval RETURN_INVALID_PARAMETER the Guid is NULL, or one of Buffer and Length is NULL. - @retval RETURN_WRITE_PROTECTED Buffer and Length are NULL, but the LockBox has no + @retval RETURN_WRITE_PROTECTED Buffer and Length are NULL, but the LockBox has no LOCK_BOX_ATTRIBUTE_RESTORE_IN_PLACE attribute. @retval RETURN_BUFFER_TOO_SMALL the Length is too small to hold the confidential information. @retval RETURN_NOT_FOUND the requested GUID not found. diff --git a/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf b/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf index f3120ccb42..f9ac74891f 100644 --- a/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf +++ b/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.inf @@ -1,7 +1,7 @@ ## @file # DXE LockBox library instance. # -# Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions @@ -26,7 +26,7 @@ # # The following information is for reference only and not required by the build tools. # -# VALID_ARCHITECTURES = IA32 X64 +# VALID_ARCHITECTURES = IA32 X64 # [Sources] diff --git a/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.uni b/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.uni index d68c912afe..09f6e59c56 100644 --- a/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.uni +++ b/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxDxeLib.uni @@ -3,14 +3,14 @@ // // DXE LockBox library instance. // -// Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions // of the BSD License which accompanies this distribution. The // full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.c b/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.c index cea1fed682..8a168663c4 100644 --- a/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.c +++ b/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.c @@ -1,6 +1,6 @@ /** @file -Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.
+Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions @@ -237,7 +237,7 @@ InternalGetSmmLockBoxContext ( @param Length the length of the restored confidential information @retval RETURN_SUCCESS the information is restored successfully. - @retval RETURN_WRITE_PROTECTED Buffer and Length are NULL, but the LockBox has no + @retval RETURN_WRITE_PROTECTED Buffer and Length are NULL, but the LockBox has no LOCK_BOX_ATTRIBUTE_RESTORE_IN_PLACE attribute. @retval RETURN_BUFFER_TOO_SMALL the Length is too small to hold the confidential information. @retval RETURN_NOT_FOUND the requested GUID not found. @@ -509,7 +509,7 @@ UpdateLockBox ( @retval RETURN_SUCCESS the information is restored successfully. @retval RETURN_INVALID_PARAMETER the Guid is NULL, or one of Buffer and Length is NULL. - @retval RETURN_WRITE_PROTECTED Buffer and Length are NULL, but the LockBox has no + @retval RETURN_WRITE_PROTECTED Buffer and Length are NULL, but the LockBox has no LOCK_BOX_ATTRIBUTE_RESTORE_IN_PLACE attribute. @retval RETURN_BUFFER_TOO_SMALL the Length is too small to hold the confidential information. @retval RETURN_NOT_FOUND the requested GUID not found. diff --git a/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf b/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf index dceff8f0f6..093957ec0a 100644 --- a/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf +++ b/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.inf @@ -1,7 +1,7 @@ ## @file # PEI LockBox library instance. # -# Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions @@ -26,7 +26,7 @@ # # The following information is for reference only and not required by the build tools. # -# VALID_ARCHITECTURES = IA32 X64 +# VALID_ARCHITECTURES = IA32 X64 # [Sources] diff --git a/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.uni b/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.uni index 37bb75663c..d3e6a83a76 100644 --- a/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.uni +++ b/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxPeiLib.uni @@ -3,14 +3,14 @@ // // PEI LockBox library instance. // -// Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions // of the BSD License which accompanies this distribution. The // full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxSmmLib.c b/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxSmmLib.c index 32a57b6a76..54a81d6521 100644 --- a/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxSmmLib.c +++ b/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxSmmLib.c @@ -201,7 +201,7 @@ SmmLockBoxEndOfS3ResumeNotify ( @param[in] ImageHandle Image handle of this driver. @param[in] SystemTable A Pointer to the EFI System Table. - @retval EFI_SUCEESS + @retval EFI_SUCEESS @return Others Some error occurs. **/ EFI_STATUS @@ -666,7 +666,7 @@ UpdateLockBox ( @retval RETURN_SUCCESS the information is restored successfully. @retval RETURN_INVALID_PARAMETER the Guid is NULL, or one of Buffer and Length is NULL. - @retval RETURN_WRITE_PROTECTED Buffer and Length are NULL, but the LockBox has no + @retval RETURN_WRITE_PROTECTED Buffer and Length are NULL, but the LockBox has no LOCK_BOX_ATTRIBUTE_RESTORE_IN_PLACE attribute. @retval RETURN_BUFFER_TOO_SMALL the Length is too small to hold the confidential information. @retval RETURN_NOT_FOUND the requested GUID not found. diff --git a/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxSmmLib.inf b/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxSmmLib.inf index 426af4cccf..a1715e4c36 100644 --- a/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxSmmLib.inf +++ b/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxSmmLib.inf @@ -28,7 +28,7 @@ # # The following information is for reference only and not required by the build tools. # -# VALID_ARCHITECTURES = IA32 X64 +# VALID_ARCHITECTURES = IA32 X64 # [Sources] diff --git a/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxSmmLib.uni b/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxSmmLib.uni index 4e719facbe..45cfd8e3bf 100644 --- a/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxSmmLib.uni +++ b/MdeModulePkg/Library/SmmLockBoxLib/SmmLockBoxSmmLib.uni @@ -3,14 +3,14 @@ // // SMM LockBox library instance. // -// Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions // of the BSD License which accompanies this distribution. The // full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Library/SmmMemoryAllocationProfileLib/MemoryAllocationLib.c b/MdeModulePkg/Library/SmmMemoryAllocationProfileLib/MemoryAllocationLib.c index 2a18155e56..a1e6a3a7a1 100644 --- a/MdeModulePkg/Library/SmmMemoryAllocationProfileLib/MemoryAllocationLib.c +++ b/MdeModulePkg/Library/SmmMemoryAllocationProfileLib/MemoryAllocationLib.c @@ -1,25 +1,25 @@ /** @file - Support routines for memory allocation routines based + Support routines for memory allocation routines based on SMM Services Table services for SMM phase drivers, with memory profile support. - + The PI System Management Mode Core Interface Specification only allows the use - of EfiRuntimeServicesCode and EfiRuntimeServicesData memory types for memory - allocations through the SMM Services Table as the SMRAM space should be + of EfiRuntimeServicesCode and EfiRuntimeServicesData memory types for memory + allocations through the SMM Services Table as the SMRAM space should be reserved after BDS phase. The functions in the Memory Allocation Library use - EfiBootServicesData as the default memory allocation type. For this SMM - specific instance of the Memory Allocation Library, EfiRuntimeServicesData - is used as the default memory type for all allocations. In addition, - allocation for the Reserved memory types are not supported and will always + EfiBootServicesData as the default memory allocation type. For this SMM + specific instance of the Memory Allocation Library, EfiRuntimeServicesData + is used as the default memory type for all allocations. In addition, + allocation for the Reserved memory types are not supported and will always return NULL. - Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php. + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php. - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -39,10 +39,10 @@ UINTN mSmramRangeCount; /** The constructor function caches SMRAM ranges that are present in the system. - + It will ASSERT() if SMM Access2 Protocol doesn't exist. It will ASSERT() if SMRAM ranges can't be got. - It will ASSERT() if Resource can't be allocated for cache SMRAM range. + It will ASSERT() if Resource can't be allocated for cache SMRAM range. It will always return EFI_SUCCESS. @param ImageHandle The firmware allocated handle for the EFI image. @@ -66,8 +66,8 @@ SmmMemoryAllocationLibConstructor ( // Locate SMM Access2 Protocol // Status = gBS->LocateProtocol ( - &gEfiSmmAccess2ProtocolGuid, - NULL, + &gEfiSmmAccess2ProtocolGuid, + NULL, (VOID **)&SmmAccess ); ASSERT_EFI_ERROR (Status); @@ -91,7 +91,7 @@ SmmMemoryAllocationLibConstructor ( } /** - If SMM driver exits with an error, it must call this routine + If SMM driver exits with an error, it must call this routine to free the allocated resource before the exiting. @param[in] ImageHandle The firmware allocated handle for the EFI image. @@ -128,7 +128,7 @@ BufferInSmram ( UINTN Index; for (Index = 0; Index < mSmramRangeCount; Index ++) { - if (((EFI_PHYSICAL_ADDRESS) (UINTN) Buffer >= mSmramRanges[Index].CpuStart) && + if (((EFI_PHYSICAL_ADDRESS) (UINTN) Buffer >= mSmramRanges[Index].CpuStart) && ((EFI_PHYSICAL_ADDRESS) (UINTN) Buffer < (mSmramRanges[Index].CpuStart + mSmramRanges[Index].PhysicalSize))) { return TRUE; } @@ -140,9 +140,9 @@ BufferInSmram ( /** Allocates one or more 4KB pages of a certain memory type. - Allocates the number of 4KB pages of a certain memory type and returns a pointer - to the allocated buffer. The buffer returned is aligned on a 4KB boundary. If - Pages is 0, then NULL is returned. If there is not enough memory remaining to + Allocates the number of 4KB pages of a certain memory type and returns a pointer + to the allocated buffer. The buffer returned is aligned on a 4KB boundary. If + Pages is 0, then NULL is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. @param MemoryType The type of memory to allocate. @@ -153,12 +153,12 @@ BufferInSmram ( **/ VOID * InternalAllocatePages ( - IN EFI_MEMORY_TYPE MemoryType, + IN EFI_MEMORY_TYPE MemoryType, IN UINTN Pages ) { EFI_STATUS Status; - EFI_PHYSICAL_ADDRESS Memory; + EFI_PHYSICAL_ADDRESS Memory; if (Pages == 0) { return NULL; @@ -174,9 +174,9 @@ InternalAllocatePages ( /** Allocates one or more 4KB pages of type EfiRuntimeServicesData. - Allocates the number of 4KB pages of type EfiRuntimeServicesData and returns a pointer - to the allocated buffer. The buffer returned is aligned on a 4KB boundary. If - Pages is 0, then NULL is returned. If there is not enough memory remaining to + Allocates the number of 4KB pages of type EfiRuntimeServicesData and returns a pointer + to the allocated buffer. The buffer returned is aligned on a 4KB boundary. If + Pages is 0, then NULL is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. @param Pages The number of 4 KB pages to allocate. @@ -209,9 +209,9 @@ AllocatePages ( /** Allocates one or more 4KB pages of type EfiRuntimeServicesData. - Allocates the number of 4KB pages of type EfiRuntimeServicesData and returns a - pointer to the allocated buffer. The buffer returned is aligned on a 4KB boundary. - If Pages is 0, then NULL is returned. If there is not enough memory remaining + Allocates the number of 4KB pages of type EfiRuntimeServicesData and returns a + pointer to the allocated buffer. The buffer returned is aligned on a 4KB boundary. + If Pages is 0, then NULL is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. @param Pages The number of 4 KB pages to allocate. @@ -244,9 +244,9 @@ AllocateRuntimePages ( /** Allocates one or more 4KB pages of type EfiReservedMemoryType. - Allocates the number of 4KB pages of type EfiReservedMemoryType and returns a - pointer to the allocated buffer. The buffer returned is aligned on a 4KB boundary. - If Pages is 0, then NULL is returned. If there is not enough memory remaining + Allocates the number of 4KB pages of type EfiReservedMemoryType and returns a + pointer to the allocated buffer. The buffer returned is aligned on a 4KB boundary. + If Pages is 0, then NULL is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. @param Pages The number of 4 KB pages to allocate. @@ -267,15 +267,15 @@ AllocateReservedPages ( Frees one or more 4KB pages that were previously allocated with one of the page allocation functions in the Memory Allocation Library. - Frees the number of 4KB pages specified by Pages from the buffer specified by Buffer. - Buffer must have been allocated on a previous call to the page allocation services - of the Memory Allocation Library. If it is not possible to free allocated pages, + Frees the number of 4KB pages specified by Pages from the buffer specified by Buffer. + Buffer must have been allocated on a previous call to the page allocation services + of the Memory Allocation Library. If it is not possible to free allocated pages, then this function will perform no actions. - - If Buffer was not allocated with a page allocation function in the Memory Allocation + + If Buffer was not allocated with a page allocation function in the Memory Allocation Library, then ASSERT(). If Pages is zero, then ASSERT(). - + @param Buffer The pointer to the buffer of pages to free. @param Pages The number of 4 KB pages to free. @@ -309,16 +309,16 @@ FreePages ( /** Allocates one or more 4KB pages of a certain memory type at a specified alignment. - Allocates the number of 4KB pages specified by Pages of a certain memory type - with an alignment specified by Alignment. The allocated buffer is returned. - If Pages is 0, then NULL is returned. If there is not enough memory at the + Allocates the number of 4KB pages specified by Pages of a certain memory type + with an alignment specified by Alignment. The allocated buffer is returned. + If Pages is 0, then NULL is returned. If there is not enough memory at the specified alignment remaining to satisfy the request, then NULL is returned. If Alignment is not a power of two and Alignment is not zero, then ASSERT(). If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT(). @param MemoryType The type of memory to allocate. @param Pages The number of 4 KB pages to allocate. - @param Alignment The requested alignment of the allocation. + @param Alignment The requested alignment of the allocation. Must be a power of two. If Alignment is zero, then byte alignment is used. @@ -327,7 +327,7 @@ FreePages ( **/ VOID * InternalAllocateAlignedPages ( - IN EFI_MEMORY_TYPE MemoryType, + IN EFI_MEMORY_TYPE MemoryType, IN UINTN Pages, IN UINTN Alignment ) @@ -343,7 +343,7 @@ InternalAllocateAlignedPages ( // Alignment must be a power of two or zero. // ASSERT ((Alignment & (Alignment - 1)) == 0); - + if (Pages == 0) { return NULL; } @@ -357,7 +357,7 @@ InternalAllocateAlignedPages ( // Make sure that Pages plus EFI_SIZE_TO_PAGES (Alignment) does not overflow. // ASSERT (RealPages > Pages); - + Status = gSmst->SmmAllocatePages (AllocateAnyPages, MemoryType, RealPages, &Memory); if (EFI_ERROR (Status)) { return NULL; @@ -396,16 +396,16 @@ InternalAllocateAlignedPages ( /** Allocates one or more 4KB pages of type EfiRuntimeServicesData at a specified alignment. - Allocates the number of 4KB pages specified by Pages of type EfiRuntimeServicesData - with an alignment specified by Alignment. The allocated buffer is returned. - If Pages is 0, then NULL is returned. If there is not enough memory at the + Allocates the number of 4KB pages specified by Pages of type EfiRuntimeServicesData + with an alignment specified by Alignment. The allocated buffer is returned. + If Pages is 0, then NULL is returned. If there is not enough memory at the specified alignment remaining to satisfy the request, then NULL is returned. - + If Alignment is not a power of two and Alignment is not zero, then ASSERT(). If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT(). @param Pages The number of 4 KB pages to allocate. - @param Alignment The requested alignment of the allocation. + @param Alignment The requested alignment of the allocation. Must be a power of two. If Alignment is zero, then byte alignment is used. @@ -438,16 +438,16 @@ AllocateAlignedPages ( /** Allocates one or more 4KB pages of type EfiRuntimeServicesData at a specified alignment. - Allocates the number of 4KB pages specified by Pages of type EfiRuntimeServicesData - with an alignment specified by Alignment. The allocated buffer is returned. - If Pages is 0, then NULL is returned. If there is not enough memory at the + Allocates the number of 4KB pages specified by Pages of type EfiRuntimeServicesData + with an alignment specified by Alignment. The allocated buffer is returned. + If Pages is 0, then NULL is returned. If there is not enough memory at the specified alignment remaining to satisfy the request, then NULL is returned. - + If Alignment is not a power of two and Alignment is not zero, then ASSERT(). If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT(). @param Pages The number of 4 KB pages to allocate. - @param Alignment The requested alignment of the allocation. + @param Alignment The requested alignment of the allocation. Must be a power of two. If Alignment is zero, then byte alignment is used. @@ -480,16 +480,16 @@ AllocateAlignedRuntimePages ( /** Allocates one or more 4KB pages of type EfiReservedMemoryType at a specified alignment. - Allocates the number of 4KB pages specified by Pages of type EfiReservedMemoryType - with an alignment specified by Alignment. The allocated buffer is returned. - If Pages is 0, then NULL is returned. If there is not enough memory at the + Allocates the number of 4KB pages specified by Pages of type EfiReservedMemoryType + with an alignment specified by Alignment. The allocated buffer is returned. + If Pages is 0, then NULL is returned. If there is not enough memory at the specified alignment remaining to satisfy the request, then NULL is returned. - + If Alignment is not a power of two and Alignment is not zero, then ASSERT(). If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT(). @param Pages The number of 4 KB pages to allocate. - @param Alignment The requested alignment of the allocation. + @param Alignment The requested alignment of the allocation. Must be a power of two. If Alignment is zero, then byte alignment is used. @@ -510,15 +510,15 @@ AllocateAlignedReservedPages ( Frees one or more 4KB pages that were previously allocated with one of the aligned page allocation functions in the Memory Allocation Library. - Frees the number of 4KB pages specified by Pages from the buffer specified by - Buffer. Buffer must have been allocated on a previous call to the aligned page - allocation services of the Memory Allocation Library. If it is not possible to + Frees the number of 4KB pages specified by Pages from the buffer specified by + Buffer. Buffer must have been allocated on a previous call to the aligned page + allocation services of the Memory Allocation Library. If it is not possible to free allocated pages, then this function will perform no actions. - - If Buffer was not allocated with an aligned page allocation function in the + + If Buffer was not allocated with an aligned page allocation function in the Memory Allocation Library, then ASSERT(). If Pages is zero, then ASSERT(). - + @param Buffer The pointer to the buffer of pages to free. @param Pages The number of 4 KB pages to free. @@ -552,9 +552,9 @@ FreeAlignedPages ( /** Allocates a buffer of a certain pool type. - Allocates the number bytes specified by AllocationSize of a certain pool type - and returns a pointer to the allocated buffer. If AllocationSize is 0, then a - valid buffer of 0 size is returned. If there is not enough memory remaining to + Allocates the number bytes specified by AllocationSize of a certain pool type + and returns a pointer to the allocated buffer. If AllocationSize is 0, then a + valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. @param MemoryType The type of memory to allocate. @@ -565,7 +565,7 @@ FreeAlignedPages ( **/ VOID * InternalAllocatePool ( - IN EFI_MEMORY_TYPE MemoryType, + IN EFI_MEMORY_TYPE MemoryType, IN UINTN AllocationSize ) { @@ -582,9 +582,9 @@ InternalAllocatePool ( /** Allocates a buffer of type EfiRuntimeServicesData. - Allocates the number bytes specified by AllocationSize of type EfiRuntimeServicesData - and returns a pointer to the allocated buffer. If AllocationSize is 0, then a - valid buffer of 0 size is returned. If there is not enough memory remaining to + Allocates the number bytes specified by AllocationSize of type EfiRuntimeServicesData + and returns a pointer to the allocated buffer. If AllocationSize is 0, then a + valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. @param AllocationSize The number of bytes to allocate. @@ -617,9 +617,9 @@ AllocatePool ( /** Allocates a buffer of type EfiRuntimeServicesData. - Allocates the number bytes specified by AllocationSize of type EfiRuntimeServicesData - and returns a pointer to the allocated buffer. If AllocationSize is 0, then a - valid buffer of 0 size is returned. If there is not enough memory remaining to + Allocates the number bytes specified by AllocationSize of type EfiRuntimeServicesData + and returns a pointer to the allocated buffer. If AllocationSize is 0, then a + valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. @param AllocationSize The number of bytes to allocate. @@ -652,9 +652,9 @@ AllocateRuntimePool ( /** Allocates a buffer of type EfiReservedMemoryType. - Allocates the number bytes specified by AllocationSize of type EfiReservedMemoryType - and returns a pointer to the allocated buffer. If AllocationSize is 0, then a - valid buffer of 0 size is returned. If there is not enough memory remaining to + Allocates the number bytes specified by AllocationSize of type EfiReservedMemoryType + and returns a pointer to the allocated buffer. If AllocationSize is 0, then a + valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. @param AllocationSize The number of bytes to allocate. @@ -674,9 +674,9 @@ AllocateReservedPool ( /** Allocates and zeros a buffer of a certain pool type. - Allocates the number bytes specified by AllocationSize of a certain pool type, - clears the buffer with zeros, and returns a pointer to the allocated buffer. - If AllocationSize is 0, then a valid buffer of 0 size is returned. If there is + Allocates the number bytes specified by AllocationSize of a certain pool type, + clears the buffer with zeros, and returns a pointer to the allocated buffer. + If AllocationSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. @param PoolType The type of memory to allocate. @@ -687,9 +687,9 @@ AllocateReservedPool ( **/ VOID * InternalAllocateZeroPool ( - IN EFI_MEMORY_TYPE PoolType, + IN EFI_MEMORY_TYPE PoolType, IN UINTN AllocationSize - ) + ) { VOID *Memory; @@ -703,9 +703,9 @@ InternalAllocateZeroPool ( /** Allocates and zeros a buffer of type EfiRuntimeServicesData. - Allocates the number bytes specified by AllocationSize of type EfiRuntimeServicesData, - clears the buffer with zeros, and returns a pointer to the allocated buffer. - If AllocationSize is 0, then a valid buffer of 0 size is returned. If there is + Allocates the number bytes specified by AllocationSize of type EfiRuntimeServicesData, + clears the buffer with zeros, and returns a pointer to the allocated buffer. + If AllocationSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. @param AllocationSize The number of bytes to allocate and zero. @@ -738,9 +738,9 @@ AllocateZeroPool ( /** Allocates and zeros a buffer of type EfiRuntimeServicesData. - Allocates the number bytes specified by AllocationSize of type EfiRuntimeServicesData, - clears the buffer with zeros, and returns a pointer to the allocated buffer. - If AllocationSize is 0, then a valid buffer of 0 size is returned. If there is + Allocates the number bytes specified by AllocationSize of type EfiRuntimeServicesData, + clears the buffer with zeros, and returns a pointer to the allocated buffer. + If AllocationSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. @param AllocationSize The number of bytes to allocate and zero. @@ -773,9 +773,9 @@ AllocateRuntimeZeroPool ( /** Allocates and zeros a buffer of type EfiReservedMemoryType. - Allocates the number bytes specified by AllocationSize of type EfiReservedMemoryType, - clears the buffer with zeros, and returns a pointer to the allocated buffer. - If AllocationSize is 0, then a valid buffer of 0 size is returned. If there is + Allocates the number bytes specified by AllocationSize of type EfiReservedMemoryType, + clears the buffer with zeros, and returns a pointer to the allocated buffer. + If AllocationSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. @param AllocationSize The number of bytes to allocate and zero. @@ -795,12 +795,12 @@ AllocateReservedZeroPool ( /** Copies a buffer to an allocated buffer of a certain pool type. - Allocates the number bytes specified by AllocationSize of a certain pool type, - copies AllocationSize bytes from Buffer to the newly allocated buffer, and returns - a pointer to the allocated buffer. If AllocationSize is 0, then a valid buffer - of 0 size is returned. If there is not enough memory remaining to satisfy the + Allocates the number bytes specified by AllocationSize of a certain pool type, + copies AllocationSize bytes from Buffer to the newly allocated buffer, and returns + a pointer to the allocated buffer. If AllocationSize is 0, then a valid buffer + of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. If Buffer is NULL, then ASSERT(). - If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). + If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). @param PoolType The type of pool to allocate. @param AllocationSize The number of bytes to allocate and zero. @@ -811,10 +811,10 @@ AllocateReservedZeroPool ( **/ VOID * InternalAllocateCopyPool ( - IN EFI_MEMORY_TYPE PoolType, + IN EFI_MEMORY_TYPE PoolType, IN UINTN AllocationSize, IN CONST VOID *Buffer - ) + ) { VOID *Memory; @@ -826,19 +826,19 @@ InternalAllocateCopyPool ( Memory = CopyMem (Memory, Buffer, AllocationSize); } return Memory; -} +} /** Copies a buffer to an allocated buffer of type EfiRuntimeServicesData. - Allocates the number bytes specified by AllocationSize of type EfiRuntimeServicesData, - copies AllocationSize bytes from Buffer to the newly allocated buffer, and returns - a pointer to the allocated buffer. If AllocationSize is 0, then a valid buffer - of 0 size is returned. If there is not enough memory remaining to satisfy the + Allocates the number bytes specified by AllocationSize of type EfiRuntimeServicesData, + copies AllocationSize bytes from Buffer to the newly allocated buffer, and returns + a pointer to the allocated buffer. If AllocationSize is 0, then a valid buffer + of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. - + If Buffer is NULL, then ASSERT(). - If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). + If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). @param AllocationSize The number of bytes to allocate and zero. @param Buffer The buffer to copy to the allocated buffer. @@ -872,14 +872,14 @@ AllocateCopyPool ( /** Copies a buffer to an allocated buffer of type EfiRuntimeServicesData. - Allocates the number bytes specified by AllocationSize of type EfiRuntimeServicesData, - copies AllocationSize bytes from Buffer to the newly allocated buffer, and returns - a pointer to the allocated buffer. If AllocationSize is 0, then a valid buffer - of 0 size is returned. If there is not enough memory remaining to satisfy the + Allocates the number bytes specified by AllocationSize of type EfiRuntimeServicesData, + copies AllocationSize bytes from Buffer to the newly allocated buffer, and returns + a pointer to the allocated buffer. If AllocationSize is 0, then a valid buffer + of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. - + If Buffer is NULL, then ASSERT(). - If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). + If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). @param AllocationSize The number of bytes to allocate and zero. @param Buffer The buffer to copy to the allocated buffer. @@ -913,14 +913,14 @@ AllocateRuntimeCopyPool ( /** Copies a buffer to an allocated buffer of type EfiReservedMemoryType. - Allocates the number bytes specified by AllocationSize of type EfiReservedMemoryType, - copies AllocationSize bytes from Buffer to the newly allocated buffer, and returns - a pointer to the allocated buffer. If AllocationSize is 0, then a valid buffer - of 0 size is returned. If there is not enough memory remaining to satisfy the + Allocates the number bytes specified by AllocationSize of type EfiReservedMemoryType, + copies AllocationSize bytes from Buffer to the newly allocated buffer, and returns + a pointer to the allocated buffer. If AllocationSize is 0, then a valid buffer + of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. - + If Buffer is NULL, then ASSERT(). - If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). + If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). @param AllocationSize The number of bytes to allocate and zero. @param Buffer The buffer to copy to the allocated buffer. @@ -942,19 +942,19 @@ AllocateReservedCopyPool ( Reallocates a buffer of a specified memory type. Allocates and zeros the number bytes specified by NewSize from memory of the type - specified by PoolType. If OldBuffer is not NULL, then the smaller of OldSize and - NewSize bytes are copied from OldBuffer to the newly allocated buffer, and - OldBuffer is freed. A pointer to the newly allocated buffer is returned. - If NewSize is 0, then a valid buffer of 0 size is returned. If there is not + specified by PoolType. If OldBuffer is not NULL, then the smaller of OldSize and + NewSize bytes are copied from OldBuffer to the newly allocated buffer, and + OldBuffer is freed. A pointer to the newly allocated buffer is returned. + If NewSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. - - If the allocation of the new buffer is successful and the smaller of NewSize + + If the allocation of the new buffer is successful and the smaller of NewSize and OldSize is greater than (MAX_ADDRESS - OldBuffer + 1), then ASSERT(). @param PoolType The type of pool to allocate. @param OldSize The size, in bytes, of OldBuffer. @param NewSize The size, in bytes, of the buffer to reallocate. - @param OldBuffer The buffer to copy to the allocated buffer. This is an + @param OldBuffer The buffer to copy to the allocated buffer. This is an optional parameter that may be NULL. @return A pointer to the allocated buffer or NULL if allocation fails. @@ -962,7 +962,7 @@ AllocateReservedCopyPool ( **/ VOID * InternalReallocatePool ( - IN EFI_MEMORY_TYPE PoolType, + IN EFI_MEMORY_TYPE PoolType, IN UINTN OldSize, IN UINTN NewSize, IN VOID *OldBuffer OPTIONAL @@ -982,18 +982,18 @@ InternalReallocatePool ( Reallocates a buffer of type EfiRuntimeServicesData. Allocates and zeros the number bytes specified by NewSize from memory of type - EfiRuntimeServicesData. If OldBuffer is not NULL, then the smaller of OldSize and - NewSize bytes are copied from OldBuffer to the newly allocated buffer, and - OldBuffer is freed. A pointer to the newly allocated buffer is returned. - If NewSize is 0, then a valid buffer of 0 size is returned. If there is not + EfiRuntimeServicesData. If OldBuffer is not NULL, then the smaller of OldSize and + NewSize bytes are copied from OldBuffer to the newly allocated buffer, and + OldBuffer is freed. A pointer to the newly allocated buffer is returned. + If NewSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. - - If the allocation of the new buffer is successful and the smaller of NewSize + + If the allocation of the new buffer is successful and the smaller of NewSize and OldSize is greater than (MAX_ADDRESS - OldBuffer + 1), then ASSERT(). @param OldSize The size, in bytes, of OldBuffer. @param NewSize The size, in bytes, of the buffer to reallocate. - @param OldBuffer The buffer to copy to the allocated buffer. This is an + @param OldBuffer The buffer to copy to the allocated buffer. This is an optional parameter that may be NULL. @return A pointer to the allocated buffer or NULL if allocation fails. @@ -1027,18 +1027,18 @@ ReallocatePool ( Reallocates a buffer of type EfiRuntimeServicesData. Allocates and zeros the number bytes specified by NewSize from memory of type - EfiRuntimeServicesData. If OldBuffer is not NULL, then the smaller of OldSize - and NewSize bytes are copied from OldBuffer to the newly allocated buffer, and - OldBuffer is freed. A pointer to the newly allocated buffer is returned. - If NewSize is 0, then a valid buffer of 0 size is returned. If there is not + EfiRuntimeServicesData. If OldBuffer is not NULL, then the smaller of OldSize + and NewSize bytes are copied from OldBuffer to the newly allocated buffer, and + OldBuffer is freed. A pointer to the newly allocated buffer is returned. + If NewSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. - If the allocation of the new buffer is successful and the smaller of NewSize + If the allocation of the new buffer is successful and the smaller of NewSize and OldSize is greater than (MAX_ADDRESS - OldBuffer + 1), then ASSERT(). @param OldSize The size, in bytes, of OldBuffer. @param NewSize The size, in bytes, of the buffer to reallocate. - @param OldBuffer The buffer to copy to the allocated buffer. This is an + @param OldBuffer The buffer to copy to the allocated buffer. This is an optional parameter that may be NULL. @return A pointer to the allocated buffer or NULL if allocation fails. @@ -1072,18 +1072,18 @@ ReallocateRuntimePool ( Reallocates a buffer of type EfiReservedMemoryType. Allocates and zeros the number bytes specified by NewSize from memory of type - EfiReservedMemoryType. If OldBuffer is not NULL, then the smaller of OldSize - and NewSize bytes are copied from OldBuffer to the newly allocated buffer, and - OldBuffer is freed. A pointer to the newly allocated buffer is returned. - If NewSize is 0, then a valid buffer of 0 size is returned. If there is not + EfiReservedMemoryType. If OldBuffer is not NULL, then the smaller of OldSize + and NewSize bytes are copied from OldBuffer to the newly allocated buffer, and + OldBuffer is freed. A pointer to the newly allocated buffer is returned. + If NewSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. - If the allocation of the new buffer is successful and the smaller of NewSize + If the allocation of the new buffer is successful and the smaller of NewSize and OldSize is greater than (MAX_ADDRESS - OldBuffer + 1), then ASSERT(). @param OldSize The size, in bytes, of OldBuffer. @param NewSize The size, in bytes, of the buffer to reallocate. - @param OldBuffer The buffer to copy to the allocated buffer. This is an + @param OldBuffer The buffer to copy to the allocated buffer. This is an optional parameter that may be NULL. @return A pointer to the allocated buffer or NULL if allocation fails. @@ -1101,15 +1101,15 @@ ReallocateReservedPool ( } /** - Frees a buffer that was previously allocated with one of the pool allocation + Frees a buffer that was previously allocated with one of the pool allocation functions in the Memory Allocation Library. - Frees the buffer specified by Buffer. Buffer must have been allocated on a - previous call to the pool allocation services of the Memory Allocation Library. - If it is not possible to free pool resources, then this function will perform + Frees the buffer specified by Buffer. Buffer must have been allocated on a + previous call to the pool allocation services of the Memory Allocation Library. + If it is not possible to free pool resources, then this function will perform no actions. - - If Buffer was not allocated with a pool allocation function in the Memory + + If Buffer was not allocated with a pool allocation function in the Memory Allocation Library, then ASSERT(). @param Buffer The pointer to the buffer to free. diff --git a/MdeModulePkg/Library/SmmMemoryAllocationProfileLib/SmmMemoryAllocationProfileLib.inf b/MdeModulePkg/Library/SmmMemoryAllocationProfileLib/SmmMemoryAllocationProfileLib.inf index 60ec75c30e..0fdb27f20f 100644 --- a/MdeModulePkg/Library/SmmMemoryAllocationProfileLib/SmmMemoryAllocationProfileLib.inf +++ b/MdeModulePkg/Library/SmmMemoryAllocationProfileLib/SmmMemoryAllocationProfileLib.inf @@ -2,13 +2,13 @@ # Instance of Memory Allocation Library using SMM Services Table, # with memory profile support. # -# Memory Allocation Library that uses services from the SMM Services Table to +# Memory Allocation Library that uses services from the SMM Services Table to # allocate and free memory, with memory profile support. # # The implementation of this instance is copied from UefiMemoryAllocationLib # in MdePkg and updated to support both MemoryAllocationLib and MemoryProfileLib. # -# Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at @@ -26,7 +26,7 @@ MODULE_TYPE = DXE_SMM_DRIVER VERSION_STRING = 1.0 PI_SPECIFICATION_VERSION = 0x0001000A - LIBRARY_CLASS = MemoryAllocationLib|DXE_SMM_DRIVER + LIBRARY_CLASS = MemoryAllocationLib|DXE_SMM_DRIVER CONSTRUCTOR = SmmMemoryAllocationLibConstructor DESTRUCTOR = SmmMemoryAllocationLibDestructor LIBRARY_CLASS = MemoryProfileLib|DXE_SMM_DRIVER @@ -51,7 +51,7 @@ UefiBootServicesTableLib [Protocols] - gEfiSmmAccess2ProtocolGuid ## CONSUMES + gEfiSmmAccess2ProtocolGuid ## CONSUMES [Guids] gEdkiiMemoryProfileGuid ## SOMETIMES_CONSUMES ## GUID # Locate protocol diff --git a/MdeModulePkg/Library/SmmMemoryAllocationProfileLib/SmmMemoryProfileLib.c b/MdeModulePkg/Library/SmmMemoryAllocationProfileLib/SmmMemoryProfileLib.c index 85e7c9c132..6dd14732ca 100644 --- a/MdeModulePkg/Library/SmmMemoryAllocationProfileLib/SmmMemoryProfileLib.c +++ b/MdeModulePkg/Library/SmmMemoryAllocationProfileLib/SmmMemoryProfileLib.c @@ -1,14 +1,14 @@ /** @file Support routines for memory profile for Smm phase drivers. - Copyright (c) 2016, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php. - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php. + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Library/SmmPerformanceLib/SmmPerformanceLib.c b/MdeModulePkg/Library/SmmPerformanceLib/SmmPerformanceLib.c index 830037befa..120155b98e 100644 --- a/MdeModulePkg/Library/SmmPerformanceLib/SmmPerformanceLib.c +++ b/MdeModulePkg/Library/SmmPerformanceLib/SmmPerformanceLib.c @@ -6,7 +6,7 @@ to log performance data. If both SMM PerformanceEx and Performance Protocol are not available, it does not log any performance information. - Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -47,7 +47,7 @@ SmmPerformanceLibConstructor ( IN EFI_SYSTEM_TABLE *SystemTable ) { - + mPerformanceMeasurementEnabled = (BOOLEAN) ((PcdGet8(PcdPerformanceLibraryPropertyMask) & PERFORMANCE_LIBRARY_PROPERTY_MEASUREMENT_ENABLED) != 0); return EFI_SUCCESS; @@ -246,7 +246,7 @@ EndPerformanceMeasurementEx ( UINTN EFIAPI GetPerformanceMeasurementEx ( - IN UINTN LogEntryKey, + IN UINTN LogEntryKey, OUT CONST VOID **Handle, OUT CONST CHAR8 **Token, OUT CONST CHAR8 **Module, diff --git a/MdeModulePkg/Library/SmmPerformanceLib/SmmPerformanceLib.inf b/MdeModulePkg/Library/SmmPerformanceLib/SmmPerformanceLib.inf index 174ed3f1e5..9e3109140b 100644 --- a/MdeModulePkg/Library/SmmPerformanceLib/SmmPerformanceLib.inf +++ b/MdeModulePkg/Library/SmmPerformanceLib/SmmPerformanceLib.inf @@ -1,20 +1,20 @@ ## @file # Performance library instance used in SMM phase. -# +# # This library instance provides infrastructure for SMM drivers to log performance # data. It consumes SMM PerformanceEx or Performance Protocol published by SmmCorePerformanceLib # to log performance data. If both SMM PerformanceEx and Performance Protocol are not available, # it does not log any performance information. -# +# # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# +# ## [Defines] diff --git a/MdeModulePkg/Library/SmmPerformanceLib/SmmPerformanceLib.uni b/MdeModulePkg/Library/SmmPerformanceLib/SmmPerformanceLib.uni index 9751183d9b..5db9ffb445 100644 --- a/MdeModulePkg/Library/SmmPerformanceLib/SmmPerformanceLib.uni +++ b/MdeModulePkg/Library/SmmPerformanceLib/SmmPerformanceLib.uni @@ -6,13 +6,13 @@ // to log performance data. If both SMM PerformanceEx and Performance Protocol are not available, // it does not log any performance information. // -// Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib.c b/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib.c index 5394fb9e97..c2fd33e8c1 100644 --- a/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib.c +++ b/MdeModulePkg/Library/SmmReportStatusCodeLib/ReportStatusCodeLib.c @@ -1,7 +1,7 @@ /** @file Report Status Code Library for SMM Phase. - Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -92,13 +92,13 @@ InternalReportStatusCode ( return EFI_UNSUPPORTED; } } - + // // A status code service is present in system, so pass in all the parameters to the service. // return (*mReportStatusCode) (mStatusCodeProtocol, Type, Value, Instance, (EFI_GUID *)CallerId, Data); } - + return EFI_UNSUPPORTED; } diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c index 59bd1e4c6c..6a23477eb8 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBoot.c @@ -109,7 +109,7 @@ BmFindBootOptionInVariable ( EFI_BOOT_MANAGER_LOAD_OPTION *BootOptions; UINTN BootOptionCount; UINTN Index; - + OptionNumber = LoadOptionNumberUnassigned; // @@ -233,7 +233,7 @@ BmAdjustFvFilePath ( break; } } - + if (FvHandles != NULL) { FreePool (FvHandles); } @@ -242,7 +242,7 @@ BmAdjustFvFilePath ( /** Check if it's a Device Path pointing to FV file. - + The function doesn't garentee the device path points to existing FV file. @param DevicePath Input device path. @@ -471,13 +471,13 @@ BmMatchUsbWwid ( } /** - Find a USB device which match the specified short-form device path start with + Find a USB device which match the specified short-form device path start with USB Class or USB WWID device path. If ParentDevicePath is NULL, this function will search in all USB devices of the platform. If ParentDevicePath is not NULL, this function will only search in its child devices. @param DevicePath The device path that contains USB Class or USB WWID device path. - @param ParentDevicePathSize The length of the device path before the USB Class or + @param ParentDevicePathSize The length of the device path before the USB Class or USB WWID device path. @param UsbIoHandleCount A pointer to the count of the returned USB IO handles. @@ -499,7 +499,7 @@ BmFindUsbDevice ( UINTN Index; BOOLEAN Matched; - ASSERT (UsbIoHandleCount != NULL); + ASSERT (UsbIoHandleCount != NULL); // // Get all UsbIo Handles. @@ -655,7 +655,7 @@ BmExpandFileDevicePath ( UINTN MediaType; EFI_DEVICE_PATH_PROTOCOL *NextFullPath; BOOLEAN GetNext; - + EfiBootManagerConnectAll (); Status = gBS->LocateHandleBuffer (ByProtocol, &gEfiSimpleFileSystemProtocolGuid, NULL, &HandleCount, &Handles); if (EFI_ERROR (Status)) { @@ -780,7 +780,7 @@ BmCachePartitionDevicePath ( { EFI_DEVICE_PATH_PROTOCOL *TempDevicePath; UINTN Count; - + if (BmMatchDevicePaths (*CachedDevicePath, DevicePath)) { TempDevicePath = *CachedDevicePath; *CachedDevicePath = BmDelPartMatchInstance (*CachedDevicePath, DevicePath); @@ -1670,12 +1670,12 @@ BmIsBootManagerMenuFilePath ( /** Attempt to boot the EFI boot option. This routine sets L"BootCurent" and also signals the EFI ready to boot event. If the device path for the option - starts with a BBS device path a legacy boot is attempted via the registered - gLegacyBoot function. Short form device paths are also supported via this + starts with a BBS device path a legacy boot is attempted via the registered + gLegacyBoot function. Short form device paths are also supported via this rountine. A device path starting with MEDIA_HARDDRIVE_DP, MSG_USB_WWID_DP, MSG_USB_CLASS_DP gets expaned out to find the first device that matches. - If the BootOption Device Path fails the removable media boot algorithm - is attempted (\EFI\BOOTIA32.EFI, \EFI\BOOTX64.EFI,... only one file type + If the BootOption Device Path fails the removable media boot algorithm + is attempted (\EFI\BOOTIA32.EFI, \EFI\BOOTX64.EFI,... only one file type is tried per processor type) @param BootOption Boot Option to try and boot. @@ -1854,7 +1854,7 @@ EfiBootManagerBoot ( Status = EfiCreateEventLegacyBootEx( TPL_NOTIFY, BmEndOfBdsPerfCode, - NULL, + NULL, &LegacyBootEvent ); ASSERT_EFI_ERROR (Status); @@ -1868,7 +1868,7 @@ EfiBootManagerBoot ( PERF_END_EX (gImageHandle, "BdsAttempt", NULL, 0, (UINT32) OptionNumber); return; } - + // // Provide the image with its load options // @@ -2021,7 +2021,7 @@ BmMatchPartitionDevicePathNode ( 3. Non-BlockIo SimpleFileSystem - The boot option points to a device supporting SimpleFileSystem Protocol, but not supporting BlockIo protocol. - 4. LoadFile - The boot option points to the media supporting + 4. LoadFile - The boot option points to the media supporting LoadFile protocol. Reference: UEFI Spec chapter 3.3 Boot Option Variables Default Boot Behavior @@ -2246,7 +2246,7 @@ EfiBootManagerRefreshAllBootOption ( // Remove invalid EFI boot options from NV // for (Index = 0; Index < NvBootOptionCount; Index++) { - if (((DevicePathType (NvBootOptions[Index].FilePath) != BBS_DEVICE_PATH) || + if (((DevicePathType (NvBootOptions[Index].FilePath) != BBS_DEVICE_PATH) || (DevicePathSubType (NvBootOptions[Index].FilePath) != BBS_BBS_DP) ) && BmIsAutoCreateBootOption (&NvBootOptions[Index]) ) { @@ -2429,7 +2429,7 @@ EfiBootManagerGetBootManagerMenu ( UINTN BootOptionCount; EFI_BOOT_MANAGER_LOAD_OPTION *BootOptions; UINTN Index; - + BootOptions = EfiBootManagerGetLoadOptions (&BootOptionCount, LoadOptionTypeBoot); for (Index = 0; Index < BootOptionCount; Index++) { diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmBootDescription.c b/MdeModulePkg/Library/UefiBootManagerLib/BmBootDescription.c index d56c3e7e2c..551df3f7ec 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/BmBootDescription.c +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmBootDescription.c @@ -1,7 +1,7 @@ /** @file Library functions which relate with boot option description. -Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2015 Hewlett Packard Enterprise Development LP
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -460,7 +460,7 @@ BmGetNetworkDescription ( } else { Ip = NULL; } - + // // Skip the optional DNS node // diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmConnect.c b/MdeModulePkg/Library/UefiBootManagerLib/BmConnect.c index b1c94ad9d9..3831a9658d 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/BmConnect.c +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmConnect.c @@ -1,7 +1,7 @@ /** @file Library functions which relate with connecting the device. -Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -107,7 +107,7 @@ EfiBootManagerConnectAll ( @retval EFI_OUT_OF_RESOURCES There is no resource to create new handles. @retval EFI_NOT_FOUND Create the handle associate with one device path node failed. - @retval EFI_SECURITY_VIOLATION The user has no permission to start UEFI device + @retval EFI_SECURITY_VIOLATION The user has no permission to start UEFI device drivers on the DevicePath. **/ EFI_STATUS @@ -167,7 +167,7 @@ EfiBootManagerConnectDevicePath ( // Connect all drivers that apply to Handle and RemainingDevicePath, // the Recursive flag is FALSE so only one level will be expanded. // - // If ConnectController fails to find a driver, then still give the chance to + // If ConnectController fails to find a driver, then still give the chance to // do dispatch, because partial RemainingDevicePath may be in the new FV // // 1. If the connect fail, RemainingDevicepath and handle will not @@ -197,8 +197,8 @@ EfiBootManagerConnectDevicePath ( } /** - This function will disconnect all current system handles. - + This function will disconnect all current system handles. + gBS->DisconnectController() is invoked for each handle exists in system handle buffer. If handle is a bus type handle, all childrens also are disconnected recursively by gBS->DisconnectController(). diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmConsole.c b/MdeModulePkg/Library/UefiBootManagerLib/BmConsole.c index d85b603d64..2525c8da69 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/BmConsole.c +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmConsole.c @@ -1,7 +1,7 @@ /** @file Library functions which contain all the code to connect console device. -Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2015 Hewlett Packard Enterprise Development LP
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -104,12 +104,12 @@ BmGetVideoController ( } } FreePool (RootBridgeHandleBuffer); - + return VideoController; } /** - Query all the children of VideoController and return the device paths of all the + Query all the children of VideoController and return the device paths of all the children that support GraphicsOutput protocol. @param VideoController PCI handle of video controller. @@ -238,14 +238,14 @@ EfiBootManagerConnectVideoController ( ) { EFI_DEVICE_PATH_PROTOCOL *Gop; - + if (VideoController == NULL) { // // Get the platform vga device // VideoController = BmGetVideoController (); } - + if (VideoController == NULL) { return EFI_NOT_FOUND; } @@ -253,7 +253,7 @@ EfiBootManagerConnectVideoController ( // // Try to connect the PCI device path, so that GOP driver could start on this // device and create child handles with GraphicsOutput Protocol installed - // on them, then we get device paths of these child handles and select + // on them, then we get device paths of these child handles and select // them as possible console device. // gBS->ConnectController (VideoController, NULL, NULL, FALSE); @@ -276,20 +276,20 @@ EfiBootManagerConnectVideoController ( Fill console handle in System Table if there are no valid console handle in. Firstly, check the validation of console handle in System Table. If it is invalid, - update it by the first console device handle from EFI console variable. + update it by the first console device handle from EFI console variable. @param VarName The name of the EFI console variable. @param ConsoleGuid Specified Console protocol GUID. - @param ConsoleHandle On IN, console handle in System Table to be checked. + @param ConsoleHandle On IN, console handle in System Table to be checked. On OUT, new console handle in system table. - @param ProtocolInterface On IN, console protocol on console handle in System Table to be checked. + @param ProtocolInterface On IN, console protocol on console handle in System Table to be checked. On OUT, new console protocol on new console handle in system table. @retval TRUE System Table has been updated. @retval FALSE System Table hasn't been updated. **/ -BOOLEAN +BOOLEAN BmUpdateSystemTableConsole ( IN CHAR16 *VarName, IN EFI_GUID *ConsoleGuid, @@ -326,7 +326,7 @@ BmUpdateSystemTableConsole ( return FALSE; } } - + // // Get all possible consoles device path from EFI variable // @@ -352,7 +352,7 @@ BmUpdateSystemTableConsole ( FreePool (FullDevicePath); return FALSE; } - + // // Find console device handle by device path instance // @@ -559,7 +559,7 @@ EfiBootManagerConnectConsoleVariable ( FreePool (StartDevicePath); return EFI_UNSUPPORTED; } - + Next = Instance; while (!IsDevicePathEndType (Next)) { Next = NextDevicePathNode (Next); @@ -568,7 +568,7 @@ EfiBootManagerConnectConsoleVariable ( SetDevicePathEndNode (Next); // // Connect the USB console - // USB console device path is a short-form device path that + // USB console device path is a short-form device path that // starts with the first element being a USB WWID // or a USB Class device path // @@ -583,7 +583,7 @@ EfiBootManagerConnectConsoleVariable ( for (Next = Instance; !IsDevicePathEnd (Next); Next = NextDevicePathNode (Next)) { if (DevicePathType (Next) == ACPI_DEVICE_PATH && DevicePathSubType (Next) == ACPI_ADR_DP) { break; - } else if (DevicePathType (Next) == HARDWARE_DEVICE_PATH && + } else if (DevicePathType (Next) == HARDWARE_DEVICE_PATH && DevicePathSubType (Next) == HW_CONTROLLER_DP && DevicePathType (NextDevicePathNode (Next)) == ACPI_DEVICE_PATH && DevicePathSubType (NextDevicePathNode (Next)) == ACPI_ADR_DP @@ -724,7 +724,7 @@ EfiBootManagerConnectAllDefaultConsoles ( } PERF_EVENT ("ConOutReady"); - + Status = EfiBootManagerConnectConsoleVariable (ConIn); if (!EFI_ERROR (Status)) { OneConnected = TRUE; diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c b/MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c index db2f859ae7..ecd01bbb81 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmDriverHealth.c @@ -1,7 +1,7 @@ /** @file Library functions which relates with driver health. -Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP
This program and the accompanying materials @@ -92,7 +92,7 @@ BmGetControllerName ( Status = ComponentName->GetControllerName ( ComponentName, - ControllerHandle, + ControllerHandle, ChildHandle, BestLanguage, &ControllerName @@ -131,7 +131,7 @@ BmDisplayMessages ( ControllerName = BmGetControllerName ( DriverHealthInfo->DriverHealthHandle, - DriverHealthInfo->ControllerHandle, + DriverHealthInfo->ControllerHandle, DriverHealthInfo->ChildHandle ); @@ -181,7 +181,7 @@ BmRepairNotify ( /** Collect the Driver Health status of a single controller. - + @param DriverHealthInfo A pointer to the array containing all of the platform driver health information. @param Count Return the updated array count. @param DriverHealthHandle The handle on which the Driver Health protocol instance is retrieved. @@ -218,7 +218,7 @@ BmGetSingleControllerHealthStatus ( (VOID **) &DriverHealth ); ASSERT_EFI_ERROR (Status); - + if (ControllerHandle == NULL) { // @@ -471,7 +471,7 @@ BmRepairAllControllers ( if (DriverHealthInfo[Index].HealthStatus == EfiDriverHealthStatusConfigurationRequired) { ConfigurationRequired = TRUE; } - + if (DriverHealthInfo[Index].HealthStatus == EfiDriverHealthStatusRepairRequired) { RepairRequired = TRUE; @@ -519,7 +519,7 @@ BmRepairAllControllers ( FreePool (HiiHandles); } } - + EfiBootManagerFreeDriverHealthInfo (DriverHealthInfo, Count); RepairCount++; } while ((RepairRequired || ConfigurationRequired) && ((MaxRepairCount == 0) || (RepairCount < MaxRepairCount))); diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmHotkey.c b/MdeModulePkg/Library/UefiBootManagerLib/BmHotkey.c index d18ce02eb3..f799117c93 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/BmHotkey.c +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmHotkey.c @@ -1,7 +1,7 @@ /** @file Hotkey library functions. -Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -116,7 +116,7 @@ BmIsKeyOptionVariable ( { UINTN Index; UINTN Uint; - + if (!CompareGuid (Guid, &gEfiGlobalVariableGuid) || (StrSize (Name) != sizeof (L"Key####")) || (StrnCmp (Name, L"Key", 3) != 0) @@ -375,7 +375,7 @@ BmHotkeyCallback ( HotkeyData = &Hotkey->KeyData[Hotkey->WaitingKey]; if ((KeyData->Key.ScanCode == HotkeyData->Key.ScanCode) && (KeyData->Key.UnicodeChar == HotkeyData->Key.UnicodeChar) && - (((KeyData->KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) != 0) ? + (((KeyData->KeyState.KeyShiftState & EFI_SHIFT_STATE_VALID) != 0) ? (KeyData->KeyState.KeyShiftState == HotkeyData->KeyState.KeyShiftState) : TRUE ) ) { @@ -799,7 +799,7 @@ EfiBootManagerRegisterContinueKeyOption ( EFI_STATUS Status; EFI_BOOT_MANAGER_KEY_OPTION KeyOption; VA_LIST Args; - + if (mBmContinueKeyOption != NULL) { return EFI_ALREADY_STARTED; } @@ -822,7 +822,7 @@ EfiBootManagerRegisterContinueKeyOption ( /** Stop the hotkey processing. - + @param Event Event pointer related to hotkey service. @param Context Context pass to this function. **/ @@ -852,7 +852,7 @@ BmStopHotkeyService ( /** Start the hot key service so that the key press can trigger the boot option. - @param HotkeyTriggered Return the waitable event and it will be signaled + @param HotkeyTriggered Return the waitable event and it will be signaled when a valid hot key is pressed. @retval EFI_SUCCESS The hot key service is started. diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmLoadOption.c b/MdeModulePkg/Library/UefiBootManagerLib/BmLoadOption.c index f88f8e0245..ff0c65a2ef 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/BmLoadOption.c +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmLoadOption.c @@ -1,7 +1,7 @@ /** @file Load option library functions which relate with creating and processing load options. -Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -90,7 +90,7 @@ BmGetFreeOptionNumber ( OUT UINT16 *FreeOptionNumber ) { - + UINTN OptionNumber; UINTN Index; UINT16 *OptionOrder; @@ -98,7 +98,7 @@ BmGetFreeOptionNumber ( UINT16 *BootNext; ASSERT (FreeOptionNumber != NULL); - ASSERT (LoadOptionType == LoadOptionTypeDriver || + ASSERT (LoadOptionType == LoadOptionTypeDriver || LoadOptionType == LoadOptionTypeBoot || LoadOptionType == LoadOptionTypeSysPrep); @@ -110,9 +110,9 @@ BmGetFreeOptionNumber ( GetEfiGlobalVariable2 (L"BootNext", (VOID**) &BootNext, NULL); } - for (OptionNumber = 0; + for (OptionNumber = 0; OptionNumber < OptionOrderSize / sizeof (UINT16) - + ((BootNext != NULL) ? 1 : 0); + + ((BootNext != NULL) ? 1 : 0); OptionNumber++ ) { // @@ -125,10 +125,10 @@ BmGetFreeOptionNumber ( } // - // We didn't find it in the ****Order array and it doesn't equal to BootNext + // We didn't find it in the ****Order array and it doesn't equal to BootNext // Otherwise, OptionNumber equals to OptionOrderSize / sizeof (UINT16) + 1 // - if ((Index == OptionOrderSize / sizeof (UINT16)) && + if ((Index == OptionOrderSize / sizeof (UINT16)) && ((BootNext == NULL) || (OptionNumber != *BootNext)) ) { break; @@ -203,12 +203,12 @@ EfiBootManagerLoadOptionToVariable ( EFI_DEVICE_PATH_PROTOCOL FilePathList[]; UINT8 OptionalData[]; TODO: FilePathList[] IS: -A packed array of UEFI device paths. The first element of the -array is a device path that describes the device and location of the -Image for this load option. The FilePathList[0] is specific -to the device type. Other device paths may optionally exist in the -FilePathList, but their usage is OSV specific. Each element -in the array is variable length, and ends at the device path end +A packed array of UEFI device paths. The first element of the +array is a device path that describes the device and location of the +Image for this load option. The FilePathList[0] is specific +to the device type. Other device paths may optionally exist in the +FilePathList, but their usage is OSV specific. Each element +in the array is variable length, and ends at the device path end structure. */ VariableSize = sizeof (Option->Attributes) @@ -359,7 +359,7 @@ EfiBootManagerAddLoadOptionVariable ( return EFI_INVALID_PARAMETER; } - if (Option->OptionType != LoadOptionTypeDriver && + if (Option->OptionType != LoadOptionTypeDriver && Option->OptionType != LoadOptionTypeSysPrep && Option->OptionType != LoadOptionTypeBoot ) { @@ -399,7 +399,7 @@ EfiBootManagerAddLoadOptionVariable ( } /** - Sort the load option. The DriverOrder or BootOrder will be re-created to + Sort the load option. The DriverOrder or BootOrder will be re-created to reflect the new order. @param OptionType Load option type @@ -514,7 +514,7 @@ EfiBootManagerInitializeLoadOption ( /** Return the index of the load option in the load option array. - The function consider two load options are equal when the + The function consider two load options are equal when the OptionType, Attributes, Description, FilePath and OptionalData are equal. @param Key Pointer to the load option to be found. @@ -618,15 +618,15 @@ EfiBootManagerDeleteLoadOptionVariable ( /** Returns the size of a device path in bytes. - This function returns the size, in bytes, of the device path data structure - specified by DevicePath including the end of device path node. If DevicePath + This function returns the size, in bytes, of the device path data structure + specified by DevicePath including the end of device path node. If DevicePath is NULL, then 0 is returned. If the length of the device path is bigger than MaxSize, also return 0 to indicate this is an invalidate device path. @param DevicePath A pointer to a device path data structure. - @param MaxSize Max valid device path size. If big than this size, + @param MaxSize Max valid device path size. If big than this size, return error. - + @retval 0 An invalid device path. @retval Others The size of a device path in bytes. @@ -668,12 +668,12 @@ BmGetDevicePathSizeEx ( } /** - Returns the length of a Null-terminated Unicode string. If the length is - bigger than MaxStringLen, return length 0 to indicate that this is an + Returns the length of a Null-terminated Unicode string. If the length is + bigger than MaxStringLen, return length 0 to indicate that this is an invalidate string. This function returns the number of Unicode characters in the Null-terminated - Unicode string specified by String. + Unicode string specified by String. If String is NULL, then ASSERT(). If String is not aligned on a 16-bit boundary, then ASSERT(). @@ -716,7 +716,7 @@ BmStrSizeEx ( @retval FALSE The variable data is corrupted. **/ -BOOLEAN +BOOLEAN BmValidateOption ( UINT8 *Variable, UINTN VariableSize @@ -862,7 +862,7 @@ EFIAPI EfiBootManagerVariableToLoadOptionEx ( IN CHAR16 *VariableName, IN EFI_GUID *VendorGuid, - IN OUT EFI_BOOT_MANAGER_LOAD_OPTION *Option + IN OUT EFI_BOOT_MANAGER_LOAD_OPTION *Option ) { EFI_STATUS Status; @@ -1034,7 +1034,7 @@ BmCollectLoadOptions ( /** Returns an array of load options based on the EFI variable L"BootOrder"/L"DriverOrder" and the L"Boot####"/L"Driver####" variables impled by it. - #### is the hex value of the UINT16 in each BootOrder/DriverOrder entry. + #### is the hex value of the UINT16 in each BootOrder/DriverOrder entry. @param LoadOptionCount Returns number of entries in the array. @param LoadOptionType The type of the load option. @@ -1122,8 +1122,8 @@ EfiBootManagerGetLoadOptions ( @param LoadOption Pointer to boot option to Free. - @return EFI_SUCCESS BootOption was freed - @return EFI_NOT_FOUND BootOption == NULL + @return EFI_SUCCESS BootOption was freed + @return EFI_NOT_FOUND BootOption == NULL **/ EFI_STATUS @@ -1150,14 +1150,14 @@ EfiBootManagerFreeLoadOption ( } /** - Free an EFI_BOOT_MANGER_LOAD_OPTION array that was allocated by + Free an EFI_BOOT_MANGER_LOAD_OPTION array that was allocated by EfiBootManagerGetLoadOptions(). @param Option Pointer to boot option array to free. @param OptionCount Number of array entries in BootOption - @return EFI_SUCCESS BootOption was freed - @return EFI_NOT_FOUND BootOption == NULL + @return EFI_SUCCESS BootOption was freed + @return EFI_NOT_FOUND BootOption == NULL **/ EFI_STATUS @@ -1230,7 +1230,7 @@ BmIsLoadOptionPeHeaderValid ( // Check PE32 or PE32+ magic, and machine type // OptionalHeader = (EFI_IMAGE_OPTIONAL_HEADER32 *) &PeHeader->Pe32.OptionalHeader; - if ((OptionalHeader->Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC || + if ((OptionalHeader->Magic == EFI_IMAGE_NT_OPTIONAL_HDR32_MAGIC || OptionalHeader->Magic == EFI_IMAGE_NT_OPTIONAL_HDR64_MAGIC) && EFI_IMAGE_MACHINE_TYPE_SUPPORTED (PeHeader->Pe32.FileHeader.Machine) ) { @@ -1346,7 +1346,7 @@ BmGetNextLoadOptionBuffer ( @param LoadOption Pointer to the load option. - @retval EFI_INVALID_PARAMETER The load option type is invalid, + @retval EFI_INVALID_PARAMETER The load option type is invalid, or the load option file path doesn't point to a valid file. @retval EFI_UNSUPPORTED The load option type is of LoadOptionTypeBoot. @retval EFI_SUCCESS The load option is inactive, or successfully loaded and executed. diff --git a/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c b/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c index 81d3659400..89ce40a285 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c +++ b/MdeModulePkg/Library/UefiBootManagerLib/BmMisc.c @@ -1,7 +1,7 @@ /** @file Misc library functions. -Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -122,7 +122,7 @@ BmMatchDevicePaths ( } /** - This routine adjust the memory information for different memory type and + This routine adjust the memory information for different memory type and save them into the variables for next boot. It resets the system when memory information is updated and the current boot option belongs to boot category instead of application category. It doesn't count the @@ -163,7 +163,7 @@ BmSetMemoryTypeInformationVariable ( } // - // Only check the the Memory Type Information variable in the boot mode + // Only check the the Memory Type Information variable in the boot mode // other than BOOT_WITH_DEFAULT_SETTINGS because the Memory Type // Information is not valid in this boot mode. // @@ -172,8 +172,8 @@ BmSetMemoryTypeInformationVariable ( Status = gRT->GetVariable ( EFI_MEMORY_TYPE_INFORMATION_VARIABLE_NAME, &gEfiMemoryTypeInformationGuid, - NULL, - &VariableSize, + NULL, + &VariableSize, NULL ); if (Status == EFI_BUFFER_TOO_SMALL) { @@ -304,14 +304,14 @@ BmSetMemoryTypeInformationVariable ( then EFI_INVALID_PARAMETER is returned. @param VendorGuid A unique identifier for the vendor. @param Attributes Attributes bitmask to set for the variable. - @param DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE, + @param DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE, or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS attribute is set, a size of zero - causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is - set, then a SetVariable() call with a DataSize of zero will not cause any change to - the variable value (the timestamp associated with the variable may be updated however - even if no new data value is provided,see the description of the - EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not - be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated). + causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is + set, then a SetVariable() call with a DataSize of zero will not cause any change to + the variable value (the timestamp associated with the variable may be updated however + even if no new data value is provided,see the description of the + EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not + be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated). @param Data The contents for the variable. @retval EFI_SUCCESS The firmware has successfully stored the variable and its data as diff --git a/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h b/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h index 21ecd8584d..978fbff966 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h +++ b/MdeModulePkg/Library/UefiBootManagerLib/InternalBm.h @@ -1,7 +1,7 @@ /** @file BDS library definition, include the file and data structure -Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2015 Hewlett Packard Enterprise Development LP
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -192,7 +192,7 @@ BmGetFreeOptionNumber ( ); /** - This routine adjust the memory information for different memory type and + This routine adjust the memory information for different memory type and save them into the variables for next boot. It resets the system when memory information is updated and the current boot option belongs to boot category instead of application category. It doesn't count the @@ -245,9 +245,9 @@ BmConnectUsbShortFormDevicePath ( /** Stop the hotkey processing. - - @param Event Event pointer related to hotkey service. - @param Context Context pass to this function. + + @param Event Event pointer related to hotkey service. + @param Context Context pass to this function. **/ VOID EFIAPI @@ -265,14 +265,14 @@ BmStopHotkeyService ( then EFI_INVALID_PARAMETER is returned. @param VendorGuid A unique identifier for the vendor. @param Attributes Attributes bitmask to set for the variable. - @param DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE, + @param DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE, or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS attribute is set, a size of zero - causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is - set, then a SetVariable() call with a DataSize of zero will not cause any change to - the variable value (the timestamp associated with the variable may be updated however - even if no new data value is provided,see the description of the - EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not - be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated). + causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is + set, then a SetVariable() call with a DataSize of zero will not cause any change to + the variable value (the timestamp associated with the variable may be updated however + even if no new data value is provided,see the description of the + EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not + be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated). @param Data The contents for the variable. @retval EFI_SUCCESS The firmware has successfully stored the variable and its data as diff --git a/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf b/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf index 8d5b89ea29..72c5ca1cd5 100644 --- a/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf +++ b/MdeModulePkg/Library/UefiBootManagerLib/UefiBootManagerLib.inf @@ -24,7 +24,7 @@ FILE_GUID = 8D4752BC-595E-49a2-B4AF-F3F57B601DE9 MODULE_TYPE = DXE_DRIVER VERSION_STRING = 1.0 - LIBRARY_CLASS = UefiBootManagerLib|DXE_DRIVER DXE_RUNTIME_DRIVER UEFI_APPLICATION UEFI_DRIVER + LIBRARY_CLASS = UefiBootManagerLib|DXE_DRIVER DXE_RUNTIME_DRIVER UEFI_APPLICATION UEFI_DRIVER # # The following information is for reference only and not required by the build tools. @@ -42,7 +42,7 @@ BmHotkey.c BmDriverHealth.c InternalBm.h - + [Packages] MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec diff --git a/MdeModulePkg/Library/UefiHiiLib/HiiLanguage.c b/MdeModulePkg/Library/UefiHiiLib/HiiLanguage.c index f4ef36cec2..aca0606f0b 100644 --- a/MdeModulePkg/Library/UefiHiiLib/HiiLanguage.c +++ b/MdeModulePkg/Library/UefiHiiLib/HiiLanguage.c @@ -1,7 +1,7 @@ /** @file Language related HII Library implementation. - Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -16,12 +16,12 @@ #include "InternalHiiLib.h" /** - Retrieves a pointer to the a Null-terminated ASCII string containing the list - of languages that an HII handle in the HII Database supports. The returned + Retrieves a pointer to the a Null-terminated ASCII string containing the list + of languages that an HII handle in the HII Database supports. The returned string is allocated using AllocatePool(). The caller is responsible for freeing the returned string using FreePool(). The format of the returned string follows the language format assumed the HII Database. - + If HiiHandle is NULL, then ASSERT(). @param[in] HiiHandle A handle that was previously registered in the HII Database. @@ -53,8 +53,8 @@ HiiGetSupportedLanguages ( Status = gHiiString->GetLanguages (gHiiString, HiiHandle, &TempSupportedLanguages, &LanguageSize); // - // If GetLanguages() returns EFI_SUCCESS for a zero size, - // then there are no supported languages registered for HiiHandle. If GetLanguages() + // If GetLanguages() returns EFI_SUCCESS for a zero size, + // then there are no supported languages registered for HiiHandle. If GetLanguages() // returns an error other than EFI_BUFFER_TOO_SMALL, then HiiHandle is not present // in the HII Database // diff --git a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c index f9b8c3df27..3f43c7c8e6 100644 --- a/MdeModulePkg/Library/UefiHiiLib/HiiLib.c +++ b/MdeModulePkg/Library/UefiHiiLib/HiiLib.c @@ -1,7 +1,7 @@ /** @file HII Library implementation that uses DXE protocols and services. - Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -44,7 +44,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR16 mConfigHdrTemplate[] = L"GUID=0000000 EFI_FORM_BROWSER2_PROTOCOL *mUefiFormBrowser2 = NULL; // -// Template used to mark the end of a list of packages +// Template used to mark the end of a list of packages // GLOBAL_REMOVE_IF_UNREFERENCED CONST EFI_HII_PACKAGE_HEADER mEndOfPakageList = { sizeof (EFI_HII_PACKAGE_HEADER), @@ -85,7 +85,7 @@ InternalHiiExtractGuidFromHiiHandle ( Status = gHiiDatabase->ExportPackageLists (gHiiDatabase, Handle, &BufferSize, HiiPackageList); ASSERT (Status != EFI_NOT_FOUND); - + if (Status == EFI_BUFFER_TOO_SMALL) { HiiPackageList = AllocatePool (BufferSize); ASSERT (HiiPackageList != NULL); @@ -115,7 +115,7 @@ InternalHiiExtractGuidFromHiiHandle ( If an empty list of packages is passed in, then NULL is returned. If the size of the list of package is 0, then NULL is returned. - The variable arguments are pointers which point to package header that defined + The variable arguments are pointers which point to package header that defined by UEFI VFR compiler and StringGather tool. #pragma pack (push, 1) @@ -124,13 +124,13 @@ InternalHiiExtractGuidFromHiiHandle ( EFI_HII_PACKAGE_HEADER PackageHeader; } EDKII_AUTOGEN_PACKAGES_HEADER; #pragma pack (pop) - + @param[in] PackageListGuid The GUID of the package list. - @param[in] DeviceHandle If not NULL, the Device Handle on which + @param[in] DeviceHandle If not NULL, the Device Handle on which an instance of DEVICE_PATH_PROTOCOL is installed. - This Device Handle uniquely defines the device that + This Device Handle uniquely defines the device that the added packages are associated with. - @param[in] ... The variable argument list that contains pointers + @param[in] ... The variable argument list that contains pointers to packages terminated by a NULL. @retval NULL A HII Handle has already been registered in the HII Database with @@ -168,7 +168,7 @@ HiiAddPackages ( VA_END (Args); // - // If there are no packages in the variable argument list or all the packages + // If there are no packages in the variable argument list or all the packages // are empty, then return a NULL HII Handle // if (Length == 0) { @@ -176,7 +176,7 @@ HiiAddPackages ( } // - // Add the length of the Package List Header and the terminating Package Header + // Add the length of the Package List Header and the terminating Package Header // Length += sizeof (EFI_HII_PACKAGE_LIST_HEADER) + sizeof (EFI_HII_PACKAGE_HEADER); @@ -222,9 +222,9 @@ HiiAddPackages ( // Register the package list with the HII Database // Status = gHiiDatabase->NewPackageList ( - gHiiDatabase, - PackageListHeader, - DeviceHandle, + gHiiDatabase, + PackageListHeader, + DeviceHandle, &HiiHandle ); if (EFI_ERROR (Status)) { @@ -272,12 +272,12 @@ HiiRemovePackages ( This function allocates the returned array using AllocatePool(). The caller is responsible for freeing the array with FreePool(). - @param[in] PackageListGuid An optional parameter that is used to request + @param[in] PackageListGuid An optional parameter that is used to request HII Handles associated with a specific Package List GUID. If this parameter is NULL, then all the HII Handles in the HII Database are returned. If this parameter is not NULL, - then zero or more HII Handles associated with + then zero or more HII Handles associated with PackageListGuid are returned. @retval NULL No HII handles were found in the HII database @@ -312,14 +312,14 @@ HiiGetHiiHandles ( ); // - // If ListPackageLists() returns EFI_SUCCESS for a zero size, - // then there are no HII handles in the HII database. If ListPackageLists() - // returns an error other than EFI_BUFFER_TOO_SMALL, then there are no HII + // If ListPackageLists() returns EFI_SUCCESS for a zero size, + // then there are no HII handles in the HII database. If ListPackageLists() + // returns an error other than EFI_BUFFER_TOO_SMALL, then there are no HII // handles in the HII database. // if (Status != EFI_BUFFER_TOO_SMALL) { // - // Return NULL if the size can not be retrieved, or if there are no HII + // Return NULL if the size can not be retrieved, or if there are no HII // handles in the HII Database // return NULL; @@ -364,7 +364,7 @@ HiiGetHiiHandles ( Status = InternalHiiExtractGuidFromHiiHandle (HiiHandleBuffer[Index1], &Guid); ASSERT_EFI_ERROR (Status); if (CompareGuid (&Guid, PackageListGuid)) { - HiiHandleBuffer[Index2++] = HiiHandleBuffer[Index1]; + HiiHandleBuffer[Index2++] = HiiHandleBuffer[Index1]; } } if (Index2 > 0) { @@ -379,7 +379,7 @@ HiiGetHiiHandles ( /** This function allows a caller to extract the form set opcode form the Hii Handle. - The returned buffer is allocated using AllocatePool().The caller is responsible + The returned buffer is allocated using AllocatePool().The caller is responsible for freeing the allocated buffer using FreePool(). @param Handle The HII handle. @@ -503,7 +503,7 @@ Done: } /** - Converts all hex dtring characters in range ['A'..'F'] to ['a'..'f'] for + Converts all hex dtring characters in range ['A'..'F'] to ['a'..'f'] for hex digits that appear between a '=' and a '&' in a config string. If ConfigString is NULL, then ASSERT(). @@ -541,7 +541,7 @@ InternalHiiLowerConfigString ( } /** - Uses the BlockToConfig() service of the Config Routing Protocol to + Uses the BlockToConfig() service of the Config Routing Protocol to convert and a buffer to a If ConfigRequest is NULL, then ASSERT(). @@ -588,14 +588,14 @@ InternalHiiBlockToConfig ( } /** - Uses the BrowserCallback() service of the Form Browser Protocol to retrieve - or set uncommitted data. If sata i being retrieved, then the buffer is - allocated using AllocatePool(). The caller is then responsible for freeing + Uses the BrowserCallback() service of the Form Browser Protocol to retrieve + or set uncommitted data. If sata i being retrieved, then the buffer is + allocated using AllocatePool(). The caller is then responsible for freeing the buffer using FreePool(). - @param[in] VariableGuid Pointer to an EFI_GUID structure. This is an optional + @param[in] VariableGuid Pointer to an EFI_GUID structure. This is an optional parameter that may be NULL. - @param[in] VariableName Pointer to a Null-terminated Unicode string. This + @param[in] VariableName Pointer to a Null-terminated Unicode string. This is an optional parameter that may be NULL. @param[in] SetResultsData If not NULL, then this parameter specified the buffer of uncommited data to set. If this parameter is NULL, @@ -648,7 +648,7 @@ InternalHiiBrowserCallback ( VariableGuid, VariableName ); - + if (!EFI_ERROR (Status)) { // // No Resluts Data, only allocate one char for '\0' @@ -689,23 +689,23 @@ InternalHiiBrowserCallback ( } /** - Allocates and returns a Null-terminated Unicode string using routing + Allocates and returns a Null-terminated Unicode string using routing information that includes a GUID, an optional Unicode string name, and a device - path. The string returned is allocated with AllocatePool(). The caller is + path. The string returned is allocated with AllocatePool(). The caller is responsible for freeing the allocated string with FreePool(). - + The format of a is as follows: GUID=32&NAME=NameLength&PATH=DevicePathSize @param[in] Guid Pointer to an EFI_GUID that is the routing information - GUID. Each of the 16 bytes in Guid is converted to + GUID. Each of the 16 bytes in Guid is converted to a 2 Unicode character hexadecimal string. This is an optional parameter that may be NULL. - @param[in] Name Pointer to a Null-terminated Unicode string that is - the routing information NAME. This is an optional - parameter that may be NULL. Each 16-bit Unicode - character in Name is converted to a 4 character Unicode + @param[in] Name Pointer to a Null-terminated Unicode string that is + the routing information NAME. This is an optional + parameter that may be NULL. Each 16-bit Unicode + character in Name is converted to a 4 character Unicode hexadecimal string. @param[in] DriverHandle The driver handle which supports a Device Path Protocol that is the routing information PATH. Each byte of @@ -734,7 +734,7 @@ HiiConstructConfigHdr ( UINTN MaxLen; // - // Compute the length of Name in Unicode characters. + // Compute the length of Name in Unicode characters. // If Name is NULL, then the length is 0. // NameLength = 0; @@ -790,7 +790,7 @@ HiiConstructConfigHdr ( String += StrnLenS (String, MaxLen - ((UINTN)String - (UINTN)ReturnString) / sizeof (CHAR16)); } } - + // // Append L"&NAME=" // @@ -845,7 +845,7 @@ HiiConstructConfigHdr ( } /** - Convert the hex UNICODE encoding string of UEFI GUID, NAME or device path + Convert the hex UNICODE encoding string of UEFI GUID, NAME or device path to binary buffer from . This is a internal function. @@ -878,7 +878,7 @@ InternalHiiGetBufferFromString ( if (String == NULL || Buffer == NULL) { return EFI_INVALID_PARAMETER; } - + DataBuffer = NULL; StringPtr = NULL; ConfigHdr = String; @@ -913,14 +913,14 @@ InternalHiiGetBufferFromString ( DataBuffer [Index/2] = (UINT8) ((DataBuffer [Index/2] << 4) + DigitUint8); } } - + *Buffer = DataBuffer; break; case NAME_CONFIG_STRING_TYPE: // // Convert Config String to Unicode String, e.g. "0041004200430044" => "ABCD" - // + // // // Add the tailling char L'\0' @@ -956,10 +956,10 @@ InternalHiiGetBufferFromString ( /** This function checks VarOffset and VarWidth is in the block range. - @param BlockArray The block array is to be checked. + @param BlockArray The block array is to be checked. @param VarOffset Offset of var to the structure @param VarWidth Width of var. - + @retval TRUE This Var is in the block range. @retval FALSE This Var is not in the block range. **/ @@ -972,14 +972,14 @@ BlockArrayCheck ( { LIST_ENTRY *Link; IFR_BLOCK_DATA *BlockData; - + // // No Request Block array, all vars are got. // if (BlockArray == NULL) { return TRUE; } - + // // Check the input var is in the request block range. // @@ -1036,7 +1036,7 @@ InternalHiiGetValueOfNumber ( StringPtr++; } Length = StringPtr - ValueString; - + // // Allocate buffer to store the value // @@ -1044,7 +1044,7 @@ InternalHiiGetValueOfNumber ( if (Buf == NULL) { return EFI_OUT_OF_RESOURCES; } - + // // Convert character one by one to the value buffer // @@ -1058,7 +1058,7 @@ InternalHiiGetValueOfNumber ( Buf [Index/2] = (UINT8) ((DigitUint8 << 4) + Buf [Index/2]); } } - + // // Set the converted value and string length. // @@ -1073,7 +1073,7 @@ InternalHiiGetValueOfNumber ( @param ConfigElement ConfigResp string contains the current setting. @param VarName The variable name which need to get value. @param VarValue The return value. - + @retval EFI_SUCCESS Get the value for the VarName @retval EFI_OUT_OF_RESOURCES The memory is not enough. **/ @@ -1131,7 +1131,7 @@ GetValueFromRequest ( @param RequestElement The config string for this storage. @param HiiHandle The HiiHandle for this formset. @param NameValueType Whether current storage is name/value varstore or not. - + @retval EFI_SUCCESS The current setting is valid. @retval EFI_OUT_OF_RESOURCES The memory is not enough. @retval EFI_INVALID_PARAMETER The config string or the Hii package is invalid. @@ -1279,8 +1279,8 @@ ValidateQuestionFromVfr ( IfrEfiVarStore = (EFI_IFR_VARSTORE_EFI *) IfrOpHdr; // - // If the length is small than the structure, this is from old efi - // varstore definition. Old efi varstore get config directly from + // If the length is small than the structure, this is from old efi + // varstore definition. Old efi varstore get config directly from // GetVariable function. // if (IfrOpHdr->Length < sizeof (EFI_IFR_VARSTORE_EFI)) { @@ -1327,12 +1327,12 @@ ValidateQuestionFromVfr ( // // - // OneOf question is not in IFR Form. This IFR form is not valid. + // OneOf question is not in IFR Form. This IFR form is not valid. // if (VarStoreData.VarStoreId == 0) { return EFI_INVALID_PARAMETER; } - // + // // Check whether this question is for the requested varstore. // IfrOneOf = (EFI_IFR_ONE_OF *) IfrOpHdr; @@ -1382,11 +1382,11 @@ ValidateQuestionFromVfr ( break; } // - // Check this var question is in the var storage + // Check this var question is in the var storage // if ((Offset + Width) > VarStoreData.Size) { // - // This question exceeds the var store size. + // This question exceeds the var store size. // return EFI_INVALID_PARAMETER; } @@ -1419,7 +1419,7 @@ ValidateQuestionFromVfr ( // // - // Numeric question is not in IFR Form. This IFR form is not valid. + // Numeric question is not in IFR Form. This IFR form is not valid. // if (VarStoreData.VarStoreId == 0) { return EFI_INVALID_PARAMETER; @@ -1442,7 +1442,7 @@ ValidateQuestionFromVfr ( // break; } - + Status = GetValueFromRequest (RequestElement, QuestionName, &VarValue); if (EFI_ERROR (Status)) { return Status; @@ -1474,11 +1474,11 @@ ValidateQuestionFromVfr ( break; } // - // Check this var question is in the var storage + // Check this var question is in the var storage // if ((Offset + Width) > VarStoreData.Size) { // - // This question exceeds the var store size. + // This question exceeds the var store size. // return EFI_INVALID_PARAMETER; } @@ -1598,7 +1598,7 @@ ValidateQuestionFromVfr ( // // - // CheckBox question is not in IFR Form. This IFR form is not valid. + // CheckBox question is not in IFR Form. This IFR form is not valid. // if (VarStoreData.VarStoreId == 0) { return EFI_INVALID_PARAMETER; @@ -1622,7 +1622,7 @@ ValidateQuestionFromVfr ( // break; } - + Status = GetValueFromRequest (RequestElement, QuestionName, &VarValue); if (EFI_ERROR (Status)) { return Status; @@ -1654,11 +1654,11 @@ ValidateQuestionFromVfr ( break; } // - // Check this var question is in the var storage + // Check this var question is in the var storage // if ((Offset + Width) > VarStoreData.Size) { // - // This question exceeds the var store size. + // This question exceeds the var store size. // return EFI_INVALID_PARAMETER; } @@ -1691,7 +1691,7 @@ ValidateQuestionFromVfr ( // // - // CheckBox question is not in IFR Form. This IFR form is not valid. + // CheckBox question is not in IFR Form. This IFR form is not valid. // if (VarStoreData.VarStoreId == 0) { return EFI_INVALID_PARAMETER; @@ -1726,9 +1726,9 @@ ValidateQuestionFromVfr ( // // Skip the "=". - // + // StringPtr += 1; - + // // Check current string length is less than maxsize // e.g Config String: "0041004200430044", Unicode String: "ABCD". Unicode String length = Config String length / 4. @@ -1755,11 +1755,11 @@ ValidateQuestionFromVfr ( break; } // - // Check this var question is in the var storage + // Check this var question is in the var storage // if ((Offset + Width) > VarStoreData.Size) { // - // This question exceeds the var store size. + // This question exceeds the var store size. // return EFI_INVALID_PARAMETER; } @@ -1774,7 +1774,7 @@ ValidateQuestionFromVfr ( break; case EFI_IFR_ONE_OF_OPTION_OP: // - // Opcode Scope is zero. This one of option is not to be checked. + // Opcode Scope is zero. This one of option is not to be checked. // if (VarBlockData.Scope == 0) { break; @@ -1810,7 +1810,7 @@ ValidateQuestionFromVfr ( } // - // OneOf value doesn't belong to one of option value. + // OneOf value doesn't belong to one of option value. // if ((VarBlockData.Scope == 0) && (VarBlockData.OpCode == EFI_IFR_ONE_OF_OP)) { return EFI_INVALID_PARAMETER; @@ -1856,7 +1856,7 @@ ValidateQuestionFromVfr ( @param ConfigElement ConfigResp element string contains the current setting. @param CurrentBlockArray Current block array. @param VarBuffer Data buffer for this varstore. - + @retval EFI_SUCCESS The current setting is valid. @retval EFI_OUT_OF_RESOURCES The memory is not enough. @retval EFI_INVALID_PARAMETER The config string or the Hii package is invalid. @@ -1880,7 +1880,7 @@ GetBlockDataInfo ( EFI_STATUS Status; IFR_BLOCK_DATA *BlockArray; UINT8 *DataBuffer; - + // // Initialize the local variables. // @@ -1916,7 +1916,7 @@ GetBlockDataInfo ( while (*StringPtr != 0 && StrnCmp (StringPtr, L"&OFFSET=", StrLen (L"&OFFSET=")) == 0) { // // Skip the &OFFSET= string - // + // StringPtr += StrLen (L"&OFFSET="); // @@ -2046,13 +2046,13 @@ GetBlockDataInfo ( } // - // If '\0', parsing is finished. + // If '\0', parsing is finished. // if (*StringPtr == 0) { break; } // - // Go to next ConfigBlock + // Go to next ConfigBlock // } @@ -2082,7 +2082,7 @@ Done: if (DataBuffer != NULL) { FreePool (DataBuffer); } - + if (BlockArray != NULL) { // // Free Link Array CurrentBlockArray @@ -2107,7 +2107,7 @@ Done: @param VarGuid Guid of the buffer storage. @param VarName Name of the buffer storage. @param HiiHandle The HiiHandle for this package. - + @retval EFI_SUCCESS The current setting is valid. @retval EFI_OUT_OF_RESOURCES The memory is not enough. @retval EFI_INVALID_PARAMETER The config string or the Hii package is invalid. @@ -2176,7 +2176,7 @@ InternalHiiValidateCurrentSetting ( if (VarBuffer != NULL) { FreePool (VarBuffer); } - + if (CurrentBlockArray != NULL) { // // Free Link Array CurrentBlockArray @@ -2201,7 +2201,7 @@ InternalHiiValidateCurrentSetting ( @retval TRUE The input include config request elements. @retval FALSE The input string not includes. - + **/ BOOLEAN GetElementsFromRequest ( @@ -2224,15 +2224,15 @@ GetElementsFromRequest ( This function parses the input ConfigRequest string and its matched IFR code string for setting default value and validating current setting. - 1. For setting default action, Reset the default value specified by DefaultId + 1. For setting default action, Reset the default value specified by DefaultId to the driver configuration got by Request string. - 2. For validating current setting, Validate the current configuration + 2. For validating current setting, Validate the current configuration by parsing HII form IFR opcode. NULL request string support depends on the ExportConfig interface of HiiConfigRouting protocol in UEFI specification. - - @param Request A null-terminated Unicode string in + + @param Request A null-terminated Unicode string in format. It can be NULL. If it is NULL, all current configuration for the entirety of the current HII database will be validated. @@ -2240,7 +2240,7 @@ GetElementsFromRequest ( entirety of the current HII database will be reset. @param DefaultId Specifies the type of defaults to retrieve only for setting default action. @param ActionType Action supports setting defaults and validate current setting. - + @retval TRUE Action runs successfully. @retval FALSE Action is not valid or Action can't be executed successfully.. **/ @@ -2284,7 +2284,7 @@ InternalHiiIfrValueAction ( TempDriverHandle = NULL; HiiHandle = NULL; HiiPackageList = NULL; - + // // Only support set default and validate setting action. // @@ -2308,11 +2308,11 @@ InternalHiiIfrValueAction ( &ConfigAltResp ); } - + if (EFI_ERROR (Status)) { return FALSE; } - + StringPtr = ConfigAltResp; ASSERT (StringPtr != NULL); @@ -2350,7 +2350,7 @@ InternalHiiIfrValueAction ( if (EFI_ERROR (Status)) { goto Done; } - + // // Get Path value DevicePath // @@ -2375,7 +2375,7 @@ InternalHiiIfrValueAction ( if (EFI_ERROR (Status)) { goto Done; } - + // // Find the matched Hii Handle for the found Driver handle // @@ -2399,7 +2399,7 @@ InternalHiiIfrValueAction ( // // This request string has no its Hii package. // Its default value and validating can't execute by parsing IFR data. - // Directly jump into the next ConfigAltResp string for another pair Guid, Name, and Path. + // Directly jump into the next ConfigAltResp string for another pair Guid, Name, and Path. // Status = EFI_SUCCESS; goto NextConfigAltResp; @@ -2411,7 +2411,7 @@ InternalHiiIfrValueAction ( PackageListLength = 0; HiiPackageList = NULL; Status = gHiiDatabase->ExportPackageLists (gHiiDatabase, HiiHandle, &PackageListLength, HiiPackageList); - + // // The return status should always be EFI_BUFFER_TOO_SMALL as input buffer's size is 0. // @@ -2419,13 +2419,13 @@ InternalHiiIfrValueAction ( Status = EFI_INVALID_PARAMETER; goto Done; } - + HiiPackageList = AllocatePool (PackageListLength); if (HiiPackageList == NULL) { Status = EFI_OUT_OF_RESOURCES; goto Done; } - + // // Get PackageList on HiiHandle // @@ -2433,7 +2433,7 @@ InternalHiiIfrValueAction ( if (EFI_ERROR (Status)) { goto Done; } - + // // 3. Call ConfigRouting GetAltCfg(ConfigRoute, , Guid, Name, DevicePath, AltCfgId, AltCfgResp) // Get the default configuration string according to the default ID. @@ -2447,7 +2447,7 @@ InternalHiiIfrValueAction ( (ActionType == ACTION_SET_DEFAUTL_VALUE) ? &DefaultId:NULL, // it can be NULL to get the current setting. &ConfigResp ); - + // // The required setting can't be found. So, it is not required to be validated and set. // @@ -2461,7 +2461,7 @@ InternalHiiIfrValueAction ( if (!GetElementsFromRequest (ConfigResp)) { goto NextConfigAltResp; } - + // // 4. Set the default configuration information or Validate current setting by parse IFR code. // Current Setting is in ConfigResp, will be set into buffer, then check it again. @@ -2490,7 +2490,7 @@ NextConfigAltResp: FreePool (HiiPackageList); HiiPackageList = NULL; } - + if (ConfigResp != NULL) { FreePool (ConfigResp); ConfigResp = NULL; @@ -2501,10 +2501,10 @@ NextConfigAltResp: // FreePool (VarGuid); VarGuid = NULL; - + FreePool (VarName); VarName = NULL; - + FreePool (DevicePath); DevicePath = NULL; @@ -2521,9 +2521,9 @@ NextConfigAltResp: if (*StringPtr == L'\0') { break; } - + // - // Construct ConfigAltHdr string "&&ALTCFG=\0" + // Construct ConfigAltHdr string "&&ALTCFG=\0" // | 1 | StrLen (ConfigHdr) | 8 | 1 | // MaxLen = 1 + StringPtr - StringHdr + 8 + 1; @@ -2535,7 +2535,7 @@ NextConfigAltResp: StrCpyS (ConfigAltHdr, MaxLen, L"&"); StrnCatS (ConfigAltHdr, MaxLen, StringHdr, StringPtr - StringHdr); StrCatS (ConfigAltHdr, MaxLen, L"&ALTCFG="); - + // // Skip all AltResp (AltConfigHdr ConfigBody) for the same ConfigHdr // @@ -2545,7 +2545,7 @@ NextConfigAltResp: break; } } - + // // Free the allocated ConfigAltHdr string // @@ -2553,7 +2553,7 @@ NextConfigAltResp: if (*StringPtr == L'\0') { break; } - + // // Find &GUID as the next ConfigHdr // @@ -2567,7 +2567,7 @@ NextConfigAltResp: // StringPtr ++; } - + Done: if (VarGuid != NULL) { FreePool (VarGuid); @@ -2588,11 +2588,11 @@ Done: if (ConfigAltResp != NULL) { FreePool (ConfigAltResp); } - + if (HiiPackageList != NULL) { FreePool (HiiPackageList); } - + if (EFI_ERROR (Status)) { return FALSE; } @@ -2605,17 +2605,17 @@ Done: NULL request string support depends on the ExportConfig interface of HiiConfigRouting protocol in UEFI specification. - - @param Request A null-terminated Unicode string in + + @param Request A null-terminated Unicode string in format. It can be NULL. If it is NULL, all current configuration for the entirety of the current HII database will be validated. - + @retval TRUE Current configuration is valid. @retval FALSE Current configuration is invalid. **/ BOOLEAN -EFIAPI +EFIAPI HiiValidateSettings ( IN CONST EFI_STRING Request OPTIONAL ) @@ -2625,17 +2625,17 @@ HiiValidateSettings ( /** Reset the default value specified by DefaultId to the driver - configuration got by Request string. + configuration got by Request string. NULL request string support depends on the ExportConfig interface of HiiConfigRouting protocol in UEFI specification. - - @param Request A null-terminated Unicode string in + + @param Request A null-terminated Unicode string in format. It can be NULL. If it is NULL, all configuration for the entirety of the current HII database will be reset. @param DefaultId Specifies the type of defaults to retrieve. - + @retval TRUE The default value is set successfully. @retval FALSE The default value can't be found and set. **/ @@ -2652,8 +2652,8 @@ HiiSetToDefaults ( /** Determines if two values in config strings match. - Compares the substring between StartSearchString and StopSearchString in - FirstString to the substring between StartSearchString and StopSearchString + Compares the substring between StartSearchString and StopSearchString in + FirstString to the substring between StartSearchString and StopSearchString in SecondString. If the two substrings match, then TRUE is returned. If the two substrings do not match, then FALSE is returned. @@ -2664,20 +2664,20 @@ HiiSetToDefaults ( @param FirstString Pointer to the first Null-terminated Unicode string. @param SecondString Pointer to the second Null-terminated Unicode string. - @param StartSearchString Pointer to the Null-terminated Unicode string that + @param StartSearchString Pointer to the Null-terminated Unicode string that marks the start of the value string to compare. - @param StopSearchString Pointer to the Null-terminated Unicode string that + @param StopSearchString Pointer to the Null-terminated Unicode string that marks the end of the value string to compare. - @retval FALSE StartSearchString is not present in FirstString. + @retval FALSE StartSearchString is not present in FirstString. @retval FALSE StartSearchString is not present in SecondString. - @retval FALSE StopSearchString is not present in FirstString. + @retval FALSE StopSearchString is not present in FirstString. @retval FALSE StopSearchString is not present in SecondString. - @retval FALSE The length of the substring in FirstString is not the + @retval FALSE The length of the substring in FirstString is not the same length as the substring in SecondString. - @retval FALSE The value string in FirstString does not matche the + @retval FALSE The value string in FirstString does not matche the value string in SecondString. - @retval TRUE The value string in FirstString matches the value + @retval TRUE The value string in FirstString matches the value string in SecondString. **/ @@ -2786,11 +2786,11 @@ HiiIsConfigHdrMatch ( Retrieves uncommitted data from the Form Browser and converts it to a binary buffer. - @param[in] VariableGuid Pointer to an EFI_GUID structure. This is an optional + @param[in] VariableGuid Pointer to an EFI_GUID structure. This is an optional parameter that may be NULL. - @param[in] VariableName Pointer to a Null-terminated Unicode string. This + @param[in] VariableName Pointer to a Null-terminated Unicode string. This is an optional parameter that may be NULL. - @param[in] BufferSize Length in bytes of buffer to hold retrieved data. + @param[in] BufferSize Length in bytes of buffer to hold retrieved data. @param[out] Buffer Buffer of data to be updated. @retval FALSE The uncommitted data could not be retrieved. @@ -2827,7 +2827,7 @@ HiiGetBrowserData ( Size = Size + (StrLen (ResultsData) + 1) * sizeof (CHAR16); ConfigResp = AllocateZeroPool (Size); UnicodeSPrint (ConfigResp, Size, L"%s&%s", mConfigHdrTemplate, ResultsData); - + // // Free the allocated buffer // @@ -2872,7 +2872,7 @@ HiiGetBrowserData ( @param[in] RequestElement An optional field to specify which part of the buffer data will be send back to Browser. If NULL, the whole buffer of data will be committed to - Browser. + Browser. ::= &OFFSET=&WIDTH=* @retval FALSE The uncommitted data could not be updated. @@ -2901,7 +2901,7 @@ HiiSetBrowserData ( // if (RequestElement == NULL) { // - // Allocate and fill a buffer large enough to hold the template + // Allocate and fill a buffer large enough to hold the template // followed by "&OFFSET=0&WIDTH=WWWWWWWWWWWWWWWW" followed by a Null-terminator // Size = (StrLen (mConfigHdrTemplate) + 32 + 1) * sizeof (CHAR16); @@ -2909,7 +2909,7 @@ HiiSetBrowserData ( UnicodeSPrint (ConfigRequest, Size, L"%s&OFFSET=0&WIDTH=%016LX", mConfigHdrTemplate, (UINT64)BufferSize); } else { // - // Allocate and fill a buffer large enough to hold the template + // Allocate and fill a buffer large enough to hold the template // followed by followed by a Null-terminator // Size = StrLen (mConfigHdrTemplate) * sizeof (CHAR16); @@ -2968,7 +2968,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST UINT8 mHiiDefaultTypeToWidth[] = { }; /** - Allocates and returns a new OpCode Handle. OpCode Handles must be freed with + Allocates and returns a new OpCode Handle. OpCode Handles must be freed with HiiFreeOpCodeHandle(). @retval NULL There are not enough resources to allocate a new OpCode Handle. @@ -3026,7 +3026,7 @@ HiiFreeOpCodeHandle ( /** Internal function gets the current position of opcode buffer. - + @param[in] OpCodeHandle Handle to the buffer of opcodes. @return Current position of opcode buffer. @@ -3042,7 +3042,7 @@ InternalHiiOpCodeHandlePosition ( /** Internal function gets the start pointer of opcode buffer. - + @param[in] OpCodeHandle Handle to the buffer of opcodes. @return Pointer to the opcode buffer base. @@ -3059,7 +3059,7 @@ InternalHiiOpCodeHandleBuffer ( /** Internal function reserves the enough buffer for current opcode. When the buffer is not enough, Opcode buffer will be extended. - + @param[in] OpCodeHandle Handle to the buffer of opcodes. @param[in] Size Size of current opcode. @@ -3080,7 +3080,7 @@ InternalHiiGrowOpCodeHandle ( OpCodeBuffer = (HII_LIB_OPCODE_BUFFER *)OpCodeHandle; if (OpCodeBuffer->Position + Size > OpCodeBuffer->BufferSize) { Buffer = ReallocatePool ( - OpCodeBuffer->BufferSize, + OpCodeBuffer->BufferSize, OpCodeBuffer->BufferSize + (Size + HII_LIB_OPCODE_ALLOCATION_SIZE), OpCodeBuffer->Buffer ); @@ -3095,7 +3095,7 @@ InternalHiiGrowOpCodeHandle ( /** Internal function creates opcode based on the template opcode. - + @param[in] OpCodeHandle Handle to the buffer of opcodes. @param[in] OpCodeTemplate Pointer to the template buffer of opcode. @param[in] OpCode OpCode IFR value. @@ -3132,7 +3132,7 @@ InternalHiiCreateOpCodeExtended ( /** Internal function creates opcode based on the template opcode for the normal opcode. - + @param[in] OpCodeHandle Handle to the buffer of opcodes. @param[in] OpCodeTemplate Pointer to the template buffer of opcode. @param[in] OpCode OpCode IFR value. @@ -3317,14 +3317,14 @@ HiiCreateDefaultOpCode ( @param[in] OpCodeHandle Handle to the buffer of opcodes. @param[in] Guid Pointer to EFI_GUID of this guided opcode. - @param[in] GuidOpCode Pointer to an EFI_IFR_GUID opcode. This is an + @param[in] GuidOpCode Pointer to an EFI_IFR_GUID opcode. This is an optional parameter that may be NULL. If this - parameter is NULL, then the GUID extension + parameter is NULL, then the GUID extension region of the created opcode is filled with zeros. - If this parameter is not NULL, then the GUID - extension region of GuidData will be copied to + If this parameter is not NULL, then the GUID + extension region of GuidData will be copied to the GUID extension region of the created opcode. - @param[in] OpCodeSize The size, in bytes, of created opcode. This value + @param[in] OpCodeSize The size, in bytes, of created opcode. This value must be >= sizeof(EFI_IFR_GUID). @retval NULL There is not enough space left in Buffer to add the opcode. @@ -3350,7 +3350,7 @@ HiiCreateGuidOpCode ( CopyGuid ((EFI_GUID *)(VOID *)&OpCode.Guid, Guid); OpCodePointer = (EFI_IFR_GUID *)InternalHiiCreateOpCodeExtended ( - OpCodeHandle, + OpCodeHandle, &OpCode, EFI_IFR_GUID_OP, sizeof (OpCode), @@ -3444,11 +3444,11 @@ HiiCreateSubTitleOpCode ( OpCode.Flags = Flags; return InternalHiiCreateOpCodeExtended ( - OpCodeHandle, + OpCodeHandle, &OpCode, - EFI_IFR_SUBTITLE_OP, - sizeof (OpCode), - 0, + EFI_IFR_SUBTITLE_OP, + sizeof (OpCode), + 0, Scope ); } @@ -3498,7 +3498,7 @@ HiiCreateGotoOpCode ( /** Create EFI_IFR_REF_OP, EFI_IFR_REF2_OP, EFI_IFR_REF3_OP and EFI_IFR_REF4_OP opcode. - When RefDevicePath is not zero, EFI_IFR_REF4 opcode will be created. + When RefDevicePath is not zero, EFI_IFR_REF4 opcode will be created. When RefDevicePath is zero and RefFormSetId is not NULL, EFI_IFR_REF3 opcode will be created. When RefDevicePath is zero, RefFormSetId is NULL and RefQuestionId is not zero, EFI_IFR_REF2 opcode will be created. When RefDevicePath is zero, RefFormSetId is NULL and RefQuestionId is zero, EFI_IFR_REF opcode will be created. @@ -3512,11 +3512,11 @@ HiiCreateGotoOpCode ( @param[in] Help The string ID for Help. @param[in] QuestionFlags The flags in Question Header @param[in] QuestionId Question ID. - @param[in] RefQuestionId The question on the form to which this link is referring. + @param[in] RefQuestionId The question on the form to which this link is referring. If its value is zero, then the link refers to the top of the form. - @param[in] RefFormSetId The form set to which this link is referring. If its value is NULL, and RefDevicePath is + @param[in] RefFormSetId The form set to which this link is referring. If its value is NULL, and RefDevicePath is zero, then the link is to the current form set. - @param[in] RefDevicePath The string identifier that specifies the string containing the text representation of + @param[in] RefDevicePath The string identifier that specifies the string containing the text representation of the device path to which the form set containing the form specified by FormId. If its value is zero, then the link refers to the current page. @@ -4110,7 +4110,7 @@ HiiCreateTimeOpCode ( @param[in] FormSetGuid The optional Formset GUID. @param[in] FormId The Form ID. @param[in] Package The package header. - @param[in] OpCodeBufferStart An OpCode buffer that contains the set of IFR + @param[in] OpCodeBufferStart An OpCode buffer that contains the set of IFR opcodes to be inserted or replaced in the form. @param[in] OpCodeBufferEnd An OpCcode buffer that contains the IFR opcode that marks the end of a replace operation in the form. @@ -4157,7 +4157,7 @@ InternalHiiUpdateFormPackageData ( CopyMem (BufferPos, IfrOpHdr, IfrOpHdr->Length); BufferPos += IfrOpHdr->Length; UpdatePackageLength += IfrOpHdr->Length; - + // // Find the matched FormSet and Form // @@ -4174,7 +4174,7 @@ InternalHiiUpdateFormPackageData ( GetForm = FALSE; } } - + // // The matched Form is found, and Update data in this form // @@ -4203,7 +4203,7 @@ InternalHiiUpdateFormPackageData ( Offset += IfrOpHdr->Length; IfrOpHdr = (EFI_IFR_OP_HEADER *) ((UINT8 *) (IfrOpHdr) + IfrOpHdr->Length); } - + if (Offset >= PackageHeader.Length) { // // The end opcode is not found. @@ -4250,7 +4250,7 @@ InternalHiiUpdateFormPackageData ( Offset += IfrOpHdr->Length; IfrOpHdr = (EFI_IFR_OP_HEADER *) ((CHAR8 *) (IfrOpHdr) + IfrOpHdr->Length); } - + if (!Updated) { // // The updated opcode buffer is not found. @@ -4267,26 +4267,26 @@ InternalHiiUpdateFormPackageData ( } /** - This function updates a form that has previously been registered with the HII + This function updates a form that has previously been registered with the HII Database. This function will perform at most one update operation. - - The form to update is specified by Handle, FormSetGuid, and FormId. Binary - comparisons of IFR opcodes are performed from the beginning of the form being - updated until an IFR opcode is found that exactly matches the first IFR opcode + + The form to update is specified by Handle, FormSetGuid, and FormId. Binary + comparisons of IFR opcodes are performed from the beginning of the form being + updated until an IFR opcode is found that exactly matches the first IFR opcode specified by StartOpCodeHandle. The following rules are used to determine if an insert, replace, or delete operation is performed. - - 1) If no matches are found, then NULL is returned. + + 1) If no matches are found, then NULL is returned. 2) If a match is found, and EndOpCodeHandle is NULL, then all of the IFR opcodes - from StartOpCodeHandle except the first opcode are inserted immediately after + from StartOpCodeHandle except the first opcode are inserted immediately after the matching IFR opcode in the form to be updated. - 3) If a match is found, and EndOpCodeHandle is not NULL, then a search is made - from the matching IFR opcode until an IFR opcode exactly matches the first + 3) If a match is found, and EndOpCodeHandle is not NULL, then a search is made + from the matching IFR opcode until an IFR opcode exactly matches the first IFR opcode specified by EndOpCodeHandle. If no match is found for the first IFR opcode specified by EndOpCodeHandle, then NULL is returned. If a match - is found, then all of the IFR opcodes between the start match and the end + is found, then all of the IFR opcodes between the start match and the end match are deleted from the form being updated and all of the IFR opcodes - from StartOpCodeHandle except the first opcode are inserted immediately after + from StartOpCodeHandle except the first opcode are inserted immediately after the matching start IFR opcode. If StartOpCcodeHandle only contains one IFR instruction, then the result of this operation will delete all of the IFR opcodes between the start end matches. @@ -4299,26 +4299,26 @@ InternalHiiUpdateFormPackageData ( is an optional parameter that may be NULL. If it is NULL, all FormSet will be updated. @param[in] FormId The ID of the form to update. - @param[in] StartOpCodeHandle An OpCode Handle that contains the set of IFR + @param[in] StartOpCodeHandle An OpCode Handle that contains the set of IFR opcodes to be inserted or replaced in the form. - The first IFR instruction in StartOpCodeHandle - is used to find matching IFR opcode in the - form. + The first IFR instruction in StartOpCodeHandle + is used to find matching IFR opcode in the + form. @param[in] EndOpCodeHandle An OpCcode Handle that contains the IFR opcode that marks the end of a replace operation in the form. This is an optional parameter that may be NULL. If it is NULL, then an the IFR - opcodes specified by StartOpCodeHandle are + opcodes specified by StartOpCodeHandle are inserted into the form. - + @retval EFI_OUT_OF_RESOURCES No enough memory resource is allocated. @retval EFI_NOT_FOUND The following cases will return EFI_NOT_FOUND. - 1) The form specified by HiiHandle, FormSetGuid, + 1) The form specified by HiiHandle, FormSetGuid, and FormId could not be found in the HII Database. 2) No IFR opcodes in the target form match the first IFR opcode in StartOpCodeHandle. - 3) EndOpCOde is not NULL, and no IFR opcodes in the - target form following a matching start opcode match + 3) EndOpCOde is not NULL, and no IFR opcodes in the + target form following a matching start opcode match the first IFR opcode in EndOpCodeHandle. @retval EFI_SUCCESS The matched form is updated by StartOpcode. @@ -4326,7 +4326,7 @@ InternalHiiUpdateFormPackageData ( EFI_STATUS EFIAPI HiiUpdateForm ( - IN EFI_HII_HANDLE HiiHandle, + IN EFI_HII_HANDLE HiiHandle, IN EFI_GUID *FormSetGuid, OPTIONAL IN EFI_FORM_ID FormId, IN VOID *StartOpCodeHandle, @@ -4335,7 +4335,7 @@ HiiUpdateForm ( { EFI_STATUS Status; EFI_HII_PACKAGE_LIST_HEADER *HiiPackageList; - UINT32 PackageListLength; + UINT32 PackageListLength; UINT32 Offset; EFI_HII_PACKAGE_LIST_HEADER *UpdatePackageList; UINTN BufferSize; @@ -4346,7 +4346,7 @@ HiiUpdateForm ( BOOLEAN Updated; HII_LIB_OPCODE_BUFFER *OpCodeBufferStart; HII_LIB_OPCODE_BUFFER *OpCodeBufferEnd; - + // // Input update data can't be NULL. // @@ -4355,13 +4355,13 @@ HiiUpdateForm ( UpdatePackageList = NULL; TempPackage = NULL; HiiPackageList = NULL; - + // // Retrieve buffer data from Opcode Handle // OpCodeBufferStart = (HII_LIB_OPCODE_BUFFER *) StartOpCodeHandle; OpCodeBufferEnd = (HII_LIB_OPCODE_BUFFER *) EndOpCodeHandle; - + // // Get the original package list // @@ -4395,7 +4395,7 @@ HiiUpdateForm ( Status = EFI_OUT_OF_RESOURCES; goto Finish; } - + // // Allocate temp buffer to store the temp updated package buffer // @@ -4412,7 +4412,7 @@ HiiUpdateForm ( // CopyMem (UpdateBufferPos, HiiPackageList, sizeof (EFI_HII_PACKAGE_LIST_HEADER)); UpdateBufferPos += sizeof (EFI_HII_PACKAGE_LIST_HEADER); - + // // Go through each package to find the matched package and update one by one // @@ -4435,7 +4435,7 @@ HiiUpdateForm ( if (!EFI_ERROR(Status)) { // // Set Update Flag - // + // Updated = TRUE; // // Add updated package buffer @@ -4451,14 +4451,14 @@ HiiUpdateForm ( CopyMem (UpdateBufferPos, Package, PackageHeader.Length); UpdateBufferPos += PackageHeader.Length; } - + if (Updated) { // // Update package list length // BufferSize = UpdateBufferPos - (UINT8 *) UpdatePackageList; WriteUnaligned32 (&UpdatePackageList->PackageLength, (UINT32) BufferSize); - + // // Update Package to show form // @@ -4474,14 +4474,14 @@ Finish: if (HiiPackageList != NULL) { FreePool (HiiPackageList); } - + if (UpdatePackageList != NULL) { FreePool (UpdatePackageList); } - + if (TempPackage != NULL) { FreePool (TempPackage); } - return Status; + return Status; } diff --git a/MdeModulePkg/Library/UefiHiiLib/HiiString.c b/MdeModulePkg/Library/UefiHiiLib/HiiString.c index c6a241e657..ae787fec59 100644 --- a/MdeModulePkg/Library/UefiHiiLib/HiiString.c +++ b/MdeModulePkg/Library/UefiHiiLib/HiiString.c @@ -1,7 +1,7 @@ /** @file HII Library implementation that uses DXE protocols and services. - Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -16,37 +16,37 @@ #include "InternalHiiLib.h" /** - This function create a new string in String Package or updates an existing + This function create a new string in String Package or updates an existing string in a String Package. If StringId is 0, then a new string is added to a String Package. If StringId is not zero, then a string in String Package is updated. If SupportedLanguages is NULL, then the string is added or updated for all the languages that the String Package supports. If SupportedLanguages - is not NULL, then the string is added or updated for the set of languages + is not NULL, then the string is added or updated for the set of languages specified by SupportedLanguages. - + If HiiHandle is NULL, then ASSERT(). If String is NULL, then ASSERT(). - @param[in] HiiHandle A handle that was previously registered in the + @param[in] HiiHandle A handle that was previously registered in the HII Database. - @param[in] StringId If zero, then a new string is created in the - String Package associated with HiiHandle. If - non-zero, then the string specified by StringId - is updated in the String Package associated - with HiiHandle. - @param[in] String A pointer to the Null-terminated Unicode string - to add or update in the String Package associated + @param[in] StringId If zero, then a new string is created in the + String Package associated with HiiHandle. If + non-zero, then the string specified by StringId + is updated in the String Package associated + with HiiHandle. + @param[in] String A pointer to the Null-terminated Unicode string + to add or update in the String Package associated with HiiHandle. - @param[in] SupportedLanguages A pointer to a Null-terminated ASCII string of - language codes. If this parameter is NULL, then - String is added or updated in the String Package - associated with HiiHandle for all the languages - that the String Package supports. If this - parameter is not NULL, then then String is added - or updated in the String Package associated with - HiiHandle for the set oflanguages specified by - SupportedLanguages. The format of - SupportedLanguages must follow the language + @param[in] SupportedLanguages A pointer to a Null-terminated ASCII string of + language codes. If this parameter is NULL, then + String is added or updated in the String Package + associated with HiiHandle for all the languages + that the String Package supports. If this + parameter is not NULL, then then String is added + or updated in the String Package associated with + HiiHandle for the set oflanguages specified by + SupportedLanguages. The format of + SupportedLanguages must follow the language format assumed the HII Database. @retval 0 The string could not be added or updated in the String Package. @@ -106,7 +106,7 @@ HiiSetString ( if (*Supported != 0) { *(Supported++) = '\0'; } - + if ((SupportedLanguages == NULL) && AsciiStrnCmp (Language, UEFI_CONFIG_LANG, AsciiStrLen (UEFI_CONFIG_LANG)) == 0) { // // Skip string package used for keyword protocol. @@ -145,24 +145,24 @@ HiiSetString ( /** - Retrieves a string from a string package names by GUID in a specific language. - If the language is not specified, then a string from a string package in the - current platform language is retrieved. If the string can not be retrieved - using the specified language or the current platform language, then the string - is retrieved from the string package in the first language the string package - supports. The returned string is allocated using AllocatePool(). The caller + Retrieves a string from a string package names by GUID in a specific language. + If the language is not specified, then a string from a string package in the + current platform language is retrieved. If the string can not be retrieved + using the specified language or the current platform language, then the string + is retrieved from the string package in the first language the string package + supports. The returned string is allocated using AllocatePool(). The caller is responsible for freeing the allocated buffer using FreePool(). - + If PackageListGuid is NULL, then ASSERT(). If StringId is 0, then ASSERT. - @param[in] PackageListGuid The GUID of a package list that was previously + @param[in] PackageListGuid The GUID of a package list that was previously registered in the HII Database. - @param[in] StringId The identifier of the string to retrieved from the + @param[in] StringId The identifier of the string to retrieved from the string package associated with PackageListGuid. - @param[in] Language The language of the string to retrieve. If this - parameter is NULL, then the current platform - language is used. The format of Language must + @param[in] Language The language of the string to retrieve. If this + parameter is NULL, then the current platform + language is used. The format of Language must follow the language format assumed the HII Database. @retval NULL The package list specified by PackageListGuid is not present in the @@ -197,22 +197,22 @@ HiiGetPackageString ( /** Retrieves a string from a string package in a specific language. If the language - is not specified, then a string from a string package in the current platform - language is retrieved. If the string can not be retrieved using the specified - language or the current platform language, then the string is retrieved from - the string package in the first language the string package supports. The - returned string is allocated using AllocatePool(). The caller is responsible + is not specified, then a string from a string package in the current platform + language is retrieved. If the string can not be retrieved using the specified + language or the current platform language, then the string is retrieved from + the string package in the first language the string package supports. The + returned string is allocated using AllocatePool(). The caller is responsible for freeing the allocated buffer using FreePool(). - + If HiiHandle is NULL, then ASSERT(). If StringId is 0, then ASSET. @param[in] HiiHandle A handle that was previously registered in the HII Database. - @param[in] StringId The identifier of the string to retrieved from the string + @param[in] StringId The identifier of the string to retrieved from the string package associated with HiiHandle. - @param[in] Language The language of the string to retrieve. If this parameter - is NULL, then the current platform language is used. The - format of Language must follow the language format assumed + @param[in] Language The language of the string to retrieve. If this parameter + is NULL, then the current platform language is used. The + format of Language must follow the language format assumed the HII Database. @retval NULL The string specified by StringId is not present in the string package. @@ -240,7 +240,7 @@ HiiGetString ( // // Initialize all allocated buffers to NULL - // + // SupportedLanguages = NULL; PlatformLanguage = NULL; BestLanguage = NULL; @@ -260,7 +260,7 @@ HiiGetString ( GetEfiGlobalVariable2 (L"PlatformLang", (VOID**)&PlatformLanguage, NULL); // - // If Languag is NULL, then set it to an empty string, so it will be + // If Languag is NULL, then set it to an empty string, so it will be // skipped by GetBestLanguage() // if (Language == NULL) { @@ -271,11 +271,11 @@ HiiGetString ( // Get the best matching language from SupportedLanguages // BestLanguage = GetBestLanguage ( - SupportedLanguages, + SupportedLanguages, FALSE, // RFC 4646 mode - Language, // Highest priority + Language, // Highest priority PlatformLanguage != NULL ? PlatformLanguage : "", // Next highest priority - SupportedLanguages, // Lowest priority + SupportedLanguages, // Lowest priority NULL ); if (BestLanguage == NULL) { @@ -296,8 +296,8 @@ HiiGetString ( NULL ); // - // If GetString() returns EFI_SUCCESS for a zero size, - // then there are no supported languages registered for HiiHandle. If GetString() + // If GetString() returns EFI_SUCCESS for a zero size, + // then there are no supported languages registered for HiiHandle. If GetString() // returns an error other than EFI_BUFFER_TOO_SMALL, then HiiHandle is not present // in the HII Database // diff --git a/MdeModulePkg/Library/UefiHiiLib/InternalHiiLib.h b/MdeModulePkg/Library/UefiHiiLib/InternalHiiLib.h index 293c22666d..04fe909a33 100644 --- a/MdeModulePkg/Library/UefiHiiLib/InternalHiiLib.h +++ b/MdeModulePkg/Library/UefiHiiLib/InternalHiiLib.h @@ -1,14 +1,14 @@ /** @file Internal include file for the HII Library instance. - Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.uni b/MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.uni index 760617f705..1bf2a7ee53 100644 --- a/MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.uni +++ b/MdeModulePkg/Library/UefiHiiLib/UefiHiiLib.uni @@ -3,13 +3,13 @@ // // HII Library implementation using UEFI HII protocols and services. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.c b/MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.c index bd3a125603..20f92af054 100644 --- a/MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.c +++ b/MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.c @@ -1,10 +1,10 @@ /** @file - This library retrieves pointers to the UEFI HII Protocol instances in the - library's constructor. All of the UEFI HII related protocols are optional, - so the consumers of this library class must verify that the global variable - pointers are not NULL before use. + This library retrieves pointers to the UEFI HII Protocol instances in the + library's constructor. All of the UEFI HII related protocols are optional, + so the consumers of this library class must verify that the global variable + pointers are not NULL before use. - Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -54,13 +54,13 @@ EFI_HII_CONFIG_ROUTING_PROTOCOL *gHiiConfigRouting = NULL; /** The constructor function retrieves pointers to the UEFI HII protocol instances - - The constructor function retrieves pointers to the four UEFI HII protocols from the - handle database. These include the UEFI HII Font Protocol, the UEFI HII String - Protocol, the UEFI HII Image Protocol, the UEFI HII Database Protocol, and the + + The constructor function retrieves pointers to the four UEFI HII protocols from the + handle database. These include the UEFI HII Font Protocol, the UEFI HII String + Protocol, the UEFI HII Image Protocol, the UEFI HII Database Protocol, and the UEFI HII Config Routing Protocol. This function always return EFI_SUCCESS. All of these protocols are optional if the platform does not support configuration - and the UEFI HII Image Protocol and the UEFI HII Font Protocol are optional if + and the UEFI HII Image Protocol and the UEFI HII Font Protocol are optional if the platform does not support a graphical console. As a result, the consumers of this library much check the protocol pointers againt NULL before using them, or use dependency expressions to guarantee that some of them are present before @@ -82,30 +82,30 @@ UefiHiiServicesLibConstructor ( EFI_STATUS Status; // - // Retrieve the pointer to the UEFI HII String Protocol + // Retrieve the pointer to the UEFI HII String Protocol // Status = gBS->LocateProtocol (&gEfiHiiStringProtocolGuid, NULL, (VOID **) &gHiiString); ASSERT_EFI_ERROR (Status); // - // Retrieve the pointer to the UEFI HII Database Protocol + // Retrieve the pointer to the UEFI HII Database Protocol // Status = gBS->LocateProtocol (&gEfiHiiDatabaseProtocolGuid, NULL, (VOID **) &gHiiDatabase); ASSERT_EFI_ERROR (Status); // - // Retrieve the pointer to the UEFI HII Config Routing Protocol + // Retrieve the pointer to the UEFI HII Config Routing Protocol // Status = gBS->LocateProtocol (&gEfiHiiConfigRoutingProtocolGuid, NULL, (VOID **) &gHiiConfigRouting); ASSERT_EFI_ERROR (Status); // - // Retrieve the pointer to the optional UEFI HII Font Protocol + // Retrieve the pointer to the optional UEFI HII Font Protocol // gBS->LocateProtocol (&gEfiHiiFontProtocolGuid, NULL, (VOID **) &gHiiFont); // - // Retrieve the pointer to the optional UEFI HII Image Protocol + // Retrieve the pointer to the optional UEFI HII Image Protocol // gBS->LocateProtocol (&gEfiHiiImageProtocolGuid, NULL, (VOID **) &gHiiImage); diff --git a/MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf b/MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf index a009e9a715..fba1d6620e 100644 --- a/MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf +++ b/MdeModulePkg/Library/UefiHiiServicesLib/UefiHiiServicesLib.inf @@ -1,7 +1,7 @@ ## @file # UEFI HII Services Library implementation. -# -# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
+# +# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -20,7 +20,7 @@ FILE_GUID = 894DC1B6-07A3-4a9d-8CDD-333580B3D4B1 MODULE_TYPE = UEFI_DRIVER VERSION_STRING = 1.0 - LIBRARY_CLASS = UefiHiiServicesLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER + LIBRARY_CLASS = UefiHiiServicesLib|DXE_DRIVER DXE_RUNTIME_DRIVER DXE_SAL_DRIVER DXE_SMM_DRIVER UEFI_APPLICATION UEFI_DRIVER CONSTRUCTOR = UefiHiiServicesLibConstructor @@ -38,9 +38,9 @@ [LibraryClasses] UefiBootServicesTableLib DebugLib - + [Protocols] - gEfiHiiFontProtocolGuid ## SOMETIMES_CONSUMES + gEfiHiiFontProtocolGuid ## SOMETIMES_CONSUMES gEfiHiiStringProtocolGuid ## CONSUMES gEfiHiiImageProtocolGuid ## SOMETIMES_CONSUMES gEfiHiiDatabaseProtocolGuid ## CONSUMES diff --git a/MdeModulePkg/Library/UefiMemoryAllocationProfileLib/DxeMemoryProfileLib.c b/MdeModulePkg/Library/UefiMemoryAllocationProfileLib/DxeMemoryProfileLib.c index 78c75fbc73..d4eb0a0e76 100644 --- a/MdeModulePkg/Library/UefiMemoryAllocationProfileLib/DxeMemoryProfileLib.c +++ b/MdeModulePkg/Library/UefiMemoryAllocationProfileLib/DxeMemoryProfileLib.c @@ -1,14 +1,14 @@ /** @file Support routines for memory profile for Dxe phase drivers. - Copyright (c) 2016, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php. - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + Copyright (c) 2016 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php. + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Library/UefiMemoryAllocationProfileLib/MemoryAllocationLib.c b/MdeModulePkg/Library/UefiMemoryAllocationProfileLib/MemoryAllocationLib.c index cef7fc0c05..c04b59291d 100644 --- a/MdeModulePkg/Library/UefiMemoryAllocationProfileLib/MemoryAllocationLib.c +++ b/MdeModulePkg/Library/UefiMemoryAllocationProfileLib/MemoryAllocationLib.c @@ -1,15 +1,15 @@ /** @file - Support routines for memory allocation routines based + Support routines for memory allocation routines based on boot services for Dxe phase drivers, with memory profile support. - Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php. + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php. - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -39,12 +39,12 @@ **/ VOID * InternalAllocatePages ( - IN EFI_MEMORY_TYPE MemoryType, + IN EFI_MEMORY_TYPE MemoryType, IN UINTN Pages ) { EFI_STATUS Status; - EFI_PHYSICAL_ADDRESS Memory; + EFI_PHYSICAL_ADDRESS Memory; if (Pages == 0) { return NULL; @@ -170,11 +170,11 @@ AllocateReservedPages ( must have been allocated on a previous call to the page allocation services of the Memory Allocation Library. If it is not possible to free allocated pages, then this function will perform no actions. - + If Buffer was not allocated with a page allocation function in the Memory Allocation Library, then ASSERT(). If Pages is zero, then ASSERT(). - + @param Buffer The pointer to the buffer of pages to free. @param Pages The number of 4 KB pages to free. @@ -213,7 +213,7 @@ FreePages ( **/ VOID * InternalAllocateAlignedPages ( - IN EFI_MEMORY_TYPE MemoryType, + IN EFI_MEMORY_TYPE MemoryType, IN UINTN Pages, IN UINTN Alignment ) @@ -229,7 +229,7 @@ InternalAllocateAlignedPages ( // Alignment must be a power of two or zero. // ASSERT ((Alignment & (Alignment - 1)) == 0); - + if (Pages == 0) { return NULL; } @@ -243,7 +243,7 @@ InternalAllocateAlignedPages ( // Make sure that Pages plus EFI_SIZE_TO_PAGES (Alignment) does not overflow. // ASSERT (RealPages > Pages); - + Status = gBS->AllocatePages (AllocateAnyPages, MemoryType, RealPages, &Memory); if (EFI_ERROR (Status)) { return NULL; @@ -286,7 +286,7 @@ InternalAllocateAlignedPages ( alignment specified by Alignment. The allocated buffer is returned. If Pages is 0, then NULL is returned. If there is not enough memory at the specified alignment remaining to satisfy the request, then NULL is returned. - + If Alignment is not a power of two and Alignment is not zero, then ASSERT(). If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT(). @@ -327,7 +327,7 @@ AllocateAlignedPages ( alignment specified by Alignment. The allocated buffer is returned. If Pages is 0, then NULL is returned. If there is not enough memory at the specified alignment remaining to satisfy the request, then NULL is returned. - + If Alignment is not a power of two and Alignment is not zero, then ASSERT(). If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT(). @@ -368,7 +368,7 @@ AllocateAlignedRuntimePages ( alignment specified by Alignment. The allocated buffer is returned. If Pages is 0, then NULL is returned. If there is not enough memory at the specified alignment remaining to satisfy the request, then NULL is returned. - + If Alignment is not a power of two and Alignment is not zero, then ASSERT(). If Pages plus EFI_SIZE_TO_PAGES (Alignment) overflows, then ASSERT(). @@ -408,13 +408,13 @@ AllocateAlignedReservedPages ( Frees the number of 4KB pages specified by Pages from the buffer specified by Buffer. Buffer must have been allocated on a previous call to the aligned page allocation services of the Memory - Allocation Library. If it is not possible to free allocated pages, then this function will + Allocation Library. If it is not possible to free allocated pages, then this function will perform no actions. - + If Buffer was not allocated with an aligned page allocation function in the Memory Allocation Library, then ASSERT(). If Pages is zero, then ASSERT(). - + @param Buffer The pointer to the buffer of pages to free. @param Pages The number of 4 KB pages to free. @@ -448,7 +448,7 @@ FreeAlignedPages ( **/ VOID * InternalAllocatePool ( - IN EFI_MEMORY_TYPE MemoryType, + IN EFI_MEMORY_TYPE MemoryType, IN UINTN AllocationSize ) { @@ -580,9 +580,9 @@ AllocateReservedPool ( **/ VOID * InternalAllocateZeroPool ( - IN EFI_MEMORY_TYPE PoolType, + IN EFI_MEMORY_TYPE PoolType, IN UINTN AllocationSize - ) + ) { VOID *Memory; @@ -706,7 +706,7 @@ AllocateReservedZeroPool ( allocated buffer. If AllocationSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. If Buffer is NULL, then ASSERT(). - If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). + If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). @param PoolType The type of pool to allocate. @param AllocationSize The number of bytes to allocate and zero. @@ -717,10 +717,10 @@ AllocateReservedZeroPool ( **/ VOID * InternalAllocateCopyPool ( - IN EFI_MEMORY_TYPE PoolType, + IN EFI_MEMORY_TYPE PoolType, IN UINTN AllocationSize, IN CONST VOID *Buffer - ) + ) { VOID *Memory; @@ -732,7 +732,7 @@ InternalAllocateCopyPool ( Memory = CopyMem (Memory, Buffer, AllocationSize); } return Memory; -} +} /** Copies a buffer to an allocated buffer of type EfiBootServicesData. @@ -741,9 +741,9 @@ InternalAllocateCopyPool ( AllocationSize bytes from Buffer to the newly allocated buffer, and returns a pointer to the allocated buffer. If AllocationSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. - + If Buffer is NULL, then ASSERT(). - If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). + If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). @param AllocationSize The number of bytes to allocate and zero. @param Buffer The buffer to copy to the allocated buffer. @@ -781,9 +781,9 @@ AllocateCopyPool ( AllocationSize bytes from Buffer to the newly allocated buffer, and returns a pointer to the allocated buffer. If AllocationSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. - + If Buffer is NULL, then ASSERT(). - If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). + If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). @param AllocationSize The number of bytes to allocate and zero. @param Buffer The buffer to copy to the allocated buffer. @@ -821,9 +821,9 @@ AllocateRuntimeCopyPool ( AllocationSize bytes from Buffer to the newly allocated buffer, and returns a pointer to the allocated buffer. If AllocationSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. - + If Buffer is NULL, then ASSERT(). - If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). + If AllocationSize is greater than (MAX_ADDRESS - Buffer + 1), then ASSERT(). @param AllocationSize The number of bytes to allocate and zero. @param Buffer The buffer to copy to the allocated buffer. @@ -858,19 +858,19 @@ AllocateReservedCopyPool ( Reallocates a buffer of a specified memory type. Allocates and zeros the number bytes specified by NewSize from memory of the type - specified by PoolType. If OldBuffer is not NULL, then the smaller of OldSize and - NewSize bytes are copied from OldBuffer to the newly allocated buffer, and - OldBuffer is freed. A pointer to the newly allocated buffer is returned. - If NewSize is 0, then a valid buffer of 0 size is returned. If there is not + specified by PoolType. If OldBuffer is not NULL, then the smaller of OldSize and + NewSize bytes are copied from OldBuffer to the newly allocated buffer, and + OldBuffer is freed. A pointer to the newly allocated buffer is returned. + If NewSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. - + If the allocation of the new buffer is successful and the smaller of NewSize and OldSize is greater than (MAX_ADDRESS - OldBuffer + 1), then ASSERT(). @param PoolType The type of pool to allocate. @param OldSize The size, in bytes, of OldBuffer. @param NewSize The size, in bytes, of the buffer to reallocate. - @param OldBuffer The buffer to copy to the allocated buffer. This is an optional + @param OldBuffer The buffer to copy to the allocated buffer. This is an optional parameter that may be NULL. @return A pointer to the allocated buffer or NULL if allocation fails. @@ -878,7 +878,7 @@ AllocateReservedCopyPool ( **/ VOID * InternalReallocatePool ( - IN EFI_MEMORY_TYPE PoolType, + IN EFI_MEMORY_TYPE PoolType, IN UINTN OldSize, IN UINTN NewSize, IN VOID *OldBuffer OPTIONAL @@ -898,18 +898,18 @@ InternalReallocatePool ( Reallocates a buffer of type EfiBootServicesData. Allocates and zeros the number bytes specified by NewSize from memory of type - EfiBootServicesData. If OldBuffer is not NULL, then the smaller of OldSize and - NewSize bytes are copied from OldBuffer to the newly allocated buffer, and - OldBuffer is freed. A pointer to the newly allocated buffer is returned. - If NewSize is 0, then a valid buffer of 0 size is returned. If there is not + EfiBootServicesData. If OldBuffer is not NULL, then the smaller of OldSize and + NewSize bytes are copied from OldBuffer to the newly allocated buffer, and + OldBuffer is freed. A pointer to the newly allocated buffer is returned. + If NewSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. - + If the allocation of the new buffer is successful and the smaller of NewSize and OldSize is greater than (MAX_ADDRESS - OldBuffer + 1), then ASSERT(). @param OldSize The size, in bytes, of OldBuffer. @param NewSize The size, in bytes, of the buffer to reallocate. - @param OldBuffer The buffer to copy to the allocated buffer. This is an optional + @param OldBuffer The buffer to copy to the allocated buffer. This is an optional parameter that may be NULL. @return A pointer to the allocated buffer or NULL if allocation fails. @@ -943,10 +943,10 @@ ReallocatePool ( Reallocates a buffer of type EfiRuntimeServicesData. Allocates and zeros the number bytes specified by NewSize from memory of type - EfiRuntimeServicesData. If OldBuffer is not NULL, then the smaller of OldSize and - NewSize bytes are copied from OldBuffer to the newly allocated buffer, and - OldBuffer is freed. A pointer to the newly allocated buffer is returned. - If NewSize is 0, then a valid buffer of 0 size is returned. If there is not + EfiRuntimeServicesData. If OldBuffer is not NULL, then the smaller of OldSize and + NewSize bytes are copied from OldBuffer to the newly allocated buffer, and + OldBuffer is freed. A pointer to the newly allocated buffer is returned. + If NewSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. If the allocation of the new buffer is successful and the smaller of NewSize and OldSize @@ -954,7 +954,7 @@ ReallocatePool ( @param OldSize The size, in bytes, of OldBuffer. @param NewSize The size, in bytes, of the buffer to reallocate. - @param OldBuffer The buffer to copy to the allocated buffer. This is an optional + @param OldBuffer The buffer to copy to the allocated buffer. This is an optional parameter that may be NULL. @return A pointer to the allocated buffer or NULL if allocation fails. @@ -988,10 +988,10 @@ ReallocateRuntimePool ( Reallocates a buffer of type EfiReservedMemoryType. Allocates and zeros the number bytes specified by NewSize from memory of type - EfiReservedMemoryType. If OldBuffer is not NULL, then the smaller of OldSize and - NewSize bytes are copied from OldBuffer to the newly allocated buffer, and - OldBuffer is freed. A pointer to the newly allocated buffer is returned. - If NewSize is 0, then a valid buffer of 0 size is returned. If there is not + EfiReservedMemoryType. If OldBuffer is not NULL, then the smaller of OldSize and + NewSize bytes are copied from OldBuffer to the newly allocated buffer, and + OldBuffer is freed. A pointer to the newly allocated buffer is returned. + If NewSize is 0, then a valid buffer of 0 size is returned. If there is not enough memory remaining to satisfy the request, then NULL is returned. If the allocation of the new buffer is successful and the smaller of NewSize and OldSize @@ -999,7 +999,7 @@ ReallocateRuntimePool ( @param OldSize The size, in bytes, of OldBuffer. @param NewSize The size, in bytes, of the buffer to reallocate. - @param OldBuffer The buffer to copy to the allocated buffer. This is an optional + @param OldBuffer The buffer to copy to the allocated buffer. This is an optional parameter that may be NULL. @return A pointer to the allocated buffer or NULL if allocation fails. @@ -1036,7 +1036,7 @@ ReallocateReservedPool ( Frees the buffer specified by Buffer. Buffer must have been allocated on a previous call to the pool allocation services of the Memory Allocation Library. If it is not possible to free pool resources, then this function will perform no actions. - + If Buffer was not allocated with a pool allocation function in the Memory Allocation Library, then ASSERT(). diff --git a/MdeModulePkg/Library/UefiMemoryAllocationProfileLib/UefiMemoryAllocationProfileLib.inf b/MdeModulePkg/Library/UefiMemoryAllocationProfileLib/UefiMemoryAllocationProfileLib.inf index 21b544cc10..c4954efb04 100644 --- a/MdeModulePkg/Library/UefiMemoryAllocationProfileLib/UefiMemoryAllocationProfileLib.inf +++ b/MdeModulePkg/Library/UefiMemoryAllocationProfileLib/UefiMemoryAllocationProfileLib.inf @@ -1,5 +1,5 @@ ## @file -# Instance of Memory Allocation Library using EFI Boot Services, +# Instance of Memory Allocation Library using EFI Boot Services, # with memory profile support. # # Memory Allocation Library that uses EFI Boot Services to allocate @@ -8,7 +8,7 @@ # The implementation of this instance is copied from UefiMemoryAllocationLib # in MdePkg and updated to support both MemoryAllocationLib and MemoryProfileLib. # -# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License diff --git a/MdeModulePkg/Library/VarCheckPcdLib/VarCheckPcdStructure.h b/MdeModulePkg/Library/VarCheckPcdLib/VarCheckPcdStructure.h index 8180bc5cfd..190ab720b3 100644 --- a/MdeModulePkg/Library/VarCheckPcdLib/VarCheckPcdStructure.h +++ b/MdeModulePkg/Library/VarCheckPcdLib/VarCheckPcdStructure.h @@ -1,7 +1,7 @@ /** @file Internal structure for Var Check Pcd. -Copyright (c) 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -73,4 +73,4 @@ typedef struct { #pragma pack () -#endif \ No newline at end of file +#endif diff --git a/MdeModulePkg/Logo/LogoExtra.uni b/MdeModulePkg/Logo/LogoExtra.uni index ec22a4d5ff..aada312aec 100644 --- a/MdeModulePkg/Logo/LogoExtra.uni +++ b/MdeModulePkg/Logo/LogoExtra.uni @@ -1,7 +1,7 @@ // /** @file // Logo Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Logo Image File" diff --git a/MdeModulePkg/MdeModulePkg.dec b/MdeModulePkg/MdeModulePkg.dec index f3d26475df..6a6d9660ed 100644 --- a/MdeModulePkg/MdeModulePkg.dec +++ b/MdeModulePkg/MdeModulePkg.dec @@ -1906,7 +1906,7 @@ gEfiMdeModulePkgTokenSpaceGuid.PcdAcpiS3Enable|TRUE|BOOLEAN|0x01100000 ## Specify memory size for boot script executor stack usage in S3 phase. - # The default size 32K. When changing the value make sure the memory size is large enough + # The default size 32K. When changing the value make sure the memory size is large enough # to meet boot script executor requirement in the S3 phase. # @Prompt Reserved S3 Boot Script Stack ACPI Memory Size gEfiMdeModulePkgTokenSpaceGuid.PcdS3BootScriptStackSize|0x8000|UINT32|0x02000000 diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc index 09b0f9f13d..bb7744894a 100644 --- a/MdeModulePkg/MdeModulePkg.dsc +++ b/MdeModulePkg/MdeModulePkg.dsc @@ -86,8 +86,8 @@ # Misc # DebugLib|MdePkg/Library/BaseDebugLibNull/BaseDebugLibNull.inf - DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf - ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf + DebugPrintErrorLevelLib|MdePkg/Library/BaseDebugPrintErrorLevelLib/BaseDebugPrintErrorLevelLib.inf + ReportStatusCodeLib|MdePkg/Library/BaseReportStatusCodeLibNull/BaseReportStatusCodeLibNull.inf PeCoffExtraActionLib|MdePkg/Library/BasePeCoffExtraActionLibNull/BasePeCoffExtraActionLibNull.inf PerformanceLib|MdePkg/Library/BasePerformanceLibNull/BasePerformanceLibNull.inf DebugAgentLib|MdeModulePkg/Library/DebugAgentLibNull/DebugAgentLibNull.inf @@ -146,7 +146,7 @@ HobLib|MdePkg/Library/DxeHobLib/DxeHobLib.inf MemoryAllocationLib|MdeModulePkg/Library/PiSmmCoreMemoryAllocationLib/PiSmmCoreMemoryAllocationLib.inf SmmServicesTableLib|MdeModulePkg/Library/PiSmmCoreSmmServicesTableLib/PiSmmCoreSmmServicesTableLib.inf - SmmCorePlatformHookLib|MdeModulePkg/Library/SmmCorePlatformHookLibNull/SmmCorePlatformHookLibNull.inf + SmmCorePlatformHookLib|MdeModulePkg/Library/SmmCorePlatformHookLibNull/SmmCorePlatformHookLibNull.inf SmmMemLib|MdePkg/Library/SmmMemLib/SmmMemLib.inf [LibraryClasses.common.DXE_SMM_DRIVER] @@ -430,7 +430,7 @@ MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemDxe.inf MdeModulePkg/Universal/EsrtDxe/EsrtDxe.inf MdeModulePkg/Universal/EsrtFmpDxe/EsrtFmpDxe.inf - + MdeModulePkg/Universal/PropertiesTableAttributesDxe/PropertiesTableAttributesDxe.inf MdeModulePkg/Universal/FileExplorerDxe/FileExplorerDxe.inf { @@ -461,7 +461,7 @@ [Components.IA32, Components.X64, Components.Ebc] MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf - + [Components.IA32, Components.X64] MdeModulePkg/Application/SmiHandlerProfileInfo/SmiHandlerProfileInfo.inf MdeModulePkg/Core/PiSmmCore/PiSmmIpl.inf diff --git a/MdeModulePkg/MdeModulePkgExtra.uni b/MdeModulePkg/MdeModulePkgExtra.uni index 82efdaf658..428954fc1c 100644 --- a/MdeModulePkg/MdeModulePkgExtra.uni +++ b/MdeModulePkg/MdeModulePkgExtra.uni @@ -1,7 +1,7 @@ // /** @file // MdeModule Package Localized Strings and Content. // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials are licensed and made available under // the terms and conditions of the BSD License that accompanies this distribution. @@ -13,7 +13,7 @@ // // **/ -#string STR_PROPERTIES_PACKAGE_NAME -#language en-US +#string STR_PROPERTIES_PACKAGE_NAME +#language en-US "MdeModule package" diff --git a/MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatform.c b/MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatform.c index 8f335bde0d..c6238fd38e 100644 --- a/MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatform.c +++ b/MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatform.c @@ -10,7 +10,7 @@ THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -**/ +**/ #include diff --git a/MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatform.uni b/MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatform.uni index 68b3e48e20..f5aa4f4bb9 100644 --- a/MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatform.uni +++ b/MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatform.uni @@ -3,13 +3,13 @@ // // Sample ACPI Platform Driver // -// Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf b/MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf index 34b1600171..f4860cdc0b 100644 --- a/MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf +++ b/MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformDxe.inf @@ -1,15 +1,15 @@ ## @file # Sample ACPI Platform Driver # -# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# +# ## [Defines] diff --git a/MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformExtra.uni b/MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformExtra.uni index e976c59983..9e8d6ea5d0 100644 --- a/MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformExtra.uni +++ b/MdeModulePkg/Universal/Acpi/AcpiPlatformDxe/AcpiPlatformExtra.uni @@ -1,7 +1,7 @@ // /** @file // AcpiPlatform Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "ACPI Platform Sample DXE Driver" diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiSdt.c b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiSdt.c index 2b3bb35625..aae529ea0a 100644 --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiSdt.c +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiSdt.c @@ -1,7 +1,7 @@ /** @file ACPI Sdt Protocol Driver - Copyright (c) 2010 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -196,7 +196,7 @@ SdtNotifyAcpiList ( /** Returns a requested ACPI table. - + The GetAcpiTable() function returns a pointer to a buffer containing the ACPI table associated with the Index that was input. The following structures are not considered elements in the list of ACPI tables: @@ -206,19 +206,19 @@ SdtNotifyAcpiList ( Version is updated with a bit map containing all the versions of ACPI of which the table is a member. For tables installed via the EFI_ACPI_TABLE_PROTOCOL.InstallAcpiTable() interface, the function returns the value of EFI_ACPI_STD_PROTOCOL.AcpiVersion. - + @param[in] Index The zero-based index of the table to retrieve. @param[out] Table Pointer for returning the table buffer. @param[out] Version On return, updated with the ACPI versions to which this table belongs. Type EFI_ACPI_TABLE_VERSION is defined in "Related Definitions" in the - EFI_ACPI_SDT_PROTOCOL. + EFI_ACPI_SDT_PROTOCOL. @param[out] TableKey On return, points to the table key for the specified ACPI system definition table. This is identical to the table key used in the EFI_ACPI_TABLE_PROTOCOL. The TableKey can be passed to EFI_ACPI_TABLE_PROTOCOL.UninstallAcpiTable() to uninstall the table. @retval EFI_SUCCESS The function completed successfully. - @retval EFI_NOT_FOUND The requested index is too large and a table was not found. -**/ + @retval EFI_NOT_FOUND The requested index is too large and a table was not found. +**/ EFI_STATUS EFIAPI GetAcpiTable2 ( @@ -278,9 +278,9 @@ GetAcpiTable2 ( /** Register a callback when an ACPI table is installed. - + This function registers a function which will be called whenever a new ACPI table is installed. - + @param[in] Notification Points to the callback function to be registered **/ VOID @@ -318,13 +318,13 @@ SdtRegisterNotify ( /** Unregister a callback when an ACPI table is installed. - + This function unregisters a function which will be called whenever a new ACPI table is installed. - + @param[in] Notification Points to the callback function to be unregistered. - + @retval EFI_SUCCESS Callback successfully unregistered. - @retval EFI_INVALID_PARAMETER Notification does not match a known registration function. + @retval EFI_INVALID_PARAMETER Notification does not match a known registration function. **/ EFI_STATUS SdtUnregisterNotify ( @@ -371,17 +371,17 @@ SdtUnregisterNotify ( /** Register or unregister a callback when an ACPI table is installed. - + This function registers or unregisters a function which will be called whenever a new ACPI table is installed. - + @param[in] Register If TRUE, then the specified function will be registered. If FALSE, then the specified function will be unregistered. @param[in] Notification Points to the callback function to be registered or unregistered. - + @retval EFI_SUCCESS Callback successfully registered or unregistered. @retval EFI_INVALID_PARAMETER Notification is NULL - @retval EFI_INVALID_PARAMETER Register is FALSE and Notification does not match a known registration function. + @retval EFI_INVALID_PARAMETER Register is FALSE and Notification does not match a known registration function. **/ EFI_STATUS EFIAPI @@ -413,12 +413,12 @@ RegisterNotify ( /** Create a handle for the first ACPI opcode in an ACPI system description table. - + @param[in] TableKey The table key for the ACPI table, as returned by GetTable(). @param[out] Handle On return, points to the newly created ACPI handle. @retval EFI_SUCCESS Handle created successfully. - @retval EFI_NOT_FOUND TableKey does not refer to a valid ACPI table. + @retval EFI_NOT_FOUND TableKey does not refer to a valid ACPI table. **/ EFI_STATUS SdtOpenSdtTable ( @@ -466,12 +466,12 @@ SdtOpenSdtTable ( /** Create a handle for the first ACPI opcode in an ACPI system description table. - + @param[in] TableKey The table key for the ACPI table, as returned by GetTable(). @param[out] Handle On return, points to the newly created ACPI handle. @retval EFI_SUCCESS Handle created successfully. - @retval EFI_NOT_FOUND TableKey does not refer to a valid ACPI table. + @retval EFI_NOT_FOUND TableKey does not refer to a valid ACPI table. **/ EFI_STATUS EFIAPI @@ -489,21 +489,21 @@ OpenSdt ( /** Create a handle from an ACPI opcode - + @param[in] Buffer Points to the ACPI opcode. @param[in] BufferSize Max buffer size. @param[out] Handle Upon return, holds the handle. - + @retval EFI_SUCCESS Success @retval EFI_INVALID_PARAMETER Buffer is NULL or Handle is NULL or Buffer points to an invalid opcode. - + **/ EFI_STATUS SdtOpenEx ( IN VOID *Buffer, IN UINTN BufferSize, - OUT EFI_ACPI_HANDLE *Handle + OUT EFI_ACPI_HANDLE *Handle ) { AML_BYTE_ENCODING *AmlByteEncoding; @@ -526,7 +526,7 @@ SdtOpenEx ( // AmlHandle = AllocatePool (sizeof(*AmlHandle)); ASSERT (AmlHandle != NULL); - + AmlHandle->Signature = EFI_AML_HANDLE_SIGNATURE; AmlHandle->Buffer = Buffer; AmlHandle->AmlByteEncoding = AmlByteEncoding; @@ -545,20 +545,20 @@ SdtOpenEx ( /** Create a handle from an ACPI opcode - + @param[in] Buffer Points to the ACPI opcode. @param[out] Handle Upon return, holds the handle. - + @retval EFI_SUCCESS Success @retval EFI_INVALID_PARAMETER Buffer is NULL or Handle is NULL or Buffer points to an invalid opcode. - + **/ EFI_STATUS EFIAPI Open ( IN VOID *Buffer, - OUT EFI_ACPI_HANDLE *Handle + OUT EFI_ACPI_HANDLE *Handle ) { EFI_STATUS Status; @@ -583,11 +583,11 @@ Open ( /** Close an ACPI handle. - + @param[in] Handle Returns the handle. - + @retval EFI_SUCCESS Success - @retval EFI_INVALID_PARAMETER Handle is NULL or does not refer to a valid ACPI object. + @retval EFI_INVALID_PARAMETER Handle is NULL or does not refer to a valid ACPI object. **/ EFI_STATUS EFIAPI @@ -628,7 +628,7 @@ Close ( /** Retrieve information about an ACPI object. - + @param[in] Handle ACPI object handle. @param[in] Index Index of the data to retrieve from the object. In general, indexes read from left-to-right in the ACPI encoding, with index 0 always being the ACPI opcode. @@ -636,7 +636,7 @@ Close ( for the specified index. @param[out] Data Upon return, points to the pointer to the data. @param[out] DataSize Upon return, points to the size of Data. - + @retval EFI_SUCCESS Success. @retval EFI_INVALID_PARAMETER Handle is NULL or does not refer to a valid ACPI object. **/ @@ -692,7 +692,7 @@ GetOption ( /** Change information about an ACPI object. - + @param[in] Handle ACPI object handle. @param[in] Index Index of the data to retrieve from the object. In general, indexes read from left-to-right in the ACPI encoding, with index 0 always being the ACPI opcode. @@ -769,14 +769,14 @@ SetOption ( /** Return the child ACPI objects. - + @param[in] ParentHandle Parent handle. @param[in, out] Handle On entry, points to the previously returned handle or NULL to start with the first handle. On return, points to the next returned ACPI handle or NULL if there are no child objects. @retval EFI_SUCCESS Success - @retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object. + @retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object. **/ EFI_STATUS EFIAPI @@ -834,14 +834,14 @@ GetChild ( /** Returns the handle of the ACPI object representing the specified ACPI path - + @param[in] HandleIn Points to the handle of the object representing the starting point for the path search. @param[in] AmlPath Points to the AML path. @param[out] HandleOut On return, points to the ACPI object which represents AcpiPath, relative to HandleIn. - + @retval EFI_SUCCESS Success - @retval EFI_INVALID_PARAMETER HandleIn is NULL or does not refer to a valid ACPI object. + @retval EFI_INVALID_PARAMETER HandleIn is NULL or does not refer to a valid ACPI object. **/ EFI_STATUS SdtFindPathFromNonRoot ( @@ -873,9 +873,9 @@ SdtFindPathFromNonRoot ( /** Duplicate AML handle. - + @param[in] AmlHandle Handle to be duplicated. - + @return Duplicated AML handle. **/ EFI_AML_HANDLE * @@ -894,14 +894,14 @@ SdtDuplicateHandle ( /** Returns the handle of the ACPI object representing the specified ACPI path - + @param[in] HandleIn Points to the handle of the object representing the starting point for the path search. @param[in] AmlPath Points to the AML path. @param[out] HandleOut On return, points to the ACPI object which represents AcpiPath, relative to HandleIn. - + @retval EFI_SUCCESS Success - @retval EFI_INVALID_PARAMETER HandleIn is NULL or does not refer to a valid ACPI object. + @retval EFI_INVALID_PARAMETER HandleIn is NULL or does not refer to a valid ACPI object. **/ EFI_STATUS SdtFindPathFromRoot ( @@ -977,14 +977,14 @@ SdtFindPathFromRoot ( /** Returns the handle of the ACPI object representing the specified ACPI path - + @param[in] HandleIn Points to the handle of the object representing the starting point for the path search. @param[in] AcpiPath Points to the ACPI path, which conforms to the ACPI encoded path format. @param[out] HandleOut On return, points to the ACPI object which represents AcpiPath, relative to HandleIn. - + @retval EFI_SUCCESS Success - @retval EFI_INVALID_PARAMETER HandleIn is NULL or does not refer to a valid ACPI object. + @retval EFI_INVALID_PARAMETER HandleIn is NULL or does not refer to a valid ACPI object. **/ EFI_STATUS EFIAPI @@ -1006,7 +1006,7 @@ FindPath ( } AmlHandle = (EFI_AML_HANDLE *)HandleIn; - + // // Convert ASL path to AML path // diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiSdt.h b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiSdt.h index f11bdee9ac..9e39c22e23 100644 --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiSdt.h +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiSdt.h @@ -1,7 +1,7 @@ /** @file ACPI Sdt Protocol Driver - Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.
+ Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -130,7 +130,7 @@ typedef UINT32 AML_OP_ATTRIBUTE; #define AML_HAS_CHILD_OBJ 0x4 // it is ACPI attribute - if OpCode has Child Object. #define AML_IN_NAMESPACE 0x10000 // It is UEFI SDT attribute - if OpCode will be in NameSpace // NOTE; Not all OBJECT will be in NameSpace - // For example, BankField | CreateBitField | CreateByteField | CreateDWordField | + // For example, BankField | CreateBitField | CreateByteField | CreateDWordField | // CreateField | CreateQWordField | CreateWordField | Field | IndexField. struct _AML_BYTE_ENCODING { @@ -147,7 +147,7 @@ struct _AML_BYTE_ENCODING { /** Returns a requested ACPI table. - + The GetAcpiTable() function returns a pointer to a buffer containing the ACPI table associated with the Index that was input. The following structures are not considered elements in the list of ACPI tables: @@ -157,20 +157,20 @@ struct _AML_BYTE_ENCODING { Version is updated with a bit map containing all the versions of ACPI of which the table is a member. For tables installed via the EFI_ACPI_TABLE_PROTOCOL.InstallAcpiTable() interface, the function returns the value of EFI_ACPI_STD_PROTOCOL.AcpiVersion. - + @param[in] Index The zero-based index of the table to retrieve. @param[out] Table Pointer for returning the table buffer. @param[out] Version On return, updated with the ACPI versions to which this table belongs. Type EFI_ACPI_TABLE_VERSION is defined in "Related Definitions" in the - EFI_ACPI_SDT_PROTOCOL. + EFI_ACPI_SDT_PROTOCOL. @param[out] TableKey On return, points to the table key for the specified ACPI system definition table. This is identical to the table key used in the EFI_ACPI_TABLE_PROTOCOL. The TableKey can be passed to EFI_ACPI_TABLE_PROTOCOL.UninstallAcpiTable() to uninstall the table. - + @retval EFI_SUCCESS The function completed successfully. - @retval EFI_NOT_FOUND The requested index is too large and a table was not found. -**/ + @retval EFI_NOT_FOUND The requested index is too large and a table was not found. +**/ EFI_STATUS EFIAPI GetAcpiTable2 ( @@ -182,17 +182,17 @@ GetAcpiTable2 ( /** Register or unregister a callback when an ACPI table is installed. - + This function registers or unregisters a function which will be called whenever a new ACPI table is installed. - + @param[in] Register If TRUE, then the specified function will be registered. If FALSE, then the specified function will be unregistered. @param[in] Notification Points to the callback function to be registered or unregistered. - + @retval EFI_SUCCESS Callback successfully registered or unregistered. @retval EFI_INVALID_PARAMETER Notification is NULL - @retval EFI_INVALID_PARAMETER Register is FALSE and Notification does not match a known registration function. + @retval EFI_INVALID_PARAMETER Register is FALSE and Notification does not match a known registration function. **/ EFI_STATUS EFIAPI @@ -203,12 +203,12 @@ RegisterNotify ( /** Create a handle for the first ACPI opcode in an ACPI system description table. - + @param[in] TableKey The table key for the ACPI table, as returned by GetTable(). @param[out] Handle On return, points to the newly created ACPI handle. @retval EFI_SUCCESS Handle created successfully. - @retval EFI_NOT_FOUND TableKey does not refer to a valid ACPI table. + @retval EFI_NOT_FOUND TableKey does not refer to a valid ACPI table. **/ EFI_STATUS EFIAPI @@ -219,29 +219,29 @@ OpenSdt ( /** Create a handle from an ACPI opcode - + @param[in] Buffer Points to the ACPI opcode. @param[out] Handle Upon return, holds the handle. - + @retval EFI_SUCCESS Success @retval EFI_INVALID_PARAMETER Buffer is NULL or Handle is NULL or Buffer points to an invalid opcode. - + **/ EFI_STATUS EFIAPI Open ( IN VOID *Buffer, - OUT EFI_ACPI_HANDLE *Handle + OUT EFI_ACPI_HANDLE *Handle ); /** Close an ACPI handle. - + @param[in] Handle Returns the handle. - + @retval EFI_SUCCESS Success - @retval EFI_INVALID_PARAMETER Handle is NULL or does not refer to a valid ACPI object. + @retval EFI_INVALID_PARAMETER Handle is NULL or does not refer to a valid ACPI object. **/ EFI_STATUS EFIAPI @@ -251,7 +251,7 @@ Close ( /** Retrieve information about an ACPI object. - + @param[in] Handle ACPI object handle. @param[in] Index Index of the data to retrieve from the object. In general, indexes read from left-to-right in the ACPI encoding, with index 0 always being the ACPI opcode. @@ -259,7 +259,7 @@ Close ( for the specified index. @param[out] Data Upon return, points to the pointer to the data. @param[out] DataSize Upon return, points to the size of Data. - + @retval EFI_SUCCESS Success. @retval EFI_INVALID_PARAMETER Handle is NULL or does not refer to a valid ACPI object. **/ @@ -275,7 +275,7 @@ GetOption ( /** Change information about an ACPI object. - + @param[in] Handle ACPI object handle. @param[in] Index Index of the data to retrieve from the object. In general, indexes read from left-to-right in the ACPI encoding, with index 0 always being the ACPI opcode. @@ -299,14 +299,14 @@ SetOption ( /** Return the child ACPI objects. - + @param[in] ParentHandle Parent handle. @param[in, out] Handle On entry, points to the previously returned handle or NULL to start with the first handle. On return, points to the next returned ACPI handle or NULL if there are no child objects. @retval EFI_SUCCESS Success - @retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object. + @retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object. **/ EFI_STATUS EFIAPI @@ -317,14 +317,14 @@ GetChild ( /** Returns the handle of the ACPI object representing the specified ACPI path - + @param[in] HandleIn Points to the handle of the object representing the starting point for the path search. @param[in] AcpiPath Points to the ACPI path, which conforms to the ACPI encoded path format. @param[out] HandleOut On return, points to the ACPI object which represents AcpiPath, relative to HandleIn. - + @retval EFI_SUCCESS Success - @retval EFI_INVALID_PARAMETER HandleIn is NULL or does not refer to a valid ACPI object. + @retval EFI_INVALID_PARAMETER HandleIn is NULL or does not refer to a valid ACPI object. **/ EFI_STATUS EFIAPI @@ -340,21 +340,21 @@ FindPath ( /** Create a handle from an ACPI opcode - + @param[in] Buffer Points to the ACPI opcode. @param[in] BufferSize Max buffer size. @param[out] Handle Upon return, holds the handle. - + @retval EFI_SUCCESS Success @retval EFI_INVALID_PARAMETER Buffer is NULL or Handle is NULL or Buffer points to an invalid opcode. - + **/ EFI_STATUS SdtOpenEx ( IN VOID *Buffer, IN UINTN BufferSize, - OUT EFI_ACPI_HANDLE *Handle + OUT EFI_ACPI_HANDLE *Handle ); // @@ -365,8 +365,8 @@ SdtOpenEx ( Get AML NameString size. @param[in] Buffer AML NameString. - @param[out] BufferSize AML NameString size - + @param[out] BufferSize AML NameString size + @retval EFI_SUCCESS Success. @retval EFI_INVALID_PARAMETER Buffer does not refer to a valid AML NameString. **/ @@ -416,11 +416,11 @@ AmlSearchByOpByte ( /** Return object size. - + @param[in] AmlByteEncoding AML Byte Encoding. @param[in] Buffer AML object buffer. @param[in] MaxBufferSize AML object buffer MAX size. The parser can not parse any data exceed this region. - + @return Size of the object. **/ UINTN @@ -432,9 +432,9 @@ AmlGetObjectSize ( /** Return object name. - + @param[in] AmlHandle AML handle. - + @return Name of the object. **/ CHAR8 * @@ -444,7 +444,7 @@ AmlGetObjectName ( /** Retrieve information according to AmlHandle - + @param[in] AmlHandle AML handle. @param[in] Index Index of the data to retrieve from the object. In general, indexes read from left-to-right in the ACPI encoding, with index 0 always being the ACPI opcode. @@ -452,7 +452,7 @@ AmlGetObjectName ( for the specified index. @param[out] Data Upon return, points to the pointer to the data. @param[out] DataSize Upon return, points to the size of Data. - + @retval EFI_SUCCESS Success. @retval EFI_INVALID_PARAMETER AmlHandle does not refer to a valid ACPI object. **/ @@ -467,10 +467,10 @@ AmlParseOptionHandleCommon ( /** Return offset of last option. - + @param[in] AmlHandle AML Handle. @param[out] Buffer Upon return, points to the offset after last option. - + @retval EFI_SUCCESS Success. @retval EFI_INVALID_PARAMETER AmlHandle does not refer to a valid ACPI object. **/ @@ -482,14 +482,14 @@ AmlGetOffsetAfterLastOption ( /** Return the child ACPI objects from Root Handle. - + @param[in] AmlParentHandle Parent handle. It is Root Handle. @param[in] AmlHandle The previously returned handle or NULL to start with the first handle. @param[out] Buffer On return, points to the next returned ACPI handle or NULL if there are no child objects. @retval EFI_SUCCESS Success - @retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object. + @retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object. **/ EFI_STATUS AmlGetChildFromRoot ( @@ -500,14 +500,14 @@ AmlGetChildFromRoot ( /** Return the child ACPI objects from Non-Root Handle. - + @param[in] AmlParentHandle Parent handle. It is Non-Root Handle. @param[in] AmlHandle The previously returned handle or NULL to start with the first handle. @param[out] Buffer On return, points to the next returned ACPI handle or NULL if there are no child objects. @retval EFI_SUCCESS Success - @retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object. + @retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object. **/ EFI_STATUS AmlGetChildFromNonRoot ( @@ -531,16 +531,16 @@ AmlNameFromAslName ( /** Returns the handle of the ACPI object representing the specified ACPI AML path - + @param[in] AmlHandle Points to the handle of the object representing the starting point for the path search. @param[in] AmlPath Points to the ACPI AML path. @param[out] Buffer On return, points to the ACPI object which represents AcpiPath, relative to HandleIn. @param[in] FromRoot TRUE means to find AML path from \ (Root) Node. FALSE means to find AML path from this Node (The HandleIn). - + @retval EFI_SUCCESS Success - @retval EFI_INVALID_PARAMETER HandleIn does not refer to a valid ACPI object. + @retval EFI_INVALID_PARAMETER HandleIn does not refer to a valid ACPI object. **/ EFI_STATUS AmlFindPath ( @@ -574,7 +574,7 @@ AmlPrintNameSeg ( Check if it is AML Root name @param[in] Buffer AML path. - + @retval TRUE AML path is root. @retval FALSE AML path is not root. **/ diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTable.h b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTable.h index d6d81ae04d..a2b419d45a 100644 --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTable.h +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTable.h @@ -1,7 +1,7 @@ /** @file ACPI Table Protocol Driver - Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -150,14 +150,14 @@ AcpiTableAcpiTableConstructor ( /** Entry point of the ACPI table driver. - Creates and initializes an instance of the ACPI Table + Creates and initializes an instance of the ACPI Table Protocol and installs it on a new handle. @param ImageHandle A handle for the image that is initializing this driver @param SystemTable A pointer to the EFI system table @return EFI_SUCCESS Driver initialized successfully - @return EFI_LOAD_ERROR Failed to Initialize or has been loaded + @return EFI_LOAD_ERROR Failed to Initialize or has been loaded @return EFI_OUT_OF_RESOURCES Could not allocate needed resources **/ @@ -176,7 +176,7 @@ InitializeAcpiTableDxe ( @param[in] Handle Table to find. @param[in] TableList Table list to search - @param[out] Table Pointer to table found. + @param[out] Table Pointer to table found. @retval EFI_SUCCESS The function completed successfully. @retval EFI_NOT_FOUND No table found matching the handle specified. diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf index ffb8d08f98..32c66785d5 100644 --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.inf @@ -1,16 +1,16 @@ ## @file # ACPI Table Protocol Driver # -# This driver initializes ACPI tables (Rsdp, Rsdt and Xsdt) and produces UEFI/PI +# This driver initializes ACPI tables (Rsdp, Rsdt and Xsdt) and produces UEFI/PI # services to install/uninstall/manage ACPI tables. # -# Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# Copyright (c) 2016, Linaro Ltd. All rights reserved.
# This program and the accompanying materials are # licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.uni b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.uni index b8d82f30fe..60fbc2f986 100644 --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.uni +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxe.uni @@ -1,13 +1,13 @@ // /** @file // AcpiTableDxe Module Localized Abstract and Description Content // -// Copyright (c) 2012 - 2016, Intel Corporation. All rights reserved.
+// Copyright (c) 2012 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials are // licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxeExtra.uni b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxeExtra.uni index ea2b025a9d..ebd6aa5a90 100644 --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxeExtra.uni +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // AcpiTableDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials are // licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "ACPI Table DXE Driver" diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c index 05340f80db..429ff5744f 100644 --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AcpiTableProtocol.c @@ -1,7 +1,7 @@ /** @file ACPI Table Protocol Implementation - Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
Copyright (c) 2016, Linaro Ltd. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -18,9 +18,9 @@ // #include "AcpiTable.h" // -// The maximum number of tables that pre-allocated. +// The maximum number of tables that pre-allocated. // -UINTN mEfiAcpiMaxNumTables = EFI_ACPI_MAX_NUM_TABLES; +UINTN mEfiAcpiMaxNumTables = EFI_ACPI_MAX_NUM_TABLES; // // Allocation strategy to use for AllocatePages (). @@ -196,7 +196,7 @@ PublishTables ( @param TableKey Reurns a key to refer to the ACPI table. @return EFI_SUCCESS The table was successfully inserted. - @return EFI_INVALID_PARAMETER Either AcpiTableBuffer is NULL, TableKey is NULL, or AcpiTableBufferSize + @return EFI_INVALID_PARAMETER Either AcpiTableBuffer is NULL, TableKey is NULL, or AcpiTableBufferSize and the size field embedded in the ACPI table pointed to by AcpiTableBuffer are not in sync. @return EFI_OUT_OF_RESOURCES Insufficient resources exist to complete the request. @@ -253,7 +253,7 @@ InstallAcpiTable ( ); } FreePool (AcpiTableBufferConst); - + // // Add a new table successfully, notify registed callback // @@ -342,8 +342,8 @@ ReallocateAcpiTableBuffer ( EFI_ACPI_TABLE_INSTANCE TempPrivateData; EFI_STATUS Status; UINT64 CurrentData; - - CopyMem (&TempPrivateData, AcpiTableInstance, sizeof (EFI_ACPI_TABLE_INSTANCE)); + + CopyMem (&TempPrivateData, AcpiTableInstance, sizeof (EFI_ACPI_TABLE_INSTANCE)); // // Enlarge the max table number from mEfiAcpiMaxNumTables to mEfiAcpiMaxNumTables + EFI_ACPI_MAX_NUM_TABLES // @@ -384,7 +384,7 @@ ReallocateAcpiTableBuffer ( Pointer = (UINT8 *) (UINTN) PageAddress; ZeroMem (Pointer, TotalSize); - + AcpiTableInstance->Rsdt1 = (EFI_ACPI_DESCRIPTION_HEADER *) Pointer; if ((PcdGet32 (PcdAcpiExposedTableVersions) & EFI_ACPI_TABLE_VERSION_1_0B) != 0) { Pointer += (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + NewMaxTableNumber * sizeof (UINT32)); @@ -404,14 +404,14 @@ ReallocateAcpiTableBuffer ( CopyMem (&AcpiTableInstance->Rsdp3->XsdtAddress, &CurrentData, sizeof (UINT64)); // - // copy the original Rsdt1, Rsdt3 and Xsdt structure to new buffer + // copy the original Rsdt1, Rsdt3 and Xsdt structure to new buffer // if ((PcdGet32 (PcdAcpiExposedTableVersions) & EFI_ACPI_TABLE_VERSION_1_0B) != 0) { - CopyMem (AcpiTableInstance->Rsdt1, TempPrivateData.Rsdt1, (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + mEfiAcpiMaxNumTables * sizeof (UINT32))); - CopyMem (AcpiTableInstance->Rsdt3, TempPrivateData.Rsdt3, (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + mEfiAcpiMaxNumTables * sizeof (UINT32))); + CopyMem (AcpiTableInstance->Rsdt1, TempPrivateData.Rsdt1, (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + mEfiAcpiMaxNumTables * sizeof (UINT32))); + CopyMem (AcpiTableInstance->Rsdt3, TempPrivateData.Rsdt3, (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + mEfiAcpiMaxNumTables * sizeof (UINT32))); } CopyMem (AcpiTableInstance->Xsdt, TempPrivateData.Xsdt, (sizeof (EFI_ACPI_DESCRIPTION_HEADER) + mEfiAcpiMaxNumTables * sizeof (UINT64))); - + // // Calculate orignal ACPI table buffer size // @@ -426,10 +426,10 @@ ReallocateAcpiTableBuffer ( } gBS->FreePages ((EFI_PHYSICAL_ADDRESS)(UINTN)TempPrivateData.Rsdt1, EFI_SIZE_TO_PAGES (TotalSize)); - + // // Update the Max ACPI table number - // + // mEfiAcpiMaxNumTables = NewMaxTableNumber; return EFI_SUCCESS; } @@ -508,7 +508,7 @@ AddTableToList ( // // Allocation memory type depends on the type of the table // - if ((CurrentTableSignature == EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE) || + if ((CurrentTableSignature == EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE_SIGNATURE) || (CurrentTableSignature == EFI_ACPI_4_0_UEFI_ACPI_DATA_TABLE_SIGNATURE)) { // // Allocate memory for the FACS. This structure must be aligned @@ -634,7 +634,7 @@ AddTableToList ( // // Update pointers in FADT. If tables don't exist this will put NULL pointers there. - // Note: If the FIRMWARE_CTRL is non-zero, then X_FIRMWARE_CTRL must be zero, and + // Note: If the FIRMWARE_CTRL is non-zero, then X_FIRMWARE_CTRL must be zero, and // vice-versa. // if ((UINT64)(UINTN)AcpiTableInstance->Facs3 < BASE_4GB) { @@ -682,7 +682,7 @@ AddTableToList ( &AcpiTableInstance->Fadt3->Header.OemId, 6 ); - + if ((PcdGet32 (PcdAcpiExposedTableVersions) & EFI_ACPI_TABLE_VERSION_1_0B) != 0) { // // RSDT OEM information is updated to match FADT OEM information. @@ -714,7 +714,7 @@ AddTableToList ( sizeof (UINT64) ); AcpiTableInstance->Xsdt->OemRevision = AcpiTableInstance->Fadt3->Header.OemRevision; - } + } // // Checksum the table // @@ -782,7 +782,7 @@ AddTableToList ( // if (AcpiTableInstance->Fadt3 != NULL) { // - // Note: If the FIRMWARE_CTRL is non-zero, then X_FIRMWARE_CTRL must be zero, and + // Note: If the FIRMWARE_CTRL is non-zero, then X_FIRMWARE_CTRL must be zero, and // vice-versa. // if ((UINT64)(UINTN)AcpiTableInstance->Facs3 < BASE_4GB) { @@ -854,7 +854,7 @@ AddTableToList ( ); } } - + if ((Version & ACPI_TABLE_VERSION_GTE_2_0) != 0) { // // Save a pointer to the table @@ -900,7 +900,7 @@ AddTableToList ( Checksum) ); } - } + } // // Checksum the table // @@ -1050,7 +1050,7 @@ AddTableToList ( @param Handle Table to find. @param TableList Table list to search - @param Table Pointer to table found. + @param Table Pointer to table found. @return EFI_SUCCESS The function completed successfully. @return EFI_NOT_FOUND No table found matching the handle specified. @@ -1100,7 +1100,7 @@ FindTableByHandle ( For Acpi 1.0 tables, pass in the Rsdt. For Acpi 2.0 tables, pass in both Rsdt and Xsdt. - @param Table Pointer to table found. + @param Table Pointer to table found. @param NumberOfTableEntries Current number of table entries in the RSDT/XSDT @param Rsdt Pointer to the RSDT to remove from @param Xsdt Pointer to the Xsdt to remove from @@ -1320,7 +1320,7 @@ DeleteTable ( // Remove this version from the table // Table->Version = Table->Version &~(Version & ACPI_TABLE_VERSION_GTE_2_0); - + // // Remove from Rsdt and Xsdt. We don't care about the return value // because it is acceptable for the table to not exist in Rsdt/Xsdt. @@ -1334,7 +1334,7 @@ DeleteTable ( AcpiTableInstance->Xsdt ); } - } + } // // Free the table, clean up any dependent tables and our private data pointers. // @@ -1392,7 +1392,7 @@ DeleteTable ( Checksum) ); } - } + } break; case EFI_ACPI_3_0_DIFFERENTIATED_SYSTEM_DESCRIPTION_TABLE_SIGNATURE: @@ -1417,7 +1417,7 @@ DeleteTable ( } } - + if ((Version & ACPI_TABLE_VERSION_GTE_2_0) != 0) { AcpiTableInstance->Dsdt3 = NULL; @@ -1640,7 +1640,7 @@ ChecksumCommonTables ( OFFSET_OF (EFI_ACPI_DESCRIPTION_HEADER, Checksum) ); - + return EFI_SUCCESS; } diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/Aml.c b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/Aml.c index 30f71bdda4..6ff11d8b0b 100644 --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/Aml.c +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/Aml.c @@ -1,7 +1,7 @@ /** @file ACPI Sdt Protocol Driver - Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.
+ Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -209,7 +209,7 @@ AmlSearchByOpByte ( return &mAmlByteEncoding[Index]; } } - + return NULL; } @@ -250,7 +250,7 @@ AmlGetPkgLength ( UINT8 ByteCount; UINTN RealLength; UINTN Offset; - + // // // @@ -265,8 +265,8 @@ AmlGetPkgLength ( // package length value. The next ByteData will become the next least significant 8 bits // of the resulting value and so on, up to 3 ByteData bytes. Thus, the maximum package // length is 2**28. - // - + // + LeadByte = *Buffer; ByteCount = (UINT8)((LeadByte >> 6) & 0x03); Offset = ByteCount + 1; @@ -295,7 +295,7 @@ AmlGetPkgLength ( ASSERT (0); break; } - + *PkgLength = RealLength; return Offset; } diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AmlChild.c b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AmlChild.c index c7e8af96d3..28d820461f 100644 --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AmlChild.c +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AmlChild.c @@ -1,7 +1,7 @@ /** @file ACPI Sdt Protocol Driver - Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.
+ Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -16,14 +16,14 @@ /** Return the child objects buffer from AML Handle's buffer. - + @param[in] AmlParentHandle Parent handle. @param[in] CurrentBuffer The current child buffer. @param[out] Buffer On return, points to the next returned child buffer or NULL if there are no child buffer. @retval EFI_SUCCESS Success - @retval EFI_INVALID_PARAMETER AmlParentHandle does not refer to a valid ACPI object. + @retval EFI_INVALID_PARAMETER AmlParentHandle does not refer to a valid ACPI object. **/ EFI_STATUS AmlGetChildFromObjectBuffer ( @@ -72,14 +72,14 @@ AmlGetChildFromObjectBuffer ( /** Return the child ACPI objects from Root Handle. - + @param[in] AmlParentHandle Parent handle. It is Root Handle. @param[in] AmlHandle The previously returned handle or NULL to start with the first handle. @param[out] Buffer On return, points to the next returned ACPI handle or NULL if there are no child objects. @retval EFI_SUCCESS Success - @retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object. + @retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object. **/ EFI_STATUS AmlGetChildFromRoot ( @@ -104,14 +104,14 @@ AmlGetChildFromRoot ( /** Return the child objects buffer from AML Handle's option list. - + @param[in] AmlParentHandle Parent handle. @param[in] AmlHandle The current child handle. @param[out] Buffer On return, points to the next returned child buffer or NULL if there are no child buffer. @retval EFI_SUCCESS Success - @retval EFI_INVALID_PARAMETER AmlParentHandle does not refer to a valid ACPI object. + @retval EFI_INVALID_PARAMETER AmlParentHandle does not refer to a valid ACPI object. **/ EFI_STATUS AmlGetChildFromOptionList ( @@ -170,14 +170,14 @@ AmlGetChildFromOptionList ( /** Return the child objects buffer from AML Handle's object child list. - + @param[in] AmlParentHandle Parent handle. @param[in] AmlHandle The current child handle. @param[out] Buffer On return, points to the next returned child buffer or NULL if there are no child buffer. @retval EFI_SUCCESS Success - @retval EFI_INVALID_PARAMETER AmlParentHandle does not refer to a valid ACPI object. + @retval EFI_INVALID_PARAMETER AmlParentHandle does not refer to a valid ACPI object. **/ EFI_STATUS AmlGetChildFromObjectChildList ( @@ -237,14 +237,14 @@ AmlGetChildFromObjectChildList ( /** Return the child ACPI objects from Non-Root Handle. - + @param[in] AmlParentHandle Parent handle. It is Non-Root Handle. @param[in] AmlHandle The previously returned handle or NULL to start with the first handle. @param[out] Buffer On return, points to the next returned ACPI handle or NULL if there are no child objects. @retval EFI_SUCCESS Success - @retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object. + @retval EFI_INVALID_PARAMETER ParentHandle is NULL or does not refer to a valid ACPI object. **/ EFI_STATUS AmlGetChildFromNonRoot ( diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AmlNamespace.c b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AmlNamespace.c index 03b7394c4d..d1372d7613 100644 --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AmlNamespace.c +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AmlNamespace.c @@ -1,7 +1,7 @@ /** @file ACPI Sdt Protocol Driver - Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.
+ Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -16,11 +16,11 @@ /** Construct node list according to the AML handle. - + @param[in] AmlHandle AML handle. @param[in] AmlRootNodeList AML root node list. @param[in] AmlParentNodeList AML parent node list. - + @retval EFI_SUCCESS Success. @retval EFI_INVALID_PARAMETER AML handle does not refer to a valid ACPI object. **/ @@ -33,11 +33,11 @@ AmlConstructNodeList ( /** Create AML Node. - + @param[in] NameSeg AML NameSeg. @param[in] Parent AML parent node list. @param[in] AmlByteEncoding AML Byte Encoding. - + @return AML Node. **/ EFI_AML_NODE_LIST * @@ -66,11 +66,11 @@ AmlCreateNode ( /** Find the AML NameSeg in the children of AmlParentNodeList. - + @param[in] NameSeg AML NameSeg. @param[in] AmlParentNodeList AML parent node list. @param[in] Create TRUE means to create node if not found. - + @return AmlChildNode whoes name is same as NameSeg. **/ EFI_AML_NODE_LIST * @@ -120,12 +120,12 @@ AmlFindNodeInThis ( /** Find the AML NameString in the children of AmlParentNodeList or AmlRootNodeList. - + @param[in] NameString AML NameString. @param[in] AmlRootNodeList AML root node list. @param[in] AmlParentNodeList AML parent node list. @param[in] Create TRUE means to create node if not found. - + @return AmlChildNode whoes name is same as NameSeg. **/ EFI_AML_NODE_LIST * @@ -166,7 +166,7 @@ AmlFindNodeInTheTree ( } else { AmlCurrentNodeList = AmlParentNodeList; } - + // // Handle name segment // @@ -206,13 +206,13 @@ AmlFindNodeInTheTree ( /** Insert the NameString to the AmlNodeList. - + @param[in] NameString AML NameString. @param[in] Buffer Buffer for the Node. @param[in] Size Size for the Node. @param[in] AmlRootNodeList AML root node list. @param[in] AmlParentNodeList AML parent node list. - + @return AmlChildNode whoes name is NameString. **/ EFI_AML_NODE_LIST * @@ -278,11 +278,11 @@ AmlInsertNodeToTree ( /** Construct child node list according to the AML handle. - + @param[in] AmlHandle AML handle. @param[in] AmlRootNodeList AML root node list. @param[in] AmlParentNodeList AML parent node list. - + @retval EFI_SUCCESS Success. @retval EFI_INVALID_PARAMETER AML handle does not refer to a valid ACPI object. **/ @@ -369,11 +369,11 @@ AmlConstructNodeListForChild ( /** Construct node list according to the AML handle. - + @param[in] AmlHandle AML handle. @param[in] AmlRootNodeList AML root node list. @param[in] AmlParentNodeList AML parent node list. - + @retval EFI_SUCCESS Success. @retval EFI_INVALID_PARAMETER AML handle does not refer to a valid ACPI object. **/ @@ -420,7 +420,7 @@ AmlConstructNodeList ( /** Destruct node list - + @param[in] AmlParentNodeList AML parent node list. **/ VOID @@ -465,7 +465,7 @@ AmlDestructNodeList ( /** Dump node list - + @param[in] AmlParentNodeList AML parent node list. @param[in] Level Output debug level. **/ @@ -502,16 +502,16 @@ AmlDumpNodeInfo ( /** Returns the handle of the ACPI object representing the specified ACPI AML path - + @param[in] AmlHandle Points to the handle of the object representing the starting point for the path search. @param[in] AmlPath Points to the ACPI AML path. @param[out] Buffer On return, points to the ACPI object which represents AcpiPath, relative to HandleIn. @param[in] FromRoot TRUE means to find AML path from \ (Root) Node. FALSE means to find AML path from this Node (The HandleIn). - + @retval EFI_SUCCESS Success - @retval EFI_INVALID_PARAMETER HandleIn does not refer to a valid ACPI object. + @retval EFI_INVALID_PARAMETER HandleIn does not refer to a valid ACPI object. **/ EFI_STATUS AmlFindPath ( diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AmlOption.c b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AmlOption.c index f4cad10af6..79aefa5221 100644 --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AmlOption.c +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AmlOption.c @@ -1,7 +1,7 @@ /** @file ACPI Sdt Protocol Driver - Copyright (c) 2010, Intel Corporation. All rights reserved.
+ Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -16,7 +16,7 @@ /** Retrieve option term according to AmlByteEncoding and Buffer. - + @param[in] AmlByteEncoding AML Byte Encoding. @param[in] Buffer AML buffer. @param[in] MaxBufferSize AML buffer MAX size. The parser can not parse any data exceed this region. @@ -25,7 +25,7 @@ for the specified index. @param[out] Data Upon return, points to the pointer to the data. @param[out] DataSize Upon return, points to the size of Data. - + @retval EFI_SUCCESS Success. @retval EFI_INVALID_PARAMETER Buffer does not refer to a valid ACPI object. **/ @@ -125,7 +125,7 @@ AmlParseOptionTerm ( /** Retrieve information according to AmlByteEncoding and Buffer. - + @param[in] AmlByteEncoding AML Byte Encoding. @param[in] Buffer AML buffer. @param[in] MaxBufferSize AML buffer MAX size. The parser can not parse any data exceed this region. @@ -135,7 +135,7 @@ AmlParseOptionTerm ( for the specified index. @param[out] Data Upon return, points to the pointer to the data. @param[out] DataSize Upon return, points to the size of Data. - + @retval EFI_SUCCESS Success. @retval EFI_INVALID_PARAMETER Buffer does not refer to a valid ACPI object. **/ @@ -286,11 +286,11 @@ AmlParseOptionCommon ( /** Return object size. - + @param[in] AmlByteEncoding AML Byte Encoding. @param[in] Buffer AML object buffer. @param[in] MaxBufferSize AML object buffer MAX size. The parser can not parse any data exceed this region. - + @return Size of the object. **/ UINTN @@ -321,9 +321,9 @@ AmlGetObjectSize ( /** Return object name. - + @param[in] AmlHandle AML handle. - + @return Name of the object. **/ CHAR8 * @@ -374,10 +374,10 @@ AmlGetObjectName ( /** Return offset of last option. - + @param[in] AmlHandle AML Handle. @param[out] Buffer Upon return, points to the offset after last option. - + @retval EFI_SUCCESS Success. @retval EFI_INVALID_PARAMETER AmlHandle does not refer to a valid ACPI object. **/ @@ -419,7 +419,7 @@ AmlGetOffsetAfterLastOption ( /** Retrieve information according to AmlHandle - + @param[in] AmlHandle AML handle. @param[in] Index Index of the data to retrieve from the object. In general, indexes read from left-to-right in the ACPI encoding, with index 0 always being the ACPI opcode. @@ -427,7 +427,7 @@ AmlGetOffsetAfterLastOption ( for the specified index. @param[out] Data Upon return, points to the pointer to the data. @param[out] DataSize Upon return, points to the size of Data. - + @retval EFI_SUCCESS Success. @retval EFI_INVALID_PARAMETER AmlHandle does not refer to a valid ACPI object. **/ diff --git a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AmlString.c b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AmlString.c index 9f47b48835..3f0ce72c81 100644 --- a/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AmlString.c +++ b/MdeModulePkg/Universal/Acpi/AcpiTableDxe/AmlString.c @@ -1,7 +1,7 @@ /** @file ACPI Sdt Protocol Driver - Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.
+ Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -18,7 +18,7 @@ Check if it is AML Root name @param[in] Buffer AML path. - + @retval TRUE AML path is root. @retval FALSE AML path is not root. **/ @@ -38,7 +38,7 @@ AmlIsRootPath ( Check if it is AML LeadName. @param[in] Ch Char. - + @retval TRUE Char is AML LeadName. @retval FALSE Char is not AML LeadName. **/ @@ -58,7 +58,7 @@ AmlIsLeadName ( Check if it is AML Name. @param[in] Ch Char. - + @retval TRUE Char is AML Name. @retval FALSE Char is not AML Name. **/ @@ -78,7 +78,7 @@ AmlIsName ( Return is buffer is AML NameSeg. @param[in] Buffer AML NameSement. - + @retval TRUE It is AML NameSegment. @retval FALSE It is not AML NameSegment. **/ @@ -103,8 +103,8 @@ AmlIsNameSeg ( Get AML NameString size. @param[in] Buffer AML NameString. - @param[out] BufferSize AML NameString size - + @param[out] BufferSize AML NameString size + @retval EFI_SUCCESS Success. @retval EFI_INVALID_PARAMETER Buffer does not refer to a valid AML NameString. **/ @@ -183,7 +183,7 @@ AmlGetNameStringSize ( Check if it is ASL LeadName. @param[in] Ch Char. - + @retval TRUE Char is ASL LeadName. @retval FALSE Char is not ASL LeadName. **/ @@ -203,7 +203,7 @@ AmlIsAslLeadName ( Check if it is ASL Name. @param[in] Ch Char. - + @retval TRUE Char is ASL Name. @retval FALSE Char is not ASL Name. **/ @@ -223,7 +223,7 @@ AmlIsAslName ( Get ASL NameString size. @param[in] Buffer ASL NameString. - + @return ASL NameString size. **/ UINTN @@ -237,7 +237,7 @@ AmlGetAslNameSegLength ( if (*Buffer == 0) { return 0; } - + Length = 0; // // 1st @@ -275,7 +275,7 @@ AmlGetAslNameSegLength ( @param[out] Root On return, points to Root char number. @param[out] Parent On return, points to Parent char number. @param[out] SegCount On return, points to Segment count. - + @return ASL NameString size. **/ UINTN @@ -532,7 +532,7 @@ AmlPrintNameString ( // SegCount = 1; } - + AmlPrintNameSeg (Buffer); Buffer += AML_NAME_SEG_SIZE; for (Index = 0; Index < SegCount - 1; Index++) { diff --git a/MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf b/MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf index bc1c10e981..080a939cc0 100644 --- a/MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf +++ b/MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.inf @@ -7,10 +7,10 @@ # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# +# ## [Defines] diff --git a/MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.uni b/MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.uni index cda6ae1f60..20ab0fbf78 100644 --- a/MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.uni +++ b/MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxe.uni @@ -3,13 +3,13 @@ // // This module installs the ACPI Boot Graphics Resource Table (BGRT). // -// Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxeExtra.uni b/MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxeExtra.uni index a64b85725d..0c48e6b440 100644 --- a/MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxeExtra.uni +++ b/MdeModulePkg/Universal/Acpi/BootGraphicsResourceTableDxe/BootGraphicsResourceTableDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // BootGraphicsResourceTableDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "ACPI Boot Graphics Resource Table DXE Driver" diff --git a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf index 0dc329ced6..ecde9bf4b5 100644 --- a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf +++ b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.inf @@ -38,11 +38,11 @@ ScriptExecute.c [Sources.X64] - X64/SetIdtEntry.c + X64/SetIdtEntry.c X64/S3Asm.nasm - + [Sources.Ia32] - IA32/SetIdtEntry.c + IA32/SetIdtEntry.c IA32/S3Asm.nasm [Packages] diff --git a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.uni b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.uni index f362a02b56..a111b9c4d8 100644 --- a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.uni +++ b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxe.uni @@ -4,13 +4,13 @@ // This is a standalone Boot Script Executor. Standalone means it does not // depends on any PEI or DXE service. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials are // licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxeExtra.uni b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxeExtra.uni index 3fd8ad68ef..7e40a8ac2a 100644 --- a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxeExtra.uni +++ b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/BootScriptExecutorDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // BootScriptExecutorDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials are // licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Boot Script Execution DXE Driver" diff --git a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.c b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.c index 263a282188..e76abb7b7b 100644 --- a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.c +++ b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.c @@ -4,7 +4,7 @@ This driver is dispatched by Dxe core and the driver will reload itself to ACPI reserved memory in the entry point. The functionality is to interpret and restore the S3 boot script -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
Copyright (c) 2017, AMD Incorporated. All rights reserved.
This program and the accompanying materials @@ -72,12 +72,12 @@ S3BootScriptExecutorEntryFunction ( // for that parameter. // Status = S3BootScriptExecute (); - + // // If invalid script table or opcode in S3 boot script table. // ASSERT_EFI_ERROR (Status); - + if (EFI_ERROR (Status)) { CpuDeadLoop (); return Status; @@ -95,7 +95,7 @@ S3BootScriptExecutorEntryFunction ( // if (PeiS3ResumeState != 0) { // - // Need report status back to S3ResumePeim. + // Need report status back to S3ResumePeim. // If boot script execution is failed, S3ResumePeim wil report the error status code. // PeiS3ResumeState->ReturnStatus = (UINT64)(UINTN)Status; @@ -145,7 +145,7 @@ S3BootScriptExecutorEntryFunction ( CpuDeadLoop(); return EFI_UNSUPPORTED; } - + // // S3ResumePeim does not provide a way to jump back to itself, so resume to OS here directly // @@ -254,9 +254,9 @@ RegisterMemoryProfileImage ( /** This is the Event notification function to reload BootScriptExecutor image to RESERVED mem and save it to LockBox. - + @param Event Pointer to this event - @param Context Event handler private data + @param Context Event handler private data **/ VOID EFIAPI diff --git a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.h b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.h index 94deae87e6..4ae07a0f5f 100644 --- a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.h +++ b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/ScriptExecute.h @@ -1,10 +1,10 @@ /** @file The header file for Boot Script Executer module. - - This driver is dispatched by Dxe core and the driver will reload itself to ACPI reserved memory - in the entry point. The functionality is to interpret and restore the S3 boot script - -Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+ + This driver is dispatched by Dxe core and the driver will reload itself to ACPI reserved memory + in the entry point. The functionality is to interpret and restore the S3 boot script + +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
Copyright (c) 2017, AMD Incorporated. All rights reserved.
This program and the accompanying materials @@ -51,9 +51,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** a ASM function to transfer control to OS. - + @param S3WakingVector The S3 waking up vector saved in ACPI Facs table - @param AcpiLowMemoryBase a buffer under 1M which could be used during the transfer + @param AcpiLowMemoryBase a buffer under 1M which could be used during the transfer **/ VOID AsmTransferControl ( @@ -62,9 +62,9 @@ AsmTransferControl ( ); /** a 32bit ASM function to transfer control to OS. - + @param S3WakingVector The S3 waking up vector saved in ACPI Facs table - @param AcpiLowMemoryBase a buffer under 1M which could be used during the transfer + @param AcpiLowMemoryBase a buffer under 1M which could be used during the transfer **/ VOID AsmTransferControl32 ( @@ -79,13 +79,13 @@ AsmTransferControl16 ( VOID ); /** - Set a IDT entry for interrupt vector 3 for debug purpose. - - @param AcpiS3Context a pointer to a structure of ACPI_S3_CONTEXT - + Set a IDT entry for interrupt vector 3 for debug purpose. + + @param AcpiS3Context a pointer to a structure of ACPI_S3_CONTEXT + **/ VOID -SetIdtEntry ( +SetIdtEntry ( IN ACPI_S3_CONTEXT *AcpiS3Context ); diff --git a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/X64/SetIdtEntry.c b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/X64/SetIdtEntry.c index 70eecf5762..1c6bb47b60 100644 --- a/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/X64/SetIdtEntry.c +++ b/MdeModulePkg/Universal/Acpi/BootScriptExecutorDxe/X64/SetIdtEntry.c @@ -3,7 +3,7 @@ Set a IDT entry for interrupt vector 3 for debug purpose for x64 platform -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
Copyright (c) 2017, AMD Incorporated. All rights reserved.
@@ -218,7 +218,7 @@ AcquirePage ( /** The page fault handler that on-demand read >4G memory/MMIO. - + @retval TRUE The page fault is correctly handled. @retval FALSE The page fault is not handled and is passed through to original handler. diff --git a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c index ded817f373..3d8e83250e 100644 --- a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c +++ b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.c @@ -2,7 +2,7 @@ This module install ACPI Firmware Performance Data Table (FPDT). This module register report status code listener to collect performance data - for Firmware Basic Boot Performance Record and other boot performance records, + for Firmware Basic Boot Performance Record and other boot performance records, and install FPDT to ACPI table. Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
@@ -438,7 +438,7 @@ FpdtStatusCodeListenerDxe ( if ((CodeType & EFI_STATUS_CODE_TYPE_MASK) != EFI_PROGRESS_CODE) { return EFI_UNSUPPORTED; } - + if (Value == (EFI_SOFTWARE_DXE_CORE | EFI_SW_DXE_CORE_PC_HANDOFF_TO_NEXT)) { // // DxeCore ReportStatusCode Enable so that the capability can be supported. @@ -552,7 +552,7 @@ FpdtExitBootServicesEventNotify ( { if (!mDxeCoreReportStatusCodeEnable) { // - // When DxeCore Report Status Code is disabled, + // When DxeCore Report Status Code is disabled, // Unregister boot time report status code listener at ExitBootService Event. // mRscHandlerProtocol->Unregister (FpdtStatusCodeListenerDxe); diff --git a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.inf b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.inf index 3d2dd6eb73..843cda7021 100644 --- a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.inf +++ b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.inf @@ -2,7 +2,7 @@ # This module installs ACPI Firmware Performance Data Table (FPDT). # # This module registers report status code listener to collect performance data -# for Firmware Basic Boot Performance Record and other boot performance records, +# for Firmware Basic Boot Performance Record and other boot performance records, # and install FPDT to ACPI table. # # Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
@@ -10,7 +10,7 @@ # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # diff --git a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.uni b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.uni index e35fa48e7d..4173125173 100644 --- a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.uni +++ b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxe.uni @@ -5,13 +5,13 @@ // for Firmware Basic Boot Performance Record and other boot performance records, // and install FPDT to ACPI table. // -// Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxeExtra.uni b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxeExtra.uni index 5a6d683a2e..2cacc83d60 100644 --- a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxeExtra.uni +++ b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableDxe/FirmwarePerformanceDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // FirmwarePerformanceDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "ACPI Firmware Performance DXE Driver" diff --git a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwarePerformancePei.inf b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwarePerformancePei.inf index a6ce5e6494..1b69e49cf9 100644 --- a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwarePerformancePei.inf +++ b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwarePerformancePei.inf @@ -11,7 +11,7 @@ # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # diff --git a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwarePerformancePei.uni b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwarePerformancePei.uni index 3ae182c7d6..4eb031b53c 100644 --- a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwarePerformancePei.uni +++ b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwarePerformancePei.uni @@ -2,17 +2,17 @@ // Firmware Performance Pei Module. // // In S3 resume boot mode, it updates S3 Resume Performance Record in ACPI Firmware Performance Data Table. -// +// // This module register report status code listener to collect performance data // for S3 Resume Performance Record on S3 resume boot path. // -// Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.
+// Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwarePerformancePeiExtra.uni b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwarePerformancePeiExtra.uni index 06029482cb..a4e8f9c585 100644 --- a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwarePerformancePeiExtra.uni +++ b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTablePei/FirmwarePerformancePeiExtra.uni @@ -1,7 +1,7 @@ // /** @file // FirmwarePerformancePei Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Firmware Performance PEI Module" diff --git a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.c b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.c index b011ec1103..711272e073 100644 --- a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.c +++ b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.c @@ -11,7 +11,7 @@ FpdtSmiHandler() will receive untrusted input and do basic validation. - Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -90,7 +90,7 @@ FpdtStatusCodeListenerSmm ( if ((CodeType & EFI_STATUS_CODE_TYPE_MASK) != EFI_PROGRESS_CODE) { return EFI_UNSUPPORTED; } - + // // Collect one or more Boot records in boot time // @@ -163,7 +163,7 @@ FpdtStatusCodeListenerSmm ( /** Communication service SMI Handler entry. - This SMI handler provides services for report SMM boot records. + This SMI handler provides services for report SMM boot records. Caution: This function may receive untrusted input. Communicate buffer and buffer size are external input, so this function will do basic validation. @@ -175,11 +175,11 @@ FpdtStatusCodeListenerSmm ( be conveyed from a non-SMM environment into an SMM environment. @param[in, out] CommBufferSize The size of the CommBuffer. - @retval EFI_SUCCESS The interrupt was handled and quiesced. No other handlers + @retval EFI_SUCCESS The interrupt was handled and quiesced. No other handlers should still be called. - @retval EFI_WARN_INTERRUPT_SOURCE_QUIESCED The interrupt has been quiesced but other handlers should + @retval EFI_WARN_INTERRUPT_SOURCE_QUIESCED The interrupt has been quiesced but other handlers should still be called. - @retval EFI_WARN_INTERRUPT_SOURCE_PENDING The interrupt is still pending and other handlers should still + @retval EFI_WARN_INTERRUPT_SOURCE_PENDING The interrupt is still pending and other handlers should still be called. @retval EFI_INTERRUPT_PENDING The interrupt could not be quiesced. @@ -212,7 +212,7 @@ FpdtSmiHandler ( if(TempCommBufferSize < sizeof (SMM_BOOT_RECORD_COMMUNICATE)) { return EFI_SUCCESS; } - + if (!SmmIsBufferOutsideSmmValid ((UINTN)CommBuffer, TempCommBufferSize)) { DEBUG ((EFI_D_ERROR, "FpdtSmiHandler: SMM communication data buffer in SMRAM or overflow!\n")); return EFI_SUCCESS; @@ -242,7 +242,7 @@ FpdtSmiHandler ( Status = EFI_INVALID_PARAMETER; break; } - + // // Sanity check // @@ -255,10 +255,10 @@ FpdtSmiHandler ( Status = EFI_ACCESS_DENIED; break; } - + CopyMem ( - (UINT8*)BootRecordData, - mBootRecordBuffer + BootRecordOffset, + (UINT8*)BootRecordData, + mBootRecordBuffer + BootRecordOffset, BootRecordSize ); break; @@ -268,7 +268,7 @@ FpdtSmiHandler ( } SmmCommData->ReturnStatus = Status; - + return EFI_SUCCESS; } @@ -295,8 +295,8 @@ FirmwarePerformanceSmmEntryPoint ( // // Initialize spin lock // - InitializeSpinLock (&mSmmFpdtLock); - + InitializeSpinLock (&mSmmFpdtLock); + // // Get SMM Report Status Code Handler Protocol. // diff --git a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.inf b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.inf index cae01110d1..67cd136797 100644 --- a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.inf +++ b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.inf @@ -4,12 +4,12 @@ # This module registers report status code listener to collect performance data # for SMM boot performance records and S3 Suspend Performance Record. # -# Copyright (c) 2011 - 2015, Intel Corporation. All rights reserved.
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # diff --git a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.uni b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.uni index 94f3b8e0fd..8c55fffa3c 100644 --- a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.uni +++ b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmm.uni @@ -4,13 +4,13 @@ // This module registers report status code listener to collect performance data // for SMM boot performance records and S3 Suspend Performance Record. // -// Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmmExtra.uni b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmmExtra.uni index d96e87f04f..59cb8c7241 100644 --- a/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmmExtra.uni +++ b/MdeModulePkg/Universal/Acpi/FirmwarePerformanceDataTableSmm/FirmwarePerformanceSmmExtra.uni @@ -1,7 +1,7 @@ // /** @file // FirmwarePerformanceSmm Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "SMM Firmware Performance Driver" diff --git a/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/AcpiS3ContextSave.c b/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/AcpiS3ContextSave.c index 3c05558b23..3f99023f11 100644 --- a/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/AcpiS3ContextSave.c +++ b/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/AcpiS3ContextSave.c @@ -1,7 +1,7 @@ /** @file This is the implementation to save ACPI S3 Context. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions @@ -43,7 +43,7 @@ EFI_GUID mAcpiS3IdtrProfileGuid = { @param MemoryType Memory type of memory to allocate. @param Size Size of memory to allocate. - + @return Allocated address for output. **/ @@ -101,7 +101,7 @@ ScanTableInRSDT ( } EntryCount = (Rsdt->Length - sizeof (EFI_ACPI_DESCRIPTION_HEADER)) / sizeof(UINT32); - + EntryPtr = (UINT32 *)(Rsdt + 1); for (Index = 0; Index < EntryCount; Index ++, EntryPtr ++) { Table = (EFI_ACPI_DESCRIPTION_HEADER *)((UINTN)(*EntryPtr)); @@ -109,7 +109,7 @@ ScanTableInRSDT ( return Table; } } - + return NULL; } @@ -140,7 +140,7 @@ ScanTableInXSDT ( } EntryCount = (Xsdt->Length - sizeof (EFI_ACPI_DESCRIPTION_HEADER)) / sizeof(UINT64); - + BasePtr = (UINTN)(Xsdt + 1); for (Index = 0; Index < EntryCount; Index ++) { CopyMem (&EntryPtr, (VOID *)(BasePtr + Index * sizeof(UINT64)), sizeof(UINT64)); @@ -149,7 +149,7 @@ ScanTableInXSDT ( return Table; } } - + return NULL; } @@ -157,7 +157,7 @@ ScanTableInXSDT ( To find Facs in FADT. @param Fadt FADT table pointer - + @return Facs table pointer. **/ EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE * @@ -187,12 +187,12 @@ FindAcpiFacsFromFadt ( /** To find Facs in Acpi tables. - - To find Firmware ACPI control strutcure in Acpi Tables since the S3 waking vector is stored + + To find Firmware ACPI control strutcure in Acpi Tables since the S3 waking vector is stored in the table. @param AcpiTableGuid The guid used to find ACPI table in UEFI ConfigurationTable. - + @return Facs table pointer. **/ EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE * @@ -256,10 +256,10 @@ FindAcpiFacsTableByAcpiGuid ( /** To find Facs in Acpi tables. - - To find Firmware ACPI control strutcure in Acpi Tables since the S3 waking vector is stored + + To find Firmware ACPI control strutcure in Acpi Tables since the S3 waking vector is stored in the table. - + @return Facs table pointer. **/ EFI_ACPI_2_0_FIRMWARE_ACPI_CONTROL_STRUCTURE * @@ -315,20 +315,20 @@ IsLongModeWakingVectorSupport ( @param[in] LongModeWakingVectorSupport Support long mode waking vector or not. - If BootScriptExector driver will run in 64-bit mode, this function will establish the 1:1 + If BootScriptExector driver will run in 64-bit mode, this function will establish the 1:1 virtual to physical mapping page table when long mode waking vector is supported, otherwise create 4G page table when long mode waking vector is not supported and let PF handler to handle > 4G request. - If BootScriptExector driver will not run in 64-bit mode, this function will do nothing. - - @return Page table base address. + If BootScriptExector driver will not run in 64-bit mode, this function will do nothing. + + @return Page table base address. **/ EFI_PHYSICAL_ADDRESS S3AllocatePageTablesBuffer ( IN BOOLEAN LongModeWakingVectorSupport ) -{ +{ if (FeaturePcdGet (PcdDxeIplSwitchToLongMode)) { UINTN ExtraPageTablePages; UINT32 RegEax; @@ -419,7 +419,7 @@ S3AllocatePageTablesBuffer ( // // If DXE is running 32-bit mode, no need to establish page table. // - return (EFI_PHYSICAL_ADDRESS) 0; + return (EFI_PHYSICAL_ADDRESS) 0; } } diff --git a/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/InternalS3SaveState.h b/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/InternalS3SaveState.h index 2cc638abbc..19600085f1 100644 --- a/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/InternalS3SaveState.h +++ b/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/InternalS3SaveState.h @@ -1,7 +1,7 @@ /** @file Internal header file for S3 Boot Script Saver state driver. - Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions @@ -48,25 +48,25 @@ AcpiS3ContextSaveOnEndOfDxe ( Adds a record into S3 boot script table. This function is used to store a boot script record into a given boot - script table. If the table specified by TableName is nonexistent in the - system, a new table will automatically be created and then the script record - will be added into the new table. This function is responsible for allocating + script table. If the table specified by TableName is nonexistent in the + system, a new table will automatically be created and then the script record + will be added into the new table. This function is responsible for allocating necessary memory for the script. - This function has a variable parameter list. The exact parameter list depends on - the OpCode that is passed into the function. If an unsupported OpCode or illegal + This function has a variable parameter list. The exact parameter list depends on + the OpCode that is passed into the function. If an unsupported OpCode or illegal parameter list is passed in, this function returns EFI_INVALID_PARAMETER. If there are not enough resources available for storing more scripts, this function returns EFI_OUT_OF_RESOURCES. @param This A pointer to the EFI_S3_SAVE_STATE_PROTOCOL instance. @param OpCode The operation code (opcode) number. - @param ... Argument list that is specific to each opcode. + @param ... Argument list that is specific to each opcode. @retval EFI_SUCCESS The operation succeeded. A record was added into the specified script table. @retval EFI_INVALID_PARAMETER The parameter is illegal or the given boot script is not supported. - If the opcode is unknow or not supported because of the PCD + If the opcode is unknow or not supported because of the PCD Feature Flags. @retval EFI_OUT_OF_RESOURCES There is insufficient memory to store the boot script. @@ -98,7 +98,7 @@ BootScriptWrite ( inserted, either before or after, depending on BeforeOrAfter. On exit, specifies the position of the inserted opcode in the boot script table. @param OpCode The operation code (opcode) number. - @param ... Argument list that is specific to each opcode. + @param ... Argument list that is specific to each opcode. @retval EFI_SUCCESS The operation succeeded. A record was added into the specified script table. @@ -139,7 +139,7 @@ BootScriptInsert ( @retval EFI_SUCCESS The label already exists or was inserted. @retval EFI_INVALID_PARAMETER The Opcode is an invalid opcode value or the Position is not a valid position in the boot script table.. - + **/ EFI_STATUS EFIAPI @@ -152,27 +152,27 @@ BootScriptLabel ( ); /** Compare two positions in the boot script table and return their relative position. - + This function compares two positions in the boot script table and returns their relative positions. If Position1 is before Position2, then -1 is returned. If Position1 is equal to Position2, then 0 is returned. If Position1 is after Position2, then 1 is returned. - + @param This A pointer to the EFI_S3_SAVE_STATE_PROTOCOL instance. @param Position1 The positions in the boot script table to compare @param Position2 The positions in the boot script table to compare @param RelativePosition On return, points to the result of the comparison - @retval EFI_SUCCESS The operation succeeded. + @retval EFI_SUCCESS The operation succeeded. @retval EFI_INVALID_PARAMETER The Position1 or Position2 is not a valid position in the boot script table. **/ EFI_STATUS -EFIAPI +EFIAPI BootScriptCompare ( IN CONST EFI_S3_SAVE_STATE_PROTOCOL *This, IN EFI_S3_BOOT_SCRIPT_POSITION Position1, IN EFI_S3_BOOT_SCRIPT_POSITION Position2, OUT UINTN *RelativePosition ); - + #endif //_INTERNAL_S3_SAVE_STATE_H_ diff --git a/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveState.c b/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveState.c index d73005156c..274f3be12c 100644 --- a/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveState.c +++ b/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveState.c @@ -1,7 +1,7 @@ /** @file Implementation for S3 Boot Script Saver state driver. - Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions @@ -46,7 +46,7 @@ BootScriptWriteIoWrite ( Address = VA_ARG (Marker, UINT64); Count = VA_ARG (Marker, UINTN); Buffer = VA_ARG (Marker, UINT8 *); - + return S3BootScriptSaveIoWrite (Width, Address, Count, Buffer); } /** @@ -68,12 +68,12 @@ BootScriptWriteIoReadWrite ( UINT64 Address; UINT8 *Data; UINT8 *DataMask; - + Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH); Address = VA_ARG (Marker, UINT64); Data = VA_ARG (Marker, UINT8 *); DataMask = VA_ARG (Marker, UINT8 *); - + return S3BootScriptSaveIoReadWrite (Width, Address, Data, DataMask); } @@ -96,7 +96,7 @@ BootScriptWriteMemWrite ( UINT64 Address; UINTN Count; UINT8 *Buffer; - + Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH); Address = VA_ARG (Marker, UINT64); Count = VA_ARG (Marker, UINTN); @@ -124,7 +124,7 @@ BootScriptWriteMemReadWrite ( UINT64 Address; UINT8 *Data; UINT8 *DataMask; - + Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH); Address = VA_ARG (Marker, UINT64); Data = VA_ARG (Marker, UINT8 *); @@ -238,13 +238,13 @@ BootScriptWritePciCfg2ReadWrite ( UINT64 Address; UINT8 *Data; UINT8 *DataMask; - + Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH); Segment = VA_ARG (Marker, UINT16); Address = VA_ARG (Marker, UINT64); Data = VA_ARG (Marker, UINT8 *); DataMask = VA_ARG (Marker, UINT8 *); - + return S3BootScriptSavePciCfg2ReadWrite (Width, Segment, Address, Data, DataMask); } /** @@ -269,15 +269,15 @@ BootScriptWriteSmbusExecute ( VOID *Buffer; UINTN *DataSize; UINTN SmBusAddress; - + SlaveAddress.SmbusDeviceAddress = VA_ARG (Marker, UINTN); Command = VA_ARG (Marker, EFI_SMBUS_DEVICE_COMMAND); Operation = VA_ARG (Marker, EFI_SMBUS_OPERATION); PecCheck = VA_ARG (Marker, BOOLEAN); SmBusAddress = SMBUS_LIB_ADDRESS (SlaveAddress.SmbusDeviceAddress,Command,0,PecCheck); - DataSize = VA_ARG (Marker, UINTN *); + DataSize = VA_ARG (Marker, UINTN *); Buffer = VA_ARG (Marker, VOID *); - + return S3BootScriptSaveSmbusExecute (SmBusAddress, Operation, DataSize, Buffer); } /** @@ -303,7 +303,7 @@ BootScriptWriteStall ( } /** - Internal function to add Save jmp address according to DISPATCH_OPCODE. + Internal function to add Save jmp address according to DISPATCH_OPCODE. We ignore "Context" parameter @param Marker The variable argument list to get the opcode @@ -325,8 +325,8 @@ BootScriptWriteDispatch ( } /** - Internal function to add memory pool operation to the table. - + Internal function to add memory pool operation to the table. + @param Marker The variable argument list to get the opcode and associated attributes. @@ -339,18 +339,18 @@ BootScriptWriteMemPoll ( IN VA_LIST Marker ) { - S3_BOOT_SCRIPT_LIB_WIDTH Width; - UINT64 Address; - VOID *Data; - VOID *DataMask; + S3_BOOT_SCRIPT_LIB_WIDTH Width; + UINT64 Address; + VOID *Data; + VOID *DataMask; UINT64 Delay; UINT64 LoopTimes; UINT32 Remainder; - Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH); - Address = VA_ARG (Marker, UINT64); - Data = VA_ARG (Marker, VOID *); - DataMask = VA_ARG (Marker, VOID *); + Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH); + Address = VA_ARG (Marker, UINT64); + Data = VA_ARG (Marker, VOID *); + DataMask = VA_ARG (Marker, VOID *); Delay = VA_ARG (Marker, UINT64); // // According to the spec, the interval between 2 polls is 100ns, @@ -375,7 +375,7 @@ BootScriptWriteMemPoll ( } /** - Internal function to add Save jmp address according to DISPATCH_OPCODE2. + Internal function to add Save jmp address according to DISPATCH_OPCODE2. The "Context" parameter is not ignored. @param Marker The variable argument list to get the opcode @@ -391,7 +391,7 @@ BootScriptWriteDispatch2 ( ) { VOID *EntryPoint; - VOID *Context; + VOID *Context; EntryPoint = (VOID*)(UINTN)VA_ARG (Marker, EFI_PHYSICAL_ADDRESS); Context = (VOID*)(UINTN)VA_ARG (Marker, EFI_PHYSICAL_ADDRESS); @@ -414,7 +414,7 @@ BootScriptWriteInformation ( ) { UINT32 InformationLength; - EFI_PHYSICAL_ADDRESS Information; + EFI_PHYSICAL_ADDRESS Information; InformationLength = VA_ARG (Marker, UINT32); Information = VA_ARG (Marker, EFI_PHYSICAL_ADDRESS); @@ -435,17 +435,17 @@ BootScriptWriteIoPoll ( ) { S3_BOOT_SCRIPT_LIB_WIDTH Width; - UINT64 Address; - VOID *Data; - VOID *DataMask; - UINT64 Delay; - - Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH); - Address = VA_ARG (Marker, UINT64); - Data = VA_ARG (Marker, VOID *); - DataMask = VA_ARG (Marker, VOID *); - Delay = (UINT64)VA_ARG (Marker, UINT64); - + UINT64 Address; + VOID *Data; + VOID *DataMask; + UINT64 Delay; + + Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH); + Address = VA_ARG (Marker, UINT64); + Data = VA_ARG (Marker, VOID *); + DataMask = VA_ARG (Marker, VOID *); + Delay = (UINT64)VA_ARG (Marker, UINT64); + return S3BootScriptSaveIoPoll (Width, Address, Data, DataMask, Delay); } /** @@ -469,13 +469,13 @@ BootScriptWritePciConfigPoll ( VOID *DataMask; UINT64 Delay; - - Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH); - Address = VA_ARG (Marker, UINT64); - Data = VA_ARG (Marker, VOID *); - DataMask = VA_ARG (Marker, VOID *); - Delay = (UINT64)VA_ARG (Marker, UINT64); - + + Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH); + Address = VA_ARG (Marker, UINT64); + Data = VA_ARG (Marker, VOID *); + DataMask = VA_ARG (Marker, VOID *); + Delay = (UINT64)VA_ARG (Marker, UINT64); + return S3BootScriptSavePciPoll (Width, Address, Data, DataMask, Delay); } /** @@ -499,14 +499,14 @@ BootScriptWritePciConfig2Poll ( VOID *Data; VOID *DataMask; UINT64 Delay; - - Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH); - Segment = VA_ARG (Marker, UINT16); - Address = VA_ARG (Marker, UINT64); - Data = VA_ARG (Marker, VOID *); - DataMask = VA_ARG (Marker, VOID *); - Delay = (UINT64)VA_ARG (Marker, UINT64); - + + Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH); + Segment = VA_ARG (Marker, UINT16); + Address = VA_ARG (Marker, UINT64); + Data = VA_ARG (Marker, VOID *); + DataMask = VA_ARG (Marker, VOID *); + Delay = (UINT64)VA_ARG (Marker, UINT64); + return S3BootScriptSavePci2Poll (Width, Segment, Address, Data, DataMask, Delay); } @@ -515,25 +515,25 @@ BootScriptWritePciConfig2Poll ( Adds a record into S3 boot script table. This function is used to store a boot script record into a given boot - script table. If the table specified by TableName is nonexistent in the - system, a new table will automatically be created and then the script record - will be added into the new table. This function is responsible for allocating + script table. If the table specified by TableName is nonexistent in the + system, a new table will automatically be created and then the script record + will be added into the new table. This function is responsible for allocating necessary memory for the script. - This function has a variable parameter list. The exact parameter list depends on - the OpCode that is passed into the function. If an unsupported OpCode or illegal + This function has a variable parameter list. The exact parameter list depends on + the OpCode that is passed into the function. If an unsupported OpCode or illegal parameter list is passed in, this function returns EFI_INVALID_PARAMETER. If there are not enough resources available for storing more scripts, this function returns EFI_OUT_OF_RESOURCES. @param This A pointer to the EFI_S3_SAVE_STATE_PROTOCOL instance. @param OpCode The operation code (opcode) number. - @param ... Argument list that is specific to each opcode. - + @param ... Argument list that is specific to each opcode. + @retval EFI_SUCCESS The operation succeeded. A record was added into the specified script table. @retval EFI_INVALID_PARAMETER The parameter is illegal or the given boot script is not supported. - If the opcode is unknow or not supported because of the PCD + If the opcode is unknow or not supported because of the PCD Feature Flags. @retval EFI_OUT_OF_RESOURCES There is insufficient memory to store the boot script. @@ -547,7 +547,7 @@ BootScriptWrite ( ) { EFI_STATUS Status; - VA_LIST Marker; + VA_LIST Marker; // // Build script according to opcode // @@ -568,7 +568,7 @@ BootScriptWrite ( case EFI_BOOT_SCRIPT_MEM_WRITE_OPCODE: VA_START (Marker, OpCode); Status = BootScriptWriteMemWrite (Marker); - VA_END (Marker); + VA_END (Marker); break; case EFI_BOOT_SCRIPT_MEM_READ_WRITE_OPCODE: @@ -599,7 +599,7 @@ BootScriptWrite ( VA_START (Marker, OpCode); Status = BootScriptWriteStall (Marker); VA_END (Marker); - + break; case EFI_BOOT_SCRIPT_DISPATCH_OPCODE: @@ -638,23 +638,23 @@ BootScriptWrite ( VA_END (Marker); break; - case EFI_BOOT_SCRIPT_IO_POLL_OPCODE: + case EFI_BOOT_SCRIPT_IO_POLL_OPCODE: VA_START (Marker, OpCode); Status = BootScriptWriteIoPoll (Marker); VA_END (Marker); - break; - - case EFI_BOOT_SCRIPT_PCI_CONFIG_POLL_OPCODE: + break; + + case EFI_BOOT_SCRIPT_PCI_CONFIG_POLL_OPCODE: VA_START (Marker, OpCode); Status = BootScriptWritePciConfigPoll (Marker); VA_END (Marker); - break; - + break; + case EFI_BOOT_SCRIPT_PCI_CONFIG2_POLL_OPCODE: VA_START (Marker, OpCode); Status = BootScriptWritePciConfig2Poll (Marker); VA_END (Marker); - break; + break; default: Status = EFI_INVALID_PARAMETER; @@ -683,7 +683,7 @@ BootScriptWrite ( inserted, either before or after, depending on BeforeOrAfter. On exit, specifies the position of the inserted opcode in the boot script table. @param OpCode The operation code (opcode) number. - @param ... Argument list that is specific to each opcode. + @param ... Argument list that is specific to each opcode. @retval EFI_SUCCESS The operation succeeded. A record was added into the specified script table. @@ -702,7 +702,7 @@ BootScriptInsert ( ) { EFI_STATUS Status; - VA_LIST Marker; + VA_LIST Marker; // // Build script according to opcode // @@ -723,7 +723,7 @@ BootScriptInsert ( case EFI_BOOT_SCRIPT_MEM_WRITE_OPCODE: VA_START (Marker, OpCode); Status = BootScriptWriteMemWrite (Marker); - VA_END (Marker); + VA_END (Marker); break; case EFI_BOOT_SCRIPT_MEM_READ_WRITE_OPCODE: @@ -754,7 +754,7 @@ BootScriptInsert ( VA_START (Marker, OpCode); Status = BootScriptWriteStall (Marker); VA_END (Marker); - + break; case EFI_BOOT_SCRIPT_DISPATCH_OPCODE: @@ -792,30 +792,30 @@ BootScriptInsert ( Status = BootScriptWritePciCfg2ReadWrite (Marker); VA_END (Marker); break; - - case EFI_BOOT_SCRIPT_IO_POLL_OPCODE: + + case EFI_BOOT_SCRIPT_IO_POLL_OPCODE: VA_START (Marker, OpCode); Status = BootScriptWriteIoPoll (Marker); VA_END (Marker); - break; - - case EFI_BOOT_SCRIPT_PCI_CONFIG_POLL_OPCODE: + break; + + case EFI_BOOT_SCRIPT_PCI_CONFIG_POLL_OPCODE: VA_START (Marker, OpCode); Status = BootScriptWritePciConfigPoll (Marker); VA_END (Marker); - break; - + break; + case EFI_BOOT_SCRIPT_PCI_CONFIG2_POLL_OPCODE: VA_START (Marker, OpCode); Status = BootScriptWritePciConfig2Poll (Marker); VA_END (Marker); - break; + break; default: Status = EFI_INVALID_PARAMETER; break; } - + if (!EFI_ERROR (Status)) { Status = S3BootScriptMoveLastOpcode (BeforeOrAfter, Position); } @@ -846,7 +846,7 @@ BootScriptInsert ( @retval EFI_SUCCESS The label already exists or was inserted. @retval EFI_INVALID_PARAMETER The Label is NULL or points to an empty string. @retval EFI_INVALID_PARAMETER The Position is not a valid position in the boot script table. - + **/ EFI_STATUS EFIAPI @@ -858,27 +858,27 @@ BootScriptLabel ( IN CONST CHAR8 *Label ) { - return S3BootScriptLabel (BeforeOrAfter, CreateIfNotFound, Position, Label); + return S3BootScriptLabel (BeforeOrAfter, CreateIfNotFound, Position, Label); } /** Compare two positions in the boot script table and return their relative position. - + This function compares two positions in the boot script table and returns their relative positions. If Position1 is before Position2, then -1 is returned. If Position1 is equal to Position2, then 0 is returned. If Position1 is after Position2, then 1 is returned. - + @param This A pointer to the EFI_S3_SAVE_STATE_PROTOCOL instance. @param Position1 The positions in the boot script table to compare @param Position2 The positions in the boot script table to compare @param RelativePosition On return, points to the result of the comparison - @retval EFI_SUCCESS The operation succeeded. + @retval EFI_SUCCESS The operation succeeded. @retval EFI_INVALID_PARAMETER The Position1 or Position2 is not a valid position in the boot script table. @retval EFI_INVALID_PARAMETER The RelativePosition is NULL. **/ EFI_STATUS -EFIAPI +EFIAPI BootScriptCompare ( IN CONST EFI_S3_SAVE_STATE_PROTOCOL *This, IN EFI_S3_BOOT_SCRIPT_POSITION Position1, @@ -886,7 +886,7 @@ BootScriptCompare ( OUT UINTN *RelativePosition ) { - return S3BootScriptCompare (Position1, Position2, RelativePosition); + return S3BootScriptCompare (Position1, Position2, RelativePosition); } /** This routine is entry point of ScriptSave driver. diff --git a/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf b/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf index 05e98f40cd..a4184212bb 100644 --- a/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf +++ b/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.inf @@ -3,7 +3,7 @@ # # It will install S3 Save State protocol to store or record various IO operations to be replayed during an S3 resume. # -# Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials are # licensed and made available under the terms and conditions of the BSD License @@ -74,4 +74,4 @@ TRUE [UserExtensions.TianoCore."ExtraFiles"] - S3SaveStateDxeExtra.uni \ No newline at end of file + S3SaveStateDxeExtra.uni diff --git a/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.uni b/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.uni index 312803e69c..579cce2a8d 100644 --- a/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.uni +++ b/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxe.uni @@ -3,13 +3,13 @@ // // It will install S3 Save State protocol to store or record various IO operations to be replayed during an S3 resume. // -// Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials are // licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxeExtra.uni b/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxeExtra.uni index c648ff8ae7..20728e12e8 100644 --- a/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxeExtra.uni +++ b/MdeModulePkg/Universal/Acpi/S3SaveStateDxe/S3SaveStateDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // S3SaveStateDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials are // licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "S3 Save State DXE Driver" diff --git a/MdeModulePkg/Universal/Acpi/SmmS3SaveState/InternalSmmSaveState.h b/MdeModulePkg/Universal/Acpi/SmmS3SaveState/InternalSmmSaveState.h index d6263fd727..51cf9db4aa 100644 --- a/MdeModulePkg/Universal/Acpi/SmmS3SaveState/InternalSmmSaveState.h +++ b/MdeModulePkg/Universal/Acpi/SmmS3SaveState/InternalSmmSaveState.h @@ -1,7 +1,7 @@ /** @file Internal header file for SMM S3 Boot Script Saver state driver. - Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions @@ -31,25 +31,25 @@ Adds a record into S3 boot script table. This function is used to store a boot script record into a given boot - script table. If the table specified by TableName is nonexistent in the - system, a new table will automatically be created and then the script record - will be added into the new table. This function is responsible for allocating + script table. If the table specified by TableName is nonexistent in the + system, a new table will automatically be created and then the script record + will be added into the new table. This function is responsible for allocating necessary memory for the script. - This function has a variable parameter list. The exact parameter list depends on - the OpCode that is passed into the function. If an unsupported OpCode or illegal + This function has a variable parameter list. The exact parameter list depends on + the OpCode that is passed into the function. If an unsupported OpCode or illegal parameter list is passed in, this function returns EFI_INVALID_PARAMETER. If there are not enough resources available for storing more scripts, this function returns EFI_OUT_OF_RESOURCES. @param This A pointer to the EFI_S3_SAVE_STATE_PROTOCOL instance. @param OpCode The operation code (opcode) number. - @param ... Argument list that is specific to each opcode. + @param ... Argument list that is specific to each opcode. @retval EFI_SUCCESS The operation succeeded. A record was added into the specified script table. @retval EFI_INVALID_PARAMETER The parameter is illegal or the given boot script is not supported. - If the opcode is unknow or not supported because of the PCD + If the opcode is unknow or not supported because of the PCD Feature Flags. @retval EFI_OUT_OF_RESOURCES There is insufficient memory to store the boot script. @@ -81,7 +81,7 @@ BootScriptWrite ( inserted, either before or after, depending on BeforeOrAfter. On exit, specifies the position of the inserted opcode in the boot script table. @param OpCode The operation code (opcode) number. - @param ... Argument list that is specific to each opcode. + @param ... Argument list that is specific to each opcode. @retval EFI_SUCCESS The operation succeeded. A record was added into the specified script table. @@ -122,7 +122,7 @@ BootScriptInsert ( @retval EFI_SUCCESS The label already exists or was inserted. @retval EFI_INVALID_PARAMETER The Opcode is an invalid opcode value or the Position is not a valid position in the boot script table.. - + **/ EFI_STATUS EFIAPI @@ -135,27 +135,27 @@ BootScriptLabel ( ); /** Compare two positions in the boot script table and return their relative position. - + This function compares two positions in the boot script table and returns their relative positions. If Position1 is before Position2, then -1 is returned. If Position1 is equal to Position2, then 0 is returned. If Position1 is after Position2, then 1 is returned. - + @param This A pointer to the EFI_S3_SAVE_STATE_PROTOCOL instance. @param Position1 The positions in the boot script table to compare @param Position2 The positions in the boot script table to compare @param RelativePosition On return, points to the result of the comparison - @retval EFI_SUCCESS The operation succeeded. + @retval EFI_SUCCESS The operation succeeded. @retval EFI_INVALID_PARAMETER The Position1 or Position2 is not a valid position in the boot script table. **/ EFI_STATUS -EFIAPI +EFIAPI BootScriptCompare ( IN CONST EFI_S3_SAVE_STATE_PROTOCOL *This, IN EFI_S3_BOOT_SCRIPT_POSITION Position1, IN EFI_S3_BOOT_SCRIPT_POSITION Position2, OUT UINTN *RelativePosition ); - + #endif //_INTERNAL_SMM_S3_SAVE_STATE_H_ diff --git a/MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveState.c b/MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveState.c index f397db37fd..c1d29b5d3a 100644 --- a/MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveState.c +++ b/MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveState.c @@ -1,7 +1,7 @@ /** @file Implementation for S3 SMM Boot Script Saver state driver. - Copyright (c) 2010 - 2017, Intel Corporation. All rights reserved.
+ Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions @@ -45,7 +45,7 @@ BootScriptWriteIoWrite ( Address = VA_ARG (Marker, UINT64); Count = VA_ARG (Marker, UINTN); Buffer = VA_ARG (Marker, UINT8 *); - + return S3BootScriptSaveIoWrite (Width, Address, Count, Buffer); } /** @@ -67,12 +67,12 @@ BootScriptWriteIoReadWrite ( UINT64 Address; UINT8 *Data; UINT8 *DataMask; - + Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH); Address = VA_ARG (Marker, UINT64); Data = VA_ARG (Marker, UINT8 *); DataMask = VA_ARG (Marker, UINT8 *); - + return S3BootScriptSaveIoReadWrite (Width, Address, Data, DataMask); } @@ -95,7 +95,7 @@ BootScriptWriteMemWrite ( UINT64 Address; UINTN Count; UINT8 *Buffer; - + Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH); Address = VA_ARG (Marker, UINT64); Count = VA_ARG (Marker, UINTN); @@ -123,7 +123,7 @@ BootScriptWriteMemReadWrite ( UINT64 Address; UINT8 *Data; UINT8 *DataMask; - + Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH); Address = VA_ARG (Marker, UINT64); Data = VA_ARG (Marker, UINT8 *); @@ -237,13 +237,13 @@ BootScriptWritePciCfg2ReadWrite ( UINT64 Address; UINT8 *Data; UINT8 *DataMask; - + Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH); Segment = VA_ARG (Marker, UINT16); Address = VA_ARG (Marker, UINT64); Data = VA_ARG (Marker, UINT8 *); DataMask = VA_ARG (Marker, UINT8 *); - + return S3BootScriptSavePciCfg2ReadWrite (Width, Segment, Address, Data, DataMask); } /** @@ -268,15 +268,15 @@ BootScriptWriteSmbusExecute ( VOID *Buffer; UINTN *DataSize; UINTN SmBusAddress; - + SlaveAddress.SmbusDeviceAddress = VA_ARG (Marker, UINTN); Command = VA_ARG (Marker, EFI_SMBUS_DEVICE_COMMAND); Operation = VA_ARG (Marker, EFI_SMBUS_OPERATION); PecCheck = VA_ARG (Marker, BOOLEAN); SmBusAddress = SMBUS_LIB_ADDRESS (SlaveAddress.SmbusDeviceAddress,Command,0,PecCheck); - DataSize = VA_ARG (Marker, UINTN *); + DataSize = VA_ARG (Marker, UINTN *); Buffer = VA_ARG (Marker, VOID *); - + return S3BootScriptSaveSmbusExecute (SmBusAddress, Operation, DataSize, Buffer); } /** @@ -302,7 +302,7 @@ BootScriptWriteStall ( } /** - Internal function to add Save jmp address according to DISPATCH_OPCODE. + Internal function to add Save jmp address according to DISPATCH_OPCODE. We ignore "Context" parameter @param Marker The variable argument list to get the opcode @@ -324,8 +324,8 @@ BootScriptWriteDispatch ( } /** - Internal function to add memory pool operation to the table. - + Internal function to add memory pool operation to the table. + @param Marker The variable argument list to get the opcode and associated attributes. @@ -338,18 +338,18 @@ BootScriptWriteMemPoll ( IN VA_LIST Marker ) { - S3_BOOT_SCRIPT_LIB_WIDTH Width; - UINT64 Address; - VOID *Data; - VOID *DataMask; + S3_BOOT_SCRIPT_LIB_WIDTH Width; + UINT64 Address; + VOID *Data; + VOID *DataMask; UINT64 Delay; UINT64 LoopTimes; UINT32 Remainder; - Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH); - Address = VA_ARG (Marker, UINT64); - Data = VA_ARG (Marker, VOID *); - DataMask = VA_ARG (Marker, VOID *); + Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH); + Address = VA_ARG (Marker, UINT64); + Data = VA_ARG (Marker, VOID *); + DataMask = VA_ARG (Marker, VOID *); Delay = VA_ARG (Marker, UINT64); // // According to the spec, the interval between 2 polls is 100ns, @@ -369,12 +369,12 @@ BootScriptWriteMemPoll ( // LoopTimes +=1; } - return S3BootScriptSaveMemPoll (Width, Address, DataMask, Data, 1, LoopTimes); + return S3BootScriptSaveMemPoll (Width, Address, DataMask, Data, 1, LoopTimes); } /** - Internal function to add Save jmp address according to DISPATCH_OPCODE2. + Internal function to add Save jmp address according to DISPATCH_OPCODE2. The "Context" parameter is not ignored. @param Marker The variable argument list to get the opcode @@ -390,7 +390,7 @@ BootScriptWriteDispatch2 ( ) { VOID *EntryPoint; - VOID *Context; + VOID *Context; EntryPoint = (VOID*)(UINTN)VA_ARG (Marker, EFI_PHYSICAL_ADDRESS); Context = (VOID*)(UINTN)VA_ARG (Marker, EFI_PHYSICAL_ADDRESS); @@ -413,7 +413,7 @@ BootScriptWriteInformation ( ) { UINT32 InformationLength; - EFI_PHYSICAL_ADDRESS Information; + EFI_PHYSICAL_ADDRESS Information; InformationLength = VA_ARG (Marker, UINT32); Information = VA_ARG (Marker, EFI_PHYSICAL_ADDRESS); @@ -433,18 +433,18 @@ BootScriptWriteIoPoll ( IN VA_LIST Marker ) { - S3_BOOT_SCRIPT_LIB_WIDTH Width; - UINT64 Address; - VOID *Data; - VOID *DataMask; - UINT64 Delay; - - Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH); - Address = VA_ARG (Marker, UINT64); - Data = VA_ARG (Marker, VOID *); - DataMask = VA_ARG (Marker, VOID *); - Delay = (UINT64)VA_ARG (Marker, UINT64); - + S3_BOOT_SCRIPT_LIB_WIDTH Width; + UINT64 Address; + VOID *Data; + VOID *DataMask; + UINT64 Delay; + + Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH); + Address = VA_ARG (Marker, UINT64); + Data = VA_ARG (Marker, VOID *); + DataMask = VA_ARG (Marker, VOID *); + Delay = (UINT64)VA_ARG (Marker, UINT64); + return S3BootScriptSaveIoPoll (Width, Address, Data, DataMask, Delay); } /** @@ -468,13 +468,13 @@ BootScriptWritePciConfigPoll ( VOID *DataMask; UINT64 Delay; - - Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH); - Address = VA_ARG (Marker, UINT64); - Data = VA_ARG (Marker, VOID *); - DataMask = VA_ARG (Marker, VOID *); - Delay = (UINT64)VA_ARG (Marker, UINT64); - + + Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH); + Address = VA_ARG (Marker, UINT64); + Data = VA_ARG (Marker, VOID *); + DataMask = VA_ARG (Marker, VOID *); + Delay = (UINT64)VA_ARG (Marker, UINT64); + return S3BootScriptSavePciPoll (Width, Address, Data, DataMask, Delay); } /** @@ -498,14 +498,14 @@ BootScriptWritePciConfig2Poll ( VOID *Data; VOID *DataMask; UINT64 Delay; - - Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH); - Segment = VA_ARG (Marker, UINT16); - Address = VA_ARG (Marker, UINT64); - Data = VA_ARG (Marker, VOID *); - DataMask = VA_ARG (Marker, VOID *); - Delay = (UINT64)VA_ARG (Marker, UINT64); - + + Width = VA_ARG (Marker, S3_BOOT_SCRIPT_LIB_WIDTH); + Segment = VA_ARG (Marker, UINT16); + Address = VA_ARG (Marker, UINT64); + Data = VA_ARG (Marker, VOID *); + DataMask = VA_ARG (Marker, VOID *); + Delay = (UINT64)VA_ARG (Marker, UINT64); + return S3BootScriptSavePci2Poll (Width, Segment, Address, Data, DataMask, Delay); } @@ -513,25 +513,25 @@ BootScriptWritePciConfig2Poll ( Adds a record into S3 boot script table. This function is used to store a boot script record into a given boot - script table. If the table specified by TableName is nonexistent in the - system, a new table will automatically be created and then the script record - will be added into the new table. This function is responsible for allocating + script table. If the table specified by TableName is nonexistent in the + system, a new table will automatically be created and then the script record + will be added into the new table. This function is responsible for allocating necessary memory for the script. - This function has a variable parameter list. The exact parameter list depends on - the OpCode that is passed into the function. If an unsupported OpCode or illegal + This function has a variable parameter list. The exact parameter list depends on + the OpCode that is passed into the function. If an unsupported OpCode or illegal parameter list is passed in, this function returns EFI_INVALID_PARAMETER. If there are not enough resources available for storing more scripts, this function returns EFI_OUT_OF_RESOURCES. @param This A pointer to the EFI_S3_SAVE_STATE_PROTOCOL instance. @param OpCode The operation code (opcode) number. - @param ... Argument list that is specific to each opcode. - + @param ... Argument list that is specific to each opcode. + @retval EFI_SUCCESS The operation succeeded. A record was added into the specified script table. @retval EFI_INVALID_PARAMETER The parameter is illegal or the given boot script is not supported. - If the opcode is unknow or not supported because of the PCD + If the opcode is unknow or not supported because of the PCD Feature Flags. @retval EFI_OUT_OF_RESOURCES There is insufficient memory to store the boot script. @@ -545,7 +545,7 @@ BootScriptWrite ( ) { EFI_STATUS Status; - VA_LIST Marker; + VA_LIST Marker; // // Build script according to opcode // @@ -566,7 +566,7 @@ BootScriptWrite ( case EFI_BOOT_SCRIPT_MEM_WRITE_OPCODE: VA_START (Marker, OpCode); Status = BootScriptWriteMemWrite (Marker); - VA_END (Marker); + VA_END (Marker); break; case EFI_BOOT_SCRIPT_MEM_READ_WRITE_OPCODE: @@ -597,7 +597,7 @@ BootScriptWrite ( VA_START (Marker, OpCode); Status = BootScriptWriteStall (Marker); VA_END (Marker); - + break; case EFI_BOOT_SCRIPT_DISPATCH_OPCODE: @@ -636,23 +636,23 @@ BootScriptWrite ( VA_END (Marker); break; - case EFI_BOOT_SCRIPT_IO_POLL_OPCODE: + case EFI_BOOT_SCRIPT_IO_POLL_OPCODE: VA_START (Marker, OpCode); Status = BootScriptWriteIoPoll (Marker); VA_END (Marker); - break; - - case EFI_BOOT_SCRIPT_PCI_CONFIG_POLL_OPCODE: + break; + + case EFI_BOOT_SCRIPT_PCI_CONFIG_POLL_OPCODE: VA_START (Marker, OpCode); Status = BootScriptWritePciConfigPoll (Marker); VA_END (Marker); - break; - + break; + case EFI_BOOT_SCRIPT_PCI_CONFIG2_POLL_OPCODE: VA_START (Marker, OpCode); Status = BootScriptWritePciConfig2Poll (Marker); VA_END (Marker); - break; + break; default: Status = EFI_INVALID_PARAMETER; @@ -681,7 +681,7 @@ BootScriptWrite ( inserted, either before or after, depending on BeforeOrAfter. On exit, specifies the position of the inserted opcode in the boot script table. @param OpCode The operation code (opcode) number. - @param ... Argument list that is specific to each opcode. + @param ... Argument list that is specific to each opcode. @retval EFI_SUCCESS The operation succeeded. A record was added into the specified script table. @@ -700,7 +700,7 @@ BootScriptInsert ( ) { EFI_STATUS Status; - VA_LIST Marker; + VA_LIST Marker; // // Build script according to opcode // @@ -721,7 +721,7 @@ BootScriptInsert ( case EFI_BOOT_SCRIPT_MEM_WRITE_OPCODE: VA_START (Marker, OpCode); Status = BootScriptWriteMemWrite (Marker); - VA_END (Marker); + VA_END (Marker); break; case EFI_BOOT_SCRIPT_MEM_READ_WRITE_OPCODE: @@ -752,7 +752,7 @@ BootScriptInsert ( VA_START (Marker, OpCode); Status = BootScriptWriteStall (Marker); VA_END (Marker); - + break; case EFI_BOOT_SCRIPT_DISPATCH_OPCODE: @@ -790,30 +790,30 @@ BootScriptInsert ( Status = BootScriptWritePciCfg2ReadWrite (Marker); VA_END (Marker); break; - - case EFI_BOOT_SCRIPT_IO_POLL_OPCODE: + + case EFI_BOOT_SCRIPT_IO_POLL_OPCODE: VA_START (Marker, OpCode); Status = BootScriptWriteIoPoll (Marker); VA_END (Marker); - break; - - case EFI_BOOT_SCRIPT_PCI_CONFIG_POLL_OPCODE: + break; + + case EFI_BOOT_SCRIPT_PCI_CONFIG_POLL_OPCODE: VA_START (Marker, OpCode); Status = BootScriptWritePciConfigPoll (Marker); VA_END (Marker); - break; - + break; + case EFI_BOOT_SCRIPT_PCI_CONFIG2_POLL_OPCODE: VA_START (Marker, OpCode); Status = BootScriptWritePciConfig2Poll (Marker); VA_END (Marker); - break; + break; default: Status = EFI_INVALID_PARAMETER; break; } - + if (!EFI_ERROR (Status)) { Status = S3BootScriptMoveLastOpcode (BeforeOrAfter, Position); } @@ -844,7 +844,7 @@ BootScriptInsert ( @retval EFI_SUCCESS The label already exists or was inserted. @retval EFI_INVALID_PARAMETER The Label is NULL or points to an empty string. @retval EFI_INVALID_PARAMETER The Position is not a valid position in the boot script table. - + **/ EFI_STATUS EFIAPI @@ -856,27 +856,27 @@ BootScriptLabel ( IN CONST CHAR8 *Label ) { - return S3BootScriptLabel (BeforeOrAfter, CreateIfNotFound, Position, Label); + return S3BootScriptLabel (BeforeOrAfter, CreateIfNotFound, Position, Label); } /** Compare two positions in the boot script table and return their relative position. - + This function compares two positions in the boot script table and returns their relative positions. If Position1 is before Position2, then -1 is returned. If Position1 is equal to Position2, then 0 is returned. If Position1 is after Position2, then 1 is returned. - + @param This A pointer to the EFI_S3_SAVE_STATE_PROTOCOL instance. @param Position1 The positions in the boot script table to compare @param Position2 The positions in the boot script table to compare @param RelativePosition On return, points to the result of the comparison - @retval EFI_SUCCESS The operation succeeded. + @retval EFI_SUCCESS The operation succeeded. @retval EFI_INVALID_PARAMETER The Position1 or Position2 is not a valid position in the boot script table. @retval EFI_INVALID_PARAMETER The RelativePosition is NULL. **/ EFI_STATUS -EFIAPI +EFIAPI BootScriptCompare ( IN CONST EFI_S3_SAVE_STATE_PROTOCOL *This, IN EFI_S3_BOOT_SCRIPT_POSITION Position1, @@ -884,7 +884,7 @@ BootScriptCompare ( OUT UINTN *RelativePosition ) { - return S3BootScriptCompare (Position1, Position2, RelativePosition); + return S3BootScriptCompare (Position1, Position2, RelativePosition); } /** This routine is entry point of ScriptSave driver. diff --git a/MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveState.inf b/MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveState.inf index f1f264ec43..0742da60ca 100644 --- a/MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveState.inf +++ b/MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveState.inf @@ -3,7 +3,7 @@ # # It will install S3 SMM Save State protocol to store or record various IO operations to be replayed during an S3 resume. # -# Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials are # licensed and made available under the terms and conditions of the BSD License @@ -23,7 +23,7 @@ MODULE_TYPE = DXE_SMM_DRIVER VERSION_STRING = 1.0 PI_SPECIFICATION_VERSION = 0x0001000A - + ENTRY_POINT = InitializeSmmS3SaveState # diff --git a/MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveState.uni b/MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveState.uni index 6fbf297333..9d8431edb9 100644 --- a/MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveState.uni +++ b/MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveState.uni @@ -3,13 +3,13 @@ // // It will install S3 SMM Save State protocol to store or record various IO operations to be replayed during an S3 resume. // -// Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials are // licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveStateExtra.uni b/MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveStateExtra.uni index 531138b8b6..676241c7e7 100644 --- a/MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveStateExtra.uni +++ b/MdeModulePkg/Universal/Acpi/SmmS3SaveState/SmmS3SaveStateExtra.uni @@ -1,7 +1,7 @@ // /** @file // SmmS3SaveState Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials are // licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "SMM S3 Save State Driver" diff --git a/MdeModulePkg/Universal/BdsDxe/Bds.h b/MdeModulePkg/Universal/BdsDxe/Bds.h index 63d961fd20..6c250dd577 100644 --- a/MdeModulePkg/Universal/BdsDxe/Bds.h +++ b/MdeModulePkg/Universal/BdsDxe/Bds.h @@ -78,14 +78,14 @@ BdsEntry ( then EFI_INVALID_PARAMETER is returned. @param VendorGuid A unique identifier for the vendor. @param Attributes Attributes bitmask to set for the variable. - @param DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE, + @param DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE, or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS attribute is set, a size of zero - causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is - set, then a SetVariable() call with a DataSize of zero will not cause any change to - the variable value (the timestamp associated with the variable may be updated however - even if no new data value is provided,see the description of the - EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not - be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated). + causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is + set, then a SetVariable() call with a DataSize of zero will not cause any change to + the variable value (the timestamp associated with the variable may be updated however + even if no new data value is provided,see the description of the + EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not + be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated). @param Data The contents for the variable. @retval EFI_SUCCESS The firmware has successfully stored the variable and its data as diff --git a/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf b/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf index eb78d06176..7e644aa995 100644 --- a/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf +++ b/MdeModulePkg/Universal/BdsDxe/BdsDxe.inf @@ -1,10 +1,10 @@ ## @file # BdsDxe module is core driver for BDS phase. # -# When DxeCore dispatching all DXE driver, this module will produce architecture protocol +# When DxeCore dispatching all DXE driver, this module will produce architecture protocol # gEfiBdsArchProtocolGuid. After DxeCore finish dispatching, DxeCore will invoke Entry # interface of protocol gEfiBdsArchProtocolGuid, then BDS phase is entered. -# +# # Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -22,7 +22,7 @@ MODULE_UNI_FILE = BdsDxe.uni FILE_GUID = 6D33944A-EC75-4855-A54D-809C75241F6C MODULE_TYPE = DXE_DRIVER - VERSION_STRING = 1.0 + VERSION_STRING = 1.0 ENTRY_POINT = BdsInitialize # diff --git a/MdeModulePkg/Universal/BdsDxe/BdsDxe.uni b/MdeModulePkg/Universal/BdsDxe/BdsDxe.uni index 6f2758b017..69b48f87f1 100644 --- a/MdeModulePkg/Universal/BdsDxe/BdsDxe.uni +++ b/MdeModulePkg/Universal/BdsDxe/BdsDxe.uni @@ -5,12 +5,12 @@ // gEfiBdsArchProtocolGuid. After DxeCore finish dispatching, DxeCore will invoke Entry // interface of protocol gEfiBdsArchProtocolGuid, then BDS phase is entered. // -// Copyright (c) 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
// This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/BdsDxe/BdsDxeExtra.uni b/MdeModulePkg/Universal/BdsDxe/BdsDxeExtra.uni index e3f1fe82b7..4201f46478 100644 --- a/MdeModulePkg/Universal/BdsDxe/BdsDxeExtra.uni +++ b/MdeModulePkg/Universal/BdsDxe/BdsDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // BdsDxe Localized Strings and Content // -// Copyright (c) 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Boot Device Selection Core DXE Driver" diff --git a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c index acb25abfcd..49e403e181 100644 --- a/MdeModulePkg/Universal/BdsDxe/BdsEntry.c +++ b/MdeModulePkg/Universal/BdsDxe/BdsEntry.c @@ -293,9 +293,9 @@ BdsReadKeys ( } while (gST->ConIn != NULL) { - + Status = gST->ConIn->ReadKeyStroke (gST->ConIn, &Key); - + if (EFI_ERROR (Status)) { // // No more keys. @@ -488,10 +488,10 @@ ProcessLoadOptions ( /** - Validate input console variable data. + Validate input console variable data. If found the device path is not a valid device path, remove the variable. - + @param VariableName Input console variable name. **/ @@ -505,7 +505,7 @@ BdsFormalizeConsoleVariable ( EFI_STATUS Status; GetEfiGlobalVariable2 (VariableName, (VOID **) &DevicePath, &VariableSize); - if ((DevicePath != NULL) && !IsDevicePathValid (DevicePath, VariableSize)) { + if ((DevicePath != NULL) && !IsDevicePathValid (DevicePath, VariableSize)) { Status = gRT->SetVariable ( VariableName, &gEfiGlobalVariableGuid, @@ -525,17 +525,17 @@ BdsFormalizeConsoleVariable ( } /** - Formalize OsIndication related variables. - - For OsIndicationsSupported, Create a BS/RT/UINT64 variable to report caps + Formalize OsIndication related variables. + + For OsIndicationsSupported, Create a BS/RT/UINT64 variable to report caps Delete OsIndications variable if it is not NV/BS/RT UINT64. - + Item 3 is used to solve case when OS corrupts OsIndications. Here simply delete this NV variable. Create a boot option for BootManagerMenu if it hasn't been created yet **/ -VOID +VOID BdsFormalizeOSIndicationVariable ( VOID ) @@ -613,10 +613,10 @@ BdsFormalizeOSIndicationVariable ( /** - Validate variables. + Validate variables. **/ -VOID +VOID BdsFormalizeEfiGlobalVariable ( VOID ) @@ -884,7 +884,7 @@ BdsEntry ( // Possible things that can be done in PlatformBootManagerBeforeConsole: // > Update console variable: 1. include hot-plug devices; 2. Clear ConIn and add SOL for AMT // > Register new Driver#### or Boot#### - // > Register new Key####: e.g.: F12 + // > Register new Key####: e.g.: F12 // > Signal ReadyToLock event // > Authentication action: 1. connect Auth devices; 2. Identify auto logon user. // @@ -929,7 +929,7 @@ BdsEntry ( // > Connect certain devices // > Dispatch aditional option roms // > Special boot: e.g.: USB boot, enter UI - // + // PERF_INMODULE_BEGIN("PlatformBootManagerAfterConsole"); PlatformBootManagerAfterConsole (); PERF_INMODULE_END("PlatformBootManagerAfterConsole"); @@ -981,7 +981,7 @@ BdsEntry ( PlatformRecovery = (BOOLEAN) ((OsIndication & EFI_OS_INDICATIONS_START_PLATFORM_RECOVERY) != 0); // // Clear EFI_OS_INDICATIONS_BOOT_TO_FW_UI to acknowledge OS - // + // if (BootFwUi || PlatformRecovery) { OsIndication &= ~((UINT64) (EFI_OS_INDICATIONS_BOOT_TO_FW_UI | EFI_OS_INDICATIONS_START_PLATFORM_RECOVERY)); Status = gRT->SetVariable ( @@ -1059,7 +1059,7 @@ BdsEntry ( if (!EFI_ERROR (Status)) { EfiBootManagerBoot (&LoadOption); EfiBootManagerFreeLoadOption (&LoadOption); - if ((LoadOption.Status == EFI_SUCCESS) && + if ((LoadOption.Status == EFI_SUCCESS) && (BootManagerMenuStatus != EFI_NOT_FOUND) && (LoadOption.OptionNumber != BootManagerMenu.OptionNumber)) { // @@ -1107,14 +1107,14 @@ BdsEntry ( then EFI_INVALID_PARAMETER is returned. @param VendorGuid A unique identifier for the vendor. @param Attributes Attributes bitmask to set for the variable. - @param DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE, + @param DataSize The size in bytes of the Data buffer. Unless the EFI_VARIABLE_APPEND_WRITE, or EFI_VARIABLE_TIME_BASED_AUTHENTICATED_WRITE_ACCESS attribute is set, a size of zero - causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is - set, then a SetVariable() call with a DataSize of zero will not cause any change to - the variable value (the timestamp associated with the variable may be updated however - even if no new data value is provided,see the description of the - EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not - be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated). + causes the variable to be deleted. When the EFI_VARIABLE_APPEND_WRITE attribute is + set, then a SetVariable() call with a DataSize of zero will not cause any change to + the variable value (the timestamp associated with the variable may be updated however + even if no new data value is provided,see the description of the + EFI_VARIABLE_AUTHENTICATION_2 descriptor below. In this case the DataSize will not + be zero since the EFI_VARIABLE_AUTHENTICATION_2 descriptor will be populated). @param Data The contents for the variable. @retval EFI_SUCCESS The firmware has successfully stored the variable and its data as diff --git a/MdeModulePkg/Universal/BdsDxe/HwErrRecSupport.c b/MdeModulePkg/Universal/BdsDxe/HwErrRecSupport.c index 87e39c3c8d..94c72cf984 100644 --- a/MdeModulePkg/Universal/BdsDxe/HwErrRecSupport.c +++ b/MdeModulePkg/Universal/BdsDxe/HwErrRecSupport.c @@ -2,7 +2,7 @@ Set the level of support for Hardware Error Record Persistence that is implemented by the platform. -Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -28,9 +28,9 @@ InitializeHwErrRecSupport ( { EFI_STATUS Status; UINT16 HardwareErrorRecordLevel; - + HardwareErrorRecordLevel = PcdGet16 (PcdHardwareErrorRecordLevel); - + if (HardwareErrorRecordLevel != 0) { // // If level value equal 0, no need set to 0 to variable area because UEFI specification diff --git a/MdeModulePkg/Universal/BdsDxe/Language.c b/MdeModulePkg/Universal/BdsDxe/Language.c index 09127316fb..3e6022f840 100644 --- a/MdeModulePkg/Universal/BdsDxe/Language.c +++ b/MdeModulePkg/Universal/BdsDxe/Language.c @@ -1,7 +1,7 @@ /** @file Language settings -Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -47,7 +47,7 @@ IsLangInSupportedLangCodes( IN CHAR8 *SupportedLang, IN CHAR8 *Lang, IN BOOLEAN Iso639Language - ) + ) { UINTN Index; UINTN CompareLength; @@ -79,8 +79,8 @@ IsLangInSupportedLangCodes( // Determine the length of the next language code in SupportedLang // for (CompareLength = 0; SupportedLang[CompareLength] != '\0' && SupportedLang[CompareLength] != ';'; CompareLength++); - - if ((CompareLength == LanguageLength) && + + if ((CompareLength == LanguageLength) && (AsciiStrnCmp (Lang, SupportedLang, CompareLength) == 0)) { // // Successfully find the Lang string in SupportedLang string. @@ -108,7 +108,7 @@ VOID InitializeLangVariable ( IN CHAR16 *LangName, IN CHAR8 *SupportedLang, - IN CHAR8 *DefaultLang, + IN CHAR8 *DefaultLang, IN BOOLEAN Iso639Language ) { diff --git a/MdeModulePkg/Universal/BootManagerPolicyDxe/BootManagerPolicyDxe.c b/MdeModulePkg/Universal/BootManagerPolicyDxe/BootManagerPolicyDxe.c index 412ecbda55..a044eaf22c 100644 --- a/MdeModulePkg/Universal/BootManagerPolicyDxe/BootManagerPolicyDxe.c +++ b/MdeModulePkg/Universal/BootManagerPolicyDxe/BootManagerPolicyDxe.c @@ -1,7 +1,7 @@ /** @file This module produces Boot Manager Policy protocol. -Copyright (c) 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -139,7 +139,7 @@ ConnectNetwork ( system will be connected using the platforms EFI Boot Manager policy. @param[in] Recursive If TRUE, then ConnectController() is called recursively - until the entire tree of controllers below the + until the entire tree of controllers below the controller specified by DevicePath have been created. If FALSE, then the tree of controllers is only expanded one level. If DevicePath is NULL then Recursive is ignored. @@ -147,7 +147,7 @@ ConnectNetwork ( @retval EFI_SUCCESS The DevicePath was connected. @retval EFI_NOT_FOUND The DevicePath was not found. @retval EFI_NOT_FOUND No driver was connected to DevicePath. - @retval EFI_SECURITY_VIOLATION The user has no permission to start UEFI device + @retval EFI_SECURITY_VIOLATION The user has no permission to start UEFI device drivers on the DevicePath. @retval EFI_UNSUPPORTED The current TPL is not TPL_APPLICATION. **/ @@ -188,7 +188,7 @@ BootManagerPolicyConnectDevicePath ( Manager connect a class of devices. If Class is EFI_BOOT_MANAGER_POLICY_CONSOLE_GUID then the Boot Manager will - use platform policy to connect consoles. Some platforms may restrict the + use platform policy to connect consoles. Some platforms may restrict the number of consoles connected as they attempt to fast boot, and calling ConnectDeviceClass() with a Class value of EFI_BOOT_MANAGER_POLICY_CONSOLE_GUID must connect the set of consoles that follow the Boot Manager platform policy, @@ -206,7 +206,7 @@ BootManagerPolicyConnectDevicePath ( application that called ConnectDeviceClass() may need to use the published protocols to establish the network connection. The Boot Manager can optionally have a policy to establish a network connection. - + If Class is EFI_BOOT_MANAGER_POLICY_CONNECT_ALL_GUID then the Boot Manager will connect all UEFI drivers using the UEFI Boot Service EFI_BOOT_SERVICES.ConnectController(). If the Boot Manager has policy @@ -223,7 +223,7 @@ BootManagerPolicyConnectDevicePath ( @retval EFI_DEVICE_ERROR Devices were not connected due to an error. @retval EFI_NOT_FOUND The Class is not supported by the platform. @retval EFI_UNSUPPORTED The current TPL is not TPL_APPLICATION. -**/ +**/ EFI_STATUS EFIAPI BootManagerPolicyConnectDeviceClass ( diff --git a/MdeModulePkg/Universal/BootManagerPolicyDxe/BootManagerPolicyDxe.inf b/MdeModulePkg/Universal/BootManagerPolicyDxe/BootManagerPolicyDxe.inf index 488f421341..33014723d0 100644 --- a/MdeModulePkg/Universal/BootManagerPolicyDxe/BootManagerPolicyDxe.inf +++ b/MdeModulePkg/Universal/BootManagerPolicyDxe/BootManagerPolicyDxe.inf @@ -1,7 +1,7 @@ ## @file # This module produces Boot Manager Policy protocol. -# -# Copyright (c) 2015, Intel Corporation. All rights reserved.
+# +# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at @@ -18,7 +18,7 @@ MODULE_UNI_FILE = BootManagerPolicyDxe.uni FILE_GUID = E622443C-284E-4b47-A984-FD66B482DAC0 MODULE_TYPE = DXE_DRIVER - VERSION_STRING = 1.0 + VERSION_STRING = 1.0 ENTRY_POINT = BootManagerPolicyInitialize # diff --git a/MdeModulePkg/Universal/BootManagerPolicyDxe/BootManagerPolicyDxe.uni b/MdeModulePkg/Universal/BootManagerPolicyDxe/BootManagerPolicyDxe.uni index 487299c41f..c73fe3077f 100644 --- a/MdeModulePkg/Universal/BootManagerPolicyDxe/BootManagerPolicyDxe.uni +++ b/MdeModulePkg/Universal/BootManagerPolicyDxe/BootManagerPolicyDxe.uni @@ -1,12 +1,12 @@ // /** @file // This module produces Boot Manager Policy protocol. // -// Copyright (c) 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
// This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/BootManagerPolicyDxe/BootManagerPolicyDxeExtra.uni b/MdeModulePkg/Universal/BootManagerPolicyDxe/BootManagerPolicyDxeExtra.uni index a87e296075..45b6bf1ec3 100644 --- a/MdeModulePkg/Universal/BootManagerPolicyDxe/BootManagerPolicyDxeExtra.uni +++ b/MdeModulePkg/Universal/BootManagerPolicyDxe/BootManagerPolicyDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // This module produces Boot Manager Policy protocol. // -// Copyright (c) 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Boot Manager Policy DXE Driver" diff --git a/MdeModulePkg/Universal/CapsulePei/Capsule.h b/MdeModulePkg/Universal/CapsulePei/Capsule.h index 3614c21f87..3b8d8a9321 100644 --- a/MdeModulePkg/Universal/CapsulePei/Capsule.h +++ b/MdeModulePkg/Universal/CapsulePei/Capsule.h @@ -1,6 +1,6 @@ /** @file -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions @@ -40,7 +40,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include "Common/CommonHeader.h" -#ifdef MDE_CPU_IA32 +#ifdef MDE_CPU_IA32 #pragma pack(1) @@ -79,7 +79,7 @@ typedef union { UINT64 CacheDisabled:1; // 0 = Cached, 1=Non-Cached UINT64 Accessed:1; // 0 = Not accessed, 1 = Accessed (set by CPU) UINT64 Dirty:1; // 0 = Not Dirty, 1 = written by processor on access to page - UINT64 MustBe1:1; // Must be 1 + UINT64 MustBe1:1; // Must be 1 UINT64 Global:1; // 0 = Not global page, 1 = global page TLB not cleared on CR3 write UINT64 Available:3; // Available for use by system software UINT64 PAT:1; // @@ -103,7 +103,7 @@ typedef union { UINT64 CacheDisabled:1; // 0 = Cached, 1=Non-Cached UINT64 Accessed:1; // 0 = Not accessed, 1 = Accessed (set by CPU) UINT64 Dirty:1; // 0 = Not Dirty, 1 = written by processor on access to page - UINT64 MustBe1:1; // Must be 1 + UINT64 MustBe1:1; // Must be 1 UINT64 Global:1; // 0 = Not global page, 1 = global page TLB not cleared on CR3 write UINT64 Available:3; // Available for use by system software UINT64 PAT:1; // diff --git a/MdeModulePkg/Universal/CapsulePei/CapsulePei.inf b/MdeModulePkg/Universal/CapsulePei/CapsulePei.inf index c54bc21a95..02cf90c75d 100644 --- a/MdeModulePkg/Universal/CapsulePei/CapsulePei.inf +++ b/MdeModulePkg/Universal/CapsulePei/CapsulePei.inf @@ -6,7 +6,7 @@ # This external input must be validated carefully to avoid security issue like # buffer overflow, integer overflow. # -# Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# Copyright (c) 2017, AMD Incorporated. All rights reserved.
# # This program and the accompanying materials @@ -39,7 +39,7 @@ [Sources] UefiCapsule.c Capsule.h - Common/CapsuleCoalesce.c + Common/CapsuleCoalesce.c [Packages] MdePkg/MdePkg.dec @@ -70,8 +70,8 @@ [Ppis] gEfiPeiReadOnlyVariable2PpiGuid ## CONSUMES gEfiPeiCapsulePpiGuid ## PRODUCES - -[Ppis.IA32] + +[Ppis.IA32] gEfiPeiLoadFilePpiGuid ## SOMETIMES_CONSUMES [Pcd.IA32] diff --git a/MdeModulePkg/Universal/CapsulePei/CapsulePei.uni b/MdeModulePkg/Universal/CapsulePei/CapsulePei.uni index 227a965d19..8835dc3956 100644 --- a/MdeModulePkg/Universal/CapsulePei/CapsulePei.uni +++ b/MdeModulePkg/Universal/CapsulePei/CapsulePei.uni @@ -6,14 +6,14 @@ // This external input must be validated carefully to avoid security issue like // buffer overflow, integer overflow. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions // of the BSD License which accompanies this distribution. The // full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/CapsulePei/CapsulePeiExtra.uni b/MdeModulePkg/Universal/CapsulePei/CapsulePeiExtra.uni index d6d3a67d8f..4c6e1016ff 100644 --- a/MdeModulePkg/Universal/CapsulePei/CapsulePeiExtra.uni +++ b/MdeModulePkg/Universal/CapsulePei/CapsulePeiExtra.uni @@ -1,7 +1,7 @@ // /** @file // CapsulePei Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions @@ -14,8 +14,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Firmware Update PEI Module" diff --git a/MdeModulePkg/Universal/CapsulePei/CapsuleX64.uni b/MdeModulePkg/Universal/CapsulePei/CapsuleX64.uni index 731cf14e59..44e07728b9 100644 --- a/MdeModulePkg/Universal/CapsulePei/CapsuleX64.uni +++ b/MdeModulePkg/Universal/CapsulePei/CapsuleX64.uni @@ -3,20 +3,20 @@ // // The X64 entrypoint to process capsule in long mode. // This module is built as X64. -// +// // Caution: This module requires additional review when modified. // This driver will have external input - capsule image. // This external input must be validated carefully to avoid security issue like // buffer overflow, integer overflow. // -// Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions // of the BSD License which accompanies this distribution. The // full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/CapsulePei/CapsuleX64Extra.uni b/MdeModulePkg/Universal/CapsulePei/CapsuleX64Extra.uni index 5395ec576c..152a520eb2 100644 --- a/MdeModulePkg/Universal/CapsulePei/CapsuleX64Extra.uni +++ b/MdeModulePkg/Universal/CapsulePei/CapsuleX64Extra.uni @@ -1,7 +1,7 @@ // /** @file // CapsuleX64 Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions @@ -14,8 +14,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Firmware Update PEI Module over 4GB" diff --git a/MdeModulePkg/Universal/CapsulePei/Common/CapsuleCoalesce.c b/MdeModulePkg/Universal/CapsulePei/Common/CapsuleCoalesce.c index 3e7054cd38..3575a94d0f 100644 --- a/MdeModulePkg/Universal/CapsulePei/Common/CapsuleCoalesce.c +++ b/MdeModulePkg/Universal/CapsulePei/Common/CapsuleCoalesce.c @@ -10,7 +10,7 @@ into memory. (C) Copyright 2014 Hewlett-Packard Development Company, L.P.
-Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -45,7 +45,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @param MemSize The size of the block of memory pointed to by MemBase @param DataSize How big a free block we want to find - @return A pointer to a memory block of at least DataSize that lies somewhere + @return A pointer to a memory block of at least DataSize that lies somewhere between MemBase and (MemBase + MemSize). The memory pointed to does not contain any of the capsule block descriptors or capsule blocks pointed to by the BlockList. @@ -75,7 +75,7 @@ FindFreeMem ( @param MemSize size of the system memory pointed to by MemBase @retval NULL could not relocate the descriptors - @retval Pointer to the base of the successfully-relocated block descriptors. + @retval Pointer to the base of the successfully-relocated block descriptors. **/ EFI_CAPSULE_BLOCK_DESCRIPTOR * @@ -93,7 +93,7 @@ RelocateBlockDescriptors ( @param CapsuleHeader The pointer to EFI_CAPSULE_HEADER @retval FALSE Capsule is OK - @retval TRUE Capsule is corrupted + @retval TRUE Capsule is corrupted **/ BOOLEAN @@ -153,7 +153,7 @@ GetCapsuleInfo ( @param MemSize The size of the block of memory pointed to by MemBase @param DataSize How big a free block we want to find - @return A pointer to a memory block of at least DataSize that lies somewhere + @return A pointer to a memory block of at least DataSize that lies somewhere between MemBase and (MemBase + MemSize). The memory pointed to does not contain any of the capsule block descriptors or capsule blocks pointed to by the BlockList. @@ -321,7 +321,7 @@ ValidateCapsuleIntegrity ( // * The first capsule header flag // * The first capsule header HeaderSize // * Below check will be done in ValidateCapsuleByMemoryResource() - // Length > MAX_ADDRESS + // Length > MAX_ADDRESS // Ptr + sizeof (EFI_CAPSULE_BLOCK_DESCRIPTOR) > MAX_ADDRESS // DataBlock + Length > MAX_ADDRESS // @@ -450,7 +450,7 @@ ValidateCapsuleIntegrity ( @param MemSize size of the system memory pointed to by MemBase @retval NULL could not relocate the descriptors - @retval Pointer to the base of the successfully-relocated block descriptors. + @retval Pointer to the base of the successfully-relocated block descriptors. **/ EFI_CAPSULE_BLOCK_DESCRIPTOR * @@ -737,7 +737,7 @@ GetCapsuleInfo ( @param CapsuleHeader The pointer to EFI_CAPSULE_HEADER @retval FALSE Capsule is OK - @retval TRUE Capsule is corrupted + @retval TRUE Capsule is corrupted **/ BOOLEAN @@ -769,7 +769,7 @@ IsCapsuleCorrupted ( capsule gets coalesced. This can be useful in narrowing down where capsule data corruption occurs. - The test pattern mode fills in memory with a counting UINT32 value. + The test pattern mode fills in memory with a counting UINT32 value. If the capsule is not divided up in a multiple of 4-byte blocks, then things get messy doing the check. Therefore there are some cases here where we just give up and skip the pre-coalesce check. @@ -865,7 +865,7 @@ EFI_STATUS BuildCapsuleDescriptors ( IN EFI_PHYSICAL_ADDRESS *BlockListBuffer, IN MEMORY_RESOURCE_DESCRIPTOR *MemoryResource, - OUT EFI_CAPSULE_BLOCK_DESCRIPTOR **BlockDescriptorList + OUT EFI_CAPSULE_BLOCK_DESCRIPTOR **BlockDescriptorList ) { UINTN Index; @@ -908,7 +908,7 @@ BuildCapsuleDescriptors ( } Index ++; } - + if (HeadBlock != NULL) { *BlockDescriptorList = HeadBlock; return EFI_SUCCESS; @@ -930,7 +930,7 @@ BuildCapsuleDescriptors ( | ------------------------- | | | | Capsule [0] | | | | ------------------------- | | - | Capsule Image | | + | Capsule Image | | CapsuleImageBase-->+---------------------------+ | ------------------------- | | | | CapsuleOffset[Num-1] | | | @@ -1004,9 +1004,9 @@ CapsuleDataCoalesce ( UINT8 *DestPtr; UINTN DestLength; UINT8 *RelocPtr; - UINTN CapsuleTimes; - UINT64 SizeLeft; - UINT64 CapsuleImageSize; + UINTN CapsuleTimes; + UINT64 SizeLeft; + UINT64 CapsuleImageSize; UINTN CapsuleSize; UINTN CapsuleNumber; UINTN DescriptorsSize; @@ -1265,7 +1265,7 @@ CapsuleDataCoalesce ( // //Here is the end of the current capsule image. // - CapsuleBeginFlag = TRUE; + CapsuleBeginFlag = TRUE; } } else { // diff --git a/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c b/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c index 043365f7f7..1131094c4f 100644 --- a/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c +++ b/MdeModulePkg/Universal/CapsulePei/UefiCapsule.c @@ -1,7 +1,7 @@ /** @file Capsule update PEIM for UEFI2.0 -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
Copyright (c) 2017, AMD Incorporated. All rights reserved.
This program and the accompanying materials @@ -133,7 +133,7 @@ Create4GPageTables ( IN EFI_PHYSICAL_ADDRESS PageTablesAddress, IN BOOLEAN Page1GSupport ) -{ +{ UINT8 PhysicalAddressBits; EFI_PHYSICAL_ADDRESS PageAddress; UINTN IndexOfPml4Entries; @@ -172,7 +172,7 @@ Create4GPageTables ( } // - // Pre-allocate big pages to avoid later allocations. + // Pre-allocate big pages to avoid later allocations. // BigPageAddress = (UINTN) PageTablesAddress; @@ -201,7 +201,7 @@ Create4GPageTables ( if (Page1GSupport) { PageDirectory1GEntry = (VOID *) PageDirectoryPointerEntry; - + for (IndexOfPageDirectoryEntries = 0; IndexOfPageDirectoryEntries < 512; IndexOfPageDirectoryEntries++, PageDirectory1GEntry++, PageAddress += SIZE_1GB) { // // Fill in the Page Directory entries @@ -216,7 +216,7 @@ Create4GPageTables ( // // Each Directory Pointer entries points to a page of Page Directory entires. // So allocate space for them and fill them in in the IndexOfPageDirectoryEntries loop. - // + // PageDirectoryEntry = (VOID *) BigPageAddress; BigPageAddress += SIZE_4KB; @@ -360,7 +360,7 @@ Thunk32To64 ( if ((UINTN) ReturnContext->ReturnStatus != 0) { Status = ENCODE_ERROR ((UINTN) ReturnContext->ReturnStatus); } - + return Status; } @@ -401,7 +401,7 @@ ModeSwitch ( ZeroMem (&Context, sizeof (SWITCH_32_TO_64_CONTEXT)); ZeroMem (&ReturnContext, sizeof (SWITCH_64_TO_32_CONTEXT)); - + MemoryBase64 = (UINT64) (UINTN) *MemoryBase; MemorySize64 = (UINT64) (UINTN) *MemorySize; MemoryEnd64 = MemoryBase64 + MemorySize64; @@ -409,7 +409,7 @@ ModeSwitch ( Page1GSupport = IsPage1GSupport (); // - // Merge memory range reserved for stack and page table + // Merge memory range reserved for stack and page table // if (LongModeBuffer->StackBaseAddress < LongModeBuffer->PageTableAddress) { ReservedRangeBase = LongModeBuffer->StackBaseAddress; @@ -462,14 +462,14 @@ ModeSwitch ( // Will save the return status of processing capsule // ReturnContext.ReturnStatus = 0; - + // // Save original GDT // AsmReadGdtr ((IA32_DESCRIPTOR *)&ReturnContext.Gdtr); - + Status = Thunk32To64 (LongModeBuffer->PageTableAddress, &Context, &ReturnContext); - + if (!EFI_ERROR (Status)) { *MemoryBase = (VOID *) (UINTN) MemoryBase64; *MemorySize = (UINTN) MemorySize64; @@ -685,7 +685,7 @@ MergeMemoryResourceDescriptor ( if (NewMemoryResourceEntry != MemoryResourceEntry) { NewMemoryResourceEntry->ResourceLength += NextMemoryResourceEntry->ResourceLength; } - + NextMemoryResourceEntry = NextMemoryResourceEntry + 1; } @@ -743,7 +743,7 @@ BuildMemoryResourceDescriptor ( Status = PeiServicesAllocatePool ((1 + 1) * sizeof (MEMORY_RESOURCE_DESCRIPTOR), (VOID **) &MemoryResource); ASSERT_EFI_ERROR (Status); ZeroMem (MemoryResource, (1 + 1) * sizeof (MEMORY_RESOURCE_DESCRIPTOR)); - + MemoryResource[0].PhysicalStart = 0; MemoryResource[0].ResourceLength = LShiftU64 (1, GetPhysicalAddressBits ()); DEBUG ((EFI_D_INFO, "MemoryResource[0x0] - Start(0x%0lx) Length(0x%0lx)\n", @@ -828,7 +828,7 @@ GetCapsuleDescriptors ( CapsuleVarName[0] = 0; ValidIndex = 0; CapsuleDataPtr64 = 0; - + Status = PeiServicesLocatePpi ( &gEfiPeiReadOnlyVariable2PpiGuid, 0, @@ -885,7 +885,7 @@ GetCapsuleDescriptors ( if (EFI_ERROR (Status)) { break; } - + // // If this BlockList has been linked before, skip this variable // @@ -901,7 +901,7 @@ GetCapsuleDescriptors ( continue; } } - + // // Cache BlockList which has been processed // @@ -909,7 +909,7 @@ GetCapsuleDescriptors ( Index ++; } } - + return EFI_SUCCESS; } @@ -949,7 +949,7 @@ CapsuleCoalesce ( UINTN VariableCount; CHAR16 CapsuleVarName[30]; CHAR16 *TempVarName; - EFI_PHYSICAL_ADDRESS CapsuleDataPtr64; + EFI_PHYSICAL_ADDRESS CapsuleDataPtr64; EFI_STATUS Status; EFI_BOOT_MODE BootMode; EFI_PEI_READ_ONLY_VARIABLE2_PPI *PPIVariableServices; @@ -973,11 +973,11 @@ CapsuleCoalesce ( // Status = PeiServicesGetBootMode (&BootMode); if (EFI_ERROR (Status) || (BootMode != BOOT_ON_FLASH_UPDATE)) { - DEBUG ((EFI_D_ERROR, "Boot mode is not correct for capsule update path.\n")); + DEBUG ((EFI_D_ERROR, "Boot mode is not correct for capsule update path.\n")); Status = EFI_NOT_FOUND; goto Done; } - + // // User may set the same ScatterGatherList with several different variables, // so cache all ScatterGatherList for check later. @@ -1022,9 +1022,9 @@ CapsuleCoalesce ( VariableCount++; Index++; } - + DEBUG ((EFI_D_INFO,"Capsule variable count = %d\n", VariableCount)); - + // // The last entry is the end flag. // @@ -1037,9 +1037,9 @@ CapsuleCoalesce ( DEBUG ((EFI_D_ERROR, "AllocatePages Failed!, Status = %x\n", Status)); goto Done; } - + ZeroMem (VariableArrayAddress, (VariableCount + 1) * sizeof (EFI_PHYSICAL_ADDRESS)); - + // // Find out if we actually have a capsule. // GetCapsuleDescriptors depends on variable PPI, so it should run in 32-bit environment. @@ -1068,7 +1068,7 @@ CapsuleCoalesce ( Status = EFI_NOT_FOUND; goto Done; } - + Status = FindCapsuleCoalesceImage (&CoalesceImageEntryPoint, &CoalesceImageMachineType); if ((EFI_ERROR (Status)) || (CoalesceImageMachineType != EFI_IMAGE_MACHINE_X64)) { DEBUG ((EFI_D_ERROR, "Fail to find CapsuleX64 module in FV!\n")); @@ -1090,13 +1090,13 @@ CapsuleCoalesce ( // Status = CapsuleDataCoalesce (PeiServices, (EFI_PHYSICAL_ADDRESS *)(UINTN)VariableArrayAddress, MemoryResource, MemoryBase, MemorySize); #endif - + DEBUG ((EFI_D_INFO, "Capsule Coalesce Status = %r!\n", Status)); if (Status == EFI_BUFFER_TOO_SMALL) { DEBUG ((EFI_D_ERROR, "There is not enough memory to process capsule!\n")); } - + if (Status == EFI_NOT_FOUND) { DEBUG ((EFI_D_ERROR, "Fail to parse capsule descriptor in memory!\n")); REPORT_STATUS_CODE ( @@ -1129,9 +1129,9 @@ CheckCapsuleUpdate ( return Status; } /** - This function will look at a capsule and determine if it's a test pattern. + This function will look at a capsule and determine if it's a test pattern. If it is, then it will verify it and emit an error message if corruption is detected. - + @param PeiServices Standard pei services pointer @param CapsuleBase Base address of coalesced capsule, which is preceeded by private data. Very implementation specific. @@ -1220,7 +1220,7 @@ CreateState ( UINT32 Index; EFI_PHYSICAL_ADDRESS BaseAddress; UINT64 Length; - + PrivateData = (EFI_CAPSULE_PEIM_PRIVATE_DATA *) CapsuleBase; if (PrivateData->Signature != EFI_CAPSULE_PEIM_PRIVATE_DATA_SIGNATURE) { return EFI_VOLUME_CORRUPTED; @@ -1276,7 +1276,7 @@ CreateState ( BuildCvHob (BaseAddress, Length); } - + return EFI_SUCCESS; } diff --git a/MdeModulePkg/Universal/CapsulePei/X64/X64Entry.c b/MdeModulePkg/Universal/CapsulePei/X64/X64Entry.c index e1871c3c2a..40b7095194 100644 --- a/MdeModulePkg/Universal/CapsulePei/X64/X64Entry.c +++ b/MdeModulePkg/Universal/CapsulePei/X64/X64Entry.c @@ -1,7 +1,7 @@ /** @file The X64 entrypoint is used to process capsule in long mode. -Copyright (c) 2011 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
Copyright (c) 2017, AMD Incorporated. All rights reserved.
This program and the accompanying materials @@ -165,7 +165,7 @@ PageFaultHandler ( // // Get the IDT Descriptor. // - AsmReadIdtr ((IA32_DESCRIPTOR *) &Idtr); + AsmReadIdtr ((IA32_DESCRIPTOR *) &Idtr); // // Then get page fault context by IDT Descriptor. // @@ -233,7 +233,7 @@ _ModuleEntryPoint ( // // Save the IA32 IDT Descriptor // - AsmReadIdtr ((IA32_DESCRIPTOR *) &Ia32Idtr); + AsmReadIdtr ((IA32_DESCRIPTOR *) &Ia32Idtr); // // Setup X64 IDT table @@ -241,7 +241,7 @@ _ModuleEntryPoint ( ZeroMem (PageFaultIdtTable.IdtEntryTable, sizeof (IA32_IDT_GATE_DESCRIPTOR) * EXCEPTION_VECTOR_NUMBER); X64Idtr.Base = (UINTN) PageFaultIdtTable.IdtEntryTable; X64Idtr.Limit = (UINT16) (sizeof (IA32_IDT_GATE_DESCRIPTOR) * EXCEPTION_VECTOR_NUMBER - 1); - AsmWriteIdtr ((IA32_DESCRIPTOR *) &X64Idtr); + AsmWriteIdtr ((IA32_DESCRIPTOR *) &X64Idtr); // // Setup the default CPU exception handlers @@ -272,7 +272,7 @@ _ModuleEntryPoint ( (VOID **) (UINTN) EntrypointContext->MemoryBase64Ptr, (UINTN *) (UINTN) EntrypointContext->MemorySize64Ptr ); - + ReturnContext->ReturnStatus = Status; DEBUG (( @@ -290,8 +290,8 @@ _ModuleEntryPoint ( // // Restore IA32 IDT table // - AsmWriteIdtr ((IA32_DESCRIPTOR *) &Ia32Idtr); - + AsmWriteIdtr ((IA32_DESCRIPTOR *) &Ia32Idtr); + // // Finish to coalesce capsule, and return to 32-bit mode. // @@ -301,8 +301,8 @@ _ModuleEntryPoint ( (UINT32) (UINTN) EntrypointContext, (UINT32) (UINTN) ReturnContext, (UINT32) (EntrypointContext->StackBufferBase + EntrypointContext->StackBufferLength) - ); - + ); + // // Should never be here. // diff --git a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf index 43a29ee229..3849bc84a8 100644 --- a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf +++ b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.inf @@ -1,18 +1,18 @@ ## @file # Capsule Runtime Driver produces two UEFI capsule runtime services: (UpdateCapsule, QueryCapsuleCapabilities). # -# It installs the Capsule Architectural Protocol defined in PI1.0a to signify +# It installs the Capsule Architectural Protocol defined in PI1.0a to signify # the capsule runtime services are ready. -# -# Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+# +# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# +# ## [Defines] diff --git a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.uni b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.uni index 8fdf7097a9..cf93e22947 100644 --- a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.uni +++ b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxe.uni @@ -4,13 +4,13 @@ // It installs the Capsule Architectural Protocol defined in PI1.0a to signify // the capsule runtime services are ready. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxeExtra.uni b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxeExtra.uni index 50acf088f1..00d75c3214 100644 --- a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxeExtra.uni +++ b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleRuntimeDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // CapsuleRuntimeDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Runtime Firmware Update DXE Driver" diff --git a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c index 23fd6d59c5..9e5fc9f83b 100644 --- a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c +++ b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.c @@ -1,10 +1,10 @@ /** @file Capsule Runtime Driver produces two UEFI capsule runtime services. (UpdateCapsule, QueryCapsuleCapabilities) - It installs the Capsule Architectural Protocol defined in PI1.0a to signify + It installs the Capsule Architectural Protocol defined in PI1.0a to signify the capsule runtime services are ready. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -54,10 +54,10 @@ UINT32 mMaxSizeNonPopulateCapsule = 0; @retval EFI_INVALID_PARAMETER CapsuleCount is Zero. @retval EFI_INVALID_PARAMETER For across reset capsule image, ScatterGatherList is NULL. @retval EFI_UNSUPPORTED CapsuleImage is not recognized by the firmware. - @retval EFI_OUT_OF_RESOURCES When ExitBootServices() has been previously called this error indicates the capsule - is compatible with this platform but is not capable of being submitted or processed + @retval EFI_OUT_OF_RESOURCES When ExitBootServices() has been previously called this error indicates the capsule + is compatible with this platform but is not capable of being submitted or processed in runtime. The caller may resubmit the capsule prior to ExitBootServices(). - @retval EFI_OUT_OF_RESOURCES When ExitBootServices() has not been previously called then this error indicates + @retval EFI_OUT_OF_RESOURCES When ExitBootServices() has not been previously called then this error indicates the capsule is compatible with this platform but there are insufficient resources to process. **/ @@ -75,8 +75,8 @@ UpdateCapsule ( BOOLEAN NeedReset; BOOLEAN InitiateReset; CHAR16 CapsuleVarName[30]; - CHAR16 *TempVarName; - + CHAR16 *TempVarName; + // // Capsule Count can't be less than one. // @@ -107,7 +107,7 @@ UpdateCapsule ( } // - // Check FMP capsule flag + // Check FMP capsule flag // if (CompareGuid(&CapsuleHeader->CapsuleGuid, &gEfiFmpCapsuleGuid) && (CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) != 0 ) { @@ -115,7 +115,7 @@ UpdateCapsule ( } // - // Check Capsule image without populate flag by firmware support capsule function + // Check Capsule image without populate flag by firmware support capsule function // if ((CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) == 0) { Status = SupportCapsuleImage (CapsuleHeader); @@ -136,7 +136,7 @@ UpdateCapsule ( // Platform specific update for the non-reset capsule image. // if ((CapsuleHeader->Flags & CAPSULE_FLAGS_PERSIST_ACROSS_RESET) == 0) { - if (EfiAtRuntime ()) { + if (EfiAtRuntime ()) { Status = EFI_OUT_OF_RESOURCES; } else { Status = ProcessCapsuleImage(CapsuleHeader); @@ -151,7 +151,7 @@ UpdateCapsule ( } } } - + // // After launching all capsules who has no reset flag, if no more capsules claims // for a system reset just return. @@ -162,7 +162,7 @@ UpdateCapsule ( // // ScatterGatherList is only referenced if the capsules are defined to persist across - // system reset. + // system reset. // if (ScatterGatherList == (EFI_PHYSICAL_ADDRESS) (UINTN) NULL) { return EFI_INVALID_PARAMETER; @@ -195,7 +195,7 @@ UpdateCapsule ( // // ScatterGatherList is only referenced if the capsules are defined to persist across - // system reset. Set its value into NV storage to let pre-boot driver to pick it up + // system reset. Set its value into NV storage to let pre-boot driver to pick it up // after coming through a system reset. // Status = EfiSetVariable ( @@ -213,7 +213,7 @@ UpdateCapsule ( if(InitiateReset) { // // Firmware that encounters a capsule which has the CAPSULE_FLAGS_INITIATE_RESET Flag set in its header - // will initiate a reset of the platform which is compatible with the passed-in capsule request and will + // will initiate a reset of the platform which is compatible with the passed-in capsule request and will // not return back to the caller. // EfiResetSystem (EfiResetWarm, EFI_SUCCESS, 0, NULL); @@ -261,7 +261,7 @@ QueryCapsuleCapabilities ( if (CapsuleCount < 1) { return EFI_INVALID_PARAMETER; } - + // // Check whether input parameter is valid // @@ -290,7 +290,7 @@ QueryCapsuleCapabilities ( } // - // Check FMP capsule flag + // Check FMP capsule flag // if (CompareGuid(&CapsuleHeader->CapsuleGuid, &gEfiFmpCapsuleGuid) && (CapsuleHeader->Flags & CAPSULE_FLAGS_POPULATE_SYSTEM_TABLE) != 0 ) { @@ -309,7 +309,7 @@ QueryCapsuleCapabilities ( } // - // Find out whether there is any capsule defined to persist across system reset. + // Find out whether there is any capsule defined to persist across system reset. // for (ArrayNumber = 0; ArrayNumber < CapsuleCount ; ArrayNumber++) { CapsuleHeader = CapsuleHeaderArray[ArrayNumber]; @@ -344,10 +344,10 @@ QueryCapsuleCapabilities ( This code installs UEFI capsule runtime service. - @param ImageHandle The firmware allocated handle for the EFI image. + @param ImageHandle The firmware allocated handle for the EFI image. @param SystemTable A pointer to the EFI System Table. - @retval EFI_SUCCESS UEFI Capsule Runtime Services are installed successfully. + @retval EFI_SUCCESS UEFI Capsule Runtime Services are installed successfully. **/ EFI_STATUS @@ -363,14 +363,14 @@ CapsuleServiceInitialize ( mMaxSizeNonPopulateCapsule = PcdGet32(PcdMaxSizeNonPopulateCapsule); // - // When PEI phase is IA32, DXE phase is X64, it is possible that capsule data are + // When PEI phase is IA32, DXE phase is X64, it is possible that capsule data are // put above 4GB, so capsule PEI will transfer to long mode to get capsule data. // The page table and stack is used to transfer processor mode from IA32 to long mode. // Create the base address of page table and stack, and save them into variable. // This is not needed when capsule with reset type is not supported. // SaveLongModeContext (); - + // // Install capsule runtime services into UEFI runtime service tables. // diff --git a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.h b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.h index 787c70c195..b514b7f0f3 100644 --- a/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.h +++ b/MdeModulePkg/Universal/CapsuleRuntimeDxe/CapsuleService.h @@ -1,10 +1,10 @@ /** @file Capsule Runtime Driver produces two UEFI capsule runtime services. (UpdateCapsule, QueryCapsuleCapabilities) - It installs the Capsule Architectural Protocol defined in PI1.0a to signify + It installs the Capsule Architectural Protocol defined in PI1.0a to signify the capsule runtime services are ready. - Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
Copyright (c) 2018, Linaro, Ltd. All rights reserved.
This program and the accompanying materials are licensed and made available diff --git a/MdeModulePkg/Universal/CapsuleRuntimeDxe/X64/SaveLongModeContext.c b/MdeModulePkg/Universal/CapsuleRuntimeDxe/X64/SaveLongModeContext.c index b0512fdf13..b4d4844278 100644 --- a/MdeModulePkg/Universal/CapsuleRuntimeDxe/X64/SaveLongModeContext.c +++ b/MdeModulePkg/Universal/CapsuleRuntimeDxe/X64/SaveLongModeContext.c @@ -2,7 +2,7 @@ Create the variable to save the base address of page table and stack for transferring into long mode in IA32 capsule PEI. -Copyright (c) 2011 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -42,7 +42,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. This function allocates EfiReservedMemoryType below 4G memory address. @param Size Size of memory to allocate. - + @return Allocated Address for output. **/ @@ -164,14 +164,14 @@ PrepareContextForCapsulePei ( LongModeBuffer.PageTableAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)AllocateReservedMemoryBelow4G (EFI_PAGES_TO_SIZE (TotalPagesNum)); ASSERT (LongModeBuffer.PageTableAddress != 0); - + // // Allocate stack // LongModeBuffer.StackSize = PcdGet32 (PcdCapsulePeiLongModeStackSize); LongModeBuffer.StackBaseAddress = (EFI_PHYSICAL_ADDRESS)(UINTN)AllocateReservedMemoryBelow4G (PcdGet32 (PcdCapsulePeiLongModeStackSize)); - ASSERT (LongModeBuffer.StackBaseAddress != 0); - + ASSERT (LongModeBuffer.StackBaseAddress != 0); + Status = gRT->SetVariable ( EFI_CAPSULE_LONG_MODE_BUFFER_NAME, &gEfiCapsuleVendorGuid, @@ -190,7 +190,7 @@ PrepareContextForCapsulePei ( VariableLockCapsuleLongModeBufferVariable, NULL, &Registration - ); + ); } else { DEBUG ((EFI_D_ERROR, "FATAL ERROR: CapsuleLongModeBuffer cannot be saved: %r. Capsule in PEI may fail!\n", Status)); gBS->FreePages (LongModeBuffer.StackBaseAddress, EFI_SIZE_TO_PAGES (LongModeBuffer.StackSize)); diff --git a/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.c b/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.c index 6b53e8ac74..5fa7facfca 100644 --- a/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.c +++ b/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.c @@ -2,7 +2,7 @@ Console Platform DXE Driver, install Console Device Guids and update Console Environment Variables. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -80,7 +80,7 @@ InitializeConPlatform( /** - Test to see if EFI_SIMPLE_TEXT_INPUT_PROTOCOL is supported on ControllerHandle. + Test to see if EFI_SIMPLE_TEXT_INPUT_PROTOCOL is supported on ControllerHandle. @param This Protocol instance pointer. @param ControllerHandle Handle of device to test. @@ -108,7 +108,7 @@ ConPlatformTextInDriverBindingSupported ( /** - Test to see if EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL is supported on ControllerHandle. + Test to see if EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL is supported on ControllerHandle. @param This Protocol instance pointer. @param ControllerHandle Handle of device to test. @@ -136,7 +136,7 @@ ConPlatformTextOutDriverBindingSupported ( /** - Test to see if the specified protocol is supported on ControllerHandle. + Test to see if the specified protocol is supported on ControllerHandle. @param This Protocol instance pointer. @param ControllerHandle Handle of device to test. @@ -202,9 +202,9 @@ ConPlatformDriverBindingSupported ( Start this driver on ControllerHandle by opening Simple Text Input Protocol, reading Device Path, and installing Console In Devcice GUID on ControllerHandle. - If this devcie is not one hot-plug devce, append its device path into the + If this devcie is not one hot-plug devce, append its device path into the console environment variables ConInDev. - + @param This Protocol instance pointer. @param ControllerHandle Handle of device to bind driver to @param RemainingDevicePath Optional parameter use to pick a specific child @@ -334,9 +334,9 @@ ConPlatformTextInDriverBindingStart ( reading Device Path, and installing Console Out Devcic GUID, Standard Error Device GUID on ControllerHandle. - If this devcie is not one hot-plug devce, append its device path into the + If this devcie is not one hot-plug devce, append its device path into the console environment variables ConOutDev, ErrOutDev. - + @param This Protocol instance pointer. @param ControllerHandle Handle of device to bind driver to @param RemainingDevicePath Optional parameter use to pick a specific child @@ -450,7 +450,7 @@ ConPlatformTextOutDriverBindingStart ( } } else { // - // If it is not a hot-plug device, append the device path to + // If it is not a hot-plug device, append the device path to // the ConOutDev and ErrOutDev environment variable. // For GOP device path, append the sibling device path as well. // @@ -511,7 +511,7 @@ ConPlatformTextOutDriverBindingStart ( } /** - Stop this driver on ControllerHandle by removing Console In Devcice GUID + Stop this driver on ControllerHandle by removing Console In Devcice GUID and closing the Simple Text Input protocol on ControllerHandle. @param This Protocol instance pointer. @@ -585,7 +585,7 @@ ConPlatformTextInDriverBindingStop ( /** - Stop this driver on ControllerHandle by removing Console Out Devcice GUID + Stop this driver on ControllerHandle by removing Console Out Devcice GUID and closing the Simple Text Output protocol on ControllerHandle. @param This Protocol instance pointer. @@ -714,7 +714,7 @@ ConPlatformUnInstallProtocol ( @param Name String part of EFI variable name @return Dynamically allocated memory that contains a copy of the EFI variable. - Caller is repsoncible freeing the buffer. Return NULL means Variable + Caller is repsoncible freeing the buffer. Return NULL means Variable was not read. **/ @@ -922,7 +922,7 @@ ConPlatformMatchDevicePaths ( } /** - Update console environment variables. + Update console environment variables. @param VariableName Console environment variables, ConOutDev, ConInDev ErrOutDev, ConIn ,ConOut or ErrOut. @@ -958,7 +958,7 @@ ConPlatformUpdateDeviceVariable ( if (Operation != Delete) { // // Match specified DevicePath in Console Variable. - // + // Status = ConPlatformMatchDevicePaths ( VariableDevicePath, DevicePath, @@ -1052,7 +1052,7 @@ IsHotPlugDevice ( while (!IsDevicePathEnd (CheckDevicePath)) { // // Check device whether is hot plug device or not throught Device Path - // + // if ((DevicePathType (CheckDevicePath) == MESSAGING_DEVICE_PATH) && (DevicePathSubType (CheckDevicePath) == MSG_USB_DP || DevicePathSubType (CheckDevicePath) == MSG_USB_CLASS_DP || @@ -1069,7 +1069,7 @@ IsHotPlugDevice ( // return TRUE; } - + CheckDevicePath = NextDevicePathNode (CheckDevicePath); } diff --git a/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.h b/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.h index 6d853c1360..1d5f11e94c 100644 --- a/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.h +++ b/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatform.h @@ -1,7 +1,7 @@ /** @file Header file for Console Platfrom DXE Driver. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -56,7 +56,7 @@ typedef enum { } CONPLATFORM_VAR_OPERATION; /** - Test to see if specific protocol could be supported on the ControllerHandle. + Test to see if specific protocol could be supported on the ControllerHandle. @param This Protocol instance pointer. @param ControllerHandle Handle of device to test. @@ -74,7 +74,7 @@ ConPlatformDriverBindingSupported ( ); /** - Test to see if EFI_SIMPLE_TEXT_INPUT_PROTOCOL is supported on ControllerHandle. + Test to see if EFI_SIMPLE_TEXT_INPUT_PROTOCOL is supported on ControllerHandle. @param This Protocol instance pointer. @param ControllerHandle Handle of device to test. @@ -94,7 +94,7 @@ ConPlatformTextInDriverBindingSupported ( ); /** - Test to see if EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL is supported on ControllerHandle. + Test to see if EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL is supported on ControllerHandle. @param This Protocol instance pointer. @param ControllerHandle Handle of device to test. @@ -119,9 +119,9 @@ ConPlatformTextOutDriverBindingSupported ( Start this driver on ControllerHandle by opening Simple Text Input Protocol, reading Device Path, and installing Console In Devcice GUID on ControllerHandle. - If this devcie is not one hot-plug devce, append its device path into the + If this devcie is not one hot-plug devce, append its device path into the console environment variables ConInDev. - + @param This Protocol instance pointer. @param ControllerHandle Handle of device to bind driver to @param RemainingDevicePath Optional parameter use to pick a specific child @@ -147,9 +147,9 @@ ConPlatformTextInDriverBindingStart ( reading Device Path, and installing Console Out Devcic GUID, Standard Error Device GUID on ControllerHandle. - If this devcie is not one hot-plug devce, append its device path into the + If this devcie is not one hot-plug devce, append its device path into the console environment variables ConOutDev, StdErrDev. - + @param This Protocol instance pointer. @param ControllerHandle Handle of device to bind driver to @param RemainingDevicePath Optional parameter use to pick a specific child @@ -169,7 +169,7 @@ ConPlatformTextOutDriverBindingStart ( ); /** - Stop this driver on ControllerHandle by removing Console In Devcice GUID + Stop this driver on ControllerHandle by removing Console In Devcice GUID and closing the Simple Text Input protocol on ControllerHandle. @param This Protocol instance pointer. @@ -192,7 +192,7 @@ ConPlatformTextInDriverBindingStop ( ); /** - Stop this driver on ControllerHandle by removing Console Out Devcice GUID + Stop this driver on ControllerHandle by removing Console Out Devcice GUID and closing the Simple Text Output protocol on ControllerHandle. @param This Protocol instance pointer. @@ -236,7 +236,7 @@ ConPlatformUnInstallProtocol ( @param Name String part of EFI variable name @return Dynamically allocated memory that contains a copy of the EFI variable. - Caller is repsoncible freeing the buffer. Return NULL means Variable + Caller is repsoncible freeing the buffer. Return NULL means Variable was not read. **/ diff --git a/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf b/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf index 1d404dfc6f..bc57e2c8a1 100644 --- a/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf +++ b/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxe.inf @@ -4,7 +4,7 @@ # Console Platfrom DXE Driver that specifies whether device can be used as console # input/output device or error output device and update global variables accordingly. # -# Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -96,4 +96,4 @@ gEfiGraphicsOutputProtocolGuid ## SOMETIMES_CONSUMES [UserExtensions.TianoCore."ExtraFiles"] - ConPlatformDxeExtra.uni \ No newline at end of file + ConPlatformDxeExtra.uni diff --git a/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxeExtra.uni b/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxeExtra.uni index 8edad9e12e..ef9fc3048c 100644 --- a/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxeExtra.uni +++ b/MdeModulePkg/Universal/Console/ConPlatformDxe/ConPlatformDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // ConPlatformDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Console Platform DXE Driver" diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ComponentName.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ComponentName.c index 9ad1726599..e985657175 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ComponentName.c +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ComponentName.c @@ -1,7 +1,7 @@ /** @file UEFI Component Name(2) protocol implementation for ConSplitter driver. -Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -225,7 +225,7 @@ ConSplitterComponentNameGetDriverName ( This->SupportedLanguages, mConSplitterDriverNameTable, DriverName, - (BOOLEAN)((This == &gConSplitterConInComponentName) || + (BOOLEAN)((This == &gConSplitterConInComponentName) || (This == &gConSplitterSimplePointerComponentName) || (This == &gConSplitterAbsolutePointerComponentName) || (This == &gConSplitterConOutComponentName) || diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c index 931630d1fc..763f3fafb2 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitter.c @@ -31,7 +31,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "ConSplitter.h" // -// Identify if ConIn is connected in PcdConInConnectOnDemand enabled mode. +// Identify if ConIn is connected in PcdConInConnectOnDemand enabled mode. // default not connect // BOOLEAN mConInIsConnect = FALSE; @@ -567,7 +567,7 @@ ConSplitterDriverEntry( &mStdErr.TextOut, NULL ); - if (!EFI_ERROR (Status)) { + if (!EFI_ERROR (Status)) { // // Update the EFI System Table with new virtual console // and update the pointer to Text Output protocol. @@ -576,7 +576,7 @@ ConSplitterDriverEntry( gST->StdErr = &mStdErr.TextOut; } } - + // // Update the CRC32 in the EFI System Table header // @@ -2298,7 +2298,7 @@ ConSplitterGrowMapTable ( Size = Private->CurrentNumberOfConsoles * sizeof (INT32); Index = 0; SrcAddress = OldTextOutModeMap; - NewStepSize = NewSize / sizeof(INT32); + NewStepSize = NewSize / sizeof(INT32); // If Private->CurrentNumberOfConsoles is not zero and OldTextOutModeMap // is not NULL, it indicates that the original TextOutModeMap is not enough // for the new console devices and has been enlarged by CONSOLE_SPLITTER_ALLOC_UNIT columns. @@ -2972,7 +2972,7 @@ Done: // // Force GraphicsOutput mode to be set, // - + Mode = &Private->GraphicsOutputModeBuffer[CurrentIndex]; if ((GraphicsOutput != NULL) && (Mode->HorizontalResolution == CurrentGraphicsOutputMode->Info->HorizontalResolution) && @@ -3051,7 +3051,7 @@ ConsplitterSetConsoleOutMode ( MaxMode = (UINTN) (TextOut->Mode->MaxMode); MaxModeInfo.Column = 0; - MaxModeInfo.Row = 0; + MaxModeInfo.Row = 0; ModeInfo.Column = PcdGet32 (PcdConOutColumn); ModeInfo.Row = PcdGet32 (PcdConOutRow); @@ -3191,7 +3191,7 @@ ConSplitterTextOutAddDevice ( DeviceStatus = EFI_DEVICE_ERROR; Status = EFI_DEVICE_ERROR; - + // // This device display mode will be added into Graphics Ouput modes. // @@ -3361,7 +3361,7 @@ ConSplitterTextOutDeleteDevice ( Private->VirtualHandle, &gEfiUgaDrawProtocolGuid, &Private->UgaDraw - ); + ); } else if (!FeaturePcdGet (PcdConOutUgaSupport)) { Status = gBS->UninstallProtocolInterface ( Private->VirtualHandle, @@ -3536,7 +3536,7 @@ ConSplitterTextInPrivateReadKeyStroke ( EFI_STATUS Status; UINTN Index; EFI_KEY_DATA KeyData; - + // // Return the first saved non-NULL key. // @@ -3616,7 +3616,7 @@ ConSplitterTextInReadKeyStroke ( // Signal ConnectConIn event on first call in Lazy ConIn mode // if (!mConInIsConnect && PcdGetBool (PcdConInConnectOnDemand)) { - DEBUG ((EFI_D_INFO, "Connect ConIn in first ReadKeyStoke in Lazy ConIn mode.\n")); + DEBUG ((EFI_D_INFO, "Connect ConIn in first ReadKeyStoke in Lazy ConIn mode.\n")); gBS->SignalEvent (Private->ConnectConInEvent); mConInIsConnect = TRUE; } @@ -3810,7 +3810,7 @@ ConSplitterTextInReadKeyStrokeEx ( // Signal ConnectConIn event on first call in Lazy ConIn mode // if (!mConInIsConnect && PcdGetBool (PcdConInConnectOnDemand)) { - DEBUG ((EFI_D_INFO, "Connect ConIn in first ReadKeyStoke in Lazy ConIn mode.\n")); + DEBUG ((EFI_D_INFO, "Connect ConIn in first ReadKeyStoke in Lazy ConIn mode.\n")); gBS->SignalEvent (Private->ConnectConInEvent); mConInIsConnect = TRUE; } @@ -3877,7 +3877,7 @@ ConSplitterTextInReadKeyStrokeEx ( for (Index = 0; Index < Private->CurrentNumberOfKeys; Index++) { CopyMem (&Private->KeyQueue[Index].KeyState, &KeyState, sizeof (EFI_KEY_STATE)); } - + // // Return the first saved key. // @@ -4642,7 +4642,7 @@ ConSplitterTextOutOutputString ( Private->TextOutMode.CursorRow = Private->TextOutList[0].TextOut->Mode->CursorRow; } else { // - // When there is no real console devices in system, + // When there is no real console devices in system, // update cursor position for the virtual device in consplitter. // Private->TextOut.QueryMode ( @@ -4650,28 +4650,28 @@ ConSplitterTextOutOutputString ( Private->TextOutMode.Mode, &MaxColumn, &MaxRow - ); + ); for (; *WString != CHAR_NULL; WString++) { switch (*WString) { case CHAR_BACKSPACE: if (Private->TextOutMode.CursorColumn == 0 && Private->TextOutMode.CursorRow > 0) { Private->TextOutMode.CursorRow--; - Private->TextOutMode.CursorColumn = (INT32) (MaxColumn - 1); + Private->TextOutMode.CursorColumn = (INT32) (MaxColumn - 1); } else if (Private->TextOutMode.CursorColumn > 0) { Private->TextOutMode.CursorColumn--; } break; - + case CHAR_LINEFEED: if (Private->TextOutMode.CursorRow < (INT32) (MaxRow - 1)) { Private->TextOutMode.CursorRow++; } break; - + case CHAR_CARRIAGE_RETURN: Private->TextOutMode.CursorColumn = 0; break; - + default: if (Private->TextOutMode.CursorColumn < (INT32) (MaxColumn - 1)) { Private->TextOutMode.CursorColumn++; diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf index ff10a50b50..a191ebcd9b 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxe.inf @@ -10,7 +10,7 @@ # Note: If only UGA Draw protocol is installed in system, PcdUgaConsumeSupport should be # set to TRUE. # -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -92,7 +92,7 @@ ## TO_START gEfiSimpleTextInputExProtocolGuid ## PRODUCES - ## TO_START + ## TO_START gEfiSimpleTextOutProtocolGuid ## SOMETIMES_PRODUCES ## SOMETIMES_CONSUMES diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxeExtra.uni b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxeExtra.uni index c05a53970c..31f563c3b4 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxeExtra.uni +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // ConSplitterDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Console Splitter DXE Driver" diff --git a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c index b7cdd7af39..b40b5cb2bb 100644 --- a/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c +++ b/MdeModulePkg/Universal/Console/ConSplitterDxe/ConSplitterGraphics.c @@ -1,7 +1,7 @@ /** @file Support for Graphics output spliter. - -Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.
+ +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -58,7 +58,7 @@ ConSplitterGraphicsOutputQueryMode ( Private = GRAPHICS_OUTPUT_SPLITTER_PRIVATE_DATA_FROM_THIS (This); GraphicsOutput = NULL; - + if (Private->CurrentNumberOfGraphicsOutput == 1) { // // Find the only one GraphicsOutput. @@ -70,7 +70,7 @@ ConSplitterGraphicsOutputQueryMode ( } } } - + if (GraphicsOutput != NULL) { // // If only one physical GOP device exist, return its information. @@ -79,7 +79,7 @@ ConSplitterGraphicsOutputQueryMode ( return Status; } else { // - // If 2 more phyiscal GOP device exist or GOP protocol does not exist, + // If 2 more phyiscal GOP device exist or GOP protocol does not exist, // return GOP information (PixelFormat is PixelBltOnly) created in ConSplitterAddGraphicsOutputMode (). // *Info = AllocatePool (sizeof (EFI_GRAPHICS_OUTPUT_MODE_INFORMATION)); @@ -191,7 +191,7 @@ ConSplitterGraphicsOutputSetMode ( This->Mode->FrameBufferSize = PhysicalGraphicsOutput->Mode->FrameBufferSize; } else { // - // If 2 more phyiscal GOP device exist or GOP protocol does not exist, + // If 2 more phyiscal GOP device exist or GOP protocol does not exist, // return GOP information (PixelFormat is PixelBltOnly) created in ConSplitterAddGraphicsOutputMode (). // CopyMem (This->Mode->Info, &Private->GraphicsOutputModeBuffer[ModeNumber], This->Mode->SizeOfInfo); @@ -273,7 +273,7 @@ ConSplitterGraphicsOutputBlt ( if (This == NULL || ((UINTN) BltOperation) >= EfiGraphicsOutputBltOperationMax) { return EFI_INVALID_PARAMETER; } - + Private = GRAPHICS_OUTPUT_SPLITTER_PRIVATE_DATA_FROM_THIS (This); ReturnStatus = EFI_SUCCESS; diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c index 7b1c37b357..444773d089 100644 --- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c +++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.c @@ -1,7 +1,7 @@ /** @file This is the main routine for initializing the Graphics Console support routines. -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -245,8 +245,8 @@ InitializeGraphicsConsoleTextMode ( UINTN ValidCount; UINTN ValidIndex; UINTN MaxColumns; - UINTN MaxRows; - + UINTN MaxRows; + if ((TextModeCount == NULL) || (TextModeData == NULL)) { return EFI_INVALID_PARAMETER; } @@ -287,7 +287,7 @@ InitializeGraphicsConsoleTextMode ( // // Mode 0 and mode 1 is for 80x25, 80x50 according to UEFI spec. // - ValidCount = 0; + ValidCount = 0; NewModeBuffer[ValidCount].Columns = 80; NewModeBuffer[ValidCount].Rows = 25; @@ -295,20 +295,20 @@ InitializeGraphicsConsoleTextMode ( NewModeBuffer[ValidCount].GopHeight = VerticalResolution; NewModeBuffer[ValidCount].GopModeNumber = GopModeNumber; NewModeBuffer[ValidCount].DeltaX = (HorizontalResolution - (NewModeBuffer[ValidCount].Columns * EFI_GLYPH_WIDTH)) >> 1; - NewModeBuffer[ValidCount].DeltaY = (VerticalResolution - (NewModeBuffer[ValidCount].Rows * EFI_GLYPH_HEIGHT)) >> 1; + NewModeBuffer[ValidCount].DeltaY = (VerticalResolution - (NewModeBuffer[ValidCount].Rows * EFI_GLYPH_HEIGHT)) >> 1; ValidCount++; if ((MaxColumns >= 80) && (MaxRows >= 50)) { NewModeBuffer[ValidCount].Columns = 80; NewModeBuffer[ValidCount].Rows = 50; NewModeBuffer[ValidCount].DeltaX = (HorizontalResolution - (80 * EFI_GLYPH_WIDTH)) >> 1; - NewModeBuffer[ValidCount].DeltaY = (VerticalResolution - (50 * EFI_GLYPH_HEIGHT)) >> 1; + NewModeBuffer[ValidCount].DeltaY = (VerticalResolution - (50 * EFI_GLYPH_HEIGHT)) >> 1; } NewModeBuffer[ValidCount].GopWidth = HorizontalResolution; NewModeBuffer[ValidCount].GopHeight = VerticalResolution; NewModeBuffer[ValidCount].GopModeNumber = GopModeNumber; ValidCount++; - + // // Start from mode 2 to put the valid mode other than 80x25 and 80x50 in the output mode buffer. // @@ -340,14 +340,14 @@ InitializeGraphicsConsoleTextMode ( ValidCount++; } } - + DEBUG_CODE ( for (Index = 0; Index < ValidCount; Index++) { - DEBUG ((EFI_D_INFO, "Graphics - Mode %d, Column = %d, Row = %d\n", - Index, NewModeBuffer[Index].Columns, NewModeBuffer[Index].Rows)); + DEBUG ((EFI_D_INFO, "Graphics - Mode %d, Column = %d, Row = %d\n", + Index, NewModeBuffer[Index].Columns, NewModeBuffer[Index].Rows)); } ); - + // // Return valid mode count and mode information buffer. // @@ -388,9 +388,9 @@ GraphicsConsoleControllerDriverStart ( UINTN MaxMode; UINT32 ModeNumber; EFI_GRAPHICS_OUTPUT_PROTOCOL_MODE *Mode; - UINTN SizeOfInfo; + UINTN SizeOfInfo; EFI_GRAPHICS_OUTPUT_MODE_INFORMATION *Info; - + ModeNumber = 0; // @@ -442,9 +442,9 @@ GraphicsConsoleControllerDriverStart ( if ((HorizontalResolution == 0x0) || (VerticalResolution == 0x0)) { // // Find the highest resolution which GOP supports. - // + // MaxMode = Private->GraphicsOutput->Mode->MaxMode; - + for (ModeIndex = 0; ModeIndex < MaxMode; ModeIndex++) { Status = Private->GraphicsOutput->QueryMode ( Private->GraphicsOutput, @@ -581,7 +581,7 @@ GraphicsConsoleControllerDriverStart ( Status = GraphicsConsoleConOutOutputString (&Private->SimpleTextOutput, (CHAR16 *)L"Graphics Console Started\n\r"); if (EFI_ERROR (Status)) { goto Error; - } + } DEBUG_CODE_END (); // @@ -915,7 +915,7 @@ GraphicsConsoleConOutOutputString ( } Status = EFI_SUCCESS; - + OldTpl = gBS->RaiseTPL (TPL_NOTIFY); // // Current mode @@ -1305,7 +1305,7 @@ GraphicsConsoleConOutSetMode ( Status = EFI_UNSUPPORTED; goto Done; } - + ModeData = &(Private->ModeData[ModeNumber]); if (ModeData->Columns <= 0 && ModeData->Rows <= 0) { @@ -1443,7 +1443,7 @@ GraphicsConsoleConOutSetMode ( This->Mode->CursorColumn = 0; This->Mode->CursorRow = 0; - FlushCursor (This); + FlushCursor (This); Status = EFI_SUCCESS; @@ -1527,7 +1527,7 @@ GraphicsConsoleConOutClearScreen ( EFI_GRAPHICS_OUTPUT_BLT_PIXEL Foreground; EFI_GRAPHICS_OUTPUT_BLT_PIXEL Background; EFI_TPL OldTpl; - + if (This->Mode->Mode == -1) { // // If current mode is not valid, return error. @@ -1876,11 +1876,11 @@ DrawUnicodeWeightAtCursorN ( /** Flush the cursor on the screen. - + If CursorVisible is FALSE, nothing to do and return directly. - If CursorVisible is TRUE, + If CursorVisible is TRUE, i) If the cursor shows on screen, it will be erased. - ii) If the cursor does not show on screen, it will be shown. + ii) If the cursor does not show on screen, it will be shown. @param This Protocol instance pointer. diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h index 0db6f04c11..be43f2afc8 100644 --- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h +++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsole.h @@ -1,7 +1,7 @@ /** @file Header file for GraphicsConsole driver. -Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -209,7 +209,7 @@ GraphicsConsoleComponentNameGetControllerName ( /** Reset the text output device hardware and optionally run diagnostics. - + Implements SIMPLE_TEXT_OUTPUT.Reset(). If ExtendeVerification is TRUE, then perform dependent Graphics Console device reset, and set display mode to mode 0. @@ -235,7 +235,7 @@ GraphicsConsoleConOutReset ( /** Write a Unicode string to the output device. - Implements SIMPLE_TEXT_OUTPUT.OutputString(). + Implements SIMPLE_TEXT_OUTPUT.OutputString(). The Unicode string will be converted to Glyphs and will be sent to the Graphics Console. @@ -262,7 +262,7 @@ GraphicsConsoleConOutOutputString ( ); /** - Verifies that all characters in a Unicode string can be output to the + Verifies that all characters in a Unicode string can be output to the target device. Implements SIMPLE_TEXT_OUTPUT.TestString(). @@ -316,7 +316,7 @@ GraphicsConsoleConOutQueryMode ( /** Sets the output device(s) to a specified mode. - + Implements SIMPLE_TEXT_OUTPUT.SetMode(). Set the Graphics Console to a specified mode. In this driver, we only support mode 0. @@ -324,7 +324,7 @@ GraphicsConsoleConOutQueryMode ( @param ModeNumber The text mode to set. @retval EFI_SUCCESS The requested text mode is set. - @retval EFI_DEVICE_ERROR The requested text mode cannot be set because of + @retval EFI_DEVICE_ERROR The requested text mode cannot be set because of Graphics Console device error. @retval EFI_UNSUPPORTED The text mode number is not valid. @@ -344,7 +344,7 @@ GraphicsConsoleConOutSetMode ( @param This Protocol instance pointer. @param Attribute The attribute to set. Bits 0..3 are the foreground - color, and bits 4..6 are the background color. + color, and bits 4..6 are the background color. All other bits are undefined and must be zero. @retval EFI_SUCCESS The requested attribute is set. @@ -360,7 +360,7 @@ GraphicsConsoleConOutSetAttribute ( ); /** - Clears the output device(s) display to the currently selected background + Clears the output device(s) display to the currently selected background color. Implements SIMPLE_TEXT_OUTPUT.ClearScreen(). @@ -451,10 +451,10 @@ GraphicsConsoleControllerDriverSupported ( /** - Start this driver on Controller by opening Graphics Output protocol or + Start this driver on Controller by opening Graphics Output protocol or UGA Draw protocol, and installing Simple Text Out protocol on Controller. (UGA Draw protocol could be skipped if PcdUgaConsumeSupport is set to FALSE.) - + @param This Protocol instance pointer. @param Controller Handle of device to bind driver to @param RemainingDevicePath Optional parameter use to pick a specific child @@ -473,10 +473,10 @@ GraphicsConsoleControllerDriverStart ( ); /** - Stop this driver on Controller by removing Simple Text Out protocol + Stop this driver on Controller by removing Simple Text Out protocol and closing the Graphics Output Protocol or UGA Draw protocol on Controller. (UGA Draw protocol could be skipped if PcdUgaConsumeSupport is set to FALSE.) - + @param This Protocol instance pointer. @param Controller Handle of device to stop driver on @@ -485,7 +485,7 @@ GraphicsConsoleControllerDriverStart ( @param ChildHandleBuffer List of Child Handles to Stop. @retval EFI_SUCCESS This driver is removed Controller. - @retval EFI_NOT_STARTED Simple Text Out protocol could not be found the + @retval EFI_NOT_STARTED Simple Text Out protocol could not be found the Controller. @retval other This driver was not removed from this device. @@ -503,9 +503,9 @@ GraphicsConsoleControllerDriverStop ( /** Locate HII Database protocol and HII Font protocol. - @retval EFI_SUCCESS HII Database protocol and HII Font protocol + @retval EFI_SUCCESS HII Database protocol and HII Font protocol are located successfully. - @return other Failed to locate HII Database protocol or + @return other Failed to locate HII Database protocol or HII Font protocol. **/ @@ -554,11 +554,11 @@ DrawUnicodeWeightAtCursorN ( /** Flush the cursor on the screen. - + If CursorVisible is FALSE, nothing to do and return directly. - If CursorVisible is TRUE, + If CursorVisible is TRUE, i) If the cursor shows on screen, it will be erased. - ii) If the cursor does not show on screen, it will be shown. + ii) If the cursor does not show on screen, it will be shown. @param This Protocol instance pointer. @@ -575,17 +575,17 @@ FlushCursor ( for the Graphics Console device based on Graphics Output Protocol. If yes, set the graphic device's current mode to this specific mode. - + @param GraphicsOutput Graphics Output Protocol instance pointer. @param HorizontalResolution User defined horizontal resolution @param VerticalResolution User defined vertical resolution. @param CurrentModeNumber Current specific mode to be check. @retval EFI_SUCCESS The mode is supported. - @retval EFI_UNSUPPORTED The specific mode is out of range of graphics + @retval EFI_UNSUPPORTED The specific mode is out of range of graphics device supported. - @retval other The specific mode does not support user defined - resolution or failed to set the current mode to the + @retval other The specific mode does not support user defined + resolution or failed to set the current mode to the specific mode on graphics device. **/ diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf index ccf44979d5..bf387cd97b 100644 --- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf +++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxe.inf @@ -3,8 +3,8 @@ # # This driver will install Simple Text Output protocol by consuming Graphices Output # protocol or UGA Draw protocol on graphic devices. -# -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+# +# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at diff --git a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxeExtra.uni b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxeExtra.uni index 9dc3e4e0c3..ff2237c6d1 100644 --- a/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxeExtra.uni +++ b/MdeModulePkg/Universal/Console/GraphicsConsoleDxe/GraphicsConsoleDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // GraphicsConsoleDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Graphics Console DXE Driver" diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/Ansi.c b/MdeModulePkg/Universal/Console/TerminalDxe/Ansi.c index 15147c1f2c..63a5dff3f5 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/Ansi.c +++ b/MdeModulePkg/Universal/Console/TerminalDxe/Ansi.c @@ -1,7 +1,7 @@ /** @file Implementation of translation upon PC ANSI. -Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -47,8 +47,8 @@ AnsiRawDataToUnicode ( or valid text graphics. @param TerminalDevice The terminal device. - @param WString The input string. - + @param WString The input string. + @retval EFI_UNSUPPORTED If not all input characters are valid. @retval EFI_SUCCESS If all input characters are valid. diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h index 7dded00cad..a4543fc8de 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h +++ b/MdeModulePkg/Universal/Console/TerminalDxe/Terminal.h @@ -1,7 +1,7 @@ /** @file Header file for Terminal driver. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
Copyright (C) 2016 Silicon Graphics, Inc. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -1090,7 +1090,7 @@ UnicodeFiFoInsertOneKey ( /** Remove one pre-fetched key out of the Unicode FIFO buffer. - The caller should guarantee that Unicode FIFO buffer is not empty + The caller should guarantee that Unicode FIFO buffer is not empty by IsUnicodeFiFoEmpty (). @param TerminalDevice Terminal driver private structure. @@ -1292,10 +1292,10 @@ VTUTF8TestString ( Translate one Unicode character into VT-UTF8 characters. UTF8 Encoding Table - Bits per Character | Unicode Character Range | Unicode Binary Encoding | UTF8 Binary Encoding - 0-7 | 0x0000 - 0x007F | 00000000 0xxxxxxx | 0xxxxxxx - 8-11 | 0x0080 - 0x07FF | 00000xxx xxxxxxxx | 110xxxxx 10xxxxxx - 12-16 | 0x0800 - 0xFFFF | xxxxxxxx xxxxxxxx | 1110xxxx 10xxxxxx 10xxxxxx + Bits per Character | Unicode Character Range | Unicode Binary Encoding | UTF8 Binary Encoding + 0-7 | 0x0000 - 0x007F | 00000000 0xxxxxxx | 0xxxxxxx + 8-11 | 0x0080 - 0x07FF | 00000xxx xxxxxxxx | 110xxxxx 10xxxxxx + 12-16 | 0x0800 - 0xFFFF | xxxxxxxx xxxxxxxx | 1110xxxx 10xxxxxx 10xxxxxx @param Unicode Unicode character need translating. @@ -1331,10 +1331,10 @@ GetOneValidUtf8Char ( Translate VT-UTF8 characters into one Unicode character. UTF8 Encoding Table - Bits per Character | Unicode Character Range | Unicode Binary Encoding | UTF8 Binary Encoding - 0-7 | 0x0000 - 0x007F | 00000000 0xxxxxxx | 0xxxxxxx - 8-11 | 0x0080 - 0x07FF | 00000xxx xxxxxxxx | 110xxxxx 10xxxxxx - 12-16 | 0x0800 - 0xFFFF | xxxxxxxx xxxxxxxx | 1110xxxx 10xxxxxx 10xxxxxx + Bits per Character | Unicode Character Range | Unicode Binary Encoding | UTF8 Binary Encoding + 0-7 | 0x0000 - 0x007F | 00000000 0xxxxxxx | 0xxxxxxx + 8-11 | 0x0080 - 0x07FF | 00000xxx xxxxxxxx | 110xxxxx 10xxxxxx + 12-16 | 0x0800 - 0xFFFF | xxxxxxxx xxxxxxxx | 1110xxxx 10xxxxxx 10xxxxxx @param Utf8Char VT-UTF8 character set needs translating. diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c index 99316376cb..80c4f6b483 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c +++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConIn.c @@ -632,7 +632,7 @@ KeyNotifyProcessHandler ( while (TRUE) { // // Enter critical section - // + // OldTpl = gBS->RaiseTPL (TPL_NOTIFY); HasKey = EfiKeyFiFoForNotifyRemoveOneKey (TerminalDevice->EfiKeyFiFoForNotify, &Key); CopyMem (&KeyData.Key, &Key, sizeof (EFI_INPUT_KEY)); @@ -1128,7 +1128,7 @@ UnicodeFiFoInsertOneKey ( /** Remove one pre-fetched key out of the Unicode FIFO buffer. - The caller should guarantee that Unicode FIFO buffer is not empty + The caller should guarantee that Unicode FIFO buffer is not empty by IsUnicodeFiFoEmpty (). @param TerminalDevice Terminal driver private structure. @@ -1304,10 +1304,10 @@ UnicodeToEfiKeyFlushState ( There is one special input sequence that will force the system to reset. This is ESC R ESC r ESC R. - Note: current implementation support terminal types include: PC ANSI, VT100+/VTUTF8, VT100. + Note: current implementation support terminal types include: PC ANSI, VT100+/VTUTF8, VT100. The table below is not same with UEFI Spec 2.3 Appendix B Table 201(not support ANSI X3.64 / DEC VT200-500 and extra support PC ANSI, VT100)since UEFI Table 201 is just an example. - + Symbols used in table below =========================== ESC = 0x1B diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c index 5a8343162f..4d7218e415 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c +++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalConOut.c @@ -1,7 +1,7 @@ /** @file Implementation for EFI_SIMPLE_TEXT_OUTPUT_PROTOCOL protocol. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
Copyright (C) 2016 Silicon Graphics, Inc. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -451,7 +451,7 @@ TerminalConOutQueryMode ( // // Get Terminal device data structure pointer. // - TerminalDevice = TERMINAL_CON_OUT_DEV_FROM_THIS (This); + TerminalDevice = TERMINAL_CON_OUT_DEV_FROM_THIS (This); *Columns = TerminalDevice->TerminalConsoleModeData[ModeNumber].Columns; *Rows = TerminalDevice->TerminalConsoleModeData[ModeNumber].Rows; @@ -469,7 +469,7 @@ TerminalConOutQueryMode ( @param ModeNumber The text mode to set. @retval EFI_SUCCESS The requested text mode is set. - @retval EFI_DEVICE_ERROR The requested text mode cannot be set + @retval EFI_DEVICE_ERROR The requested text mode cannot be set because of serial device error. @retval EFI_UNSUPPORTED The text mode number is not valid. @@ -911,7 +911,7 @@ TerminalIsValidTextGraphics ( Detects if a valid ASCII char. @param Ascii An ASCII character. - + @retval TRUE If it is a valid ASCII character. @retval FALSE If it is not a valid ASCII character. @@ -935,7 +935,7 @@ TerminalIsValidAscii ( Detects if a valid EFI control character. @param CharC An input EFI Control character. - + @retval TRUE If it is a valid EFI control character. @retval FALSE If it is not a valid EFI control character. diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxeExtra.uni b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxeExtra.uni index e2f494517d..2679a8f749 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxeExtra.uni +++ b/MdeModulePkg/Universal/Console/TerminalDxe/TerminalDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // TerminalDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Terminal DXE Driver" diff --git a/MdeModulePkg/Universal/Console/TerminalDxe/Vtutf8.c b/MdeModulePkg/Universal/Console/TerminalDxe/Vtutf8.c index 586e8ab769..0768273863 100644 --- a/MdeModulePkg/Universal/Console/TerminalDxe/Vtutf8.c +++ b/MdeModulePkg/Universal/Console/TerminalDxe/Vtutf8.c @@ -1,7 +1,7 @@ /** @file Implementation of translation upon VT-UTF8. -Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -177,10 +177,10 @@ GetOneValidUtf8Char ( Translate VT-UTF8 characters into one Unicode character. UTF8 Encoding Table - Bits per Character | Unicode Character Range | Unicode Binary Encoding | UTF8 Binary Encoding - 0-7 | 0x0000 - 0x007F | 00000000 0xxxxxxx | 0xxxxxxx - 8-11 | 0x0080 - 0x07FF | 00000xxx xxxxxxxx | 110xxxxx 10xxxxxx - 12-16 | 0x0800 - 0xFFFF | xxxxxxxx xxxxxxxx | 1110xxxx 10xxxxxx 10xxxxxx + Bits per Character | Unicode Character Range | Unicode Binary Encoding | UTF8 Binary Encoding + 0-7 | 0x0000 - 0x007F | 00000000 0xxxxxxx | 0xxxxxxx + 8-11 | 0x0080 - 0x07FF | 00000xxx xxxxxxxx | 110xxxxx 10xxxxxx + 12-16 | 0x0800 - 0xFFFF | xxxxxxxx xxxxxxxx | 1110xxxx 10xxxxxx 10xxxxxx @param Utf8Char VT-UTF8 character set needs translating. @@ -250,10 +250,10 @@ Utf8ToUnicode ( Translate one Unicode character into VT-UTF8 characters. UTF8 Encoding Table - Bits per Character | Unicode Character Range | Unicode Binary Encoding | UTF8 Binary Encoding - 0-7 | 0x0000 - 0x007F | 00000000 0xxxxxxx | 0xxxxxxx - 8-11 | 0x0080 - 0x07FF | 00000xxx xxxxxxxx | 110xxxxx 10xxxxxx - 12-16 | 0x0800 - 0xFFFF | xxxxxxxx xxxxxxxx | 1110xxxx 10xxxxxx 10xxxxxx + Bits per Character | Unicode Character Range | Unicode Binary Encoding | UTF8 Binary Encoding + 0-7 | 0x0000 - 0x007F | 00000000 0xxxxxxx | 0xxxxxxx + 8-11 | 0x0080 - 0x07FF | 00000xxx xxxxxxxx | 110xxxxx 10xxxxxx + 12-16 | 0x0800 - 0xFFFF | xxxxxxxx xxxxxxxx | 1110xxxx 10xxxxxx 10xxxxxx @param Unicode Unicode character need translating. diff --git a/MdeModulePkg/Universal/DebugPortDxe/DebugPort.h b/MdeModulePkg/Universal/DebugPortDxe/DebugPort.h index 3ce702dfa4..0a64ec55b9 100644 --- a/MdeModulePkg/Universal/DebugPortDxe/DebugPort.h +++ b/MdeModulePkg/Universal/DebugPortDxe/DebugPort.h @@ -1,7 +1,7 @@ /** @file Definitions and prototypes for DebugPort driver. -Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -83,15 +83,15 @@ typedef struct { #define IS_UART_DEVICEPATH(dp) (DevicePathType (dp) == MESSAGING_DEVICE_PATH && DevicePathSubType (dp) == MSG_UART_DP) /** - Debug Port Driver entry point. + Debug Port Driver entry point. Reads DebugPort variable to determine what device and settings to use as the debug port. Binds exclusively to SerialIo. Reverts to defaults if no variable is found. - @param[in] ImageHandle The firmware allocated handle for the EFI image. + @param[in] ImageHandle The firmware allocated handle for the EFI image. @param[in] SystemTable A pointer to the EFI System Table. - + @retval EFI_SUCCESS The entry point is executed successfully. @retval EFI_OUT_OF_RESOURCES Fails to allocate memory for device. @retval other Some error occurs when executing this entry point. @@ -105,7 +105,7 @@ InitializeDebugPortDriver ( ); /** - Checks to see if there's not already a DebugPort interface somewhere. + Checks to see if there's not already a DebugPort interface somewhere. If there's a DEBUGPORT variable, the device path must match exactly. If there's no DEBUGPORT variable, then device path is not checked and does not matter. @@ -144,7 +144,7 @@ DebugPortSupported ( @retval EFI_SUCCESS This driver is added to ControllerHandle. @retval EFI_OUT_OF_RESOURCES Fails to allocate memory for device. - @retval others Some error occurs. + @retval others Some error occurs. **/ EFI_STATUS @@ -316,7 +316,7 @@ DebugPortComponentNameGetControllerName ( The port itself should be fine since it was set up during initialization. - @param This Protocol instance pointer. + @param This Protocol instance pointer. @return EFI_SUCCESS Always. @@ -337,8 +337,8 @@ DebugPortReset ( On output, the amount of data actually written. @param Buffer Pointer to buffer to read. - @retval EFI_SUCCESS - @retval others + @retval EFI_SUCCESS + @retval others **/ EFI_STATUS @@ -386,7 +386,7 @@ DebugPortWrite ( DebugPort interface @retval EFI_DEVICE_ERROR A hardware failure occured... (from SerialIo) -**/ +**/ EFI_STATUS EFIAPI DebugPortPoll ( diff --git a/MdeModulePkg/Universal/DebugPortDxe/DebugPortDxeExtra.uni b/MdeModulePkg/Universal/DebugPortDxe/DebugPortDxeExtra.uni index a1f5f32bff..1e23258cc7 100644 --- a/MdeModulePkg/Universal/DebugPortDxe/DebugPortDxeExtra.uni +++ b/MdeModulePkg/Universal/DebugPortDxe/DebugPortDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // DebugPortDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Debug Port DXE Driver" diff --git a/MdeModulePkg/Universal/DebugSupportDxe/DebugSupport.c b/MdeModulePkg/Universal/DebugSupportDxe/DebugSupport.c index 9a8f86de10..b7c1c5c4dd 100644 --- a/MdeModulePkg/Universal/DebugSupportDxe/DebugSupport.c +++ b/MdeModulePkg/Universal/DebugSupportDxe/DebugSupport.c @@ -1,7 +1,7 @@ /** @file Top level C file for debug support driver. Contains initialization function. -Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -24,14 +24,14 @@ EFI_DEBUG_SUPPORT_PROTOCOL mDebugSupportProtocolInterface = { /** - Debug Support Driver entry point. + Debug Support Driver entry point. - Checks to see if there's not already a Debug Support protocol installed for + Checks to see if there's not already a Debug Support protocol installed for the selected processor before installing it. - @param[in] ImageHandle The firmware allocated handle for the EFI image. + @param[in] ImageHandle The firmware allocated handle for the EFI image. @param[in] SystemTable A pointer to the EFI System Table. - + @retval EFI_SUCCESS The entry point is executed successfully. @retval EFI_ALREADY_STARTED Debug Support protocol is installed already. @retval other Some error occurs when executing this entry point. @@ -105,7 +105,7 @@ InitializeDebugSupportDriver ( LoadedImageProtocolPtr->Unload = PlUnloadDebugSupportDriver; // - // Call hook for processor specific initialization + // Call hook for processor specific initialization // Status = PlInitializeDebugSupportDriver (); ASSERT (!EFI_ERROR (Status)); diff --git a/MdeModulePkg/Universal/DebugSupportDxe/DebugSupportDxeExtra.uni b/MdeModulePkg/Universal/DebugSupportDxe/DebugSupportDxeExtra.uni index 9e92374696..3beaa7aa72 100644 --- a/MdeModulePkg/Universal/DebugSupportDxe/DebugSupportDxeExtra.uni +++ b/MdeModulePkg/Universal/DebugSupportDxe/DebugSupportDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // DebugSupportDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Debug Support DXE Driver" diff --git a/MdeModulePkg/Universal/DebugSupportDxe/Ia32/DebugSupport.h b/MdeModulePkg/Universal/DebugSupportDxe/Ia32/DebugSupport.h index 7f7d8e5ba6..8e5c5b85b9 100644 --- a/MdeModulePkg/Universal/DebugSupportDxe/Ia32/DebugSupport.h +++ b/MdeModulePkg/Universal/DebugSupportDxe/Ia32/DebugSupport.h @@ -1,14 +1,14 @@ /** @file Generic debug support macros, typedefs and prototypes for IA32/x64. -Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -90,8 +90,8 @@ Vect2Desc ( ); /** - Initializes driver's handler registration database. - + Initializes driver's handler registration database. + This code executes in boot services context Must be public because it's referenced from DebugSupport.c @@ -124,14 +124,14 @@ PlUnloadDebugSupportDriver ( /** Returns the maximum value that may be used for the ProcessorIndex parameter in - RegisterPeriodicCallback() and RegisterExceptionCallback(). - + RegisterPeriodicCallback() and RegisterExceptionCallback(). + Hard coded to support only 1 processor for now. @param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance. @param MaxProcessorIndex Pointer to a caller-allocated UINTN in which the maximum supported - processor index is returned. Always 0 returned. - + processor index is returned. Always 0 returned. + @retval EFI_SUCCESS Always returned with **MaxProcessorIndex set to 0. **/ @@ -144,17 +144,17 @@ GetMaximumProcessorIndex ( /** Registers a function to be called back periodically in interrupt context. - + @param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance. @param ProcessorIndex Specifies which processor the callback function applies to. @param PeriodicCallback A pointer to a function of type PERIODIC_CALLBACK that is the main periodic entry point of the debug agent. - - @retval EFI_SUCCESS The function completed successfully. + + @retval EFI_SUCCESS The function completed successfully. @retval EFI_ALREADY_STARTED Non-NULL PeriodicCallback parameter when a callback - function was previously registered. - @retval EFI_OUT_OF_RESOURCES System has insufficient memory resources to register new callback - function. + function was previously registered. + @retval EFI_OUT_OF_RESOURCES System has insufficient memory resources to register new callback + function. **/ EFI_STATUS EFIAPI @@ -168,17 +168,17 @@ RegisterPeriodicCallback ( Registers a function to be called when a given processor exception occurs. This code executes in boot services context. - + @param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance. @param ProcessorIndex Specifies which processor the callback function applies to. @param ExceptionCallback A pointer to a function of type EXCEPTION_CALLBACK that is called - when the processor exception specified by ExceptionType occurs. - @param ExceptionType Specifies which processor exception to hook. - - @retval EFI_SUCCESS The function completed successfully. + when the processor exception specified by ExceptionType occurs. + @param ExceptionType Specifies which processor exception to hook. + + @retval EFI_SUCCESS The function completed successfully. @retval EFI_ALREADY_STARTED Non-NULL PeriodicCallback parameter when a callback - function was previously registered. - @retval EFI_OUT_OF_RESOURCES System has insufficient memory resources to register new callback + function was previously registered. + @retval EFI_OUT_OF_RESOURCES System has insufficient memory resources to register new callback function. **/ EFI_STATUS @@ -192,14 +192,14 @@ RegisterExceptionCallback ( /** Invalidates processor instruction cache for a memory range. Subsequent execution in this range - causes a fresh memory fetch to retrieve code to be executed. - + causes a fresh memory fetch to retrieve code to be executed. + @param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance. @param ProcessorIndex Specifies which processor's instruction cache is to be invalidated. - @param Start Specifies the physical base of the memory range to be invalidated. + @param Start Specifies the physical base of the memory range to be invalidated. @param Length Specifies the minimum number of bytes in the processor's instruction - cache to invalidate. - + cache to invalidate. + @retval EFI_SUCCESS Always returned. **/ diff --git a/MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupport.c b/MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupport.c index f0c529a41b..782ce10490 100644 --- a/MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupport.c +++ b/MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupport.c @@ -1,7 +1,7 @@ /** @file IA32/x64 generic functions to support Debug Support protocol. -Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -84,7 +84,7 @@ HookEntry ( BOOLEAN OldIntFlagState; CreateEntryStub (ExceptionType, (VOID **) &IdtEntryTable[ExceptionType].StubEntry); - + // // Disables CPU interrupts and returns the previous interrupt state // @@ -95,12 +95,12 @@ HookEntry ( // ReadIdtGateDescriptor (ExceptionType, &(IdtEntryTable[ExceptionType].OrigDesc)); // - // stores orignal interrupt handle + // stores orignal interrupt handle // IdtEntryTable[ExceptionType].OrigVector = (DEBUG_PROC) GetInterruptHandleFromIdt (&(IdtEntryTable[ExceptionType].OrigDesc)); - // - // encodes new IDT Gate descriptor by stub entry + // + // encodes new IDT Gate descriptor by stub entry // Vect2Desc (&IdtEntryTable[ExceptionType].NewDesc, IdtEntryTable[ExceptionType].StubEntry); // @@ -154,14 +154,14 @@ UnhookEntry ( /** Returns the maximum value that may be used for the ProcessorIndex parameter in - RegisterPeriodicCallback() and RegisterExceptionCallback(). - + RegisterPeriodicCallback() and RegisterExceptionCallback(). + Hard coded to support only 1 processor for now. @param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance. @param MaxProcessorIndex Pointer to a caller-allocated UINTN in which the maximum supported - processor index is returned. Always 0 returned. - + processor index is returned. Always 0 returned. + @retval EFI_SUCCESS Always returned with **MaxProcessorIndex set to 0. **/ @@ -178,17 +178,17 @@ GetMaximumProcessorIndex ( /** Registers a function to be called back periodically in interrupt context. - + @param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance. @param ProcessorIndex Specifies which processor the callback function applies to. @param PeriodicCallback A pointer to a function of type PERIODIC_CALLBACK that is the main periodic entry point of the debug agent. - - @retval EFI_SUCCESS The function completed successfully. + + @retval EFI_SUCCESS The function completed successfully. @retval EFI_ALREADY_STARTED Non-NULL PeriodicCallback parameter when a callback - function was previously registered. - @retval EFI_OUT_OF_RESOURCES System has insufficient memory resources to register new callback - function. + function was previously registered. + @retval EFI_OUT_OF_RESOURCES System has insufficient memory resources to register new callback + function. **/ EFI_STATUS EFIAPI @@ -205,17 +205,17 @@ RegisterPeriodicCallback ( Registers a function to be called when a given processor exception occurs. This code executes in boot services context. - + @param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance. @param ProcessorIndex Specifies which processor the callback function applies to. @param ExceptionCallback A pointer to a function of type EXCEPTION_CALLBACK that is called - when the processor exception specified by ExceptionType occurs. - @param ExceptionType Specifies which processor exception to hook. - - @retval EFI_SUCCESS The function completed successfully. + when the processor exception specified by ExceptionType occurs. + @param ExceptionType Specifies which processor exception to hook. + + @retval EFI_SUCCESS The function completed successfully. @retval EFI_ALREADY_STARTED Non-NULL PeriodicCallback parameter when a callback - function was previously registered. - @retval EFI_OUT_OF_RESOURCES System has insufficient memory resources to register new callback + function was previously registered. + @retval EFI_OUT_OF_RESOURCES System has insufficient memory resources to register new callback function. **/ EFI_STATUS @@ -233,14 +233,14 @@ RegisterExceptionCallback ( /** Invalidates processor instruction cache for a memory range. Subsequent execution in this range - causes a fresh memory fetch to retrieve code to be executed. - + causes a fresh memory fetch to retrieve code to be executed. + @param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance. @param ProcessorIndex Specifies which processor's instruction cache is to be invalidated. - @param Start Specifies the physical base of the memory range to be invalidated. + @param Start Specifies the physical base of the memory range to be invalidated. @param Length Specifies the minimum number of bytes in the processor's instruction - cache to invalidate. - + cache to invalidate. + @retval EFI_SUCCESS Always returned. **/ @@ -317,8 +317,8 @@ PlUnloadDebugSupportDriver ( } /** - Initializes driver's handler registration database. - + Initializes driver's handler registration database. + This code executes in boot services context. Must be public because it's referenced from DebugSupport.c @@ -352,7 +352,7 @@ PlInitializeDebugSupportDriver ( if (IdtEntryTable[ExceptionType].StubEntry == NULL) { goto ErrorCleanup; } - + // // Copy Interrupt stub code. // diff --git a/MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupport.h b/MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupport.h index 0a1577fab3..2137343570 100644 --- a/MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupport.h +++ b/MdeModulePkg/Universal/DebugSupportDxe/Ia32/PlDebugSupport.h @@ -1,14 +1,14 @@ /** @file IA32 specific debug support macros, typedefs and prototypes. -Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Universal/DebugSupportDxe/Ipf/PlDebugSupport.h b/MdeModulePkg/Universal/DebugSupportDxe/Ipf/PlDebugSupport.h index 0cf29cadfb..1701fbff42 100644 --- a/MdeModulePkg/Universal/DebugSupportDxe/Ipf/PlDebugSupport.h +++ b/MdeModulePkg/Universal/DebugSupportDxe/Ipf/PlDebugSupport.h @@ -1,7 +1,7 @@ /** @file IPF specific types, macros, and definitions for Debug Support Driver. -Copyright (c) 2004 - 2010, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -185,7 +185,7 @@ RegisterPeriodicCallback ( @param This A pointer to the EFI_DEBUG_SUPPORT_PROTOCOL instance. @param ProcessorIndex Specifies which processor the callback function applies to. @param ExceptionCallback A pointer to a function of type EXCEPTION_CALLBACK that is called - when the processor exception specified by ExceptionType occurs. + when the processor exception specified by ExceptionType occurs. @param ExceptionType Specifies which processor exception to hook. @retval EFI_SUCCESS The function completed successfully. diff --git a/MdeModulePkg/Universal/DebugSupportDxe/X64/PlDebugSupport.h b/MdeModulePkg/Universal/DebugSupportDxe/X64/PlDebugSupport.h index 044e5d9d07..078c280588 100644 --- a/MdeModulePkg/Universal/DebugSupportDxe/X64/PlDebugSupport.h +++ b/MdeModulePkg/Universal/DebugSupportDxe/X64/PlDebugSupport.h @@ -1,14 +1,14 @@ /** @file X64 specific debug support macros. -Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf b/MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf index ba6ed6b6d8..37bbe297e6 100644 --- a/MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf +++ b/MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.inf @@ -6,7 +6,7 @@ # PcdDevicePathSupportDevicePathToText & PcdDevicePathSupportDevicePathFromText # respectively. # -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at @@ -43,7 +43,7 @@ DevicePathLib UefiBootServicesTableLib UefiDriverEntryPoint - + [Protocols] gEfiDevicePathToTextProtocolGuid | gEfiMdeModulePkgTokenSpaceGuid.PcdDevicePathSupportDevicePathFromText ## SOMETIMES_PRODUCES gEfiDevicePathFromTextProtocolGuid | gEfiMdeModulePkgTokenSpaceGuid.PcdDevicePathSupportDevicePathToText ## SOMETIMES_PRODUCES diff --git a/MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.uni b/MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.uni index 0f485742f5..249f5df114 100644 --- a/MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.uni +++ b/MdeModulePkg/Universal/DevicePathDxe/DevicePathDxe.uni @@ -6,13 +6,13 @@ // PcdDevicePathSupportDevicePathToText & PcdDevicePathSupportDevicePathFromText // respectively. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/DevicePathDxe/DevicePathDxeExtra.uni b/MdeModulePkg/Universal/DevicePathDxe/DevicePathDxeExtra.uni index 8ac8e3491b..04729f641a 100644 --- a/MdeModulePkg/Universal/DevicePathDxe/DevicePathDxeExtra.uni +++ b/MdeModulePkg/Universal/DevicePathDxe/DevicePathDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // DevicePathDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "UEFI Device Path DXE Driver" diff --git a/MdeModulePkg/Universal/Disk/CdExpressPei/CdExpressPei.inf b/MdeModulePkg/Universal/Disk/CdExpressPei/CdExpressPei.inf index facad470ef..e9ddecf967 100644 --- a/MdeModulePkg/Universal/Disk/CdExpressPei/CdExpressPei.inf +++ b/MdeModulePkg/Universal/Disk/CdExpressPei/CdExpressPei.inf @@ -1,11 +1,11 @@ ## @file # PeiCdExpress recovery module. # -# This module reads data from CDROM device by all installed block IO ppi and +# This module reads data from CDROM device by all installed block IO ppi and # finds whether there is Recovery data in the device. If it finds recovery # data, it will install Device Recovery Module PPI. # -# Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions diff --git a/MdeModulePkg/Universal/Disk/CdExpressPei/CdExpressPei.uni b/MdeModulePkg/Universal/Disk/CdExpressPei/CdExpressPei.uni index 7b17af011c..71f0acc3e9 100644 --- a/MdeModulePkg/Universal/Disk/CdExpressPei/CdExpressPei.uni +++ b/MdeModulePkg/Universal/Disk/CdExpressPei/CdExpressPei.uni @@ -5,14 +5,14 @@ // finds whether there is Recovery data in the device. If it finds recovery // data, it will install Device Recovery Module PPI. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions // of the BSD License which accompanies this distribution. The // full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/Disk/CdExpressPei/CdExpressPeiExtra.uni b/MdeModulePkg/Universal/Disk/CdExpressPei/CdExpressPeiExtra.uni index 47244c8813..528ed1ec32 100644 --- a/MdeModulePkg/Universal/Disk/CdExpressPei/CdExpressPeiExtra.uni +++ b/MdeModulePkg/Universal/Disk/CdExpressPei/CdExpressPeiExtra.uni @@ -1,7 +1,7 @@ // /** @file // CdExpressPei Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions @@ -14,8 +14,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "CD PEI Module for Recovery" diff --git a/MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.c b/MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.c index d3cbfaa2b1..76e5e1685d 100644 --- a/MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.c +++ b/MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.c @@ -1,7 +1,7 @@ /** @file Source file for CD recovery PEIM -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions @@ -21,7 +21,7 @@ CHAR8 *mRecoveryFileName; UINTN mRecoveryFileNameSize; /** - Installs the Device Recovery Module PPI, Initialize BlockIo Ppi + Installs the Device Recovery Module PPI, Initialize BlockIo Ppi installation notification @param FileHandle The file handle of the image. @@ -118,8 +118,8 @@ CdExpressPeimEntry ( } /** - BlockIo installation notification function. - + BlockIo installation notification function. + This function finds out all the current Block IO PPIs in the system and add them into private data. @@ -275,7 +275,7 @@ UpdateBlocksAndVolumes ( if (EFI_ERROR (Status)) { continue; } - + PrivateData->CapsuleCount++; } @@ -411,7 +411,7 @@ FindRecoveryCapsules ( @retval EFI_SUCCESS The recovery capsule is successfully found in the volume. @retval EFI_NOT_FOUND The recovery capsule is not found in the volume. - @retval Others + @retval Others **/ EFI_STATUS @@ -508,18 +508,18 @@ RetrieveCapsuleFileFromRoot ( Returns the number of DXE capsules residing on the device. This function searches for DXE capsules from the associated device and returns - the number and maximum size in bytes of the capsules discovered. Entry 1 is - assumed to be the highest load priority and entry N is assumed to be the lowest + the number and maximum size in bytes of the capsules discovered. Entry 1 is + assumed to be the highest load priority and entry N is assumed to be the lowest priority. - @param[in] PeiServices General-purpose services that are available + @param[in] PeiServices General-purpose services that are available to every PEIM @param[in] This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI instance. - @param[out] NumberRecoveryCapsules Pointer to a caller-allocated UINTN. On - output, *NumberRecoveryCapsules contains - the number of recovery capsule images - available for retrieval from this PEIM + @param[out] NumberRecoveryCapsules Pointer to a caller-allocated UINTN. On + output, *NumberRecoveryCapsules contains + the number of recovery capsule images + available for retrieval from this PEIM instance. @retval EFI_SUCCESS One or more capsules were discovered. @@ -555,18 +555,18 @@ GetNumberRecoveryCapsules ( This function gets the size and type of the capsule specified by CapsuleInstance. @param[in] PeiServices General-purpose services that are available to every PEIM - @param[in] This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI + @param[in] This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI instance. - @param[in] CapsuleInstance Specifies for which capsule instance to retrieve - the information. This parameter must be between - one and the value returned by GetNumberRecoveryCapsules() + @param[in] CapsuleInstance Specifies for which capsule instance to retrieve + the information. This parameter must be between + one and the value returned by GetNumberRecoveryCapsules() in NumberRecoveryCapsules. - @param[out] Size A pointer to a caller-allocated UINTN in which - the size of the requested recovery module is + @param[out] Size A pointer to a caller-allocated UINTN in which + the size of the requested recovery module is returned. - @param[out] CapsuleType A pointer to a caller-allocated EFI_GUID in which - the type of the requested recovery capsule is - returned. The semantic meaning of the value + @param[out] CapsuleType A pointer to a caller-allocated EFI_GUID in which + the type of the requested recovery capsule is + returned. The semantic meaning of the value returned is defined by the implementation. @retval EFI_SUCCESS One or more capsules were discovered. @@ -620,12 +620,12 @@ GetRecoveryCapsuleInfo ( This function, by whatever mechanism, retrieves a DXE capsule from some device and loads it into memory. Note that the published interface is device neutral. - @param[in] PeiServices General-purpose services that are available + @param[in] PeiServices General-purpose services that are available to every PEIM @param[in] This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI instance. @param[in] CapsuleInstance Specifies which capsule instance to retrieve. - @param[out] Buffer Specifies a caller-allocated buffer in which + @param[out] Buffer Specifies a caller-allocated buffer in which the requested recovery capsule will be returned. @retval EFI_SUCCESS The capsule was loaded correctly. diff --git a/MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.h b/MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.h index 1c8843cfc4..681c1ffcc7 100644 --- a/MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.h +++ b/MdeModulePkg/Universal/Disk/CdExpressPei/PeiCdExpress.h @@ -1,7 +1,7 @@ /** @file Header file for CD recovery PEIM -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions @@ -105,8 +105,8 @@ typedef struct { } PEI_CD_EXPRESS_DIR_FILE_RECORD; /** - BlockIo installation notification function. - + BlockIo installation notification function. + This function finds out all the current Block IO PPIs in the system and add them into private data. @@ -144,18 +144,18 @@ UpdateBlocksAndVolumes ( Returns the number of DXE capsules residing on the device. This function searches for DXE capsules from the associated device and returns - the number and maximum size in bytes of the capsules discovered. Entry 1 is - assumed to be the highest load priority and entry N is assumed to be the lowest + the number and maximum size in bytes of the capsules discovered. Entry 1 is + assumed to be the highest load priority and entry N is assumed to be the lowest priority. - @param[in] PeiServices General-purpose services that are available + @param[in] PeiServices General-purpose services that are available to every PEIM @param[in] This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI instance. - @param[out] NumberRecoveryCapsules Pointer to a caller-allocated UINTN. On - output, *NumberRecoveryCapsules contains - the number of recovery capsule images - available for retrieval from this PEIM + @param[out] NumberRecoveryCapsules Pointer to a caller-allocated UINTN. On + output, *NumberRecoveryCapsules contains + the number of recovery capsule images + available for retrieval from this PEIM instance. @retval EFI_SUCCESS One or more capsules were discovered. @@ -177,18 +177,18 @@ GetNumberRecoveryCapsules ( This function gets the size and type of the capsule specified by CapsuleInstance. @param[in] PeiServices General-purpose services that are available to every PEIM - @param[in] This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI + @param[in] This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI instance. - @param[in] CapsuleInstance Specifies for which capsule instance to retrieve - the information. This parameter must be between - one and the value returned by GetNumberRecoveryCapsules() + @param[in] CapsuleInstance Specifies for which capsule instance to retrieve + the information. This parameter must be between + one and the value returned by GetNumberRecoveryCapsules() in NumberRecoveryCapsules. - @param[out] Size A pointer to a caller-allocated UINTN in which - the size of the requested recovery module is + @param[out] Size A pointer to a caller-allocated UINTN in which + the size of the requested recovery module is returned. - @param[out] CapsuleType A pointer to a caller-allocated EFI_GUID in which - the type of the requested recovery capsule is - returned. The semantic meaning of the value + @param[out] CapsuleType A pointer to a caller-allocated EFI_GUID in which + the type of the requested recovery capsule is + returned. The semantic meaning of the value returned is defined by the implementation. @retval EFI_SUCCESS One or more capsules were discovered. @@ -212,12 +212,12 @@ GetRecoveryCapsuleInfo ( This function, by whatever mechanism, retrieves a DXE capsule from some device and loads it into memory. Note that the published interface is device neutral. - @param[in] PeiServices General-purpose services that are available + @param[in] PeiServices General-purpose services that are available to every PEIM @param[in] This Indicates the EFI_PEI_DEVICE_RECOVERY_MODULE_PPI instance. @param[in] CapsuleInstance Specifies which capsule instance to retrieve. - @param[out] Buffer Specifies a caller-allocated buffer in which + @param[out] Buffer Specifies a caller-allocated buffer in which the requested recovery capsule will be returned. @retval EFI_SUCCESS The capsule was loaded correctly. @@ -260,7 +260,7 @@ FindRecoveryCapsules ( @retval EFI_SUCCESS The recovery capsule is successfully found in the volume. @retval EFI_NOT_FOUND The recovery capsule is not found in the volume. - @retval Others + @retval Others **/ EFI_STATUS diff --git a/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIo.c b/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIo.c index b8bde2a25e..157e1b6d0e 100644 --- a/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIo.c +++ b/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIo.c @@ -9,7 +9,7 @@ Aligned - A read of N contiguous sectors. OverRun - The last byte is not on a sector boundary. -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -55,7 +55,7 @@ DISK_IO_PRIVATE_DATA gDiskIoPrivateDataTemplate = { }; /** - Test to see if this driver supports ControllerHandle. + Test to see if this driver supports ControllerHandle. @param This Protocol instance pointer. @param ControllerHandle Handle of device to test @@ -162,7 +162,7 @@ DiskIoDriverBindingStart ( if (EFI_ERROR (Status)) { gDiskIoPrivateDataTemplate.BlockIo2 = NULL; } - + // // Initialize the Disk IO device instance. // @@ -171,15 +171,15 @@ DiskIoDriverBindingStart ( Status = EFI_OUT_OF_RESOURCES; goto ErrorExit; } - + // // The BlockSize and IoAlign of BlockIo and BlockIo2 should equal. // ASSERT ((Instance->BlockIo2 == NULL) || - ((Instance->BlockIo->Media->IoAlign == Instance->BlockIo2->Media->IoAlign) && + ((Instance->BlockIo->Media->IoAlign == Instance->BlockIo2->Media->IoAlign) && (Instance->BlockIo->Media->BlockSize == Instance->BlockIo2->Media->BlockSize) )); - + InitializeListHead (&Instance->TaskQueue); EfiInitializeLock (&Instance->TaskQueueLock, TPL_NOTIFY); Instance->SharedWorkingBuffer = AllocateAlignedPages ( @@ -289,7 +289,7 @@ DiskIoDriverBindingStop ( if (EFI_ERROR (Status)) { DiskIo2 = NULL; } - + Instance = DISK_IO_PRIVATE_DATA_FROM_DISK_IO (DiskIo); if (DiskIo2 != NULL) { @@ -315,7 +315,7 @@ DiskIoDriverBindingStop ( ); } if (!EFI_ERROR (Status)) { - + do { EfiAcquireLock (&Instance->TaskQueueLock); AllTaskDone = IsListEmpty (&Instance->TaskQueue); @@ -343,7 +343,7 @@ DiskIoDriverBindingStop ( ); ASSERT_EFI_ERROR (Status); } - + FreePool (Instance); } @@ -378,7 +378,7 @@ DiskIoDestroySubtask ( if (!Subtask->Blocking) { if (Subtask->WorkingBuffer != NULL) { FreeAlignedPages ( - Subtask->WorkingBuffer, + Subtask->WorkingBuffer, Subtask->Length < Instance->BlockIo->Media->BlockSize ? EFI_SIZE_TO_PAGES (Instance->BlockIo->Media->BlockSize) : EFI_SIZE_TO_PAGES (Subtask->Length) @@ -420,7 +420,7 @@ DiskIo2OnReadWriteComplete ( ASSERT (Instance->Signature == DISK_IO_PRIVATE_DATA_SIGNATURE); ASSERT (Task->Signature == DISK_IO2_TASK_SIGNATURE); - if ((Subtask->WorkingBuffer != NULL) && !EFI_ERROR (TransactionStatus) && + if ((Subtask->WorkingBuffer != NULL) && !EFI_ERROR (TransactionStatus) && (Task->Token != NULL) && !Subtask->Write ) { CopyMem (Subtask->Buffer, Subtask->WorkingBuffer + Subtask->Offset, Subtask->Length); @@ -498,7 +498,7 @@ DiskIoCreateSubtask ( } } DEBUG (( - EFI_D_BLKIO, + EFI_D_BLKIO, " %c:Lba/Offset/Length/WorkingBuffer/Buffer = %016lx/%08x/%08x/%08x/%08x\n", Write ? 'W': 'R', Lba, Offset, Length, WorkingBuffer, Buffer )); @@ -553,7 +553,7 @@ DiskIoCreateSubtaskList ( if (IoAlign == 0) { IoAlign = 1; } - + Lba = DivU64x32Remainder (Offset, BlockSize, &UnderRun); BufferPtr = (UINT8 *) Buffer; @@ -596,7 +596,7 @@ DiskIoCreateSubtaskList ( goto Done; } InsertTailList (Subtasks, &Subtask->Link); - + BufferPtr += Length; Offset += Length; BufferSize -= Length; @@ -633,7 +633,7 @@ DiskIoCreateSubtaskList ( } InsertTailList (Subtasks, &Subtask->Link); } - + if (OverRunLba > Lba) { // // If the DiskIo maps directly to a BlockIo device do the read. @@ -726,7 +726,7 @@ DiskIo2Cancel ( DISK_IO_PRIVATE_DATA *Instance; DISK_IO2_TASK *Task; LIST_ENTRY *Link; - + Instance = DISK_IO_PRIVATE_DATA_FROM_DISK_IO2 (This); EfiAcquireLock (&Instance->TaskQueueLock); @@ -799,7 +799,7 @@ DiskIo2RemoveCompletedTask ( If this field is NULL, synchronous/blocking IO is performed. @param BufferSize The size in bytes of Buffer. The number of bytes to read from the device. @param Buffer A pointer to the destination buffer for the data. - The caller is responsible either having implicit or explicit ownership of the buffer. + The caller is responsible either having implicit or explicit ownership of the buffer. **/ EFI_STATUS DiskIo2ReadWriteDisk ( @@ -948,7 +948,7 @@ DiskIo2ReadWriteDisk ( break; } } - + gBS->RaiseTPL (TPL_NOTIFY); // @@ -1235,9 +1235,9 @@ DiskIoWriteDisk ( /** The user Entry Point for module DiskIo. The user code starts with this function. - @param[in] ImageHandle The firmware allocated handle for the EFI image. + @param[in] ImageHandle The firmware allocated handle for the EFI image. @param[in] SystemTable A pointer to the EFI System Table. - + @retval EFI_SUCCESS The entry point is executed successfully. @retval other Some error occurs when executing this entry point. diff --git a/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIo.h b/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIo.h index 7591e469a1..44940d9e4e 100644 --- a/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIo.h +++ b/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIo.h @@ -1,7 +1,7 @@ /** @file Master header file for DiskIo driver. It includes the module private defininitions. -Copyright (c) 2006 - 2013, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -100,7 +100,7 @@ extern EFI_COMPONENT_NAME2_PROTOCOL gDiskIoComponentName2; // Driver model protocol interface // /** - Test to see if this driver supports ControllerHandle. + Test to see if this driver supports ControllerHandle. @param This Protocol instance pointer. @param ControllerHandle Handle of device to test diff --git a/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf b/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf index cee27d5b11..6c00f553aa 100644 --- a/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf +++ b/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.inf @@ -7,16 +7,16 @@ # to any Block I/O interface that appears in the system that does not # already have a Disk I/O protocol. File systems and other disk access # code utilize the Disk I/O protocol. -# -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+# +# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# +# ## [Defines] diff --git a/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.uni b/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.uni index 88d7debf72..5e82489cb5 100644 --- a/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.uni +++ b/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxe.uni @@ -8,13 +8,13 @@ // already have a Disk I/O protocol. File systems and other disk access // code utilize the Disk I/O protocol. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxeExtra.uni b/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxeExtra.uni index d970e76cca..e18cc0d039 100644 --- a/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxeExtra.uni +++ b/MdeModulePkg/Universal/Disk/DiskIoDxe/DiskIoDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // DiskIoDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Disk I/O DXE Driver" diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Gpt.c b/MdeModulePkg/Universal/Disk/PartitionDxe/Gpt.c index fe26a64541..fe87761bde 100644 --- a/MdeModulePkg/Universal/Disk/PartitionDxe/Gpt.c +++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Gpt.c @@ -14,7 +14,7 @@ partition content and validate the GPT table and GPT entry. Copyright (c) 2018 Qualcomm Datacenter Technologies, Inc. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -101,7 +101,7 @@ PartitionRestoreGptTable ( @param[in] PartHeader Partition table header structure @param[in] PartEntry The partition entry array - @param[out] PEntryStatus the partition entry status array + @param[out] PEntryStatus the partition entry status array recording the status of each partition **/ @@ -698,7 +698,7 @@ Done: @param[in] PartHeader Partition table header structure @param[in] PartEntry The partition entry array - @param[out] PEntryStatus the partition entry status array + @param[out] PEntryStatus the partition entry status array recording the status of each partition **/ @@ -736,7 +736,7 @@ PartitionCheckGptEntry ( if ((Entry->Attributes & BIT1) != 0) { // - // If Bit 1 is set, this indicate that this is an OS specific GUID partition. + // If Bit 1 is set, this indicate that this is an OS specific GUID partition. // PEntryStatus[Index1].OsSpecific = TRUE; } diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c b/MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c index 479745b657..b1a99ee85b 100644 --- a/MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c +++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c @@ -3,17 +3,17 @@ MBR - Master Boot Record is in the first sector of a partitioned hard disk. The MBR supports four partitions per disk. The MBR also contains legacy - code that is not run on an EFI system. The legacy code reads the - first sector of the active partition into memory and + code that is not run on an EFI system. The legacy code reads the + first sector of the active partition into memory and - BPB - BIOS Parameter Block is in the first sector of a FAT file system. - The BPB contains information about the FAT file system. The BPB is + BPB - BIOS Parameter Block is in the first sector of a FAT file system. + The BPB contains information about the FAT file system. The BPB is always on the first sector of a media. The first sector also contains the legacy boot strap code. Copyright (c) 2018 Qualcomm Datacenter Technologies, Inc. Copyright (c) 2014, Hewlett-Packard Development Company, L.P.
-Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -31,7 +31,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @param Mbr Parent Handle. @param LastLba Last Lba address on the device. - + @retval TRUE Mbr is a Valid MBR. @retval FALSE Mbr is not a Valid MBR. @@ -76,7 +76,7 @@ PartitionValidMbr ( // return FALSE since no block devices on a system are implemented // with INT 13h // - + DEBUG((EFI_D_INFO, "PartitionValidMbr: Bad MBR partition size EndingLBA(%1x) > LastLBA(%1x)\n", EndingLBA, LastLba)); return FALSE; @@ -113,7 +113,7 @@ PartitionValidMbr ( @param[in] BlockIo Parent BlockIo interface. @param[in] BlockIo2 Parent BlockIo2 interface. @param[in] DevicePath Parent Device Path. - + @retval EFI_SUCCESS A child handle was added. @retval EFI_MEDIA_CHANGED Media change was detected. @retval Others MBR partition was not found. @@ -215,9 +215,9 @@ PartitionInstallMbrChildHandles ( if (Mbr->Partition[Index].OSIndicator == PMBR_GPT_PARTITION) { // // This is the guard MBR for the GPT. If you ever see a GPT disk with zero partitions you can get here. - // We can not produce an MBR BlockIo for this device as the MBR spans the GPT headers. So formating + // We can not produce an MBR BlockIo for this device as the MBR spans the GPT headers. So formating // this BlockIo would corrupt the GPT structures and require a recovery that would corrupt the format - // that corrupted the GPT partition. + // that corrupted the GPT partition. // continue; } diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c index 71acdcc898..bef6a48bc6 100644 --- a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c +++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c @@ -27,8 +27,8 @@ EFI_DRIVER_BINDING_PROTOCOL gPartitionDriverBinding = { PartitionDriverBindingStart, PartitionDriverBindingStop, // - // Grub4Dos copies the BPB of the first partition to the MBR. If the - // DriverBindingStart() of the Fat driver gets run before that of Partition + // Grub4Dos copies the BPB of the first partition to the MBR. If the + // DriverBindingStart() of the Fat driver gets run before that of Partition // driver only the first partition can be recognized. // Let the driver binding version of Partition driver be higher than that of // Fat driver to make sure the DriverBindingStart() of the Partition driver @@ -40,7 +40,7 @@ EFI_DRIVER_BINDING_PROTOCOL gPartitionDriverBinding = { }; // -// Prioritized function list to detect partition table. +// Prioritized function list to detect partition table. // PARTITION_DETECT_ROUTINE mPartitionDetectRoutineTable[] = { PartitionInstallGptChildHandles, @@ -82,7 +82,7 @@ PartitionDriverBindingSupported ( // if (RemainingDevicePath != NULL) { // - // Check if RemainingDevicePath is the End of Device Path Node, + // Check if RemainingDevicePath is the End of Device Path Node, // if yes, go on checking other conditions // if (!IsDevicePathEnd (RemainingDevicePath)) { @@ -205,13 +205,13 @@ PartitionDriverBindingStart ( EFI_TPL OldTpl; BlockIo2 = NULL; - OldTpl = gBS->RaiseTPL (TPL_CALLBACK); + OldTpl = gBS->RaiseTPL (TPL_CALLBACK); // // Check RemainingDevicePath validation // if (RemainingDevicePath != NULL) { // - // Check if RemainingDevicePath is the End of Device Path Node, + // Check if RemainingDevicePath is the End of Device Path Node, // if yes, return EFI_SUCCESS // if (IsDevicePathEnd (RemainingDevicePath)) { @@ -333,12 +333,12 @@ PartitionDriverBindingStart ( // driver. So don't try to close them. Otherwise, we will break the dependency // between the controller and the driver set up before. // - // In the case that when the media changes on a device it will Reinstall the + // In the case that when the media changes on a device it will Reinstall the // BlockIo interaface. This will cause a call to our Stop(), and a subsequent // reentrant call to our Start() successfully. We should leave the device open // when this happen. The "media change" case includes either the status is - // EFI_MEDIA_CHANGED or it is a "media" to "no media" change. - // + // EFI_MEDIA_CHANGED or it is a "media" to "no media" change. + // if (EFI_ERROR (Status) && !EFI_ERROR (OpenStatus) && Status != EFI_MEDIA_CHANGED && @@ -351,7 +351,7 @@ PartitionDriverBindingStart ( ); // // Close Parent DiskIo2 if has. - // + // gBS->CloseProtocol ( ControllerHandle, &gEfiDiskIo2ProtocolGuid, @@ -430,7 +430,7 @@ PartitionDriverBindingStop ( ); // // Close Parent BlockIO2 if has. - // + // gBS->CloseProtocol ( ControllerHandle, &gEfiDiskIo2ProtocolGuid, @@ -467,7 +467,7 @@ PartitionDriverBindingStop ( This->DriverBindingHandle, ControllerHandle, EFI_OPEN_PROTOCOL_GET_PROTOCOL - ); + ); Private = PARTITION_DEVICE_FROM_BLOCK_IO_THIS (BlockIo); @@ -893,7 +893,7 @@ PartitionCreateAccessTask ( /** Read BufferSize bytes from Lba into Buffer. - + This function reads the requested number of blocks from the device. All the blocks are read, or an error is returned. If EFI_DEVICE_ERROR, EFI_NO_MEDIA,_or EFI_MEDIA_CHANGED is returned and @@ -901,13 +901,13 @@ PartitionCreateAccessTask ( not be signaled. @param[in] This Indicates a pointer to the calling context. - @param[in] MediaId Id of the media, changes every time the media is + @param[in] MediaId Id of the media, changes every time the media is replaced. @param[in] Lba The starting Logical Block Address to read from. - @param[in, out] Token A pointer to the token associated with the transaction. - @param[in] BufferSize Size of Buffer, must be a multiple of device block size. - @param[out] Buffer A pointer to the destination buffer for the data. The - caller is responsible for either having implicit or + @param[in, out] Token A pointer to the token associated with the transaction. + @param[in] BufferSize Size of Buffer, must be a multiple of device block size. + @param[out] Buffer A pointer to the destination buffer for the data. The + caller is responsible for either having implicit or explicit ownership of the buffer. @retval EFI_SUCCESS The read request was queued if Token->Event is @@ -919,7 +919,7 @@ PartitionCreateAccessTask ( @retval EFI_MEDIA_CHANGED The MediaId is not for the current media. @retval EFI_BAD_BUFFER_SIZE The BufferSize parameter is not a multiple of the intrinsic block size of the device. - @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid, + @retval EFI_INVALID_PARAMETER The read request contains LBAs that are not valid, or the buffer is not on proper alignment. @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources. @@ -994,7 +994,7 @@ PartitionReadBlocksEx ( @retval EFI_MEDIA_CHNAGED The MediaId does not matched the current device. @retval EFI_DEVICE_ERROR The device reported an error while performing the write. @retval EFI_BAD_BUFFER_SIZE The Buffer was not a multiple of the block size of the device. - @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid, + @retval EFI_INVALID_PARAMETER The write request contains LBAs that are not valid, or the buffer is not on proper alignment. @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources. @@ -1026,7 +1026,7 @@ PartitionWriteBlocksEx ( if (Offset + BufferSize > Private->End) { return ProbeMediaStatusEx (Private->DiskIo2, MediaId, EFI_INVALID_PARAMETER); } - + if ((Token != NULL) && (Token->Event != NULL)) { Task = PartitionCreateAccessTask (Token); if (Task == NULL) { @@ -1046,10 +1046,10 @@ PartitionWriteBlocksEx ( /** Flush the Block Device. - + If EFI_DEVICE_ERROR, EFI_NO_MEDIA,_EFI_WRITE_PROTECTED or EFI_MEDIA_CHANGED is returned and non-blocking I/O is being used, the Event associated with - this request will not be signaled. + this request will not be signaled. @param[in] This Indicates a pointer to the calling context. @param[in, out] Token A pointer to the token associated with the transaction @@ -1160,7 +1160,7 @@ PartitionInstallChildHandle ( // Set the BlockIO into Private Data. // Private->BlockIo.Revision = ParentBlockIo->Revision; - + Private->BlockIo.Media = &Private->Media; CopyMem (Private->BlockIo.Media, ParentBlockIo->Media, sizeof (EFI_BLOCK_IO_MEDIA)); @@ -1180,7 +1180,7 @@ PartitionInstallChildHandle ( Private->BlockIo2.Reset = PartitionResetEx; Private->BlockIo2.ReadBlocksEx = PartitionReadBlocksEx; Private->BlockIo2.WriteBlocksEx = PartitionWriteBlocksEx; - Private->BlockIo2.FlushBlocksEx = PartitionFlushBlocksEx; + Private->BlockIo2.FlushBlocksEx = PartitionFlushBlocksEx; } Private->Media.IoAlign = 0; @@ -1234,7 +1234,7 @@ PartitionInstallChildHandle ( } // - // Create the new handle. + // Create the new handle. // Private->Handle = NULL; if (Private->DiskIo2 != NULL) { @@ -1252,7 +1252,7 @@ PartitionInstallChildHandle ( NULL, NULL ); - } else { + } else { Status = gBS->InstallMultipleProtocolInterfaces ( &Private->Handle, &gEfiDevicePathProtocolGuid, @@ -1291,9 +1291,9 @@ PartitionInstallChildHandle ( /** The user Entry Point for module Partition. The user code starts with this function. - @param[in] ImageHandle The firmware allocated handle for the EFI image. + @param[in] ImageHandle The firmware allocated handle for the EFI image. @param[in] SystemTable A pointer to the EFI System Table. - + @retval EFI_SUCCESS The entry point is executed successfully. @retval other Some error occurs when executing this entry point. diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.h b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.h index f1a05207bf..cd16f494f6 100644 --- a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.h +++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.h @@ -1,11 +1,11 @@ /** @file - Partition driver that produces logical BlockIo devices from a physical + Partition driver that produces logical BlockIo devices from a physical BlockIo device. The logical BlockIo devices are based on the format of the raw block devices media. Currently "El Torito CD-ROM", UDF, Legacy MBR, and GPT partition schemes are supported. Copyright (c) 2018 Qualcomm Datacenter Technologies, Inc. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -16,8 +16,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ -#ifndef _PARTITION_H_ -#define _PARTITION_H_ +#ifndef _PARTITION_H_ +#define _PARTITION_H_ #include #include @@ -431,7 +431,7 @@ PartitionInstallElToritoChildHandles ( @param[in] BlockIo Parent BlockIo interface. @param[in] BlockIo2 Parent BlockIo2 interface. @param[in] DevicePath Parent Device Path. - + @retval EFI_SUCCESS A child handle was added. @retval EFI_MEDIA_CHANGED Media change was detected. @retval Others MBR partition was not found. diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf b/MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf index fb2ea87a9d..46e39129cf 100644 --- a/MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf +++ b/MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.inf @@ -11,15 +11,15 @@ # This external input must be validated carefully to avoid security issue like # buffer overflow, integer overflow. # -# Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# +# ## [Defines] diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.uni b/MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.uni index ef0b6efa64..d6e2c827ae 100644 --- a/MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.uni +++ b/MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxe.uni @@ -5,19 +5,19 @@ // the bytes from Start to End of the Parent Block I/O device. // The partition of physical BlockIo device supported is one of legacy MBR, GPT, // and "El Torito" partitions. -// +// // Caution: This module requires additional review when modified. // This driver will have external input - disk partition. // This external input must be validated carefully to avoid security issue like // buffer overflow, integer overflow. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxeExtra.uni b/MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxeExtra.uni index 5530042aee..a37d49774c 100644 --- a/MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxeExtra.uni +++ b/MdeModulePkg/Universal/Disk/PartitionDxe/PartitionDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // PartitionDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Partition DXE Driver" diff --git a/MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf b/MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf index 46c834c648..ad763b1af4 100644 --- a/MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf +++ b/MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.inf @@ -1,21 +1,21 @@ ## @file # English module that provides Unicode Collation supports. -# +# # This driver installs Unicode ISO 639-2 Collation and # RFC 4646 Unicode Collation 2 protocols based on feature flags # PcdUnicodeCollationSupport & PcdUnicodeCollation2Support respectively. # It allows code running in the boot services environment to perform lexical # comparison functions on Unicode strings for English languages. -# -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+# +# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# +# ## [Defines] diff --git a/MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.uni b/MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.uni index de9a52399e..b3c1fe7b6f 100644 --- a/MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.uni +++ b/MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxe.uni @@ -7,13 +7,13 @@ // It allows code running in the boot services environment to perform lexical // comparison functions on Unicode strings for English languages. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxeExtra.uni b/MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxeExtra.uni index 34e3208c06..59284ce02f 100644 --- a/MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxeExtra.uni +++ b/MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/EnglishDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // EnglishDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "English Language Support" diff --git a/MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/UnicodeCollationEng.c b/MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/UnicodeCollationEng.c index a37f5c923c..4ca5fe3f7b 100644 --- a/MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/UnicodeCollationEng.c +++ b/MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/UnicodeCollationEng.c @@ -1,7 +1,7 @@ /** @file Driver to implement English version of Unicode Collation Protocol. -Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -81,13 +81,13 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_COLLATION_PROTOCOL Unicode2Eng = { /** The user Entry Point for English module. - + This function initializes unicode character mapping and then installs Unicode - Collation & Unicode Collation 2 Protocols based on the feature flags. + Collation & Unicode Collation 2 Protocols based on the feature flags. - @param ImageHandle The firmware allocated handle for the EFI image. + @param ImageHandle The firmware allocated handle for the EFI image. @param SystemTable A pointer to the EFI System Table. - + @retval EFI_SUCCESS The entry point is executed successfully. @retval other Some error occurs when executing this entry point. @@ -204,7 +204,7 @@ EngStriColl ( /** - Converts all the characters in a Null-terminated string to + Converts all the characters in a Null-terminated string to lower case characters. @param This Protocol instance pointer. @@ -418,8 +418,8 @@ EngFatToStr ( /** - Converts a Null-terminated string to legal characters in a FAT - filename using an OEM character set. + Converts a Null-terminated string to legal characters in a FAT + filename using an OEM character set. @param This Protocol instance pointer. @param String A pointer to a Null-terminated string. The string must diff --git a/MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/UnicodeCollationEng.h b/MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/UnicodeCollationEng.h index ac6dfc4033..ddce2f69d3 100644 --- a/MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/UnicodeCollationEng.h +++ b/MdeModulePkg/Universal/Disk/UnicodeCollation/EnglishDxe/UnicodeCollationEng.h @@ -1,7 +1,7 @@ /** @file Head file for Unicode Collation Protocol (English) -Copyright (c) 2006 - 2011, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -90,7 +90,7 @@ EngMetaiMatch ( ); /** - Converts all the characters in a Null-terminated string to + Converts all the characters in a Null-terminated string to lower case characters. @param This Protocol instance pointer. @@ -140,8 +140,8 @@ EngFatToStr ( ); /** - Converts a Null-terminated string to legal characters in a FAT - filename using an OEM character set. + Converts a Null-terminated string to legal characters in a FAT + filename using an OEM character set. @param This Protocol instance pointer. @param String A pointer to a Null-terminated string. The string must @@ -165,13 +165,13 @@ EngStrToFat ( /** The user Entry Point for English module. - + This function initializes unicode character mapping and then installs Unicode - Collation & Unicode Collation 2 Protocols based on the feature flags. + Collation & Unicode Collation 2 Protocols based on the feature flags. - @param ImageHandle The firmware allocated handle for the EFI image. + @param ImageHandle The firmware allocated handle for the EFI image. @param SystemTable A pointer to the EFI System Table. - + @retval EFI_SUCCESS The entry point is executed successfully. @retval other Some error occurs when executing this entry point. diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngine.uni b/MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngine.uni index 79868ec776..c25da883b4 100644 --- a/MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngine.uni +++ b/MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngine.uni @@ -3,13 +3,13 @@ // // A generic Timestamp driver producing Timestamp Protocol using UEFI APIs. // -// Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf b/MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf index fa7b2ca35d..c1c1974c13 100644 --- a/MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf +++ b/MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineDxe.inf @@ -1,7 +1,7 @@ ## @file # The DXE driver produces FORM DISPLAY ENGIEN protocol. # -# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -36,11 +36,11 @@ ProcessOptions.c InputHandler.c Popup.c - + [Packages] MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec - + [LibraryClasses] UefiDriverEntryPoint UefiBootServicesTableLib @@ -59,7 +59,7 @@ [Depex] gEfiHiiDatabaseProtocolGuid AND gEfiHiiConfigRoutingProtocolGuid AND gEdkiiFormBrowserEx2ProtocolGuid - + [FeaturePcd] gEfiMdeModulePkgTokenSpaceGuid.PcdBrowserGrayOutTextStatement ## CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdBrowerGrayOutReadOnlyMenu ## CONSUMES diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineExtra.uni b/MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineExtra.uni index 7d97faf7dd..b8019bfd82 100644 --- a/MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineExtra.uni +++ b/MdeModulePkg/Universal/DisplayEngineDxe/DisplayEngineExtra.uni @@ -1,7 +1,7 @@ // /** @file // DisplayEngine Localized Strings and Content // -// Copyright (c) 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "DisplayEngine DXE Driver" diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c index d2867d2921..f2eac4d3fe 100644 --- a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c +++ b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.c @@ -1,7 +1,7 @@ /** @file Entry and initialization module for the browser. -Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
Copyright (c) 2014, Hewlett-Packard Development Company, L.P.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -87,7 +87,7 @@ SCREEN_OPERATION_T0_CONTROL_FLAG gScreenOperationToControlFlag[] = { { UiPageDown, CfUiPageDown - }, + }, { UiHotKey, CfUiHotKey @@ -418,10 +418,10 @@ GetWidth ( // ((Statement->OpCode->OpCode == EFI_IFR_TEXT_OP) && (Size == 0)) ) { - + // // Return the space width. - // + // if (AdjustWidth != NULL) { *AdjustWidth = 2; } @@ -462,7 +462,7 @@ GetWidth ( @param Index Where in InputString to start the copy process @param OutputString Buffer to copy the string into - @return Returns the number of CHAR16 characters that were copied into the OutputString + @return Returns the number of CHAR16 characters that were copied into the OutputString buffer, include extra glyph info and '\0' info. **/ @@ -541,7 +541,7 @@ GetLineByWidth ( if (ReturnFlag) { break; } - } + } // // Rewind the string from the maximum size until we see a space to break the line @@ -590,7 +590,7 @@ GetLineByWidth ( if (InputString[*Index + StrOffset] == CHAR_SPACE) { // // Skip the space info at the begin of next line. - // + // *Index = (UINT16) (*Index + StrOffset + 1); } else if (InputString[*Index + StrOffset] == CHAR_LINEFEED) { // @@ -604,7 +604,7 @@ GetLineByWidth ( } else if (InputString[*Index + StrOffset] == CHAR_CARRIAGE_RETURN) { // // Skip the /r or /r/n info. - // + // if (InputString[*Index + StrOffset + 1] == CHAR_LINEFEED) { *Index = (UINT16) (*Index + StrOffset + 2); } else { @@ -705,7 +705,7 @@ UiAddMenuOption ( case EFI_IFR_TEXT_OP: if (FeaturePcdGet (PcdBrowserGrayOutTextStatement)) { // - // Initializing GrayOut option as TRUE for Text setup options + // Initializing GrayOut option as TRUE for Text setup options // so that those options will be Gray in colour and un selectable. // MenuOption->GrayOut = TRUE; @@ -723,8 +723,8 @@ UiAddMenuOption ( } } - if (Index == 0 && - (Statement->OpCode->OpCode != EFI_IFR_DATE_OP) && + if (Index == 0 && + (Statement->OpCode->OpCode != EFI_IFR_DATE_OP) && (Statement->OpCode->OpCode != EFI_IFR_TIME_OP)) { Width = GetWidth (MenuOption, NULL); for (; GetLineByWidth (MenuOption->Description, Width, &GlyphWidth,&ArrayEntry, &OutputString) != 0x0000;) { @@ -741,7 +741,7 @@ UiAddMenuOption ( // Add three MenuOptions for Date/Time // Data format : [01/02/2004] [11:22:33] // Line number : 0 0 1 0 0 1 - // + // NumberOfLines = 0; } @@ -920,8 +920,8 @@ UpdateSkipInfoForMenu ( FreePool (OutputString); } - if ((Row > MenuOption->Skip) && - (MenuOption->ThisTag->OpCode->OpCode != EFI_IFR_DATE_OP) && + if ((Row > MenuOption->Skip) && + (MenuOption->ThisTag->OpCode->OpCode != EFI_IFR_DATE_OP) && (MenuOption->ThisTag->OpCode->OpCode != EFI_IFR_TIME_OP)) { MenuOption->Skip = Row; } @@ -1045,8 +1045,8 @@ IsSelectable ( @return The row distance from current MenuOption to next selectable MenuOption. @retval -1 Reach the begin of the menu, still can't find the selectable menu. - @retval Value Find the selectable menu, maybe the truly selectable, maybe the - first menu showing beyond current form or last menu showing in + @retval Value Find the selectable menu, maybe the truly selectable, maybe the + first menu showing beyond current form or last menu showing in current form. The value is the line number between the new selected menu and the current select menu, not include the new selected menu. @@ -1126,10 +1126,10 @@ MoveToNextStatement ( @param MenuOption Menu option point to date/time. @param OptionString Option string input for process. - @param AddOptCol Whether need to update MenuOption->OptCol. + @param AddOptCol Whether need to update MenuOption->OptCol. **/ -VOID +VOID ProcessStringForDateTime ( UI_MENU_OPTION *MenuOption, CHAR16 *OptionString, @@ -1143,7 +1143,7 @@ ProcessStringForDateTime ( EFI_IFR_TIME *Time; ASSERT (MenuOption != NULL && OptionString != NULL); - + Statement = MenuOption->ThisTag; Date = NULL; Time = NULL; @@ -1152,7 +1152,7 @@ ProcessStringForDateTime ( } else if (Statement->OpCode->OpCode == EFI_IFR_TIME_OP) { Time = (EFI_IFR_TIME *) Statement->OpCode; } - + // // If leading spaces on OptionString - remove the spaces // @@ -1164,13 +1164,13 @@ ProcessStringForDateTime ( MenuOption->OptCol++; } } - + for (Count = 0; OptionString[Index] != CHAR_NULL; Index++) { OptionString[Count] = OptionString[Index]; Count++; } OptionString[Count] = CHAR_NULL; - + // // Enable to suppress field in the opcode base on the flag. // @@ -1182,21 +1182,21 @@ ProcessStringForDateTime ( // if ((Date->Flags & EFI_QF_DATE_MONTH_SUPPRESS) && (MenuOption->Sequence == 0)) { // - // At this point, only "<**:" in the optionstring. + // At this point, only "<**:" in the optionstring. // Clean the day's ** field, after clean, the format is "< :" // SetUnicodeMem (&OptionString[1], 2, L' '); } else if ((Date->Flags & EFI_QF_DATE_DAY_SUPPRESS) && (MenuOption->Sequence == 1)) { // - // At this point, only "**:" in the optionstring. + // At this point, only "**:" in the optionstring. // Clean the month's "**" field, after clean, the format is " :" - // + // SetUnicodeMem (&OptionString[0], 2, L' '); } else if ((Date->Flags & EFI_QF_DATE_YEAR_SUPPRESS) && (MenuOption->Sequence == 2)) { // - // At this point, only "****>" in the optionstring. + // At this point, only "****>" in the optionstring. // Clean the year's "****" field, after clean, the format is " >" - // + // SetUnicodeMem (&OptionString[0], 4, L' '); } } else if (Statement->OpCode->OpCode == EFI_IFR_TIME_OP) { @@ -1207,21 +1207,21 @@ ProcessStringForDateTime ( // if ((Time->Flags & QF_TIME_HOUR_SUPPRESS) && (MenuOption->Sequence == 0)) { // - // At this point, only "<**:" in the optionstring. + // At this point, only "<**:" in the optionstring. // Clean the hour's ** field, after clean, the format is "< :" // SetUnicodeMem (&OptionString[1], 2, L' '); } else if ((Time->Flags & QF_TIME_MINUTE_SUPPRESS) && (MenuOption->Sequence == 1)) { // - // At this point, only "**:" in the optionstring. + // At this point, only "**:" in the optionstring. // Clean the minute's "**" field, after clean, the format is " :" - // + // SetUnicodeMem (&OptionString[0], 2, L' '); } else if ((Time->Flags & QF_TIME_SECOND_SUPPRESS) && (MenuOption->Sequence == 2)) { // - // At this point, only "**>" in the optionstring. + // At this point, only "**>" in the optionstring. // Clean the second's "**" field, after clean, the format is " >" - // + // SetUnicodeMem (&OptionString[0], 2, L' '); } } @@ -1304,7 +1304,7 @@ AdjustDateAndTimePosition ( /** Get step info from numeric opcode. - + @param[in] OpCode The input numeric op code. @return step info for this opcode. @@ -1318,24 +1318,24 @@ GetFieldFromNum ( UINT64 Step; NumericOp = (EFI_IFR_NUMERIC *) OpCode; - + switch (NumericOp->Flags & EFI_IFR_NUMERIC_SIZE) { case EFI_IFR_NUMERIC_SIZE_1: Step = NumericOp->data.u8.Step; break; - + case EFI_IFR_NUMERIC_SIZE_2: Step = NumericOp->data.u16.Step; break; - + case EFI_IFR_NUMERIC_SIZE_4: Step = NumericOp->data.u32.Step; break; - + case EFI_IFR_NUMERIC_SIZE_8: Step = NumericOp->data.u64.Step; break; - + default: Step = 0; break; @@ -1346,7 +1346,7 @@ GetFieldFromNum ( /** Find the registered HotKey based on KeyData. - + @param[in] KeyData A pointer to a buffer that describes the keystroke information for the hot key. @@ -1363,14 +1363,14 @@ GetHotKeyFromRegisterList ( Link = GetFirstNode (&gFormData->HotKeyListHead); while (!IsNull (&gFormData->HotKeyListHead, Link)) { HotKey = BROWSER_HOT_KEY_FROM_LINK (Link); - + if (HotKey->KeyData->ScanCode == KeyData->ScanCode) { return HotKey; } Link = GetNextNode (&gFormData->HotKeyListHead, Link); } - + return NULL; } @@ -1440,13 +1440,13 @@ UiWaitForEvent ( Timeout ); } - + WaitList[0] = Event; EventNum = 1; if (gFormData->FormRefreshEvent != NULL) { WaitList[EventNum] = gFormData->FormRefreshEvent; EventNum ++; - } + } if (Timeout != 0) { WaitList[EventNum] = TimerEvent; @@ -1479,7 +1479,7 @@ UiWaitForEvent ( if (Timeout != 0) { gBS->CloseEvent (TimerEvent); } - + return EventType; } @@ -1603,7 +1603,7 @@ GetIndexInfoForOpcode ( @retval FALSE This is not the highlight statement. **/ -BOOLEAN +BOOLEAN IsSavedHighlightStatement ( IN FORM_DISPLAY_ENGINE_STATEMENT *HighLightedStatement ) @@ -1735,7 +1735,7 @@ IsTopOfScreeMenuOption ( { if (gHighligthMenuInfo.TOSQuestionId != 0) { return (BOOLEAN) (GetQuestionIdInfo(MenuOption->ThisTag->OpCode) == gHighligthMenuInfo.TOSQuestionId); - } + } if(CompareMem (gHighligthMenuInfo.TOSOpCode, MenuOption->ThisTag->OpCode, gHighligthMenuInfo.TOSOpCode->Length) == 0) { if (gHighligthMenuInfo.TOSIndex == 0 || gHighligthMenuInfo.TOSIndex == GetIndexInfoForOpcode(MenuOption->ThisTag->OpCode)) { @@ -1863,7 +1863,7 @@ FindTopMenu ( // if (gMisMatch && gFormData->HiiHandle == gHighligthMenuInfo.HiiHandle && gFormData->FormId == gHighligthMenuInfo.FormId) { // - // Reenter caused by option mismatch or auto exit caused by refresh form(refresh interval/guid), + // Reenter caused by option mismatch or auto exit caused by refresh form(refresh interval/guid), // base on the record highlight info to find the highlight menu. // @@ -1930,7 +1930,7 @@ FindTopMenu ( // MenuOption = MENU_OPTION_FROM_LINK (*HighlightMenu); UpdateOptionSkipLines (MenuOption); - + *TopOfScreen = FindTopOfScreenMenuOption(*HighlightMenu); if (*TopOfScreen == NULL) { // @@ -2090,7 +2090,7 @@ SetDisplayAttribute ( ) { FORM_DISPLAY_ENGINE_STATEMENT *Statement; - + Statement = MenuOption->ThisTag; if (Highlight) { @@ -2140,11 +2140,11 @@ DisplayMenuString ( PrintStringAtWithWidth (Col, Row, String, Width); return; } - + // // Print the highlight menu string. // First print the highlight string. - // + // SetDisplayAttribute(MenuOption, TRUE); Length = PrintStringAt (Col, Row, String); @@ -2164,7 +2164,7 @@ DisplayMenuString ( @retval FALSE This menu option can't have option string. **/ -BOOLEAN +BOOLEAN HasOptionString ( IN UI_MENU_OPTION *MenuOption ) @@ -2233,8 +2233,8 @@ FxConfirmPopup ( // // Below action need extra popup dialog to confirm. - // - CheckFlags = BROWSER_ACTION_DISCARD | + // + CheckFlags = BROWSER_ACTION_DISCARD | BROWSER_ACTION_DEFAULT | BROWSER_ACTION_SUBMIT | BROWSER_ACTION_RESET | @@ -2249,12 +2249,12 @@ FxConfirmPopup ( if ((Action & BROWSER_ACTION_DISCARD) == BROWSER_ACTION_DISCARD) { CfmStrLen += StrLen (gConfirmDiscardMsg); - } + } if ((Action & BROWSER_ACTION_DEFAULT) == BROWSER_ACTION_DEFAULT) { if (CfmStrLen != 0) { CfmStrLen += CatLen; - } + } CfmStrLen += StrLen (gConfirmDefaultMsg); } @@ -2262,7 +2262,7 @@ FxConfirmPopup ( if ((Action & BROWSER_ACTION_SUBMIT) == BROWSER_ACTION_SUBMIT) { if (CfmStrLen != 0) { CfmStrLen += CatLen; - } + } CfmStrLen += StrLen (gConfirmSubmitMsg); } @@ -2270,7 +2270,7 @@ FxConfirmPopup ( if ((Action & BROWSER_ACTION_RESET) == BROWSER_ACTION_RESET) { if (CfmStrLen != 0) { CfmStrLen += CatLen; - } + } CfmStrLen += StrLen (gConfirmResetMsg); } @@ -2278,7 +2278,7 @@ FxConfirmPopup ( if ((Action & BROWSER_ACTION_EXIT) == BROWSER_ACTION_EXIT) { if (CfmStrLen != 0) { CfmStrLen += CatLen; - } + } CfmStrLen += StrLen (gConfirmExitMsg); } @@ -2356,7 +2356,7 @@ FxConfirmPopup ( @param MenuOption The menu opton which this attribut used to. @param SkipWidth The skip width between the left to the start of the prompt. @param BeginCol The begin column for one menu. - @param SkipLine The skip line for this menu. + @param SkipLine The skip line for this menu. @param BottomRow The bottom row for this form. @param Highlight Whether this menu will be highlight. @param UpdateCol Whether need to update the column info for Date/Time. @@ -2425,12 +2425,12 @@ DisplayOneMenu ( // ProcessStringForDateTime(MenuOption, OptionString, UpdateCol); } - + Width = (UINT16) gOptionBlockWidth - 1; Row = MenuOption->Row; GlyphWidth = 1; OptionLineNum = 0; - + for (Index = 0; GetLineByWidth (OptionString, Width, &GlyphWidth, &Index, &OutputString) != 0x0000;) { if (((Temp2 == 0)) && (Row <= BottomRow)) { if (Statement->OpCode->OpCode == EFI_IFR_DATE_OP || Statement->OpCode->OpCode == EFI_IFR_TIME_OP) { @@ -2448,7 +2448,7 @@ DisplayOneMenu ( } else { // // For date/ time, print the first and second past (year for date and second for time) - // The OutputString has a NARROW_CHAR or WIDE_CHAR at the begin of the string, + // The OutputString has a NARROW_CHAR or WIDE_CHAR at the begin of the string, // so need to - 1 to remove it, otherwise, it will clean 1 extr char follow it. DisplayMenuString (MenuOption, MenuOption->OptCol, Row, OutputString, StrLen (OutputString) - 1, Highlight); } @@ -2457,7 +2457,7 @@ DisplayOneMenu ( } OptionLineNum++; } - + // // If there is more string to process print on the next row and increment the Skip value // @@ -2476,13 +2476,13 @@ DisplayOneMenu ( } } } - + FreePool (OutputString); if (Temp2 != 0) { Temp2--; } } - + Highlight = FALSE; FreePool (OptionString); @@ -2500,13 +2500,13 @@ DisplayOneMenu ( PrintStringAtWithWidth (BeginCol, Row, L"", PromptWidth + AdjustValue + SkipWidth); PromptLineNum++; } else { - for (Index = 0; GetLineByWidth (MenuOption->Description, PromptWidth, &GlyphWidth, &Index, &OutputString) != 0x0000;) { - if ((Temp == 0) && (Row <= BottomRow)) { + for (Index = 0; GetLineByWidth (MenuOption->Description, PromptWidth, &GlyphWidth, &Index, &OutputString) != 0x0000;) { + if ((Temp == 0) && (Row <= BottomRow)) { // - // 1.Clean the start LEFT_SKIPPED_COLUMNS + // 1.Clean the start LEFT_SKIPPED_COLUMNS // PrintStringAtWithWidth (BeginCol, Row, L"", SkipWidth); - + if (Statement->OpCode->OpCode == EFI_IFR_REF_OP && MenuOption->Col >= 2 && IsProcessingFirstRow) { // // Print Arrow for Goto button. @@ -2545,13 +2545,13 @@ DisplayOneMenu ( // if ((Statement->OpCode->OpCode == EFI_IFR_TEXT_OP) && (((EFI_IFR_TEXT*)Statement->OpCode)->TextTwo != 0)) { StringPtr = GetToken (((EFI_IFR_TEXT*)Statement->OpCode)->TextTwo, gFormData->HiiHandle); - + Width = (UINT16) gOptionBlockWidth - 1; Row = MenuOption->Row; GlyphWidth = 1; OptionLineNum = 0; - for (Index = 0; GetLineByWidth (StringPtr, Width, &GlyphWidth, &Index, &OutputString) != 0x0000;) { + for (Index = 0; GetLineByWidth (StringPtr, Width, &GlyphWidth, &Index, &OutputString) != 0x0000;) { if ((Temp3 == 0) && (Row <= BottomRow)) { DisplayMenuString (MenuOption, MenuOption->OptCol, Row, OutputString, Width + 1, Highlight); OptionLineNum++; @@ -2570,7 +2570,7 @@ DisplayOneMenu ( } } } - + FreePool (OutputString); if (Temp3 != 0) { Temp3--; @@ -2589,7 +2589,7 @@ DisplayOneMenu ( Row = (OptionLineNum < PromptLineNum ? OptionLineNum : PromptLineNum) + MenuOption->Row; Width = (UINT16) (OptionLineNum < PromptLineNum ? gOptionBlockWidth : PromptWidth + AdjustValue + SkipWidth); MaxRow = (OptionLineNum < PromptLineNum ? PromptLineNum : OptionLineNum) + MenuOption->Row - 1; - + while (Row <= MaxRow) { DisplayMenuString (MenuOption, Col, Row++, L"", Width, FALSE); } @@ -2717,7 +2717,7 @@ UiDisplayMenu ( while (TRUE) { switch (ControlFlag) { case CfInitialization: - if ((gOldFormEntry.HiiHandle != FormData->HiiHandle) || + if ((gOldFormEntry.HiiHandle != FormData->HiiHandle) || (!CompareGuid (&gOldFormEntry.FormSetGuid, &FormData->FormSetGuid))) { // // Clear Statement range if different formset is painted. @@ -2746,7 +2746,7 @@ UiDisplayMenu ( Row = TopRow; gST->ConOut->SetAttribute (gST->ConOut, GetFieldTextColor ()); - + // // 1. Check whether need to print the arrow up. // @@ -2795,19 +2795,19 @@ UiDisplayMenu ( } if ((FormData->Attribute & HII_DISPLAY_MODAL) != 0) { - Status = DisplayOneMenu (MenuOption, + Status = DisplayOneMenu (MenuOption, MenuOption->Col - gStatementDimensions.LeftColumn, - gStatementDimensions.LeftColumn + gModalSkipColumn, - Link == TopOfScreen ? SkipValue : 0, + gStatementDimensions.LeftColumn + gModalSkipColumn, + Link == TopOfScreen ? SkipValue : 0, BottomRow, (BOOLEAN) ((Link == NewPos) && IsSelectable(MenuOption)), TRUE ); } else { - Status = DisplayOneMenu (MenuOption, + Status = DisplayOneMenu (MenuOption, MenuOption->Col - gStatementDimensions.LeftColumn, - gStatementDimensions.LeftColumn, - Link == TopOfScreen ? SkipValue : 0, + gStatementDimensions.LeftColumn, + Link == TopOfScreen ? SkipValue : 0, BottomRow, (BOOLEAN) ((Link == NewPos) && IsSelectable(MenuOption)), TRUE @@ -2915,10 +2915,10 @@ UiDisplayMenu ( // // Remove the old highlight menu. // - Status = DisplayOneMenu (MenuOption, + Status = DisplayOneMenu (MenuOption, MenuOption->Col - gStatementDimensions.LeftColumn, - gStatementDimensions.LeftColumn, - Temp, + gStatementDimensions.LeftColumn, + Temp, BottomRow, FALSE, FALSE @@ -2935,10 +2935,10 @@ UiDisplayMenu ( break; } - Status = DisplayOneMenu (MenuOption, + Status = DisplayOneMenu (MenuOption, MenuOption->Col - gStatementDimensions.LeftColumn, - gStatementDimensions.LeftColumn, - Temp2, + gStatementDimensions.LeftColumn, + Temp2, BottomRow, TRUE, FALSE @@ -3038,7 +3038,7 @@ UiDisplayMenu ( // // Check whether need to show the 'More(U/u)' at the begin. // Base on current direct info, here shows aligned to the right side of the column. - // If the direction is multi line and aligned to right side may have problem, so + // If the direction is multi line and aligned to right side may have problem, so // add ASSERT code here. // if (HelpPageIndex > 0) { @@ -3093,7 +3093,7 @@ UiDisplayMenu ( ); } } else { - for (Index = 0; (Index < RowCount - HelpBottomLine - HelpHeaderLine) && + for (Index = 0; (Index < RowCount - HelpBottomLine - HelpHeaderLine) && (Index + HelpPageIndex * (RowCount - 2) + 1 < HelpLine); Index++) { PrintStringAtWithWidth ( gStatementDimensions.RightColumn - gHelpBlockWidth, @@ -3113,13 +3113,13 @@ UiDisplayMenu ( } gST->ConOut->SetCursorPosition(gST->ConOut, gStatementDimensions.RightColumn-1, BottomRow); } - } + } } // // Check whether need to print the 'More(D/d)' at the bottom. // Base on current direct info, here shows aligned to the right side of the column. - // If the direction is multi line and aligned to right side may have problem, so + // If the direction is multi line and aligned to right side may have problem, so // add ASSERT code here. // if (HelpPageIndex < HelpPageCount - 1 && MultiHelpPage) { @@ -3171,7 +3171,7 @@ UiDisplayMenu ( if (Status != EFI_NOT_READY) { continue; } - + EventType = UiWaitForEvent(gST->ConIn->WaitForKey); if (EventType == UIEventKey) { gST->ConIn->ReadKeyStroke (gST->ConIn, &Key); @@ -3185,7 +3185,7 @@ UiDisplayMenu ( ControlFlag = CfExit; break; } - + if (EventType == UIEventTimeOut) { gUserInput->Action = BROWSER_ACTION_FORM_EXIT; ControlFlag = CfExit; @@ -3229,7 +3229,7 @@ UiDisplayMenu ( } else { gDirection = SCAN_LEFT; } - + Status = ProcessOptions (MenuOption, TRUE, &OptionString, TRUE); if (OptionString != NULL) { FreePool (OptionString); @@ -3260,7 +3260,7 @@ UiDisplayMenu ( ControlFlag = CfReadKey; break; } - + ASSERT(MenuOption != NULL); if (MenuOption->ThisTag->OpCode->OpCode == EFI_IFR_CHECKBOX_OP && !MenuOption->GrayOut && !MenuOption->ReadOnly) { ScreenOperation = UiSelect; @@ -3294,7 +3294,7 @@ UiDisplayMenu ( break; } } - + if (((FormData->Attribute & HII_DISPLAY_MODAL) != 0) && (Key.ScanCode == SCAN_ESC || Index == mScanCodeNumber)) { // // ModalForm has no ESC key and Hot Key. @@ -3359,11 +3359,11 @@ UiDisplayMenu ( // RefreshKeyHelp (gFormData, Statement, TRUE); Status = ProcessOptions (MenuOption, TRUE, &OptionString, TRUE); - + if (OptionString != NULL) { FreePool (OptionString); } - + if (EFI_ERROR (Status)) { Repaint = TRUE; NewLine = TRUE; @@ -3493,12 +3493,12 @@ UiDisplayMenu ( // Check whether new highlight menu is selectable, if not, keep highlight on the old one. // // BottomRow - TopRow + 1 means the total rows current forms supported. - // Difference + NextMenuOption->Skip + 1 means the distance between last highlight menu - // and new top menu. New top menu will all shows in next form, but last highlight menu - // may only shows 1 line. + 1 at right part means at least need to keep 1 line for the + // Difference + NextMenuOption->Skip + 1 means the distance between last highlight menu + // and new top menu. New top menu will all shows in next form, but last highlight menu + // may only shows 1 line. + 1 at right part means at least need to keep 1 line for the // last highlight menu. - // - if (!IsSelectable(NextMenuOption) && IsSelectable(MenuOption) && + // + if (!IsSelectable(NextMenuOption) && IsSelectable(MenuOption) && (BottomRow - TopRow + 1 >= Difference + NextMenuOption->Skip + 1)) { NewPos = SavedListEntry; } @@ -3539,11 +3539,11 @@ UiDisplayMenu ( } else { Index = (BottomRow + 1) - SkipValue - TopRow; } - + TopOfScreen = FindTopOfScreenMenu(TopOfScreen, Index, &SkipValue); NewPos = TopOfScreen; MoveToNextStatement (FALSE, &NewPos, BottomRow - TopRow, FALSE); - + UpdateStatusBar (INPUT_ERROR, FALSE); // @@ -3662,7 +3662,7 @@ UiDisplayMenu ( // // Scroll to the first page. // - if (TopOfScreen != gMenuOption.ForwardLink || SkipValue != 0) { + if (TopOfScreen != gMenuOption.ForwardLink || SkipValue != 0) { TopOfScreen = gMenuOption.ForwardLink; Repaint = TRUE; MenuOption = NULL; @@ -3681,7 +3681,7 @@ UiDisplayMenu ( UpdateHighlightMenuInfo(NewPos, TopOfScreen, SkipValue); break; - } + } // // Get next selected menu info. @@ -3760,12 +3760,12 @@ UiDisplayMenu ( // Check whether new highlight menu is selectable, if not, keep highlight on the old one. // // BottomRow - TopRow + 1 means the total rows current forms supported. - // Difference + NextMenuOption->Skip + 1 means the distance between last highlight menu - // and new top menu. New top menu will all shows in next form, but last highlight menu - // may only shows 1 line. + 1 at right part means at least need to keep 1 line for the + // Difference + NextMenuOption->Skip + 1 means the distance between last highlight menu + // and new top menu. New top menu will all shows in next form, but last highlight menu + // may only shows 1 line. + 1 at right part means at least need to keep 1 line for the // last highlight menu. - // - if (!IsSelectable (NextMenuOption) && IsSelectable (MenuOption) && + // + if (!IsSelectable (NextMenuOption) && IsSelectable (MenuOption) && (BottomRow - TopRow + 1 >= Difference + NextMenuOption->Skip + 1)) { NewPos = SavedListEntry; } @@ -3984,7 +3984,7 @@ BrowserStatusProcess ( // Show the dialog first to avoid long time not reaction. // gBS->SignalEvent (RefreshIntervalEvent); - + Status = gBS->SetTimer (RefreshIntervalEvent, TimerPeriodic, ONE_SECOND); ASSERT_EFI_ERROR (Status); @@ -4025,17 +4025,17 @@ BrowserStatusProcess ( /** Display one form, and return user input. - + @param FormData Form Data to be shown. @param UserInputData User input data. - + @retval EFI_SUCCESS 1.Form Data is shown, and user input is got. 2.Error info has show and return. @retval EFI_INVALID_PARAMETER The input screen dimension is not valid @retval EFI_NOT_FOUND New form data has some error. **/ EFI_STATUS -EFIAPI +EFIAPI FormDisplay ( IN FORM_DISPLAY_ENGINE_FORM *FormData, OUT USER_INPUT *UserInputData @@ -4074,7 +4074,7 @@ FormDisplay ( // // Left right // |<-.->|<-.........->|<- .........->|<-...........->| - // Skip Prompt Option Help + // Skip Prompt Option Help // gOptionBlockWidth = (CHAR16) ((gStatementDimensions.RightColumn - gStatementDimensions.LeftColumn) / 3) + 1; gHelpBlockWidth = (CHAR16) (gOptionBlockWidth - 1 - LEFT_SKIPPED_COLUMNS); @@ -4085,7 +4085,7 @@ FormDisplay ( // // Check whether layout is changed. // - if (mIsFirstForm + if (mIsFirstForm || (gOldFormEntry.HiiHandle != FormData->HiiHandle) || (!CompareGuid (&gOldFormEntry.FormSetGuid, &FormData->FormSetGuid)) || (gOldFormEntry.FormId != FormData->FormId)) { @@ -4095,7 +4095,7 @@ FormDisplay ( } Status = UiDisplayMenu(FormData); - + // // Backup last form info. // @@ -4116,7 +4116,7 @@ FormDisplay ( Clear Screen to the initial state. **/ VOID -EFIAPI +EFIAPI DriverClearDisplayPage ( VOID ) @@ -4204,13 +4204,13 @@ InitializeDisplayEngine ( ASSERT_EFI_ERROR (Status); InitializeDisplayStrings(); - + ZeroMem (&gHighligthMenuInfo, sizeof (gHighligthMenuInfo)); ZeroMem (&gOldFormEntry, sizeof (gOldFormEntry)); // // Use BrowserEx2 protocol to register HotKey. - // + // Status = gBS->LocateProtocol (&gEdkiiFormBrowserEx2ProtocolGuid, NULL, (VOID **) &FormBrowserEx2); if (!EFI_ERROR (Status)) { // diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.h b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.h index 7e2a1aa64b..fc28f95e72 100644 --- a/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.h +++ b/MdeModulePkg/Universal/DisplayEngineDxe/FormDisplay.h @@ -1,13 +1,13 @@ /** @file FormDiplay protocol to show Form -Copyright (c) 2013 - 2017, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under -the terms and conditions of the BSD License that accompanies this distribution. +Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under +the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php. +http://opensource.org/licenses/bsd-license.php. -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -213,22 +213,22 @@ typedef struct { typedef struct { EFI_HII_HANDLE HiiHandle; UINT16 FormId; - + // // Info for the highlight question. // HLT means highlight // // If one statement has questionid, save questionid info to find the question. - // If one statement not has questionid info, save the opcode info to find the + // If one statement not has questionid info, save the opcode info to find the // statement. If more than one statement has same opcode in one form(just like - // empty subtitle info may has more than one info one form), also use Index + // empty subtitle info may has more than one info one form), also use Index // info to find the statement. // EFI_QUESTION_ID HLTQuestionId; EFI_IFR_OP_HEADER *HLTOpCode; UINTN HLTIndex; UINTN HLTSequence; - + // // Info for the top of screen question. // TOS means Top Of Screen @@ -390,7 +390,7 @@ GetArrayData ( IN UINT8 Type, IN UINTN Index ); - + /** Search an Option of a Question by its value. @@ -462,7 +462,7 @@ CreateMultiStringPopUp ( @param Index Where in InputString to start the copy process @param OutputString Buffer to copy the string into - @return Returns the number of CHAR16 characters that were copied into the OutputString + @return Returns the number of CHAR16 characters that were copied into the OutputString buffer, include extra glyph info and '\0' info. **/ @@ -490,7 +490,7 @@ GetToken ( IN EFI_STRING_ID Token, IN EFI_HII_HANDLE HiiHandle ); - + /** Count the storage space of a Unicode string. @@ -559,7 +559,7 @@ CreateSharedPopUp ( IN UINTN NumberOfLines, IN VA_LIST Marker ); - + /** Wait for a key to be pressed by user. @@ -642,14 +642,14 @@ SetUnicodeMem ( /** Display one form, and return user input. - + @param FormData Form Data to be shown. @param UserInputData User input data. - + @retval EFI_SUCCESS Form Data is shown, and user input is got. **/ EFI_STATUS -EFIAPI +EFIAPI FormDisplay ( IN FORM_DISPLAY_ENGINE_FORM *FormData, OUT USER_INPUT *UserInputData @@ -659,7 +659,7 @@ FormDisplay ( Clear Screen to the initial state. **/ VOID -EFIAPI +EFIAPI DriverClearDisplayPage ( VOID ); @@ -669,7 +669,7 @@ DriverClearDisplayPage ( **/ VOID -EFIAPI +EFIAPI ExitDisplay ( VOID ); diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c b/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c index d02c0bf074..cf829a3214 100644 --- a/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c +++ b/MdeModulePkg/Universal/DisplayEngineDxe/InputHandler.c @@ -1,7 +1,7 @@ /** @file Implementation for handling user input from the User Interfaces. -Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -34,14 +34,14 @@ GetFieldFromOp ( if (OpCode->OpCode == EFI_IFR_STRING_OP) { StringOp = (EFI_IFR_STRING *) OpCode; *Minimum = StringOp->MinSize; - *Maximum = StringOp->MaxSize; + *Maximum = StringOp->MaxSize; } else if (OpCode->OpCode == EFI_IFR_PASSWORD_OP) { PasswordOp = (EFI_IFR_PASSWORD *) OpCode; *Minimum = PasswordOp->MinSize; - *Maximum = PasswordOp->MaxSize; + *Maximum = PasswordOp->MaxSize; } else { *Minimum = 0; - *Maximum = 0; + *Maximum = 0; } } @@ -160,11 +160,11 @@ ReadString ( if (!IsPassword) { PrintStringAt (Start + 1, Top + 3, BufferedString); } - + gST->ConOut->SetAttribute (gST->ConOut, EFI_TEXT_ATTR (EFI_LIGHTGRAY, EFI_BLACK)); gST->ConOut->SetCursorPosition (gST->ConOut, Start + GetStringWidth (StringPtr) / 2, Top + 3); } - + do { Status = WaitForKeyStroke (&Key); ASSERT_EFI_ERROR (Status); @@ -264,7 +264,7 @@ ReadString ( for (Index = 0; Index < CurrentCursor; Index++) { TempString[Index] = StringPtr[Index]; } - TempString[Index] = CHAR_NULL; + TempString[Index] = CHAR_NULL; StrCatS (TempString, MaxLen, KeyPad); StrCatS (TempString, MaxLen, StringPtr + CurrentCursor); StrCpyS (StringPtr, MaxLen, TempString); @@ -361,7 +361,7 @@ AdjustQuestionValue ( QuestionValue->Value.date.Day = Maximum; } } - + // // Change the Year area. // @@ -400,7 +400,7 @@ GetValueFromNum ( EFI_IFR_NUMERIC *NumericOp; NumericOp = (EFI_IFR_NUMERIC *) OpCode; - + switch (NumericOp->Flags & EFI_IFR_NUMERIC_SIZE) { case EFI_IFR_NUMERIC_SIZE_1: if (IntInput) { @@ -415,7 +415,7 @@ GetValueFromNum ( *Step = NumericOp->data.u8.Step; *StorageWidth = (UINT16) sizeof (UINT8); break; - + case EFI_IFR_NUMERIC_SIZE_2: if (IntInput) { *Minimum = (INT64) (INT16) NumericOp->data.u16.MinValue; @@ -429,7 +429,7 @@ GetValueFromNum ( *Step = NumericOp->data.u16.Step; *StorageWidth = (UINT16) sizeof (UINT16); break; - + case EFI_IFR_NUMERIC_SIZE_4: if (IntInput) { *Minimum = (INT64) (INT32) NumericOp->data.u32.MinValue; @@ -443,7 +443,7 @@ GetValueFromNum ( *Step = NumericOp->data.u32.Step; *StorageWidth = (UINT16) sizeof (UINT32); break; - + case EFI_IFR_NUMERIC_SIZE_8: if (IntInput) { *Minimum = (INT64) NumericOp->data.u64.MinValue; @@ -457,7 +457,7 @@ GetValueFromNum ( *Step = NumericOp->data.u64.Step; *StorageWidth = (UINT16) sizeof (UINT64); break; - + default: break; } @@ -557,8 +557,8 @@ GetNumericInput ( case 1: switch (QuestionValue->Value.date.Month) { case 2: - if ((QuestionValue->Value.date.Year % 4) == 0 && - ((QuestionValue->Value.date.Year % 100) != 0 || + if ((QuestionValue->Value.date.Year % 4) == 0 && + ((QuestionValue->Value.date.Year % 100) != 0 || (QuestionValue->Value.date.Year % 400) == 0)) { Maximum = 29; } else { @@ -574,7 +574,7 @@ GetNumericInput ( default: Maximum = 31; break; - } + } EraseLen = 3; EditValue = QuestionValue->Value.date.Day; @@ -907,7 +907,7 @@ EnterCarriageReturn: if (IntInput) { // // After user input Enter, need to check whether the input value. - // If input a negative value, should compare with maximum value. + // If input a negative value, should compare with maximum value. // else compare with the minimum value. // if (Negative) { @@ -977,7 +977,7 @@ EnterCarriageReturn: // Sample like: 2012.02.29 -> 2013.02.29 -> 2013.02.01 // 2013.03.29 -> 2013.02.29 -> 2013.02.28 // - if (Question->OpCode->OpCode == EFI_IFR_DATE_OP && + if (Question->OpCode->OpCode == EFI_IFR_DATE_OP && (MenuOption->Sequence == 0 || MenuOption->Sequence == 2)) { AdjustQuestionValue (QuestionValue, (UINT8)MenuOption->Sequence); } @@ -1136,12 +1136,12 @@ AdjustOptionOrder ( break; } } - + *PopUpMenuLines = Index; - + // // Prepare HiiValue array - // + // HiiValueArray = AllocateZeroPool (*PopUpMenuLines * sizeof (EFI_HII_VALUE)); ASSERT (HiiValueArray != NULL); @@ -1149,21 +1149,21 @@ AdjustOptionOrder ( HiiValueArray[Index].Type = ValueType; HiiValueArray[Index].Value.u64 = GetArrayData (ValueArray, ValueType, Index); } - + for (Index = 0; Index < *PopUpMenuLines; Index++) { OneOfOption = ValueToOption (Question, &HiiValueArray[*PopUpMenuLines - Index - 1]); if (OneOfOption == NULL) { return EFI_NOT_FOUND; } - + RemoveEntryList (&OneOfOption->Link); - + // // Insert to head. // InsertHeadList (&Question->OptionListHead, &OneOfOption->Link); } - + FreePool (HiiValueArray); return EFI_SUCCESS; @@ -1191,13 +1191,13 @@ IsValuesEqual ( case EFI_IFR_TYPE_BOOLEAN: case EFI_IFR_TYPE_NUM_SIZE_8: return (BOOLEAN) (Value1->u8 == Value2->u8); - + case EFI_IFR_TYPE_NUM_SIZE_16: return (BOOLEAN) (Value1->u16 == Value2->u16); - + case EFI_IFR_TYPE_NUM_SIZE_32: return (BOOLEAN) (Value1->u32 == Value2->u32); - + case EFI_IFR_TYPE_NUM_SIZE_64: return (BOOLEAN) (Value1->u64 == Value2->u64); @@ -1660,7 +1660,7 @@ TheKey: gST->ConOut->SetAttribute (gST->ConOut, SavedAttribute); return EFI_SUCCESS; - + default: break; } diff --git a/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c b/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c index 557e8ecd94..709dabc7f5 100644 --- a/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c +++ b/MdeModulePkg/Universal/DisplayEngineDxe/ProcessOptions.c @@ -2,7 +2,7 @@ Implementation for handling the User Interface option processing. -Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -102,8 +102,8 @@ HiiValueToUINT64 ( /** Check whether this value type can be transfer to EFI_IFR_TYPE_BUFFER type. - - EFI_IFR_TYPE_REF, EFI_IFR_TYPE_DATE and EFI_IFR_TYPE_TIME are converted to + + EFI_IFR_TYPE_REF, EFI_IFR_TYPE_DATE and EFI_IFR_TYPE_TIME are converted to EFI_IFR_TYPE_BUFFER when do the value compare. @param Value Expression value to compare on. @@ -158,8 +158,8 @@ IsTypeInUINT64 ( /** Return the buffer length and buffer pointer for this value. - - EFI_IFR_TYPE_REF, EFI_IFR_TYPE_DATE and EFI_IFR_TYPE_TIME are converted to + + EFI_IFR_TYPE_REF, EFI_IFR_TYPE_DATE and EFI_IFR_TYPE_TIME are converted to EFI_IFR_TYPE_BUFFER when do the value compare. @param Value Expression value to compare on. @@ -285,7 +285,7 @@ CompareHiiValue ( *Result = Buf1Len > Buf2Len ? 1 : -1; } return EFI_SUCCESS; - } + } // // Take remain types(integer, boolean, date/time) as integer @@ -333,7 +333,7 @@ ValueToOption ( ZeroMem (&Value, sizeof (EFI_HII_VALUE)); Value.Type = Option->OptionOpCode->Type; CopyMem (&Value.Value, &Option->OptionOpCode->Value, Option->OptionOpCode->Header.Length - OFFSET_OF (EFI_IFR_ONE_OF_OPTION, Value)); - + if ((CompareHiiValue (&Value, OptionValue, &Result, NULL) == EFI_SUCCESS) && (Result == 0)) { return Option; } @@ -441,12 +441,12 @@ SetArrayData ( @param Type Type of the data in this array. @param Value The value to be find. @param Index The index in the array which has same value with Value. - + @retval TRUE Found the value in the array. @retval FALSE Not found the value. **/ -BOOLEAN +BOOLEAN FindArrayData ( IN VOID *Array, IN UINT8 Type, @@ -457,7 +457,7 @@ FindArrayData ( UINTN Count; UINT64 TmpValue; UINT64 ValueComp; - + ASSERT (Array != NULL); Count = 0; @@ -804,7 +804,7 @@ PasswordProcess ( StringPtr = AllocateZeroPool ((Maximum + 1) * sizeof (CHAR16)); ASSERT (StringPtr); - + // // Use a NULL password to test whether old password is required // @@ -812,7 +812,7 @@ PasswordProcess ( Status = Question->PasswordCheck (gFormData, Question, StringPtr); if (Status == EFI_NOT_AVAILABLE_YET || Status == EFI_UNSUPPORTED) { // - // Password can't be set now. + // Password can't be set now. // if (Status == EFI_UNSUPPORTED) { do { @@ -851,7 +851,7 @@ PasswordProcess ( return Status; } } - + // // Ask for new password // @@ -865,7 +865,7 @@ PasswordProcess ( FreePool (StringPtr); return Status; } - + // // Confirm new password // @@ -881,11 +881,11 @@ PasswordProcess ( FreePool (TempString); return Status; } - + // // Compare two typed-in new passwords // - if (StrCmp (StringPtr, TempString) == 0) { + if (StrCmp (StringPtr, TempString) == 0) { gUserInput->InputValue.Buffer = AllocateCopyPool (Question->CurrentValue.BufferLen, StringPtr); gUserInput->InputValue.BufferLen = Question->CurrentValue.BufferLen; gUserInput->InputValue.Type = Question->CurrentValue.Type; @@ -897,7 +897,7 @@ PasswordProcess ( // Reset state machine for password // Question->PasswordCheck (gFormData, Question, NULL); - + // // Two password mismatch, prompt error message // @@ -1039,7 +1039,7 @@ ProcessOptions ( gUserInput->InputValue.Buffer = ValueArray; gUserInput->InputValue.BufferLen = Question->CurrentValue.BufferLen; gUserInput->InputValue.Type = Question->CurrentValue.Type; - + Link = GetFirstNode (&Question->OptionListHead); Index2 = 0; while (!IsNull (&Question->OptionListHead, Link) && Index2 < OrderList->MaxContainers) { @@ -1125,7 +1125,7 @@ ProcessOptions ( gUserInput->InputValue.BufferLen = Question->CurrentValue.BufferLen; gUserInput->InputValue.Type = Question->CurrentValue.Type; } - + SetArrayData (ValueArray, ValueType, Index++, OneOfOption->OptionOpCode->Value.u64); } @@ -1159,7 +1159,7 @@ ProcessOptions ( if (SkipErrorValue) { // // Not report error, just get the correct option string info. - // + // Link = GetFirstNode (&Question->OptionListHead); OneOfOption = DISPLAY_QUESTION_OPTION_FROM_LINK (Link); } else { @@ -1227,7 +1227,7 @@ ProcessOptions ( // Perform inconsistent check // return EFI_SUCCESS; - } else { + } else { *OptionString = AllocateZeroPool (BufferSize); ASSERT (*OptionString); @@ -1364,7 +1364,7 @@ ProcessOptions ( FreePool (StringPtr); return Status; } - + gUserInput->InputValue.Buffer = AllocateCopyPool (Question->CurrentValue.BufferLen, StringPtr); gUserInput->InputValue.BufferLen = Question->CurrentValue.BufferLen; gUserInput->InputValue.Type = Question->CurrentValue.Type; @@ -1466,5 +1466,5 @@ ProcessHelpString ( FreePool (OutputString); } - return TotalRowNum; + return TotalRowNum; } diff --git a/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.c b/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.c index 3f9c24036d..9784363140 100644 --- a/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.c +++ b/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.c @@ -4,7 +4,7 @@ driver health instances, the other will be automatically included by firmware setup (UI). -Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2018 Hewlett Packard Enterprise Development LP
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -588,7 +588,7 @@ DriverHealthManagerGetFormsetId ( // // Search FormSet in this Form Package // - + for (Offset2 = sizeof (EFI_HII_PACKAGE_HEADER); Offset2 < PackageHeader.Length; Offset2 += ((EFI_IFR_OP_HEADER *) OpCodeData)->Length) { OpCodeData = Package + Offset2; diff --git a/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf b/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf index 482981c143..d84c7cee15 100644 --- a/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf +++ b/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.inf @@ -6,15 +6,15 @@ # driver health instances, the other will be automatically included by # firmware setup (UI). # -# Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.
+# Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# +# ## ################################################################################ # diff --git a/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.uni b/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.uni index 3389ff50ae..dcb1750985 100644 --- a/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.uni +++ b/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxe.uni @@ -6,12 +6,12 @@ // driver health instances, the other will be automatically included by // firmware setup (UI). // -// Copyright (c) 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
// This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxeExtra.uni b/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxeExtra.uni index 740461b6af..597ddae5d4 100644 --- a/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxeExtra.uni +++ b/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerDxeExtra.uni @@ -6,7 +6,7 @@ // driver health instances, the other will be automatically included by // firmware setup (UI). // -// Copyright (c) 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -18,8 +18,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Driver Health Manager DXE driver" diff --git a/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerStrings.uni b/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerStrings.uni index 3c1a4f0d2a..e6751390dd 100644 --- a/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerStrings.uni +++ b/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerStrings.uni @@ -1,13 +1,13 @@ ///** @file -// +// // String definitions for the DriverHealthManager. -// -// Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.
+// +// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. diff --git a/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerVfr.h b/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerVfr.h index 61ca04af11..35b8a27526 100644 --- a/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerVfr.h +++ b/MdeModulePkg/Universal/DriverHealthManagerDxe/DriverHealthManagerVfr.h @@ -1,7 +1,7 @@ /** @file Definition shared by VFR file and C file. -Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -16,8 +16,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #define _DRIVER_HEALTH_VFR_H_ #include -#define DRIVER_HEALTH_MANAGER_FORMSET_GUID { 0xcfb3b000, 0x0b63, 0x444b, { 0xb1, 0xd1, 0x12, 0xd5, 0xd9, 0x5d, 0xc4, 0xfc } } -#define DRIVER_HEALTH_CONFIGURE_FORMSET_GUID { 0x4296d9f4, 0xf6fc, 0x4dde, { 0x86, 0x85, 0x8c, 0xe2, 0xd7, 0x9d, 0x90, 0xf0 } } +#define DRIVER_HEALTH_MANAGER_FORMSET_GUID { 0xcfb3b000, 0x0b63, 0x444b, { 0xb1, 0xd1, 0x12, 0xd5, 0xd9, 0x5d, 0xc4, 0xfc } } +#define DRIVER_HEALTH_CONFIGURE_FORMSET_GUID { 0x4296d9f4, 0xf6fc, 0x4dde, { 0x86, 0x85, 0x8c, 0xe2, 0xd7, 0x9d, 0x90, 0xf0 } } #define LABEL_BEGIN 0x2000 #define LABEL_END 0x2001 diff --git a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c index af31615a61..36ed734e38 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c +++ b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.c @@ -2,7 +2,7 @@ This is an example of how a driver might export data to the HII protocol to be later utilized by the Setup Protocol -Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -127,12 +127,12 @@ NotificationFunction( ) { gBS->SignalEvent (mEvent); - + return EFI_SUCCESS; } /** - Function to start monitoring for CTRL-C using SimpleTextInputEx. + Function to start monitoring for CTRL-C using SimpleTextInputEx. @retval EFI_SUCCESS The feature is enabled. @retval EFI_OUT_OF_RESOURCES There is not enough mnemory available. @@ -175,7 +175,7 @@ InternalStartMonitor( if (EFI_ERROR (Status)) { break; } - + KeyData.KeyState.KeyShiftState = EFI_SHIFT_STATE_VALID|EFI_RIGHT_CONTROL_PRESSED; Status = SimpleEx->RegisterKeyNotify( SimpleEx, @@ -191,7 +191,7 @@ InternalStartMonitor( } /** - Function to stop monitoring for CTRL-C using SimpleTextInputEx. + Function to stop monitoring for CTRL-C using SimpleTextInputEx. @retval EFI_SUCCESS The feature is enabled. @retval EFI_OUT_OF_RESOURCES There is not enough mnemory available. @@ -205,7 +205,7 @@ InternalStopMonitor( EFI_SIMPLE_TEXT_INPUT_EX_PROTOCOL *SimpleEx; EFI_STATUS Status; EFI_HANDLE *Handles; - EFI_KEY_DATA KeyData; + EFI_KEY_DATA KeyData; UINTN HandleCount; UINTN HandleIndex; EFI_HANDLE NotifyHandle; @@ -344,7 +344,7 @@ GetValueOfNumber ( Status = EFI_OUT_OF_RESOURCES; goto Exit; } - + Length = *Len; ZeroMem (TemStr, sizeof (TemStr)); for (Index = 0; Index < Length; Index ++) { @@ -369,7 +369,7 @@ Exit: } /** - Create altcfg string. + Create altcfg string. @param Result The request result string. @param ConfigHdr The request head info. format. @@ -379,7 +379,7 @@ Exit: @retval The string with altcfg info append at the end. **/ -EFI_STRING +EFI_STRING CreateAltCfgString ( IN EFI_STRING Result, IN EFI_STRING ConfigHdr, @@ -404,60 +404,60 @@ CreateAltCfgString ( TmpStr = StringPtr; if (Result != NULL) { StrCpyS (StringPtr, NewLen / sizeof (CHAR16), Result); - StringPtr += StrLen (Result); + StringPtr += StrLen (Result); FreePool (Result); } - + UnicodeSPrint ( - StringPtr, - (1 + StrLen (ConfigHdr) + 8 + 4 + 1) * sizeof (CHAR16), - L"&%s&ALTCFG=%04x", - ConfigHdr, + StringPtr, + (1 + StrLen (ConfigHdr) + 8 + 4 + 1) * sizeof (CHAR16), + L"&%s&ALTCFG=%04x", + ConfigHdr, EFI_HII_DEFAULT_CLASS_STANDARD ); StringPtr += StrLen (StringPtr); UnicodeSPrint ( - StringPtr, + StringPtr, (8 + 4 + 7 + 4 + 7 + 4 + 1) * sizeof (CHAR16), - L"&OFFSET=%04x&WIDTH=%04x&VALUE=%04x", - Offset, + L"&OFFSET=%04x&WIDTH=%04x&VALUE=%04x", + Offset, Width, DEFAULT_CLASS_STANDARD_VALUE ); - StringPtr += StrLen (StringPtr); + StringPtr += StrLen (StringPtr); UnicodeSPrint ( - StringPtr, - (1 + StrLen (ConfigHdr) + 8 + 4 + 1) * sizeof (CHAR16), - L"&%s&ALTCFG=%04x", - ConfigHdr, + StringPtr, + (1 + StrLen (ConfigHdr) + 8 + 4 + 1) * sizeof (CHAR16), + L"&%s&ALTCFG=%04x", + ConfigHdr, EFI_HII_DEFAULT_CLASS_MANUFACTURING ); StringPtr += StrLen (StringPtr); UnicodeSPrint ( - StringPtr, + StringPtr, (8 + 4 + 7 + 4 + 7 + 4 + 1) * sizeof (CHAR16), - L"&OFFSET=%04x&WIDTH=%04x&VALUE=%04x", - Offset, + L"&OFFSET=%04x&WIDTH=%04x&VALUE=%04x", + Offset, Width, DEFAULT_CLASS_MANUFACTURING_VALUE ); - StringPtr += StrLen (StringPtr); + StringPtr += StrLen (StringPtr); return TmpStr; } /** - Check whether need to add the altcfg string. if need to add, add the altcfg + Check whether need to add the altcfg string. if need to add, add the altcfg string. @param RequestResult The request result string. @param ConfigRequestHdr The request head info. format. **/ -VOID +VOID AppendAltCfgString ( IN OUT EFI_STRING *RequestResult, IN EFI_STRING ConfigRequestHdr @@ -791,7 +791,7 @@ ExtractConfig ( Value += StrnLenS (Value, (BufferSize - ((UINTN)Value - (UINTN)*Results)) / sizeof (CHAR16)); } } - + Status = EFI_SUCCESS; } else { // @@ -1209,7 +1209,7 @@ DriverCallback ( } } break; - + case EFI_BROWSER_ACTION_RETRIEVE: { switch (QuestionId ) { @@ -1255,7 +1255,7 @@ DriverCallback ( EFI_IFR_FLAG_CALLBACK, // Question flag 0 // Action String ID ); - + HiiUpdateForm ( PrivateData->HiiHandle[0], // HII handle &gDriverSampleFormSetGuid, // Formset GUID @@ -1336,7 +1336,7 @@ DriverCallback ( break; default: - Status = EFI_UNSUPPORTED; + Status = EFI_UNSUPPORTED; break; } } @@ -1537,14 +1537,14 @@ DriverCallback ( // *ActionRequest = EFI_BROWSER_ACTION_REQUEST_EXIT; break; - + case 0x1238: // // User press "Save now", request Browser to save the uncommitted data. // *ActionRequest = EFI_BROWSER_ACTION_REQUEST_SUBMIT; break; - + case 0x1241: case 0x1246: // @@ -1552,21 +1552,21 @@ DriverCallback ( // *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_SUBMIT_EXIT; break; - + case 0x1242: // // User press "Discard current form now", request Browser to discard the uncommitted data. // *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_DISCARD; break; - + case 0x1243: // // User press "Submit current form now", request Browser to save the uncommitted data. // *ActionRequest = EFI_BROWSER_ACTION_REQUEST_FORM_APPLY; break; - + case 0x1244: case 0x1245: // @@ -1606,7 +1606,7 @@ DriverCallback ( // // 2. If system support this keyword, just try to change value. // - + // // Change value from '0' to '1' or from '1' to '0' // @@ -2114,7 +2114,7 @@ DriverSampleInit ( FreePool (ConfigRequestHdr); Status = gBS->CreateEventEx ( - EVT_NOTIFY_SIGNAL, + EVT_NOTIFY_SIGNAL, TPL_NOTIFY, EfiEventEmptyFunction, NULL, @@ -2125,7 +2125,7 @@ DriverSampleInit ( // // Example of how to use BrowserEx protocol to register HotKey. - // + // Status = gBS->LocateProtocol (&gEdkiiFormBrowserExProtocolGuid, NULL, (VOID **) &FormBrowserEx); if (!EFI_ERROR (Status)) { // @@ -2136,7 +2136,7 @@ DriverSampleInit ( FormBrowserEx->RegisterHotKey (&HotKey, 0, 0, NULL); HotKey.ScanCode = SCAN_F10; FormBrowserEx->RegisterHotKey (&HotKey, 0, 0, NULL); - + // // Register the default HotKey F9 and F10 again. // diff --git a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.uni b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.uni index 91ee7136a8..5f8d99bd56 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.uni +++ b/MdeModulePkg/Universal/DriverSampleDxe/DriverSample.uni @@ -4,13 +4,13 @@ // This driver shows how HII protocol, VFR and UNI files are used to create a HII // driver which can be dipslayed and configured by a UEFI HII Form Browser. // -// Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf b/MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf index bfd7484518..f856efebc7 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf +++ b/MdeModulePkg/Universal/DriverSampleDxe/DriverSampleDxe.inf @@ -1,16 +1,16 @@ ## @file -# This is a sample HII driver. +# This is a sample HII driver. # -# This driver shows how HII protocol, VFR and UNI files are used to create a HII +# This driver shows how HII protocol, VFR and UNI files are used to create a HII # driver which can be dipslayed and configured by a UEFI HII Form Browser. # -# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # diff --git a/MdeModulePkg/Universal/DriverSampleDxe/DriverSampleExtra.uni b/MdeModulePkg/Universal/DriverSampleDxe/DriverSampleExtra.uni index 1f34d2d6c2..644c221294 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/DriverSampleExtra.uni +++ b/MdeModulePkg/Universal/DriverSampleDxe/DriverSampleExtra.uni @@ -1,7 +1,7 @@ // /** @file // DriverSample Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "HII Sample DXE Driver" diff --git a/MdeModulePkg/Universal/DriverSampleDxe/Inventory.vfr b/MdeModulePkg/Universal/DriverSampleDxe/Inventory.vfr index daa2577383..bcdc8e8583 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/Inventory.vfr +++ b/MdeModulePkg/Universal/DriverSampleDxe/Inventory.vfr @@ -2,7 +2,7 @@ // // Sample Inventory Data // -// Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
// This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at @@ -23,82 +23,82 @@ formset form formid = 1, title = STRING_TOKEN(STR_INV_FORM1_TITLE); // note formid is a variable (for readability) (UINT16) - also added Form to the line to signify the Op-Code - text + text help = STRING_TOKEN(STR_INV_VERSION_HELP), text = STRING_TOKEN(STR_INV_VERSION_TEXT), - text = STRING_TOKEN(STR_INV_EMPTY_STRING), + text = STRING_TOKEN(STR_INV_EMPTY_STRING), flags = 0, key = 0; - text + text help = STRING_TOKEN(STR_INV_EMPTY_STRING), text = STRING_TOKEN(STR_INV_VERSION_TEXT2), - text = STRING_TOKEN(STR_INV_EMPTY_STRING), + text = STRING_TOKEN(STR_INV_EMPTY_STRING), flags = 0, key = 0; - text + text help = STRING_TOKEN(STR_INV_EMPTY_STRING), text = STRING_TOKEN(STR_INV_VERSION_TEXT3), - text = STRING_TOKEN(STR_INV_EMPTY_STRING), + text = STRING_TOKEN(STR_INV_EMPTY_STRING), flags = 0, key = 0; - text + text help = STRING_TOKEN(STR_INV_EMPTY_STRING), text = STRING_TOKEN(STR_INV_VERSION_TEXT4), - text = STRING_TOKEN(STR_INV_EMPTY_STRING), + text = STRING_TOKEN(STR_INV_EMPTY_STRING), flags = 0, key = 0; subtitle text = STRING_TOKEN(STR_INV_EMPTY_STRING); - text + text help = STRING_TOKEN(STR_INV_EMPTY_STRING), text = STRING_TOKEN(STR_INV_VERSION_TEXT5), - text = STRING_TOKEN(STR_INV_EMPTY_STRING), + text = STRING_TOKEN(STR_INV_EMPTY_STRING), flags = 0, key = 0; - text + text help = STRING_TOKEN(STR_INV_EMPTY_STRING), text = STRING_TOKEN(STR_INV_VERSION_TEXT6), - text = STRING_TOKEN(STR_INV_EMPTY_STRING), + text = STRING_TOKEN(STR_INV_EMPTY_STRING), flags = 0, key = 0; - text + text help = STRING_TOKEN(STR_INV_EMPTY_STRING), text = STRING_TOKEN(STR_INV_VERSION_TEXT7), - text = STRING_TOKEN(STR_INV_EMPTY_STRING), + text = STRING_TOKEN(STR_INV_EMPTY_STRING), flags = 0, key = 0; - text + text help = STRING_TOKEN(STR_INV_EMPTY_STRING), text = STRING_TOKEN(STR_INV_VERSION_TEXT8), - text = STRING_TOKEN(STR_INV_EMPTY_STRING), + text = STRING_TOKEN(STR_INV_EMPTY_STRING), flags = 0, key = 0; - text + text help = STRING_TOKEN(STR_INV_EMPTY_STRING), text = STRING_TOKEN(STR_INV_VERSION_TEXT9), - text = STRING_TOKEN(STR_INV_EMPTY_STRING), + text = STRING_TOKEN(STR_INV_EMPTY_STRING), flags = 0, key = 0; - text + text help = STRING_TOKEN(STR_INV_EMPTY_STRING), text = STRING_TOKEN(STR_INV_VERSION_TEXT10), - text = STRING_TOKEN(STR_INV_EMPTY_STRING), + text = STRING_TOKEN(STR_INV_EMPTY_STRING), flags = 0, key = 0; - text + text help = STRING_TOKEN(STR_INV_EMPTY_STRING), text = STRING_TOKEN(STR_INV_VERSION_TEXT11), - text = STRING_TOKEN(STR_INV_EMPTY_STRING), + text = STRING_TOKEN(STR_INV_EMPTY_STRING), flags = 0, key = 0; diff --git a/MdeModulePkg/Universal/DriverSampleDxe/InventoryStrings.uni b/MdeModulePkg/Universal/DriverSampleDxe/InventoryStrings.uni index 01afcd5cae..9336b4a946 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/InventoryStrings.uni +++ b/MdeModulePkg/Universal/DriverSampleDxe/InventoryStrings.uni @@ -1,24 +1,24 @@ // *++ // -// Copyright (c) 2007, Intel Corporation. All rights reserved.
-// This program and the accompanying materials -// are licensed and made available under the terms and conditions of the BSD License -// which accompanies this distribution. The full text of the license may be found at -// http://opensource.org/licenses/bsd-license.php -// -// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -// +// Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
+// This program and the accompanying materials +// are licensed and made available under the terms and conditions of the BSD License +// which accompanies this distribution. The full text of the license may be found at +// http://opensource.org/licenses/bsd-license.php +// +// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +// // Module Name: // // InventoryStrings.uni -// +// // Abstract: -// +// // String definitions for Inventory file. -// +// // Revision History: -// +// // --*/ diff --git a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr index 9d99dcf205..d005e7feed 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr +++ b/MdeModulePkg/Universal/DriverSampleDxe/Vfr.vfr @@ -54,16 +54,16 @@ formset title = STRING_TOKEN(STR_FORM_SET_TITLE), help = STRING_TOKEN(STR_FORM_SET_TITLE_HELP), classguid = EFI_HII_PLATFORM_SETUP_FORMSET_GUID, - + // - // Notes: VfrCompiler will insert a Standard Default Storage declaration + // Notes: VfrCompiler will insert a Standard Default Storage declaration // after the formset declaration. >00000040: 5C 06 00 00 00 00. // So we don't need to declare the Standard Default. // Please check the vfr.lst file for details. // To enable list file for VFR, add "-l" to VfrCompile in [Build.Visual-Form-Representation-File] as follows: // VfrCompile -l --no-pre-processing --output-directory ${d_path} $(OUTPUT_DIR)(+)${s_dir}(+)${s_base}.iii // - + // // Define a Buffer Storage (EFI_IFR_VARSTORE) // @@ -76,7 +76,7 @@ formset // Define a EFI variable Storage (EFI_IFR_VARSTORE_EFI) // efivarstore MY_EFI_VARSTORE_DATA, - attribute = EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE, // EFI variable attribures + attribute = EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_NON_VOLATILE, // EFI variable attribures name = MyEfiVar, guid = DRIVER_SAMPLE_FORMSET_GUID; @@ -415,7 +415,7 @@ formset step = 1, default = 18, defaultstore = MyStandardDefault, // This is standard default value default = 19, defaultstore = MyManufactureDefault, // This is manufacture default value - + endnumeric; endif; @@ -423,7 +423,7 @@ formset questionid = 0x1239, prompt = STRING_TOKEN(STR_DEFAULT_VALUE_FROM_ACCESS_PROMPT), help = STRING_TOKEN(STR_DEFAULT_VALUE_FROM_ACCESS_HELP), - flags = DISPLAY_UINT_HEX | INTERACTIVE, + flags = DISPLAY_UINT_HEX | INTERACTIVE, minimum = 0, maximum = 255, step = 1, @@ -434,7 +434,7 @@ formset questionid = 0x1240, prompt = STRING_TOKEN(STR_DEFAULT_VALUE_FROM_CALLBACK_PROMPT), help = STRING_TOKEN(STR_DEFAULT_VALUE_FROM_CALLBACK_HELP), - flags = DISPLAY_UINT_HEX | INTERACTIVE, + flags = DISPLAY_UINT_HEX | INTERACTIVE, minimum = 0, maximum = 255, step = 1, @@ -451,13 +451,13 @@ formset option text = STRING_TOKEN(STR_ONE_OF_TEXT2), value = 2, flags = 0; option text = STRING_TOKEN(STR_ONE_OF_TEXT3), value = 3, flags = 0; endlist; - + resetbutton defaultstore = MyStandardDefault, prompt = STRING_TOKEN(STR_STANDARD_DEFAULT_PROMPT), help = STRING_TOKEN(STR_STANDARD_DEFAULT_HELP), endresetbutton; - + resetbutton defaultstore = MyManufactureDefault, prompt = STRING_TOKEN(STR_MANUFACTURE_DEFAULT_PROMPT), @@ -504,24 +504,24 @@ formset goto 5, prompt = STRING_TOKEN(STR_GOTO_FORM5), //FifthSetupPage // this too has no end-op and basically it's a jump to a form ONLY help = STRING_TOKEN(STR_GOTO_FORM5_HELP); - + goto 6, prompt = STRING_TOKEN(STR_GOTO_FORM6), //SixthSetupPage // this too has no end-op and basically it's a jump to a form ONLY help = STRING_TOKEN(STR_GOTO_HELP); - goto + goto formsetguid = DRIVER_SAMPLE_INVENTORY_GUID, formid = 0x1, question = 0x1, prompt = STRING_TOKEN(STR_GOTO_ANOTHER_FORMSET), help = STRING_TOKEN(STR_GOTO_ANOTHER_FORMSET_HELP); - guidop + guidop guid = DRIVER_SAMPLE_FORMSET_GUID, datatype = MY_EFI_VARSTORE_DATA, - data.Field8 = 0x21, + data.Field8 = 0x21, data.Field16 = 0x2121, - data.OrderedList[0] = 0x21, + data.OrderedList[0] = 0x21, endguidop; goto 7, @@ -587,16 +587,16 @@ formset help = STRING_TOKEN(STR_TIME_HELP), flags = STORAGE_TIME, endtime; - - time - name = MyTime, - varid = MyIfrNVData.Time, - prompt = STRING_TOKEN(STR_TIME_PROMPT), - help = STRING_TOKEN(STR_TIME_PROMPT), + + time + name = MyTime, + varid = MyIfrNVData.Time, + prompt = STRING_TOKEN(STR_TIME_PROMPT), + help = STRING_TOKEN(STR_TIME_PROMPT), flags = STORAGE_NORMAL | SECOND_SUPPRESS, - default = 15:33:33, + default = 15:33:33, endtime; - + checkbox varid = MyIfrNVData.ChooseToActivateNuclearWeaponry, prompt = STRING_TOKEN(STR_CHECK_BOX_PROMPT), help = STRING_TOKEN(STR_CHECK_BOX_HELP), @@ -616,7 +616,7 @@ formset prompt = STRING_TOKEN(STR_GOTO_FORM1), //MainSetupPage // this too has no end-op and basically it's a jump to a form ONLY help = STRING_TOKEN(STR_GOTO_HELP); - goto + goto varid = MyIfrNVData.RefData, prompt = STRING_TOKEN(STR_GOTO_DYNAMIC3), help = STRING_TOKEN(STR_GOTO_DYNAMIC3_HELP), @@ -625,15 +625,15 @@ formset // // Set the defult value, format is QuestionId; FormId; FormsetGuid; Device Path String Token // - default = 0;0;ZERO_GUID;STRING_TOKEN(STR_NULL_STRING), + default = 0;0;ZERO_GUID;STRING_TOKEN(STR_NULL_STRING), ; // goto opcode end flag. - goto + goto prompt = STRING_TOKEN(STR_GOTO_DYNAMIC4), help = STRING_TOKEN(STR_GOTO_DYNAMIC4_HELP), flags = INTERACTIVE, key = 0x1249; - + endform; endif; @@ -662,7 +662,7 @@ formset endnumeric; grayoutif match2 (stringref(STRING_TOKEN(STR_PATTERN)), stringref(STRING_TOKEN(STR_STRING)), PERL_GUID); - numeric + numeric varid = MyIfrNVData.Match2, prompt = STRING_TOKEN(STR_MATCH2_PROMPT), help = STRING_TOKEN(STR_MATCH2_HELP), @@ -676,19 +676,19 @@ formset endform; - formmap formid = 4, - maptitle = STRING_TOKEN(STR_SAMPL_MAP_METHOD); + formmap formid = 4, + maptitle = STRING_TOKEN(STR_SAMPL_MAP_METHOD); mapguid = DRIVER_SAMPLE_FORMSET_GUID; - maptitle = STRING_TOKEN(STR_STANDARD_MAP_METHOD); + maptitle = STRING_TOKEN(STR_STANDARD_MAP_METHOD); mapguid = EFI_HII_STANDARD_FORM_GUID; - oneof varid = MyIfrNVData.SerialPortNo, + oneof varid = MyIfrNVData.SerialPortNo, prompt = STRING_TOKEN(STR_SERIAL_PORT), help = STRING_TOKEN(STR_ONE_OF_HELP), read cond (get(MyIfrNVData.SerialPortStatus) != 0 ? 0 : cond ((get(MyIfrNVData.SerialPortIo) & 0xF00) >> 0x8 == get(MyIfrNVData.SerialPortIrq) - 1 ? UNDEFINED : map (get(MyIfrNVData.SerialPortIo) : 0x3f8,1; 0x2F8,2; 0x3E8,3; 0x2E8,4;))); write set(MyIfrNVData.SerialPortStatus, pushthis != 0) AND set(MyIfrNVData.SerialPortIo, map (pushthis : 1,0x3F8; 2,0x2F8; 3,0x3E8; 4,0x2E8;)) AND set (MyIfrNVData.SerialPortIrq, map (pushthis: 1,4; 2,3; 3,4; 4,3;)); - + option text = STRING_TOKEN(STR_SERIAL_PORT_DISABLE), value = 0x0, flags = DEFAULT; option text = STRING_TOKEN(STR_SERIAL_PORT1), value = 0x1, flags = 0; option text = STRING_TOKEN(STR_SERIAL_PORT2), value = 0x2, flags = 0; @@ -705,10 +705,10 @@ formset grayoutif TRUE; suppressif ideqval MyIfrNVData.SerialPortStatus == 0; - oneof varid = MyIfrNVData.SerialPortIo, + oneof varid = MyIfrNVData.SerialPortIo, prompt = STRING_TOKEN(STR_SERIAL_PORT_IO_ADDRESS), help = STRING_TOKEN(STR_ONE_OF_HELP), - + option text = STRING_TOKEN(STR_SERIAL_PORT1_IOADDR), value = 0x3F8, flags = DEFAULT; option text = STRING_TOKEN(STR_SERIAL_PORT2_IOADDR), value = 0x2F8, flags = 0; option text = STRING_TOKEN(STR_SERIAL_PORT3_IOADDR), value = 0x3E8, flags = 0; @@ -719,10 +719,10 @@ formset grayoutif TRUE; suppressif ideqval MyIfrNVData.SerialPortStatus == 0; - oneof varid = MyIfrNVData.SerialPortIrq, + oneof varid = MyIfrNVData.SerialPortIrq, prompt = STRING_TOKEN(STR_SERIAL_PORT_IRQ), help = STRING_TOKEN(STR_ONE_OF_HELP), - + option text = STRING_TOKEN(STR_SERIAL_PORT13_IRQ), value = 0x4, flags = DEFAULT; option text = STRING_TOKEN(STR_SERIAL_PORT24_IRQ), value = 0x3, flags = 0; endoneof; @@ -755,7 +755,7 @@ formset endform; form formid = 6, // Form to show the refresh guid group op-code - title = STRING_TOKEN(STR_FORM6_TITLE); + title = STRING_TOKEN(STR_FORM6_TITLE); text help = STRING_TOKEN(STR_TEXT_REFRESH_GUID), diff --git a/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni b/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni index 2215c08c5a..e223bb6075 100644 --- a/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni +++ b/MdeModulePkg/Universal/DriverSampleDxe/VfrStrings.uni @@ -1,24 +1,24 @@ // *++ - // + // // Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
-// This program and the accompanying materials -// are licensed and made available under the terms and conditions of the BSD License -// which accompanies this distribution. The full text of the license may be found at -// http://opensource.org/licenses/bsd-license.php -// -// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -// +// This program and the accompanying materials +// are licensed and made available under the terms and conditions of the BSD License +// which accompanies this distribution. The full text of the license may be found at +// http://opensource.org/licenses/bsd-license.php +// +// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +// // Module Name: // // VfrStrings.vfr -// +// // Abstract: -// +// // String definitions for Sample Setup formset. -// +// // Revision History: -// +// // --*/ @@ -52,9 +52,9 @@ #string STR_CPU_STRING2 #language en-US " " #language fr-FR " " #string STR_NUMERIC_NUM_PROMPT #language en-US "Please select the number" - #language fr-FR "Please select the number" + #language fr-FR "Please select the number" #string STR_NUMERIC_NUM_HELP #language en-US "Check the input number, test the efi buffer varstore" - #language fr-FR "Check the input number, test the efi buffer varstore" + #language fr-FR "Check the input number, test the efi buffer varstore" #string STR_ONE_OF_PROMPT #language en-US "My one-of prompt #1" #language fr-FR "Mi uno- de guía # 1" #string STR_ONE_OF_PROMPT_KEYWORD #language en-US "My Keyword Namespace Test" @@ -142,7 +142,7 @@ #string STR_GOTO_DYNAMIC3_HELP #language en-US "Update the destination through "retrieve" call back type before user select it." #language fr-FR "Update the destination through "retrieve" call back type before user select it." #string STR_GOTO_DYNAMIC4_HELP #language en-US "Update the destination through "changing" call back type when user select it." - #language fr-FR "Update the destination through "changing" call back type when user select it." + #language fr-FR "Update the destination through "changing" call back type when user select it." #string STR_ERROR_INCONSISTENT #language en-US "This is my inconsistent error message" #language fr-FR "Éste es mi mensaje de error contrario." #string STR_ERROR_POPUP #language en-US "You typed in something bad!" @@ -240,7 +240,7 @@ #string STR_STRING_CHECK_ERROR_POPUP #language en-US "String you typed in is not correct!" #language fr-FR "String you typed in is not correct!" #string STR_TEXT_REFRESH_GUID #language en-US "Add new menu by press "Ctrl + C"" - #language fr-FR "Add new menu by press "Ctrl + C"" + #language fr-FR "Add new menu by press "Ctrl + C"" #string STR_TEXT_REFRESH_GUID_COUNT #language en-US "Refresh guid event count" #language fr-FR "Refresh guid event count" #string STR_MODAL_FORM_TITLE #language en-US "First Modal Form" @@ -262,7 +262,7 @@ #string STR_GOTO_ANOTHER_FORMSET_HELP #language en-US "When select this option, browser will go to another formset." #language fr-FR "When select this option, browser will go to another formset." #string STR_DEVICE_PATH #language en-US "" - #language fr-FR "" + #language fr-FR "" #string STR_SUBMITTED_CALLBACK_TEST_PROMPT #language en-US "Submitted callback test" #language fr-FR "Submitted callback test" #string STR_SUBMITTED_CALLBACK_TEST_HELP #language en-US "Change the value and press F10 to submmit will pop up a dialogue to show SUBMITTED Callback has been triggered" @@ -346,7 +346,7 @@ #language fr-FR "Manufacture Default" #string STR_DEFAULTSTORE_SAFE #language en-US "Safe Default" - #language fr-FR "Safe Default" + #language fr-FR "Safe Default" #string STR_STANDARD_DEFAULT_PROMPT #language en-US "Standard Default" #language fr-FR "Standard Default" @@ -370,7 +370,7 @@ #string STR_STANDARD_MAP_METHOD #language en-US "UEFI Standard Map Form" #language fr-FR "UEFI Standard Map Form" // -// Serial Port +// Serial Port // #string STR_SERIAL_PORT #language en-US "Serial port number" #language fr-FR "Serial port number" @@ -431,4 +431,4 @@ #string STR_STRING #language en-US "Match2 Test" #language fr-FR "Match2 Test" #string STR_PATTERN #language en-US "Match2" - #language fr-FR "Match2" \ No newline at end of file + #language fr-FR "Match2" diff --git a/MdeModulePkg/Universal/EbcDxe/EbcDxe.inf b/MdeModulePkg/Universal/EbcDxe/EbcDxe.inf index 197a9a754f..8f128b121d 100644 --- a/MdeModulePkg/Universal/EbcDxe/EbcDxe.inf +++ b/MdeModulePkg/Universal/EbcDxe/EbcDxe.inf @@ -1,7 +1,7 @@ ## @file # Module that produces EBC Interprete and EBC Debug Support protocols. -# -# This module implements EFI Byte Code (EBC) Virtual Machine that can provide +# +# This module implements EFI Byte Code (EBC) Virtual Machine that can provide # platform and processor-independent mechanisms for loading and executing EFI # device drivers. # @@ -11,10 +11,10 @@ # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# +# ## [Defines] diff --git a/MdeModulePkg/Universal/EbcDxe/EbcDxe.uni b/MdeModulePkg/Universal/EbcDxe/EbcDxe.uni index 9ee429f87a..fbdfe2fa1c 100644 --- a/MdeModulePkg/Universal/EbcDxe/EbcDxe.uni +++ b/MdeModulePkg/Universal/EbcDxe/EbcDxe.uni @@ -5,13 +5,13 @@ // platform and processor-independent mechanisms for loading and executing EFI // device drivers. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/EbcDxe/EbcDxeExtra.uni b/MdeModulePkg/Universal/EbcDxe/EbcDxeExtra.uni index ef917c961d..a421455884 100644 --- a/MdeModulePkg/Universal/EbcDxe/EbcDxeExtra.uni +++ b/MdeModulePkg/Universal/EbcDxe/EbcDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // EbcDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "EFI Byte Code DXE Interpreter" diff --git a/MdeModulePkg/Universal/EbcDxe/EbcExecute.c b/MdeModulePkg/Universal/EbcDxe/EbcExecute.c index 2dfed8ecf5..3418936c10 100644 --- a/MdeModulePkg/Universal/EbcDxe/EbcExecute.c +++ b/MdeModulePkg/Universal/EbcDxe/EbcExecute.c @@ -1,7 +1,7 @@ /** @file Contains code that implements the virtual machine. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -1333,11 +1333,11 @@ CONST VM_TABLE_ENTRY mVmOpcodeTable[] = { { ExecuteMOVIn }, // opcode 0x38 - mov immediate natural { ExecuteMOVREL }, // opcode 0x39 - move data relative to PC { NULL }, // opcode 0x3a - { NULL }, // opcode 0x3b - { NULL }, // opcode 0x3c - { NULL }, // opcode 0x3d - { NULL }, // opcode 0x3e - { NULL } // opcode 0x3f + { NULL }, // opcode 0x3b + { NULL }, // opcode 0x3c + { NULL }, // opcode 0x3d + { NULL }, // opcode 0x3e + { NULL } // opcode 0x3f }; // diff --git a/MdeModulePkg/Universal/EbcDxe/Ia32/EbcSupport.c b/MdeModulePkg/Universal/EbcDxe/Ia32/EbcSupport.c index a825846f89..944179ba69 100644 --- a/MdeModulePkg/Universal/EbcDxe/Ia32/EbcSupport.c +++ b/MdeModulePkg/Universal/EbcDxe/Ia32/EbcSupport.c @@ -2,7 +2,7 @@ This module contains EBC support routines that are customized based on the target ia32 processor. -Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -44,7 +44,7 @@ UINT8 mInstructionBufferTemplate[] = { // These 4 bytes of the thunk entry is the address of the EBC // entry point. // - 0xB8, + 0xB8, (UINT8)(EBC_ENTRYPOINT_SIGNATURE & 0xFF), (UINT8)((EBC_ENTRYPOINT_SIGNATURE >> 8) & 0xFF), (UINT8)((EBC_ENTRYPOINT_SIGNATURE >> 16) & 0xFF), diff --git a/MdeModulePkg/Universal/EbcDxe/X64/EbcSupport.c b/MdeModulePkg/Universal/EbcDxe/X64/EbcSupport.c index 33a174917b..15429209e5 100644 --- a/MdeModulePkg/Universal/EbcDxe/X64/EbcSupport.c +++ b/MdeModulePkg/Universal/EbcDxe/X64/EbcSupport.c @@ -2,7 +2,7 @@ This module contains EBC support routines that are customized based on the target x64 processor. -Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -44,7 +44,7 @@ UINT8 mInstructionBufferTemplate[] = { // These 8 bytes of the thunk entry is the address of the EBC // entry point. // - 0x49, 0xBA, + 0x49, 0xBA, (UINT8)(EBC_ENTRYPOINT_SIGNATURE & 0xFF), (UINT8)((EBC_ENTRYPOINT_SIGNATURE >> 8) & 0xFF), (UINT8)((EBC_ENTRYPOINT_SIGNATURE >> 16) & 0xFF), diff --git a/MdeModulePkg/Universal/EsrtDxe/EsrtDxe.c b/MdeModulePkg/Universal/EsrtDxe/EsrtDxe.c index 16b18e0a54..cab8d69e35 100644 --- a/MdeModulePkg/Universal/EsrtDxe/EsrtDxe.c +++ b/MdeModulePkg/Universal/EsrtDxe/EsrtDxe.c @@ -1,7 +1,7 @@ /** @file Esrt management module. -Copyright (c) 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -20,7 +20,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. ESRT_PRIVATE_DATA mPrivate; -ESRT_MANAGEMENT_PROTOCOL mEsrtManagementProtocolTemplate = { +ESRT_MANAGEMENT_PROTOCOL mEsrtManagementProtocolTemplate = { EsrtDxeGetEsrtEntry, EsrtDxeUpdateEsrtEntry, EsrtDxeRegisterEsrtEntry, @@ -30,11 +30,11 @@ ESRT_MANAGEMENT_PROTOCOL mEsrtManagementProtocolTemplate = { }; /** - Get ESRT entry from ESRT Cache by FwClass Guid + Get ESRT entry from ESRT Cache by FwClass Guid + + @param[in] FwClass FwClass of Esrt entry to get + @param[in, out] Entry Esrt entry returned - @param[in] FwClass FwClass of Esrt entry to get - @param[in, out] Entry Esrt entry returned - @retval EFI_SUCCESS The variable saving this Esrt Entry exists. @retval EF_NOT_FOUND No correct variable found. @retval EFI_WRITE_PROTECTED ESRT Cache repository is locked @@ -94,7 +94,7 @@ EsrtDxeGetEsrtEntry( Update one ESRT entry in ESRT Cache. @param[in] Entry Esrt entry to be updated - + @retval EFI_SUCCESS Successfully update an ESRT entry in cache. @retval EFI_INVALID_PARAMETER Entry does't exist in ESRT Cache @retval EFI_WRITE_PROTECTED ESRT Cache repositoy is locked @@ -107,7 +107,7 @@ EsrtDxeUpdateEsrtEntry( ) { EFI_STATUS Status; - + if (Entry == NULL) { return EFI_INVALID_PARAMETER; } @@ -139,11 +139,11 @@ EsrtDxeUpdateEsrtEntry( } /** - Non-FMP instance to unregister Esrt Entry from ESRT Cache. + Non-FMP instance to unregister Esrt Entry from ESRT Cache. - @param[in] FwClass FwClass of Esrt entry to Unregister - - @retval EFI_SUCCESS Insert all entries Successfully + @param[in] FwClass FwClass of Esrt entry to Unregister + + @retval EFI_SUCCESS Insert all entries Successfully @retval EFI_NOT_FOUND Entry of FwClass does not exsit **/ @@ -153,7 +153,7 @@ EsrtDxeUnRegisterEsrtEntry( IN EFI_GUID *FwClass ) { - EFI_STATUS Status; + EFI_STATUS Status; if (FwClass == NULL) { return EFI_INVALID_PARAMETER; @@ -228,7 +228,7 @@ EFI_STATUS EFIAPI EsrtDxeSyncFmp( VOID - ) + ) { EFI_STATUS Status; UINTN Index1; @@ -238,8 +238,8 @@ EsrtDxeSyncFmp( EFI_FIRMWARE_MANAGEMENT_PROTOCOL **FmpBuf; UINTN NumberOfHandles; UINTN *DescriptorSizeBuf; - EFI_FIRMWARE_IMAGE_DESCRIPTOR **FmpImageInfoBuf; - EFI_FIRMWARE_IMAGE_DESCRIPTOR *TempFmpImageInfo; + EFI_FIRMWARE_IMAGE_DESCRIPTOR **FmpImageInfoBuf; + EFI_FIRMWARE_IMAGE_DESCRIPTOR *TempFmpImageInfo; UINT8 *FmpImageInfoCountBuf; UINT32 *FmpImageInfoDescriptorVerBuf; UINTN ImageInfoSize; @@ -270,11 +270,11 @@ EsrtDxeSyncFmp( &HandleBuffer ); - - if (Status == EFI_NOT_FOUND) { + + if (Status == EFI_NOT_FOUND) { EntryNumNew = 0; goto UPDATE_REPOSITORY; - } else if (EFI_ERROR(Status)){ + } else if (EFI_ERROR(Status)){ goto END; } @@ -295,7 +295,7 @@ EsrtDxeSyncFmp( FmpImageInfoBuf = AllocateZeroPool(sizeof(EFI_FIRMWARE_IMAGE_DESCRIPTOR *) * NumberOfHandles); if (FmpImageInfoBuf == NULL) { - Status = EFI_OUT_OF_RESOURCES; + Status = EFI_OUT_OF_RESOURCES; goto END; } @@ -380,14 +380,14 @@ EsrtDxeSyncFmp( // // Create new FMP cache repository based on FmpImageInfoBuf - // + // for (Index2 = 0; Index2 < NumberOfHandles; Index2++){ TempFmpImageInfo = FmpImageInfoBuf[Index2]; for (Index3 = 0; Index3 < FmpImageInfoCountBuf[Index2]; Index3++){ - if ((TempFmpImageInfo->AttributesSupported & IMAGE_ATTRIBUTE_IN_USE) != 0 + if ((TempFmpImageInfo->AttributesSupported & IMAGE_ATTRIBUTE_IN_USE) != 0 && (TempFmpImageInfo->AttributesSetting & IMAGE_ATTRIBUTE_IN_USE) != 0){ // - // Always put the first smallest version of Image info into ESRT cache + // Always put the first smallest version of Image info into ESRT cache // for(Index1 = 0; Index1 < EntryNumNew; Index1++) { if (CompareGuid(&EsrtRepositoryNew[Index1].FwClass, &TempFmpImageInfo->ImageTypeId)) { @@ -402,7 +402,7 @@ EsrtDxeSyncFmp( // if (Index1 == EntryNumNew){ SetEsrtEntryFromFmpInfo(&EsrtRepositoryNew[EntryNumNew], TempFmpImageInfo, FmpImageInfoDescriptorVerBuf[Index2]); - EntryNumNew++; + EntryNumNew++; if (EntryNumNew >= PcdGet32(PcdMaxFmpEsrtCacheNum)) { break; } @@ -471,10 +471,10 @@ END: } /** - This function locks up Esrt repository to be readonly. It should be called + This function locks up Esrt repository to be readonly. It should be called before gEfiEndOfDxeEventGroupGuid event signaled - @retval EFI_SUCCESS Locks up FMP Non-FMP repository successfully + @retval EFI_SUCCESS Locks up FMP Non-FMP repository successfully **/ EFI_STATUS @@ -514,14 +514,14 @@ EsrtReadyToBootEventNotify ( IN EFI_EVENT Event, IN VOID *Context ) -{ +{ EFI_STATUS Status; EFI_SYSTEM_RESOURCE_TABLE *EsrtTable; EFI_SYSTEM_RESOURCE_ENTRY *FmpEsrtRepository; EFI_SYSTEM_RESOURCE_ENTRY *NonFmpEsrtRepository; UINTN FmpRepositorySize; UINTN NonFmpRepositorySize; - + FmpEsrtRepository = NULL; NonFmpEsrtRepository = NULL; @@ -583,8 +583,8 @@ EsrtReadyToBootEventNotify ( goto EXIT; } - EsrtTable->FwResourceVersion = EFI_SYSTEM_RESOURCE_TABLE_FIRMWARE_RESOURCE_VERSION; - EsrtTable->FwResourceCount = (UINT32)((NonFmpRepositorySize + FmpRepositorySize) / sizeof(EFI_SYSTEM_RESOURCE_ENTRY)); + EsrtTable->FwResourceVersion = EFI_SYSTEM_RESOURCE_TABLE_FIRMWARE_RESOURCE_VERSION; + EsrtTable->FwResourceCount = (UINT32)((NonFmpRepositorySize + FmpRepositorySize) / sizeof(EFI_SYSTEM_RESOURCE_ENTRY)); EsrtTable->FwResourceCountMax = PcdGet32(PcdMaxNonFmpEsrtCacheNum) + PcdGet32(PcdMaxFmpEsrtCacheNum); if (NonFmpRepositorySize != 0 && NonFmpEsrtRepository != NULL) { @@ -617,7 +617,7 @@ EXIT: } /** - The module Entry Point of the Esrt DXE driver that manages cached ESRT repository + The module Entry Point of the Esrt DXE driver that manages cached ESRT repository & publishes ESRT table @param[in] ImageHandle The firmware allocated handle for the EFI image. @@ -633,7 +633,7 @@ EsrtDxeEntryPoint ( IN EFI_HANDLE ImageHandle, IN EFI_SYSTEM_TABLE *SystemTable ) -{ +{ EFI_STATUS Status; EfiInitializeLock (&mPrivate.FmpLock, TPL_CALLBACK); diff --git a/MdeModulePkg/Universal/EsrtDxe/EsrtDxe.inf b/MdeModulePkg/Universal/EsrtDxe/EsrtDxe.inf index 06b3a08e78..5eb7ef924a 100644 --- a/MdeModulePkg/Universal/EsrtDxe/EsrtDxe.inf +++ b/MdeModulePkg/Universal/EsrtDxe/EsrtDxe.inf @@ -4,15 +4,15 @@ # This driver produces EsrtManagement protocol to manage cache ESRT repository for FMP/Non-FMP instances. # ESRT table based on repository is published on gEfiEventReadyToBootGuid. # -# Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# +# ## [Defines] diff --git a/MdeModulePkg/Universal/EsrtDxe/EsrtDxe.uni b/MdeModulePkg/Universal/EsrtDxe/EsrtDxe.uni index d47caf3a7e..c65f3545d3 100644 --- a/MdeModulePkg/Universal/EsrtDxe/EsrtDxe.uni +++ b/MdeModulePkg/Universal/EsrtDxe/EsrtDxe.uni @@ -4,13 +4,13 @@ // This driver produces EsrtManagement protocol to manage cache ESRT repository for FMP/Non-FMP instances. // ESRT table based on repository is published on gEfiEventReadyToBootGuid. // -// Copyright (c) 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/EsrtDxe/EsrtDxeExtra.uni b/MdeModulePkg/Universal/EsrtDxe/EsrtDxeExtra.uni index ebd0c3b998..e969952c43 100644 --- a/MdeModulePkg/Universal/EsrtDxe/EsrtDxeExtra.uni +++ b/MdeModulePkg/Universal/EsrtDxe/EsrtDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // EsrtDxe Localized Strings and Content // -// Copyright (c) 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Esrt DXE Driver" diff --git a/MdeModulePkg/Universal/EsrtDxe/EsrtImpl.c b/MdeModulePkg/Universal/EsrtDxe/EsrtImpl.c index 35a237e3cc..1ed0250090 100644 --- a/MdeModulePkg/Universal/EsrtDxe/EsrtImpl.c +++ b/MdeModulePkg/Universal/EsrtDxe/EsrtImpl.c @@ -1,7 +1,7 @@ /** @file Esrt management implementation. -Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -15,12 +15,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "EsrtImpl.h" /** - Find Esrt Entry stored in ESRT repository. + Find Esrt Entry stored in ESRT repository. @param[in] FwClass Firmware class guid in Esrt entry @param[in] Attribute Esrt from Non FMP or FMP instance @param[out] Entry Esrt entry returned - + @retval EFI_SUCCESS Successfully find an Esrt entry @retval EF_NOT_FOUND No Esrt entry found @@ -49,7 +49,7 @@ GetEsrtEntry ( } else { VariableName = EFI_ESRT_NONFMP_VARIABLE_NAME; } - + Status = GetVariable2 ( VariableName, &gEfiCallerIdGuid, @@ -90,7 +90,7 @@ EXIT: @param[in] Entry Esrt entry to be set @param[in] Attribute Esrt from Esrt private protocol or FMP instance - + @retval EFI_SUCCESS Successfully set a variable. **/ @@ -201,21 +201,21 @@ EXIT: } /** - Delete ESRT Entry from ESRT repository. + Delete ESRT Entry from ESRT repository. - @param[in] FwClass FwClass of Esrt entry to delete + @param[in] FwClass FwClass of Esrt entry to delete @param[in] Attribute Esrt from Esrt private protocol or FMP instance - - @retval EFI_SUCCESS Insert all entries Successfully + + @retval EFI_SUCCESS Insert all entries Successfully @retval EFI_NOT_FOUND ESRT entry with FwClass doesn't exsit - + **/ EFI_STATUS DeleteEsrtEntry( IN EFI_GUID *FwClass, IN UINTN Attribute ) -{ +{ EFI_STATUS Status; CHAR16 *VariableName; EFI_SYSTEM_RESOURCE_ENTRY *EsrtRepository; @@ -224,7 +224,7 @@ DeleteEsrtEntry( UINTN EsrtNum; EsrtRepository = NULL; - + // // Get Esrt index buffer // @@ -233,7 +233,7 @@ DeleteEsrtEntry( } else { VariableName = EFI_ESRT_NONFMP_VARIABLE_NAME; } - + Status = GetVariable2 ( VariableName, &gEfiCallerIdGuid, @@ -302,7 +302,7 @@ EXIT: @param[in] Entry Esrt entry to be set @param[in] Attribute Esrt from Non Esrt or FMP instance - + @retval EFI_SUCCESS Successfully Update a variable. @retval EFI_NOT_FOUND The Esrt enry doesn't exist @@ -425,9 +425,9 @@ IsSystemFmp ( @param[in, out] EsrtEntry Esrt entry to be Init @param[in] FmpImageInfo FMP image info descriptor @param[in] DescriptorVersion FMP Image info descriptor version - + **/ -VOID +VOID SetEsrtEntryFromFmpInfo ( IN OUT EFI_SYSTEM_RESOURCE_ENTRY *EsrtEntry, IN EFI_FIRMWARE_IMAGE_DESCRIPTOR *FmpImageInfo, @@ -451,7 +451,7 @@ SetEsrtEntryFromFmpInfo ( // LowestSupportedImageVersion only available in FMP V2 or higher // EsrtEntry->LowestSupportedFwVersion = FmpImageInfo->LowestSupportedImageVersion; - } + } if (DescriptorVersion >= 3) { // @@ -459,7 +459,7 @@ SetEsrtEntryFromFmpInfo ( // EsrtEntry->LastAttemptVersion = FmpImageInfo->LastAttemptVersion; EsrtEntry->LastAttemptStatus = FmpImageInfo->LastAttemptStatus; - } + } // // Set capsule customized flag diff --git a/MdeModulePkg/Universal/EsrtDxe/EsrtImpl.h b/MdeModulePkg/Universal/EsrtDxe/EsrtImpl.h index a238dfb8f7..e0e9673c70 100644 --- a/MdeModulePkg/Universal/EsrtDxe/EsrtImpl.h +++ b/MdeModulePkg/Universal/EsrtDxe/EsrtImpl.h @@ -1,7 +1,7 @@ /** @file Esrt management implementation head file. -Copyright (c) 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -36,12 +36,12 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // // Name of Variable for Non-FMP ESRT Repository -// +// #define EFI_ESRT_NONFMP_VARIABLE_NAME L"EsrtNonFmp" // // Name of Variable for FMP -// +// #define EFI_ESRT_FMP_VARIABLE_NAME L"EsrtFmp" // @@ -56,7 +56,7 @@ typedef struct { // Ready to boot event // EFI_EVENT Event; - + // // Updates to Fmp storage must be locked. // @@ -70,12 +70,12 @@ typedef struct { /** - Find Esrt Entry stored in ESRT repository. + Find Esrt Entry stored in ESRT repository. @param[in] FwClass Firmware class guid in Esrt entry @param[in] Attribute Esrt from Non FMP or FMP instance @param[out] Entry Esrt entry returned - + @retval EFI_SUCCESS Successfully find an Esrt entry @retval EF_NOT_FOUND No Esrt entry found @@ -92,7 +92,7 @@ GetEsrtEntry ( @param[in] Entry Esrt entry to be set @param[in] Attribute Esrt from Esrt private protocol or FMP instance - + @retval EFI_SUCCESS Successfully set a variable. **/ @@ -103,14 +103,14 @@ InsertEsrtEntry( ); /** - Delete ESRT Entry from ESRT repository. + Delete ESRT Entry from ESRT repository. - @param[in] FwClass FwClass of Esrt entry to delete + @param[in] FwClass FwClass of Esrt entry to delete @param[in] Attribute Esrt from Esrt private protocol or FMP instance - - @retval EFI_SUCCESS Insert all entries Successfully + + @retval EFI_SUCCESS Insert all entries Successfully @retval EFI_NOT_FOUND ESRT entry with FwClass doesn't exsit - + **/ EFI_STATUS DeleteEsrtEntry( @@ -123,7 +123,7 @@ DeleteEsrtEntry( @param[in] Entry Esrt entry to be set @param[in] Attribute Esrt from Non Esrt or FMP instance - + @retval EFI_SUCCESS Successfully Update a variable. @retval EFI_NOT_FOUND The Esrt enry doesn't exist @@ -140,9 +140,9 @@ UpdateEsrtEntry( @param[in, out] EsrtEntry Esrt entry to be Init @param[in] FmpImageInfo FMP image info descriptor @param[in] DescriptorVersion FMP Image info descriptor version - + **/ -VOID +VOID SetEsrtEntryFromFmpInfo ( IN OUT EFI_SYSTEM_RESOURCE_ENTRY *EsrtEntry, IN EFI_FIRMWARE_IMAGE_DESCRIPTOR *FmpImageInfo, @@ -150,11 +150,11 @@ SetEsrtEntryFromFmpInfo ( ); /** - Get ESRT entry from ESRT Cache by FwClass Guid + Get ESRT entry from ESRT Cache by FwClass Guid + + @param[in] FwClass FwClass of Esrt entry to get + @param[in, out] Entry Esrt entry returned - @param[in] FwClass FwClass of Esrt entry to get - @param[in, out] Entry Esrt entry returned - @retval EFI_SUCCESS The variable saving this Esrt Entry exists. @retval EF_NOT_FOUND No correct variable found. @retval EFI_WRITE_PROTECTED ESRT Cache repository is locked @@ -171,7 +171,7 @@ EsrtDxeGetEsrtEntry( Update one ESRT entry in ESRT Cache. @param[in] Entry Esrt entry to be updated - + @retval EFI_SUCCESS Successfully update an ESRT entry in cache. @retval EFI_INVALID_PARAMETER Entry does't exist in ESRT Cache @retval EFI_WRITE_PROTECTED ESRT Cache is locked @@ -184,11 +184,11 @@ EsrtDxeUpdateEsrtEntry( ); /** - Non-FMP instance to unregister Esrt Entry from ESRT Cache. + Non-FMP instance to unregister Esrt Entry from ESRT Cache. + + @param[in] FwClass FwClass of Esrt entry to Unregister - @param[in] FwClass FwClass of Esrt entry to Unregister - - @retval EFI_SUCCESS Insert all entries Successfully + @retval EFI_SUCCESS Insert all entries Successfully @retval EFI_NOT_FOUND Entry of FwClass does not exsit **/ @@ -229,10 +229,10 @@ EsrtDxeSyncFmp( ); /** - This function locks up Esrt repository to be readonly. It should be called + This function locks up Esrt repository to be readonly. It should be called before gEfiEndOfDxeEventGroupGuid event signaled - @retval EFI_SUCCESS Locks up FMP Non-FMP repository successfully + @retval EFI_SUCCESS Locks up FMP Non-FMP repository successfully **/ EFI_STATUS diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.c b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.c index 49e747b901..65fdc07089 100644 --- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.c +++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.c @@ -1,16 +1,16 @@ /** @file - These are the common Fault Tolerant Write (FTW) functions that are shared + These are the common Fault Tolerant Write (FTW) functions that are shared by DXE FTW driver and SMM FTW driver. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -23,7 +23,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. Query the largest block that may be updated in a fault tolerant manner. - @param This The pointer to this protocol instance. + @param This The pointer to this protocol instance. @param BlockSize A pointer to a caller allocated UINTN that is updated to indicate the size of the largest block that can be updated. @@ -59,7 +59,7 @@ FtwGetMaxBlockSize ( All writes must be completed or aborted before another fault tolerant write can occur. - @param This The pointer to this protocol instance. + @param This The pointer to this protocol instance. @param CallerId The GUID identifying the write. @param PrivateDataSize The size of the caller's private data that must be recorded for each write. @@ -174,7 +174,7 @@ FtwAllocate ( Since the content has already backuped in spare block, the write is guaranteed to be completed with fault tolerant manner. - @param This The pointer to this protocol instance. + @param This The pointer to this protocol instance. @param Fvb The FVB protocol that provides services for reading, writing, and erasing the target block. @param BlockSize The size of the block. @@ -289,7 +289,7 @@ FtwWriteRecord ( manner, ensuring at all times that either the original contents or the modified contents are available. - @param This The pointer to this protocol instance. + @param This The pointer to this protocol instance. @param Lba The logical block address of the target block. @param Offset The offset within the target block to place the data. @param Length The number of bytes to write to the target block. @@ -299,11 +299,11 @@ FtwWriteRecord ( reading, writing, and erasing the target block. @param Buffer The data to write. - @retval EFI_SUCCESS The function completed successfully - @retval EFI_ABORTED The function could not complete successfully. - @retval EFI_BAD_BUFFER_SIZE The input data can't fit within the spare block. + @retval EFI_SUCCESS The function completed successfully + @retval EFI_ABORTED The function could not complete successfully. + @retval EFI_BAD_BUFFER_SIZE The input data can't fit within the spare block. Offset + *NumBytes > SpareAreaLength. - @retval EFI_ACCESS_DENIED No writes have been allocated. + @retval EFI_ACCESS_DENIED No writes have been allocated. @retval EFI_OUT_OF_RESOURCES Cannot allocate enough memory resource. @retval EFI_NOT_FOUND Cannot find FVB protocol by handle. @@ -348,7 +348,7 @@ FtwWrite ( Header = FtwDevice->FtwLastWriteHeader; Record = FtwDevice->FtwLastWriteRecord; - + if (IsErasedFlashBuffer ((UINT8 *) Header, sizeof (EFI_FAULT_TOLERANT_WRITE_HEADER))) { if (PrivateData == NULL) { // @@ -631,7 +631,7 @@ FtwWrite ( Restarts a previously interrupted write. The caller must provide the block protocol needed to complete the interrupted write. - @param This The pointer to this protocol instance. + @param This The pointer to this protocol instance. @param FvBlockHandle The handle of FVB protocol that provides services for reading, writing, and erasing the target block. @@ -727,7 +727,7 @@ FtwRestart ( /** Aborts all previous allocated writes. - @param This The pointer to this protocol instance. + @param This The pointer to this protocol instance. @retval EFI_SUCCESS The function completed successfully @retval EFI_ABORTED The function could not complete successfully. @@ -785,7 +785,7 @@ FtwAbort ( manner, ensuring at all times that either the original contents or the modified contents are available. - @param This The pointer to this protocol instance. + @param This The pointer to this protocol instance. @param CallerId The GUID identifying the last write. @param Lba The logical block address of the last write. @param Offset The offset within the block of the last write. diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.h b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.h index be6929c654..844cf3bee0 100644 --- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.h +++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWrite.h @@ -3,14 +3,14 @@ The internal header file includes the common header files, defines internal structure and functions used by Ftw module. -Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -82,7 +82,7 @@ typedef struct { UINTN FtwWorkSpaceSize; // Size of working space range that stores write record. EFI_LBA FtwWorkSpaceLbaInSpare; // Start LBA of working space in spare block. UINTN FtwWorkSpaceBaseInSpare;// Offset into the FtwWorkSpaceLbaInSpare block. - UINT8 *FtwWorkSpace; // Point to Work Space in memory buffer + UINT8 *FtwWorkSpace; // Point to Work Space in memory buffer // // Following a buffer of FtwWorkSpace[FTW_WORK_SPACE_SIZE], // Allocated with EFI_FTW_DEVICE. @@ -183,11 +183,11 @@ FtwAllocate ( reading, writing, and erasing the target block. @param Buffer The data to write. - @retval EFI_SUCCESS The function completed successfully - @retval EFI_ABORTED The function could not complete successfully. - @retval EFI_BAD_BUFFER_SIZE The input data can't fit within the spare block. + @retval EFI_SUCCESS The function completed successfully + @retval EFI_ABORTED The function could not complete successfully. + @retval EFI_BAD_BUFFER_SIZE The input data can't fit within the spare block. Offset + *NumBytes > SpareAreaLength. - @retval EFI_ACCESS_DENIED No writes have been allocated. + @retval EFI_ACCESS_DENIED No writes have been allocated. @retval EFI_OUT_OF_RESOURCES Cannot allocate enough memory resource. @retval EFI_NOT_FOUND Cannot find FVB protocol by handle. @@ -290,7 +290,7 @@ FtwGetLastWrite ( partially erased. @retval EFI_INVALID_PARAMETER One or more of the LBAs listed in the variable argument list do - not exist in the firmware volume. + not exist in the firmware volume. **/ @@ -654,10 +654,10 @@ EFI_STATUS FtwGetSarProtocol ( OUT VOID **SarProtocol ); - + /** Function returns an array of handles that support the FVB protocol - in a buffer allocated from pool. + in a buffer allocated from pool. @param[out] NumberHandles The number of handles returned in Buffer. @param[out] Buffer A pointer to the buffer to return the requested @@ -689,7 +689,7 @@ GetFvbCountAndBuffer ( **/ EFI_STATUS InitFtwDevice ( - OUT EFI_FTW_DEVICE **FtwData + OUT EFI_FTW_DEVICE **FtwData ); @@ -700,7 +700,7 @@ InitFtwDevice ( @retval EFI_SUCCESS Initialize the FTW protocol successfully. @retval EFI_NOT_FOUND No proper FVB protocol was found. - + **/ EFI_STATUS InitFtwProtocol ( diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.c b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.c index 3fa5431cab..094e40f9d8 100644 --- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.c +++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.c @@ -2,18 +2,18 @@ This is a simple fault tolerant write driver. - This boot service protocol only provides fault tolerant write capability for - block devices. The protocol has internal non-volatile intermediate storage - of the data and private information. It should be able to recover - automatically from a critical fault, such as power failure. + This boot service protocol only provides fault tolerant write capability for + block devices. The protocol has internal non-volatile intermediate storage + of the data and private information. It should be able to recover + automatically from a critical fault, such as power failure. - The implementation uses an FTW (Fault Tolerant Write) Work Space. + The implementation uses an FTW (Fault Tolerant Write) Work Space. This work space is a memory copy of the work space on the Working Block, the size of the work space is the FTW_WORK_SPACE_SIZE bytes. - + The work space stores each write record as EFI_FTW_RECORD structure. The spare block stores the write buffer before write to the target block. - + The write record has three states to specify the different phase of write operation. 1) WRITE_ALLOCATED is that the record is allocated in write space. The information of write operation is stored in write record structure. @@ -27,27 +27,27 @@ Final copy the data from the spare block to the target block. To make this drive work well, the following conditions must be satisfied: - 1. The write NumBytes data must be fit within Spare area. + 1. The write NumBytes data must be fit within Spare area. Offset + NumBytes <= SpareAreaLength 2. The whole flash range has the same block size. 3. Working block is an area which contains working space in its last block and has the same size as spare block. - 4. Working Block area must be in the single one Firmware Volume Block range which FVB protocol is produced on. + 4. Working Block area must be in the single one Firmware Volume Block range which FVB protocol is produced on. 5. Spare area must be in the single one Firmware Volume Block range which FVB protocol is produced on. - 6. Any write data area (SpareAreaLength Area) which the data will be written into must be + 6. Any write data area (SpareAreaLength Area) which the data will be written into must be in the single one Firmware Volume Block range which FVB protocol is produced on. 7. If write data area (such as Variable range) is enlarged, the spare area range must be enlarged. The spare area must be enough large to store the write data before write them into the target range. If one of them is not satisfied, FtwWrite may fail. Usually, Spare area only takes one block. That's SpareAreaLength = BlockSize, NumberOfSpareBlock = 1. -Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -65,7 +65,7 @@ EFI_EVENT mFvbRegistration = NULL; @retval EFI_SUCCESS The interface information for the specified protocol was returned. @retval EFI_UNSUPPORTED The device does not support the FVB protocol. @retval EFI_INVALID_PARAMETER FvBlockHandle is not a valid EFI_HANDLE or FvBlock is NULL. - + **/ EFI_STATUS FtwGetFvbByHandle ( @@ -104,8 +104,8 @@ FtwGetSarProtocol ( // Locate Swap Address Range protocol // Status = gBS->LocateProtocol ( - &gEfiSwapAddressRangeProtocolGuid, - NULL, + &gEfiSwapAddressRangeProtocolGuid, + NULL, SarProtocol ); return Status; @@ -113,7 +113,7 @@ FtwGetSarProtocol ( /** Function returns an array of handles that support the FVB protocol - in a buffer allocated from pool. + in a buffer allocated from pool. @param[out] NumberHandles The number of handles returned in Buffer. @param[out] Buffer A pointer to the buffer to return the requested @@ -124,7 +124,7 @@ FtwGetSarProtocol ( @retval EFI_NOT_FOUND No FVB handle was found. @retval EFI_OUT_OF_RESOURCES There is not enough pool memory to store the matching results. @retval EFI_INVALID_PARAMETER NumberHandles is NULL or Buffer is NULL. - + **/ EFI_STATUS GetFvbCountAndBuffer ( @@ -169,10 +169,10 @@ FvbNotificationEvent ( // // Just return to avoid installing FaultTolerantWriteProtocol again // if Fault Tolerant Write protocol has been installed. - // + // Status = gBS->LocateProtocol ( - &gEfiFaultTolerantWriteProtocolGuid, - NULL, + &gEfiFaultTolerantWriteProtocolGuid, + NULL, (VOID **) &FtwProtocol ); if (!EFI_ERROR (Status)) { @@ -186,8 +186,8 @@ FvbNotificationEvent ( Status = InitFtwProtocol (FtwDevice); if (EFI_ERROR(Status)) { return ; - } - + } + // // Install protocol interface // @@ -198,10 +198,10 @@ FvbNotificationEvent ( &FtwDevice->FtwInstance ); ASSERT_EFI_ERROR (Status); - + Status = gBS->CloseEvent (Event); ASSERT_EFI_ERROR (Status); - + return; } @@ -215,7 +215,7 @@ FvbNotificationEvent ( @retval EFI_SUCCESS The initialization finished successfully. @retval EFI_OUT_OF_RESOURCES Allocate memory error @retval EFI_INVALID_PARAMETER Workspace or Spare block does not exist - + **/ EFI_STATUS EFIAPI @@ -239,7 +239,7 @@ FaultTolerantWriteInitialize ( // // Register FvbNotificationEvent () notify function. - // + // EfiCreateProtocolNotifyEvent ( &gEfiFirmwareVolumeBlockProtocolGuid, TPL_CALLBACK, @@ -247,6 +247,6 @@ FaultTolerantWriteInitialize ( (VOID *)FtwDevice, &mFvbRegistration ); - + return EFI_SUCCESS; } diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf index 5649241f71..30a765c807 100644 --- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf +++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxe.inf @@ -1,11 +1,11 @@ ## @file # Fault Tolerant Write Dxe Driver. # -# This driver installs Fault Tolerant Write (FTW) protocol, +# This driver installs Fault Tolerant Write (FTW) protocol, # which provides fault tolerant write capability for block devices. # Its implementation depends on the full functionality FVB protocol that support read, write/erase flash access. # -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxeExtra.uni b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxeExtra.uni index 9852e42699..f06f84efb3 100644 --- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxeExtra.uni +++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // FaultTolerantWriteDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Fault Tolerant Flash Write DXE Driver" diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.c b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.c index 1e75328f9b..632313f076 100644 --- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.c +++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.c @@ -2,18 +2,18 @@ This is a simple fault tolerant write driver that is intended to use in the SMM environment. - This boot service protocol only provides fault tolerant write capability for - block devices. The protocol has internal non-volatile intermediate storage - of the data and private information. It should be able to recover - automatically from a critical fault, such as power failure. + This boot service protocol only provides fault tolerant write capability for + block devices. The protocol has internal non-volatile intermediate storage + of the data and private information. It should be able to recover + automatically from a critical fault, such as power failure. - The implementation uses an FTW (Fault Tolerant Write) Work Space. + The implementation uses an FTW (Fault Tolerant Write) Work Space. This work space is a memory copy of the work space on the Working Block, the size of the work space is the FTW_WORK_SPACE_SIZE bytes. - + The work space stores each write record as EFI_FTW_RECORD structure. The spare block stores the write buffer before write to the target block. - + The write record has three states to specify the different phase of write operation. 1) WRITE_ALLOCATED is that the record is allocated in write space. The information of write operation is stored in write record structure. @@ -27,13 +27,13 @@ Final copy the data from the spare block to the target block. To make this drive work well, the following conditions must be satisfied: - 1. The write NumBytes data must be fit within Spare area. + 1. The write NumBytes data must be fit within Spare area. Offset + NumBytes <= SpareAreaLength 2. The whole flash range has the same block size. 3. Working block is an area which contains working space in its last block and has the same size as spare block. - 4. Working Block area must be in the single one Firmware Volume Block range which FVB protocol is produced on. + 4. Working Block area must be in the single one Firmware Volume Block range which FVB protocol is produced on. 5. Spare area must be in the single one Firmware Volume Block range which FVB protocol is produced on. - 6. Any write data area (SpareAreaLength Area) which the data will be written into must be + 6. Any write data area (SpareAreaLength Area) which the data will be written into must be in the single one Firmware Volume Block range which FVB protocol is produced on. 7. If write data area (such as Variable range) is enlarged, the spare area range must be enlarged. The spare area must be enough large to store the write data before write them into the target range. @@ -41,16 +41,16 @@ Usually, Spare area only takes one block. That's SpareAreaLength = BlockSize, NumberOfSpareBlock = 1. Caution: This module requires additional review when modified. - This driver need to make sure the CommBuffer is not in the SMRAM range. + This driver need to make sure the CommBuffer is not in the SMRAM range. + +Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php -Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -119,8 +119,8 @@ FtwGetSarProtocol ( // Locate Smm Swap Address Range protocol // Status = gSmst->SmmLocateProtocol ( - &gEfiSmmSwapAddressRangeProtocolGuid, - NULL, + &gEfiSmmSwapAddressRangeProtocolGuid, + NULL, SarProtocol ); return Status; @@ -128,7 +128,7 @@ FtwGetSarProtocol ( /** Function returns an array of handles that support the SMM FVB protocol - in a buffer allocated from pool. + in a buffer allocated from pool. @param[out] NumberHandles The number of handles returned in Buffer. @param[out] Buffer A pointer to the buffer to return the requested @@ -227,7 +227,7 @@ GetFvbByAddressAndAttribute ( if (EFI_ERROR (Status)) { return EFI_ABORTED; } - + // // Find the proper SMM Fvb handle by the address and attributes. // @@ -276,8 +276,8 @@ GetFvbByAddressAndAttribute ( This SMI handler provides services for the fault tolerant write wrapper driver. Caution: This function requires additional review when modified. - This driver need to make sure the CommBuffer is not in the SMRAM range. - Also in FTW_FUNCTION_GET_LAST_WRITE case, check SmmFtwGetLastWriteHeader->Data + + This driver need to make sure the CommBuffer is not in the SMRAM range. + Also in FTW_FUNCTION_GET_LAST_WRITE case, check SmmFtwGetLastWriteHeader->Data + SmmFtwGetLastWriteHeader->PrivateDataSize within communication buffer. @param[in] DispatchHandle The unique handle assigned to this handler by SmiHandlerRegister(). @@ -287,14 +287,14 @@ GetFvbByAddressAndAttribute ( from a non-SMM environment into an SMM environment. @param[in, out] CommBufferSize The size of the CommBuffer. - @retval EFI_SUCCESS The interrupt was handled and quiesced. No other handlers + @retval EFI_SUCCESS The interrupt was handled and quiesced. No other handlers should still be called. - @retval EFI_WARN_INTERRUPT_SOURCE_QUIESCED The interrupt has been quiesced but other handlers should + @retval EFI_WARN_INTERRUPT_SOURCE_QUIESCED The interrupt has been quiesced but other handlers should still be called. - @retval EFI_WARN_INTERRUPT_SOURCE_PENDING The interrupt is still pending and other handlers should still + @retval EFI_WARN_INTERRUPT_SOURCE_PENDING The interrupt is still pending and other handlers should still be called. @retval EFI_INTERRUPT_PENDING The interrupt could not be quiesced. - + **/ EFI_STATUS EFIAPI @@ -364,7 +364,7 @@ SmmFaultTolerantWriteHandler ( &SmmGetMaxBlockSizeHeader->BlockSize ); break; - + case FTW_FUNCTION_ALLOCATE: if (CommBufferPayloadSize < sizeof (SMM_FTW_ALLOCATE_HEADER)) { DEBUG ((EFI_D_ERROR, "Allocate: SMM communication buffer size invalid!\n")); @@ -378,7 +378,7 @@ SmmFaultTolerantWriteHandler ( SmmFtwAllocateHeader->NumberOfWrites ); break; - + case FTW_FUNCTION_WRITE: if (CommBufferPayloadSize < OFFSET_OF (SMM_FTW_WRITE_HEADER, Data)) { DEBUG ((EFI_D_ERROR, "Write: SMM communication buffer size invalid!\n")); @@ -412,7 +412,7 @@ SmmFaultTolerantWriteHandler ( PrivateData = (VOID *)&SmmFtwWriteHeader->Data[Length]; } Status = GetFvbByAddressAndAttribute ( - SmmFtwWriteHeader->FvbBaseAddress, + SmmFtwWriteHeader->FvbBaseAddress, SmmFtwWriteHeader->FvbAttributes, &SmmFvbHandle ); @@ -428,7 +428,7 @@ SmmFaultTolerantWriteHandler ( ); } break; - + case FTW_FUNCTION_RESTART: if (CommBufferPayloadSize < sizeof (SMM_FTW_RESTART_HEADER)) { DEBUG ((EFI_D_ERROR, "Restart: SMM communication buffer size invalid!\n")); @@ -436,10 +436,10 @@ SmmFaultTolerantWriteHandler ( } SmmFtwRestartHeader = (SMM_FTW_RESTART_HEADER *) SmmFtwFunctionHeader->Data; Status = GetFvbByAddressAndAttribute ( - SmmFtwRestartHeader->FvbBaseAddress, + SmmFtwRestartHeader->FvbBaseAddress, SmmFtwRestartHeader->FvbAttributes, &SmmFvbHandle - ); + ); if (!EFI_ERROR (Status)) { Status = FtwRestart (&mFtwDevice->FtwInstance, SmmFvbHandle); } @@ -448,7 +448,7 @@ SmmFaultTolerantWriteHandler ( case FTW_FUNCTION_ABORT: Status = FtwAbort (&mFtwDevice->FtwInstance); break; - + case FTW_FUNCTION_GET_LAST_WRITE: if (CommBufferPayloadSize < OFFSET_OF (SMM_FTW_GET_LAST_WRITE_HEADER, Data)) { DEBUG ((EFI_D_ERROR, "GetLastWrite: SMM communication buffer size invalid!\n")); @@ -499,13 +499,13 @@ SmmFaultTolerantWriteHandler ( /** SMM Firmware Volume Block Protocol notification event handler. - + @param[in] Protocol Points to the protocol's unique identifier @param[in] Interface Points to the interface instance @param[in] Handle The handle on which the interface was installed @retval EFI_SUCCESS SmmEventCallback runs successfully - + **/ EFI_STATUS EFIAPI @@ -519,14 +519,14 @@ FvbNotificationEvent ( EFI_SMM_FAULT_TOLERANT_WRITE_PROTOCOL *FtwProtocol; EFI_HANDLE SmmFtwHandle; EFI_HANDLE FtwHandle; - + // // Just return to avoid install SMM FaultTolerantWriteProtocol again // if SMM Fault Tolerant Write protocol had been installed. - // + // Status = gSmst->SmmLocateProtocol ( - &gEfiSmmFaultTolerantWriteProtocolGuid, - NULL, + &gEfiSmmFaultTolerantWriteProtocolGuid, + NULL, (VOID **) &FtwProtocol ); if (!EFI_ERROR (Status)) { @@ -550,7 +550,7 @@ FvbNotificationEvent ( EFI_NATIVE_INTERFACE, &mFtwDevice->FtwInstance ); - ASSERT_EFI_ERROR (Status); + ASSERT_EFI_ERROR (Status); /// /// Register SMM FTW SMI handler @@ -569,13 +569,13 @@ FvbNotificationEvent ( NULL ); ASSERT_EFI_ERROR (Status); - + return EFI_SUCCESS; } /** SMM END_OF_DXE protocol notification event handler. - + @param Protocol Points to the protocol's unique identifier @param Interface Points to the interface instance @param Handle The handle on which the interface was installed @@ -636,7 +636,7 @@ SmmFaultTolerantWriteInitialize ( // // Register FvbNotificationEvent () notify function. - // + // Status = gSmst->SmmRegisterProtocolNotify ( &gEfiSmmFirmwareVolumeBlockProtocolGuid, FvbNotificationEvent, @@ -645,6 +645,6 @@ SmmFaultTolerantWriteInitialize ( ASSERT_EFI_ERROR (Status); FvbNotificationEvent (NULL, NULL, NULL); - + return EFI_SUCCESS; } diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf index 3b57c3cf64..85d109e8d9 100644 --- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf +++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmm.inf @@ -1,12 +1,12 @@ ## @file # Fault Tolerant Write Smm Driver. # -# This driver installs SMM Fault Tolerant Write (FTW) protocol, which provides fault -# tolerant write capability in SMM environment for block devices. Its implementation -# depends on the full functionality SMM FVB protocol that support read, write/erase +# This driver installs SMM Fault Tolerant Write (FTW) protocol, which provides fault +# tolerant write capability in SMM environment for block devices. Its implementation +# depends on the full functionality SMM FVB protocol that support read, write/erase # flash access. # -# Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.
+# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmCommon.h b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmCommon.h index 061673bce2..8ad0015f3c 100644 --- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmCommon.h +++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmCommon.h @@ -1,15 +1,15 @@ /** @file - The common header file for SMM FTW module and SMM FTW DXE Module. - -Copyright (c) 2011, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + The common header file for SMM FTW module and SMM FTW DXE Module. + +Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxe.c b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxe.c index 772d10dcd4..259e9365f4 100644 --- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxe.c +++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxe.c @@ -1,16 +1,16 @@ /** @file - Implement the Fault Tolerant Write (FTW) protocol based on SMM FTW + Implement the Fault Tolerant Write (FTW) protocol based on SMM FTW module. -Copyright (c) 2011 - 2013, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -46,28 +46,28 @@ InitCommunicateBuffer ( IN UINTN Function ) { - EFI_SMM_COMMUNICATE_HEADER *SmmCommunicateHeader; - SMM_FTW_COMMUNICATE_FUNCTION_HEADER *SmmFtwFunctionHeader; + EFI_SMM_COMMUNICATE_HEADER *SmmCommunicateHeader; + SMM_FTW_COMMUNICATE_FUNCTION_HEADER *SmmFtwFunctionHeader; // // The whole buffer size: SMM_COMMUNICATE_HEADER_SIZE + SMM_FTW_COMMUNICATE_HEADER_SIZE + DataSize. // SmmCommunicateHeader = AllocateZeroPool (DataSize + SMM_COMMUNICATE_HEADER_SIZE + SMM_FTW_COMMUNICATE_HEADER_SIZE); ASSERT (SmmCommunicateHeader != NULL); - + // // Prepare data buffer. // CopyGuid (&SmmCommunicateHeader->HeaderGuid, &gEfiSmmFaultTolerantWriteProtocolGuid); SmmCommunicateHeader->MessageLength = DataSize + SMM_FTW_COMMUNICATE_HEADER_SIZE; - + SmmFtwFunctionHeader = (SMM_FTW_COMMUNICATE_FUNCTION_HEADER *) SmmCommunicateHeader->Data; SmmFtwFunctionHeader->Function = Function; *CommunicateBuffer = SmmCommunicateHeader; if (DataPtr != NULL) { *DataPtr = SmmFtwFunctionHeader->Data; - } + } } @@ -76,7 +76,7 @@ InitCommunicateBuffer ( @param[in, out] SmmCommunicateHeader The communicate buffer. @param[in] DataSize The payload size. - + **/ EFI_STATUS SendCommunicateBuffer ( @@ -86,8 +86,8 @@ SendCommunicateBuffer ( { EFI_STATUS Status; UINTN CommSize; - SMM_FTW_COMMUNICATE_FUNCTION_HEADER *SmmFtwFunctionHeader; - + SMM_FTW_COMMUNICATE_FUNCTION_HEADER *SmmFtwFunctionHeader; + CommSize = DataSize + SMM_COMMUNICATE_HEADER_SIZE + SMM_FTW_COMMUNICATE_HEADER_SIZE; Status = mSmmCommunication->Communicate (mSmmCommunication, SmmCommunicateHeader, &CommSize); ASSERT_EFI_ERROR (Status); @@ -103,7 +103,7 @@ SendCommunicateBuffer ( @param[in] FvbHandle The handle of FVB protocol that provides services. @param[out] FvbBaseAddress The base address of the FVB attached with FvbHandle. @param[out] FvbAttributes The attributes of the FVB attached with FvbHandle. - + @retval EFI_SUCCESS The function completed successfully. @retval Others The function could not complete successfully. @@ -122,14 +122,14 @@ ConvertFvbHandle ( if (EFI_ERROR (Status)) { return Status; } - + Status = Fvb->GetPhysicalAddress (Fvb, FvbBaseAddress); if (EFI_ERROR (Status)) { return Status; } Status = Fvb->GetAttributes (Fvb, FvbAttributes); - return Status; + return Status; } @@ -154,7 +154,7 @@ FtwGetMaxBlockSize ( { EFI_STATUS Status; UINTN PayloadSize; - EFI_SMM_COMMUNICATE_HEADER *SmmCommunicateHeader; + EFI_SMM_COMMUNICATE_HEADER *SmmCommunicateHeader; SMM_FTW_GET_MAX_BLOCK_SIZE_HEADER *SmmFtwBlockSizeHeader; // @@ -162,7 +162,7 @@ FtwGetMaxBlockSize ( // PayloadSize = sizeof (SMM_FTW_GET_MAX_BLOCK_SIZE_HEADER); InitCommunicateBuffer ((VOID **)&SmmCommunicateHeader, (VOID **)&SmmFtwBlockSizeHeader, PayloadSize, FTW_FUNCTION_GET_MAX_BLOCK_SIZE); - + // // Send data to SMM. // @@ -171,9 +171,9 @@ FtwGetMaxBlockSize ( // // Get data from SMM // - *BlockSize = SmmFtwBlockSizeHeader->BlockSize; + *BlockSize = SmmFtwBlockSizeHeader->BlockSize; FreePool (SmmCommunicateHeader); - + return Status; } @@ -210,7 +210,7 @@ FtwAllocate ( { EFI_STATUS Status; UINTN PayloadSize; - EFI_SMM_COMMUNICATE_HEADER *SmmCommunicateHeader; + EFI_SMM_COMMUNICATE_HEADER *SmmCommunicateHeader; SMM_FTW_ALLOCATE_HEADER *SmmFtwAllocateHeader; // @@ -220,8 +220,8 @@ FtwAllocate ( InitCommunicateBuffer ((VOID **)&SmmCommunicateHeader, (VOID **)&SmmFtwAllocateHeader, PayloadSize, FTW_FUNCTION_ALLOCATE); CopyGuid (&SmmFtwAllocateHeader->CallerId, CallerId); SmmFtwAllocateHeader->PrivateDataSize = PrivateDataSize; - SmmFtwAllocateHeader->NumberOfWrites = NumberOfWrites; - + SmmFtwAllocateHeader->NumberOfWrites = NumberOfWrites; + // // Send data to SMM. // @@ -276,7 +276,7 @@ FtwWrite ( { EFI_STATUS Status; UINTN PayloadSize; - EFI_SMM_COMMUNICATE_HEADER *SmmCommunicateHeader; + EFI_SMM_COMMUNICATE_HEADER *SmmCommunicateHeader; SMM_FTW_WRITE_HEADER *SmmFtwWriteHeader; // @@ -292,7 +292,7 @@ FtwWrite ( InitCommunicateBuffer ((VOID **)&SmmCommunicateHeader, (VOID **)&SmmFtwWriteHeader, PayloadSize, FTW_FUNCTION_WRITE); // - // FvBlockHandle can not be used in SMM environment. Here we get the FVB protocol first, then get FVB base address + // FvBlockHandle can not be used in SMM environment. Here we get the FVB protocol first, then get FVB base address // and its attribute. Send these information to SMM handler, the SMM handler will find the proper FVB to write data. // Status = ConvertFvbHandle (FvBlockHandle, &SmmFtwWriteHeader->FvbBaseAddress, &SmmFtwWriteHeader->FvbAttributes); @@ -300,9 +300,9 @@ FtwWrite ( FreePool (SmmCommunicateHeader); return EFI_ABORTED; } - + SmmFtwWriteHeader->Lba = Lba; - SmmFtwWriteHeader->Offset = Offset; + SmmFtwWriteHeader->Offset = Offset; SmmFtwWriteHeader->Length = Length; CopyMem (SmmFtwWriteHeader->Data, Buffer, Length); if (PrivateData == NULL) { @@ -316,7 +316,7 @@ FtwWrite ( // Send data to SMM. // Status = SendCommunicateBuffer (SmmCommunicateHeader, PayloadSize); - FreePool (SmmCommunicateHeader); + FreePool (SmmCommunicateHeader); return Status; } @@ -342,22 +342,22 @@ FtwRestart ( { EFI_STATUS Status; UINTN PayloadSize; - EFI_SMM_COMMUNICATE_HEADER *SmmCommunicateHeader; + EFI_SMM_COMMUNICATE_HEADER *SmmCommunicateHeader; SMM_FTW_RESTART_HEADER *SmmFtwRestartHeader; - + // // Initialize the communicate buffer. // PayloadSize = sizeof (SMM_FTW_RESTART_HEADER); - InitCommunicateBuffer ((VOID **)&SmmCommunicateHeader, (VOID **)&SmmFtwRestartHeader, PayloadSize, FTW_FUNCTION_RESTART); + InitCommunicateBuffer ((VOID **)&SmmCommunicateHeader, (VOID **)&SmmFtwRestartHeader, PayloadSize, FTW_FUNCTION_RESTART); // - // FvBlockHandle can not be used in SMM environment. Here we get the FVB protocol first, then get FVB base address + // FvBlockHandle can not be used in SMM environment. Here we get the FVB protocol first, then get FVB base address // and its attribute. Send these information to SMM handler, the SMM handler will find the proper FVB to write data. // Status = ConvertFvbHandle (FvBlockHandle, &SmmFtwRestartHeader->FvbBaseAddress, &SmmFtwRestartHeader->FvbAttributes); if (EFI_ERROR (Status)) { - FreePool (SmmCommunicateHeader); + FreePool (SmmCommunicateHeader); return EFI_ABORTED; } @@ -365,7 +365,7 @@ FtwRestart ( // Send data to SMM. // Status = SendCommunicateBuffer (SmmCommunicateHeader, PayloadSize); - FreePool (SmmCommunicateHeader); + FreePool (SmmCommunicateHeader); return Status; } @@ -387,19 +387,19 @@ FtwAbort ( ) { EFI_STATUS Status; - EFI_SMM_COMMUNICATE_HEADER *SmmCommunicateHeader; - + EFI_SMM_COMMUNICATE_HEADER *SmmCommunicateHeader; + // // Initialize the communicate buffer. // InitCommunicateBuffer ((VOID **)&SmmCommunicateHeader, NULL, 0, FTW_FUNCTION_ABORT); - + // // Send data to SMM. // Status = SendCommunicateBuffer (SmmCommunicateHeader, 0); - FreePool (SmmCommunicateHeader); + FreePool (SmmCommunicateHeader); return Status; } @@ -444,7 +444,7 @@ FtwGetLastWrite ( { EFI_STATUS Status; UINTN PayloadSize; - EFI_SMM_COMMUNICATE_HEADER *SmmCommunicateHeader; + EFI_SMM_COMMUNICATE_HEADER *SmmCommunicateHeader; SMM_FTW_GET_LAST_WRITE_HEADER *SmmFtwGetLastWriteHeader; // @@ -465,7 +465,7 @@ FtwGetLastWrite ( *PrivateDataSize = SmmFtwGetLastWriteHeader->PrivateDataSize; if (Status == EFI_SUCCESS || Status == EFI_BUFFER_TOO_SMALL) { *Lba = SmmFtwGetLastWriteHeader->Lba; - *Offset = SmmFtwGetLastWriteHeader->Offset; + *Offset = SmmFtwGetLastWriteHeader->Offset; *Length = SmmFtwGetLastWriteHeader->Length; *Complete = SmmFtwGetLastWriteHeader->Complete; CopyGuid (CallerId, &SmmFtwGetLastWriteHeader->CallerId); @@ -476,7 +476,7 @@ FtwGetLastWrite ( *Complete = SmmFtwGetLastWriteHeader->Complete; } - FreePool (SmmCommunicateHeader); + FreePool (SmmCommunicateHeader); return Status; } @@ -501,12 +501,12 @@ SmmFtwReady ( // // Just return to avoid install SMM FaultTolerantWriteProtocol again // if Fault Tolerant Write protocol had been installed. - // + // Status = gBS->LocateProtocol (&gEfiFaultTolerantWriteProtocolGuid, NULL, (VOID **)&FtwProtocol); if (!EFI_ERROR (Status)) { return; } - + Status = gBS->LocateProtocol (&gEfiSmmCommunicationProtocolGuid, NULL, (VOID **) &mSmmCommunication); ASSERT_EFI_ERROR (Status); @@ -520,9 +520,9 @@ SmmFtwReady ( &mFaultTolerantWriteDriver ); ASSERT_EFI_ERROR (Status); - + Status = gBS->CloseEvent (Event); - ASSERT_EFI_ERROR (Status); + ASSERT_EFI_ERROR (Status); } @@ -551,12 +551,12 @@ FaultTolerantWriteSmmInitialize ( // EfiCreateProtocolNotifyEvent ( &gEfiSmmFaultTolerantWriteProtocolGuid, - TPL_CALLBACK, - SmmFtwReady, - NULL, + TPL_CALLBACK, + SmmFtwReady, + NULL, &SmmFtwRegistration ); - + return EFI_SUCCESS; } diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxe.h b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxe.h index b4c20aee0f..ab8375a2e7 100644 --- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxe.h +++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxe.h @@ -3,14 +3,14 @@ The internal header file includes the common header files, defines internal structure and functions used by FTW module. -Copyright (c) 2011, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxe.inf b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxe.inf index 82dd36c320..df1e8dbcdb 100644 --- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxe.inf +++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxe.inf @@ -6,7 +6,7 @@ # the related operations in SMM handler in SMM FTW module. You can use the FTW protocol # before End Of Dxe or use FaultTolerantWriteDxe module instead if you really want to. # -# Copyright (c) 2011 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2011 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -36,13 +36,13 @@ FaultTolerantWriteSmmDxe.c FaultTolerantWriteSmmDxe.h FaultTolerantWriteSmmCommon.h - + [Packages] MdePkg/MdePkg.dec MdeModulePkg/MdeModulePkg.dec [LibraryClasses] - BaseLib + BaseLib UefiBootServicesTableLib DebugLib DxeServicesTableLib @@ -56,7 +56,7 @@ ## CONSUMES gEfiSmmFaultTolerantWriteProtocolGuid gEfiFirmwareVolumeBlockProtocolGuid ## CONSUMES - + [Depex] gEfiSmmCommunicationProtocolGuid diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxeExtra.uni b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxeExtra.uni index 8abf874098..6cee145f21 100644 --- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxeExtra.uni +++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FaultTolerantWriteSmmDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // FaultTolerantWriteSmmDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Fault Tolerant Flash Write SMM/DXE Bridge Driver" diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c index 96044693cc..27b65366ef 100644 --- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c +++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/FtwMisc.c @@ -2,14 +2,14 @@ Internal generic functions to operate flash block. -Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -89,7 +89,7 @@ FtwEraseBlock ( partially erased. @retval EFI_INVALID_PARAMETER One or more of the LBAs listed in the variable argument list do - not exist in the firmware volume. + not exist in the firmware volume. **/ @@ -970,11 +970,11 @@ GetPreviousRecordOfWrites ( **/ EFI_STATUS InitFtwDevice ( - OUT EFI_FTW_DEVICE **FtwData + OUT EFI_FTW_DEVICE **FtwData ) { EFI_FTW_DEVICE *FtwDevice; - + // // Allocate private data of this driver, // Including the FtwWorkSpace[FTW_WORK_SPACE_SIZE]. @@ -1005,11 +1005,11 @@ InitFtwDevice ( if (FtwDevice->WorkSpaceAddress == 0) { FtwDevice->WorkSpaceAddress = (EFI_PHYSICAL_ADDRESS) PcdGet32 (PcdFlashNvStorageFtwWorkingBase); } - + FtwDevice->SpareAreaAddress = (EFI_PHYSICAL_ADDRESS) PcdGet64 (PcdFlashNvStorageFtwSpareBase64); if (FtwDevice->SpareAreaAddress == 0) { FtwDevice->SpareAreaAddress = (EFI_PHYSICAL_ADDRESS) PcdGet32 (PcdFlashNvStorageFtwSpareBase); - } + } *FtwData = FtwDevice; return EFI_SUCCESS; @@ -1024,7 +1024,7 @@ InitFtwDevice ( @retval EFI_SUCCESS Find the FVB protocol successfully. @retval EFI_NOT_FOUND No proper FVB protocol was found. @retval EFI_ABORTED Some data can not be got or be invalid. - + **/ EFI_STATUS FindFvbForFtw ( @@ -1068,7 +1068,7 @@ FindFvbForFtw ( // Status = Fvb->GetAttributes (Fvb, &Attributes); if (EFI_ERROR (Status) || ((Attributes & EFI_FVB2_WRITE_STATUS) == 0)) { - continue; + continue; } // // Compare the address and select the right one @@ -1188,7 +1188,7 @@ FindFvbForFtw ( @retval EFI_SUCCESS Initialize the FTW protocol successfully. @retval EFI_NOT_FOUND No proper FVB protocol was found. - + **/ EFI_STATUS InitFtwProtocol ( @@ -1208,7 +1208,7 @@ InitFtwProtocol ( Status = FindFvbForFtw (FtwDevice); if (EFI_ERROR (Status)) { return EFI_NOT_FOUND; - } + } // // Calculate the start LBA of working block. @@ -1338,7 +1338,7 @@ InitFtwProtocol ( if (FtwDevice->FtwWorkSpace[Offset] != FTW_ERASED_BYTE) { Offset += FTW_WRITE_TOTAL_SIZE (FtwHeader->NumberOfWrites, FtwHeader->PrivateDataSize); } - + if (!IsErasedFlashBuffer (FtwDevice->FtwWorkSpace + Offset, FtwDevice->FtwWorkSpaceSize - Offset)) { Status = FtwReclaimWorkSpace (FtwDevice, TRUE); ASSERT_EFI_ERROR (Status); @@ -1378,7 +1378,7 @@ InitFtwProtocol ( FtwDevice->FtwInstance.Restart = FtwRestart; FtwDevice->FtwInstance.Abort = FtwAbort; FtwDevice->FtwInstance.GetLastWrite = FtwGetLastWrite; - + return EFI_SUCCESS; } diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/SmmFaultTolerantWriteDxeExtra.uni b/MdeModulePkg/Universal/FaultTolerantWriteDxe/SmmFaultTolerantWriteDxeExtra.uni index ad1fcc0e70..15a3c08bb5 100644 --- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/SmmFaultTolerantWriteDxeExtra.uni +++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/SmmFaultTolerantWriteDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // SmmFaultTolerantWriteDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "SMM Fault Tolerant Flash Write Driver" diff --git a/MdeModulePkg/Universal/FaultTolerantWriteDxe/UpdateWorkingBlock.c b/MdeModulePkg/Universal/FaultTolerantWriteDxe/UpdateWorkingBlock.c index b4327b5619..50d3421b88 100644 --- a/MdeModulePkg/Universal/FaultTolerantWriteDxe/UpdateWorkingBlock.c +++ b/MdeModulePkg/Universal/FaultTolerantWriteDxe/UpdateWorkingBlock.c @@ -2,14 +2,14 @@ Internal functions to operate Working Block Space. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.c b/MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.c index 14e18e5ae2..b22b12487b 100644 --- a/MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.c +++ b/MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePei.c @@ -2,14 +2,14 @@ This driver installs gEdkiiFaultTolerantWriteGuid PPI to inform the check for FTW last write data has been done. -Copyright (c) 2013, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePeiExtra.uni b/MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePeiExtra.uni index b9fd9425a9..fb36196216 100644 --- a/MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePeiExtra.uni +++ b/MdeModulePkg/Universal/FaultTolerantWritePei/FaultTolerantWritePeiExtra.uni @@ -1,7 +1,7 @@ // /** @file // FaultTolerantWritePei Localized Strings and Content // -// Copyright (c) 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "FaultTolerantWrite PEI Module" diff --git a/MdeModulePkg/Universal/FileExplorerDxe/FileExplorerDxe.inf b/MdeModulePkg/Universal/FileExplorerDxe/FileExplorerDxe.inf index 86d7533261..8f8b8b4294 100644 --- a/MdeModulePkg/Universal/FileExplorerDxe/FileExplorerDxe.inf +++ b/MdeModulePkg/Universal/FileExplorerDxe/FileExplorerDxe.inf @@ -1,10 +1,10 @@ ## @file # File explorer DXE driver that produces File explorer Protocol. # -# This driver produces File explorerprotocol layered on top of the FileExplorerLib +# This driver produces File explorerprotocol layered on top of the FileExplorerLib # from the MdeModulePkg. # -# Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.
+# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at diff --git a/MdeModulePkg/Universal/FileExplorerDxe/FileExplorerDxe.uni b/MdeModulePkg/Universal/FileExplorerDxe/FileExplorerDxe.uni index 583bdfed9d..a504264aa6 100644 --- a/MdeModulePkg/Universal/FileExplorerDxe/FileExplorerDxe.uni +++ b/MdeModulePkg/Universal/FileExplorerDxe/FileExplorerDxe.uni @@ -4,13 +4,13 @@ // This driver produces File Explorer protocol layered on top of the File Explorer library // from the MdeModulePkg. // -// Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/FileExplorerDxe/FileExplorerDxeExtra.uni b/MdeModulePkg/Universal/FileExplorerDxe/FileExplorerDxeExtra.uni index 467dfb85b7..43a5657303 100644 --- a/MdeModulePkg/Universal/FileExplorerDxe/FileExplorerDxeExtra.uni +++ b/MdeModulePkg/Universal/FileExplorerDxe/FileExplorerDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // FileExplorerDxe Localized Strings and Content // -// Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "File Explorer DXE Driver" diff --git a/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystem.c b/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystem.c index e39036aed9..746f2ced70 100644 --- a/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystem.c +++ b/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystem.c @@ -12,7 +12,7 @@ from the UEFI shell. It is entirely read-only. Copyright (c) 2014, ARM Limited. All rights reserved. -Copyright (c) 2014 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -826,7 +826,7 @@ FvSimpleFileSystemSetPosition ( // Reset directory position to first entry // if (File->DirReadNext) { - File->DirReadNext = FVFS_GET_FIRST_FILE_INFO (Instance); + File->DirReadNext = FVFS_GET_FIRST_FILE_INFO (Instance); } } else if (Position == 0xFFFFFFFFFFFFFFFFull) { File->Position = File->FvFileInfo->FileInfo.FileSize; @@ -942,9 +942,9 @@ FvSimpleFileSystemGetInfo ( FsInfoOut = (EFI_FILE_SYSTEM_INFO *) Buffer; CopyMem (FsInfoOut, &mFsInfoTemplate, sizeof (EFI_FILE_SYSTEM_INFO)); - Status = StrnCpyS ( FsInfoOut->VolumeLabel, - (*BufferSize - OFFSET_OF (EFI_FILE_SYSTEM_INFO, VolumeLabel)) / sizeof (CHAR16), - Instance->VolumeLabel, + Status = StrnCpyS ( FsInfoOut->VolumeLabel, + (*BufferSize - OFFSET_OF (EFI_FILE_SYSTEM_INFO, VolumeLabel)) / sizeof (CHAR16), + Instance->VolumeLabel, StrLen (Instance->VolumeLabel) ); ASSERT_EFI_ERROR (Status); @@ -967,9 +967,9 @@ FvSimpleFileSystemGetInfo ( } FsVolumeLabel = (EFI_FILE_SYSTEM_VOLUME_LABEL*) Buffer; - Status = StrnCpyS (FsVolumeLabel->VolumeLabel, + Status = StrnCpyS (FsVolumeLabel->VolumeLabel, (*BufferSize - OFFSET_OF (EFI_FILE_SYSTEM_VOLUME_LABEL, VolumeLabel)) / sizeof (CHAR16), - Instance->VolumeLabel, + Instance->VolumeLabel, StrLen (Instance->VolumeLabel) ); ASSERT_EFI_ERROR (Status); @@ -1022,7 +1022,7 @@ FvSimpleFileSystemSetInfo ( IN VOID *Buffer ) { - if (CompareGuid (InformationType, &gEfiFileSystemInfoGuid) || + if (CompareGuid (InformationType, &gEfiFileSystemInfoGuid) || CompareGuid (InformationType, &gEfiFileInfoGuid) || CompareGuid (InformationType, &gEfiFileSystemVolumeLabelInfoIdGuid)) { return EFI_WRITE_PROTECTED; diff --git a/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystem.uni b/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystem.uni index 75491148e3..0e3067d129 100644 --- a/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystem.uni +++ b/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystem.uni @@ -3,13 +3,13 @@ // // This module produces Simple File System protocol to provide the accesses to the files in FVs. // -// Copyright (c) 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemDxe.inf b/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemDxe.inf index a648c2efc8..84d6184c42 100644 --- a/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemDxe.inf +++ b/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemDxe.inf @@ -14,7 +14,7 @@ # from the UEFI shell. It is entirely read-only. # # Copyright (c) 2014, ARM Ltd. All rights reserved.
-# Copyright (c) 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -71,4 +71,4 @@ gEfiSimpleFileSystemProtocolGuid ## BY_START [UserExtensions.TianoCore."ExtraFiles"] - FvSimpleFileSystemExtra.uni \ No newline at end of file + FvSimpleFileSystemExtra.uni diff --git a/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemExtra.uni b/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemExtra.uni index eca54c42d8..f3d4308365 100644 --- a/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemExtra.uni +++ b/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemExtra.uni @@ -1,7 +1,7 @@ // /** @file // FvSimpleFileSystem Driver's Localized Strings and Content // -// Copyright (c) 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "FvSimpleFileSystem UEFI Driver" diff --git a/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemInternal.h b/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemInternal.h index 495ba97a59..0dbd7b62cc 100644 --- a/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemInternal.h +++ b/MdeModulePkg/Universal/FvSimpleFileSystemDxe/FvSimpleFileSystemInternal.h @@ -2,7 +2,7 @@ The internal header file of FvSimpleFileSystem driver. Copyright (c) 2014, ARM Limited. All rights reserved. -Copyright (c) 2014, Intel Corporation. All rights reserved.
+Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -58,7 +58,7 @@ struct _FV_FILESYSTEM_INSTANCE { }; // -// Struct representing a opening file. Each opening operation on file will +// Struct representing a opening file. Each opening operation on file will // create such an instance except for the "root directory", which will only // be created once for each FV. // diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c index 5d5f17fb17..2504597d70 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigKeywordHandler.c @@ -1,7 +1,7 @@ /** @file Implementation of interfaces function for EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL. -Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -109,7 +109,7 @@ ExtractDevicePath ( if (((Length + 1) / 2) < sizeof (EFI_DEVICE_PATH_PROTOCOL)) { return EFI_INVALID_PARAMETER; } - + // // The data in is encoded as hex UNICODE %02x bytes in the same order // as the device path resides in RAM memory. @@ -119,7 +119,7 @@ ExtractDevicePath ( if (DevicePathBuffer == NULL) { return EFI_OUT_OF_RESOURCES; } - + // // Convert DevicePath // @@ -133,7 +133,7 @@ ExtractDevicePath ( DevicePathBuffer [Index/2] = (UINT8) ((DevicePathBuffer [Index/2] << 4) + DigitUint8); } } - + // // Validate DevicePath // @@ -209,7 +209,7 @@ ExtractNameSpace ( TmpPtr = StrStr (String, L"&"); if (TmpPtr != NULL) { - *TmpPtr = 0; + *TmpPtr = 0; } if (NextString != NULL) { *NextString = String + StrLen (String); @@ -227,7 +227,7 @@ ExtractNameSpace ( UnicodeStrToAsciiStrS (String, *NameSpace, NameSpaceSize); if (TmpPtr != NULL) { - *TmpPtr = L'&'; + *TmpPtr = L'&'; } return EFI_SUCCESS; @@ -256,7 +256,7 @@ ExtractKeyword ( EFI_STRING TmpPtr; ASSERT ((Keyword != NULL) && (NextString != NULL)); - + TmpPtr = NULL; // @@ -280,10 +280,10 @@ ExtractKeyword ( } String += StrLen (L"KEYWORD="); - + TmpPtr = StrStr (String, L"&"); if (TmpPtr != NULL) { - *TmpPtr = 0; + *TmpPtr = 0; } *NextString = String + StrLen (String); @@ -295,7 +295,7 @@ ExtractKeyword ( if (TmpPtr != NULL) { *TmpPtr = L'&'; } - + return EFI_SUCCESS; } @@ -335,10 +335,10 @@ ExtractValue ( } String += StrLen (L"VALUE="); - + TmpPtr = StrStr (String, L"&"); if (TmpPtr != NULL) { - *TmpPtr = 0; + *TmpPtr = 0; } *NextString = String + StrLen (String); @@ -350,7 +350,7 @@ ExtractValue ( if (TmpPtr != NULL) { *TmpPtr = L'&'; } - + return EFI_SUCCESS; } @@ -376,7 +376,7 @@ ExtractFilter ( { CHAR16 *PathPtr; CHAR16 *KeywordPtr; - BOOLEAN RetVal; + BOOLEAN RetVal; ASSERT ((FilterFlags != NULL) && (NextString != NULL)); @@ -387,7 +387,7 @@ ExtractFilter ( *NextString = NULL; return FALSE; } - + *FilterFlags = 0; RetVal = TRUE; @@ -558,7 +558,7 @@ ValidateFilter ( // // Get ReadOnly flag from Question. - // + // *ReadOnly = ExtractReadOnlyFromOpCode(OpCodeData); while (ExtractFilter (StringPtr, &FilterFlags, &NextFilter)) { @@ -653,7 +653,7 @@ ValidateFilter ( // StringPtr = NextFilter; } - + Done: // // The current filter which is processing. @@ -702,14 +702,14 @@ GetRecordFromDevicePath ( } /** - Calculate the size of StringSrc and output it. Also copy string text from src + Calculate the size of StringSrc and output it. Also copy string text from src to dest. This is a internal function. @param StringSrc Points to current null-terminated string. @param BufferSize Length of the buffer. - @param StringDest Buffer to store the string text. + @param StringDest Buffer to store the string text. @retval EFI_SUCCESS The string text was outputted successfully. @retval EFI_OUT_OF_RESOURCES Out of resource. @@ -738,7 +738,7 @@ GetUnicodeStringTextAndSize ( if (*StringDest == NULL) { return EFI_OUT_OF_RESOURCES; } - + CopyMem (*StringDest, StringSrc, StringSize); *BufferSize = StringSize; @@ -1067,7 +1067,7 @@ GetNextStringId ( case EFI_HII_SIBT_STRING_SCSU: Offset = sizeof (EFI_HII_STRING_BLOCK); StringTextPtr = BlockHdr + Offset; - + if (FindString) { StringSize = AsciiStrSize ((CHAR8 *) StringTextPtr); *KeywordValue = AllocatePool (StringSize * sizeof (CHAR16)); @@ -1087,7 +1087,7 @@ GetNextStringId ( case EFI_HII_SIBT_STRING_SCSU_FONT: Offset = sizeof (EFI_HII_SIBT_STRING_SCSU_FONT_BLOCK) - sizeof (UINT8); StringTextPtr = BlockHdr + Offset; - + if (FindString) { StringSize = AsciiStrSize ((CHAR8 *) StringTextPtr); *KeywordValue = AllocatePool (StringSize * sizeof (CHAR16)); @@ -1205,7 +1205,7 @@ GetNextStringId ( BlockSize += Offset; CopyMem (&StringCount, BlockHdr + sizeof (EFI_HII_STRING_BLOCK), sizeof (UINT16)); for (Index = 0; Index < StringCount; Index++) { - GetUnicodeStringTextAndSize (StringTextPtr, &StringSize, &String); + GetUnicodeStringTextAndSize (StringTextPtr, &StringSize, &String); if (FindString) { *KeywordValue = String; @@ -1346,7 +1346,7 @@ GetStringIdFromRecord ( StringPackage = CR (Link, HII_STRING_PACKAGE_INSTANCE, StringEntry, HII_STRING_PACKAGE_SIGNATURE); if (AsciiStrnCmp(Name, StringPackage->StringPkgHdr->Language, AsciiStrLen (Name)) == 0) { - Status = GetStringIdFromString (StringPackage, KeywordValue, StringId); + Status = GetStringIdFromString (StringPackage, KeywordValue, StringId); if (EFI_ERROR (Status)) { return KEYWORD_HANDLER_KEYWORD_NOT_FOUND; } else { @@ -1430,10 +1430,10 @@ IsStorageOpCode ( @retval the opcode for the question. **/ -UINT8 * +UINT8 * FindQuestionFromStringId ( IN HII_IFR_PACKAGE_INSTANCE *FormPackage, - IN EFI_STRING_ID KeywordStrId + IN EFI_STRING_ID KeywordStrId ) { UINT8 *OpCodeData; @@ -1530,7 +1530,7 @@ FindStorageFromVarId ( @retval the width info for one question. **/ -UINT16 +UINT16 GetWidth ( IN UINT8 *OpCodeData ) @@ -1548,16 +1548,16 @@ GetWidth ( switch (((EFI_IFR_ONE_OF *) OpCodeData)->Flags & EFI_IFR_NUMERIC_SIZE) { case EFI_IFR_NUMERIC_SIZE_1: return (UINT16) sizeof (UINT8); - + case EFI_IFR_NUMERIC_SIZE_2: return (UINT16) sizeof (UINT16); - + case EFI_IFR_NUMERIC_SIZE_4: return (UINT16) sizeof (UINT32); - + case EFI_IFR_NUMERIC_SIZE_8: return (UINT16) sizeof (UINT64); - + default: ASSERT (FALSE); return 0; @@ -1572,16 +1572,16 @@ GetWidth ( switch (((EFI_IFR_ONE_OF_OPTION *) NextOpCodeData)->Type) { case EFI_IFR_TYPE_NUM_SIZE_8: return (UINT16) sizeof (UINT8) * ((EFI_IFR_ORDERED_LIST *) OpCodeData)->MaxContainers; - + case EFI_IFR_TYPE_NUM_SIZE_16: return (UINT16) sizeof (UINT16) * ((EFI_IFR_ORDERED_LIST *) OpCodeData)->MaxContainers ; - + case EFI_IFR_TYPE_NUM_SIZE_32: return (UINT16) sizeof (UINT32) * ((EFI_IFR_ORDERED_LIST *) OpCodeData)->MaxContainers; - + case EFI_IFR_TYPE_NUM_SIZE_64: return (UINT16) sizeof (UINT64) * ((EFI_IFR_ORDERED_LIST *) OpCodeData)->MaxContainers; - + default: ASSERT (FALSE); return 0; @@ -1589,7 +1589,7 @@ GetWidth ( case EFI_IFR_CHECKBOX_OP: return (UINT16) sizeof (BOOLEAN); - + case EFI_IFR_PASSWORD_OP: return (UINT16)((UINTN) ((EFI_IFR_PASSWORD *) OpCodeData)->MaxSize * sizeof (CHAR16)); @@ -1648,12 +1648,12 @@ InternalLowerConfigString ( /** Allocates and returns a Null-terminated Unicode string. - + The format of a is as follows: GUID=32&NAME=NameLength&PATH=DevicePathSize - @param[in] OpCodeData The opcode for the storage. + @param[in] OpCodeData The opcode for the storage. @param[in] DriverHandle The driver handle which supports a Device Path Protocol that is the routing information PATH. Each byte of the Device Path associated with DriverHandle is converted @@ -1689,17 +1689,17 @@ ConstructConfigHdr ( Guid = (EFI_GUID *)(UINTN *)&((EFI_IFR_VARSTORE *) OpCodeData)->Guid; AsciiName = (CHAR8 *) ((EFI_IFR_VARSTORE *) OpCodeData)->Name; break; - + case EFI_IFR_VARSTORE_NAME_VALUE_OP: Guid = (EFI_GUID *)(UINTN *)&((EFI_IFR_VARSTORE_NAME_VALUE *) OpCodeData)->Guid; AsciiName = NULL; break; - + case EFI_IFR_VARSTORE_EFI_OP: Guid = (EFI_GUID *)(UINTN *)&((EFI_IFR_VARSTORE_EFI *) OpCodeData)->Guid; AsciiName = (CHAR8 *) ((EFI_IFR_VARSTORE_EFI *) OpCodeData)->Name; break; - + default: ASSERT (FALSE); Guid = NULL; @@ -1717,7 +1717,7 @@ ConstructConfigHdr ( } // - // Compute the length of Name in Unicode characters. + // Compute the length of Name in Unicode characters. // If Name is NULL, then the length is 0. // NameLength = 0; @@ -1773,7 +1773,7 @@ ConstructConfigHdr ( String += StrnLenS (String, MaxLen - ((UINTN)String - (UINTN)ReturnString) / sizeof (CHAR16)); } } - + // // Append L"&NAME=" // @@ -1841,12 +1841,12 @@ EFI_STRING ConstructRequestElement ( IN CHAR16 *Name, IN UINT16 Offset, - IN UINT16 Width + IN UINT16 Width ) { CHAR16 *StringPtr; UINTN Length; - + if (Name != NULL) { // // Add length for each Name @@ -1886,10 +1886,10 @@ ConstructRequestElement ( // Append OFFSET=XXXX&WIDTH=YYYY\0 // UnicodeSPrint ( - StringPtr, - (7 + 4 + 7 + 4 + 1) * sizeof (CHAR16), - L"OFFSET=%04X&WIDTH=%04X", - Offset, + StringPtr, + (7 + 4 + 7 + 4 + 1) * sizeof (CHAR16), + L"OFFSET=%04X&WIDTH=%04X", + Offset, Width ); } @@ -1922,7 +1922,7 @@ GetNameFromId ( Name = NULL; BestLanguage = NULL; - PlatformLanguage = NULL; + PlatformLanguage = NULL; SupportedLanguages = NULL; GetEfiGlobalVariable2 (L"PlatformLang", (VOID**)&PlatformLanguage, NULL); @@ -1932,10 +1932,10 @@ GetNameFromId ( // Get the best matching language from SupportedLanguages // BestLanguage = GetBestLanguage ( - SupportedLanguages, + SupportedLanguages, FALSE, // RFC 4646 mode PlatformLanguage != NULL ? PlatformLanguage : "", // Highest priority - SupportedLanguages, // Lowest priority + SupportedLanguages, // Lowest priority NULL ); if (BestLanguage == NULL) { @@ -2013,7 +2013,7 @@ ExtractConfigRequest ( IN EFI_STRING_ID KeywordStrId, OUT UINT8 **OpCodeData, OUT EFI_STRING *ConfigRequest - ) + ) { LIST_ENTRY *Link; HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageListNode; @@ -2053,7 +2053,7 @@ ExtractConfigRequest ( // ASSERT (Header->VarStoreId != 0); DEBUG ((EFI_D_INFO, "Varstore Id: 0x%x\n", Header->VarStoreId)); - + Storage = FindStorageFromVarId (FormPackage, Header->VarStoreId); ASSERT (Storage != NULL); @@ -2116,7 +2116,7 @@ ExtractConfigResp ( IN EFI_STRING ValueElement, OUT UINT8 **OpCodeData, OUT EFI_STRING *ConfigResp - ) + ) { LIST_ENTRY *Link; HII_DATABASE_PACKAGE_LIST_INSTANCE *PackageListNode; @@ -2156,7 +2156,7 @@ ExtractConfigResp ( // ASSERT (Header->VarStoreId != 0); DEBUG ((EFI_D_INFO, "Varstore Id: 0x%x\n", Header->VarStoreId)); - + Storage = FindStorageFromVarId (FormPackage, Header->VarStoreId); ASSERT (Storage != NULL); @@ -2341,7 +2341,7 @@ GetStringIdFromDatabase ( *ProgressErr = GetStringIdFromRecord (Record, NameSpace, KeywordData, KeywordStringId); if (*ProgressErr == KEYWORD_HANDLER_NO_ERROR) { *DataBaseRecord = Record; - + if ((DevicePathPkg = Record->PackageList->DevicePathPkg) != NULL) { DestDevicePath = (EFI_DEVICE_PATH_PROTOCOL *) (DevicePathPkg + sizeof (EFI_HII_PACKAGE_HEADER)); DevicePathSize = GetDevicePathSize ((EFI_DEVICE_PATH_PROTOCOL *) DestDevicePath); @@ -2361,7 +2361,7 @@ GetStringIdFromDatabase ( return EFI_OUT_OF_RESOURCES; } else if (*ProgressErr == KEYWORD_HANDLER_KEYWORD_NOT_FOUND) { FindNameSpace = TRUE; - } + } } // @@ -2394,7 +2394,7 @@ GetStringIdFromDatabase ( **/ EFI_STATUS GenerateKeywordResp ( - IN CHAR8 *NameSpace, + IN CHAR8 *NameSpace, IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN EFI_STRING KeywordData, IN EFI_STRING ValueStr, @@ -2510,7 +2510,7 @@ GenerateKeywordResp ( if (PathHdr != NULL) { FreePool (PathHdr); } - + return EFI_SUCCESS; } @@ -2562,9 +2562,9 @@ MergeToMultiKeywordResp ( } /** - Enumerate all keyword in the system. - - If error occur when parse one keyword, just skip it and parse the next one. + Enumerate all keyword in the system. + + If error occur when parse one keyword, just skip it and parse the next one. This is a internal function. @@ -2649,7 +2649,7 @@ EnumerateAllKeywords ( // Any valid string start from 2. so here initial it to 1. // NextStringId = 1; - + // // Enumerate all valid stringid in the package. // @@ -2664,7 +2664,7 @@ EnumerateAllKeywords ( // goto Error; } - + // // 3.4 Extract Value for the input keyword. // @@ -2698,7 +2698,7 @@ EnumerateAllKeywords ( // goto Done; } - + // // 6. Merge to the MultiKeywordResp string. // @@ -2721,7 +2721,7 @@ Error: if (KeywordResp != NULL) { FreePool (KeywordResp); KeywordResp = NULL; - } + } } if (LocalNameSpace != NULL) { @@ -2729,7 +2729,7 @@ Error: LocalNameSpace = NULL; } } - } + } } // @@ -2746,7 +2746,7 @@ Error: Status = EFI_SUCCESS; } *MultiResp = MultiKeywordResp; - + Done: if (LocalNameSpace != NULL) { FreePool (LocalNameSpace); @@ -2766,18 +2766,18 @@ Done: This function accepts a formatted string, finds the associated keyword owners, creates a string from it and forwards it to the EFI_HII_ROUTING_PROTOCOL.RouteConfig function. - - If there is an issue in resolving the contents of the KeywordString, then the - function returns an error and also sets the Progress and ProgressErr with the + + If there is an issue in resolving the contents of the KeywordString, then the + function returns an error and also sets the Progress and ProgressErr with the appropriate information about where the issue occurred and additional data about - the nature of the issue. - + the nature of the issue. + In the case when KeywordString containing multiple keywords, when an EFI_NOT_FOUND error is generated during processing the second or later keyword element, the system - storage associated with earlier keywords is not modified. All elements of the + storage associated with earlier keywords is not modified. All elements of the KeywordString must successfully pass all tests for format and access prior to making any modifications to storage. - + In the case when EFI_DEVICE_ERROR is returned from the processing of a KeywordString containing multiple keywords, the state of storage associated with earlier keywords is undefined. @@ -2785,18 +2785,18 @@ Done: @param This Pointer to the EFI_KEYWORD_HANDLER _PROTOCOL instance. - @param KeywordString A null-terminated string in format. + @param KeywordString A null-terminated string in format. - @param Progress On return, points to a character in the KeywordString. - Points to the string's NULL terminator if the request - was successful. Points to the most recent '&' before + @param Progress On return, points to a character in the KeywordString. + Points to the string's NULL terminator if the request + was successful. Points to the most recent '&' before the first failing name / value pair (or the beginning of the string if the failure is in the first name / value pair) if the request was not successful. @param ProgressErr If during the processing of the KeywordString there was - a failure, this parameter gives additional information - about the possible source of the problem. The various + a failure, this parameter gives additional information + about the possible source of the problem. The various errors are defined in "Related Definitions" below. @@ -2804,16 +2804,16 @@ Done: @retval EFI_INVALID_PARAMETER One or more of the following are TRUE: 1. KeywordString is NULL. - 2. Parsing of the KeywordString resulted in an + 2. Parsing of the KeywordString resulted in an error. See Progress and ProgressErr for more data. - @retval EFI_NOT_FOUND An element of the KeywordString was not found. + @retval EFI_NOT_FOUND An element of the KeywordString was not found. See ProgressErr for more data. - @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated. + @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated. See ProgressErr for more data. - - @retval EFI_ACCESS_DENIED The action violated system policy. See ProgressErr + + @retval EFI_ACCESS_DENIED The action violated system policy. See ProgressErr for more data. @retval EFI_DEVICE_ERROR An unexpected system error occurred. See ProgressErr @@ -2821,7 +2821,7 @@ Done: **/ EFI_STATUS -EFIAPI +EFIAPI EfiConfigKeywordHandlerSetData ( IN EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL *This, IN CONST EFI_STRING KeywordString, @@ -2974,7 +2974,7 @@ EfiConfigKeywordHandlerSetData ( Status = EFI_ACCESS_DENIED; goto Done; } - + // // 9. Merge to the MultiKeywordResp string. // @@ -2991,7 +2991,7 @@ EfiConfigKeywordHandlerSetData ( FreePool (KeywordData); FreePool (ValueElement); NameSpace = NULL; - DevicePath = NULL; + DevicePath = NULL; KeywordData = NULL; ValueElement = NULL; if (ConfigResp != NULL) { @@ -3013,7 +3013,7 @@ EfiConfigKeywordHandlerSetData ( Status = EFI_DEVICE_ERROR; goto Done; } - + *ProgressErr = KEYWORD_HANDLER_NO_ERROR; Done: @@ -3049,56 +3049,56 @@ Done: /** - This function accepts a formatted string, finds the underlying + This function accepts a formatted string, finds the underlying keyword owners, creates a string from it and forwards it to the EFI_HII_ROUTING_PROTOCOL.ExtractConfig function. - + If there is an issue in resolving the contents of the KeywordString, then the function returns an EFI_INVALID_PARAMETER and also set the Progress and ProgressErr with the appropriate information about where the issue occurred and additional data about the nature of the issue. - + In the case when KeywordString is NULL, or contains multiple keywords, or when EFI_NOT_FOUND is generated while processing the keyword elements, the Results string - contains values returned for all keywords processed prior to the keyword generating the + contains values returned for all keywords processed prior to the keyword generating the error but no values for the keyword with error or any following keywords. - + @param This Pointer to the EFI_KEYWORD_HANDLER _PROTOCOL instance. - + @param NameSpaceId A null-terminated string containing the platform configuration language to search through in the system. If a NULL is passed in, then it is assumed that any platform configuration language with the prefix of "x-UEFI-" are searched. - + @param KeywordString A null-terminated string in format. If a - NULL is passed in the KeywordString field, all of the known - keywords in the system for the NameSpaceId specified are + NULL is passed in the KeywordString field, all of the known + keywords in the system for the NameSpaceId specified are returned in the Results field. - + @param Progress On return, points to a character in the KeywordString. Points - to the string's NULL terminator if the request was successful. + to the string's NULL terminator if the request was successful. Points to the most recent '&' before the first failing name / value pair (or the beginning of the string if the failure is in the first name / value pair) if the request was not successful. - + @param ProgressErr If during the processing of the KeywordString there was a - failure, this parameter gives additional information about the + failure, this parameter gives additional information about the possible source of the problem. See the definitions in SetData() for valid value definitions. - + @param Results A null-terminated string in format is returned - which has all the values filled in for the keywords in the + which has all the values filled in for the keywords in the KeywordString. This is a callee-allocated field, and must be freed - by the caller after being used. + by the caller after being used. @retval EFI_SUCCESS The specified action was completed successfully. - + @retval EFI_INVALID_PARAMETER One or more of the following are TRUE: 1.Progress, ProgressErr, or Results is NULL. 2.Parsing of the KeywordString resulted in an error. See Progress and ProgressErr for more data. - + @retval EFI_NOT_FOUND An element of the KeywordString was not found. See ProgressErr for more data. @@ -3108,7 +3108,7 @@ Done: @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated. See ProgressErr for more data. - + @retval EFI_ACCESS_DENIED The action violated system policy. See ProgressErr for more data. @@ -3117,12 +3117,12 @@ Done: **/ EFI_STATUS -EFIAPI +EFIAPI EfiConfigKeywordHandlerGetData ( IN EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL *This, IN CONST EFI_STRING NameSpaceId, OPTIONAL IN CONST EFI_STRING KeywordString, OPTIONAL - OUT EFI_STRING *Progress, + OUT EFI_STRING *Progress, OUT UINT32 *ProgressErr, OUT EFI_STRING *Results ) @@ -3132,7 +3132,7 @@ EfiConfigKeywordHandlerGetData ( EFI_DEVICE_PATH_PROTOCOL *DevicePath; HII_DATABASE_RECORD *DataBaseRecord; CHAR16 *StringPtr; - CHAR16 *NextStringPtr; + CHAR16 *NextStringPtr; CHAR16 *KeywordData; EFI_STRING_ID KeywordStringId; UINT8 *OpCode; @@ -3188,7 +3188,7 @@ EfiConfigKeywordHandlerGetData ( return EFI_INVALID_PARAMETER; } } - + if (KeywordString != NULL) { // // Use temp string to avoid changing input string buffer. @@ -3208,7 +3208,7 @@ EfiConfigKeywordHandlerGetData ( } StringPtr = NextStringPtr; - + // // 3. Process Keyword section from the input keywordRequest string. // @@ -3240,7 +3240,7 @@ EfiConfigKeywordHandlerGetData ( if (EFI_ERROR (Status)) { goto Done; } - + // // 3.4 Extract Value for the input keyword. // @@ -3293,7 +3293,7 @@ EfiConfigKeywordHandlerGetData ( FreePool (KeywordData); FreePool (ValueElement); FreePool (ConfigRequest); - DevicePath = NULL; + DevicePath = NULL; KeywordData = NULL; ValueElement = NULL; ConfigRequest = NULL; diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c index 646864f4df..c778cd92f8 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/ConfigRouting.c @@ -1,7 +1,7 @@ /** @file Implementation of interfaces function for EFI_HII_CONFIG_ROUTING_PROTOCOL. -Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -44,7 +44,7 @@ CalculateConfigStringLen ( // // The beginning of next / should be "&GUID=". // Will meet '\0' if there is only one /. - // + // TmpPtr = StrStr (String, L"&GUID="); if (TmpPtr == NULL) { return StrLen (String); @@ -117,7 +117,7 @@ GetDevicePath ( if (((Length + 1) / 2) < sizeof (EFI_DEVICE_PATH_PROTOCOL)) { return EFI_NOT_FOUND; } - + // // The data in is encoded as hex UNICODE %02x bytes in the same order // as the device path resides in RAM memory. @@ -127,7 +127,7 @@ GetDevicePath ( if (DevicePathBuffer == NULL) { return EFI_OUT_OF_RESOURCES; } - + // // Convert DevicePath // @@ -141,7 +141,7 @@ GetDevicePath ( DevicePathBuffer [Index/2] = (UINT8) ((DevicePathBuffer [Index/2] << 4) + DigitUint8); } } - + // // Validate DevicePath // @@ -208,10 +208,10 @@ HiiToLower ( @param BufferLen The length of the Buffer in bytes. - @param Buffer Points to a buffer which will be converted to be the + @param Buffer Points to a buffer which will be converted to be the content of the generated string. - @param Flag If 1, the buffer contains data for the value of GUID or PATH stored in + @param Flag If 1, the buffer contains data for the value of GUID or PATH stored in UINT8 *; if 2, the buffer contains unicode string for the value of NAME; if 3, the buffer contains other data. @@ -244,7 +244,7 @@ GenerateSubStr ( ASSERT (*SubStr != NULL); return; } - + // // Header + Data + '&' + '\0' // @@ -317,7 +317,7 @@ GenerateSubStr ( // // Convert the uppercase to lowercase since is defined in lowercase format. // - StrCatS (Str, Length, L"&"); + StrCatS (Str, Length, L"&"); HiiToLower (Str); *SubStr = Str; @@ -352,7 +352,7 @@ OutputConfigBody ( if (String == NULL || ConfigBody == NULL) { return EFI_INVALID_PARAMETER; } - + // // The setting information should start OFFSET, not ALTCFG. // @@ -506,7 +506,7 @@ GetValueOfNumber ( Status = EFI_OUT_OF_RESOURCES; goto Exit; } - + Length = *Len; ZeroMem (TemStr, sizeof (TemStr)); for (Index = 0; Index < Length; Index ++) { @@ -1010,10 +1010,10 @@ Exit: the missing AltCfgId in AltCfgResq. @param AltCfgResp Pointer to a null-terminated Unicode string in - format. The default value string - will be merged into it. + format. The default value string + will be merged into it. @param DefaultAltCfgResp Pointer to a null-terminated Unicode string in - format. The default value + format. The default value string may contain more than one ConfigAltResp string for the different varstore buffer. @@ -1036,17 +1036,17 @@ MergeDefaultString ( UINTN SizeAltCfgResp; UINTN MaxLen; UINTN TotalSize; - + if (*AltCfgResp == NULL) { return EFI_INVALID_PARAMETER; } - + // // Get the request ConfigHdr // SizeAltCfgResp = 0; StringPtr = *AltCfgResp; - + // // Find GUID=...&NAME=...&PATH=... // @@ -1081,18 +1081,18 @@ MergeDefaultString ( StrnCatS (AltConfigHdr, MaxLen, *AltCfgResp, HeaderLength); StrCatS (AltConfigHdr, MaxLen, L"&ALTCFG="); HeaderLength = StrLen (AltConfigHdr); - + StringPtrDefault = StrStr (DefaultAltCfgResp, AltConfigHdr); while (StringPtrDefault != NULL) { // // Get AltCfg Name // StrnCatS (AltConfigHdr, MaxLen, StringPtrDefault + HeaderLength, 4); - StringPtr = StrStr (*AltCfgResp, AltConfigHdr); - + StringPtr = StrStr (*AltCfgResp, AltConfigHdr); + // // Append the found default value string to the input AltCfgResp - // + // if (StringPtr == NULL) { StringPtrEnd = StrStr (StringPtrDefault + 1, L"&GUID"); SizeAltCfgResp = StrSize (*AltCfgResp); @@ -1136,16 +1136,16 @@ MergeDefaultString ( // CompareAndMergeDefaultString (AltCfgResp, DefaultAltCfgResp, AltConfigHdr); } - + // // Find next AltCfg String // *(AltConfigHdr + HeaderLength) = L'\0'; StringPtrDefault = StrStr (StringPtrDefault + 1, AltConfigHdr); } - + FreePool (AltConfigHdr); - return EFI_SUCCESS; + return EFI_SUCCESS; } /** @@ -1162,9 +1162,9 @@ InsertDefaultValue ( ) { LIST_ENTRY *Link; - IFR_DEFAULT_DATA *DefaultValueArray; + IFR_DEFAULT_DATA *DefaultValueArray; LIST_ENTRY *DefaultLink; - + DefaultLink = &BlockData->DefaultValueEntry; for (Link = DefaultLink->ForwardLink; Link != DefaultLink; Link = Link->ForwardLink) { @@ -1183,7 +1183,7 @@ InsertDefaultValue ( DefaultValueArray->Cleaned = DefaultValueData->Cleaned; } return; - } + } } // @@ -1200,7 +1200,7 @@ InsertDefaultValue ( @param BlockLink The list entry points to block array. @param BlockData The point to BlockData is added. - + **/ VOID InsertBlockData ( @@ -1245,26 +1245,26 @@ InsertBlockData ( } } else if (BlockArray->Offset > BlockSingleData->Offset) { // - // Insert new block data in the front of block array + // Insert new block data in the front of block array // InsertTailList (Link, &BlockSingleData->Entry); return; } } - + // // Add new block data into the tail. // - InsertTailList (Link, &BlockSingleData->Entry); + InsertTailList (Link, &BlockSingleData->Entry); } /** - Retrieves a pointer to the a Null-terminated ASCII string containing the list - of languages that an HII handle in the HII Database supports. The returned + Retrieves a pointer to the a Null-terminated ASCII string containing the list + of languages that an HII handle in the HII Database supports. The returned string is allocated using AllocatePool(). The caller is responsible for freeing the returned string using FreePool(). The format of the returned string follows the language format assumed the HII Database. - + If HiiHandle is NULL, then ASSERT(). @param[in] HiiHandle A handle that was previously registered in the HII Database. @@ -1295,8 +1295,8 @@ GetSupportedLanguages ( Status = mPrivate.HiiString.GetLanguages (&mPrivate.HiiString, HiiHandle, &TempSupportedLanguages, &LanguageSize); // - // If GetLanguages() returns EFI_SUCCESS for a zero size, - // then there are no supported languages registered for HiiHandle. If GetLanguages() + // If GetLanguages() returns EFI_SUCCESS for a zero size, + // then there are no supported languages registered for HiiHandle. If GetLanguages() // returns an error other than EFI_BUFFER_TOO_SMALL, then HiiHandle is not present // in the HII Database // @@ -1338,12 +1338,12 @@ GetSupportedLanguages ( /** Retrieves a string from a string package. - + If HiiHandle is NULL, then ASSERT(). If StringId is 0, then ASSET. @param[in] HiiHandle A handle that was previously registered in the HII Database. - @param[in] StringId The identifier of the string to retrieved from the string + @param[in] StringId The identifier of the string to retrieved from the string package associated with HiiHandle. @retval NULL The string specified by StringId is not present in the string package. @@ -1370,7 +1370,7 @@ InternalGetString ( // // Initialize all allocated buffers to NULL - // + // SupportedLanguages = NULL; PlatformLanguage = NULL; BestLanguage = NULL; @@ -1394,11 +1394,11 @@ InternalGetString ( // Get the best matching language from SupportedLanguages // BestLanguage = GetBestLanguage ( - SupportedLanguages, + SupportedLanguages, FALSE, // RFC 4646 mode - Language, // Highest priority + Language, // Highest priority PlatformLanguage != NULL ? PlatformLanguage : "", // Next highest priority - SupportedLanguages, // Lowest priority + SupportedLanguages, // Lowest priority NULL ); if (BestLanguage == NULL) { @@ -1419,8 +1419,8 @@ InternalGetString ( NULL ); // - // If GetString() returns EFI_SUCCESS for a zero size, - // then there are no supported languages registered for HiiHandle. If GetString() + // If GetString() returns EFI_SUCCESS for a zero size, + // then there are no supported languages registered for HiiHandle. If GetString() // returns an error other than EFI_BUFFER_TOO_SMALL, then HiiHandle is not present // in the HII Database // @@ -1479,12 +1479,12 @@ Error: /** This function checks VarOffset and VarWidth is in the block range. - @param RequestBlockArray The block array is to be checked. + @param RequestBlockArray The block array is to be checked. @param VarOffset Offset of var to the structure @param VarWidth Width of var. @param IsNameValueType Whether this varstore is name/value varstore or not. @param HiiHandle Hii handle for this hii package. - + @retval TRUE This Var is in the block range. @retval FALSE This Var is not in the block range. **/ @@ -1562,18 +1562,18 @@ GetFormPackageData ( // 0. Get Hii Form Package by HiiHandle // Status = ExportFormPackages ( - &mPrivate, - DataBaseRecord->Handle, - DataBaseRecord->PackageList, - 0, - Size, + &mPrivate, + DataBaseRecord->Handle, + DataBaseRecord->PackageList, + 0, + Size, HiiFormPackage, &ResultSize ); if (EFI_ERROR (Status)) { return Status; } - + (*HiiFormPackage) = AllocatePool (ResultSize); if (*HiiFormPackage == NULL) { Status = EFI_OUT_OF_RESOURCES; @@ -1586,18 +1586,18 @@ GetFormPackageData ( Size = ResultSize; ResultSize = 0; Status = ExportFormPackages ( - &mPrivate, - DataBaseRecord->Handle, - DataBaseRecord->PackageList, + &mPrivate, + DataBaseRecord->Handle, + DataBaseRecord->PackageList, 0, - Size, + Size, *HiiFormPackage, &ResultSize ); if (EFI_ERROR (Status)) { FreePool (*HiiFormPackage); } - + *PackageSize = Size; return Status; @@ -1612,7 +1612,7 @@ GetFormPackageData ( the first found varstore will be as ConfigHdr. @param IsEfiVarstore Whether the request storage type is efi varstore type. @param EfiVarStore The efi varstore info which will return. -**/ +**/ EFI_STATUS GetVarStoreType ( IN HII_DATABASE_RECORD *DataBaseRecord, @@ -1630,12 +1630,12 @@ GetVarStoreType ( EFI_STRING GuidStr; EFI_STRING NameStr; EFI_STRING TempStr; - UINTN LengthString; + UINTN LengthString; UINT8 *HiiFormPackage; UINTN PackageSize; EFI_IFR_VARSTORE_EFI *IfrEfiVarStore; EFI_HII_PACKAGE_HEADER *PackageHeader; - + HiiFormPackage = NULL; LengthString = 0; Status = EFI_SUCCESS; @@ -1673,8 +1673,8 @@ GetVarStoreType ( if (IfrOpHdr->OpCode == EFI_IFR_VARSTORE_EFI_OP ) { IfrEfiVarStore = (EFI_IFR_VARSTORE_EFI *) IfrOpHdr; // - // If the length is small than the structure, this is from old efi - // varstore definition. Old efi varstore get config directly from + // If the length is small than the structure, this is from old efi + // varstore definition. Old efi varstore get config directly from // GetVariable function. // if (IfrOpHdr->Length < sizeof (EFI_IFR_VARSTORE_EFI)) { @@ -1715,8 +1715,8 @@ GetVarStoreType ( } *IsEfiVarstore = TRUE; CopyMem (*EfiVarStore, IfrEfiVarStore, IfrOpHdr->Length); - } - + } + // // Free allocated temp string. // @@ -1778,7 +1778,7 @@ GetElementsFromRequest ( @retval TRUE This varstore is the request one. @retval FALSE This varstore is not the request one. - + **/ BOOLEAN IsThisVarstore ( @@ -1826,7 +1826,7 @@ IsThisVarstore ( Done: if (GuidStr != NULL) { - FreePool (GuidStr); + FreePool (GuidStr); } if (NameStr != NULL) { @@ -1848,7 +1848,7 @@ Done: the first found varstore will be as ConfigHdr. @retval TRUE This hii package is the request one. @retval FALSE This hii package is not the request one. -**/ +**/ BOOLEAN IsThisPackageList ( IN HII_DATABASE_RECORD *DataBaseRecord, @@ -1901,7 +1901,7 @@ IsThisPackageList ( PackageOffset += IfrOpHdr->Length; switch (IfrOpHdr->OpCode) { - + case EFI_IFR_VARSTORE_OP: IfrVarStore = (EFI_IFR_VARSTORE *) IfrOpHdr; @@ -1947,7 +1947,7 @@ IsThisPackageList ( goto Done; } break; - + case EFI_IFR_FORM_OP: case EFI_IFR_FORM_MAP_OP: // @@ -1985,7 +1985,7 @@ Done: @retval EFI_SUCCESS This opcode is required. @retval EFI_NOT_FOUND This opcode is not required. @retval Others Contain some error. - + **/ EFI_STATUS IsThisOpcodeRequired ( @@ -2042,7 +2042,7 @@ IsThisOpcodeRequired ( BitWidth = VarWidth; BitOffset = VarOffset * 8; } - + // // Check whether this question is in requested block array. // @@ -2054,7 +2054,7 @@ IsThisOpcodeRequired ( } // - // Check this var question is in the var storage + // Check this var question is in the var storage // if (((VarOffset + VarWidth) > VarStorageData->Size)) { return EFI_INVALID_PARAMETER; @@ -2104,7 +2104,7 @@ IsThisOpcodeRequired ( @retval EFI_SUCCESS The block array and the default value array are got. @retval EFI_INVALID_PARAMETER The varstore definition in the different form packages - are conflicted. + are conflicted. @retval EFI_OUT_OF_RESOURCES No enough memory. **/ EFI_STATUS @@ -2239,10 +2239,10 @@ ParseIfrData ( IfrEfiVarStore = (EFI_IFR_VARSTORE_EFI *) IfrOpHdr; // - // If the length is small than the structure, this is from old efi - // varstore definition. Old efi varstore get config directly from + // If the length is small than the structure, this is from old efi + // varstore definition. Old efi varstore get config directly from // GetVariable function. - // + // if (IfrOpHdr->Length < sizeof (EFI_IFR_VARSTORE_EFI)) { break; } @@ -2317,7 +2317,7 @@ ParseIfrData ( case EFI_IFR_REF_OP: // - // Ref question is not in IFR Form. This IFR form is not valid. + // Ref question is not in IFR Form. This IFR form is not valid. // if ( VarStoreId == 0) { Status = EFI_INVALID_PARAMETER; @@ -2358,7 +2358,7 @@ ParseIfrData ( // // - // Numeric and OneOf question is not in IFR Form. This IFR form is not valid. + // Numeric and OneOf question is not in IFR Form. This IFR form is not valid. // if (VarStoreId == 0) { Status = EFI_INVALID_PARAMETER; @@ -2408,7 +2408,7 @@ ParseIfrData ( FirstOneOfOption = TRUE; } else if (IfrOpHdr->OpCode == EFI_IFR_NUMERIC_OP) { // - // Numeric minimum value will be used as default value when no default is specified. + // Numeric minimum value will be used as default value when no default is specified. // DefaultData.Type = DefaultValueFromDefault; if (QuestionReferBitField) { @@ -2441,7 +2441,7 @@ ParseIfrData ( } // // Set default value base on the DefaultId list get from IFR data. - // + // for (LinkData = DefaultIdArray->Entry.ForwardLink; LinkData != &DefaultIdArray->Entry; LinkData = LinkData->ForwardLink) { DefaultDataPtr = BASE_CR (LinkData, IFR_DEFAULT_DATA, Entry); DefaultData.DefaultId = DefaultDataPtr->DefaultId; @@ -2458,7 +2458,7 @@ ParseIfrData ( FirstOrderedList = TRUE; // - // OrderedList question is not in IFR Form. This IFR form is not valid. + // OrderedList question is not in IFR Form. This IFR form is not valid. // if (VarStoreId == 0) { Status = EFI_INVALID_PARAMETER; @@ -2501,10 +2501,10 @@ ParseIfrData ( // default id by CheckBox Flags if CheckBox flags (Default or Mau) is set, the default value is 1 to be set. // value by DefaultOption // default id by DeaultOption DefaultId can override CheckBox Flags and Default value. - // + // // - // CheckBox question is not in IFR Form. This IFR form is not valid. + // CheckBox question is not in IFR Form. This IFR form is not valid. // if (VarStoreId == 0) { Status = EFI_INVALID_PARAMETER; @@ -2651,7 +2651,7 @@ ParseIfrData ( // // - // Date question is not in IFR Form. This IFR form is not valid. + // Date question is not in IFR Form. This IFR form is not valid. // if (VarStoreId == 0) { Status = EFI_INVALID_PARAMETER; @@ -2693,7 +2693,7 @@ ParseIfrData ( // // - // Time question is not in IFR Form. This IFR form is not valid. + // Time question is not in IFR Form. This IFR form is not valid. // if (VarStoreId == 0) { Status = EFI_INVALID_PARAMETER; @@ -2735,7 +2735,7 @@ ParseIfrData ( // // - // String question is not in IFR Form. This IFR form is not valid. + // String question is not in IFR Form. This IFR form is not valid. // if (VarStoreId == 0) { Status = EFI_INVALID_PARAMETER; @@ -2777,7 +2777,7 @@ ParseIfrData ( // // - // Password question is not in IFR Form. This IFR form is not valid. + // Password question is not in IFR Form. This IFR form is not valid. // if (VarStoreId == 0) { Status = EFI_INVALID_PARAMETER; @@ -2872,7 +2872,7 @@ ParseIfrData ( break; } // - // Check this var question is in the var storage + // Check this var question is in the var storage // if ((BlockData->Name == NULL) && ((BlockData->Offset + BlockData->Width) > VarStorageData->Size)) { Status = EFI_INVALID_PARAMETER; @@ -2899,13 +2899,13 @@ ParseIfrData ( if (((IfrOneOfOption->Flags & EFI_IFR_OPTION_DEFAULT) == EFI_IFR_OPTION_DEFAULT) || ((IfrOneOfOption->Flags & EFI_IFR_OPTION_DEFAULT_MFG) == EFI_IFR_OPTION_DEFAULT_MFG)) { // - // This flag is used to specify whether this option is the first. Set it to FALSE for the following options. - // The first oneof option value will be used as default value when no default value is specified. + // This flag is used to specify whether this option is the first. Set it to FALSE for the following options. + // The first oneof option value will be used as default value when no default value is specified. // FirstOneOfOption = FALSE; SmallestIdFromFlag = FALSE; - + // Prepare new DefaultValue // DefaultData.Type = DefaultValueFromFlag; @@ -2951,19 +2951,19 @@ ParseIfrData ( // // 2. Set as the default value when this is the first option. - // The first oneof option value will be used as default value when no default value is specified. + // The first oneof option value will be used as default value when no default value is specified. // if (FirstOneOfOption) { - // This flag is used to specify whether this option is the first. Set it to FALSE for the following options. + // This flag is used to specify whether this option is the first. Set it to FALSE for the following options. FirstOneOfOption = FALSE; - + // // Prepare new DefaultValue - // + // DefaultData.Type = DefaultValueFromDefault; CopyMem (&DefaultData.Value, &IfrOneOfOption->Value, IfrOneOfOption->Header.Length - OFFSET_OF (EFI_IFR_ONE_OF_OPTION, Value)); for (LinkData = DefaultIdArray->Entry.ForwardLink; LinkData != &DefaultIdArray->Entry; LinkData = LinkData->ForwardLink) { - DefaultDataPtr = BASE_CR (LinkData, IFR_DEFAULT_DATA, Entry); + DefaultDataPtr = BASE_CR (LinkData, IFR_DEFAULT_DATA, Entry); DefaultData.DefaultId = DefaultDataPtr->DefaultId; InsertDefaultValue (BlockData, &DefaultData); } @@ -3194,7 +3194,7 @@ GetBlockElement ( if (*StringPtr != 0 && *StringPtr != L'&') { goto Done; } - + // // Set Block Data // @@ -3226,7 +3226,7 @@ GetBlockElement ( } } // - // If '\0', parsing is finished. + // If '\0', parsing is finished. // if (*StringPtr == 0) { break; @@ -3343,7 +3343,7 @@ GetNameElement ( if (HasValue) { // // If has value, skip the value. - // + // StringPtr = NextTag + 1; *NextTag = L'='; StringPtr = StrStr (StringPtr, L"&"); @@ -3408,14 +3408,14 @@ GenerateConfigRequest ( // Append VarStorageData BlockEntry into *Request string // Now support only one varstore in a form package. // - + // // Go through all VarStorageData Entry and get BlockEntry for each one for the multiple varstore in a single form package // Then construct them all to return MultiRequest string : ConfigHdr BlockConfig // - + // - // Compute the length of the entire request starting with and a + // Compute the length of the entire request starting with and a // Null-terminator // DataExist = FALSE; @@ -3428,7 +3428,7 @@ GenerateConfigRequest ( // // Add length for each Name // - // ::= &Name1&Name2&... + // ::= &Name1&Name2&... // |1| StrLen(Name1) // Length = Length + (1 + StrLen (BlockData->Name)); @@ -3486,10 +3486,10 @@ GenerateConfigRequest ( // Append &OFFSET=XXXX&WIDTH=YYYY\0 // UnicodeSPrint ( - StringPtr, - (8 + 4 + 7 + 4 + 1) * sizeof (CHAR16), - L"&OFFSET=%04X&WIDTH=%04X", - BlockData->Offset, + StringPtr, + (8 + 4 + 7 + 4 + 1) * sizeof (CHAR16), + L"&OFFSET=%04X&WIDTH=%04X", + BlockData->Offset, BlockData->Width ); } @@ -3897,7 +3897,7 @@ GenerateAltConfigResp ( // |1| StrLen (ConfigHdr) | 8 | 4 | // Length += (1 + StrLen (ConfigHdr) + 8 + 4); - + for (LinkData = VarStorageData->BlockEntry.ForwardLink; LinkData != &VarStorageData->BlockEntry; LinkData = LinkData->ForwardLink) { BlockData = BASE_CR (LinkData, IFR_BLOCK_DATA, Entry); ListEntry = &BlockData->DefaultValueEntry; @@ -3923,7 +3923,7 @@ GenerateAltConfigResp ( } } } - + // // No default value is found. The default string doesn't exist. // @@ -3953,10 +3953,10 @@ GenerateAltConfigResp ( // |1| StrLen (ConfigHdr) | 8 | 4 | // UnicodeSPrint ( - StringPtr, - (1 + StrLen (ConfigHdr) + 8 + 4 + 1) * sizeof (CHAR16), - L"&%s&ALTCFG=%04X", - ConfigHdr, + StringPtr, + (1 + StrLen (ConfigHdr) + 8 + 4 + 1) * sizeof (CHAR16), + L"&%s&ALTCFG=%04X", + ConfigHdr, DefaultId->DefaultId ); StringPtr += StrLen (StringPtr); @@ -3971,9 +3971,9 @@ GenerateAltConfigResp ( } if (VarStorageData->Type == EFI_HII_VARSTORE_NAME_VALUE) { UnicodeSPrint ( - StringPtr, - (1 + StrLen (ConfigHdr) + 1) * sizeof (CHAR16), - L"&%s=", + StringPtr, + (1 + StrLen (ConfigHdr) + 1) * sizeof (CHAR16), + L"&%s=", BlockData->Name ); StringPtr += StrLen (StringPtr); @@ -3983,10 +3983,10 @@ GenerateAltConfigResp ( // ::= 'OFFSET='&'WIDTH='&'VALUE'= // UnicodeSPrint ( - StringPtr, + StringPtr, (8 + 4 + 7 + 4 + 7 + 1) * sizeof (CHAR16), - L"&OFFSET=%04X&WIDTH=%04X&VALUE=", - BlockData->Offset, + L"&OFFSET=%04X&WIDTH=%04X&VALUE=", + BlockData->Offset, BlockData->Width ); StringPtr += StrLen (StringPtr); @@ -4038,32 +4038,32 @@ GenerateAltConfigResp ( } /** - This function gets the full request string and full default value string by - parsing IFR data in HII form packages. - - When Request points to NULL string, the request string and default value string - for each varstore in form package will return. + This function gets the full request string and full default value string by + parsing IFR data in HII form packages. + + When Request points to NULL string, the request string and default value string + for each varstore in form package will return. @param DataBaseRecord The DataBaseRecord instance contains the found Hii handle and package. @param DevicePath Device Path which Hii Config Access Protocol is registered. @param Request Pointer to a null-terminated Unicode string in format. When it doesn't contain - any RequestElement, it will be updated to return + any RequestElement, it will be updated to return the full RequestElement retrieved from IFR data. If it points to NULL, the request string for the first varstore in form package will be merged into a - format string and return. + format string and return. @param AltCfgResp Pointer to a null-terminated Unicode string in format. When the pointer is to NULL, the full default value string retrieved from IFR data will return. When the pinter is to a string, the full default value string retrieved from IFR data will be merged into the input string and return. - When Request points to NULL, the default value string - for each varstore in form package will be merged into + When Request points to NULL, the default value string + for each varstore in form package will be merged into a format string and return. @param PointerProgress Optional parameter, it can be NULL. - When it is not NULL, if Request is NULL, it returns NULL. + When it is not NULL, if Request is NULL, it returns NULL. On return, points to a character in the Request string. Points to the string's null terminator if request was successful. Points to the most recent @@ -4074,7 +4074,7 @@ GenerateAltConfigResp ( @retval EFI_SUCCESS The Results string is set to the full request string. And AltCfgResp contains all default value string. @retval EFI_OUT_OF_RESOURCES Not enough memory for the return string. - @retval EFI_NOT_FOUND The varstore (Guid and Name) in Request string + @retval EFI_NOT_FOUND The varstore (Guid and Name) in Request string can't be found in Form package. @retval EFI_NOT_FOUND HiiPackage can't be got on the input HiiHandle. @retval EFI_INVALID_PARAMETER Request points to NULL. @@ -4321,7 +4321,7 @@ Done: } // - // Free the allocated string + // Free the allocated string // if (ConfigHdr != NULL) { FreePool (ConfigHdr); @@ -4348,13 +4348,13 @@ Done: } /** - This function gets the full request resp string by + This function gets the full request resp string by parsing IFR data in HII form packages. @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL instance. - @param EfiVarStoreInfo The efi varstore info which is save in the EFI - varstore data structure. + @param EfiVarStoreInfo The efi varstore info which is save in the EFI + varstore data structure. @param Request Pointer to a null-terminated Unicode string in format. @param RequestResp Pointer to a null-terminated Unicode string in @@ -4376,7 +4376,7 @@ Done: EFI_STATUS GetConfigRespFromEfiVarStore ( IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This, - IN EFI_IFR_VARSTORE_EFI *EfiVarStoreInfo, + IN EFI_IFR_VARSTORE_EFI *EfiVarStoreInfo, IN EFI_STRING Request, OUT EFI_STRING *RequestResp, OUT EFI_STRING *AccessProgress @@ -4401,8 +4401,8 @@ GetConfigRespFromEfiVarStore ( goto Done; } AsciiStrToUnicodeStrS ((CHAR8 *) EfiVarStoreInfo->Name, VarStoreName, NameSize); - - + + Status = gRT->GetVariable (VarStoreName, &EfiVarStoreInfo->Guid, NULL, &BufferSize, NULL); if (Status != EFI_BUFFER_TOO_SMALL) { goto Done; @@ -4434,17 +4434,17 @@ Done: /** - This function route the full request resp string for efi varstore. + This function route the full request resp string for efi varstore. @param This A pointer to the EFI_HII_CONFIG_ROUTING_PROTOCOL instance. - @param EfiVarStoreInfo The efi varstore info which is save in the EFI - varstore data structure. + @param EfiVarStoreInfo The efi varstore info which is save in the EFI + varstore data structure. @param RequestResp Pointer to a null-terminated Unicode string in format. @param Result Pointer to a null-terminated Unicode string in format. - + @retval EFI_SUCCESS The Results string is set to the full request string. And AltCfgResp contains all default value string. @retval EFI_OUT_OF_RESOURCES Not enough memory for the return string. @@ -4454,7 +4454,7 @@ Done: EFI_STATUS RouteConfigRespForEfiVarStore ( IN CONST EFI_HII_CONFIG_ROUTING_PROTOCOL *This, - IN EFI_IFR_VARSTORE_EFI *EfiVarStoreInfo, + IN EFI_IFR_VARSTORE_EFI *EfiVarStoreInfo, IN EFI_STRING RequestResp, OUT EFI_STRING *Result ) @@ -4479,7 +4479,7 @@ RouteConfigRespForEfiVarStore ( goto Done; } AsciiStrToUnicodeStrS ((CHAR8 *) EfiVarStoreInfo->Name, VarStoreName, NameSize); - + Status = gRT->GetVariable (VarStoreName, &EfiVarStoreInfo->Guid, NULL, &BufferSize, NULL); if (Status != EFI_BUFFER_TOO_SMALL) { DEBUG ((DEBUG_ERROR, "The variable does not exist!")); @@ -4520,7 +4520,7 @@ Done: /** Validate the config request elements. - @param ConfigElements A null-terminated Unicode string in format, + @param ConfigElements A null-terminated Unicode string in format, without configHdr field. @retval CHAR16 * THE first Name/value pair not correct. @@ -4563,7 +4563,7 @@ OffsetWidthValidate ( /** Validate the config request elements. - @param ConfigElements A null-terminated Unicode string in format, + @param ConfigElements A null-terminated Unicode string in format, without configHdr field. @retval CHAR16 * THE first Name/value pair not correct. @@ -4588,7 +4588,7 @@ NameValueValidate ( StringPtr += 1; StringPtr = StrStr (StringPtr, L"&"); - + if (StringPtr == NULL) { return NULL; } @@ -4696,7 +4696,7 @@ ConfigRequestValidate ( @retval EFI_INVALID_PARAMETER Illegal syntax. Progress set to most recent & before the error or the beginning of the string. @retval EFI_INVALID_PARAMETER The ExtractConfig function of the underlying HII - Configuration Access Protocol returned + Configuration Access Protocol returned EFI_INVALID_PARAMETER. Progress set to most recent & before the error or the beginning of the string. @@ -4833,7 +4833,7 @@ HiiConfigRoutingExtractConfig ( } } } - + // // Try to find driver handle by device path. // @@ -4871,7 +4871,7 @@ HiiConfigRoutingExtractConfig ( IfrDataParsedFlag = FALSE; if ((HiiHandle != NULL) && !GetElementsFromRequest(ConfigRequest)) { // - // Get the full request string from IFR when HiiPackage is registered to HiiHandle + // Get the full request string from IFR when HiiPackage is registered to HiiHandle // IfrDataParsedFlag = TRUE; Status = GetFullStringFromHiiFormPackages (Database, DevicePath, &ConfigRequest, &DefaultResults, &AccessProgress); @@ -4900,7 +4900,7 @@ HiiConfigRoutingExtractConfig ( if (EFI_ERROR (Status)) { goto Done; } - + if (IsEfiVarStore) { // // Call the GetVariable function to extract settings. @@ -4999,7 +4999,7 @@ HiiConfigRoutingExtractConfig ( ASSERT (*AccessProgress == 0); // - // Update AccessResults by getting default setting from IFR when HiiPackage is registered to HiiHandle + // Update AccessResults by getting default setting from IFR when HiiPackage is registered to HiiHandle // if (!IfrDataParsedFlag && HiiHandle != NULL) { Status = GetFullStringFromHiiFormPackages (Database, DevicePath, &ConfigRequest, &DefaultResults, NULL); @@ -5015,13 +5015,13 @@ HiiConfigRoutingExtractConfig ( FreePool (DefaultResults); DefaultResults = NULL; } - + NextConfigString: if (!FirstElement) { Status = AppendToMultiString (Results, L"&"); ASSERT_EFI_ERROR (Status); } - + Status = AppendToMultiString (Results, AccessResults); ASSERT_EFI_ERROR (Status); @@ -5049,22 +5049,22 @@ Done: FreePool (*Results); *Results = NULL; } - + if (ConfigRequest != NULL) { FreePool (ConfigRequest); } - + if (AccessResults != NULL) { FreePool (AccessResults); } - + if (DefaultResults != NULL) { FreePool (DefaultResults); } - + if (DevicePath != NULL) { FreePool (DevicePath); - } + } return Status; } @@ -5079,8 +5079,8 @@ Done: instance. @param Results Null-terminated Unicode string in format which has all values - filled in for the entirety of the current HII - database. String to be allocated by the called + filled in for the entirety of the current HII + database. String to be allocated by the called function. De-allocation is up to the caller. @retval EFI_SUCCESS The Results string is filled with the values @@ -5196,7 +5196,7 @@ HiiConfigRoutingExportConfig ( ); if (EFI_ERROR (Status)) { // - // Update AccessResults by getting default setting from IFR when HiiPackage is registered to HiiHandle + // Update AccessResults by getting default setting from IFR when HiiPackage is registered to HiiHandle // if (HiiHandle != NULL && DevicePath != NULL) { IfrDataParsedFlag = TRUE; @@ -5220,7 +5220,7 @@ HiiConfigRoutingExportConfig ( if (!EFI_ERROR (Status)) { // - // Update AccessResults by getting default setting from IFR when HiiPackage is registered to HiiHandle + // Update AccessResults by getting default setting from IFR when HiiPackage is registered to HiiHandle // if (!IfrDataParsedFlag && HiiHandle != NULL && DevicePath != NULL) { StringPtr = StrStr (AccessResults, L"&GUID="); @@ -5244,7 +5244,7 @@ HiiConfigRoutingExportConfig ( FreePool (DefaultResults); DefaultResults = NULL; } - + // // Attach this to a . There is a '&' // which separates the first and the following ones. @@ -5253,19 +5253,19 @@ HiiConfigRoutingExportConfig ( Status = AppendToMultiString (Results, L"&"); ASSERT_EFI_ERROR (Status); } - + Status = AppendToMultiString (Results, AccessResults); ASSERT_EFI_ERROR (Status); FirstElement = FALSE; - + FreePool (AccessResults); AccessResults = NULL; } } FreePool (ConfigAccessHandles); - return EFI_SUCCESS; + return EFI_SUCCESS; } @@ -5433,7 +5433,7 @@ HiiConfigRoutingRouteConfig ( if (IsEfiVarstore) { // // Call the SetVariable function to route settings. - // + // Status = RouteConfigRespForEfiVarStore(This, EfiVarStoreInfo, ConfigResp, &AccessProgress); FreePool (EfiVarStoreInfo); } else { @@ -5705,7 +5705,7 @@ HiiBlockToConfig ( Status = EFI_OUT_OF_RESOURCES; goto Exit; } - + TemString = ValueStr; TemBuffer = Value + Width - 1; for (Index = 0; Index < Width; Index ++, TemBuffer --) { @@ -5762,7 +5762,7 @@ HiiBlockToConfig ( Status = EFI_INVALID_PARAMETER; goto Exit; } - + HiiToLower (*Config); *Progress = StringPtr; return EFI_SUCCESS; @@ -5827,7 +5827,7 @@ Exit: value pair. Block is left updated and Progress points at the '&' preceding the first non-. - @retval EFI_BUFFER_TOO_SMALL Block not large enough. Progress undefined. + @retval EFI_BUFFER_TOO_SMALL Block not large enough. Progress undefined. BlockSize is updated with the required buffer size. @retval EFI_NOT_FOUND Target for the specified routing data was not found. Progress points to the "G" in "GUID" of the errant @@ -5993,7 +5993,7 @@ HiiConfigToBlock ( break; } } - + // // The input string is not ConfigResp format, return error. // @@ -6128,10 +6128,10 @@ HiiGetAltCfg ( &PathStr ); if (AltCfgId != NULL) { - GenerateSubStr (L"ALTCFG=", sizeof (UINT16), (VOID *) AltCfgId, 3, &AltIdStr); + GenerateSubStr (L"ALTCFG=", sizeof (UINT16), (VOID *) AltCfgId, 3, &AltIdStr); } if (Name != NULL) { - GenerateSubStr (L"NAME=", StrLen (Name) * sizeof (CHAR16), (VOID *) Name, 2, &NameStr); + GenerateSubStr (L"NAME=", StrLen (Name) * sizeof (CHAR16), (VOID *) Name, 2, &NameStr); } else { GenerateSubStr (L"NAME=", 0, NULL, 2, &NameStr); } diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c b/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c index e8f4564e64..45448c5198 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Database.c @@ -1,7 +1,7 @@ /** @file Implementation for EFI_HII_DATABASE_PROTOCOL. -Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -1431,7 +1431,7 @@ Error: /** Adjust all string packages in a single package list to have the same max string ID. - + @param PackageList Pointer to a package list which will be adjusted. @retval EFI_SUCCESS Adjust all string packages successfully. @@ -3154,7 +3154,7 @@ AddPackages ( PackageHdrPtr = (EFI_HII_PACKAGE_HEADER *) ((UINT8 *) PackageHdrPtr + PackageHeader.Length); CopyMem (&PackageHeader, PackageHdrPtr, sizeof (EFI_HII_PACKAGE_HEADER)); } - + // // Adjust String Package to make sure all string packages have the same max string ID. // @@ -3520,7 +3520,7 @@ HiiNewPackageList ( DatabaseRecord = CR (Link, HII_DATABASE_RECORD, DatabaseEntry, HII_DATABASE_RECORD_SIGNATURE); if (CompareGuid ( &(DatabaseRecord->PackageList->PackageListHdr.PackageListGuid), - &PackageListGuid) && + &PackageListGuid) && DatabaseRecord->DriverHandle == DriverHandle) { return EFI_INVALID_PARAMETER; } @@ -3992,7 +3992,7 @@ HiiListPackageLists ( @retval EFI_NOT_FOUND The specified Handle could not be found in the current database. @retval EFI_INVALID_PARAMETER BufferSize was NULL. - @retval EFI_INVALID_PARAMETER The value referenced by BufferSize was not zero + @retval EFI_INVALID_PARAMETER The value referenced by BufferSize was not zero and Buffer was NULL. **/ diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c b/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c index b85cf88f54..4840933f29 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Font.c @@ -2,7 +2,7 @@ Implementation for EFI_HII_FONT_PROTOCOL. -Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -304,14 +304,14 @@ NarrowGlyphToBlt ( Height = EFI_GLYPH_HEIGHT; Width = EFI_GLYPH_WIDTH; - + // // Move position to the left-top corner of char. // Buffer = *Origin - EFI_GLYPH_HEIGHT * ImageWidth; // - // Char may be partially displayed when CLIP_X or CLIP_Y is not set. + // Char may be partially displayed when CLIP_X or CLIP_Y is not set. // if (RowHeight < Height) { Height = (UINT8) RowHeight; @@ -685,7 +685,7 @@ FindGlyphBlock ( ASSERT (FontPackage->Signature == HII_FONT_PACKAGE_SIGNATURE); BaseLine = 0; MinOffsetY = 0; - + if (CharValue == (CHAR16) (-1)) { // // Collect the cell information specified in font package fixed header. @@ -1099,8 +1099,8 @@ IsSystemFontInfo ( } if ((StringInfo->FontInfoMask & EFI_FONT_INFO_SYS_FORE_COLOR) == 0) { if (CompareMem ( - &StringInfo->ForegroundColor, - &SystemDefault->ForegroundColor, + &StringInfo->ForegroundColor, + &SystemDefault->ForegroundColor, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) ) != 0) { goto Exit; @@ -1108,8 +1108,8 @@ IsSystemFontInfo ( } if ((StringInfo->FontInfoMask & EFI_FONT_INFO_SYS_BACK_COLOR) == 0) { if (CompareMem ( - &StringInfo->BackgroundColor, - &SystemDefault->BackgroundColor, + &StringInfo->BackgroundColor, + &SystemDefault->BackgroundColor, sizeof (EFI_GRAPHICS_OUTPUT_BLT_PIXEL) ) != 0) { goto Exit; @@ -1745,7 +1745,7 @@ HiiStringToImage ( goto Exit; } } - + // // Use the maximum height of font as the base line. // And, use the maximum height as line height. @@ -1753,7 +1753,7 @@ HiiStringToImage ( LineHeight = Height; LastLineHeight = Height; BaseLineOffset = Height - BaseLine; - + // // Parse the string to be displayed to drop some ignored characters. // @@ -1799,7 +1799,7 @@ HiiStringToImage ( Index++; continue; } - + Status = GetGlyphBuffer (Private, *StringPtr, FontInfo, &GlyphBuf[Index], &Cell[Index], &Attributes[Index]); if (Status == EFI_NOT_FOUND) { if ((Flags & EFI_HII_IGNORE_IF_NO_GLYPH) == EFI_HII_IGNORE_IF_NO_GLYPH) { @@ -1971,8 +1971,8 @@ HiiStringToImage ( // opportunity prior to a character whose right-most extent would exceed Width. // Search the right-most line-break opportunity here. // - if ((Flags & EFI_HII_OUT_FLAG_WRAP) == EFI_HII_OUT_FLAG_WRAP && - (RowInfo[RowIndex].LineWidth + BltX > Image->Width || StringPtr[NextIndex] != 0) && + if ((Flags & EFI_HII_OUT_FLAG_WRAP) == EFI_HII_OUT_FLAG_WRAP && + (RowInfo[RowIndex].LineWidth + BltX > Image->Width || StringPtr[NextIndex] != 0) && !LineBreak) { if ((Flags & EFI_HII_IGNORE_LINE_BREAK) == 0) { LineWidth = RowInfo[RowIndex].LineWidth; @@ -2040,7 +2040,7 @@ HiiStringToImage ( } } } - + // // LineWidth can't exceed Image width. // @@ -2091,7 +2091,7 @@ HiiStringToImage ( ); } if (ColumnInfoArray != NULL) { - if ((GlyphBuf[Index1] == NULL && Cell[Index1].AdvanceX == 0) + if ((GlyphBuf[Index1] == NULL && Cell[Index1].AdvanceX == 0) || RowInfo[RowIndex].LineWidth == 0) { *ColumnInfoArray = (UINTN) ~0; } else { @@ -2119,7 +2119,7 @@ HiiStringToImage ( FreePool (BltBuffer); goto Exit; } - + FreePool (BltBuffer); } } else { @@ -2151,7 +2151,7 @@ HiiStringToImage ( ); } if (ColumnInfoArray != NULL) { - if ((GlyphBuf[Index1] == NULL && Cell[Index1].AdvanceX == 0) + if ((GlyphBuf[Index1] == NULL && Cell[Index1].AdvanceX == 0) || RowInfo[RowIndex].LineWidth == 0) { *ColumnInfoArray = (UINTN) ~0; } else { @@ -2392,7 +2392,7 @@ HiiStringIdToImage ( if (EFI_ERROR (Status)) { goto Exit; } - + if (Language == NULL) { Language = ""; } @@ -2409,7 +2409,7 @@ HiiStringIdToImage ( Status = EFI_NOT_FOUND; goto Exit; } - + StringSize = MAX_STRING_LENGTH; String = (EFI_STRING) AllocateZeroPool (StringSize); if (String == NULL) { @@ -2447,33 +2447,33 @@ HiiStringIdToImage ( if (EFI_ERROR (Status)) { goto Exit; } - + // // When StringInfo specifies that string will be output in the system default font and color, - // use particular stringfontinfo described in string package instead if exists. + // use particular stringfontinfo described in string package instead if exists. // StringFontInfo equals NULL means system default font attaches with the string block. // if (StringFontInfo != NULL && IsSystemFontInfo (Private, (EFI_FONT_DISPLAY_INFO *) StringInfo, NULL, NULL)) { NameSize = StrSize (StringFontInfo->FontName); FontLen = sizeof (EFI_FONT_DISPLAY_INFO) - sizeof (CHAR16) + NameSize; NewStringInfo = AllocateZeroPool (FontLen); - if (NewStringInfo == NULL) { + if (NewStringInfo == NULL) { Status = EFI_OUT_OF_RESOURCES; goto Exit; } NewStringInfo->FontInfoMask = EFI_FONT_INFO_SYS_FORE_COLOR | EFI_FONT_INFO_SYS_BACK_COLOR; NewStringInfo->FontInfo.FontStyle = StringFontInfo->FontStyle; - NewStringInfo->FontInfo.FontSize = StringFontInfo->FontSize; + NewStringInfo->FontInfo.FontSize = StringFontInfo->FontSize; StrCpyS (NewStringInfo->FontInfo.FontName, NameSize / sizeof (CHAR16), StringFontInfo->FontName); - + Status = HiiStringToImage ( - This, - Flags, - String, - NewStringInfo, - Blt, - BltX, - BltY, + This, + Flags, + String, + NewStringInfo, + Blt, + BltX, + BltY, RowInfoArray, RowInfoArraySize, ColumnInfoArray @@ -2640,7 +2640,7 @@ HiiGetGlyph ( // BaseLine = (UINT16) (Cell.Height + Cell.OffsetY); // - // Set BltBuffer to the position of Origin. + // Set BltBuffer to the position of Origin. // BltBuffer = Image->Image.Bitmap + (Cell.Height + Cell.OffsetY) * Image->Width - Cell.OffsetX; GlyphToImage ( @@ -2715,7 +2715,7 @@ Exit: @param StringInfoOut Upon return, contains the matching font's information. If NULL, then no information is returned. This buffer is allocated with a call to the Boot Service AllocatePool(). - It is the caller's responsibility to call the Boot + It is the caller's responsibility to call the Boot Service FreePool() when the caller no longer requires the contents of StringInfoOut. @param String Points to the string which will be tested to @@ -2800,7 +2800,7 @@ HiiGetFontInfo ( goto Exit; } } - + // // StringInfoIn must not be NULL if it is not system default font info. // @@ -2808,15 +2808,15 @@ HiiGetFontInfo ( // // Check the font information mask to make sure it is valid. // - if (((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_SYS_FONT | EFI_FONT_INFO_ANY_FONT)) == + if (((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_SYS_FONT | EFI_FONT_INFO_ANY_FONT)) == (EFI_FONT_INFO_SYS_FONT | EFI_FONT_INFO_ANY_FONT)) || - ((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_SYS_SIZE | EFI_FONT_INFO_ANY_SIZE)) == + ((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_SYS_SIZE | EFI_FONT_INFO_ANY_SIZE)) == (EFI_FONT_INFO_SYS_SIZE | EFI_FONT_INFO_ANY_SIZE)) || - ((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_SYS_STYLE | EFI_FONT_INFO_ANY_STYLE)) == + ((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_SYS_STYLE | EFI_FONT_INFO_ANY_STYLE)) == (EFI_FONT_INFO_SYS_STYLE | EFI_FONT_INFO_ANY_STYLE)) || - ((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_RESIZE | EFI_FONT_INFO_ANY_SIZE)) == - (EFI_FONT_INFO_RESIZE | EFI_FONT_INFO_ANY_SIZE)) || - ((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_RESTYLE | EFI_FONT_INFO_ANY_STYLE)) == + ((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_RESIZE | EFI_FONT_INFO_ANY_SIZE)) == + (EFI_FONT_INFO_RESIZE | EFI_FONT_INFO_ANY_SIZE)) || + ((StringInfoIn->FontInfoMask & (EFI_FONT_INFO_RESTYLE | EFI_FONT_INFO_ANY_STYLE)) == (EFI_FONT_INFO_RESTYLE | EFI_FONT_INFO_ANY_STYLE))) { return EFI_INVALID_PARAMETER; } @@ -2838,7 +2838,7 @@ HiiGetFontInfo ( if ((StringInfoIn->FontInfoMask & EFI_FONT_INFO_SYS_SIZE) == EFI_FONT_INFO_SYS_SIZE) { InfoOut.FontInfo.FontSize = SystemDefault->FontInfo.FontSize; - } + } if ((StringInfoIn->FontInfoMask & EFI_FONT_INFO_SYS_STYLE) == EFI_FONT_INFO_SYS_STYLE) { InfoOut.FontInfo.FontStyle = SystemDefault->FontInfo.FontStyle; } @@ -2848,7 +2848,7 @@ HiiGetFontInfo ( if ((StringInfoIn->FontInfoMask & EFI_FONT_INFO_SYS_BACK_COLOR) == EFI_FONT_INFO_SYS_BACK_COLOR) { InfoOut.BackgroundColor = SystemDefault->BackgroundColor; } - + ASSERT (FontInfo != NULL); FontInfo->FontSize = InfoOut.FontInfo.FontSize; FontInfo->FontStyle = InfoOut.FontInfo.FontStyle; @@ -2856,7 +2856,7 @@ HiiGetFontInfo ( if (IsFontInfoExisted (Private, FontInfo, &InfoOut.FontInfoMask, LocalFontHandle, &GlobalFont)) { // // Test to guarantee all characters are available in the found font. - // + // if (String != NULL) { StringIn = String; while (*StringIn != 0) { @@ -2873,21 +2873,21 @@ HiiGetFontInfo ( // if (StringInfoOut != NULL) { StringInfoOutLen = sizeof (EFI_FONT_DISPLAY_INFO) - sizeof (EFI_FONT_INFO) + GlobalFont->FontInfoSize; - *StringInfoOut = (EFI_FONT_DISPLAY_INFO *) AllocateZeroPool (StringInfoOutLen); + *StringInfoOut = (EFI_FONT_DISPLAY_INFO *) AllocateZeroPool (StringInfoOutLen); if (*StringInfoOut == NULL) { Status = EFI_OUT_OF_RESOURCES; LocalFontHandle = NULL; goto Exit; } - + CopyMem (*StringInfoOut, &InfoOut, sizeof (EFI_FONT_DISPLAY_INFO)); CopyMem (&(*StringInfoOut)->FontInfo, GlobalFont->FontInfo, GlobalFont->FontInfoSize); } - - LocalFontHandle = GlobalFont->Entry.ForwardLink; + + LocalFontHandle = GlobalFont->Entry.ForwardLink; Status = EFI_SUCCESS; goto Exit; - } + } Status = EFI_NOT_FOUND; diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.h b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.h index 8336dd0f4f..4391625a9f 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.h +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.h @@ -1,7 +1,7 @@ /** @file Private structures definitions in HiiDatabase. -Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -390,10 +390,10 @@ typedef struct _HII_DATABASE_PRIVATE_DATA { @param BufferLen The length of the Buffer in bytes. - @param Buffer Points to a buffer which will be converted to be the + @param Buffer Points to a buffer which will be converted to be the content of the generated string. - @param Flag If 1, the buffer contains data for the value of GUID or PATH stored in + @param Flag If 1, the buffer contains data for the value of GUID or PATH stored in UINT8 *; if 2, the buffer contains unicode string for the value of NAME; if 3, the buffer contains other data. @@ -460,21 +460,21 @@ IsFontInfoExisted ( /** This function invokes the matching registered function. - + @param Private HII Database driver private structure. @param NotifyType The type of change concerning the database. @param PackageInstance Points to the package referred to by the notification. @param PackageType Package type @param Handle The handle of the package list which contains the specified package. - - @retval EFI_SUCCESS Already checked all registered function and invoked + + @retval EFI_SUCCESS Already checked all registered function and invoked if matched. @retval EFI_INVALID_PARAMETER Any input parameter is not valid. - + **/ EFI_STATUS InvokeRegisteredFunction ( - IN HII_DATABASE_PRIVATE_DATA *Private, + IN HII_DATABASE_PRIVATE_DATA *Private, IN EFI_HII_DATABASE_NOTIFY_TYPE NotifyType, IN VOID *PackageInstance, IN UINT8 PackageType, @@ -508,7 +508,7 @@ GetSystemFont ( /** Parse all string blocks to find a String block specified by StringId. If StringId = (EFI_STRING_ID) (-1), find out all EFI_HII_SIBT_FONT blocks - within this string package and backup its information. If LastStringId is + within this string package and backup its information. If LastStringId is specified, the string id of last string block will also be output. If StringId = 0, output the string id of last string block (EFI_HII_SIBT_STRING). @@ -734,8 +734,8 @@ HiiStringToImage ( RowInfoArray or Blt. @retval EFI_INVALID_PARAMETER The Blt or PackageList was NULL. @retval EFI_INVALID_PARAMETER Flags were invalid combination. - @retval EFI_NOT_FOUND The specified PackageList is not in the Database or the stringid is not - in the specified PackageList. + @retval EFI_NOT_FOUND The specified PackageList is not in the Database or the stringid is not + in the specified PackageList. **/ EFI_STATUS @@ -806,7 +806,7 @@ HiiGetGlyph ( @param StringInfoOut Upon return, contains the matching font's information. If NULL, then no information is returned. This buffer is allocated with a call to the Boot Service AllocatePool(). - It is the caller's responsibility to call the Boot + It is the caller's responsibility to call the Boot Service FreePool() when the caller no longer requires the contents of StringInfoOut. @param String Points to the string which will be tested to @@ -1067,7 +1067,7 @@ HiiDrawImage ( @retval EFI_SUCCESS The image was successfully drawn. @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt. @retval EFI_INVALID_PARAMETER The Blt was NULL. - @retval EFI_NOT_FOUND The image specified by ImageId is not in the database. + @retval EFI_NOT_FOUND The image specified by ImageId is not in the database. The specified PackageList is not in the database. **/ @@ -1654,7 +1654,7 @@ HiiListPackageLists ( @retval EFI_NOT_FOUND The specified Handle could not be found in the current database. @retval EFI_INVALID_PARAMETER BufferSize was NULL. - @retval EFI_INVALID_PARAMETER The value referenced by BufferSize was not zero + @retval EFI_INVALID_PARAMETER The value referenced by BufferSize was not zero and Buffer was NULL. **/ @@ -1725,7 +1725,7 @@ HiiRegisterPackageNotify ( unregistered. @retval EFI_SUCCESS Notification is unregistered successfully. - @retval EFI_NOT_FOUND The incoming notification handle does not exist + @retval EFI_NOT_FOUND The incoming notification handle does not exist in current hii database. **/ @@ -1912,8 +1912,8 @@ HiiConfigRoutingExtractConfig ( instance. @param Results Null-terminated Unicode string in format which has all values - filled in for the entirety of the current HII - database. String to be allocated by the called + filled in for the entirety of the current HII + database. String to be allocated by the called function. De-allocation is up to the caller. @retval EFI_SUCCESS The Results string is filled with the values @@ -2064,7 +2064,7 @@ HiiBlockToConfig ( value pair. Block is left updated and Progress points at the '&' preceding the first non-. - @retval EFI_BUFFER_TOO_SMALL Block not large enough. Progress undefined. + @retval EFI_BUFFER_TOO_SMALL Block not large enough. Progress undefined. BlockSize is updated with the required buffer size. **/ @@ -2136,18 +2136,18 @@ HiiGetAltCfg ( This function accepts a formatted string, finds the associated keyword owners, creates a string from it and forwards it to the EFI_HII_ROUTING_PROTOCOL.RouteConfig function. - - If there is an issue in resolving the contents of the KeywordString, then the - function returns an error and also sets the Progress and ProgressErr with the + + If there is an issue in resolving the contents of the KeywordString, then the + function returns an error and also sets the Progress and ProgressErr with the appropriate information about where the issue occurred and additional data about - the nature of the issue. - + the nature of the issue. + In the case when KeywordString containing multiple keywords, when an EFI_NOT_FOUND error is generated during processing the second or later keyword element, the system - storage associated with earlier keywords is not modified. All elements of the + storage associated with earlier keywords is not modified. All elements of the KeywordString must successfully pass all tests for format and access prior to making any modifications to storage. - + In the case when EFI_DEVICE_ERROR is returned from the processing of a KeywordString containing multiple keywords, the state of storage associated with earlier keywords is undefined. @@ -2155,18 +2155,18 @@ HiiGetAltCfg ( @param This Pointer to the EFI_KEYWORD_HANDLER _PROTOCOL instance. - @param KeywordString A null-terminated string in format. + @param KeywordString A null-terminated string in format. - @param Progress On return, points to a character in the KeywordString. - Points to the string's NULL terminator if the request - was successful. Points to the most recent '&' before + @param Progress On return, points to a character in the KeywordString. + Points to the string's NULL terminator if the request + was successful. Points to the most recent '&' before the first failing name / value pair (or the beginning of the string if the failure is in the first name / value pair) if the request was not successful. @param ProgressErr If during the processing of the KeywordString there was - a failure, this parameter gives additional information - about the possible source of the problem. The various + a failure, this parameter gives additional information + about the possible source of the problem. The various errors are defined in "Related Definitions" below. @@ -2174,16 +2174,16 @@ HiiGetAltCfg ( @retval EFI_INVALID_PARAMETER One or more of the following are TRUE: 1. KeywordString is NULL. - 2. Parsing of the KeywordString resulted in an + 2. Parsing of the KeywordString resulted in an error. See Progress and ProgressErr for more data. - @retval EFI_NOT_FOUND An element of the KeywordString was not found. + @retval EFI_NOT_FOUND An element of the KeywordString was not found. See ProgressErr for more data. - @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated. + @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated. See ProgressErr for more data. - - @retval EFI_ACCESS_DENIED The action violated system policy. See ProgressErr + + @retval EFI_ACCESS_DENIED The action violated system policy. See ProgressErr for more data. @retval EFI_DEVICE_ERROR An unexpected system error occurred. See ProgressErr @@ -2191,7 +2191,7 @@ HiiGetAltCfg ( **/ EFI_STATUS -EFIAPI +EFIAPI EfiConfigKeywordHandlerSetData ( IN EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL *This, IN CONST EFI_STRING KeywordString, @@ -2201,56 +2201,56 @@ EfiConfigKeywordHandlerSetData ( /** - This function accepts a formatted string, finds the underlying + This function accepts a formatted string, finds the underlying keyword owners, creates a string from it and forwards it to the EFI_HII_ROUTING_PROTOCOL.ExtractConfig function. - + If there is an issue in resolving the contents of the KeywordString, then the function returns an EFI_INVALID_PARAMETER and also set the Progress and ProgressErr with the appropriate information about where the issue occurred and additional data about the nature of the issue. - + In the case when KeywordString is NULL, or contains multiple keywords, or when EFI_NOT_FOUND is generated while processing the keyword elements, the Results string - contains values returned for all keywords processed prior to the keyword generating the + contains values returned for all keywords processed prior to the keyword generating the error but no values for the keyword with error or any following keywords. - + @param This Pointer to the EFI_KEYWORD_HANDLER _PROTOCOL instance. - + @param NameSpaceId A null-terminated string containing the platform configuration language to search through in the system. If a NULL is passed in, then it is assumed that any platform configuration language with the prefix of "x-UEFI-" are searched. - + @param KeywordString A null-terminated string in format. If a - NULL is passed in the KeywordString field, all of the known - keywords in the system for the NameSpaceId specified are + NULL is passed in the KeywordString field, all of the known + keywords in the system for the NameSpaceId specified are returned in the Results field. - + @param Progress On return, points to a character in the KeywordString. Points - to the string's NULL terminator if the request was successful. + to the string's NULL terminator if the request was successful. Points to the most recent '&' before the first failing name / value pair (or the beginning of the string if the failure is in the first name / value pair) if the request was not successful. - + @param ProgressErr If during the processing of the KeywordString there was a - failure, this parameter gives additional information about the + failure, this parameter gives additional information about the possible source of the problem. See the definitions in SetData() for valid value definitions. - + @param Results A null-terminated string in format is returned - which has all the values filled in for the keywords in the + which has all the values filled in for the keywords in the KeywordString. This is a callee-allocated field, and must be freed - by the caller after being used. + by the caller after being used. @retval EFI_SUCCESS The specified action was completed successfully. - + @retval EFI_INVALID_PARAMETER One or more of the following are TRUE: 1.Progress, ProgressErr, or Results is NULL. 2.Parsing of the KeywordString resulted in an error. See Progress and ProgressErr for more data. - + @retval EFI_NOT_FOUND An element of the KeywordString was not found. See ProgressErr for more data. @@ -2260,7 +2260,7 @@ EfiConfigKeywordHandlerSetData ( @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated. See ProgressErr for more data. - + @retval EFI_ACCESS_DENIED The action violated system policy. See ProgressErr for more data. @@ -2269,12 +2269,12 @@ EfiConfigKeywordHandlerSetData ( **/ EFI_STATUS -EFIAPI +EFIAPI EfiConfigKeywordHandlerGetData ( IN EFI_CONFIG_KEYWORD_HANDLER_PROTOCOL *This, IN CONST EFI_STRING NameSpaceId, OPTIONAL IN CONST EFI_STRING KeywordString, OPTIONAL - OUT EFI_STRING *Progress, + OUT EFI_STRING *Progress, OUT UINT32 *ProgressErr, OUT EFI_STRING *Results ); @@ -2298,11 +2298,11 @@ HiiCompareLanguage ( /** Retrieves a pointer to a Null-terminated ASCII string containing the list - of languages that an HII handle in the HII Database supports. The returned + of languages that an HII handle in the HII Database supports. The returned string is allocated using AllocatePool(). The caller is responsible for freeing the returned string using FreePool(). The format of the returned string follows the language format assumed the HII Database. - + If HiiHandle is NULL, then ASSERT(). @param[in] HiiHandle A handle that was previously registered in the HII Database. diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.uni b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.uni index 58f220879b..43c6805775 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.uni +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabase.uni @@ -4,13 +4,13 @@ // This driver produces all required HII serivces that includes HiiDataBase, HiiString, // HiiFont, HiiConfigRouting. To support UEFI HII, this driver is required. // -// Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf index adb3603e84..0593ff85bb 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseDxe.inf @@ -4,14 +4,14 @@ # This driver produces all required HII serivces that includes HiiDataBase, HiiString, # HiiFont, HiiConfigRouting. To support UEFI HII, this driver is required. # -# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
# -# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # # @@ -81,7 +81,7 @@ gEfiMdePkgTokenSpaceGuid.PcdUefiVariableDefaultPlatformLang ## CONSUMES gEfiMdeModulePkgTokenSpaceGuid.PcdNvStoreDefaultValueBuffer ## CONSUMES -[Guids] +[Guids] # # Event registered to EFI_HII_SET_KEYBOARD_LAYOUT_EVENT_GUID group, # which will be triggered by EFI_HII_DATABASE_PROTOCOL.SetKeyboardLayout(). diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseEntry.c b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseEntry.c index 9d09c60b23..5951b5e304 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseEntry.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseEntry.c @@ -2,7 +2,7 @@ This file contains the entry code to the HII database, which is defined by UEFI 2.1 specification. -Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -188,7 +188,7 @@ InitializeHiiDatabase ( ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEfiHiiStringProtocolGuid); ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEfiHiiConfigRoutingProtocolGuid); ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEfiConfigKeywordHandlerProtocolGuid); - + InitializeListHead (&mPrivate.DatabaseList); InitializeListHead (&mPrivate.DatabaseNotifyList); InitializeListHead (&mPrivate.HiiHandleList); diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseExtra.uni b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseExtra.uni index d85eef1ee9..6fbd75a161 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseExtra.uni +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/HiiDatabaseExtra.uni @@ -1,7 +1,7 @@ // /** @file // HiiDatabase Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "HII Database DXE Driver" diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c b/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c index 431a5b8454..d1010820e0 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/Image.c @@ -2,7 +2,7 @@ Implementation for EFI_HII_IMAGE_PROTOCOL. -Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -1018,7 +1018,7 @@ HiiGetImage ( @retval EFI_SUCCESS The new image was updated successfully. @retval EFI_NOT_FOUND The image specified by ImageId is not in the - database. The specified PackageList is not in the database. + database. The specified PackageList is not in the database. @retval EFI_INVALID_PARAMETER The Image was NULL. **/ @@ -1426,8 +1426,8 @@ HiiDrawImage ( @retval EFI_SUCCESS The image was successfully drawn. @retval EFI_OUT_OF_RESOURCES Unable to allocate an output buffer for Blt. @retval EFI_INVALID_PARAMETER The Blt was NULL. - @retval EFI_NOT_FOUND The image specified by ImageId is not in the database. - The specified PackageList is not in the database. + @retval EFI_NOT_FOUND The image specified by ImageId is not in the database. + The specified PackageList is not in the database. **/ EFI_STATUS diff --git a/MdeModulePkg/Universal/HiiDatabaseDxe/String.c b/MdeModulePkg/Universal/HiiDatabaseDxe/String.c index d5a7488a79..aeda47430f 100644 --- a/MdeModulePkg/Universal/HiiDatabaseDxe/String.c +++ b/MdeModulePkg/Universal/HiiDatabaseDxe/String.c @@ -2,7 +2,7 @@ Implementation for EFI_HII_STRING_PROTOCOL. -Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -236,7 +236,7 @@ GetStringFontInfo ( /** Parse all string blocks to find a String block specified by StringId. If StringId = (EFI_STRING_ID) (-1), find out all EFI_HII_SIBT_FONT blocks - within this string package and backup its information. If LastStringId is + within this string package and backup its information. If LastStringId is specified, the string id of last string block will also be output. If StringId = 0, output the string id of last string block (EFI_HII_SIBT_STRING). @@ -524,7 +524,7 @@ FindStringBlock ( // Since string package tool set FontId initially to 0 and increases it // progressively by one, StringPackage->FondId always represents an unique // and available FontId. - // + // StringPackage->FontId++; FreePool (FontInfo); @@ -574,7 +574,7 @@ FindStringBlock ( *StartStringId = CurrentStringId; } } - + // // Get last string ID // @@ -681,7 +681,7 @@ GetStringWorker ( } // - // Get the string font. The FontId 0 is the default font for those string blocks which + // Get the string font. The FontId 0 is the default font for those string blocks which // do not specify a font identifier. If default font is not specified, return NULL. // if (StringFontInfo != NULL) { @@ -706,17 +706,17 @@ GetStringWorker ( /** If GetStringBlock find the StringId's string is not saved in the exist string block, - this function will create the UCS2 string block to save the string; also split the + this function will create the UCS2 string block to save the string; also split the skip block into two or one skip block. This is a internal function. - + @param StringPackage Hii string package instance. @param StartStringId The first id in the skip block which StringId in the block. @param StringId The string's id, which is unique within - PackageList. - @param BlockType Output the block type of found string block. - @param StringBlockAddr Output the block address of found string block. + PackageList. + @param BlockType Output the block type of found string block. + @param StringBlockAddr Output the block address of found string block. @param FontBlock whether this string block has font info. @retval EFI_SUCCESS The string font is outputted successfully. @@ -735,7 +735,7 @@ InsertLackStringBlock ( { UINT8 *BlockPtr; UINT8 *StringBlock; - UINT32 SkipLen; + UINT32 SkipLen; UINT32 OldBlockSize; UINT32 NewBlockSize; UINT32 FrontSkipNum; @@ -746,7 +746,7 @@ InsertLackStringBlock ( FrontSkipNum = 0; SkipLen = 0; OldStringAddr = *StringBlockAddr; - + ASSERT (*BlockType == EFI_HII_SIBT_SKIP1 || *BlockType == EFI_HII_SIBT_SKIP2); // // Old skip block size. @@ -757,7 +757,7 @@ InsertLackStringBlock ( } else { SkipLen = sizeof (EFI_HII_SIBT_SKIP2_BLOCK); IdCount = *(UINT16*)(OldStringAddr + sizeof (EFI_HII_STRING_BLOCK)); - } + } // // New create UCS or UCS2 block size. @@ -801,7 +801,7 @@ InsertLackStringBlock ( // // Copy old block in front of skip block. // - CopyMem (StringBlock, StringPackage->StringBlock, OldStringAddr - StringPackage->StringBlock); + CopyMem (StringBlock, StringPackage->StringBlock, OldStringAddr - StringPackage->StringBlock); BlockPtr = StringBlock + (OldStringAddr - StringPackage->StringBlock); if (FrontSkipNum > 0) { @@ -838,7 +838,7 @@ InsertLackStringBlock ( // // Append a EFI_HII_SIBT_END block to the end. // - CopyMem (BlockPtr, OldStringAddr + SkipLen, OldBlockSize - (OldStringAddr - StringPackage->StringBlock) - SkipLen); + CopyMem (BlockPtr, OldStringAddr + SkipLen, OldBlockSize - (OldStringAddr - StringPackage->StringBlock) - SkipLen); if (FontBlock) { *BlockType = EFI_HII_SIBT_STRING_UCS2_FONT; @@ -918,9 +918,9 @@ SetStringWorker ( &StartStringId ); if (EFI_ERROR (Status) && (BlockType == EFI_HII_SIBT_SKIP1 || BlockType == EFI_HII_SIBT_SKIP2)) { - Status = InsertLackStringBlock(StringPackage, - StartStringId, - StringId, + Status = InsertLackStringBlock(StringPackage, + StartStringId, + StringId, &BlockType, &StringBlockAddr, (BOOLEAN)(StringFontInfo != NULL) @@ -947,11 +947,11 @@ SetStringWorker ( return EFI_INVALID_PARAMETER; } else { Referred = ReferFontInfoLocally ( - Private, - StringPackage, - StringPackage->FontId, - FALSE, - GlobalFont, + Private, + StringPackage, + StringPackage->FontId, + FALSE, + GlobalFont, &LocalFont ); if (!Referred) { @@ -962,7 +962,7 @@ SetStringWorker ( // Update the FontId of the specified string block to input font info. // switch (BlockType) { - case EFI_HII_SIBT_STRING_SCSU_FONT: + case EFI_HII_SIBT_STRING_SCSU_FONT: case EFI_HII_SIBT_STRINGS_SCSU_FONT: case EFI_HII_SIBT_STRING_UCS2_FONT: case EFI_HII_SIBT_STRINGS_UCS2_FONT: @@ -973,7 +973,7 @@ SetStringWorker ( // When modify the font info of these blocks, the block type should be updated // to contain font info thus the whole structure should be revised. // It is recommended to use tool to modify the block type not in the code. - // + // return EFI_UNSUPPORTED; } } @@ -1004,7 +1004,7 @@ SetStringWorker ( } *BlockPtr++ = 0; - + TmpSize = OldBlockSize - (StringTextPtr - StringPackage->StringBlock) - AsciiStrSize ((CHAR8 *) StringTextPtr); CopyMem ( BlockPtr, @@ -1107,9 +1107,9 @@ SetStringWorker ( /** This function adds the string String to the group of strings owned by PackageList, with the - specified font information StringFontInfo and returns a new string id. - The new string identifier is guaranteed to be unique within the package list. - That new string identifier is reserved for all languages in the package list. + specified font information StringFontInfo and returns a new string id. + The new string identifier is guaranteed to be unique within the package list. + That new string identifier is reserved for all languages in the package list. @param This A pointer to the EFI_HII_STRING_PROTOCOL instance. @@ -1341,7 +1341,7 @@ HiiNewString ( // Calculate the length of the string blocks, including string block to record // printable language full name and EFI_HII_SIBT_END_BLOCK. // - Ucs2BlockSize = (UINT32) (StrSize ((CHAR16 *) LanguageName) + + Ucs2BlockSize = (UINT32) (StrSize ((CHAR16 *) LanguageName) + (*StringId - 1) * sizeof (EFI_HII_SIBT_STRING_UCS2_BLOCK) - sizeof (CHAR16)); BlockSize = Ucs2BlockSize + sizeof (EFI_HII_SIBT_END_BLOCK); @@ -1519,7 +1519,7 @@ HiiNewString ( PackageListNode->PackageListHdr.PackageLength += FontBlockSize + Ucs2FontBlockSize; // - // Increase the FontId to make it unique since we already add + // Increase the FontId to make it unique since we already add // a EFI_HII_SIBT_FONT block to this string package. // StringPackage->FontId++; @@ -1671,16 +1671,16 @@ HiiGetString ( // // Second search: to match the StringId in other available languages if exist. // - for (Link = PackageListNode->StringPkgHdr.ForwardLink; + for (Link = PackageListNode->StringPkgHdr.ForwardLink; Link != &PackageListNode->StringPkgHdr; Link = Link->ForwardLink ) { - StringPackage = CR (Link, HII_STRING_PACKAGE_INSTANCE, StringEntry, HII_STRING_PACKAGE_SIGNATURE); + StringPackage = CR (Link, HII_STRING_PACKAGE_INSTANCE, StringEntry, HII_STRING_PACKAGE_SIGNATURE); Status = GetStringWorker (Private, StringPackage, StringId, NULL, NULL, NULL); if (!EFI_ERROR (Status)) { return EFI_INVALID_LANGUAGE; } - } + } } return EFI_NOT_FOUND; @@ -1940,7 +1940,7 @@ HiiGetSecondaryLanguages ( Private = HII_STRING_DATABASE_PRIVATE_DATA_FROM_THIS (This); - PackageListNode = NULL; + PackageListNode = NULL; for (Link = Private->DatabaseList.ForwardLink; Link != &Private->DatabaseList; Link = Link->ForwardLink) { DatabaseRecord = CR (Link, HII_DATABASE_RECORD, DatabaseEntry, HII_DATABASE_RECORD_SIGNATURE); if (DatabaseRecord->Handle == PackageList) { @@ -1951,7 +1951,7 @@ HiiGetSecondaryLanguages ( if (PackageListNode == NULL) { return EFI_NOT_FOUND; } - + Languages = NULL; ResultSize = 0; for (Link1 = PackageListNode->StringPkgHdr.ForwardLink; diff --git a/MdeModulePkg/Universal/HiiResourcesSampleDxe/HiiResourcesSample.c b/MdeModulePkg/Universal/HiiResourcesSampleDxe/HiiResourcesSample.c index adce780e09..6f87716408 100644 --- a/MdeModulePkg/Universal/HiiResourcesSampleDxe/HiiResourcesSample.c +++ b/MdeModulePkg/Universal/HiiResourcesSampleDxe/HiiResourcesSample.c @@ -2,7 +2,7 @@ This is an example of how a driver retrieve HII data using HII Package List Protocol, and how to publish the HII data. -Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -51,7 +51,7 @@ HII_VENDOR_DEVICE_PATH mHiiVendorDevicePath = { { END_DEVICE_PATH_TYPE, END_ENTIRE_DEVICE_PATH_SUBTYPE, - { + { (UINT8) (END_DEVICE_PATH_LENGTH), (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8) } @@ -60,7 +60,7 @@ HII_VENDOR_DEVICE_PATH mHiiVendorDevicePath = { /** Main entry for this driver. - + @param[in] ImageHandle Image handle this driver. @param[in] SystemTable Pointer to SystemTable. diff --git a/MdeModulePkg/Universal/HiiResourcesSampleDxe/HiiResourcesSample.uni b/MdeModulePkg/Universal/HiiResourcesSampleDxe/HiiResourcesSample.uni index acef41e282..0de7ad76fb 100644 --- a/MdeModulePkg/Universal/HiiResourcesSampleDxe/HiiResourcesSample.uni +++ b/MdeModulePkg/Universal/HiiResourcesSampleDxe/HiiResourcesSample.uni @@ -4,13 +4,13 @@ // This driver show how a HII driver retrieve HII data using HII Package List protocol // and publish the HII data. // -// Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/HiiResourcesSampleDxe/HiiResourcesSampleDxe.inf b/MdeModulePkg/Universal/HiiResourcesSampleDxe/HiiResourcesSampleDxe.inf index 51a598cb05..7287ba5050 100644 --- a/MdeModulePkg/Universal/HiiResourcesSampleDxe/HiiResourcesSampleDxe.inf +++ b/MdeModulePkg/Universal/HiiResourcesSampleDxe/HiiResourcesSampleDxe.inf @@ -4,13 +4,13 @@ # This driver show how a HII driver retrieve HII data using HII Package List protocol # and publish the HII data. # -# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # diff --git a/MdeModulePkg/Universal/HiiResourcesSampleDxe/HiiResourcesSampleExtra.uni b/MdeModulePkg/Universal/HiiResourcesSampleDxe/HiiResourcesSampleExtra.uni index b7c85c1cc5..2705e702e6 100644 --- a/MdeModulePkg/Universal/HiiResourcesSampleDxe/HiiResourcesSampleExtra.uni +++ b/MdeModulePkg/Universal/HiiResourcesSampleDxe/HiiResourcesSampleExtra.uni @@ -1,7 +1,7 @@ // /** @file // HiiResourcesSample Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "HII Resources Sample DXE Driver" diff --git a/MdeModulePkg/Universal/HiiResourcesSampleDxe/Sample.vfr b/MdeModulePkg/Universal/HiiResourcesSampleDxe/Sample.vfr index 3ca20988e8..e53c1f2ad9 100644 --- a/MdeModulePkg/Universal/HiiResourcesSampleDxe/Sample.vfr +++ b/MdeModulePkg/Universal/HiiResourcesSampleDxe/Sample.vfr @@ -1,6 +1,6 @@ // *++ // -// Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
+// Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
// This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at @@ -31,10 +31,10 @@ formset form formid = 1, title = STRING_TOKEN(STR_SAMPLE_FORM1_TITLE); - text + text help = STRING_TOKEN(STR_SAMPLE_VERSION_HELP), text = STRING_TOKEN(STR_SAMPLE_VERSION_TEXT), - text = STRING_TOKEN(STR_SAMPLE_EMPTY); + text = STRING_TOKEN(STR_SAMPLE_EMPTY); subtitle text = STRING_TOKEN(STR_SAMPLE_EMPTY); diff --git a/MdeModulePkg/Universal/HiiResourcesSampleDxe/SampleStrings.uni b/MdeModulePkg/Universal/HiiResourcesSampleDxe/SampleStrings.uni index f3464b38fe..85948e2718 100644 --- a/MdeModulePkg/Universal/HiiResourcesSampleDxe/SampleStrings.uni +++ b/MdeModulePkg/Universal/HiiResourcesSampleDxe/SampleStrings.uni @@ -1,24 +1,24 @@ // *++ // -// Copyright (c) 2009, Intel Corporation. All rights reserved.
-// This program and the accompanying materials -// are licensed and made available under the terms and conditions of the BSD License -// which accompanies this distribution. The full text of the license may be found at -// http://opensource.org/licenses/bsd-license.php -// -// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -// +// Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+// This program and the accompanying materials +// are licensed and made available under the terms and conditions of the BSD License +// which accompanies this distribution. The full text of the license may be found at +// http://opensource.org/licenses/bsd-license.php +// +// THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +// WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +// // Module Name: // // SampleStrings.uni -// +// // Abstract: -// +// // String definitions for Sample.vfr -// +// // Revision History: -// +// // --*/ diff --git a/MdeModulePkg/Universal/LegacyRegion2Dxe/LegacyRegion2.c b/MdeModulePkg/Universal/LegacyRegion2Dxe/LegacyRegion2.c index a956ea975a..db4a2e8ba9 100644 --- a/MdeModulePkg/Universal/LegacyRegion2Dxe/LegacyRegion2.c +++ b/MdeModulePkg/Universal/LegacyRegion2Dxe/LegacyRegion2.c @@ -1,13 +1,13 @@ /** @file Dummy implementation of Legacy Region 2 Protocol. - This generic implementation of the Legacy Region 2 Protocol does not actually - perform any lock/unlock operations. This module may be used on platforms - that do not provide HW locking of the legacy memory regions. It can also + This generic implementation of the Legacy Region 2 Protocol does not actually + perform any lock/unlock operations. This module may be used on platforms + that do not provide HW locking of the legacy memory regions. It can also be used as a template driver for implementing the Legacy Region 2 Protocol on a platform that does support HW locking of the legacy memory regions. -Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -33,9 +33,9 @@ EFI_LEGACY_REGION2_PROTOCOL mLegacyRegion2 = { /** Modify the hardware to allow (decode) or disallow (not decode) memory reads in a region. - If the On parameter evaluates to TRUE, this function enables memory reads in the address range + If the On parameter evaluates to TRUE, this function enables memory reads in the address range Start to (Start + Length - 1). - If the On parameter evaluates to FALSE, this function disables memory reads in the address range + If the On parameter evaluates to FALSE, this function disables memory reads in the address range Start to (Start + Length - 1). @param This[in] Indicates the EFI_LEGACY_REGION_PROTOCOL instance. @@ -114,7 +114,7 @@ LegacyRegion2Lock ( /** Modify the hardware to disallow memory attribute changes in a region. - This function makes the attributes of a region read only. Once a region is boot-locked with this + This function makes the attributes of a region read only. Once a region is boot-locked with this function, the read and write attributes of that region cannot be changed until a power cycle has reset the boot-lock attribute. Calls to Decode(), Lock() and Unlock() will have no effect. @@ -155,7 +155,7 @@ LegacyRegion2BootLock ( /** Modify the hardware to allow memory writes in a region. - This function changes the attributes of a memory range to allow writes. + This function changes the attributes of a memory range to allow writes. @param This[in] Indicates the EFI_LEGACY_REGION_PROTOCOL instance. @param Start[in] The beginning of the physical address of the region whose @@ -193,9 +193,9 @@ LegacyRegion2Unlock ( /** Get region information for the attributes of the Legacy Region. - This function is used to discover the granularity of the attributes for the memory in the legacy + This function is used to discover the granularity of the attributes for the memory in the legacy region. Each attribute may have a different granularity and the granularity may not be the same - for all memory ranges in the legacy region. + for all memory ranges in the legacy region. @param This[in] Indicates the EFI_LEGACY_REGION2_PROTOCOL instance. @param DescriptorCount[out] The number of region descriptor entries returned in the Descriptor @@ -223,9 +223,9 @@ LegacyRegionGetInfo ( /** The user Entry Point for module LegacyRegionDxe. The user code starts with this function. - @param[in] ImageHandle The firmware allocated handle for the EFI image. + @param[in] ImageHandle The firmware allocated handle for the EFI image. @param[in] SystemTable A pointer to the EFI System Table. - + @retval EFI_SUCCESS The entry point is executed successfully. **/ @@ -237,12 +237,12 @@ LegacyRegion2Install ( ) { EFI_STATUS Status; - + // // Make sure the Legacy Region 2 Protocol is not already installed in the system // ASSERT_PROTOCOL_ALREADY_INSTALLED (NULL, &gEfiLegacyRegion2ProtocolGuid); - + // // Install the protocol on a new handle. // diff --git a/MdeModulePkg/Universal/LegacyRegion2Dxe/LegacyRegion2.h b/MdeModulePkg/Universal/LegacyRegion2Dxe/LegacyRegion2.h index be4f85481f..0329dc5cc5 100644 --- a/MdeModulePkg/Universal/LegacyRegion2Dxe/LegacyRegion2.h +++ b/MdeModulePkg/Universal/LegacyRegion2Dxe/LegacyRegion2.h @@ -1,7 +1,7 @@ /** @file Internal include file for the dummy Legacy Region 2 Protocol implementation. -Copyright (c) 2009, Intel Corporation. All rights reserved.
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -22,9 +22,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** Modify the hardware to allow (decode) or disallow (not decode) memory reads in a region. - If the On parameter evaluates to TRUE, this function enables memory reads in the address range + If the On parameter evaluates to TRUE, this function enables memory reads in the address range Start to (Start + Length - 1). - If the On parameter evaluates to FALSE, this function disables memory reads in the address range + If the On parameter evaluates to FALSE, this function disables memory reads in the address range Start to (Start + Length - 1). @param This[in] Indicates the EFI_LEGACY_REGION_PROTOCOL instance. @@ -85,7 +85,7 @@ LegacyRegion2Lock ( /** Modify the hardware to disallow memory attribute changes in a region. - This function makes the attributes of a region read only. Once a region is boot-locked with this + This function makes the attributes of a region read only. Once a region is boot-locked with this function, the read and write attributes of that region cannot be changed until a power cycle has reset the boot-lock attribute. Calls to Decode(), Lock() and Unlock() will have no effect. @@ -119,7 +119,7 @@ LegacyRegion2BootLock ( /** Modify the hardware to allow memory writes in a region. - This function changes the attributes of a memory range to allow writes. + This function changes the attributes of a memory range to allow writes. @param This[in] Indicates the EFI_LEGACY_REGION_PROTOCOL instance. @param Start[in] The beginning of the physical address of the region whose @@ -148,9 +148,9 @@ LegacyRegion2Unlock ( /** Get region information for the attributes of the Legacy Region. - This function is used to discover the granularity of the attributes for the memory in the legacy + This function is used to discover the granularity of the attributes for the memory in the legacy region. Each attribute may have a different granularity and the granularity may not be the same - for all memory ranges in the legacy region. + for all memory ranges in the legacy region. @param This[in] Indicates the EFI_LEGACY_REGION_PROTOCOL instance. @param DescriptorCount[out] The number of region descriptor entries returned in the Descriptor diff --git a/MdeModulePkg/Universal/LegacyRegion2Dxe/LegacyRegion2Dxe.inf b/MdeModulePkg/Universal/LegacyRegion2Dxe/LegacyRegion2Dxe.inf index 46cd490d8f..3a34cf210f 100644 --- a/MdeModulePkg/Universal/LegacyRegion2Dxe/LegacyRegion2Dxe.inf +++ b/MdeModulePkg/Universal/LegacyRegion2Dxe/LegacyRegion2Dxe.inf @@ -1,9 +1,9 @@ ## @file # Produces the Legacy Region 2 Protocol. # -# This generic implementation of the Legacy Region 2 Protocol does not actually -# perform any lock/unlock operations. This module may be used on platforms -# that do not provide HW locking of the legacy memory regions. It can also +# This generic implementation of the Legacy Region 2 Protocol does not actually +# perform any lock/unlock operations. This module may be used on platforms +# that do not provide HW locking of the legacy memory regions. It can also # be used as a template driver for implementing the Legacy Region 2 Protocol on # a platform that does support HW locking of the legacy memory regions. # @@ -11,12 +11,12 @@ # Protocol. For Lock/UnLock/Decode, EFI_SUCCESS is returned although the region's # attributes were not actually modified. # -# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # @@ -28,7 +28,7 @@ MODULE_UNI_FILE = LegacyRegion2Dxe.uni FILE_GUID = EC2BEECA-E84A-445B-869B-F7A73C96F58A MODULE_TYPE = DXE_DRIVER - VERSION_STRING = 1.0 + VERSION_STRING = 1.0 ENTRY_POINT = LegacyRegion2Install # diff --git a/MdeModulePkg/Universal/LegacyRegion2Dxe/LegacyRegion2Dxe.uni b/MdeModulePkg/Universal/LegacyRegion2Dxe/LegacyRegion2Dxe.uni index b665bbfc4e..bfe8862b45 100644 --- a/MdeModulePkg/Universal/LegacyRegion2Dxe/LegacyRegion2Dxe.uni +++ b/MdeModulePkg/Universal/LegacyRegion2Dxe/LegacyRegion2Dxe.uni @@ -6,18 +6,18 @@ // that do not provide HW locking of the legacy memory regions. It can also // be used as a template driver for implementing the Legacy Region 2 Protocol on // a platform that does support HW locking of the legacy memory regions. -// +// // Note: This module does not fully comply with PI Specification of Legacy Region 2 // Protocol. For Lock/UnLock/Decode, EFI_SUCCESS is returned although the region's // attributes were not actually modified. // -// Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/LegacyRegion2Dxe/LegacyRegion2DxeExtra.uni b/MdeModulePkg/Universal/LegacyRegion2Dxe/LegacyRegion2DxeExtra.uni index 22335058d2..5c4336b6f2 100644 --- a/MdeModulePkg/Universal/LegacyRegion2Dxe/LegacyRegion2DxeExtra.uni +++ b/MdeModulePkg/Universal/LegacyRegion2Dxe/LegacyRegion2DxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // LegacyRegion2Dxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Legacy Region DXE Driver v2" diff --git a/MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.c b/MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.c index d4183ca4b0..28d5180e01 100644 --- a/MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.c +++ b/MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.c @@ -1,11 +1,11 @@ /** @file LockBox SMM driver. - + Caution: This module requires additional review when modified. This driver will have external input - communicate buffer in SMM mode. This external input must be validated carefully to avoid security issue like buffer overflow, integer overflow. - + SmmLockBoxHandler(), SmmLockBoxRestore(), SmmLockBoxUpdate(), SmmLockBoxSave() will receive untrusted input and do basic validation. @@ -47,7 +47,7 @@ BOOLEAN mLocked = FALSE; Restore buffer and length are external input, so this function will validate it is in SMRAM. - @param LockBoxParameterSave parameter of lock box save + @param LockBoxParameterSave parameter of lock box save **/ VOID SmmLockBoxSave ( @@ -131,7 +131,7 @@ SmmLockBoxSetAttributes ( Restore buffer and length are external input, so this function will validate it is in SMRAM. - @param LockBoxParameterUpdate parameter of lock box update + @param LockBoxParameterUpdate parameter of lock box update **/ VOID SmmLockBoxUpdate ( @@ -181,7 +181,7 @@ SmmLockBoxUpdate ( Restore buffer and length are external input, so this function will validate it is in SMRAM. - @param LockBoxParameterRestore parameter of lock box restore + @param LockBoxParameterRestore parameter of lock box restore **/ VOID SmmLockBoxRestore ( @@ -353,7 +353,7 @@ SmmLockBoxHandler ( Smm Ready To Lock event notification handler. It sets a flag indicating that SMRAM has been locked. - + @param[in] Protocol Points to the protocol's unique identifier. @param[in] Interface Points to the interface instance. @param[in] Handle The handle on which the interface was installed. @@ -378,7 +378,7 @@ SmmReadyToLockEventNotify ( @param[in] ImageHandle Image handle of this driver. @param[in] SystemTable A Pointer to the EFI System Table. - @retval EFI_SUCEESS + @retval EFI_SUCEESS @return Others Some error occurs. **/ EFI_STATUS diff --git a/MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf b/MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf index 772cad9890..f07ab20e1a 100644 --- a/MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf +++ b/MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.inf @@ -6,7 +6,7 @@ # This external input must be validated carefully to avoid security issue like # buffer overflow, integer overflow. # -# Copyright (c) 2010 - 2015, Intel Corporation. All rights reserved.
+# Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions @@ -32,7 +32,7 @@ # # The following information is for reference only and not required by the build tools. # -# VALID_ARCHITECTURES = IA32 X64 +# VALID_ARCHITECTURES = IA32 X64 # [Sources] diff --git a/MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.uni b/MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.uni index 4e5cce8a42..ead8588b79 100644 --- a/MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.uni +++ b/MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBox.uni @@ -6,14 +6,14 @@ // This external input must be validated carefully to avoid security issue like // buffer overflow, integer overflow. // -// Copyright (c) 2010 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions // of the BSD License which accompanies this distribution. The // full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBoxExtra.uni b/MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBoxExtra.uni index 9c07cb509d..539e1620dd 100644 --- a/MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBoxExtra.uni +++ b/MdeModulePkg/Universal/LockBox/SmmLockBox/SmmLockBoxExtra.uni @@ -1,7 +1,7 @@ // /** @file // SmmLockBox Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions @@ -14,8 +14,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "SMM Lock Box Driver" diff --git a/MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/GenericMemoryTestDxe.uni b/MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/GenericMemoryTestDxe.uni index 1e380c2889..1cd4bb0a07 100644 --- a/MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/GenericMemoryTestDxe.uni +++ b/MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/GenericMemoryTestDxe.uni @@ -3,13 +3,13 @@ // // This driver first constructs the non-tested memory range, then performs the R/W/V memory test. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials are // licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/GenericMemoryTestDxeExtra.uni b/MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/GenericMemoryTestDxeExtra.uni index 2ae0328901..f57ee9cfaf 100644 --- a/MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/GenericMemoryTestDxeExtra.uni +++ b/MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/GenericMemoryTestDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // GenericMemoryTestDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials are // licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Generic Memory Test DXE Driver" diff --git a/MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/LightMemoryTest.c b/MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/LightMemoryTest.c index a7ade955c3..86c2be13dc 100644 --- a/MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/LightMemoryTest.c +++ b/MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/LightMemoryTest.c @@ -52,7 +52,7 @@ UINT32 GenericMemoryTestMonoPattern[GENERIC_CACHELINE_SIZE / 4] If all Length bytes of the two buffers are identical, then 0 is returned. Otherwise, the value returned is the first mismatched byte in SourceBuffer subtracted from the first mismatched byte in DestinationBuffer. - + If Length = 0, then ASSERT(). @param[in] DestinationBuffer The pointer to the destination buffer to compare. @@ -62,7 +62,7 @@ UINT32 GenericMemoryTestMonoPattern[GENERIC_CACHELINE_SIZE / 4] @return 0 All Length bytes of the two buffers are identical. @retval Non-zero The first mismatched byte in SourceBuffer subtracted from the first mismatched byte in DestinationBuffer. - + **/ INTN EFIAPI @@ -89,7 +89,7 @@ CompareMemWithoutCheckArgument ( @retval EFI_SUCCESS Successful construct the base memory range through GCD service. @retval EFI_OUT_OF_RESOURCE Could not allocate needed resource from base memory. @retval Others Failed to construct base memory range through GCD service. - + **/ EFI_STATUS ConstructBaseMemoryRange ( @@ -119,7 +119,7 @@ ConstructBaseMemoryRange ( Destroy the link list base on the correspond link list type. @param[in] Private Point to generic memory test driver's private data. - + **/ VOID DestroyLinkList ( @@ -181,7 +181,7 @@ ConvertToTestedMemory ( @retval EFI_SUCCESS Successful add all the extended memory to system memory map. @retval Others Failed to add the tested extended memory. - + **/ EFI_STATUS UpdateMemoryMap ( @@ -218,7 +218,7 @@ UpdateMemoryMap ( @retval EFI_SUCCESS Successful test the range of memory. @retval Others Failed to test the range of memory. - + **/ EFI_STATUS DirectRangeTest ( @@ -263,7 +263,7 @@ DirectRangeTest ( @retval EFI_SUCCESS Successful construct the non-tested memory range through GCD service. @retval EFI_OUT_OF_RESOURCE Could not allocate needed resource from base memory. @retval Others Failed to construct non-tested memory range through GCD service. - + **/ EFI_STATUS ConstructNonTestedMemoryRange ( @@ -324,7 +324,7 @@ ConstructNonTestedMemoryRange ( @retval EFI_SUCCESS Successful write the test pattern into the non-tested memory. @retval Others The test pattern may not really write into the physical memory. - + **/ EFI_STATUS WriteMemory ( @@ -372,7 +372,7 @@ WriteMemory ( @retval EFI_SUCCESS Successful verify the range of memory, no errors' location found. @retval Others The range of memory have errors contained. - + **/ EFI_STATUS VerifyMemory ( @@ -432,7 +432,7 @@ VerifyMemory ( NULL, (UINT8 *) ExtendedErrorData + sizeof (EFI_STATUS_CODE_DATA), ExtendedErrorData->DataHeader.Size - ); + ); return EFI_DEVICE_ERROR; } @@ -446,12 +446,12 @@ VerifyMemory ( /** Initialize the generic memory test. - @param[in] This The protocol instance pointer. - @param[in] Level The coverage level of the memory test. - @param[out] RequireSoftECCInit Indicate if the memory need software ECC init. + @param[in] This The protocol instance pointer. + @param[in] Level The coverage level of the memory test. + @param[out] RequireSoftECCInit Indicate if the memory need software ECC init. - @retval EFI_SUCCESS The generic memory test is initialized correctly. - @retval EFI_NO_MEDIA The system had no memory to be tested. + @retval EFI_SUCCESS The generic memory test is initialized correctly. + @retval EFI_NO_MEDIA The system had no memory to be tested. **/ EFI_STATUS @@ -542,12 +542,12 @@ InitializeMemoryTest ( /** Perform the memory test. - @param[in] This The protocol instance pointer. - @param[out] TestedMemorySize Return the tested extended memory size. - @param[out] TotalMemorySize Return the whole system physical memory size. - The total memory size does not include memory in a slot with a disabled DIMM. + @param[in] This The protocol instance pointer. + @param[out] TestedMemorySize Return the tested extended memory size. + @param[out] TotalMemorySize Return the whole system physical memory size. + The total memory size does not include memory in a slot with a disabled DIMM. @param[out] ErrorOut TRUE if the memory error occured. - @param[in] IfTestAbort Indicates that the user pressed "ESC" to skip the memory test. + @param[in] IfTestAbort Indicates that the user pressed "ESC" to skip the memory test. @retval EFI_SUCCESS One block of memory passed the test. @retval EFI_NOT_FOUND All memory blocks have already been tested. @@ -667,7 +667,7 @@ GenPerformMemoryTest ( /** Finish the memory test. - @param[in] This The protocol instance pointer. + @param[in] This The protocol instance pointer. @retval EFI_SUCCESS Success. All resources used in the memory test are freed. @@ -705,12 +705,12 @@ GenMemoryTestFinished ( /** Provides the capability to test the compatible range used by some special drivers. - @param[in] This The protocol instance pointer. + @param[in] This The protocol instance pointer. @param[in] StartAddress The start address of the compatible memory range that must be below 16M. - @param[in] Length The compatible memory range's length. - - @retval EFI_SUCCESS The compatible memory range pass the memory test. + @param[in] Length The compatible memory range's length. + + @retval EFI_SUCCESS The compatible memory range pass the memory test. @retval EFI_INVALID_PARAMETER The compatible memory range are not below Low 16M. **/ @@ -780,9 +780,9 @@ GenCompatibleRangeTest ( Perform the address line walking ones test. @param[in] Private Point to generic memory test driver's private data. - - @retval EFI_SUCCESS Successful finished walking ones test. - @retval EFI_OUT_OF_RESOURCE Could not get resource in base memory. + + @retval EFI_SUCCESS Successful finished walking ones test. + @retval EFI_OUT_OF_RESOURCE Could not get resource in base memory. @retval EFI_ACCESS_DENIED Code may can not run here because if walking one test failed, system may be already halt. @@ -861,9 +861,9 @@ GENERIC_MEMORY_TEST_PRIVATE mGenericMemoryTestPrivate = { It initializes private data to default value. - @param[in] ImageHandle The firmware allocated handle for the EFI image. + @param[in] ImageHandle The firmware allocated handle for the EFI image. @param[in] SystemTable A pointer to the EFI System Table. - + @retval EFI_SUCCESS The entry point is executed successfully. @retval EFI_NOT_FOUND Can't find HandOff Hob in HobList. @retval other Some error occurs when executing this entry point. diff --git a/MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/LightMemoryTest.h b/MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/LightMemoryTest.h index 391c8a4c81..defe9f28ea 100644 --- a/MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/LightMemoryTest.h +++ b/MdeModulePkg/Universal/MemoryTest/GenericMemoryTestDxe/LightMemoryTest.h @@ -1,7 +1,7 @@ /** @file The generic memory test driver definition - Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions @@ -139,7 +139,7 @@ typedef struct { @retval EFI_SUCCESS Successful construct the base memory range through GCD service. @retval EFI_OUT_OF_RESOURCE Could not allocate needed resource from base memory. @retval Others Failed to construct base memory range through GCD service. - + **/ EFI_STATUS ConstructBaseMemoryRange ( @@ -154,7 +154,7 @@ ConstructBaseMemoryRange ( @retval EFI_SUCCESS Successful construct the non-tested memory range through GCD service. @retval EFI_OUT_OF_RESOURCE Could not allocate needed resource from base memory. @retval Others Failed to construct non-tested memory range through GCD service. - + **/ EFI_STATUS ConstructNonTestedMemoryRange ( @@ -165,9 +165,9 @@ ConstructNonTestedMemoryRange ( Perform the address line walking ones test. @param[in] Private Point to generic memory test driver's private data. - - @retval EFI_SUCCESS Successful finished walking ones test. - @retval EFI_OUT_OF_RESOURCE Could not get resource in base memory. + + @retval EFI_SUCCESS Successful finished walking ones test. + @retval EFI_OUT_OF_RESOURCE Could not get resource in base memory. @retval EFI_ACCESS_DENIED Code may can not run here because if walking one test failed, system may be already halt. @@ -181,7 +181,7 @@ PerformAddressDataLineTest ( Destroy the link list base on the correspond link list type. @param[in] Private Point to generic memory test driver's private data. - + **/ VOID DestroyLinkList ( @@ -195,7 +195,7 @@ DestroyLinkList ( @retval EFI_SUCCESS Successful add all the extended memory to system memory map. @retval Others Failed to add the tested extended memory. - + **/ EFI_STATUS UpdateMemoryMap ( @@ -211,7 +211,7 @@ UpdateMemoryMap ( @retval EFI_SUCCESS Successful write the test pattern into the non-tested memory. @retval Others The test pattern may not really write into the physical memory. - + **/ EFI_STATUS WriteMemory ( @@ -232,7 +232,7 @@ WriteMemory ( @retval EFI_SUCCESS Successful verify the range of memory, no errors' location found. @retval Others The range of memory have errors contained. - + **/ EFI_STATUS VerifyMemory ( @@ -251,7 +251,7 @@ VerifyMemory ( @retval EFI_SUCCESS Successful test the range of memory. @retval Others Failed to test the range of memory. - + **/ EFI_STATUS DirectRangeTest ( @@ -264,12 +264,12 @@ DirectRangeTest ( /** Initialize the generic memory test. - @param[in] This The protocol instance pointer. - @param[in] Level The coverage level of the memory test. - @param[out] RequireSoftECCInit Indicate if the memory need software ECC init. + @param[in] This The protocol instance pointer. + @param[in] Level The coverage level of the memory test. + @param[out] RequireSoftECCInit Indicate if the memory need software ECC init. - @retval EFI_SUCCESS The generic memory test is initialized correctly. - @retval EFI_NO_MEDIA The system had no memory to be tested. + @retval EFI_SUCCESS The generic memory test is initialized correctly. + @retval EFI_NO_MEDIA The system had no memory to be tested. **/ EFI_STATUS @@ -283,12 +283,12 @@ InitializeMemoryTest ( /** Perform the memory test. - @param[in] This The protocol instance pointer. - @param[out] TestedMemorySize Return the tested extended memory size. - @param[out] TotalMemorySize Return the whole system physical memory size. - The total memory size does not include memory in a slot with a disabled DIMM. + @param[in] This The protocol instance pointer. + @param[out] TestedMemorySize Return the tested extended memory size. + @param[out] TotalMemorySize Return the whole system physical memory size. + The total memory size does not include memory in a slot with a disabled DIMM. @param[out] ErrorOut TRUE if the memory error occured. - @param[in] IfTestAbort Indicates that the user pressed "ESC" to skip the memory test. + @param[in] IfTestAbort Indicates that the user pressed "ESC" to skip the memory test. @retval EFI_SUCCESS One block of memory passed the test. @retval EFI_NOT_FOUND All memory blocks have already been tested. @@ -308,7 +308,7 @@ GenPerformMemoryTest ( /** Finish the memory test. - @param[in] This The protocol instance pointer. + @param[in] This The protocol instance pointer. @retval EFI_SUCCESS Success. All resources used in the memory test are freed. @@ -322,12 +322,12 @@ GenMemoryTestFinished ( /** Provides the capability to test the compatible range used by some special drivers. - @param[in] This The protocol instance pointer. + @param[in] This The protocol instance pointer. @param[in] StartAddress The start address of the compatible memory range that must be below 16M. - @param[in] Length The compatible memory range's length. - - @retval EFI_SUCCESS The compatible memory range pass the memory test. + @param[in] Length The compatible memory range's length. + + @retval EFI_SUCCESS The compatible memory range pass the memory test. @retval EFI_INVALID_PARAMETER The compatible memory range are not below Low 16M. **/ diff --git a/MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTest.c b/MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTest.c index a9bd101501..51111b848f 100644 --- a/MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTest.c +++ b/MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTest.c @@ -28,7 +28,7 @@ EFI_GENERIC_MEMORY_TEST_PROTOCOL mGenericMemoryTest = { /** Entry point of the NULL memory test driver. - + This function is the entry point of the NULL memory test driver. It simply installs the Generic Memory Test Protocol. @@ -99,15 +99,15 @@ ConvertToTestedMemory ( This function implements EFI_GENERIC_MEMORY_TEST_PROTOCOL.MemoryTestInit. It simply promotes untested reserved memory to system memory without real test. - @param This Protocol instance pointer. - @param Level The coverage level of the memory test. - @param RequireSoftECCInit Indicate if the memory need software ECC init. + @param This Protocol instance pointer. + @param Level The coverage level of the memory test. + @param RequireSoftECCInit Indicate if the memory need software ECC init. - @retval EFI_SUCCESS The generic memory test initialized correctly. - @retval EFI_NO_MEDIA There is not any non-tested memory found, in this - function if not any non-tesed memory found means - that the memory test driver have not detect any - non-tested extended memory of current system. + @retval EFI_SUCCESS The generic memory test initialized correctly. + @retval EFI_NO_MEDIA There is not any non-tested memory found, in this + function if not any non-tesed memory found means + that the memory test driver have not detect any + non-tested extended memory of current system. **/ EFI_STATUS @@ -158,20 +158,20 @@ InitializeMemoryTest ( This function implements EFI_GENERIC_MEMORY_TEST_PROTOCOL.PerformMemoryTest. It simply returns EFI_NOT_FOUND. - @param This Protocol instance pointer. - @param TestedMemorySize Return the tested extended memory size. - @param TotalMemorySize Return the whole system physical memory size, this - value may be changed if in some case some error - DIMMs be disabled. - @param ErrorOut Any time the memory error occurs, this will be - TRUE. - @param IfTestAbort Indicate if the user press "ESC" to skip the memory - test. - - @retval EFI_SUCCESS One block of memory test ok, the block size is hide - internally. - @retval EFI_NOT_FOUND Indicate all the non-tested memory blocks have - already go through. + @param This Protocol instance pointer. + @param TestedMemorySize Return the tested extended memory size. + @param TotalMemorySize Return the whole system physical memory size, this + value may be changed if in some case some error + DIMMs be disabled. + @param ErrorOut Any time the memory error occurs, this will be + TRUE. + @param IfTestAbort Indicate if the user press "ESC" to skip the memory + test. + + @retval EFI_SUCCESS One block of memory test ok, the block size is hide + internally. + @retval EFI_NOT_FOUND Indicate all the non-tested memory blocks have + already go through. @retval EFI_DEVICE_ERROR Mis-compare error, and no agent can handle it **/ @@ -199,11 +199,11 @@ GenPerformMemoryTest ( This function implements EFI_GENERIC_MEMORY_TEST_PROTOCOL.Finished. It simply returns EFI_SUCCESS. - @param This Protocol instance pointer. + @param This Protocol instance pointer. - @retval EFI_SUCCESS Successful free all the generic memory test driver - allocated resource and notify to platform memory - test driver that memory test finished. + @retval EFI_SUCCESS Successful free all the generic memory test driver + allocated resource and notify to platform memory + test driver that memory test finished. **/ EFI_STATUS @@ -222,11 +222,11 @@ GenMemoryTestFinished ( This function implements EFI_GENERIC_MEMORY_TEST_PROTOCOL.CompatibleRangeTest. It simply sets the memory range to system memory. - @param This Protocol instance pointer. - @param StartAddress The start address of the memory range. - @param Length The memory range's length. - - @retval EFI_SUCCESS The compatible memory range pass the memory test. + @param This Protocol instance pointer. + @param StartAddress The start address of the memory range. + @param Length The memory range's length. + + @retval EFI_SUCCESS The compatible memory range pass the memory test. @retval EFI_INVALID_PARAMETER The compatible memory range must be below 16M. **/ diff --git a/MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTest.h b/MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTest.h index 77c18eb331..d09c84354e 100644 --- a/MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTest.h +++ b/MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTest.h @@ -1,7 +1,7 @@ /** @file Include file of the NULL memory test driver. -Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -40,15 +40,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. This function implements EFI_GENERIC_MEMORY_TEST_PROTOCOL.MemoryTestInit. It simply promotes untested reserved memory to system memory without real test. - @param This Protocol instance pointer. - @param Level The coverage level of the memory test. - @param RequireSoftECCInit Indicate if the memory need software ECC init. + @param This Protocol instance pointer. + @param Level The coverage level of the memory test. + @param RequireSoftECCInit Indicate if the memory need software ECC init. - @retval EFI_SUCCESS The generic memory test initialized correctly. - @retval EFI_NO_MEDIA There is not any non-tested memory found, in this - function if not any non-tesed memory found means - that the memory test driver have not detect any - non-tested extended memory of current system. + @retval EFI_SUCCESS The generic memory test initialized correctly. + @retval EFI_NO_MEDIA There is not any non-tested memory found, in this + function if not any non-tesed memory found means + that the memory test driver have not detect any + non-tested extended memory of current system. **/ EFI_STATUS @@ -65,20 +65,20 @@ InitializeMemoryTest ( This function implements EFI_GENERIC_MEMORY_TEST_PROTOCOL.PerformMemoryTest. It simply returns EFI_NOT_FOUND. - @param This Protocol instance pointer. - @param TestedMemorySize Return the tested extended memory size. - @param TotalMemorySize Return the whole system physical memory size, this - value may be changed if in some case some error - DIMMs be disabled. - @param ErrorOut Any time the memory error occurs, this will be - TRUE. - @param IfTestAbort Indicate if the user press "ESC" to skip the memory - test. - - @retval EFI_SUCCESS One block of memory test ok, the block size is hide - internally. - @retval EFI_NOT_FOUND Indicate all the non-tested memory blocks have - already go through. + @param This Protocol instance pointer. + @param TestedMemorySize Return the tested extended memory size. + @param TotalMemorySize Return the whole system physical memory size, this + value may be changed if in some case some error + DIMMs be disabled. + @param ErrorOut Any time the memory error occurs, this will be + TRUE. + @param IfTestAbort Indicate if the user press "ESC" to skip the memory + test. + + @retval EFI_SUCCESS One block of memory test ok, the block size is hide + internally. + @retval EFI_NOT_FOUND Indicate all the non-tested memory blocks have + already go through. @retval EFI_DEVICE_ERROR Mis-compare error, and no agent can handle it **/ @@ -98,11 +98,11 @@ GenPerformMemoryTest ( This function implements EFI_GENERIC_MEMORY_TEST_PROTOCOL.Finished. It simply returns EFI_SUCCESS. - @param This Protocol instance pointer. + @param This Protocol instance pointer. - @retval EFI_SUCCESS Successful free all the generic memory test driver - allocated resource and notify to platform memory - test driver that memory test finished. + @retval EFI_SUCCESS Successful free all the generic memory test driver + allocated resource and notify to platform memory + test driver that memory test finished. **/ EFI_STATUS @@ -118,11 +118,11 @@ GenMemoryTestFinished ( This function implements EFI_GENERIC_MEMORY_TEST_PROTOCOL.CompatibleRangeTest. It simply set the memory range to system memory. - @param This Protocol instance pointer. - @param StartAddress The start address of the memory range. - @param Length The memory range's length. - - @retval EFI_SUCCESS The compatible memory range pass the memory test. + @param This Protocol instance pointer. + @param StartAddress The start address of the memory range. + @param Length The memory range's length. + + @retval EFI_SUCCESS The compatible memory range pass the memory test. @retval EFI_INVALID_PARAMETER The compatible memory range must be below 16M. **/ diff --git a/MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf b/MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf index 96770e5b8d..a0d2ce7a89 100644 --- a/MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf +++ b/MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.inf @@ -1,15 +1,15 @@ ## @file # This driver installs Generic Memory Test Protocol which does not perform real memory test. -# -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+# +# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at # http://opensource.org/licenses/bsd-license.php -# +# # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. -# +# ## [Defines] diff --git a/MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.uni b/MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.uni index e8f6fa6ea9..b758f70cee 100644 --- a/MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.uni +++ b/MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxe.uni @@ -3,13 +3,13 @@ // // This driver installs Generic Memory Test Protocol, which does not perform a real memory test. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxeExtra.uni b/MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxeExtra.uni index f0b5372ed8..2cd88bf316 100644 --- a/MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxeExtra.uni +++ b/MdeModulePkg/Universal/MemoryTest/NullMemoryTestDxe/NullMemoryTestDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // NullMemoryTestDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "NULL Memory Test DXE Driver" diff --git a/MdeModulePkg/Universal/Metronome/Metronome.c b/MdeModulePkg/Universal/Metronome/Metronome.c index c3dc0b875a..936beae1d5 100644 --- a/MdeModulePkg/Universal/Metronome/Metronome.c +++ b/MdeModulePkg/Universal/Metronome/Metronome.c @@ -9,16 +9,16 @@ microsecond units. If the number of ticks is small, then nanoseconds are used. If the number of ticks is large, then microseconds are used. This prevents overflows that could occur for long delays if only nanoseconds were used and also - provides the greatest accuracy for small delays. + provides the greatest accuracy for small delays. -Copyright (c) 2008, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -39,19 +39,19 @@ EFI_METRONOME_ARCH_PROTOCOL mMetronome = { /** Waits for the specified number of ticks. - + This function implements EFI_METRONOME_ARCH_PROTOCOL.WaitForTick(). - The WaitForTick() function waits for the number of ticks specified by - TickNumber from a known time source in the platform. If TickNumber of - ticks are detected, then EFI_SUCCESS is returned. The actual time passed - between entry of this function and the first tick is between 0 and - TickPeriod 100 nS units. If you want to guarantee that at least TickPeriod - time has elapsed, wait for two ticks. This function waits for a hardware - event to determine when a tick occurs. It is possible for interrupt - processing, or exception processing to interrupt the execution of the - WaitForTick() function. Depending on the hardware source for the ticks, it - is possible for a tick to be missed. This function cannot guarantee that - ticks will not be missed. If a timeout occurs waiting for the specified + The WaitForTick() function waits for the number of ticks specified by + TickNumber from a known time source in the platform. If TickNumber of + ticks are detected, then EFI_SUCCESS is returned. The actual time passed + between entry of this function and the first tick is between 0 and + TickPeriod 100 nS units. If you want to guarantee that at least TickPeriod + time has elapsed, wait for two ticks. This function waits for a hardware + event to determine when a tick occurs. It is possible for interrupt + processing, or exception processing to interrupt the execution of the + WaitForTick() function. Depending on the hardware source for the ticks, it + is possible for a tick to be missed. This function cannot guarantee that + ticks will not be missed. If a timeout occurs waiting for the specified number of ticks, then EFI_TIMEOUT is returned. @param This The EFI_METRONOME_ARCH_PROTOCOL instance. @@ -90,9 +90,9 @@ WaitForTick ( /** The user Entry Point for module Metronome. The user code starts with this function. - @param[in] ImageHandle The firmware allocated handle for the EFI image. + @param[in] ImageHandle The firmware allocated handle for the EFI image. @param[in] SystemTable A pointer to the EFI System Table. - + @retval EFI_SUCCESS The entry point is executed successfully. @retval other Some error occurs when executing this entry point. diff --git a/MdeModulePkg/Universal/Metronome/Metronome.h b/MdeModulePkg/Universal/Metronome/Metronome.h index 3556e6b342..d77cb0dda3 100644 --- a/MdeModulePkg/Universal/Metronome/Metronome.h +++ b/MdeModulePkg/Universal/Metronome/Metronome.h @@ -1,7 +1,7 @@ /** @file Include file of Metronome driver. -Copyright (c) 2008, Intel Corporation. All rights reserved.
+Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -24,19 +24,19 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** Waits for the specified number of ticks. - + This function implements EFI_METRONOME_ARCH_PROTOCOL.WaitForTick(). - The WaitForTick() function waits for the number of ticks specified by - TickNumber from a known time source in the platform. If TickNumber of - ticks are detected, then EFI_SUCCESS is returned. The actual time passed - between entry of this function and the first tick is between 0 and - TickPeriod 100 nS units. If you want to guarantee that at least TickPeriod - time has elapsed, wait for two ticks. This function waits for a hardware - event to determine when a tick occurs. It is possible for interrupt - processing, or exception processing to interrupt the execution of the - WaitForTick() function. Depending on the hardware source for the ticks, it - is possible for a tick to be missed. This function cannot guarantee that - ticks will not be missed. If a timeout occurs waiting for the specified + The WaitForTick() function waits for the number of ticks specified by + TickNumber from a known time source in the platform. If TickNumber of + ticks are detected, then EFI_SUCCESS is returned. The actual time passed + between entry of this function and the first tick is between 0 and + TickPeriod 100 nS units. If you want to guarantee that at least TickPeriod + time has elapsed, wait for two ticks. This function waits for a hardware + event to determine when a tick occurs. It is possible for interrupt + processing, or exception processing to interrupt the execution of the + WaitForTick() function. Depending on the hardware source for the ticks, it + is possible for a tick to be missed. This function cannot guarantee that + ticks will not be missed. If a timeout occurs waiting for the specified number of ticks, then EFI_TIMEOUT is returned. @param This The EFI_METRONOME_ARCH_PROTOCOL instance. diff --git a/MdeModulePkg/Universal/Metronome/Metronome.inf b/MdeModulePkg/Universal/Metronome/Metronome.inf index a688f3cc02..3a633ed753 100644 --- a/MdeModulePkg/Universal/Metronome/Metronome.inf +++ b/MdeModulePkg/Universal/Metronome/Metronome.inf @@ -9,16 +9,16 @@ # microsecond units. If the number of ticks is small, then nanoseconds are used. # If the number of ticks is large, then microseconds are used. This prevents # overflows that could occur for long delays if only nanoseconds were used and also -# provides the greatest accuracy for small delays. +# provides the greatest accuracy for small delays. # -# Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.
-# This program and the accompanying materials -# are licensed and made available under the terms and conditions of the BSD License -# which accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php -# -# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +# Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.
+# This program and the accompanying materials +# are licensed and made available under the terms and conditions of the BSD License +# which accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php +# +# THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +# WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. # ## diff --git a/MdeModulePkg/Universal/Metronome/Metronome.uni b/MdeModulePkg/Universal/Metronome/Metronome.uni index 693026d41e..af906ef657 100644 --- a/MdeModulePkg/Universal/Metronome/Metronome.uni +++ b/MdeModulePkg/Universal/Metronome/Metronome.uni @@ -11,13 +11,13 @@ // overflows that could occur for long delays if only nanoseconds were used and also // provides the greatest accuracy for small delays. // -// Copyright (c) 2008 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/Metronome/MetronomeExtra.uni b/MdeModulePkg/Universal/Metronome/MetronomeExtra.uni index 51b622066d..6d24946fa7 100644 --- a/MdeModulePkg/Universal/Metronome/MetronomeExtra.uni +++ b/MdeModulePkg/Universal/Metronome/MetronomeExtra.uni @@ -1,7 +1,7 @@ // /** @file // Metronome Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Metronome/Timer DXE Driver" diff --git a/MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounter.c b/MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounter.c index 2bfede6681..2f9d2df914 100644 --- a/MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounter.c +++ b/MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounter.c @@ -2,7 +2,7 @@ Produce the UEFI boot service GetNextMonotonicCount() and runtime service GetNextHighMonotonicCount(). -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -51,7 +51,7 @@ EFI_EVENT mEfiMtcEvent; The high 32-bit value is nonvolatile and is increased by one on whenever the system resets or the low 32-bit counter overflows. - @param Count Pointer to returned value. + @param Count Pointer to returned value. @retval EFI_SUCCESS The next monotonic count was returned. @retval EFI_DEVICE_ERROR The device is not functioning properly. @@ -123,7 +123,7 @@ MonotonicCounterDriverGetNextMonotonicCount ( This function may only be called at Runtime. - @param HighCount Pointer to returned value. + @param HighCount Pointer to returned value. @retval EFI_SUCCESS The next high monotonic count was returned. @retval EFI_INVALID_PARAMETER HighCount is NULL. diff --git a/MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxeExtra.uni b/MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxeExtra.uni index 4865903eb1..c219c81d25 100644 --- a/MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxeExtra.uni +++ b/MdeModulePkg/Universal/MonotonicCounterRuntimeDxe/MonotonicCounterRuntimeDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // MonotonicCounterRuntimeDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Monotonic Counter DXE Driver" diff --git a/MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.c b/MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.c index 91edcccc0d..cd4e259e7f 100644 --- a/MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.c +++ b/MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.c @@ -1,7 +1,7 @@ /** @file ARP driver functions. - -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+ +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at
@@ -35,7 +35,7 @@ EFI_DRIVER_BINDING_PROTOCOL gArpDriverBinding = { context data. @retval EFI_SUCCESS The arp service context is initialized. - + @retval EFI_UNSUPPORTED The underlayer Snp mode type is not ethernet. Failed to initialize the service context. @retval other Failed to initialize the arp service context. @@ -243,7 +243,7 @@ ArpCleanService ( /** Callback function which provided by user to remove one node in NetDestroyLinkList process. - + @param[in] Entry The entry to be removed. @param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList. @@ -260,7 +260,7 @@ ArpDestroyChildEntryInHandleBuffer ( { ARP_INSTANCE_DATA *Instance; EFI_SERVICE_BINDING_PROTOCOL *ServiceBinding; - + if (Entry == NULL || Context == NULL) { return EFI_INVALID_PARAMETER; } @@ -272,31 +272,31 @@ ArpDestroyChildEntryInHandleBuffer ( } /** - Tests to see if this driver supports a given controller. - - If a child device is provided, it further tests to see if this driver supports + Tests to see if this driver supports a given controller. + + If a child device is provided, it further tests to see if this driver supports creating a handle for the specified child device. @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. - @param[in] ControllerHandle The handle of the controller to test. This handle - must support a protocol interface that supplies + @param[in] ControllerHandle The handle of the controller to test. This handle + must support a protocol interface that supplies an I/O abstraction to the driver. - @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. - This parameter is ignored by device drivers, + @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. + This parameter is ignored by device drivers, and is optional for bus drivers. @retval EFI_SUCCESS The device specified by ControllerHandle and - RemainingDevicePath is supported by the driver + RemainingDevicePath is supported by the driver specified by This. @retval EFI_ALREADY_STARTED The device specified by ControllerHandle and - RemainingDevicePath is already being managed + RemainingDevicePath is already being managed by the driver specified by This. @retval EFI_ACCESS_DENIED The device specified by ControllerHandle and - RemainingDevicePath is already being managed by - a different driver or an application that + RemainingDevicePath is already being managed by + a different driver or an application that requires exclusive acces. Currently not implemented. @retval EFI_UNSUPPORTED The device specified by ControllerHandle and - RemainingDevicePath is not supported by the + RemainingDevicePath is not supported by the driver specified by This. **/ @@ -342,32 +342,32 @@ ArpDriverBindingSupported ( /** - Start this driver on ControllerHandle. - - The Start() function is designed to be invoked from the EFI boot service ConnectController(). - As a result, much of the error checking on the parameters to Start() has been - moved into this common boot service. It is legal to call Start() from other locations, - but the following calling restrictions must be followed or the system behavior + Start this driver on ControllerHandle. + + The Start() function is designed to be invoked from the EFI boot service ConnectController(). + As a result, much of the error checking on the parameters to Start() has been + moved into this common boot service. It is legal to call Start() from other locations, + but the following calling restrictions must be followed or the system behavior will not be deterministic. 1. ControllerHandle must be a valid EFI_HANDLE. - 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally + 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned EFI_DEVICE_PATH_PROTOCOL. - 3. Prior to calling Start(), the Supported() function for the driver specified - by This must have been called with the same calling parameters, and Supported() - must have returned EFI_SUCCESS. + 3. Prior to calling Start(), the Supported() function for the driver specified + by This must have been called with the same calling parameters, and Supported() + must have returned EFI_SUCCESS. @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. - @param[in] ControllerHandle The handle of the controller to start. This handle - must support a protocol interface that supplies + @param[in] ControllerHandle The handle of the controller to start. This handle + must support a protocol interface that supplies an I/O abstraction to the driver. - @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. - This parameter is ignored by device drivers, + @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. + This parameter is ignored by device drivers, and is optional for bus drivers. @retval EFI_SUCCESS The device was started. @retval EFI_DEVICE_ERROR The device could not be started due to a device error. Currently not implemented. - @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of + @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources. @retval Others The driver failded to start the device. @@ -435,13 +435,13 @@ ERROR: /** - Stop this driver on ControllerHandle. - + Stop this driver on ControllerHandle. + Release the control of this controller and remove the IScsi functions. The Stop() - function is designed to be invoked from the EFI boot service DisconnectController(). - As a result, much of the error checking on the parameters to Stop() has been moved - into this common boot service. It is legal to call Stop() from other locations, - but the following calling restrictions must be followed or the system behavior + function is designed to be invoked from the EFI boot service DisconnectController(). + As a result, much of the error checking on the parameters to Stop() has been moved + into this common boot service. It is legal to call Stop() from other locations, + but the following calling restrictions must be followed or the system behavior will not be deterministic. 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this same driver's Start() function. @@ -449,14 +449,14 @@ ERROR: EFI_HANDLE. In addition, all of these handles must have been created in this driver's Start() function, and the Start() function must have called OpenProtocol() on ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER. - + @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. - @param[in] ControllerHandle A handle to the device being stopped. The handle must - support a bus specific I/O protocol for the driver + @param[in] ControllerHandle A handle to the device being stopped. The handle must + support a bus specific I/O protocol for the driver to use to stop the device. @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer. Not used. - @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL + @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL if NumberOfChildren is 0.Not used. @retval EFI_SUCCESS The device was stopped. @@ -542,15 +542,15 @@ ArpDriverBindingStop ( /** Creates a child handle and installs a protocol. - - The CreateChild() function installs a protocol on ChildHandle. - If ChildHandle is a pointer to NULL, then a new handle is created and returned - in ChildHandle. If ChildHandle is not a pointer to NULL, then the protocol + + The CreateChild() function installs a protocol on ChildHandle. + If ChildHandle is a pointer to NULL, then a new handle is created and returned + in ChildHandle. If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle. @param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance. @param ChildHandle Pointer to the handle of the child to create. If it is NULL, - then a new handle is created. If it is a pointer to an existing + then a new handle is created. If it is a pointer to an existing UEFI handle, then the protocol is added to the existing UEFI handle. @retval EFI_SUCCES The protocol was added to ChildHandle. @@ -670,16 +670,16 @@ ERROR: /** Destroys a child handle with a protocol installed on it. - - The DestroyChild() function does the opposite of CreateChild(). It removes a protocol - that was installed by CreateChild() from ChildHandle. If the removed protocol is the + + The DestroyChild() function does the opposite of CreateChild(). It removes a protocol + that was installed by CreateChild() from ChildHandle. If the removed protocol is the last protocol on ChildHandle, then ChildHandle is destroyed. @param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance. @param ChildHandle Handle of the child to destroy @retval EFI_SUCCES The protocol was removed from ChildHandle. - @retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is + @retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed. @retval EFI_INVALID_PARAMETER Child handle is NULL. @retval EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle @@ -793,7 +793,7 @@ ArpServiceBindingDestroyChild ( @param[in] ImageHandle The image handle of the driver. @param[in] SystemTable The system table. - @retval EFI_SUCCESS if the driver binding and component name protocols + @retval EFI_SUCCESS if the driver binding and component name protocols are successfully @retval Others Failed to install the protocols. diff --git a/MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.h b/MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.h index d5fd3ea5c2..2390de6584 100644 --- a/MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.h +++ b/MdeModulePkg/Universal/Network/ArpDxe/ArpDriver.h @@ -1,7 +1,7 @@ /** @file ARP driver header file. - -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+ +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at
@@ -39,31 +39,31 @@ extern EFI_COMPONENT_NAME2_PROTOCOL gArpComponentName2; // Function prototypes for the Drivr Binding Protocol // /** - Tests to see if this driver supports a given controller. - - If a child device is provided, it further tests to see if this driver supports + Tests to see if this driver supports a given controller. + + If a child device is provided, it further tests to see if this driver supports creating a handle for the specified child device. @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. - @param[in] ControllerHandle The handle of the controller to test. This handle - must support a protocol interface that supplies + @param[in] ControllerHandle The handle of the controller to test. This handle + must support a protocol interface that supplies an I/O abstraction to the driver. - @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. - This parameter is ignored by device drivers, + @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. + This parameter is ignored by device drivers, and is optional for bus drivers. @retval EFI_SUCCESS The device specified by ControllerHandle and - RemainingDevicePath is supported by the driver + RemainingDevicePath is supported by the driver specified by This. @retval EFI_ALREADY_STARTED The device specified by ControllerHandle and - RemainingDevicePath is already being managed + RemainingDevicePath is already being managed by the driver specified by This. @retval EFI_ACCESS_DENIED The device specified by ControllerHandle and - RemainingDevicePath is already being managed by - a different driver or an application that + RemainingDevicePath is already being managed by + a different driver or an application that requires exclusive acces. Currently not implemented. @retval EFI_UNSUPPORTED The device specified by ControllerHandle and - RemainingDevicePath is not supported by the + RemainingDevicePath is not supported by the driver specified by This. **/ @@ -76,32 +76,32 @@ ArpDriverBindingSupported ( ); /** - Start this driver on ControllerHandle. - - The Start() function is designed to be invoked from the EFI boot service ConnectController(). - As a result, much of the error checking on the parameters to Start() has been - moved into this common boot service. It is legal to call Start() from other locations, - but the following calling restrictions must be followed or the system behavior + Start this driver on ControllerHandle. + + The Start() function is designed to be invoked from the EFI boot service ConnectController(). + As a result, much of the error checking on the parameters to Start() has been + moved into this common boot service. It is legal to call Start() from other locations, + but the following calling restrictions must be followed or the system behavior will not be deterministic. 1. ControllerHandle must be a valid EFI_HANDLE. - 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally + 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned EFI_DEVICE_PATH_PROTOCOL. - 3. Prior to calling Start(), the Supported() function for the driver specified - by This must have been called with the same calling parameters, and Supported() - must have returned EFI_SUCCESS. + 3. Prior to calling Start(), the Supported() function for the driver specified + by This must have been called with the same calling parameters, and Supported() + must have returned EFI_SUCCESS. @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. - @param[in] ControllerHandle The handle of the controller to start. This handle - must support a protocol interface that supplies + @param[in] ControllerHandle The handle of the controller to start. This handle + must support a protocol interface that supplies an I/O abstraction to the driver. - @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. - This parameter is ignored by device drivers, + @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. + This parameter is ignored by device drivers, and is optional for bus drivers. @retval EFI_SUCCESS The device was started. @retval EFI_DEVICE_ERROR The device could not be started due to a device error. Currently not implemented. - @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of + @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources. @retval Others The driver failded to start the device. @@ -115,13 +115,13 @@ ArpDriverBindingStart ( ); /** - Stop this driver on ControllerHandle. - + Stop this driver on ControllerHandle. + Release the control of this controller and remove the IScsi functions. The Stop() - function is designed to be invoked from the EFI boot service DisconnectController(). - As a result, much of the error checking on the parameters to Stop() has been moved - into this common boot service. It is legal to call Stop() from other locations, - but the following calling restrictions must be followed or the system behavior + function is designed to be invoked from the EFI boot service DisconnectController(). + As a result, much of the error checking on the parameters to Stop() has been moved + into this common boot service. It is legal to call Stop() from other locations, + but the following calling restrictions must be followed or the system behavior will not be deterministic. 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this same driver's Start() function. @@ -129,14 +129,14 @@ ArpDriverBindingStart ( EFI_HANDLE. In addition, all of these handles must have been created in this driver's Start() function, and the Start() function must have called OpenProtocol() on ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER. - + @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. - @param[in] ControllerHandle A handle to the device being stopped. The handle must - support a bus specific I/O protocol for the driver + @param[in] ControllerHandle A handle to the device being stopped. The handle must + support a bus specific I/O protocol for the driver to use to stop the device. @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer. Not used. - @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL + @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL if NumberOfChildren is 0.Not used. @retval EFI_SUCCESS The device was stopped. @@ -154,15 +154,15 @@ ArpDriverBindingStop ( /** Creates a child handle and installs a protocol. - - The CreateChild() function installs a protocol on ChildHandle. - If ChildHandle is a pointer to NULL, then a new handle is created and returned - in ChildHandle. If ChildHandle is not a pointer to NULL, then the protocol + + The CreateChild() function installs a protocol on ChildHandle. + If ChildHandle is a pointer to NULL, then a new handle is created and returned + in ChildHandle. If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle. @param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance. @param ChildHandle Pointer to the handle of the child to create. If it is NULL, - then a new handle is created. If it is a pointer to an existing + then a new handle is created. If it is a pointer to an existing UEFI handle, then the protocol is added to the existing UEFI handle. @retval EFI_SUCCES The protocol was added to ChildHandle. @@ -181,16 +181,16 @@ ArpServiceBindingCreateChild ( /** Destroys a child handle with a protocol installed on it. - - The DestroyChild() function does the opposite of CreateChild(). It removes a protocol - that was installed by CreateChild() from ChildHandle. If the removed protocol is the + + The DestroyChild() function does the opposite of CreateChild(). It removes a protocol + that was installed by CreateChild() from ChildHandle. If the removed protocol is the last protocol on ChildHandle, then ChildHandle is destroyed. @param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance. @param ChildHandle Handle of the child to destroy @retval EFI_SUCCES The protocol was removed from ChildHandle. - @retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is + @retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed. @retval EFI_INVALID_PARAMETER Child handle is NULL. @retval EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle diff --git a/MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf b/MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf index 9dff604a94..85f7982971 100644 --- a/MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf +++ b/MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.inf @@ -5,7 +5,7 @@ # implementation of the Address Resolution Protocol that is described in RFCs 826 # and 1122. # -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at @@ -31,7 +31,7 @@ # # VALID_ARCHITECTURES = IA32 X64 IPF EBC # -# DRIVER_BINDING = gArpDriverBinding +# DRIVER_BINDING = gArpDriverBinding # COMPONENT_NAME = gArpComponentName # COMPONENT_NAME2 = gArpComponentName2 # diff --git a/MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.uni b/MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.uni index 4f02ae151d..15f73b389f 100644 --- a/MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.uni +++ b/MdeModulePkg/Universal/Network/ArpDxe/ArpDxe.uni @@ -5,13 +5,13 @@ // implementation of the Address Resolution Protocol that is described in RFCs 826 // and 1122. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/Network/ArpDxe/ArpDxeExtra.uni b/MdeModulePkg/Universal/Network/ArpDxe/ArpDxeExtra.uni index 9af9fb1ac3..6870da1833 100644 --- a/MdeModulePkg/Universal/Network/ArpDxe/ArpDxeExtra.uni +++ b/MdeModulePkg/Universal/Network/ArpDxe/ArpDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // ArpDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "ARP DXE Driver" diff --git a/MdeModulePkg/Universal/Network/ArpDxe/ArpImpl.c b/MdeModulePkg/Universal/Network/ArpDxe/ArpImpl.c index a02de203c0..af23538ef2 100644 --- a/MdeModulePkg/Universal/Network/ArpDxe/ArpImpl.c +++ b/MdeModulePkg/Universal/Network/ArpDxe/ArpImpl.c @@ -1,7 +1,7 @@ /** @file The implementation of the ARP protocol. - -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+ +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at
@@ -343,7 +343,7 @@ ArpOnFrameRcvd ( /** Process the already sent arp packets. - + @param[in] Context Pointer to the context data registerd to the Event. diff --git a/MdeModulePkg/Universal/Network/ArpDxe/ArpImpl.h b/MdeModulePkg/Universal/Network/ArpDxe/ArpImpl.h index a5dce7d9a5..248c16652c 100644 --- a/MdeModulePkg/Universal/Network/ArpDxe/ArpImpl.h +++ b/MdeModulePkg/Universal/Network/ArpDxe/ArpImpl.h @@ -1,7 +1,7 @@ /** @file EFI Address Resolution Protocol (ARP) Protocol interface header file. -Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at
@@ -94,13 +94,13 @@ typedef enum { /** Returns a pointer to the ARP_INSTANCE_DATA structure from the input a. - - If the signatures matches, then a pointer to the data structure that contains + + If the signatures matches, then a pointer to the data structure that contains a specified field of that data structure is returned. - - @param a Pointer to the field specified by ArpProto within a data + + @param a Pointer to the field specified by ArpProto within a data structure of type ARP_INSTANCE_DATA. - + **/ #define ARP_INSTANCE_DATA_FROM_THIS(a) \ CR ( \ @@ -130,13 +130,13 @@ typedef struct { /** Returns a pointer to the ARP_SERVICE_DATA structure from the input a. - - If the signatures matches, then a pointer to the data structure that contains + + If the signatures matches, then a pointer to the data structure that contains a specified field of that data structure is returned. - - @param a Pointer to the field specified by ServiceBinding within + + @param a Pointer to the field specified by ServiceBinding within a data structure of type ARP_SERVICE_DATA. - + **/ #define ARP_SERVICE_DATA_FROM_THIS(a) \ CR ( \ @@ -228,13 +228,13 @@ typedef struct { /** This function is used to assign a station address to the ARP cache for this instance of the ARP driver. - - Each ARP instance has one station address. The EFI_ARP_PROTOCOL driver will - respond to ARP requests that match this registered station address. A call to + + Each ARP instance has one station address. The EFI_ARP_PROTOCOL driver will + respond to ARP requests that match this registered station address. A call to this function with the ConfigData field set to NULL will reset this ARP instance. - - Once a protocol type and station address have been assigned to this ARP instance, - all the following ARP functions will use this information. Attempting to change + + Once a protocol type and station address have been assigned to this ARP instance, + all the following ARP functions will use this information. Attempting to change the protocol type or station address to a configured ARP instance will result in errors. @param This Pointer to the EFI_ARP_PROTOCOL instance. @@ -263,17 +263,17 @@ ArpConfigure ( /** This function is used to insert entries into the ARP cache. - ARP cache entries are typically inserted and updated by network protocol drivers - as network traffic is processed. Most ARP cache entries will time out and be - deleted if the network traffic stops. ARP cache entries that were inserted + ARP cache entries are typically inserted and updated by network protocol drivers + as network traffic is processed. Most ARP cache entries will time out and be + deleted if the network traffic stops. ARP cache entries that were inserted by the Add() function may be static (will not time out) or dynamic (will time out). - Default ARP cache timeout values are not covered in most network protocol - specifications (although RFC 1122 comes pretty close) and will only be - discussed in general in this specification. The timeout values that are - used in the EFI Sample Implementation should be used only as a guideline. - Final product implementations of the EFI network stack should be tuned for + Default ARP cache timeout values are not covered in most network protocol + specifications (although RFC 1122 comes pretty close) and will only be + discussed in general in this specification. The timeout values that are + used in the EFI Sample Implementation should be used only as a guideline. + Final product implementations of the EFI network stack should be tuned for their expected network environments. - + @param This Pointer to the EFI_ARP_PROTOCOL instance. @param DenyFlag Set to TRUE if this entry is a deny entry. Set to FALSE if this entry is a normal entry. @@ -319,14 +319,14 @@ ArpAdd ( /** This function searches the ARP cache for matching entries and allocates a buffer into which those entries are copied. - - The first part of the allocated buffer is EFI_ARP_FIND_DATA, following which + + The first part of the allocated buffer is EFI_ARP_FIND_DATA, following which are protocol address pairs and hardware address pairs. - When finding a specific protocol address (BySwAddress is TRUE and AddressBuffer - is not NULL), the ARP cache timeout for the found entry is reset if Refresh is - set to TRUE. If the found ARP cache entry is a permanent entry, it is not + When finding a specific protocol address (BySwAddress is TRUE and AddressBuffer + is not NULL), the ARP cache timeout for the found entry is reset if Refresh is + set to TRUE. If the found ARP cache entry is a permanent entry, it is not affected by Refresh. - + @param This Pointer to the EFI_ARP_PROTOCOL instance. @param BySwAddress Set to TRUE to look for matching software protocol addresses. Set to FALSE to look for matching @@ -439,13 +439,13 @@ ArpRequest ( /** This function aborts the previous ARP request (identified by This, TargetSwAddress and ResolvedEvent) that is issued by EFI_ARP_PROTOCOL.Request(). - - If the request is in the internal ARP request queue, the request is aborted - immediately and its ResolvedEvent is signaled. Only an asynchronous address - request needs to be canceled. If TargeSwAddress and ResolveEvent are both - NULL, all the pending asynchronous requests that have been issued by This + + If the request is in the internal ARP request queue, the request is aborted + immediately and its ResolvedEvent is signaled. Only an asynchronous address + request needs to be canceled. If TargeSwAddress and ResolveEvent are both + NULL, all the pending asynchronous requests that have been issued by This instance will be cancelled and their corresponding events will be signaled. - + @param This Pointer to the EFI_ARP_PROTOCOL instance. @param TargetSwAddress Pointer to the protocol address in previous request session. @@ -673,7 +673,7 @@ ArpOnFrameRcvd ( /** Process the already sent arp packets. - + @param[in] Context Pointer to the context data registerd to the Event. diff --git a/MdeModulePkg/Universal/Network/ArpDxe/ArpMain.c b/MdeModulePkg/Universal/Network/ArpDxe/ArpMain.c index abe02c1af4..6922621105 100644 --- a/MdeModulePkg/Universal/Network/ArpDxe/ArpMain.c +++ b/MdeModulePkg/Universal/Network/ArpDxe/ArpMain.c @@ -1,7 +1,7 @@ /** @file Implementation of EFI Address Resolution Protocol (ARP) Protocol interface functions. - -Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.
+ +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at
@@ -18,13 +18,13 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** This function is used to assign a station address to the ARP cache for this instance of the ARP driver. - - Each ARP instance has one station address. The EFI_ARP_PROTOCOL driver will - respond to ARP requests that match this registered station address. A call to + + Each ARP instance has one station address. The EFI_ARP_PROTOCOL driver will + respond to ARP requests that match this registered station address. A call to this function with the ConfigData field set to NULL will reset this ARP instance. - - Once a protocol type and station address have been assigned to this ARP instance, - all the following ARP functions will use this information. Attempting to change + + Once a protocol type and station address have been assigned to this ARP instance, + all the following ARP functions will use this information. Attempting to change the protocol type or station address to a configured ARP instance will result in errors. @param This Pointer to the EFI_ARP_PROTOCOL instance. @@ -83,17 +83,17 @@ ArpConfigure ( /** This function is used to insert entries into the ARP cache. - ARP cache entries are typically inserted and updated by network protocol drivers - as network traffic is processed. Most ARP cache entries will time out and be - deleted if the network traffic stops. ARP cache entries that were inserted + ARP cache entries are typically inserted and updated by network protocol drivers + as network traffic is processed. Most ARP cache entries will time out and be + deleted if the network traffic stops. ARP cache entries that were inserted by the Add() function may be static (will not time out) or dynamic (will time out). - Default ARP cache timeout values are not covered in most network protocol - specifications (although RFC 1122 comes pretty close) and will only be - discussed in general in this specification. The timeout values that are - used in the EFI Sample Implementation should be used only as a guideline. - Final product implementations of the EFI network stack should be tuned for + Default ARP cache timeout values are not covered in most network protocol + specifications (although RFC 1122 comes pretty close) and will only be + discussed in general in this specification. The timeout values that are + used in the EFI Sample Implementation should be used only as a guideline. + Final product implementations of the EFI network stack should be tuned for their expected network environments. - + @param This Pointer to the EFI_ARP_PROTOCOL instance. @param DenyFlag Set to TRUE if this entry is a deny entry. Set to FALSE if this entry is a normal entry. @@ -281,14 +281,14 @@ UNLOCK_EXIT: /** This function searches the ARP cache for matching entries and allocates a buffer into which those entries are copied. - - The first part of the allocated buffer is EFI_ARP_FIND_DATA, following which + + The first part of the allocated buffer is EFI_ARP_FIND_DATA, following which are protocol address pairs and hardware address pairs. - When finding a specific protocol address (BySwAddress is TRUE and AddressBuffer - is not NULL), the ARP cache timeout for the found entry is reset if Refresh is - set to TRUE. If the found ARP cache entry is a permanent entry, it is not + When finding a specific protocol address (BySwAddress is TRUE and AddressBuffer + is not NULL), the ARP cache timeout for the found entry is reset if Refresh is + set to TRUE. If the found ARP cache entry is a permanent entry, it is not affected by Refresh. - + @param This Pointer to the EFI_ARP_PROTOCOL instance. @param BySwAddress Set to TRUE to look for matching software protocol addresses. Set to FALSE to look for matching @@ -678,13 +678,13 @@ SIGNAL_USER: /** This function aborts the previous ARP request (identified by This, TargetSwAddress and ResolvedEvent) that is issued by EFI_ARP_PROTOCOL.Request(). - - If the request is in the internal ARP request queue, the request is aborted - immediately and its ResolvedEvent is signaled. Only an asynchronous address - request needs to be canceled. If TargeSwAddress and ResolveEvent are both - NULL, all the pending asynchronous requests that have been issued by This + + If the request is in the internal ARP request queue, the request is aborted + immediately and its ResolvedEvent is signaled. Only an asynchronous address + request needs to be canceled. If TargeSwAddress and ResolveEvent are both + NULL, all the pending asynchronous requests that have been issued by This instance will be cancelled and their corresponding events will be signaled. - + @param This Pointer to the EFI_ARP_PROTOCOL instance. @param TargetSwAddress Pointer to the protocol address in previous request session. diff --git a/MdeModulePkg/Universal/Network/ArpDxe/ComponentName.c b/MdeModulePkg/Universal/Network/ArpDxe/ComponentName.c index ee47fb1ef7..240c1e7c41 100644 --- a/MdeModulePkg/Universal/Network/ArpDxe/ComponentName.c +++ b/MdeModulePkg/Universal/Network/ArpDxe/ComponentName.c @@ -1,7 +1,7 @@ /** @file UEFI Component Name(2) protocol implementation for ArpDxe driver. -Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at
@@ -187,10 +187,10 @@ ArpComponentNameGetControllerName ( if (ChildHandle == NULL) { return EFI_UNSUPPORTED; } - - // - // Make sure this driver produced ChildHandle - // + + // + // Make sure this driver produced ChildHandle + // Status = EfiTestChildHandle ( ControllerHandle, ChildHandle, @@ -200,9 +200,9 @@ ArpComponentNameGetControllerName ( return Status; } - // - // Retrieve an instance of a produced protocol from ChildHandle - // + // + // Retrieve an instance of a produced protocol from ChildHandle + // Status = gBS->OpenProtocol ( ChildHandle, &gEfiArpProtocolGuid, diff --git a/MdeModulePkg/Universal/Network/Dhcp4Dxe/ComponentName.c b/MdeModulePkg/Universal/Network/Dhcp4Dxe/ComponentName.c index 2ea07608f1..0b4290617f 100644 --- a/MdeModulePkg/Universal/Network/Dhcp4Dxe/ComponentName.c +++ b/MdeModulePkg/Universal/Network/Dhcp4Dxe/ComponentName.c @@ -1,6 +1,6 @@ /** @file -Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -249,11 +249,11 @@ DhcpComponentNameGetDriverName ( @param Dhcp4[in] A pointer to the EFI_DHCP4_PROTOCOL. - + @retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully. @retval EFI_INVALID_PARAMETER The input parameter is invalid. @retval EFI_DEVICE_ERROR DHCP is in unknown state. - + **/ EFI_STATUS UpdateName ( @@ -274,16 +274,16 @@ UpdateName ( if (EFI_ERROR (Status)) { return Status; } - + if (gDhcpControllerNameTable != NULL) { FreeUnicodeStringTable (gDhcpControllerNameTable); gDhcpControllerNameTable = NULL; } - + if (Dhcp4ModeData.State > Dhcp4Rebooting) { return EFI_DEVICE_ERROR; } - + Status = AddUnicodeString2 ( "eng", gDhcp4ComponentName.SupportedLanguages, @@ -294,7 +294,7 @@ UpdateName ( if (EFI_ERROR (Status)) { return Status; } - + return AddUnicodeString2 ( "en", gDhcp4ComponentName2.SupportedLanguages, @@ -391,10 +391,10 @@ DhcpComponentNameGetControllerName ( if (ChildHandle == NULL) { return EFI_UNSUPPORTED; } - - // - // Make sure this driver produced ChildHandle - // + + // + // Make sure this driver produced ChildHandle + // Status = EfiTestChildHandle ( ControllerHandle, ChildHandle, @@ -404,9 +404,9 @@ DhcpComponentNameGetControllerName ( return Status; } - // - // Retrieve an instance of a produced protocol from ChildHandle - // + // + // Retrieve an instance of a produced protocol from ChildHandle + // Status = gBS->OpenProtocol ( ChildHandle, &gEfiDhcp4ProtocolGuid, diff --git a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Driver.c b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Driver.c index 1f1e21c3cb..733af5edf8 100644 --- a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Driver.c +++ b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Driver.c @@ -1,6 +1,6 @@ /** @file -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -355,7 +355,7 @@ ON_ERROR: /** Callback function which provided by user to remove one node in NetDestroyLinkList process. - + @param[in] Entry The entry to be removed. @param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList. @@ -445,7 +445,7 @@ Dhcp4DriverBindingStop ( if (!IsListEmpty (&DhcpSb->Children)) { // // Destroy all the children instances before destory the service. - // + // List = &DhcpSb->Children; Status = NetDestroyLinkList ( List, @@ -481,7 +481,7 @@ Dhcp4DriverBindingStop ( gDhcpControllerNameTable = NULL; } FreePool (DhcpSb); - + Status = EFI_SUCCESS; } diff --git a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Driver.h b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Driver.h index a74cb64488..ef45d748fc 100644 --- a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Driver.h +++ b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Driver.h @@ -1,7 +1,7 @@ /** @file Header for the DHCP4 driver. - -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+ +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -78,7 +78,7 @@ Dhcp4DriverBindingStart ( restrictions for this service. DisconnectController() must follow these calling restrictions. If any other agent wishes to call Stop() it must also follow these calling restrictions. - + @param[in] This Protocol instance pointer. @param[in] ControllerHandle Handle of device to stop driver on @param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number of @@ -100,14 +100,14 @@ Dhcp4DriverBindingStop ( /** Creates a child handle and installs a protocol. - - The CreateChild() function installs a protocol on ChildHandle. - If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle. + + The CreateChild() function installs a protocol on ChildHandle. + If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle. If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle. @param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance. @param ChildHandle Pointer to the handle of the child to create. If it is NULL, - then a new handle is created. If it is a pointer to an existing UEFI handle, + then a new handle is created. If it is a pointer to an existing UEFI handle, then the protocol is added to the existing UEFI handle. @retval EFI_SUCCES The protocol was added to ChildHandle. @@ -126,9 +126,9 @@ Dhcp4ServiceBindingCreateChild ( /** Destroys a child handle with a protocol installed on it. - - The DestroyChild() function does the opposite of CreateChild(). It removes a protocol - that was installed by CreateChild() from ChildHandle. If the removed protocol is the + + The DestroyChild() function does the opposite of CreateChild(). It removes a protocol + that was installed by CreateChild() from ChildHandle. If the removed protocol is the last protocol on ChildHandle, then ChildHandle is destroyed. @param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance. diff --git a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf index 9b6c9c1dcc..e41bddb017 100644 --- a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf +++ b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.inf @@ -5,7 +5,7 @@ # capability to collect configuration information for the EFI IPv4 Protocol drivers # and to provide DHCPv4 server and PXE boot server discovery services. # -# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at @@ -31,7 +31,7 @@ # # VALID_ARCHITECTURES = IA32 X64 IPF EBC # -# DRIVER_BINDING = gDhcp4DriverBinding +# DRIVER_BINDING = gDhcp4DriverBinding # COMPONENT_NAME = gDhcp4ComponentName # COMPONENT_NAME2 = gDhcp4ComponentName2 # diff --git a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.uni b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.uni index 1684cc592a..7330aaefda 100644 --- a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.uni +++ b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Dxe.uni @@ -5,13 +5,13 @@ // capability to collect configuration information for the EFI IPv4 Protocol drivers // and to provide DHCPv4 server and PXE boot server discovery services. // -// Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4DxeExtra.uni b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4DxeExtra.uni index dca59ae452..d9aaf47751 100644 --- a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4DxeExtra.uni +++ b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4DxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // Dhcp4Dxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "DHCP v4 DXE Driver" diff --git a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.c b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.c index 9e496ef027..4cdebe68e7 100644 --- a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.c +++ b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.c @@ -1203,9 +1203,9 @@ Dhcp4InstanceConfigUdpIo ( EFI_DHCP4_TRANSMIT_RECEIVE_TOKEN *Token; EFI_UDP4_CONFIG_DATA UdpConfigData; IP4_ADDR ClientAddr; - IP4_ADDR Ip; - INTN Class; - IP4_ADDR SubnetMask; + IP4_ADDR Ip; + INTN Class; + IP4_ADDR SubnetMask; Instance = (DHCP_PROTOCOL *) Context; DhcpSb = Instance->Service; @@ -1238,7 +1238,7 @@ Dhcp4InstanceConfigUdpIo ( if (Class >= IP4_ADDR_CLASSE) { return EFI_INVALID_PARAMETER; } - + SubnetMask = gIp4AllMasks[Class << 3]; } else { SubnetMask = DhcpSb->Netmask; @@ -1548,7 +1548,7 @@ EfiDhcp4TransmitReceive ( } ClientAddr = EFI_NTOHL (Token->Packet->Dhcp4.Header.ClientAddr); - + if (ClientAddr == 0) { return EFI_NO_MAPPING; } diff --git a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.h b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.h index ccca4a29af..0ae03ee489 100644 --- a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.h +++ b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Impl.h @@ -5,7 +5,7 @@ RFC 2132: DHCP Options and BOOTP Vendor Extensions RFC 1534: Interoperation Between DHCP and BOOTP RFC 3396: Encoding Long Options in DHCP. - + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License diff --git a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c index 9532ca8f47..98a22a77b4 100644 --- a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c +++ b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.c @@ -1,6 +1,6 @@ /** @file EFI DHCP protocol implementation. - + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -41,7 +41,7 @@ DhcpInitRequest ( // Clear initial time to make sure that elapsed-time is set to 0 for first Discover or REQUEST message. // DhcpSb->ActiveChild->ElaspedTime= 0; - + if (DhcpSb->DhcpState == Dhcp4Init) { DhcpSetState (DhcpSb, Dhcp4Selecting, FALSE); Status = DhcpSendMessage (DhcpSb, NULL, NULL, DHCP_MSG_DISCOVER, NULL); @@ -1381,13 +1381,13 @@ DhcpSendMessage ( } ASSERT (UdpIo != NULL); - + Status = UdpIoSendDatagram ( - UdpIo, - Wrap, - &EndPoint, - NULL, - DhcpOnPacketSent, + UdpIo, + Wrap, + &EndPoint, + NULL, + DhcpOnPacketSent, DhcpSb ); @@ -1509,7 +1509,7 @@ DhcpOnTimerTick ( if (Instance != NULL && Instance->ElaspedTime < 0xffff) { Instance->ElaspedTime++; } - + // // Check the retransmit timer // @@ -1531,7 +1531,7 @@ DhcpOnTimerTick ( goto ON_EXIT; } } - + if (++DhcpSb->CurRetry < DhcpSb->MaxRetries) { // // Still has another try @@ -1570,7 +1570,7 @@ DhcpOnTimerTick ( goto END_SESSION; } } - + // // If an address has been acquired, check whether need to // refresh or whether it has expired. @@ -1602,8 +1602,8 @@ DhcpOnTimerTick ( if (Instance != NULL) { Instance->ElaspedTime= 0; - } - + } + Status = DhcpSendMessage ( DhcpSb, DhcpSb->Selected, @@ -1626,7 +1626,7 @@ DhcpOnTimerTick ( if (Instance != NULL) { Instance->ElaspedTime= 0; - } + } Status = DhcpSendMessage ( DhcpSb, @@ -1648,7 +1648,7 @@ ON_EXIT: // NET_LIST_FOR_EACH_SAFE (Entry, Next, &DhcpSb->Children) { Instance = NET_LIST_USER_STRUCT (Entry, DHCP_PROTOCOL, Link); - + if ((Instance != NULL) && (Instance->Token != NULL)) { Instance->Timeout--; if (Instance->Timeout == 0) { diff --git a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.h b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.h index 1e85651554..f515752781 100644 --- a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.h +++ b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Io.h @@ -1,7 +1,7 @@ /** @file The DHCP4 protocol implementation. - -Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.
+ +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Option.c b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Option.c index 485c9c98ed..dd89beac52 100644 --- a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Option.c +++ b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Option.c @@ -1,7 +1,7 @@ /** @file Function to validate, parse, process the DHCP options. - -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+ +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Option.h b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Option.h index 02ffa25aba..a22de6463c 100644 --- a/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Option.h +++ b/MdeModulePkg/Universal/Network/Dhcp4Dxe/Dhcp4Option.h @@ -1,7 +1,7 @@ /** @file To validate, parse and process the DHCP options. - -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+ +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -22,7 +22,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #define DHCP_OPTION_MAGIC 0x63538263 // Network byte order #define DHCP_MAX_OPTIONS 256 - + // // DHCP option types, this is used to validate the DHCP options. // diff --git a/MdeModulePkg/Universal/Network/DpcDxe/Dpc.c b/MdeModulePkg/Universal/Network/DpcDxe/Dpc.c index c605f721eb..dd88ab7a2f 100644 --- a/MdeModulePkg/Universal/Network/DpcDxe/Dpc.c +++ b/MdeModulePkg/Universal/Network/DpcDxe/Dpc.c @@ -1,6 +1,6 @@ /** @file -Copyright (c) 2007 - 2008, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -337,7 +337,7 @@ DpcDriverEntryPoint ( // Status = gBS->InstallMultipleProtocolInterfaces ( &mDpcHandle, - &gEfiDpcProtocolGuid, + &gEfiDpcProtocolGuid, &mDpc, NULL ); diff --git a/MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.uni b/MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.uni index db33b33b40..9c0c96bd82 100644 --- a/MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.uni +++ b/MdeModulePkg/Universal/Network/DpcDxe/DpcDxe.uni @@ -3,13 +3,13 @@ // // This module produces Deferred Procedure Call Protocol. // -// Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/Network/DpcDxe/DpcDxeExtra.uni b/MdeModulePkg/Universal/Network/DpcDxe/DpcDxeExtra.uni index 7c57022cb8..0a53917650 100644 --- a/MdeModulePkg/Universal/Network/DpcDxe/DpcDxeExtra.uni +++ b/MdeModulePkg/Universal/Network/DpcDxe/DpcDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // DpcDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Deferred Procedure Call DXE Driver" diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/ComponentName.c b/MdeModulePkg/Universal/Network/IScsiDxe/ComponentName.c index 063b372292..3f561e9343 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/ComponentName.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/ComponentName.c @@ -1,7 +1,7 @@ /** @file UEFI Component Name(2) protocol implementation for iSCSI. -Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -33,7 +33,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_COMPONENT_NAME2_PROTOCOL gIScsiComponentNam }; GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mIScsiDriverNameTable[] = { - {"eng;en", L"iSCSI Driver"}, + {"eng;en", L"iSCSI Driver"}, {NULL, NULL} }; @@ -48,7 +48,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE *mIScsiControllerNameTab returned in DriverName, and EFI_SUCCESS is returned. If the driver specified by This does not support the language specified by Language, then EFI_UNSUPPORTED is returned. - + @param[in] This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. @param[in] Language A pointer to a three character ISO 639-2 language identifier. This is the language of the driver name that that the caller @@ -88,11 +88,11 @@ IScsiComponentNameGetDriverName ( Update the component name for the iSCSI instance. @param[in] IScsiExtScsiPassThru A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance. - + @retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully. @retval EFI_INVALID_PARAMETER The input parameter is invalid. @retval EFI_UNSUPPORTED Can't get the corresponding NIC info from the Controller handle. - + **/ EFI_STATUS UpdateName ( @@ -110,7 +110,7 @@ UpdateName ( if (IScsiExtScsiPassThru == NULL) { return EFI_INVALID_PARAMETER; } - + Private = ISCSI_DRIVER_DATA_FROM_EXT_SCSI_PASS_THRU (IScsiExtScsiPassThru); // @@ -122,7 +122,7 @@ UpdateName ( } VlanId = NetLibGetVlanId (Private->Controller); IScsiMacAddrToStr (&MacAddress, (UINT32) HwAddressSize, VlanId, MacString); - + UnicodeSPrint ( HandleName, sizeof (HandleName), @@ -183,7 +183,7 @@ UpdateName ( @retval EFI_SUCCESS The Unicode string for the user readable name in the language specified by Language for the driver - specified by This was returned in DriverName. + specified by This was returned in DriverName. @retval EFI_INVALID_PARAMETER ControllerHandle is NULL. @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE. @retval EFI_INVALID_PARAMETER Language is NULL. @@ -271,7 +271,7 @@ IScsiComponentNameGetControllerName ( return Status; } } - + return LookupUnicodeString2 ( Language, This->SupportedLanguages, diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/ComponentName.h b/MdeModulePkg/Universal/Network/IScsiDxe/ComponentName.h index b400abaa41..ee371d2674 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/ComponentName.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/ComponentName.h @@ -1,7 +1,7 @@ /** @file The header file of UEFI Component Name(2) protocol. -Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -34,7 +34,7 @@ extern EFI_COMPONENT_NAME_PROTOCOL gIScsiComponentName; returned in DriverName, and EFI_SUCCESS is returned. If the driver specified by This does not support the language specified by Language, then EFI_UNSUPPORTED is returned. - + @param[in] This A pointer to the EFI_COMPONENT_NAME_PROTOCOL instance. @param[in] Language A pointer to a three characters ISO 639-2 language identifier. This is the language of the driver name that that the caller @@ -89,7 +89,7 @@ IScsiComponentNameGetDriverName ( @retval EFI_SUCCESS The Unicode string for the user readable name in the language specified by Language for the driver - specified by This was returned in DriverName. + specified by This was returned in DriverName. @retval EFI_INVALID_PARAMETER ControllerHandle is NULL. @retval EFI_INVALID_PARAMETER ChildHandle is not NULL and it is not a valid EFI_HANDLE. @retval EFI_INVALID_PARAMETER Language is NULL. @@ -109,7 +109,7 @@ IScsiComponentNameGetControllerName ( IN CHAR8 *Language, OUT CHAR16 **ControllerName ); - + // // EFI iSCSI Initiator Name Protocol for IScsi driver. // diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsi4Dxe.uni b/MdeModulePkg/Universal/Network/IScsiDxe/IScsi4Dxe.uni index 80bdc2c7e2..d3c020e45d 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsi4Dxe.uni +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsi4Dxe.uni @@ -6,13 +6,13 @@ // data over TCP/IP. It installs EFI HII Configuration Access Protocol to provide // one way to configurate the iSCSI setting. // -// Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsi4DxeExtra.uni b/MdeModulePkg/Universal/Network/IScsiDxe/IScsi4DxeExtra.uni index 9b717d49d3..5ec75820a6 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsi4DxeExtra.uni +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsi4DxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // IScsi4Dxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "iSCSI DXE Driver" diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.h index f6a64e56da..14a5658f75 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiCHAP.h @@ -1,7 +1,7 @@ /** @file The header file of CHAP configuration. -Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -29,9 +29,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /// /// MD5_HASHSIZE /// -#define ISCSI_CHAP_RSP_LEN 16 +#define ISCSI_CHAP_RSP_LEN 16 -#define ISCSI_CHAP_INITIAL 0 +#define ISCSI_CHAP_INITIAL 0 #define ISCSI_CHAP_STEP_ONE 1 #define ISCSI_CHAP_STEP_TWO 2 #define ISCSI_CHAP_STEP_THREE 3 @@ -73,7 +73,7 @@ typedef struct _ISCSI_CHAP_AUTH_DATA { /** This function checks the received iSCSI Login Response during the security negotiation stage. - + @param[in] Conn The iSCSI connection. @retval EFI_SUCCESS The Login Response passed the CHAP validation. diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c index ea727af1ff..cb1eff1b69 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.c @@ -1,7 +1,7 @@ /** @file Helper functions for configuring or getting the parameters relating to iSCSI. -Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -39,7 +39,7 @@ HII_VENDOR_DEVICE_PATH mIScsiHiiVendorDevicePath = { { END_DEVICE_PATH_TYPE, END_ENTIRE_DEVICE_PATH_SUBTYPE, - { + { (UINT8) (END_DEVICE_PATH_LENGTH), (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8) } @@ -180,7 +180,7 @@ IScsiConvertIsIdToString ( Update the list of iSCSI devices the iSCSI driver is controlling. @retval EFI_SUCCESS The callback successfully handled the action. - @retval Others Other errors as indicated. + @retval Others Other errors as indicated. **/ EFI_STATUS IScsiUpdateDeviceList ( @@ -445,7 +445,7 @@ IScsiConvertDeviceConfigDataToIfrNvData ( would result in this type of error. In this case, the Progress parameter would be - set to NULL. + set to NULL. @retval EFI_NOT_FOUND Routing data doesn't match any known driver. Progress set to the first character in the routing header. @@ -579,7 +579,7 @@ IScsiFormExtractConfig ( @param[in] This Points to the EFI_HII_CONFIG_ACCESS_PROTOCOL. @param[in] Configuration A null-terminated Unicode string in - format. + format. @param[out] Progress A pointer to a string filled in with the offset of the most recent '&' before the first failing name / value pair (or the @@ -589,7 +589,7 @@ IScsiFormExtractConfig ( successful. @retval EFI_SUCCESS The results have been distributed or are - awaiting distribution. + awaiting distribution. @retval EFI_OUT_OF_RESOURCES Not enough memory to store the parts of the results that must be stored awaiting possible future @@ -634,7 +634,7 @@ IScsiFormRouteConfig ( @param[in] Action Specifies the type of action taken by the browser. @param[in] QuestionId A unique value which is sent to the original exporting driver so that it can identify the type - of data to expect. The format of the data tends to + of data to expect. The format of the data tends to vary based on the opcode that enerated the callback. @param[in] Type The type of value for the question. @param[in] Value A pointer to the data being sent to the original @@ -648,8 +648,8 @@ IScsiFormRouteConfig ( @retval EFI_DEVICE_ERROR The variable could not be saved. @retval EFI_UNSUPPORTED The specified Action is not supported by the callback.Currently not implemented. - @retval EFI_INVALID_PARAMETERS Passing in wrong parameter. - @retval Others Other errors as indicated. + @retval EFI_INVALID_PARAMETERS Passing in wrong parameter. + @retval Others Other errors as indicated. **/ EFI_STATUS EFIAPI @@ -711,7 +711,7 @@ IScsiFormCallback ( Private->Current = ConfigFormEntry; } } else if (Action == EFI_BROWSER_ACTION_CHANGED) { - switch (QuestionId) { + switch (QuestionId) { case KEY_INITIATOR_NAME: IScsiUnicodeStrToAsciiStr (IfrNvData->InitiatorName, IScsiName); BufferSize = AsciiStrSize (IScsiName); @@ -727,8 +727,8 @@ IScsiFormCallback ( case KEY_LOCAL_IP: IScsiUnicodeStrToAsciiStr (IfrNvData->LocalIp, Ip4String); Status = IScsiAsciiStrToIp (Ip4String, &HostIp.v4); - if (EFI_ERROR (Status) || - ((Private->Current->SessionConfigData.SubnetMask.Addr[0] != 0) && + if (EFI_ERROR (Status) || + ((Private->Current->SessionConfigData.SubnetMask.Addr[0] != 0) && !NetIp4IsUnicast (NTOHL (HostIp.Addr[0]), NTOHL(*(UINT32*)Private->Current->SessionConfigData.SubnetMask.Addr)))) { CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, L"Invalid IP address!", NULL); Status = EFI_INVALID_PARAMETER; @@ -753,9 +753,9 @@ IScsiFormCallback ( case KEY_GATE_WAY: IScsiUnicodeStrToAsciiStr (IfrNvData->Gateway, Ip4String); Status = IScsiAsciiStrToIp (Ip4String, &Gateway.v4); - if (EFI_ERROR (Status) || - ((Gateway.Addr[0] != 0) && - (Private->Current->SessionConfigData.SubnetMask.Addr[0] != 0) && + if (EFI_ERROR (Status) || + ((Gateway.Addr[0] != 0) && + (Private->Current->SessionConfigData.SubnetMask.Addr[0] != 0) && !NetIp4IsUnicast (NTOHL (Gateway.Addr[0]), NTOHL(*(UINT32*)Private->Current->SessionConfigData.SubnetMask.Addr)))) { CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, L"Invalid Gateway!", NULL); Status = EFI_INVALID_PARAMETER; @@ -944,9 +944,9 @@ IScsiFormCallback ( // HiiSetBrowserData (&gIp4IScsiConfigGuid, mVendorStorageName, sizeof (ISCSI_CONFIG_IFR_NVDATA), (UINT8 *) IfrNvData, NULL); } - + FreePool (IfrNvData); - + return Status; } @@ -1033,12 +1033,12 @@ IScsiConfigUpdateForm ( ); if (EFI_ERROR (Status)) { ZeroMem (&ConfigFormEntry->SessionConfigData, sizeof (ConfigFormEntry->SessionConfigData)); - + // // Generate OUI-format ISID based on MAC address. // CopyMem (ConfigFormEntry->SessionConfigData.IsId, &MacAddress, 6); - ConfigFormEntry->SessionConfigData.IsId[0] = + ConfigFormEntry->SessionConfigData.IsId[0] = (UINT8) (ConfigFormEntry->SessionConfigData.IsId[0] & 0x3F); } // @@ -1189,7 +1189,7 @@ IScsiConfigFormInit ( NULL ); ASSERT_EFI_ERROR (Status); - + // // Publish our HII data // @@ -1216,7 +1216,7 @@ IScsiConfigFormInit ( free the resources used. @param[in] DriverBindingHandle The iSCSI driverbinding handle. - + @retval EFI_SUCCESS The iSCSI configuration form is unloaded. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. **/ diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.h index ef881d8827..c3d07f6f48 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfig.h @@ -1,7 +1,7 @@ /** @file The header file of IScsiConfig.c. -Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -35,23 +35,23 @@ extern UINT8 IScsi4DxeStrings[]; /** - If the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is clear, + If the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is clear, then this macro return a pointer to a data structure ISCSI_FORM_CALLBACK_INFO. - If the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is set, - The Signature field of the data structure ISCSI_FORM_CALLBACK_INFO - is compared to TestSignature. If the signatures match, then a pointer - to the pointer to a data structure ISCSI_FORM_CALLBACK_INFO is returned. - If the signatures do not match, then DebugAssert() is called with a description - of "CR has a bad signature" and Callback is returned. + If the DEBUG_PROPERTY_DEBUG_ASSERT_ENABLED bit of PcdDebugProperyMask is set, + The Signature field of the data structure ISCSI_FORM_CALLBACK_INFO + is compared to TestSignature. If the signatures match, then a pointer + to the pointer to a data structure ISCSI_FORM_CALLBACK_INFO is returned. + If the signatures do not match, then DebugAssert() is called with a description + of "CR has a bad signature" and Callback is returned. If the data type ISCSI_FORM_CALLBACK_INFO_SIGNATURE does not contain the field specified by Callback, then the module will not compile. - If ISCSI_FORM_CALLBACK_INFO_SIGNATURE does not contain a field called Signature, + If ISCSI_FORM_CALLBACK_INFO_SIGNATURE does not contain a field called Signature, then the module will not compile. - @param Callback Pointer to the specified field within the data + @param Callback Pointer to the specified field within the data structure ISCSI_FORM_CALLBACK_INFO. @return A pointer to the pointer to a data structure ISCSI_FORM_CALLBACK_INFO. @retval Others Some unexpected error happened. @@ -154,7 +154,7 @@ IScsiConfigFormInit ( free the resources used. @param[in] DriverBindingHandle The iSCSI driverbinding handle. - + @retval EFI_SUCCESS The iSCSI configuration form is unloaded. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. **/ diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigDxe.vfr b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigDxe.vfr index 2456c51c8c..9e28d81fb4 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigDxe.vfr +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigDxe.vfr @@ -1,7 +1,7 @@ /** @file Vfr file for iSCSI config. - -Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.
+ +Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -16,7 +16,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "IScsiConfigNVDataStruc.h" #define EFI_NETWORK_DEVICE_CLASS 0x04 -formset +formset guid = IP4_ISCSI_CONFIG_GUID, title = STRING_TOKEN(STR_ISCSI_CONFIG_FORM_TITLE), help = STRING_TOKEN(STR_ISCSI_CONFIG_FORM_HELP), @@ -27,7 +27,7 @@ formset form formid = FORMID_MAIN_FORM, title = STRING_TOKEN(STR_ISCSI_MAIN_FORM_TITLE); - string varid = ISCSI_CONFIG_IFR_NVDATA.InitiatorName, + string varid = ISCSI_CONFIG_IFR_NVDATA.InitiatorName, prompt = STRING_TOKEN(STR_ISCSI_CONFIG_INIT_NAME), help = STRING_TOKEN(STR_ISCSI_CONFIG_INIT_NAME_HELP), flags = INTERACTIVE, @@ -57,8 +57,8 @@ formset key = KEY_DHCP_ENABLE, endcheckbox; - suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.InitiatorInfoFromDhcp == 0x01; - string varid = ISCSI_CONFIG_IFR_NVDATA.LocalIp, + suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.InitiatorInfoFromDhcp == 0x01; + string varid = ISCSI_CONFIG_IFR_NVDATA.LocalIp, prompt = STRING_TOKEN(STR_ISCSI_LOCAL_IP_ADDRESS), help = STRING_TOKEN(STR_ISCSI_IP_ADDRESS_HELP), flags = INTERACTIVE, @@ -67,7 +67,7 @@ formset maxsize = IP_MAX_SIZE, endstring; - string varid = ISCSI_CONFIG_IFR_NVDATA.SubnetMask, + string varid = ISCSI_CONFIG_IFR_NVDATA.SubnetMask, prompt = STRING_TOKEN(STR_ISCSI_LOCAL_MASK), help = STRING_TOKEN(STR_ISCSI_IP_ADDRESS_HELP), flags = INTERACTIVE, @@ -76,7 +76,7 @@ formset maxsize = IP_MAX_SIZE, endstring; - string varid = ISCSI_CONFIG_IFR_NVDATA.Gateway, + string varid = ISCSI_CONFIG_IFR_NVDATA.Gateway, prompt = STRING_TOKEN(STR_ISCSI_LOCAL_GATEWAY), help = STRING_TOKEN(STR_ISCSI_IP_ADDRESS_HELP), flags = INTERACTIVE, @@ -86,19 +86,19 @@ formset endstring; endif; - subtitle text = STRING_TOKEN(STR_NULL); + subtitle text = STRING_TOKEN(STR_NULL); - suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.InitiatorInfoFromDhcp == 0x00; + suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.InitiatorInfoFromDhcp == 0x00; checkbox varid = ISCSI_CONFIG_IFR_NVDATA.TargetInfoFromDhcp, prompt = STRING_TOKEN(STR_ISCSI_ENABLE_DHCP_ON_TARGET), help = STRING_TOKEN(STR_ISCSI_ENABLE_DHCP_ON_TARGET), flags = 0, endcheckbox; endif; - - suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.TargetInfoFromDhcp == 0x01; - string varid = ISCSI_CONFIG_IFR_NVDATA.TargetName, + suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.TargetInfoFromDhcp == 0x01; + + string varid = ISCSI_CONFIG_IFR_NVDATA.TargetName, prompt = STRING_TOKEN(STR_ISCSI_TARGET_NAME), help = STRING_TOKEN(STR_ISCSI_TARGET_NAME), flags = INTERACTIVE, @@ -107,7 +107,7 @@ formset maxsize = ISCSI_NAME_IFR_MAX_SIZE, endstring; - string varid = ISCSI_CONFIG_IFR_NVDATA.TargetIp, + string varid = ISCSI_CONFIG_IFR_NVDATA.TargetIp, prompt = STRING_TOKEN(STR_ISCSI_TARGET_IP_ADDRESS), help = STRING_TOKEN(STR_ISCSI_IP_ADDRESS_HELP), flags = INTERACTIVE, @@ -115,17 +115,17 @@ formset minsize = IP_MIN_SIZE, maxsize = IP_MAX_SIZE, endstring; - - numeric varid = ISCSI_CONFIG_IFR_NVDATA.TargetPort, + + numeric varid = ISCSI_CONFIG_IFR_NVDATA.TargetPort, prompt = STRING_TOKEN(STR_ISCSI_TARGET_PORT), help = STRING_TOKEN(STR_ISCSI_TARGET_PORT), flags = 0, minimum = TARGET_PORT_MIN_NUM, - maximum = TARGET_PORT_MAX_NUM, + maximum = TARGET_PORT_MAX_NUM, step = 0, endnumeric; - - string varid = ISCSI_CONFIG_IFR_NVDATA.BootLun, + + string varid = ISCSI_CONFIG_IFR_NVDATA.BootLun, prompt = STRING_TOKEN(STR_ISCSI_BOOT_LUN), help = STRING_TOKEN(STR_ISCSI_BOOT_LUN_HELP), flags = INTERACTIVE, @@ -135,19 +135,19 @@ formset endstring; endif; - subtitle text = STRING_TOKEN(STR_NULL); + subtitle text = STRING_TOKEN(STR_NULL); oneof varid = ISCSI_CONFIG_IFR_NVDATA.CHAPType, prompt = STRING_TOKEN(STR_CHAP_TYPE_PROMPT), - help = STRING_TOKEN(STR_CHAP_TYPE_HELP), + help = STRING_TOKEN(STR_CHAP_TYPE_HELP), option text = STRING_TOKEN(STR_CHAP_TYPE_NONE), value = ISCSI_CHAP_NONE, flags = DEFAULT; option text = STRING_TOKEN(STR_CHAP_TYPE_UNI), value = ISCSI_CHAP_UNI, flags = 0; option text = STRING_TOKEN(STR_CHAP_TYPE_MUTUAL), value = ISCSI_CHAP_MUTUAL, flags = 0; endoneof; - suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.CHAPType == ISCSI_CHAP_NONE; + suppressif ideqval ISCSI_CONFIG_IFR_NVDATA.CHAPType == ISCSI_CHAP_NONE; - string varid = ISCSI_CONFIG_IFR_NVDATA.CHAPName, + string varid = ISCSI_CONFIG_IFR_NVDATA.CHAPName, prompt = STRING_TOKEN(STR_ISCSI_CHAP_NAME), help = STRING_TOKEN(STR_ISCSI_CHAP_NAME), flags = INTERACTIVE, @@ -156,7 +156,7 @@ formset maxsize = ISCSI_CHAP_NAME_MAX_LEN, endstring; - string varid = ISCSI_CONFIG_IFR_NVDATA.CHAPSecret, + string varid = ISCSI_CONFIG_IFR_NVDATA.CHAPSecret, prompt = STRING_TOKEN(STR_ISCSI_CHAP_SECRET), help = STRING_TOKEN(STR_ISCSI_CHAP_SECRET_HELP), flags = INTERACTIVE, @@ -169,7 +169,7 @@ formset suppressif NOT ideqval ISCSI_CONFIG_IFR_NVDATA.CHAPType == ISCSI_CHAP_MUTUAL; - string varid = ISCSI_CONFIG_IFR_NVDATA.ReverseCHAPName, + string varid = ISCSI_CONFIG_IFR_NVDATA.ReverseCHAPName, prompt = STRING_TOKEN(STR_ISCSI_REVERSE_CHAP_NAME), help = STRING_TOKEN(STR_ISCSI_REVERSE_CHAP_NAME), flags = INTERACTIVE, @@ -178,7 +178,7 @@ formset maxsize = ISCSI_CHAP_NAME_MAX_LEN, endstring; - string varid = ISCSI_CONFIG_IFR_NVDATA.ReverseCHAPSecret, + string varid = ISCSI_CONFIG_IFR_NVDATA.ReverseCHAPSecret, prompt = STRING_TOKEN(STR_ISCSI_REVERSE_CHAP_SECRET), help = STRING_TOKEN(STR_ISCSI_CHAP_SECRET_HELP), flags = INTERACTIVE, @@ -189,9 +189,9 @@ formset endif; - subtitle text = STRING_TOKEN(STR_NULL); + subtitle text = STRING_TOKEN(STR_NULL); - string varid = ISCSI_CONFIG_IFR_NVDATA.IsId, + string varid = ISCSI_CONFIG_IFR_NVDATA.IsId, prompt = STRING_TOKEN(STR_ISCSI_CONFIG_ISID), help = STRING_TOKEN(STR_ISCSI_CONFIG_ISID_HELP), flags = INTERACTIVE, @@ -200,16 +200,16 @@ formset maxsize = ISID_CONFIGURABLE_MAX_LEN, endstring; - subtitle text = STRING_TOKEN(STR_NULL); + subtitle text = STRING_TOKEN(STR_NULL); text help = STRING_TOKEN (STR_SAVE_CHANGES), text = STRING_TOKEN (STR_SAVE_CHANGES), flags = INTERACTIVE, key = KEY_SAVE_CHANGES; - - goto FORMID_MAIN_FORM, - prompt = STRING_TOKEN (STR_RETURN_MAIN_FORM), + + goto FORMID_MAIN_FORM, + prompt = STRING_TOKEN (STR_RETURN_MAIN_FORM), help = STRING_TOKEN (STR_RETURN_MAIN_FORM), flags = 0; diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigDxeStrings.uni b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigDxeStrings.uni index 6acf139cd0..729c74ebfc 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigDxeStrings.uni +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiConfigDxeStrings.uni @@ -1,6 +1,6 @@ // *++ // -// Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.
+// Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
// This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at @@ -12,13 +12,13 @@ // Module Name: // // IScsiConfigStrings.uni -// +// // Abstract: -// +// // String definitions for iSCSI configuration. -// +// // Revision History: -// +// // --*/ @@ -26,23 +26,23 @@ #langdef en-US "English" -#string STR_ISCSI_CONFIG_FORM_TITLE #language en-US "iSCSI Configuration" -#string STR_ISCSI_CONFIG_FORM_HELP #language en-US "Configure the iSCSI parameters." +#string STR_ISCSI_CONFIG_FORM_TITLE #language en-US "iSCSI Configuration" +#string STR_ISCSI_CONFIG_FORM_HELP #language en-US "Configure the iSCSI parameters." #string STR_ISCSI_MAIN_FORM_TITLE #language en-US "iSCSI Configuration" #string STR_ISCSI_CONFIG_INIT_NAME #language en-US "iSCSI Initiator Name" #string STR_ISCSI_CONFIG_INIT_NAME_HELP #language en-US "The worldwide unique name of the initiator. Only iqn. format is accepted." #string STR_ISCSI_DEVICE_FORM_TITLE #language en-US "" #string STR_ISCSI_DEVICE_ENABLE #language en-US "Enable iSCSI" #string STR_ISCSI_LOCAL_IP_ADDRESS #language en-US " Initiator IP Address" -#string STR_ISCSI_LOCAL_MASK #language en-US " Initiator Subnet Mask" +#string STR_ISCSI_LOCAL_MASK #language en-US " Initiator Subnet Mask" #string STR_ISCSI_LOCAL_GATEWAY #language en-US " Gateway" -#string STR_ISCSI_IP_ADDRESS_HELP #language en-US "Enter IP address in dotted-decimal notation." -#string STR_ISCSI_TARGET_NAME #language en-US " Target Name" -#string STR_ISCSI_TARGET_IP_ADDRESS #language en-US " Target IP Address" -#string STR_ISCSI_TARGET_PORT #language en-US " Target Port" +#string STR_ISCSI_IP_ADDRESS_HELP #language en-US "Enter IP address in dotted-decimal notation." +#string STR_ISCSI_TARGET_NAME #language en-US " Target Name" +#string STR_ISCSI_TARGET_IP_ADDRESS #language en-US " Target IP Address" +#string STR_ISCSI_TARGET_PORT #language en-US " Target Port" #string STR_ISCSI_BOOT_LUN #language en-US " Boot LUN" #string STR_ISCSI_BOOT_LUN_HELP #language en-US "Hexadecimal representation of the LU number. Examples are: 4752-3A4F-6b7e-2F99, 6734-9-156f-127, 4186-9" -#string STR_ISCSI_ENABLE_DHCP #language en-US "Enable DHCP" +#string STR_ISCSI_ENABLE_DHCP #language en-US "Enable DHCP" #string STR_ISCSI_ENABLE_DHCP_ON_TARGET #language en-US "Get target info via DHCP" #string STR_CHAP_TYPE_PROMPT #language en-US "CHAP Type" #string STR_CHAP_TYPE_HELP #language en-US "None, One way CHAP or mutual CHAP" @@ -57,6 +57,6 @@ #string STR_ISCSI_CONFIG_ISID #language en-US "ISID" #string STR_ISCSI_CONFIG_ISID_HELP #language en-US "OUI-format ISID in 6 bytes, default value are derived from MAC address. Only last 3 bytes are configurable. Example: update 0ABBCCDDEEFF to 0ABBCCF07901 by input F07901." #string STR_RETURN_MAIN_FORM #language en-US "Back to Previous Page" -#string STR_SAVE_CHANGES #language en-US "Save Changes" +#string STR_SAVE_CHANGES #language en-US "Save Changes" #string STR_NULL #language en-US "" - \ No newline at end of file + diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.c index 976fe5d436..6a876c8b69 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.c @@ -1,7 +1,7 @@ /** @file iSCSI DHCP related configuration routines. -Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -95,7 +95,7 @@ IScsiDhcpExtractRootPath ( Status = EFI_INVALID_PARAMETER; goto ON_EXIT; } - + if ((Fields[RP_FIELD_IDX_SERVERNAME].Str == NULL) || (Fields[RP_FIELD_IDX_TARGETNAME].Str == NULL) || (Fields[RP_FIELD_IDX_PROTOCOL].Len > 1) @@ -170,14 +170,14 @@ ON_EXIT: /** The callback function registerd to the DHCP4 instance which is used to select the qualified DHCP OFFER. - + @param[in] This The DHCP4 protocol. @param[in] Context The context set when configuring the DHCP4 protocol. @param[in] CurrentState The current state of the DHCP4 protocol. @param[in] Dhcp4Event The event occurs in the current state. - @param[in] Packet The DHCP packet that is to be sent or already received. + @param[in] Packet The DHCP packet that is to be sent or already received. @param[out] NewPacket The packet used to replace the above Packet. - + @retval EFI_SUCCESS Either the DHCP OFFER is qualified or we're not intereseted in the Dhcp4Event. @retval EFI_NOT_READY The DHCP OFFER packet doesn't match our requirements. @@ -337,7 +337,7 @@ IScsiParseDhcpAck ( /** Parse the DHCP ACK to get the address configuration and DNS information. - + @param[in] Image The handle of the driver image. @param[in] Controller The handle of the controller; @param[in, out] ConfigData The session configuration data. diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.h index 59f8672719..4c4dcaa8f6 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDhcp.h @@ -1,7 +1,7 @@ /** @file The header file of IScsiDhcp. -Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -34,7 +34,7 @@ typedef struct _ISCSI_ROOT_PATH_FIELD { /** Parse the DHCP ACK to get the address configuration and DNS information. - + @param[in] Image The handle of the driver image. @param[in] Controller The handle of the controller; @param[in, out] ConfigData The session configuration data. diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.c index 5295d346ec..730f3e506b 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.c @@ -1,7 +1,7 @@ /** @file The entry point of IScsi driver. -Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -24,14 +24,14 @@ EFI_DRIVER_BINDING_PROTOCOL gIScsiDriverBinding = { }; /** - Tests to see if this driver supports the RemainingDevicePath. - - @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This - parameter is ignored by device drivers, and is optional for bus - drivers. For bus drivers, if this parameter is not NULL, then - the bus driver must determine if the bus controller specified - by ControllerHandle and the child controller specified - by RemainingDevicePath are both supported by this + Tests to see if this driver supports the RemainingDevicePath. + + @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This + parameter is ignored by device drivers, and is optional for bus + drivers. For bus drivers, if this parameter is not NULL, then + the bus driver must determine if the bus controller specified + by ControllerHandle and the child controller specified + by RemainingDevicePath are both supported by this bus driver. @retval EFI_SUCCESS The RemainingDevicePath is supported or NULL. @@ -62,14 +62,14 @@ IScsiIsDevicePathSupported ( } /** - Tests to see if this driver supports a given controller. If a child device is provided, + Tests to see if this driver supports a given controller. If a child device is provided, it further tests to see if this driver supports creating a handle for the specified child device. @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. - @param[in] ControllerHandle The handle of the controller to test. This handle - must support a protocol interface that supplies + @param[in] ControllerHandle The handle of the controller to test. This handle + must support a protocol interface that supplies an I/O abstraction to the driver. - @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. + @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This parameter is ignored by device drivers, and is optional for bus drivers. @@ -142,23 +142,23 @@ IScsiDriverBindingSupported ( } /** - Start this driver on ControllerHandle. - - The Start() function is designed to be invoked from the EFI boot service ConnectController(). - As a result, much of the error checking on the parameters to Start() has been moved into this - common boot service. It is legal to call Start() from other locations, but the following calling + Start this driver on ControllerHandle. + + The Start() function is designed to be invoked from the EFI boot service ConnectController(). + As a result, much of the error checking on the parameters to Start() has been moved into this + common boot service. It is legal to call Start() from other locations, but the following calling restrictions must be followed or the system behavior will not be deterministic. 1. ControllerHandle must be a valid EFI_HANDLE. 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned EFI_DEVICE_PATH_PROTOCOL. 3. Prior to calling Start(), the Supported() function for the driver specified by This must - have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS. + have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS. @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. - @param[in] ControllerHandle The handle of the controller to start. This handle - must support a protocol interface that supplies + @param[in] ControllerHandle The handle of the controller to start. This handle + must support a protocol interface that supplies an I/O abstraction to the driver. - @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. + @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This parameter is ignored by device drivers, and is optional for bus drivers. @retval EFI_SUCCESS The device was started. @@ -214,7 +214,7 @@ IScsiDriverBindingStart ( } // - // Always install private protocol no matter what happens later. We need to + // Always install private protocol no matter what happens later. We need to // keep the relationship between ControllerHandle and ChildHandle. // Status = gBS->InstallProtocolInterface ( @@ -286,7 +286,7 @@ IScsiDriverBindingStart ( This->DriverBindingHandle, Private->ExtScsiPassThruHandle, EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER - ); + ); if (EFI_ERROR (Status)) { gBS->UninstallMultipleProtocolInterfaces ( Private->ExtScsiPassThruHandle, @@ -296,7 +296,7 @@ IScsiDriverBindingStart ( Private->DevicePath, NULL ); - + goto ON_ERROR; } @@ -315,12 +315,12 @@ ON_ERROR: } /** - Stop this driver on ControllerHandle. - + Stop this driver on ControllerHandle. + Release the control of this controller and remove the IScsi functions. The Stop() - function is designed to be invoked from the EFI boot service DisconnectController(). - As a result, much of the error checking on the parameters to Stop() has been moved - into this common boot service. It is legal to call Stop() from other locations, + function is designed to be invoked from the EFI boot service DisconnectController(). + As a result, much of the error checking on the parameters to Stop() has been moved + into this common boot service. It is legal to call Stop() from other locations, but the following calling restrictions must be followed or the system behavior will not be deterministic. 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this same driver's Start() function. @@ -328,13 +328,13 @@ ON_ERROR: EFI_HANDLE. In addition, all of these handles must have been created in this driver's Start() function, and the Start() function must have called OpenProtocol() on ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER. - + @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. - @param[in] ControllerHandle A handle to the device being stopped. The handle must - support a bus specific I/O protocol for the driver + @param[in] ControllerHandle A handle to the device being stopped. The handle must + support a bus specific I/O protocol for the driver to use to stop the device. @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.Not used. - @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL + @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL if NumberOfChildren is 0.Not used. @retval EFI_SUCCESS The device was stopped. @@ -390,7 +390,7 @@ IScsiDriverBindingStop ( Private->Image, Private->ExtScsiPassThruHandle ); - + gBS->CloseProtocol ( Conn->Tcp4Io.Handle, &gEfiTcp4ProtocolGuid, @@ -515,7 +515,7 @@ EfiIScsiUnload ( if (EFI_ERROR (Status)) { goto ON_EXIT; } - } + } // // Unload the iSCSI configuration form. @@ -545,7 +545,7 @@ EfiIScsiUnload ( goto ON_EXIT; } } - + Status = gBS->HandleProtocol ( gIScsiDriverBinding.DriverBindingHandle, &gEfiComponentName2ProtocolGuid, @@ -576,14 +576,14 @@ ON_EXIT: if (DeviceHandleBuffer != NULL) { FreePool (DeviceHandleBuffer); } - + return Status; } /** This is the declaration of an EFI image entry point. This entry point is the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including - both device drivers and bus drivers. It initialize the global variables and + both device drivers and bus drivers. It initialize the global variables and publish the driver binding protocol. @param[in] ImageHandle The firmware allocated handle for the UEFI image. @@ -651,7 +651,7 @@ IScsiDriverEntryPoint ( ); return Status; } - + // // Initialize the configuration form of iSCSI. // diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.h index 14f640444f..d6a619f00f 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDriver.h @@ -1,7 +1,7 @@ /** @file The header file of IScsiDriver.c. -Copyright (c) 2004 - 2011, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -38,14 +38,14 @@ typedef struct _ISCSI_PRIVATE_PROTOCOL { // /** - Tests to see if this driver supports a given controller. If a child device is provided, + Tests to see if this driver supports a given controller. If a child device is provided, it further tests to see if this driver supports creating a handle for the specified child device. @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. - @param[in] ControllerHandle The handle of the controller to test. This handle - must support a protocol interface that supplies + @param[in] ControllerHandle The handle of the controller to test. This handle + must support a protocol interface that supplies an I/O abstraction to the driver. - @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. + @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This parameter is ignored by device drivers, and is optional for bus drivers. @@ -70,22 +70,22 @@ IScsiDriverBindingSupported ( ); /** - Start this driver on ControllerHandle. The Start() function is designed to be - invoked from the EFI boot service ConnectController(). As a result, much of - the error checking on the parameters to Start() has been moved into this - common boot service. It is legal to call Start() from other locations, + Start this driver on ControllerHandle. The Start() function is designed to be + invoked from the EFI boot service ConnectController(). As a result, much of + the error checking on the parameters to Start() has been moved into this + common boot service. It is legal to call Start() from other locations, but the following calling restrictions must be followed or the system behavior will not be deterministic. 1. ControllerHandle must be a valid EFI_HANDLE. 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned EFI_DEVICE_PATH_PROTOCOL. 3. Prior to calling Start(), the Supported() function for the driver specified by This must - have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS. + have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS. @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. - @param[in] ControllerHandle The handle of the controller to start. This handle - must support a protocol interface that supplies + @param[in] ControllerHandle The handle of the controller to start. This handle + must support a protocol interface that supplies an I/O abstraction to the driver. - @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. + @param[in] RemainingDevicePath A pointer to the remaining portion of a device path. This parameter is ignored by device drivers, and is optional for bus drivers. @retval EFI_SUCCESS The device was started. @@ -103,12 +103,12 @@ IScsiDriverBindingStart ( ); /** - Stop this driver on ControllerHandle. - + Stop this driver on ControllerHandle. + Release the control of this controller and remove the IScsi functions. The Stop() - function is designed to be invoked from the EFI boot service DisconnectController(). - As a result, much of the error checking on the parameters to Stop() has been moved - into this common boot service. It is legal to call Stop() from other locations, + function is designed to be invoked from the EFI boot service DisconnectController(). + As a result, much of the error checking on the parameters to Stop() has been moved + into this common boot service. It is legal to call Stop() from other locations, but the following calling restrictions must be followed or the system behavior will not be deterministic. 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this same driver's Start() function. @@ -116,13 +116,13 @@ IScsiDriverBindingStart ( EFI_HANDLE. In addition, all of these handles must have been created in this driver's Start() function, and the Start() function must have called OpenProtocol() on ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER. - + @param[in] This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. - @param[in] ControllerHandle A handle to the device being stopped. The handle must - support a bus specific I/O protocol for the driver + @param[in] ControllerHandle A handle to the device being stopped. The handle must + support a bus specific I/O protocol for the driver to use to stop the device. @param[in] NumberOfChildren The number of child device handles in ChildHandleBuffer.Not used. - @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL + @param[in] ChildHandleBuffer An array of child handles to be freed. May be NULL if NumberOfChildren is 0.Not used. @retval EFI_SUCCESS The device was stopped. diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf index 4fd2a62af9..dce39681d1 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiDxe.inf @@ -6,7 +6,7 @@ # data over TCP/IP. It installs EFI HII Configuration Access Protocol to provide # one way to configurate the iSCSI setting. # -# Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at @@ -122,4 +122,4 @@ gIScsiCHAPAuthInfoGuid [UserExtensions.TianoCore."ExtraFiles"] - IScsi4DxeExtra.uni \ No newline at end of file + IScsi4DxeExtra.uni diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiExtScsiPassThru.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiExtScsiPassThru.c index e9e37b7e37..db2d6d1936 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiExtScsiPassThru.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiExtScsiPassThru.c @@ -1,7 +1,7 @@ /** @file The IScsi's EFI_EXT_SCSI_PASS_THRU_PROTOCOL driver. -Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -15,9 +15,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "IScsiImpl.h" /** - Sends a SCSI Request Packet to a SCSI device that is attached to the SCSI channel. This function + Sends a SCSI Request Packet to a SCSI device that is attached to the SCSI channel. This function supports both blocking I/O and nonblocking I/O. The blocking I/O functionality is required, and the - nonblocking I/O functionality is optional. + nonblocking I/O functionality is optional. @param[in] This A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance. @param[in] Target The Target is an array of size TARGET_MAX_BYTES and it represents @@ -42,18 +42,18 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @retval EFI_BAD_BUFFER_SIZE The SCSI Request Packet was not executed. The number of bytes that could be transferred is returned in InTransferLength. For write and bi-directional commands, OutTransferLength bytes were - transferred by OutDataBuffer. Currently not implemeted. + transferred by OutDataBuffer. Currently not implemeted. @retval EFI_NOT_READY The SCSI Request Packet could not be sent because there are too many - SCSI Request Packets already queued. The caller may retry again later. + SCSI Request Packets already queued. The caller may retry again later. @retval EFI_DEVICE_ERROR A device error occurred while attempting to send the SCSI Request - Packet. + Packet. @retval EFI_INVALID_PARAMETER Target, Lun, or the contents of ScsiRequestPacket are invalid. @retval EFI_UNSUPPORTED The command described by the SCSI Request Packet is not supported by the host adapter. This includes the case of Bi-directional SCSI commands not supported by the implementation. The SCSI Request Packet was not sent, so no additional status information is available. Currently not implemeted. - @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute. + @retval EFI_TIMEOUT A timeout occurred while waiting for the SCSI Request Packet to execute. **/ EFI_STATUS EFIAPI @@ -67,7 +67,7 @@ IScsiExtScsiPassThruFunction ( { ISCSI_DRIVER_DATA *Private; ISCSI_SESSION_CONFIG_NVDATA *ConfigNvData; - EFI_STATUS Status; + EFI_STATUS Status; Private = ISCSI_DRIVER_DATA_FROM_EXT_SCSI_PASS_THRU (This); ConfigNvData = &Private->Session.ConfigData.NvData; @@ -96,11 +96,11 @@ IScsiExtScsiPassThruFunction ( } /** - Used to retrieve the list of legal Target IDs and LUNs for SCSI devices on a SCSI channel. These + Used to retrieve the list of legal Target IDs and LUNs for SCSI devices on a SCSI channel. These can either be the list SCSI devices that are actually present on the SCSI channel, or the list of legal - Target Ids and LUNs for the SCSI channel. Regardless, the caller of this function must probe the - Target ID and LUN returned to see if a SCSI device is actually present at that location on the SCSI - channel. + Target Ids and LUNs for the SCSI channel. Regardless, the caller of this function must probe the + Target ID and LUN returned to see if a SCSI device is actually present at that location on the SCSI + channel. @param[in] This A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance. @param[in, out] Target On input, a pointer to the Target ID (an array of size @@ -310,7 +310,7 @@ IScsiExtScsiPassThruGetTargetLun ( /** Resets a SCSI channel. This operation resets all the SCSI devices connected to the SCSI channel. Currently not implemented. - + @param[in] This A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance. @retval EFI_SUCCESS The SCSI channel was reset. @@ -358,10 +358,10 @@ IScsiExtScsiPassThruResetTargetLun ( } /** - Used to retrieve the list of legal Target IDs for SCSI devices on a SCSI channel. These can either + Used to retrieve the list of legal Target IDs for SCSI devices on a SCSI channel. These can either be the list SCSI devices that are actually present on the SCSI channel, or the list of legal Target IDs - for the SCSI channel. Regardless, the caller of this function must probe the Target ID returned to - see if a SCSI device is actually present at that location on the SCSI channel. + for the SCSI channel. Regardless, the caller of this function must probe the Target ID returned to + see if a SCSI device is actually present at that location on the SCSI channel. @param[in] This A pointer to the EFI_EXT_SCSI_PASS_THRU_PROTOCOL instance. @param[in, out] Target (TARGET_MAX_BYTES) of a SCSI device present on the SCSI channel. diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c index 45d89a6933..58c5447dcb 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiIbft.c @@ -1,7 +1,7 @@ /** @file Implementation for iSCSI Boot Firmware Table publication. -Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -19,7 +19,7 @@ UINTN mTableKey; /** Initialize the header of the iSCSI Boot Firmware Table. - + @param[out] Header The header of the iSCSI Boot Firmware Table. @param[in] OemId The OEM ID. @param[in] OemTableId The OEM table ID for the iBFT. @@ -37,14 +37,14 @@ IScsiInitIbfTableHeader ( Header->Length = IBFT_HEAP_OFFSET; Header->Revision = EFI_ACPI_ISCSI_BOOT_FIRMWARE_TABLE_REVISION; Header->Checksum = 0; - + CopyMem (Header->OemId, OemId, sizeof (Header->OemId)); CopyMem (&Header->OemTableId, OemTableId, sizeof (UINT64)); } /** Initialize the control section of the iSCSI Boot Firmware Table. - + @param[in] Table The ACPI table. @param[in] HandleCount The number of the handles associated with iSCSI sessions, it's equal to the number of iSCSI sessions. diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.c index 19577ff182..d924a8b824 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.c @@ -19,8 +19,8 @@ GLOBAL_REMOVE_IF_UNREFERENCED CONST CHAR8 IScsiHexString[] = "0123456789ABCDEFa /** Removes (trims) specified leading and trailing characters from a string. - @param[in, out] Str Pointer to the null-terminated string to be trimmed. On return, - Str will hold the trimmed string. + @param[in, out] Str Pointer to the null-terminated string to be trimmed. On return, + Str will hold the trimmed string. @param[in] CharC Character will be trimmed from str. **/ @@ -32,18 +32,18 @@ StrTrim ( { CHAR16 *Pointer1; CHAR16 *Pointer2; - + if (*Str == 0) { return; } - + // // Trim off the leading and trailing characters c // for (Pointer1 = Str; (*Pointer1 != 0) && (*Pointer1 == CharC); Pointer1++) { ; } - + Pointer2 = Str; if (Pointer2 == Pointer1) { while (*Pointer1 != 0) { @@ -51,19 +51,19 @@ StrTrim ( Pointer1++; } } else { - while (*Pointer1 != 0) { - *Pointer2 = *Pointer1; + while (*Pointer1 != 0) { + *Pointer2 = *Pointer1; Pointer1++; Pointer2++; } *Pointer2 = 0; } - - + + for (Pointer1 = Str + StrLen(Str) - 1; Pointer1 >= Str && *Pointer1 == CharC; Pointer1--) { ; } - if (Pointer1 != Str + StrLen(Str) - 1) { + if (Pointer1 != Str + StrLen(Str) - 1) { *(Pointer1 + 1) = 0; } } @@ -109,7 +109,7 @@ IScsiGetSubnetMaskPrefixLength ( } /** - Convert the hexadecimal encoded LUN string into the 64-bit LUN. + Convert the hexadecimal encoded LUN string into the 64-bit LUN. @param[in] Str The hexadecimal encoded LUN string. @param[out] Lun Storage to return the 64-bit LUN. @@ -127,11 +127,11 @@ IScsiAsciiStrToLun ( CHAR8 TemStr[2]; UINT8 TemValue; UINT16 Value[4]; - + ZeroMem (Lun, 8); ZeroMem (TemStr, 2); ZeroMem ((UINT8 *) Value, sizeof (Value)); - SizeStr = AsciiStrLen (Str); + SizeStr = AsciiStrLen (Str); IndexValue = 0; IndexNum = 0; @@ -146,7 +146,7 @@ IScsiAsciiStrToLun ( return EFI_INVALID_PARAMETER; } } - + if ((TemValue == 0) && (TemStr[0] == '-')) { // // Next Lun value @@ -163,24 +163,24 @@ IScsiAsciiStrToLun ( IndexNum = 0; continue; } - + if (++IndexNum > 4) { - // + // // Each Lun Str can't exceed size 4, because it will be as UINT16 value // return EFI_INVALID_PARAMETER; } - + // // Combine UINT16 value // Value[IndexValue] = (UINT16) ((Value[IndexValue] << 4) + TemValue); } - + for (Index = 0; Index <= IndexValue; Index ++) { *((UINT16 *) &Lun[Index * 2]) = HTONS (Value[Index]); } - + return EFI_SUCCESS; } @@ -392,7 +392,7 @@ IScsiMacAddrToStr ( @param[in, out] HexStr Pointer to the string. @param[in, out] HexLength The length of the string. - @retval EFI_SUCCESS The binary data is converted to the hexadecimal string + @retval EFI_SUCCESS The binary data is converted to the hexadecimal string and the length of the string is updated. @retval EFI_BUFFER_TOO_SMALL The string is too small. @retval EFI_INVALID_PARAMETER The IP string is malformatted. @@ -455,7 +455,7 @@ IScsiHexToBin ( UINTN Length; UINT8 Digit; CHAR8 TemStr[2]; - + ZeroMem (TemStr, sizeof (TemStr)); // @@ -464,7 +464,7 @@ IScsiHexToBin ( if ((HexStr[0] == '0') && ((HexStr[1] == 'x') || (HexStr[1] == 'X'))) { HexStr += 2; } - + Length = AsciiStrLen (HexStr); for (Index = 0; Index < Length; Index ++) { @@ -482,7 +482,7 @@ IScsiHexToBin ( BinBuffer [Index/2] = (UINT8) ((BinBuffer [Index/2] << 4) + Digit); } } - + *BinLength = (UINT32) ((Index + 1)/2); return EFI_SUCCESS; @@ -601,7 +601,7 @@ IScsiCleanDriverData ( EFI_STATUS Status; Status = EFI_SUCCESS; - + if (Private->DevicePath != NULL) { Status = gBS->UninstallProtocolInterface ( Private->ExtScsiPassThruHandle, @@ -627,7 +627,7 @@ EXIT: if (Private->ExitBootServiceEvent != NULL) { gBS->CloseEvent (Private->ExitBootServiceEvent); } - + FreePool (Private); return Status; } @@ -636,10 +636,10 @@ EXIT: Check wheather the Controller is configured to use DHCP protocol. @param[in] Controller The handle of the controller. - + @retval TRUE The handle of the controller need the Dhcp protocol. @retval FALSE The handle of the controller does not need the Dhcp protocol. - + **/ BOOLEAN IScsiDhcpIsConfigured ( @@ -826,7 +826,7 @@ IScsiGetTcpConnDevicePath ( ) { DPathNode->Ipv4.LocalPort = 0; - DPathNode->Ipv4.StaticIpAddress = + DPathNode->Ipv4.StaticIpAddress = (BOOLEAN) (!Session->ConfigData.NvData.InitiatorInfoFromDhcp); // @@ -835,7 +835,7 @@ IScsiGetTcpConnDevicePath ( // do not exist. // In new version of IPv4_DEVICE_PATH, structcure length is 27. // - if (DevicePathNodeLength (&DPathNode->Ipv4) == IP4_NODE_LEN_NEW_VERSIONS) { + if (DevicePathNodeLength (&DPathNode->Ipv4) == IP4_NODE_LEN_NEW_VERSIONS) { IP4_COPY_ADDRESS ( &DPathNode->Ipv4.GatewayIpAddress, @@ -873,7 +873,7 @@ IScsiOnExitBootService ( ISCSI_DRIVER_DATA *Private; Private = (ISCSI_DRIVER_DATA *) Context; - + gBS->CloseEvent (Private->ExitBootServiceEvent); Private->ExitBootServiceEvent = NULL; @@ -887,7 +887,7 @@ IScsiOnExitBootService ( currently managing the controller specified by ControllerHandle. This test is performed by evaluating if the the protocol specified by ProtocolGuid is present on ControllerHandle and is was opened by DriverBindingHandle and Nic - Device handle with an attribute of EFI_OPEN_PROTOCOL_BY_DRIVER. + Device handle with an attribute of EFI_OPEN_PROTOCOL_BY_DRIVER. If ProtocolGuid is NULL, then ASSERT(). @param ControllerHandle A handle for a controller to test. diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.h index 0ab44d06ae..500e00373b 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiMisc.h @@ -1,7 +1,7 @@ /** @file Miscellaneous definitions for iSCSI driver. -Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -65,7 +65,7 @@ IScsiGetSubnetMaskPrefixLength ( ); /** - Convert the hexadecimal encoded LUN string into the 64-bit LUN. + Convert the hexadecimal encoded LUN string into the 64-bit LUN. @param[in] Str The hexadecimal encoded LUN string. @param[out] Lun Storage to return the 64-bit LUN. @@ -158,7 +158,7 @@ IScsiAsciiStrToIp ( @param[in, out] HexStr Pointer to the string. @param[in, out] HexLength The length of the string. - @retval EFI_SUCCESS The binary data is converted to the hexadecimal string + @retval EFI_SUCCESS The binary data is converted to the hexadecimal string and the length of the string is updated. @retval EFI_BUFFER_TOO_SMALL The string is too small. @retval EFI_INVALID_PARAMETER The IP string is malformatted. @@ -233,10 +233,10 @@ IScsiCleanDriverData ( Check wheather the Controller is configured to use DHCP protocol. @param[in] Controller The handle of the controller. - + @retval TRUE The handle of the controller need the Dhcp protocol. @retval FALSE The handle of the controller does not need the Dhcp protocol. - + **/ BOOLEAN IScsiDhcpIsConfigured ( @@ -290,7 +290,7 @@ IScsiOnExitBootService ( currently managing the controller specified by ControllerHandle. This test is performed by evaluating if the the protocol specified by ProtocolGuid is present on ControllerHandle and is was opened by DriverBindingHandle and Nic - Device handle with an attribute of EFI_OPEN_PROTOCOL_BY_DRIVER. + Device handle with an attribute of EFI_OPEN_PROTOCOL_BY_DRIVER. If ProtocolGuid is NULL, then ASSERT(). @param ControllerHandle A handle for a controller to test. diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c index 4317de258d..9fb848080a 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.c @@ -1,7 +1,7 @@ /** @file The implementation of iSCSI protocol based on RFC3720. -Copyright (c) 2004 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -17,7 +17,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. UINT32 mDataSegPad = 0; /** - Attach the iSCSI connection to the iSCSI session. + Attach the iSCSI connection to the iSCSI session. @param[in, out] Session The iSCSI session. @param[in, out] Conn The iSCSI connection. @@ -34,7 +34,7 @@ IScsiAttatchConnection ( } /** - Detach the iSCSI connection from the session it belongs to. + Detach the iSCSI connection from the session it belongs to. @param[in, out] Conn The iSCSI connection. **/ @@ -49,7 +49,7 @@ IScsiDetatchConnection ( } /** - Check the sequence number according to RFC3720. + Check the sequence number according to RFC3720. @param[in, out] ExpSN The currently expected sequence number. @param[in] NewSN The sequence number to check. @@ -116,7 +116,7 @@ IScsiUpdateCmdSN ( @retval EFI_SUCCESS The iSCSI connection is logged into the iSCSI target. @retval EFI_TIMEOUT Timeout happened during the login procedure. - @retval Others Other errors as indicated. + @retval Others Other errors as indicated. **/ EFI_STATUS IScsiConnLogin ( @@ -381,7 +381,7 @@ IScsiSendLoginReq ( Receive and process the iSCSI login response. @param[in] Conn The connection in the iSCSI login phase. - + @retval EFI_SUCCESS The iSCSI login response PDU is received and processed. @retval Others Other errors as indicated. **/ @@ -807,7 +807,7 @@ IScsiProcessLoginRsp ( @param[in] Data The data segment which should contain the TargetAddress key-value list. @param[in] Len Length of the data. - + @retval EFI_SUCCESS The target address is updated. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @retval EFI_NOT_FOUND The TargetAddress key is not found. @@ -1866,7 +1866,7 @@ IScsiNewScsiCmdPdu ( if (ScsiCmd == NULL) { NetbufFree (PduHeader); return NULL; - } + } Header = (ISCSI_ADDITIONAL_HEADER *) (ScsiCmd + 1); ZeroMem (ScsiCmd, Length); @@ -2522,8 +2522,8 @@ IScsiOnNopInRcvd ( @param[in] Lun The LUN. @param[in, out] Packet The request packet containing IO request, SCSI command buffer and buffers to read/write. - - @retval EFI_SUCCES The SCSI command is executed and the result is updated to + + @retval EFI_SUCCES The SCSI command is executed and the result is updated to the Packet. @retval EFI_DEVICE_ERROR Session state was not as required. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @@ -2640,7 +2640,7 @@ IScsiExecuteScsiCommand ( if (EFI_ERROR (Status)) { goto ON_EXIT; } - TimeoutEvent = Conn->TimeoutEvent; + TimeoutEvent = Conn->TimeoutEvent; } // // try to receive PDU from target. diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.h index 2f953236fd..6469df0434 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiProto.h @@ -1,7 +1,7 @@ /** @file The header file of iSCSI Protocol that defines many specific data structures. -Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -624,7 +624,7 @@ typedef struct _ISCSI_KEY_VALUE_PAIR { } ISCSI_KEY_VALUE_PAIR; /** - Attach the iSCSI connection to the iSCSI session. + Attach the iSCSI connection to the iSCSI session. @param[in, out] Session The iSCSI session. @param[in, out] Conn The iSCSI connection. @@ -636,7 +636,7 @@ IScsiAttatchConnection ( ); /** - Detach the iSCSI connection from the session it belongs to. + Detach the iSCSI connection from the session it belongs to. @param[in, out] Conn The iSCSI connection. **/ @@ -652,7 +652,7 @@ IScsiDetatchConnection ( @retval EFI_SUCCESS The iSCSI connection is logged into the iSCSI target. @retval EFI_TIMEOUT Timeout happened during the login procedure. - @retval Others Other errors as indicated. + @retval Others Other errors as indicated. **/ EFI_STATUS IScsiConnLogin ( @@ -719,7 +719,7 @@ IScsiSendLoginReq ( Receive and process the iSCSI login response. @param[in] Conn The connection in the iSCSI login phase. - + @retval EFI_SUCCESS The iSCSI login response PDU is received and processed. @retval Others Other errors as indicated. **/ @@ -788,7 +788,7 @@ IScsiProcessLoginRsp ( @param[in] Data The data segment which should contain the TargetAddress key-value list. @param[in] Len Length of the data. - + @retval EFI_SUCCESS The target address is updated. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @retval EFI_NOT_FOUND The TargetAddress key is not found. @@ -948,8 +948,8 @@ IScsiNormalizeName ( @param[in] Lun The LUN. @param[in, out] Packet The request packet containing IO request, SCSI command buffer and buffers to read/write. - - @retval EFI_SUCCES The SCSI command is executed and the result is updated to + + @retval EFI_SUCCES The SCSI command is executed and the result is updated to the Packet. @retval EFI_DEVICE_ERROR Session state was not as required. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @@ -988,7 +988,7 @@ IScsiSessionInit ( IN OUT ISCSI_SESSION *Session, IN BOOLEAN Recovery ); - + /** Abort the iSCSI session, that is, reset all the connection and free the resources. diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.c b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.c index e73a6dd5f7..901b38e92f 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.c @@ -1,7 +1,7 @@ /** @file The wrap of TCP/IP Socket interface. -Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -15,7 +15,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include "IScsiImpl.h" /** - The common notify function associated with various Tcp4Io events. + The common notify function associated with various Tcp4Io events. @param[in] Event The event signaled. @param[in] Context The context. @@ -31,13 +31,13 @@ Tcp4IoCommonNotify ( } /** - Create a TCP socket with the specified configuration data. + Create a TCP socket with the specified configuration data. @param[in] Image The handle of the driver image. @param[in] Controller The handle of the controller. @param[in] ConfigData The Tcp4 configuration data. @param[in] Tcp4Io The Tcp4Io. - + @retval EFI_SUCCESS The TCP socket is created and configured. @retval Others Failed to create the TCP socket or configure it. **/ @@ -230,7 +230,7 @@ ON_ERROR: } /** - Destroy the socket. + Destroy the socket. @param[in] Tcp4Io The Tcp4Io which wraps the socket to be destroyeds. **/ @@ -269,7 +269,7 @@ Tcp4IoDestroySocket ( @param[in, out] Tcp4Io The Tcp4Io wrapping the TCP socket. @param[in] Timeout The time to wait for connection done. - + @retval EFI_SUCCESS Connect to the other endpoint of the TCP socket successfully. @retval EFI_TIMEOUT Failed to connect to the other endpoint of the TCP socket in the specified time period. @retval Others Other errors as indicated. @@ -335,7 +335,7 @@ Tcp4IoReset ( @param[in] Tcp4Io The Tcp4Io wrapping the TCP socket. @param[in] Packet The packet to transmit. - + @retval EFI_SUCCESS The packet is trasmitted. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @retval Others Other errors as indicated. diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.h b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.h index 2b3c0b77d9..9e0f1e0f02 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/IScsiTcp4Io.h @@ -1,7 +1,7 @@ /** @file iSCSI Tcp4 IO related definitions. -Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -46,13 +46,13 @@ typedef struct _TCP4_IO { } TCP4_IO; /** - Create a TCP socket with the specified configuration data. + Create a TCP socket with the specified configuration data. @param[in] Image The handle of the driver image. @param[in] Controller The handle of the controller. @param[in] ConfigData The Tcp4 configuration data. @param[in] Tcp4Io The Tcp4Io. - + @retval EFI_SUCCESS The TCP socket is created and configured. @retval Others Failed to create the TCP socket or configure it. **/ @@ -65,7 +65,7 @@ Tcp4IoCreateSocket ( ); /** - Destroy the socket. + Destroy the socket. @param[in] Tcp4Io The Tcp4Io which wraps the socket to be destroyeds. **/ @@ -79,7 +79,7 @@ Tcp4IoDestroySocket ( @param[in, out] Tcp4Io The Tcp4Io wrapping the TCP socket. @param[in] Timeout The time to wait for connection done. - + @retval EFI_SUCCESS Connect to the other endpoint of the TCP socket successfully. @retval EFI_TIMEOUT Failed to connect to the other endpoint of the TCP socket in the specified time period. @retval Others Other errors as indicated. @@ -105,7 +105,7 @@ Tcp4IoReset ( @param[in] Tcp4Io The Tcp4Io wrapping the TCP socket. @param[in] Packet The packet to transmit. - + @retval EFI_SUCCESS The packet is trasmitted. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @retval Others Other errors as indicated. diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/Md5.c b/MdeModulePkg/Universal/Network/IScsiDxe/Md5.c index 5dc7d994d6..3555f1a2eb 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/Md5.c +++ b/MdeModulePkg/Universal/Network/IScsiDxe/Md5.c @@ -1,7 +1,7 @@ /** @file Implementation of MD5 algorithm. -Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -57,14 +57,14 @@ CONST UINT8 Md5HashPadding[] = 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, - 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, + 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 }; // @@ -79,18 +79,18 @@ CONST UINT8 Md5HashPadding[] = /** Tf1 is one basic MD5 transform function. - + @param[in] A A 32-bit quantity. - @param[in] B A 32-bit quantity. + @param[in] B A 32-bit quantity. @param[in] C A 32-bit quantity. @return Output was produced as a 32-bit quantity based on the - three 32-bit input quantity. + three 32-bit input quantity. **/ -UINT32 +UINT32 Tf1 ( - IN UINT32 A, - IN UINT32 B, + IN UINT32 A, + IN UINT32 B, IN UINT32 C ) { @@ -99,18 +99,18 @@ Tf1 ( /** Tf2 is one basic MD5 transform function. - + @param[in] A A 32-bit quantity. - @param[in] B A 32-bit quantity. + @param[in] B A 32-bit quantity. @param[in] C A 32-bit quantity. @return Output was produced as a 32-bit quantity based on the - three 32-bit input quantity. + three 32-bit input quantity. **/ -UINT32 +UINT32 Tf2 ( - IN UINT32 A, - IN UINT32 B, + IN UINT32 A, + IN UINT32 B, IN UINT32 C ) { @@ -119,18 +119,18 @@ Tf2 ( /** Tf3 is one basic MD5 transform function. - + @param[in] A A 32-bit quantity. - @param[in] B A 32-bit quantity. + @param[in] B A 32-bit quantity. @param[in] C A 32-bit quantity. @return Output was produced as a 32-bit quantity based on the - three 32-bit input quantity. + three 32-bit input quantity. **/ -UINT32 +UINT32 Tf3 ( - IN UINT32 A, - IN UINT32 B, + IN UINT32 A, + IN UINT32 B, IN UINT32 C ) { @@ -139,18 +139,18 @@ Tf3 ( /** Tf4 is one basic MD5 transform function. - + @param[in] A A 32-bit quantity. - @param[in] B A 32-bit quantity. + @param[in] B A 32-bit quantity. @param[in] C A 32-bit quantity. @return Output was produced as a 32-bit quantity based on the - three 32-bit input quantity. + three 32-bit input quantity. **/ -UINT32 +UINT32 Tf4 ( - IN UINT32 A, - IN UINT32 B, + IN UINT32 A, + IN UINT32 B, IN UINT32 C ) { @@ -220,7 +220,7 @@ MD5Transform ( Copy data segment into the M field of MD5_CTX structure for later transform. If the length of data segment is larger than 64 bytes, then does the transform immediately and the generated Md5 code is stored in the States field of MD5_CTX - data struct for later accumulation. + data struct for later accumulation. All of Md5 code generated for the sequential 64-bytes data segaments are be accumulated in MD5Final() function. @@ -241,7 +241,7 @@ MD5UpdateBlock ( for (Limit = 64 - Md5Ctx->Count; DataLen >= 64 - Md5Ctx->Count; Limit = 64) { CopyMem (Md5Ctx->M + Md5Ctx->Count, (VOID *)Data, Limit); MD5Transform (Md5Ctx); - + Md5Ctx->Count = 0; Data += Limit; DataLen -= Limit; @@ -271,7 +271,7 @@ MD5Init ( Md5Ctx->States[0] = 0x67452301; Md5Ctx->States[1] = 0xefcdab89; Md5Ctx->States[2] = 0x98badcfe; - Md5Ctx->States[3] = 0x10325476; + Md5Ctx->States[3] = 0x10325476; return EFI_SUCCESS; } @@ -328,7 +328,7 @@ MD5Final ( // CopyMem (HashVal, (UINT8 *) Md5Ctx->States, MD5_HASHSIZE); ZeroMem ((UINT8 *)Md5Ctx, sizeof (*Md5Ctx)); - + return EFI_SUCCESS; } diff --git a/MdeModulePkg/Universal/Network/IScsiDxe/Md5.h b/MdeModulePkg/Universal/Network/IScsiDxe/Md5.h index 8de4e869b4..1541b2d8ec 100644 --- a/MdeModulePkg/Universal/Network/IScsiDxe/Md5.h +++ b/MdeModulePkg/Universal/Network/IScsiDxe/Md5.h @@ -1,7 +1,7 @@ /** @file Header file for Md5. -Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -19,7 +19,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #include #include #include - + #define MD5_HASHSIZE 16 typedef struct _MD5_CTX { @@ -77,4 +77,4 @@ MD5Final ( OUT UINT8 *HashVal ); -#endif +#endif diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/ComponentName.c b/MdeModulePkg/Universal/Network/Ip4Dxe/ComponentName.c index 2ccfb3cc1c..5ea1ae1aff 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/ComponentName.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/ComponentName.c @@ -1,6 +1,6 @@ /** @file - -Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.
+ +Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at
@@ -237,10 +237,10 @@ Ip4ComponentNameGetDriverName ( @param Ip4[in] A pointer to the EFI_IP4_PROTOCOL. - + @retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully. @retval EFI_INVALID_PARAMETER The input parameter is invalid. - + **/ EFI_STATUS UpdateName ( @@ -290,7 +290,7 @@ UpdateName ( if (EFI_ERROR (Status)) { return Status; } - + return AddUnicodeString2 ( "en", gIp4ComponentName2.SupportedLanguages, @@ -378,9 +378,9 @@ Ip4ComponentNameGetControllerName ( OUT CHAR16 **ControllerName ) { - EFI_STATUS Status; + EFI_STATUS Status; EFI_IP4_PROTOCOL *Ip4; - + // // Only provide names for child handles. // @@ -388,9 +388,9 @@ Ip4ComponentNameGetControllerName ( return EFI_UNSUPPORTED; } - // - // Make sure this driver produced ChildHandle - // + // + // Make sure this driver produced ChildHandle + // Status = EfiTestChildHandle ( ControllerHandle, ChildHandle, @@ -400,9 +400,9 @@ Ip4ComponentNameGetControllerName ( return Status; } - // - // Retrieve an instance of a produced protocol from ChildHandle - // + // + // Retrieve an instance of a produced protocol from ChildHandle + // Status = gBS->OpenProtocol ( ChildHandle, &gEfiIp4ProtocolGuid, diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Common.h b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Common.h index 9689f373cf..e0fffc9d0d 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Common.h +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Common.h @@ -1,7 +1,7 @@ /** @file Common definition for IP4. - -Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.
+ +Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2.vfr b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2.vfr index 1f45e9f066..35bb75d422 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2.vfr +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2.vfr @@ -1,7 +1,7 @@ /** @file Vfr file for IP4Dxe. -Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -87,13 +87,13 @@ formset endif; subtitle text = STRING_TOKEN(STR_NULL); - + text help = STRING_TOKEN(STR_SAVE_CHANGES), text = STRING_TOKEN(STR_SAVE_CHANGES), flags = INTERACTIVE, key = KEY_SAVE_CHANGES; - + endform; endformset; diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c index 488b3f59b8..043341d6e9 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.c @@ -1,7 +1,7 @@ /** @file The implementation of EFI IPv4 Configuration II Protocol. - Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.
+ Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2015-2016 Hewlett Packard Enterprise Development LP
This program and the accompanying materials @@ -82,7 +82,7 @@ Ip4Config2DestroyDhcp4 ( Instance->Dhcp4Handle = NULL; - return Status; + return Status; } /** @@ -112,7 +112,7 @@ Ip4Config2OnPolicyChanged ( if (IpSb->DefaultInterface != NULL) { if (IpSb->DefaultRouteTable != NULL) { Ip4FreeRouteTable (IpSb->DefaultRouteTable); - IpSb->DefaultRouteTable = NULL; + IpSb->DefaultRouteTable = NULL; } Ip4CancelReceive (IpSb->DefaultInterface); @@ -125,7 +125,7 @@ Ip4Config2OnPolicyChanged ( // // Create new default interface and route table. - // + // IpIf = Ip4CreateInterface (IpSb->Mnp, IpSb->Controller, IpSb->Image); if (IpIf == NULL) { return ; @@ -136,7 +136,7 @@ Ip4Config2OnPolicyChanged ( Ip4FreeInterface (IpIf, NULL); return ; } - + IpSb->DefaultInterface = IpIf; InsertHeadList (&IpSb->Interfaces, &IpIf->Link); IpSb->DefaultRouteTable = RouteTable; @@ -255,7 +255,7 @@ Ip4Config2ReadConfigData ( return EFI_NOT_FOUND; } - + for (Index = 0; Index < Variable->DataRecordCount; Index++) { CopyMem (&DataRecord, &Variable->DataRecord[Index], sizeof (DataRecord)); @@ -375,8 +375,8 @@ Ip4Config2WriteConfigData ( /** - Build a EFI_IP4_ROUTE_TABLE to be returned to the caller of GetModeData. - The EFI_IP4_ROUTE_TABLE is clumsy to use in the internal operation of the + Build a EFI_IP4_ROUTE_TABLE to be returned to the caller of GetModeData. + The EFI_IP4_ROUTE_TABLE is clumsy to use in the internal operation of the IP4 driver. @param[in] IpSb The IP4 service binding instance. @@ -392,7 +392,7 @@ Ip4Config2BuildDefaultRouteTable ( OUT EFI_IP4_ROUTE_TABLE *Table ) { - LIST_ENTRY *Entry; + LIST_ENTRY *Entry; IP4_ROUTE_ENTRY *RtEntry; UINT32 Count; INT32 Index; @@ -468,8 +468,8 @@ Ip4Config2OnDhcp4SbInstalled ( @param[in] StationAddress Ip address to be set. @param[in] SubnetMask Subnet to be set. - @retval EFI_SUCCESS Set default address successful. - @retval Others Some errors occur in setting. + @retval EFI_SUCCESS Set default address successful. + @retval Others Some errors occur in setting. **/ EFI_STATUS @@ -501,7 +501,7 @@ Ip4Config2SetDefaultAddr ( // if (IpSb->DefaultRouteTable != NULL) { Ip4FreeRouteTable (IpSb->DefaultRouteTable); - IpSb->DefaultRouteTable = NULL; + IpSb->DefaultRouteTable = NULL; } Ip4CancelReceive (IpSb->DefaultInterface); @@ -509,7 +509,7 @@ Ip4Config2SetDefaultAddr ( IpSb->DefaultInterface = NULL; // // Create new default interface and route table. - // + // IpIf = Ip4CreateInterface (IpSb->Mnp, IpSb->Controller, IpSb->Image); if (IpIf == NULL) { return EFI_OUT_OF_RESOURCES; @@ -520,7 +520,7 @@ Ip4Config2SetDefaultAddr ( Ip4FreeInterface (IpIf, NULL); return EFI_OUT_OF_RESOURCES; } - + IpSb->DefaultInterface = IpIf; InsertHeadList (&IpSb->Interfaces, &IpIf->Link); IpSb->DefaultRouteTable = RouteTable; @@ -537,8 +537,8 @@ Ip4Config2SetDefaultAddr ( } if (IpIf->Arp != NULL) { - // - // A non-NULL IpIf->Arp here means a new ARP child is created when setting default address, + // + // A non-NULL IpIf->Arp here means a new ARP child is created when setting default address, // but some IP children may have referenced the default interface before it is configured, // these IP instances also consume this ARP protocol so they need to open it BY_CHILD_CONTROLLER. // @@ -580,20 +580,20 @@ Ip4Config2SetDefaultAddr ( IpSb->State = IP4_SERVICE_CONFIGED; IpSb->Reconfig = FALSE; - + return EFI_SUCCESS; } /** Set the station address, subnetmask and gateway address for the default interface. - @param[in] Instance The pointer to the IP4 config2 instance data. + @param[in] Instance The pointer to the IP4 config2 instance data. @param[in] StationAddress Ip address to be set. @param[in] SubnetMask Subnet to be set. @param[in] GatewayAddress Gateway to be set. - @retval EFI_SUCCESS Set default If successful. - @retval Others Errors occur as indicated. + @retval EFI_SUCCESS Set default If successful. + @retval Others Errors occur as indicated. **/ EFI_STATUS @@ -630,7 +630,7 @@ Ip4Config2SetDefaultIf ( IP4_ALLZERO_ADDRESS, IP4_ALLZERO_ADDRESS, GatewayAddress - ); + ); } return EFI_SUCCESS; @@ -687,7 +687,7 @@ Ip4Config2CleanDhcp4 ( /** This worker function sets the DNS server list for the EFI IPv4 network stack running on the communication device that this EFI_IP4_CONFIG2_PROTOCOL - manages. The DNS server addresses must be unicast IPv4 addresses. + manages. The DNS server addresses must be unicast IPv4 addresses. @param[in] Instance The pointer to the IP4 config2 instance data. @param[in] DataSize The size of the buffer pointed to by Data in bytes. @@ -728,7 +728,7 @@ Ip4Config2SetDnsServerWorker ( Item = &Instance->DataItem[Ip4Config2DataTypeDnsServer]; NewDns = (EFI_IPv4_ADDRESS *) Data; OldDns = Item->Data.DnsServers; - NewDnsCount = DataSize / sizeof (EFI_IPv4_ADDRESS); + NewDnsCount = DataSize / sizeof (EFI_IPv4_ADDRESS); OldDnsCount = Item->DataSize / sizeof (EFI_IPv4_ADDRESS); OneAdded = FALSE; @@ -785,7 +785,7 @@ Ip4Config2SetDnsServerWorker ( if (Tmp != NULL) { if (Item->Data.Ptr != NULL) { FreePool (Item->Data.Ptr); - } + } Item->Data.Ptr = Tmp; } @@ -846,7 +846,7 @@ Ip4Config2OnDhcp4Complete ( if (EFI_ERROR (Status)) { goto Exit; } - + // // Parse the ACK to get required DNS server information. // @@ -916,7 +916,7 @@ Ip4StartAutoConfig ( EFI_DHCP4_PACKET_OPTION *OptionList[1]; IP4_CONFIG2_DHCP4_OPTION ParaList; EFI_STATUS Status; - + IpSb = IP4_SERVICE_FROM_IP4_CONFIG2_INSTANCE (Instance); if (IpSb->State > IP4_SERVICE_UNSTARTED) { @@ -978,7 +978,7 @@ Ip4StartAutoConfig ( ); Instance->Dhcp4Handle = NULL; - + return Status; } @@ -990,7 +990,7 @@ Ip4StartAutoConfig ( Status = Dhcp4->GetModeData (Dhcp4, &Dhcp4Mode); if (Dhcp4Mode.State == Dhcp4Bound) { Ip4Config2OnDhcp4Complete (NULL, Instance); - + return EFI_SUCCESS; } @@ -1023,14 +1023,14 @@ Ip4StartAutoConfig ( &gEfiDhcp4ServiceBindingProtocolGuid, Instance->Dhcp4Handle ); - + Instance->Dhcp4 = NULL; - + Instance->Dhcp4Handle = NULL; - + return Status; } - + // // Start the DHCP process // @@ -1051,20 +1051,20 @@ Ip4StartAutoConfig ( Ip4Config2DestroyDhcp4 (Instance); gBS->CloseEvent (Instance->Dhcp4Event); Instance->Dhcp4Event = NULL; - + return Status; } - + IpSb->State = IP4_SERVICE_STARTED; DispatchDpc (); - + return EFI_SUCCESS; } /** - The work function is to get the interface information of the communication + The work function is to get the interface information of the communication device this IP4_CONFIG2_INSTANCE manages. @param[in] Instance Pointer to the IP4 config2 instance data. @@ -1099,7 +1099,7 @@ Ip4Config2GetIfInfo ( if (IpSb->DefaultRouteTable != NULL) { Length += IpSb->DefaultRouteTable->TotalNum * sizeof (EFI_IP4_ROUTE_TABLE); } - + if (*DataSize < Length) { *DataSize = Length; return EFI_BUFFER_TOO_SMALL; @@ -1126,14 +1126,14 @@ Ip4Config2GetIfInfo ( IfInfo->RouteTableSize = IpSb->DefaultRouteTable->TotalNum; IfInfo->RouteTable = (EFI_IP4_ROUTE_TABLE *) ((UINT8 *) Data + sizeof (EFI_IP4_CONFIG2_INTERFACE_INFO)); - Ip4Config2BuildDefaultRouteTable (IpSb, IfInfo->RouteTable); + Ip4Config2BuildDefaultRouteTable (IpSb, IfInfo->RouteTable); } - + return EFI_SUCCESS; } /** - The work function is to set the general configuration policy for the EFI IPv4 network + The work function is to set the general configuration policy for the EFI IPv4 network stack that is running on the communication device managed by this IP4_CONFIG2_INSTANCE. The policy will affect other configuration settings. @@ -1175,7 +1175,7 @@ Ip4Config2SetPolicy ( } } else { // - // The policy is changed. Clean the ManualAddress, Gateway and DnsServers, + // The policy is changed. Clean the ManualAddress, Gateway and DnsServers, // shrink the variable data size, and fire up all the related events. // DataItem = &Instance->DataItem[Ip4Config2DataTypeManualAddress]; @@ -1204,7 +1204,7 @@ Ip4Config2SetPolicy ( DataItem->DataSize = 0; DataItem->Status = EFI_NOT_FOUND; NetMapIterate (&DataItem->EventMap, Ip4Config2SignalEvent, NULL); - + if (NewPolicy == Ip4Config2PolicyDhcp) { SET_DATA_ATTRIB (DataItem->Attribute, DATA_ATTRIB_VOLATILE); } else { @@ -1215,7 +1215,7 @@ Ip4Config2SetPolicy ( if (Instance->Dhcp4Handle != NULL) { Ip4Config2DestroyDhcp4 (Instance); } - + // // Close the event. // @@ -1235,7 +1235,7 @@ Ip4Config2SetPolicy ( } /** - The work function is to set the station addresses manually for the EFI IPv4 + The work function is to set the station addresses manually for the EFI IPv4 network stack. It is only configurable when the policy is Ip4Config2PolicyStatic. @param[in] Instance Pointer to the IP4 config2 instance data. @@ -1317,7 +1317,7 @@ Ip4Config2SetManualAddress ( if (DataItem->Data.Ptr != NULL) { FreePool (DataItem->Data.Ptr); } - + DataItem->Data.Ptr = Ptr; DataItem->DataSize = DataSize; DataItem->Status = EFI_NOT_READY; @@ -1331,7 +1331,7 @@ Ip4Config2SetManualAddress ( if (Ptr != NULL) { FreePool (Ptr); } - DataItem->Data.Ptr = NULL; + DataItem->Data.Ptr = NULL; } } else { // @@ -1350,7 +1350,7 @@ Ip4Config2SetManualAddress ( if (IpSb->DefaultInterface != NULL) { if (IpSb->DefaultRouteTable != NULL) { Ip4FreeRouteTable (IpSb->DefaultRouteTable); - IpSb->DefaultRouteTable = NULL; + IpSb->DefaultRouteTable = NULL; } Ip4CancelReceive (IpSb->DefaultInterface); @@ -1363,7 +1363,7 @@ Ip4Config2SetManualAddress ( // // Create new default interface and route table. - // + // IpIf = Ip4CreateInterface (IpSb->Mnp, IpSb->Controller, IpSb->Image); if (IpIf == NULL) { return EFI_OUT_OF_RESOURCES; @@ -1374,14 +1374,14 @@ Ip4Config2SetManualAddress ( Ip4FreeInterface (IpIf, NULL); return EFI_OUT_OF_RESOURCES; } - + IpSb->DefaultInterface = IpIf; InsertHeadList (&IpSb->Interfaces, &IpIf->Link); IpSb->DefaultRouteTable = RouteTable; Ip4ReceiveFrame (IpIf, NULL, Ip4AccpetFrame, IpSb); // - // Reset the State to unstarted. + // Reset the State to unstarted. // if (IpSb->State == IP4_SERVICE_CONFIGED || IpSb->State == IP4_SERVICE_STARTED) { IpSb->State = IP4_SERVICE_UNSTARTED; @@ -1392,8 +1392,8 @@ Ip4Config2SetManualAddress ( } /** - The work function is to set the gateway addresses manually for the EFI IPv4 - network stack that is running on the communication device that this EFI IPv4 + The work function is to set the gateway addresses manually for the EFI IPv4 + network stack that is running on the communication device that this EFI IPv4 Configuration Protocol manages. It is not configurable when the policy is Ip4Config2PolicyDhcp. The gateway addresses must be unicast IPv4 addresses. @@ -1474,7 +1474,7 @@ Ip4Config2SetGateway ( for (Index1 = 0; Index1 < NewGatewayCount; Index1++) { CopyMem (&Gateway, NewGateway + Index1, sizeof (IP4_ADDR)); - if ((IpSb->DefaultInterface->SubnetMask != 0) && + if ((IpSb->DefaultInterface->SubnetMask != 0) && !NetIp4IsUnicast (NTOHL (Gateway), IpSb->DefaultInterface->SubnetMask)) { return EFI_INVALID_PARAMETER; } @@ -1505,7 +1505,7 @@ Ip4Config2SetGateway ( IP4_ALLZERO_ADDRESS, IP4_ALLZERO_ADDRESS, NTOHL (Gateway) - ); + ); OneAdded = TRUE; } @@ -1541,9 +1541,9 @@ Ip4Config2SetGateway ( } /** - The work function is to set the DNS server list for the EFI IPv4 network - stack running on the communication device that this EFI_IP4_CONFIG2_PROTOCOL - manages. It is not configurable when the policy is Ip4Config2PolicyDhcp. + The work function is to set the DNS server list for the EFI IPv4 network + stack running on the communication device that this EFI_IP4_CONFIG2_PROTOCOL + manages. It is not configurable when the policy is Ip4Config2PolicyDhcp. The DNS server addresses must be unicast IPv4 addresses. @param[in] Instance The pointer to the IP4 config2 instance data. @@ -1589,7 +1589,7 @@ Ip4Config2SetDnsServer ( Status = Ip4Config2SetDnsServerWorker (Instance, DataSize, Data); } else { // - // DataSize is 0 and Data is NULL, clean up the DnsServer address. + // DataSize is 0 and Data is NULL, clean up the DnsServer address. // if (Item->Data.Ptr != NULL) { FreePool (Item->Data.Ptr); @@ -1598,7 +1598,7 @@ Ip4Config2SetDnsServer ( Item->DataSize = 0; Item->Status = EFI_NOT_FOUND; } - + return Status; } @@ -1678,7 +1678,7 @@ Ip4Config2OnDhcp4Event ( network stack was set successfully. @retval EFI_INVALID_PARAMETER One or more of the following are TRUE: - This is NULL. - - One or more fields in Data and DataSize do not match the + - One or more fields in Data and DataSize do not match the requirement of the data type indicated by DataType. @retval EFI_WRITE_PROTECTED The specified configuration data is read-only or the specified configuration data cannot be set under the current policy. @@ -2031,7 +2031,7 @@ Ip4Config2InitInstance ( NetMapInit (&Instance->DataItem[Index].EventMap); } - + // // Initialize each data type: associate storage and set data size for the // fixed size data types, hook the SetData function, set the data attribute. @@ -2066,7 +2066,7 @@ Ip4Config2InitInstance ( // // Try to read the config data from NV variable. - // If not found, write initialized config data into NV variable + // If not found, write initialized config data into NV variable // as a default config data. // Status = Ip4Config2ReadConfigData (IpSb->MacString, Instance); @@ -2077,7 +2077,7 @@ Ip4Config2InitInstance ( if (EFI_ERROR (Status)) { return Status; } - + Instance->Ip4Config2.SetData = EfiIp4Config2SetData; Instance->Ip4Config2.GetData = EfiIp4Config2GetData; Instance->Ip4Config2.RegisterDataNotify = EfiIp4Config2RegisterDataNotify; @@ -2166,7 +2166,7 @@ Ip4AutoReconfigCallBackDpc ( if (IpSb->State > IP4_SERVICE_UNSTARTED) { IpSb->State = IP4_SERVICE_UNSTARTED; } - + IpSb->Reconfig = TRUE; Ip4StartAutoConfig (&IpSb->Ip4Config2Instance); diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.h b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.h index a431f6f732..127588e20b 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.h +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Impl.h @@ -1,7 +1,7 @@ /** @file Definitions for EFI IPv4 Configuration II Protocol implementation. - Copyright (c) 2015 - 2016, Intel Corporation. All rights reserved.
+ Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2015 Hewlett Packard Enterprise Development LP
This program and the accompanying materials @@ -70,7 +70,7 @@ typedef struct _IP4_CONFIG2_INSTANCE IP4_CONFIG2_INSTANCE; 8 bytes. @retval EFI_SUCCESS The specified configuration data for the EFI IPv4 network stack was set successfully. - + **/ typedef EFI_STATUS @@ -87,14 +87,14 @@ EFI_STATUS @param[in, out] DataSize On input, in bytes, the size of Data. On output, in bytes, the size of buffer required to store the specified configuration data. - @param[in] Data The data buffer in which the configuration data is returned. + @param[in] Data The data buffer in which the configuration data is returned. Ignored if DataSize is ZERO. @retval EFI_BUFFER_TOO_SMALL The size of Data is too small for the specified - configuration data, and the required size is + configuration data, and the required size is returned in DataSize. - @retval EFI_SUCCESS The specified configuration data was obtained successfully. - + @retval EFI_SUCCESS The specified configuration data was obtained successfully. + **/ typedef EFI_STATUS @@ -151,7 +151,7 @@ typedef struct { #pragma pack() typedef struct { - EFI_IP4_CONFIG2_POLICY Policy; ///< manual or automatic + EFI_IP4_CONFIG2_POLICY Policy; ///< manual or automatic EFI_IP4_CONFIG2_MANUAL_ADDRESS *ManualAddress; ///< IP addresses UINT32 ManualAddressCount; ///< IP addresses count EFI_IPv4_ADDRESS *GatewayAddress; ///< Gateway address @@ -177,7 +177,7 @@ struct _IP4_CONFIG2_INSTANCE { EFI_IP4_CONFIG2_PROTOCOL Ip4Config2; EFI_IP4_CONFIG2_INTERFACE_INFO InterfaceInfo; - EFI_IP4_CONFIG2_POLICY Policy; + EFI_IP4_CONFIG2_POLICY Policy; IP4_CONFIG2_DATA_ITEM DataItem[Ip4Config2DataTypeMaximum]; EFI_EVENT Dhcp4SbNotifyEvent; @@ -190,7 +190,7 @@ struct _IP4_CONFIG2_INSTANCE { UINT32 FailedIaAddressCount; EFI_IPv4_ADDRESS *DeclineAddress; UINT32 DeclineAddressCount; - + IP4_FORM_CALLBACK_INFO CallbackInfo; IP4_CONFIG2_NVDATA Ip4NvData; diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Nv.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Nv.c index 694a2d0e1f..8dbb6a929f 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Nv.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Nv.c @@ -1,7 +1,7 @@ /** @file Helper functions for configuring or getting the parameters relating to Ip4. -Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -23,7 +23,7 @@ CHAR16 mIp4Config2StorageName[] = L"IP4_CONFIG2_IFR_NVDATA"; @return The prefix length of the subnet mask. @retval 0 Other errors as indicated. - + **/ UINT8 GetSubnetMaskPrefixLength ( @@ -65,7 +65,7 @@ GetSubnetMaskPrefixLength ( @retval EFI_SUCCESS The binary IP address is returned in Ip. @retval EFI_INVALID_PARAMETER The IP string is malformatted. - + **/ EFI_STATUS Ip4Config2StrToIp ( @@ -131,7 +131,7 @@ Ip4Config2StrToIp ( @retval EFI_SUCCESS The binary IP address list is returned in PtrIpList. @retval EFI_OUT_OF_RESOURCES Error occurs in allocating memory. @retval EFI_INVALID_PARAMETER The IP string is malformatted. - + **/ EFI_STATUS Ip4Config2StrToIpList ( @@ -141,19 +141,19 @@ Ip4Config2StrToIpList ( ) { UINTN BeginIndex; - UINTN EndIndex; + UINTN EndIndex; UINTN Index; UINTN IpIndex; CHAR16 *StrTemp; BOOLEAN SpaceTag; - + BeginIndex = 0; EndIndex = BeginIndex; Index = 0; IpIndex = 0; StrTemp = NULL; SpaceTag = TRUE; - + *PtrIpList = NULL; *IpCount = 0; @@ -173,14 +173,14 @@ Ip4Config2StrToIpList ( SpaceTag = FALSE; } } - + Index++; } if (*IpCount == 0) { return EFI_SUCCESS; } - + // // Allocate buffer for IpList. // @@ -203,10 +203,10 @@ Ip4Config2StrToIpList ( *IpCount = 0; return EFI_OUT_OF_RESOURCES; } - + CopyMem (StrTemp, Str + BeginIndex, (EndIndex - BeginIndex) * sizeof(CHAR16)); *(StrTemp + (EndIndex - BeginIndex)) = L'\0'; - + if (Ip4Config2StrToIp (StrTemp, &((*PtrIpList)[IpIndex])) != EFI_SUCCESS) { FreePool(StrTemp); FreePool(*PtrIpList); @@ -214,7 +214,7 @@ Ip4Config2StrToIpList ( *IpCount = 0; return EFI_INVALID_PARAMETER; } - + BeginIndex = EndIndex; IpIndex++; @@ -228,9 +228,9 @@ Ip4Config2StrToIpList ( EndIndex++; SpaceTag = FALSE; } - + Index++; - + if (*(Str + Index) == L'\0') { if (!SpaceTag) { StrTemp = AllocateZeroPool((EndIndex - BeginIndex + 1) * sizeof(CHAR16)); @@ -240,10 +240,10 @@ Ip4Config2StrToIpList ( *IpCount = 0; return EFI_OUT_OF_RESOURCES; } - + CopyMem (StrTemp, Str + BeginIndex, (EndIndex - BeginIndex) * sizeof(CHAR16)); *(StrTemp + (EndIndex - BeginIndex)) = L'\0'; - + if (Ip4Config2StrToIp (StrTemp, &((*PtrIpList)[IpIndex])) != EFI_SUCCESS) { FreePool(StrTemp); FreePool(*PtrIpList); @@ -255,7 +255,7 @@ Ip4Config2StrToIpList ( FreePool(StrTemp); } } - } + } return EFI_SUCCESS; } @@ -265,7 +265,7 @@ Ip4Config2StrToIpList ( @param[in] Ip The IPv4 address. @param[out] Str The dotted IP string. - + **/ VOID Ip4Config2IpToStr ( @@ -275,8 +275,8 @@ Ip4Config2IpToStr ( { UnicodeSPrint ( Str, - 2 * IP4_STR_MAX_SIZE, - L"%d.%d.%d.%d", + 2 * IP4_STR_MAX_SIZE, + L"%d.%d.%d.%d", Ip->Addr[0], Ip->Addr[1], Ip->Addr[2], @@ -286,13 +286,13 @@ Ip4Config2IpToStr ( /** - Convert the IPv4 address list into string consists of several decimal + Convert the IPv4 address list into string consists of several decimal dotted IPv4 addresses separated by space. @param[in] Ip The IPv4 address list. @param[in] IpCount The size of IPv4 address list. @param[out] Str The string contains several decimal dotted - IPv4 addresses separated by space. + IPv4 addresses separated by space. @retval EFI_SUCCESS Operation is success. @retval EFI_OUT_OF_RESOURCES Error occurs in allocating memory. @@ -310,7 +310,7 @@ Ip4Config2IpListToStr ( UINTN StrIndex; CHAR16 *TempStr; EFI_IPv4_ADDRESS *TempIp; - + Index = 0; TemIndex = 0; StrIndex = 0; @@ -327,9 +327,9 @@ Ip4Config2IpListToStr ( } UnicodeSPrint ( - TempStr, - 2 * IP4_STR_MAX_SIZE, - L"%d.%d.%d.%d", + TempStr, + 2 * IP4_STR_MAX_SIZE, + L"%d.%d.%d.%d", TempIp->Addr[0], TempIp->Addr[1], TempIp->Addr[2], @@ -342,7 +342,7 @@ Ip4Config2IpListToStr ( Str[StrIndex++] = L'\0'; } else { Str[StrIndex++] = L' '; - } + } break; } else { Str[StrIndex++] = *(TempStr + TemIndex); @@ -362,7 +362,7 @@ Ip4Config2IpListToStr ( @param[in] Event The pointer of Event. @param[in] Context The pointer of Context. - + **/ VOID EFIAPI @@ -384,7 +384,7 @@ Ip4Config2ManualAddressNotify ( set successfully. @retval EFI_INVALID_PARAMETER Source instance or target IFR data is not available. @retval Others Other errors as indicated. - + **/ EFI_STATUS Ip4Config2ConvertConfigNvDataToIfrNvData ( @@ -409,11 +409,11 @@ Ip4Config2ConvertConfigNvDataToIfrNvData ( Ip4Info = NULL; DnsAddress = NULL; GatewaySize = sizeof (EFI_IPv4_ADDRESS); - + if ((IfrNvData == NULL) || (Instance == NULL)) { return EFI_INVALID_PARAMETER; } - + NET_CHECK_SIGNATURE (Instance, IP4_CONFIG2_INSTANCE_SIGNATURE); IpSb = IP4_SERVICE_FROM_IP4_CONFIG2_INSTANCE (Instance); @@ -427,7 +427,7 @@ Ip4Config2ConvertConfigNvDataToIfrNvData ( // // Get the Policy info. - // + // DataSize = sizeof (EFI_IP4_CONFIG2_POLICY); Status = Ip4Config2->GetData ( Ip4Config2, @@ -438,14 +438,14 @@ Ip4Config2ConvertConfigNvDataToIfrNvData ( if (EFI_ERROR (Status)) { goto Exit; } - + if (Policy == Ip4Config2PolicyStatic) { IfrNvData->DhcpEnable = FALSE; } else if (Policy == Ip4Config2PolicyDhcp) { IfrNvData->DhcpEnable = TRUE; goto Exit; } - + // // Get the interface info. // @@ -459,7 +459,7 @@ Ip4Config2ConvertConfigNvDataToIfrNvData ( if (Status != EFI_BUFFER_TOO_SMALL) { return Status; } - + Ip4Info = AllocateZeroPool (DataSize); if (Ip4Info == NULL) { Status = EFI_OUT_OF_RESOURCES; @@ -475,7 +475,7 @@ Ip4Config2ConvertConfigNvDataToIfrNvData ( if (EFI_ERROR (Status)) { goto Exit; } - + // // Get the Gateway info. // @@ -502,7 +502,7 @@ Ip4Config2ConvertConfigNvDataToIfrNvData ( if ((Status != EFI_BUFFER_TOO_SMALL) && (Status != EFI_NOT_FOUND)) { goto Exit; } - + DnsCount = (UINT32) (DnsSize / sizeof (EFI_IPv4_ADDRESS)); if (DnsSize > 0) { @@ -511,7 +511,7 @@ Ip4Config2ConvertConfigNvDataToIfrNvData ( Status = EFI_OUT_OF_RESOURCES; goto Exit; } - + Status = Ip4Config2->GetData ( Ip4Config2, Ip4Config2DataTypeDnsServer, @@ -537,7 +537,7 @@ Exit: if (Ip4Info != NULL) { FreePool(Ip4Info); } - + return Status; } @@ -552,7 +552,7 @@ Exit: set successfully. @retval EFI_INVALID_PARAMETER The address information for setting is invalid. @retval Others Other errors as indicated. - + **/ EFI_STATUS Ip4Config2ConvertIfrNvDataToConfigNvData ( @@ -560,9 +560,9 @@ Ip4Config2ConvertIfrNvDataToConfigNvData ( IN OUT IP4_CONFIG2_INSTANCE *Instance ) { - EFI_STATUS Status; + EFI_STATUS Status; EFI_IP4_CONFIG2_PROTOCOL *Ip4Cfg2; - IP4_CONFIG2_NVDATA *Ip4NvData; + IP4_CONFIG2_NVDATA *Ip4NvData; EFI_IP_ADDRESS StationAddress; EFI_IP_ADDRESS SubnetMask; @@ -581,15 +581,15 @@ Ip4Config2ConvertIfrNvDataToConfigNvData ( Status = EFI_SUCCESS; Ip4Cfg2 = &Instance->Ip4Config2; Ip4NvData = &Instance->Ip4NvData; - + DnsCount = 0; - DnsAddress = NULL; - + DnsAddress = NULL; + TimeoutEvent = NULL; SetAddressEvent = NULL; - + if (Instance == NULL || IfrFormNvData == NULL) { return EFI_INVALID_PARAMETER; } @@ -597,10 +597,10 @@ Ip4Config2ConvertIfrNvDataToConfigNvData ( if (IfrFormNvData->Configure != TRUE) { return EFI_SUCCESS; } - + if (IfrFormNvData->DhcpEnable == TRUE) { Ip4NvData->Policy = Ip4Config2PolicyDhcp; - + Status = Ip4Cfg2->SetData ( Ip4Cfg2, Ip4Config2DataTypePolicy, @@ -623,15 +623,15 @@ Ip4Config2ConvertIfrNvDataToConfigNvData ( } Status = Ip4Config2StrToIp (IfrFormNvData->StationAddress, &StationAddress.v4); - if (EFI_ERROR (Status) || - (SubnetMask.Addr[0] != 0 && !NetIp4IsUnicast (NTOHL (StationAddress.Addr[0]), NTOHL (SubnetMask.Addr[0]))) || + if (EFI_ERROR (Status) || + (SubnetMask.Addr[0] != 0 && !NetIp4IsUnicast (NTOHL (StationAddress.Addr[0]), NTOHL (SubnetMask.Addr[0]))) || !Ip4StationAddressValid (NTOHL (StationAddress.Addr[0]), NTOHL (SubnetMask.Addr[0]))) { CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, L"Invalid IP address!", NULL); return EFI_INVALID_PARAMETER; } - + Status = Ip4Config2StrToIp (IfrFormNvData->GatewayAddress, &Gateway.v4); - if (EFI_ERROR (Status) || + if (EFI_ERROR (Status) || (Gateway.Addr[0] != 0 && SubnetMask.Addr[0] != 0 && !NetIp4IsUnicast (NTOHL (Gateway.Addr[0]), NTOHL (SubnetMask.Addr[0])))) { CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, L"Invalid Gateway!", NULL); return EFI_INVALID_PARAMETER; @@ -645,16 +645,16 @@ Ip4Config2ConvertIfrNvDataToConfigNvData ( CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, L"Invalid Dns Server!", NULL); FreePool(DnsAddress); return EFI_INVALID_PARAMETER; - } - } + } + } } else { if (EFI_ERROR (Status)) { CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, L"Invalid Dns Server!", NULL); } } - + if (Ip4NvData->ManualAddress != NULL) { - FreePool(Ip4NvData->ManualAddress); + FreePool(Ip4NvData->ManualAddress); } Ip4NvData->ManualAddressCount = 1; Ip4NvData->ManualAddress = AllocateZeroPool(sizeof(EFI_IP4_CONFIG2_MANUAL_ADDRESS)); @@ -662,14 +662,14 @@ Ip4Config2ConvertIfrNvDataToConfigNvData ( if (DnsAddress != NULL) { FreePool(DnsAddress); } - + return EFI_OUT_OF_RESOURCES; } CopyMem(&Ip4NvData->ManualAddress->Address, &StationAddress.v4, sizeof(EFI_IPv4_ADDRESS)); CopyMem(&Ip4NvData->ManualAddress->SubnetMask, &SubnetMask.v4, sizeof(EFI_IPv4_ADDRESS)); - + if (Ip4NvData->GatewayAddress != NULL) { - FreePool(Ip4NvData->GatewayAddress); + FreePool(Ip4NvData->GatewayAddress); } Ip4NvData->GatewayAddressCount = 1; Ip4NvData->GatewayAddress = AllocateZeroPool(sizeof(EFI_IPv4_ADDRESS)); @@ -680,9 +680,9 @@ Ip4Config2ConvertIfrNvDataToConfigNvData ( return EFI_OUT_OF_RESOURCES; } CopyMem(Ip4NvData->GatewayAddress, &Gateway.v4, sizeof(EFI_IPv4_ADDRESS)); - + if (Ip4NvData->DnsAddress != NULL) { - FreePool(Ip4NvData->DnsAddress); + FreePool(Ip4NvData->DnsAddress); } Ip4NvData->DnsAddressCount = (UINT32) DnsCount; Ip4NvData->DnsAddress = DnsAddress; @@ -726,7 +726,7 @@ Ip4Config2ConvertIfrNvDataToConfigNvData ( } IsAddressOk = FALSE; - + Status = Ip4Cfg2->RegisterDataNotify ( Ip4Cfg2, Ip4Config2DataTypeManualAddress, @@ -791,12 +791,12 @@ Ip4Config2ConvertIfrNvDataToConfigNvData ( DataSize, Ip4NvData->DnsAddress ); - + if (EFI_ERROR (Status)) { goto Exit; - } - } - } + } + } + } Exit: if (SetAddressEvent != NULL) { @@ -875,12 +875,12 @@ Ip4FormExtractConfig ( OUT EFI_STRING *Results ) { - EFI_STATUS Status; + EFI_STATUS Status; IP4_CONFIG2_INSTANCE *Ip4Config2Instance; - IP4_FORM_CALLBACK_INFO *Private; + IP4_FORM_CALLBACK_INFO *Private; IP4_CONFIG2_IFR_NVDATA *IfrFormNvData; EFI_STRING ConfigRequestHdr; - EFI_STRING ConfigRequest; + EFI_STRING ConfigRequest; BOOLEAN AllocatedRequest; EFI_STRING FormResult; UINTN Size; @@ -889,19 +889,19 @@ Ip4FormExtractConfig ( if (Progress == NULL || Results == NULL) { return EFI_INVALID_PARAMETER; } - - Status = EFI_SUCCESS; + + Status = EFI_SUCCESS; IfrFormNvData = NULL; ConfigRequest = NULL; - FormResult = NULL; + FormResult = NULL; Size = 0; - AllocatedRequest = FALSE; - ConfigRequest = Request; + AllocatedRequest = FALSE; + ConfigRequest = Request; Private = IP4_FORM_CALLBACK_INFO_FROM_CONFIG_ACCESS(This); Ip4Config2Instance = IP4_CONFIG2_INSTANCE_FROM_FORM_CALLBACK(Private); BufferSize = sizeof (IP4_CONFIG2_IFR_NVDATA); *Progress = Request; - + // // Check Request data in . // @@ -910,9 +910,9 @@ Ip4FormExtractConfig ( if (IfrFormNvData == NULL) { return EFI_OUT_OF_RESOURCES; } - + Ip4Config2ConvertConfigNvDataToIfrNvData (Ip4Config2Instance, IfrFormNvData); - + if ((Request == NULL) || (StrStr (Request, L"OFFSET") == NULL)) { // // Request has no request element, construct full request string. @@ -927,7 +927,7 @@ Ip4FormExtractConfig ( goto Failure; } AllocatedRequest = TRUE; - + UnicodeSPrint (ConfigRequest, Size, L"%s&OFFSET=0&WIDTH=%016LX", ConfigRequestHdr, (UINT64)BufferSize); FreePool (ConfigRequestHdr); } @@ -945,7 +945,7 @@ Ip4FormExtractConfig ( ); FreePool (IfrFormNvData); - + // // Free the allocated config request string. // @@ -958,7 +958,7 @@ Ip4FormExtractConfig ( goto Failure; } } - + if (Request == NULL || HiiIsConfigHdrMatch (Request, &gIp4Config2NvDataGuid, mIp4Config2StorageName)) { *Results = FormResult; } else { @@ -1107,7 +1107,7 @@ Ip4FormRouteConfig ( callback.Currently not implemented. @retval EFI_INVALID_PARAMETERS Passing in wrong parameter. @retval Others Other errors as indicated. - + **/ EFI_STATUS EFIAPI @@ -1124,7 +1124,7 @@ Ip4FormCallback ( IP4_CONFIG2_INSTANCE *Instance; IP4_CONFIG2_IFR_NVDATA *IfrFormNvData; IP4_FORM_CALLBACK_INFO *Private; - + EFI_IP_ADDRESS StationAddress; EFI_IP_ADDRESS SubnetMask; EFI_IP_ADDRESS Gateway; @@ -1133,15 +1133,15 @@ Ip4FormCallback ( UINTN DnsCount; UINTN Index; EFI_INPUT_KEY Key; - + IfrFormNvData = NULL; DnsCount = 0; - DnsAddress = NULL; + DnsAddress = NULL; if (Action == EFI_BROWSER_ACTION_CHANGED) { Private = IP4_FORM_CALLBACK_INFO_FROM_CONFIG_ACCESS(This); Instance = IP4_CONFIG2_INSTANCE_FROM_FORM_CALLBACK(Private); - + IfrFormNvData = AllocateZeroPool (sizeof (IP4_CONFIG2_IFR_NVDATA)); if (IfrFormNvData == NULL) { return EFI_OUT_OF_RESOURCES; @@ -1181,7 +1181,7 @@ Ip4FormCallback ( Status = EFI_INVALID_PARAMETER; } break; - + case KEY_DNS: Status = Ip4Config2StrToIpList (IfrFormNvData->DnsAddress, &DnsAddress, &DnsCount); if (!EFI_ERROR (Status) && DnsCount > 0) { @@ -1191,19 +1191,19 @@ Ip4FormCallback ( CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, L"Invalid Dns Server!", NULL); Status = EFI_INVALID_PARAMETER; break; - } + } } } else { if (EFI_ERROR (Status)) { CreatePopUp (EFI_LIGHTGRAY | EFI_BACKGROUND_BLUE, &Key, L"Invalid Dns Server!", NULL); } } - - if(DnsAddress != NULL) { + + if(DnsAddress != NULL) { FreePool(DnsAddress); } break; - + case KEY_SAVE_CHANGES: Status = Ip4Config2ConvertIfrNvDataToConfigNvData (IfrFormNvData, Instance); *ActionRequest = EFI_BROWSER_ACTION_REQUEST_SUBMIT; @@ -1232,7 +1232,7 @@ Ip4FormCallback ( @retval EFI_SUCCESS The HII Config Access protocol is installed. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @retval Others Other errors as indicated. - + **/ EFI_STATUS Ip4Config2FormInit ( @@ -1253,9 +1253,9 @@ Ip4Config2FormInit ( IpSb = IP4_SERVICE_FROM_IP4_CONFIG2_INSTANCE (Instance); ASSERT (IpSb != NULL); - + CallbackInfo = &Instance->CallbackInfo; - + CallbackInfo->Signature = IP4_FORM_CALLBACK_INFO_SIGNATURE; Status = gBS->HandleProtocol ( @@ -1344,26 +1344,26 @@ Ip4Config2FormInit ( Status = NetLibGetMacString (IpSb->Controller, IpSb->Image, &MacString); if (!EFI_ERROR (Status)) { OldMenuString = HiiGetString ( - CallbackInfo->RegisteredHandle, - STRING_TOKEN (STR_IP4_CONFIG2_FORM_HELP), + CallbackInfo->RegisteredHandle, + STRING_TOKEN (STR_IP4_CONFIG2_FORM_HELP), NULL ); UnicodeSPrint (MenuString, 128, L"%s (MAC:%s)", OldMenuString, MacString); HiiSetString ( - CallbackInfo->RegisteredHandle, - STRING_TOKEN (STR_IP4_CONFIG2_FORM_HELP), - MenuString, + CallbackInfo->RegisteredHandle, + STRING_TOKEN (STR_IP4_CONFIG2_FORM_HELP), + MenuString, NULL ); UnicodeSPrint (PortString, 128, L"MAC:%s", MacString); HiiSetString ( - CallbackInfo->RegisteredHandle, - STRING_TOKEN (STR_IP4_DEVICE_FORM_HELP), - PortString, + CallbackInfo->RegisteredHandle, + STRING_TOKEN (STR_IP4_DEVICE_FORM_HELP), + PortString, NULL ); - + FreePool (MacString); FreePool (OldMenuString); @@ -1405,7 +1405,7 @@ Ip4Config2FormUnload ( IpSb->Image, CallbackInfo->ChildHandle ); - + // // Uninstall EFI_HII_CONFIG_ACCESS_PROTOCOL // diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Nv.h b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Nv.h index 5a82e6d229..884d01a0d5 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Nv.h +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Config2Nv.h @@ -1,7 +1,7 @@ /** @file The header file of IP4Config2Nv.c -Copyright (c) 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -30,7 +30,7 @@ extern UINT8 Ip4DxeStrings[]; @retval EFI_SUCCESS The HII Config Access protocol is installed. @retval EFI_OUT_OF_RESOURCES Failed to allocate memory. @retval Others Other errors as indicated. - + **/ EFI_STATUS Ip4Config2FormInit ( diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c index 552c4e190b..0f25581414 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.c @@ -258,7 +258,7 @@ Ip4CreateService ( IpSb->ReconfigEvent = NULL; IpSb->Reconfig = FALSE; - + IpSb->MediaPresent = TRUE; // @@ -352,7 +352,7 @@ Ip4CreateService ( IpSb->MacString = NULL; Status = NetLibGetMacString (IpSb->Controller, IpSb->Image, &IpSb->MacString); - + if (EFI_ERROR (Status)) { goto ON_ERROR; } @@ -367,7 +367,7 @@ Ip4CreateService ( InsertHeadList (&IpSb->Interfaces, &IpSb->DefaultInterface->Link); ZeroMem (&IpSb->Ip4Config2Instance, sizeof (IP4_CONFIG2_INSTANCE)); - + Status = Ip4Config2InitInstance (&IpSb->Ip4Config2Instance); if (EFI_ERROR (Status)) { @@ -488,7 +488,7 @@ Ip4CleanService ( /** Callback function which provided by user to remove one node in NetDestroyLinkList process. - + @param[in] Entry The entry to be removed. @param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList. @@ -549,7 +549,7 @@ Ip4DriverBindingStart ( IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL *RemainingDevicePath OPTIONAL ) -{ +{ EFI_STATUS Status; IP4_SERVICE *IpSb; EFI_IP4_CONFIG2_PROTOCOL *Ip4Cfg2; @@ -575,13 +575,13 @@ Ip4DriverBindingStart ( if (Status == EFI_SUCCESS) { return EFI_ALREADY_STARTED; } - + Status = Ip4CreateService (ControllerHandle, This->DriverBindingHandle, &IpSb); - + if (EFI_ERROR (Status)) { return Status; } - + ASSERT (IpSb != NULL); Ip4Cfg2 = &IpSb->Ip4Config2Instance.Ip4Config2; @@ -603,16 +603,16 @@ Ip4DriverBindingStart ( } // - // Read the config data from NV variable again. + // Read the config data from NV variable again. // The default data can be changed by other drivers. // Status = Ip4Config2ReadConfigData (IpSb->MacString, &IpSb->Ip4Config2Instance); if (EFI_ERROR (Status)) { goto UNINSTALL_PROTOCOL; } - + // - // Consume the installed EFI_IP4_CONFIG2_PROTOCOL to set the default data items. + // Consume the installed EFI_IP4_CONFIG2_PROTOCOL to set the default data items. // for (Index = Ip4Config2DataTypePolicy; Index < Ip4Config2DataTypeMaximum; Index++) { DataItem = &IpSb->Ip4Config2Instance.DataItem[Index]; @@ -626,13 +626,13 @@ Ip4DriverBindingStart ( if (EFI_ERROR(Status)) { goto UNINSTALL_PROTOCOL; } - + if (Index == Ip4Config2DataTypePolicy && (*(DataItem->Data.Policy) == Ip4Config2PolicyDhcp)) { break; - } + } } } - + // // Ready to go: start the receiving and timer. // Ip4Config2SetPolicy maybe call Ip4ReceiveFrame() to set the default interface's RecvRequest first after @@ -705,9 +705,9 @@ Ip4DriverBindingStop ( ) { EFI_SERVICE_BINDING_PROTOCOL *ServiceBinding; - IP4_SERVICE *IpSb; + IP4_SERVICE *IpSb; EFI_HANDLE NicHandle; - EFI_STATUS Status; + EFI_STATUS Status; INTN State; LIST_ENTRY *List; IP4_DESTROY_CHILD_IN_HANDLE_BUF_CONTEXT Context; @@ -717,20 +717,20 @@ Ip4DriverBindingStop ( BOOLEAN IsDhcp4; IsDhcp4 = FALSE; - + NicHandle = NetLibGetNicHandle (ControllerHandle, &gEfiManagedNetworkProtocolGuid); if (NicHandle == NULL) { NicHandle = NetLibGetNicHandle (ControllerHandle, &gEfiArpProtocolGuid); if (NicHandle == NULL) { NicHandle = NetLibGetNicHandle (ControllerHandle, &gEfiDhcp4ProtocolGuid); if (NicHandle != NULL) { - IsDhcp4 = TRUE; + IsDhcp4 = TRUE; } else { return EFI_SUCCESS; } } } - + Status = gBS->OpenProtocol ( NicHandle, &gEfiIp4ServiceBindingProtocolGuid, @@ -742,7 +742,7 @@ Ip4DriverBindingStop ( if (EFI_ERROR (Status)) { return EFI_DEVICE_ERROR; } - + IpSb = IP4_SERVICE_FROM_PROTOCOL (ServiceBinding); if (IsDhcp4) { @@ -761,7 +761,7 @@ Ip4DriverBindingStop ( NULL ); } else if (IpSb->DefaultInterface->ArpHandle == ControllerHandle) { - + // // The ARP protocol for the default interface is being uninstalled and all // its IP child handles should have been destroyed before. So, release the @@ -770,7 +770,7 @@ Ip4DriverBindingStop ( Ip4CancelReceive (IpSb->DefaultInterface); Ip4FreeInterface (IpSb->DefaultInterface, NULL); Ip4FreeRouteTable (IpSb->DefaultRouteTable); - + IpIf = Ip4CreateInterface (IpSb->Mnp, IpSb->Controller, IpSb->Image); if (IpIf == NULL) { goto ON_ERROR; @@ -780,7 +780,7 @@ Ip4DriverBindingStop ( Ip4FreeInterface (IpIf, NULL); goto ON_ERROR;; } - + IpSb->DefaultInterface = IpIf; InsertHeadList (&IpSb->Interfaces, &IpIf->Link); IpSb->DefaultRouteTable = RouteTable; @@ -807,7 +807,7 @@ Ip4DriverBindingStop ( &IpSb->Ip4Config2Instance.Ip4Config2, NULL ); - + if (gIp4ControllerNameTable != NULL) { FreeUnicodeStringTable (gIp4ControllerNameTable); gIp4ControllerNameTable = NULL; diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.h b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.h index 8c5298b645..0a278cd775 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.h +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Driver.h @@ -1,6 +1,6 @@ /** @file -Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -34,7 +34,7 @@ typedef struct { This is the declaration of an EFI image entry point. This entry point is the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including both device drivers and bus drivers. - + The entry point for IP4 driver which install the driver binding and component name protocol on its image. @@ -114,7 +114,7 @@ Ip4DriverBindingStart ( restrictions for this service. DisconnectController() must follow these calling restrictions. If any other agent wishes to call Stop() it must also follow these calling restrictions. - + @param[in] This Protocol instance pointer. @param[in] ControllerHandle Handle of device to stop driver on @param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number @@ -139,14 +139,14 @@ Ip4DriverBindingStop ( // /** Creates a child handle and installs a protocol. - - The CreateChild() function installs a protocol on ChildHandle. - If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle. + + The CreateChild() function installs a protocol on ChildHandle. + If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle. If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle. @param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance. @param ChildHandle Pointer to the handle of the child to create. If it is NULL, - then a new handle is created. If it is a pointer to an existing UEFI handle, + then a new handle is created. If it is a pointer to an existing UEFI handle, then the protocol is added to the existing UEFI handle. @retval EFI_SUCCES The protocol was added to ChildHandle. @@ -165,9 +165,9 @@ Ip4ServiceBindingCreateChild ( /** Destroys a child handle with a protocol installed on it. - - The DestroyChild() function does the opposite of CreateChild(). It removes a protocol - that was installed by CreateChild() from ChildHandle. If the removed protocol is the + + The DestroyChild() function does the opposite of CreateChild(). It removes a protocol + that was installed by CreateChild() from ChildHandle. If the removed protocol is the last protocol on ChildHandle, then ChildHandle is destroyed. @param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance. diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf index 313528783d..b2b934a8c3 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.inf @@ -6,7 +6,7 @@ # subset of the Internet Control Message Protocol (ICMP) and may include support for # the Internet Group Management Protocol (IGMP). # -# Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at @@ -24,7 +24,7 @@ MODULE_UNI_FILE = Ip4Dxe.uni FILE_GUID = 9FB1A1F3-3B71-4324-B39A-745CBB015FFF MODULE_TYPE = UEFI_DRIVER - VERSION_STRING = 1.0 + VERSION_STRING = 1.0 ENTRY_POINT = Ip4DriverEntryPoint UNLOAD_IMAGE = NetLibDefaultUnload @@ -33,7 +33,7 @@ # # VALID_ARCHITECTURES = IA32 X64 IPF EBC # -# DRIVER_BINDING = gIp4DriverBinding +# DRIVER_BINDING = gIp4DriverBinding # COMPONENT_NAME = gIp4ComponentName # COMPONENT_NAME2 = gIp4ComponentName2 # @@ -102,7 +102,7 @@ gEfiIpSec2ProtocolGuid ## SOMETIMES_CONSUMES gEfiHiiConfigAccessProtocolGuid ## BY_START gEfiDevicePathProtocolGuid ## TO_START - + [Guids] ## SOMETIMES_CONSUMES ## GUID # HiiIsConfigHdrMatch EFI_NIC_IP4_CONFIG_VARIABLE ## SOMETIMES_PRODUCES ## GUID # HiiConstructConfigHdr EFI_NIC_IP4_CONFIG_VARIABLE diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.uni b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.uni index e25b0242d6..a0779b9c9c 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.uni +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Dxe.uni @@ -6,13 +6,13 @@ // subset of the Internet Control Message Protocol (ICMP) and may include support for // the Internet Group Management Protocol (IGMP). // -// Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4DxeExtra.uni b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4DxeExtra.uni index 9335e9cfa3..15b0c9027d 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4DxeExtra.uni +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4DxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // Ip4Dxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "IP v4 DXE Driver" diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4DxeStrings.uni b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4DxeStrings.uni index 0546ceacb9..0b68c2f469 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4DxeStrings.uni +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4DxeStrings.uni @@ -1,7 +1,7 @@ // /** @file // String definitions for Ip4Config2 formset -// Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
// This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at @@ -30,7 +30,7 @@ #string STR_IP4_MASK_HELP #language en-US "Enter NetMask in dotted-decimal notation. Example: 255.255.255.0\r\n" #string STR_IP4_LOCAL_GATEWAY #language en-US "Local Gateway" #string STR_IP4_GATEWAY_HELP #language en-US "Enter Gateway in dotted-decimal notation. Example: 192.168.10.1\r\n" -#string STR_IP4_LOCAL_DNS #language en-US "Local DNS Servers" +#string STR_IP4_LOCAL_DNS #language en-US "Local DNS Servers" #string STR_IP4_DNS_HELP #language en-US "Enter DNS Servers in dotted-decimal notation. Example: 192.168.10.8 192.168.10.9\r\n" #string STR_SAVE_CHANGES #language en-US "Save Changes and Exit" #string STR_NULL #language en-US "" diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Icmp.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Icmp.c index ed6bdbe466..511342e786 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Icmp.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Icmp.c @@ -1,6 +1,6 @@ /** @file -Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -72,7 +72,7 @@ mIp4SupportedIcmp[23] = { /** Process the ICMP redirect. Find the instance then update its route cache. - + All kinds of redirect is treated as host redirect as specified by RFC1122 3.3.1.2: "Since the subnet mask appropriate to the destination @@ -80,7 +80,7 @@ mIp4SupportedIcmp[23] = { message SHOULD be treated identically to a Host Redirect message;" - @param[in] IpSb The IP4 service binding instance that received + @param[in] IpSb The IP4 service binding instance that received the packet. @param[in] Head The IP head of the received ICMPpacket. @param[in] Packet The content of the ICMP redirect packet with IP @@ -166,7 +166,7 @@ Ip4ProcessIcmpRedirect ( @retval EFI_SUCCESS The ICMP error is processed successfully. @retval EFI_INVALID_PARAMETER The packet is invalid @retval Others Failed to process the packet. - + **/ EFI_STATUS Ip4ProcessIcmpError ( diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Icmp.h b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Icmp.h index 30199dced6..a5183efb0a 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Icmp.h +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Icmp.h @@ -1,7 +1,7 @@ /** @file Header file for ICMP protocol. - -Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.
+ +Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c index d29d87372e..6e0e3290c7 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.c @@ -1,7 +1,7 @@ /** @file Implement IP4 pesudo interface. - -Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.
+ +Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -68,7 +68,7 @@ Ip4OnArpResolvedDpc ( @param Event The Arp request event. @param Context The context of the callback, a point to the ARP queue. - + **/ VOID EFIAPI @@ -139,7 +139,7 @@ Ip4CancelFrameArp ( finished. @param[in] Context Opaque parameter to the call back. - @retval Token The wrapped token if succeed + @retval Token The wrapped token if succeed @retval NULL The wrapped token if NULL **/ @@ -587,10 +587,10 @@ Ip4SetAddress ( Interface->Image, Interface->Controller ); - + Interface->Arp = NULL; } - + NetLibDestroyServiceChild ( Interface->Controller, Interface->Image, @@ -872,7 +872,7 @@ Ip4OnArpResolvedDpc ( @param Event The Arp request event. @param Context The context of the callback, a point to the ARP queue. - + **/ VOID EFIAPI diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.h b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.h index 577286360b..909837131e 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.h +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4If.h @@ -1,7 +1,7 @@ /** @file Definition for IP4 pesudo interface structure. - -Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.
+ +Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Igmp.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Igmp.c index e0edc93ff8..ee768bb39d 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Igmp.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Igmp.c @@ -1,7 +1,7 @@ /** @file This file implements the RFC2236: IGMP v2. - -Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.
+ +Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c index 5a9d828703..fa84a9b1ca 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.c @@ -682,7 +682,7 @@ Ip4ConfigProtocol ( // if (IpSb->State == IP4_SERVICE_UNSTARTED) { // - // Trigger the EFI_IP4_CONFIG2_PROTOCOL to retrieve the + // Trigger the EFI_IP4_CONFIG2_PROTOCOL to retrieve the // default IPv4 address if it is not available yet. // Policy = IpSb->Ip4Config2Instance.Policy; @@ -1048,11 +1048,11 @@ Ip4Groups ( // is decreamented each time an address is removed.. // for (Index = IpInstance->GroupCount; Index > 0 ; Index--) { - Group = 0; + Group = 0; if(IpInstance->Groups != NULL) { - Group = IpInstance->Groups[Index - 1]; - } - + Group = IpInstance->Groups[Index - 1]; + } + if ((GroupAddress == NULL) || EFI_IP4_EQUAL (&Group, GroupAddress)) { if (EFI_ERROR (Ip4LeaveGroup (IpInstance, NTOHL (Group)))) { return EFI_DEVICE_ERROR; @@ -1663,7 +1663,7 @@ EfiIp4Transmit ( } RawHdrLen = (UINT8) (RawHdrLen << 2); - + CopyMem (&Head, FirstFragment, IP4_MIN_HEADLEN); Ip4NtohHead (&Head); @@ -2253,8 +2253,8 @@ Ip4SentPacketTicking ( } /** - This heart beat timer of IP4 service instance times out all of its IP4 children's - received-but-not-delivered and transmitted-but-not-recycle packets, and provides + This heart beat timer of IP4 service instance times out all of its IP4 children's + received-but-not-delivered and transmitted-but-not-recycle packets, and provides time input for its IGMP protocol. @param[in] Event The IP4 service instance's heart beat timer. @@ -2272,17 +2272,17 @@ Ip4TimerTicking ( IpSb = (IP4_SERVICE *) Context; NET_CHECK_SIGNATURE (IpSb, IP4_SERVICE_SIGNATURE); - + Ip4PacketTimerTicking (IpSb); Ip4IgmpTicking (IpSb); } /** - This dedicated timer is used to poll underlying network media status. In case - of cable swap or wireless network switch, a new round auto configuration will - be initiated. The timer will signal the IP4 to run DHCP configuration again. - IP4 driver will free old IP address related resource, such as route table and - Interface, then initiate a DHCP process to acquire new IP, eventually create + This dedicated timer is used to poll underlying network media status. In case + of cable swap or wireless network switch, a new round auto configuration will + be initiated. The timer will signal the IP4 to run DHCP configuration again. + IP4 driver will free old IP address related resource, such as route table and + Interface, then initiate a DHCP process to acquire new IP, eventually create route table for new IP address. @param[in] Event The IP4 service instance's heart beat timer. @@ -2303,12 +2303,12 @@ Ip4TimerReconfigChecking ( IpSb = (IP4_SERVICE *) Context; NET_CHECK_SIGNATURE (IpSb, IP4_SERVICE_SIGNATURE); - + OldMediaPresent = IpSb->MediaPresent; // - // Get fresh mode data from MNP, since underlying media status may change. - // Here, it needs to mention that the MediaPresent can also be checked even if + // Get fresh mode data from MNP, since underlying media status may change. + // Here, it needs to mention that the MediaPresent can also be checked even if // EFI_NOT_STARTED returned while this MNP child driver instance isn't configured. // Status = IpSb->Mnp->GetModeData (IpSb->Mnp, NULL, &SnpModeData); @@ -2323,8 +2323,8 @@ Ip4TimerReconfigChecking ( if (!OldMediaPresent && IpSb->MediaPresent && (IpSb->Ip4Config2Instance.Policy == Ip4Config2PolicyDhcp)) { // // Signal the IP4 to run the dhcp configuration again. IP4 driver will free - // old IP address related resource, such as route table and Interface, then - // initiate a DHCP round to acquire new IP, eventually + // old IP address related resource, such as route table and Interface, then + // initiate a DHCP round to acquire new IP, eventually // create route table for new IP address. // if (IpSb->ReconfigEvent != NULL) { diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.h b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.h index 8bdc39a3f1..ddca6ce897 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.h +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Impl.h @@ -1,6 +1,6 @@ /** @file Ip4 internal functions and type defintions. - + Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.
@@ -134,7 +134,7 @@ struct _IP4_PROTOCOL { EFI_HANDLE Handle; INTN State; - BOOLEAN InDestroy; + BOOLEAN InDestroy; IP4_SERVICE *Service; LIST_ENTRY Link; // Link to all the IP protocol from the service @@ -212,7 +212,7 @@ struct _IP4_SERVICE { BOOLEAN Reconfig; // - // Underlying media present status. + // Underlying media present status. // BOOLEAN MediaPresent; @@ -334,8 +334,8 @@ Ip4Groups ( ); /** - This heart beat timer of IP4 service instance times out all of its IP4 children's - received-but-not-delivered and transmitted-but-not-recycle packets, and provides + This heart beat timer of IP4 service instance times out all of its IP4 children's + received-but-not-delivered and transmitted-but-not-recycle packets, and provides time input for its IGMP protocol. @param[in] Event The IP4 service instance's heart beat timer. @@ -350,11 +350,11 @@ Ip4TimerTicking ( ); /** - This dedicated timer is used to poll underlying network media status. In case - of cable swap or wireless network switch, a new round auto configuration will - be initiated. The timer will signal the IP4 to run DHCP configuration again. - IP4 driver will free old IP address related resource, such as route table and - Interface, then initiate a DHCP process to acquire new IP, eventually create + This dedicated timer is used to poll underlying network media status. In case + of cable swap or wireless network switch, a new round auto configuration will + be initiated. The timer will signal the IP4 to run DHCP configuration again. + IP4 driver will free old IP address related resource, such as route table and + Interface, then initiate a DHCP process to acquire new IP, eventually create route table for new IP address. @param[in] Event The IP4 service instance's heart beat timer. diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.c index e694323019..f22a3c3199 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.c @@ -1,7 +1,7 @@ /** @file IP4 input process. - -Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.
+ +Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2015 Hewlett-Packard Development Company, L.P.
This program and the accompanying materials @@ -441,8 +441,8 @@ DROP: } /** - The callback function for the net buffer which wraps the packet processed by - IPsec. It releases the wrap packet and also signals IPsec to free the resources. + The callback function for the net buffer which wraps the packet processed by + IPsec. It releases the wrap packet and also signals IPsec to free the resources. @param[in] Arg The wrap context @@ -469,25 +469,25 @@ Ip4IpSecFree ( } /** - The work function to locate IPsec protocol to process the inbound or + The work function to locate IPsec protocol to process the inbound or outbound IP packets. The process routine handls the packet with following - actions: bypass the packet, discard the packet, or protect the packet. + actions: bypass the packet, discard the packet, or protect the packet. @param[in] IpSb The IP4 service instance. @param[in, out] Head The The caller supplied IP4 header. @param[in, out] Netbuf The IP4 packet to be processed by IPsec. @param[in, out] Options The caller supplied options. @param[in, out] OptionsLen The length of the option. - @param[in] Direction The directionality in an SPD entry, + @param[in] Direction The directionality in an SPD entry, EfiIPsecInBound or EfiIPsecOutBound. @param[in] Context The token's wrap. @retval EFI_SUCCESS The IPsec protocol is not available or disabled. @retval EFI_SUCCESS The packet was bypassed and all buffers remain the same. @retval EFI_SUCCESS The packet was protected. - @retval EFI_ACCESS_DENIED The packet was discarded. + @retval EFI_ACCESS_DENIED The packet was discarded. @retval EFI_OUT_OF_RESOURCES There is no suffcient resource to complete the operation. - @retval EFI_BUFFER_TOO_SMALL The number of non-empty block is bigger than the + @retval EFI_BUFFER_TOO_SMALL The number of non-empty block is bigger than the number of input data blocks when build a fragment table. **/ @@ -519,12 +519,12 @@ Ip4IpSecProcessPacket ( goto ON_EXIT; } ASSERT (mIpSec != NULL); - + Packet = *Netbuf; RecycleEvent = NULL; IpSecWrap = NULL; FragmentTable = NULL; - TxWrap = (IP4_TXTOKEN_WRAP *) Context; + TxWrap = (IP4_TXTOKEN_WRAP *) Context; FragmentCount = Packet->BlockOpNum; ZeroMem (&ZeroHead, sizeof (IP4_HEAD)); @@ -535,14 +535,14 @@ Ip4IpSecProcessPacket ( if (mIpSec->DisabledFlag) { // // If IPsec is disabled, restore the original MTU - // + // IpSb->MaxPacketSize = IpSb->OldMaxPacketSize; goto ON_EXIT; } else { // - // If IPsec is enabled, use the MTU which reduce the IPsec header length. + // If IPsec is enabled, use the MTU which reduce the IPsec header length. // - IpSb->MaxPacketSize = IpSb->OldMaxPacketSize - IP4_MAX_IPSEC_HEADLEN; + IpSb->MaxPacketSize = IpSb->OldMaxPacketSize - IP4_MAX_IPSEC_HEADLEN; } // @@ -554,9 +554,9 @@ Ip4IpSecProcessPacket ( Status = EFI_OUT_OF_RESOURCES; goto ON_EXIT; } - + Status = NetbufBuildExt (Packet, FragmentTable, &FragmentCount); - + // // Record the original FragmentTable and count. // @@ -572,7 +572,7 @@ Ip4IpSecProcessPacket ( // Convert host byte order to network byte order // Ip4NtohHead (*Head); - + Status = mIpSec->ProcessExt ( mIpSec, IpSb->Controller, @@ -590,7 +590,7 @@ Ip4IpSecProcessPacket ( // Convert back to host byte order // Ip4NtohHead (*Head); - + if (EFI_ERROR (Status)) { FreePool (OriginalFragmentTable); goto ON_EXIT; @@ -610,7 +610,7 @@ Ip4IpSecProcessPacket ( } if (Direction == EfiIPsecOutBound && TxWrap != NULL) { - + TxWrap->IpSecRecycleSignal = RecycleEvent; TxWrap->Packet = NetbufFromExt ( FragmentTable, @@ -635,28 +635,28 @@ Ip4IpSecProcessPacket ( // NetIpSecNetbufFree (*Netbuf); *Netbuf = TxWrap->Packet; - + } else { - + IpSecWrap = AllocateZeroPool (sizeof (IP4_IPSEC_WRAP)); - + if (IpSecWrap == NULL) { Status = EFI_OUT_OF_RESOURCES; gBS->SignalEvent (RecycleEvent); goto ON_EXIT; } - + IpSecWrap->IpSecRecycleSignal = RecycleEvent; IpSecWrap->Packet = Packet; Packet = NetbufFromExt ( - FragmentTable, - FragmentCount, - IP4_MAX_HEADLEN, - 0, - Ip4IpSecFree, + FragmentTable, + FragmentCount, + IP4_MAX_HEADLEN, + 0, + Ip4IpSecFree, IpSecWrap ); - + if (Packet == NULL) { Packet = IpSecWrap->Packet; gBS->SignalEvent (RecycleEvent); @@ -686,7 +686,7 @@ ON_EXIT: /** Pre-process the IPv4 packet. First validates the IPv4 packet, and then reassembles packet if it is necessary. - + @param[in] IpSb Pointer to IP4_SERVICE. @param[in, out] Packet Pointer to the Packet to be processed. @param[in] Head Pointer to the IP4_HEAD. @@ -696,7 +696,7 @@ ON_EXIT: as multicast. @retval EFI_SEUCCESS The recieved packet is in well form. - @retval EFI_INVAILD_PARAMETER The recieved packet is malformed. + @retval EFI_INVAILD_PARAMETER The recieved packet is malformed. **/ EFI_STATUS @@ -705,9 +705,9 @@ Ip4PreProcessPacket ( IN OUT NET_BUF **Packet, IN IP4_HEAD *Head, IN UINT8 *Option, - IN UINT32 OptionLen, + IN UINT32 OptionLen, IN UINT32 Flag - ) + ) { IP4_CLIP_INFO *Info; UINT32 HeadLen; @@ -720,7 +720,7 @@ Ip4PreProcessPacket ( if ((*Packet)->TotalSize < IP4_MIN_HEADLEN) { return EFI_INVALID_PARAMETER; } - + HeadLen = (Head->HeadLen << 2); TotalLen = NTOHS (Head->TotalLen); @@ -769,7 +769,7 @@ Ip4PreProcessPacket ( // Validate the options. Don't call the Ip4OptionIsValid if // there is no option to save some CPU process. // - + if ((OptionLen > 0) && !Ip4OptionIsValid (Option, OptionLen, TRUE)) { return EFI_INVALID_PARAMETER; } @@ -810,7 +810,7 @@ Ip4PreProcessPacket ( return EFI_INVALID_PARAMETER; } } - + return EFI_SUCCESS; } @@ -842,7 +842,7 @@ Ip4AccpetFrame ( IP4_HEAD ZeroHead; UINT8 *Option; UINT32 OptionLen; - + IpSb = (IP4_SERVICE *) Context; Option = NULL; @@ -861,11 +861,11 @@ Ip4AccpetFrame ( // Validate packet format and reassemble packet if it is necessary. // Status = Ip4PreProcessPacket ( - IpSb, - &Packet, - Head, + IpSb, + &Packet, + Head, Option, - OptionLen, + OptionLen, Flag ); @@ -890,7 +890,7 @@ Ip4AccpetFrame ( if (EFI_ERROR (Status)) { goto RESTART; } - + // // If the packet is protected by tunnel mode, parse the inner Ip Packet. // @@ -914,7 +914,7 @@ Ip4AccpetFrame ( goto RESTART; } } - + ASSERT (Packet != NULL); Head = Packet->Ip.Ip4; IP4_GET_CLIP_INFO (Packet)->Status = EFI_SUCCESS; @@ -1298,7 +1298,7 @@ Ip4InstanceDeliverPacket ( // Head = NetbufAllocSpace (Dup, IP4_MAX_HEADLEN, NET_BUF_HEAD); ASSERT (Head != NULL); - + Dup->Ip.Ip4 = (IP4_HEAD *) Head; CopyMem (Head, Packet->Ip.Ip4, Packet->Ip.Ip4->HeadLen << 2); @@ -1345,7 +1345,7 @@ Ip4InstanceDeliverPacket ( @param[in] Head The header of the received packet. @param[in] Packet The data of the received packet. @param[in] Option Point to the IP4 packet header options. - @param[in] OptionLen Length of the IP4 packet header options. + @param[in] OptionLen Length of the IP4 packet header options. @param[in] IpIf The interface to enqueue the packet to. @return The number of the IP4 children that accepts the packet diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.h b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.h index 1c8e8b2a15..b24ca5aaa3 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.h +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Input.h @@ -1,6 +1,6 @@ /** @file -Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.
+Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -17,7 +17,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. #define IP4_MIN_HEADLEN 20 #define IP4_MAX_HEADLEN 60 /// -/// 8(ESP header) + 16(max IV) + 16(max padding) + 2(ESP tail) + 12(max ICV) = 54 +/// 8(ESP header) + 16(max IV) + 16(max padding) + 2(ESP tail) + 12(max ICV) = 54 /// #define IP4_MAX_IPSEC_HEADLEN 54 @@ -169,7 +169,7 @@ Ip4Demultiplex ( @param[in] Head The header of the received packet. @param[in] Packet The data of the received packet. @param[in] Option Point to the IP4 packet header options. - @param[in] OptionLen Length of the IP4 packet header options. + @param[in] OptionLen Length of the IP4 packet header options. @param[in] IpIf The interface to enqueue the packet to. @return The number of the IP4 children that accepts the packet @@ -216,25 +216,25 @@ Ip4PacketTimerTicking ( ); /** - The work function to locate IPsec protocol to process the inbound or + The work function to locate IPsec protocol to process the inbound or outbound IP packets. The process routine handls the packet with following - actions: bypass the packet, discard the packet, or protect the packet. + actions: bypass the packet, discard the packet, or protect the packet. @param[in] IpSb The IP4 service instance. @param[in, out] Head The The caller supplied IP4 header. @param[in, out] Netbuf The IP4 packet to be processed by IPsec. @param[in, out] Options The caller supplied options. @param[in, out] OptionsLen The length of the option. - @param[in] Direction The directionality in an SPD entry, + @param[in] Direction The directionality in an SPD entry, EfiIPsecInBound or EfiIPsecOutBound. @param[in] Context The token's wrap. @retval EFI_SUCCESS The IPsec protocol is not available or disabled. @retval EFI_SUCCESS The packet was bypassed and all buffers remain the same. @retval EFI_SUCCESS The packet was protected. - @retval EFI_ACCESS_DENIED The packet was discarded. + @retval EFI_ACCESS_DENIED The packet was discarded. @retval EFI_OUT_OF_RESOURCES There is no suffcient resource to complete the operation. - @retval EFI_BUFFER_TOO_SMALL The number of non-empty block is bigger than the + @retval EFI_BUFFER_TOO_SMALL The number of non-empty block is bigger than the number of input data blocks when build a fragment table. **/ diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.c index 6a92573275..611887b71b 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.c @@ -1,7 +1,7 @@ /** @file IP4 option support functions. - -Copyright (c) 2005 - 2011, Intel Corporation. All rights reserved.
+ +Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -109,7 +109,7 @@ Ip4OptionIsValid ( @param[in] Option The original option to copy from @param[in] OptionLen The length of the original option @param[in] FirstFragment Whether it is the first fragment - @param[in, out] Buf The buffer to copy options to. NULL + @param[in, out] Buf The buffer to copy options to. NULL @param[in, out] BufLen The length of the buffer @retval EFI_SUCCESS The options are copied over diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.h b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.h index f9c65d026d..e1c2097388 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.h +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Option.h @@ -1,7 +1,7 @@ /** @file IP4 option support routines. - -Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.
+ +Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -54,7 +54,7 @@ Ip4OptionIsValid ( @param[in] Option The original option to copy from @param[in] OptionLen The length of the original option @param[in] FirstFragment Whether it is the first fragment - @param[in, out] Buf The buffer to copy options to. NULL + @param[in, out] Buf The buffer to copy options to. NULL @param[in, out] BufLen The length of the buffer @retval EFI_SUCCESS The options are copied over diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Output.c b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Output.c index 68d1f0943f..1716f43576 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Output.c +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Output.c @@ -1,7 +1,7 @@ /** @file Transmit the IP4 packet. - -Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.
+ +Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -269,16 +269,16 @@ Ip4Output ( Head->Ver = 4; RawData = FALSE; } - + // // Call IPsec process. // Status = Ip4IpSecProcessPacket ( - IpSb, - &Head, - &Packet, - &Option, - &OptLen, + IpSb, + &Head, + &Packet, + &Option, + &OptLen, EfiIPsecOutBound, Context ); @@ -286,7 +286,7 @@ Ip4Output ( if (EFI_ERROR(Status)) { return Status; } - + Dest = Head->Dst; if (IP4_IS_BROADCAST (Ip4GetNetCast (Dest, IpIf)) || (Dest == IP4_ALLONE_ADDRESS)) { // @@ -333,7 +333,7 @@ Ip4Output ( // OK, selected the source and route, fragment the packet then send // them. Tag each fragment other than the first one as spawn from it. // - Mtu = IpSb->MaxPacketSize + sizeof (IP4_HEAD); + Mtu = IpSb->MaxPacketSize + sizeof (IP4_HEAD); if (Packet->TotalSize + HeadLen > Mtu) { // @@ -342,7 +342,7 @@ Ip4Output ( if (RawData) { return EFI_BAD_BUFFER_SIZE; } - + // // Packet is fragmented from the tail to the head, that is, the // first frame sent is the last fragment of the packet. The first diff --git a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Route.h b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Route.h index 778c97dc8b..6269f4ceda 100644 --- a/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Route.h +++ b/MdeModulePkg/Universal/Network/Ip4Dxe/Ip4Route.h @@ -1,7 +1,7 @@ /** @file EFI IP4 route table and route cache table defintions. - -Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.
+ +Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/MdeModulePkg/Universal/Network/MnpDxe/ComponentName.c b/MdeModulePkg/Universal/Network/MnpDxe/ComponentName.c index b6f96087ed..e92be98d9b 100644 --- a/MdeModulePkg/Universal/Network/MnpDxe/ComponentName.c +++ b/MdeModulePkg/Universal/Network/MnpDxe/ComponentName.c @@ -1,7 +1,7 @@ /** @file UEFI Component Name(2) protocol implementation for MnpDxe driver. -Copyright (c) 2005 - 2014, Intel Corporation. All rights reserved.
+Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full @@ -107,10 +107,10 @@ MnpComponentNameGetDriverName ( @param Mnp[in] A pointer to the EFI_MANAGED_NETWORK_PROTOCOL. - + @retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully. @retval EFI_INVALID_PARAMETER The input parameter is invalid. - + **/ EFI_STATUS UpdateName ( @@ -157,7 +157,7 @@ UpdateName ( // // Remove the last '-' // - OffSet--; + OffSet--; // // Print the ProtocolType and VLAN ID for this instance. // @@ -177,12 +177,12 @@ UpdateName ( } else { return Status; } - + if (gMnpControllerNameTable != NULL) { FreeUnicodeStringTable (gMnpControllerNameTable); gMnpControllerNameTable = NULL; } - + Status = AddUnicodeString2 ( "eng", gMnpComponentName.SupportedLanguages, @@ -193,7 +193,7 @@ UpdateName ( if (EFI_ERROR (Status)) { return Status; } - + return AddUnicodeString2 ( "en", gMnpComponentName2.SupportedLanguages, @@ -290,22 +290,22 @@ MnpComponentNameGetControllerName ( if (ChildHandle == NULL) { return EFI_UNSUPPORTED; } - - // - // Make sure this driver is currently managing ControllerHandle - // + + // + // Make sure this driver is currently managing ControllerHandle + // Status = EfiTestManagedDevice ( ControllerHandle, gMnpDriverBinding.DriverBindingHandle, &gEfiSimpleNetworkProtocolGuid ); - if (EFI_ERROR (Status)) { + if (EFI_ERROR (Status)) { return Status; } - - // - // Make sure this driver produced ChildHandle - // + + // + // Make sure this driver produced ChildHandle + // Status = EfiTestChildHandle ( ControllerHandle, ChildHandle, @@ -315,9 +315,9 @@ MnpComponentNameGetControllerName ( return Status; } - // - // Retrieve an instance of a produced protocol from ChildHandle - // + // + // Retrieve an instance of a produced protocol from ChildHandle + // Status = gBS->OpenProtocol ( ChildHandle, &gEfiManagedNetworkProtocolGuid, diff --git a/MdeModulePkg/Universal/Network/MnpDxe/MnpConfig.c b/MdeModulePkg/Universal/Network/MnpDxe/MnpConfig.c index e24cb758cd..a801eed01f 100644 --- a/MdeModulePkg/Universal/Network/MnpDxe/MnpConfig.c +++ b/MdeModulePkg/Universal/Network/MnpDxe/MnpConfig.c @@ -1,7 +1,7 @@ /** @file Implementation of Managed Network Protocol private services. -Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full @@ -255,7 +255,7 @@ MnpAddFreeTxBuf ( /** Allocate a free TX buffer from MnpDeviceData->FreeTxBufList. If there is none - in the queue, first try to recycle some from SNP, then try to allocate some and add + in the queue, first try to recycle some from SNP, then try to allocate some and add them into the queue, then fetch the NET_BUF from the updated FreeTxBufList. @param[in, out] MnpDeviceData Pointer to the MNP_DEVICE_DATA. @@ -274,7 +274,7 @@ MnpAllocTxBuf ( EFI_STATUS Status; LIST_ENTRY *Entry; MNP_TX_BUF_WRAP *TxBufWrap; - + NET_CHECK_SIGNATURE (MnpDeviceData, MNP_DEVICE_DATA_SIGNATURE); OldTpl = gBS->RaiseTPL (TPL_CALLBACK); @@ -369,7 +369,7 @@ MnpFreeTxBuf ( ); return; } - + OldTpl = gBS->RaiseTPL (TPL_CALLBACK); InsertTailList (&MnpDeviceData->FreeTxBufList, &TxBufWrap->WrapEntry); TxBufWrap->InUse = FALSE; @@ -877,7 +877,7 @@ MnpDestroyServiceData ( /** Callback function which provided by user to remove one node in NetDestroyLinkList process. - + @param[in] Entry The entry to be removed. @param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList. @@ -917,9 +917,9 @@ MnpDestroyServiceChild ( LIST_ENTRY *List; EFI_STATUS Status; UINTN ListLength; - + List = &MnpServiceData->ChildrenList; - + Status = NetDestroyLinkList ( List, MnpDestoryChildEntry, @@ -1160,7 +1160,7 @@ MnpStopSnp ( { EFI_STATUS Status; EFI_SIMPLE_NETWORK_PROTOCOL *Snp; - + Snp = MnpDeviceData->Snp; ASSERT (Snp != NULL); diff --git a/MdeModulePkg/Universal/Network/MnpDxe/MnpDriver.c b/MdeModulePkg/Universal/Network/MnpDxe/MnpDriver.c index 5718e4df24..3b19ce8a6a 100644 --- a/MdeModulePkg/Universal/Network/MnpDxe/MnpDriver.c +++ b/MdeModulePkg/Universal/Network/MnpDxe/MnpDriver.c @@ -1,7 +1,7 @@ /** @file Implementation of driver entry point and driver binding protocol. -Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full @@ -28,7 +28,7 @@ EFI_DRIVER_BINDING_PROTOCOL gMnpDriverBinding = { /** Callback function which provided by user to remove one node in NetDestroyLinkList process. - + @param[in] Entry The entry to be removed. @param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList. @@ -44,14 +44,14 @@ MnpDestroyServiceDataEntry ( ) { MNP_SERVICE_DATA *MnpServiceData; - + MnpServiceData = MNP_SERVICE_DATA_FROM_LINK (Entry); return MnpDestroyServiceData (MnpServiceData); } /** Callback function which provided by user to remove one node in NetDestroyLinkList process. - + @param[in] Entry The entry to be removed. @param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList. diff --git a/MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf b/MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf index 07e62f5ba2..090ab732b9 100644 --- a/MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf +++ b/MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.inf @@ -3,9 +3,9 @@ # # This module produces EFI Managed Network Protocol upon EFI Simple Network Protocol, # to provide raw asynchronous network I/O services. It also produces EFI VLAN Protocol -# to provide manageability interface for VLAN configuration. +# to provide manageability interface for VLAN configuration. # -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at diff --git a/MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.uni b/MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.uni index 645cc1bf36..6ca8ac1fd6 100644 --- a/MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.uni +++ b/MdeModulePkg/Universal/Network/MnpDxe/MnpDxe.uni @@ -5,13 +5,13 @@ // to provide raw asynchronous network I/O services. It also produces EFI VLAN Protocol // to provide manageability interface for VLAN configuration. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/Network/MnpDxe/MnpDxeExtra.uni b/MdeModulePkg/Universal/Network/MnpDxe/MnpDxeExtra.uni index 4cecf1f868..3d6363b6b0 100644 --- a/MdeModulePkg/Universal/Network/MnpDxe/MnpDxeExtra.uni +++ b/MdeModulePkg/Universal/Network/MnpDxe/MnpDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // MnpDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -14,7 +14,7 @@ // **/ #string STR_PROPERTIES_MODULE_NAME -#language en-US +#language en-US "MNP DXE Driver" diff --git a/MdeModulePkg/Universal/Network/MnpDxe/MnpImpl.h b/MdeModulePkg/Universal/Network/MnpDxe/MnpImpl.h index 51391afe26..4ee54c18ce 100644 --- a/MdeModulePkg/Universal/Network/MnpDxe/MnpImpl.h +++ b/MdeModulePkg/Universal/Network/MnpDxe/MnpImpl.h @@ -1,7 +1,7 @@ /** @file Declaration of structures and functions of MnpDxe driver. -Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full @@ -366,7 +366,7 @@ MnpBuildTxPacket ( ); /** - Synchronously send out the packet. + Synchronously send out the packet. This functon places the packet buffer to SNP driver's tansmit queue. The packet can be considered successfully sent out once SNP acccetp the packet, while the @@ -468,7 +468,7 @@ MnpFreeNbuf ( /** Allocate a free TX buffer from MnpDeviceData->FreeTxBufList. If there is none - in the queue, first try to recycle some from SNP, then try to allocate some and add + in the queue, first try to recycle some from SNP, then try to allocate some and add them into the queue, then fetch the NET_BUF from the updated FreeTxBufList. @param[in, out] MnpDeviceData Pointer to the MNP_DEVICE_DATA. diff --git a/MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c b/MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c index ba0f36e710..5c9eaf1a08 100644 --- a/MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c +++ b/MdeModulePkg/Universal/Network/MnpDxe/MnpIo.c @@ -1,7 +1,7 @@ /** @file Implementation of Managed Network Protocol I/O functions. -Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full @@ -129,14 +129,14 @@ MnpBuildTxPacket ( UINT16 Index; MNP_DEVICE_DATA *MnpDeviceData; UINT8 *TxBuf; - + MnpDeviceData = MnpServiceData->MnpDeviceData; - + TxBuf = MnpAllocTxBuf (MnpDeviceData); if (TxBuf == NULL) { return EFI_OUT_OF_RESOURCES; } - + // // Reserve space for vlan tag if needed. // @@ -145,14 +145,14 @@ MnpBuildTxPacket ( } else { *PktBuf = TxBuf; } - + if ((TxData->DestinationAddress == NULL) && (TxData->FragmentCount == 1)) { CopyMem ( *PktBuf, TxData->FragmentTable[0].FragmentBuffer, TxData->FragmentTable[0].FragmentLength ); - + *PktLen = TxData->FragmentTable[0].FragmentLength; } else { // @@ -160,7 +160,7 @@ MnpBuildTxPacket ( // one fragment, copy the data into the packet buffer. Reserve the // media header space if necessary. // - SnpMode = MnpDeviceData->Snp->Mode; + SnpMode = MnpDeviceData->Snp->Mode; DstPos = *PktBuf; *PktLen = 0; if (TxData->DestinationAddress != NULL) { @@ -195,7 +195,7 @@ MnpBuildTxPacket ( /** - Synchronously send out the packet. + Synchronously send out the packet. This functon places the packet buffer to SNP driver's tansmit queue. The packet can be considered successfully sent out once SNP acccetp the packet, while the @@ -245,7 +245,7 @@ MnpSyncSendPacket ( goto SIGNAL_TOKEN; } - + if (MnpServiceData->VlanId != 0) { // // Insert VLAN tag @@ -282,9 +282,9 @@ MnpSyncSendPacket ( TxData->SourceAddress, TxData->DestinationAddress, &ProtocolType - ); + ); } - + if (EFI_ERROR (Status)) { Token->Status = EFI_DEVICE_ERROR; } diff --git a/MdeModulePkg/Universal/Network/MnpDxe/MnpVlan.c b/MdeModulePkg/Universal/Network/MnpDxe/MnpVlan.c index 98cbc2e35d..c81bd07c65 100644 --- a/MdeModulePkg/Universal/Network/MnpDxe/MnpVlan.c +++ b/MdeModulePkg/Universal/Network/MnpDxe/MnpVlan.c @@ -1,7 +1,7 @@ /** @file VLAN Config Protocol implementation and VLAN packet process routine. -Copyright (c) 2009 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full @@ -237,7 +237,7 @@ MnpInsertVlanTag ( @param[in] Buffer Pointer to the buffer contains the array of VLAN_TCI. @param[in] NumberOfVlan Pointer to number of VLAN. @param[out] NewNumberOfVlan Pointer to number of unique VLAN. - + @retval EFI_SUCCESS The VLAN variable is successfully checked. @retval EFI_OUT_OF_RESOURCES There is not enough resource to set the configuration. @@ -259,7 +259,7 @@ MnpCheckVlanVariable ( Count = 0; FoundDuplicateItem = FALSE; Status = EFI_SUCCESS; - + for (Index = 0; Index < NumberOfVlan; Index++) { for (Index2 = Index + 1; Index2 < NumberOfVlan; Index2++) { if (Buffer[Index].Bits.Vid == Buffer[Index2].Bits.Vid) { @@ -280,7 +280,7 @@ MnpCheckVlanVariable ( if (Count != 0) { Status = MnpSetVlanVariable (MnpDeviceData, *NewNumberOfVlan, Buffer); } - + return Status; } diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/ComponentName.c b/MdeModulePkg/Universal/Network/Mtftp4Dxe/ComponentName.c index 901c2df064..111c54e2ef 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/ComponentName.c +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/ComponentName.c @@ -1,7 +1,7 @@ /** @file UEFI Component Name(2) protocol implementation for Mtftp4Dxe driver. - -Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
+ +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -237,10 +237,10 @@ Mtftp4ComponentNameGetDriverName ( @param Mtftp4[in] A pointer to the EFI_MTFTP4_PROTOCOL. - + @retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully. @retval EFI_INVALID_PARAMETER The input parameter is invalid. - + **/ EFI_STATUS UpdateName ( @@ -277,7 +277,7 @@ UpdateName ( FreeUnicodeStringTable (gMtftp4ControllerNameTable); gMtftp4ControllerNameTable = NULL; } - + Status = AddUnicodeString2 ( "eng", gMtftp4ComponentName.SupportedLanguages, @@ -288,7 +288,7 @@ UpdateName ( if (EFI_ERROR (Status)) { return Status; } - + return AddUnicodeString2 ( "en", gMtftp4ComponentName2.SupportedLanguages, @@ -385,10 +385,10 @@ Mtftp4ComponentNameGetControllerName ( if (ChildHandle == NULL) { return EFI_UNSUPPORTED; } - - // - // Make sure this driver produced ChildHandle - // + + // + // Make sure this driver produced ChildHandle + // Status = EfiTestChildHandle ( ControllerHandle, ChildHandle, @@ -398,9 +398,9 @@ Mtftp4ComponentNameGetControllerName ( return Status; } - // + // // Retrieve an instance of a produced protocol from ChildHandle - // + // Status = gBS->OpenProtocol ( ChildHandle, &gEfiMtftp4ProtocolGuid, diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Driver.c b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Driver.c index 713cc66dd1..e6f101d5e9 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Driver.c +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Driver.c @@ -315,7 +315,7 @@ Mtftp4DriverBindingStart ( if (EFI_ERROR (Status)) { goto ON_ERROR; } - + // // Install the Mtftp4ServiceBinding Protocol onto Controller // @@ -341,7 +341,7 @@ ON_ERROR: /** Callback function which provided by user to remove one node in NetDestroyLinkList process. - + @param[in] Entry The entry to be removed. @param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList. @@ -713,7 +713,7 @@ Mtftp4ServiceBindingDestroyChild ( &gEfiUdp4ProtocolGuid, gMtftp4DriverBinding.DriverBindingHandle, ChildHandle - ); + ); } // diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Driver.h b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Driver.h index 936eab1ba1..cd7675ec81 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Driver.h +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Driver.h @@ -1,7 +1,7 @@ /** @file Mtftp drivers function header. - -Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
+ +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -49,8 +49,8 @@ Mtftp4DriverBindingSupported ( ); /** - Start the MTFTP driver on this controller. - + Start the MTFTP driver on this controller. + MTFTP driver will install a MTFTP SERVICE BINDING protocol on the supported controller, which can be used to create/destroy MTFTP children. diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf index 3d7c8c00e0..ad9e7abce6 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.inf @@ -4,7 +4,7 @@ # This module produces EFI MTFTPv4 Protocol upon EFI UDPv4 Protocol, to provide # basic services for client-side unicast and/or multicase TFTP operations. # -# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at @@ -30,7 +30,7 @@ # # VALID_ARCHITECTURES = IA32 X64 IPF EBC # -# DRIVER_BINDING = gMtftp4DriverBinding +# DRIVER_BINDING = gMtftp4DriverBinding # COMPONENT_NAME = gMtftp4ComponentName # COMPONENT_NAME2 = gMtftp4ComponentName2 # diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.uni b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.uni index 74f7ff7fed..5d67d224e0 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.uni +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Dxe.uni @@ -4,13 +4,13 @@ // This module produces EFI MTFTPv4 Protocol upon EFI UDPv4 Protocol, to provide // basic services for client-side unicast and/or multicase TFTP operations. // -// Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4DxeExtra.uni b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4DxeExtra.uni index 6d69022e70..fe83f15de6 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4DxeExtra.uni +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4DxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // Mtftp4Dxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "MTFTP v4 DXE Driver" diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c index 065528c937..d5a1a8c303 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.c @@ -1,6 +1,6 @@ /** @file Interface routine for Mtftp4. - + (C) Copyright 2014 Hewlett-Packard Development Company, L.P.
Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials @@ -96,9 +96,9 @@ Mtftp4CleanOperation ( /** - Check packet for GetInfo. - - GetInfo is implemented with EfiMtftp4ReadFile. It use Mtftp4GetInfoCheckPacket + Check packet for GetInfo. + + GetInfo is implemented with EfiMtftp4ReadFile. It use Mtftp4GetInfoCheckPacket to inspect the first packet from server, then abort the session. @param This The MTFTP4 protocol instance @@ -167,10 +167,10 @@ Mtftp4GetInfoCheckPacket ( /** - Check whether the override data is valid. - + Check whether the override data is valid. + It will first validate whether the server is a valid unicast. If a gateway - is provided in the Override, it also check that it is a unicast on the + is provided in the Override, it also check that it is a unicast on the connected network. @param Instance The MTFTP instance @@ -178,7 +178,7 @@ Mtftp4GetInfoCheckPacket ( @retval TRUE The override data is valid @retval FALSE The override data is invalid - + **/ BOOLEAN Mtftp4OverrideValid ( @@ -219,9 +219,9 @@ Mtftp4OverrideValid ( /** Poll the UDP to get the IP4 default address, which may be retrieved - by DHCP. - - The default time out value is 5 seconds. If IP has retrieved the default address, + by DHCP. + + The default time out value is 5 seconds. If IP has retrieved the default address, the UDP is reconfigured. @param Instance The Mtftp instance @@ -396,7 +396,7 @@ Mtftp4Start ( Status = EFI_SUCCESS; TokenStatus = EFI_SUCCESS; - + OldTpl = gBS->RaiseTPL (TPL_CALLBACK); if (Instance->State != MTFTP4_STATE_CONFIGED) { @@ -536,17 +536,17 @@ ON_ERROR: /** Reads the current operational settings. - The GetModeData()function reads the current operational settings of this + The GetModeData()function reads the current operational settings of this EFI MTFTPv4 Protocol driver instance. @param This Pointer to the EFI_MTFTP4_PROTOCOL instance. @param ModeData Pointer to storage for the EFI MTFTPv4 Protocol - driver mode data. + driver mode data. @retval EFI_SUCCESS The configuration data was successfully returned. @retval EFI_OUT_OF_RESOURCES The required mode data could not be allocated. @retval EFI_INVALID_PARAMETER This is NULL or ModeData is NULL. - + **/ EFI_STATUS EFIAPI @@ -579,49 +579,49 @@ EfiMtftp4GetModeData ( /** - Initializes, changes, or resets the default operational setting for this + Initializes, changes, or resets the default operational setting for this EFI MTFTPv4 Protocol driver instance. - - The Configure() function is used to set and change the configuration data for - this EFI MTFTPv4 Protocol driver instance. The configuration data can be reset - to startup defaults by calling Configure() with MtftpConfigData set to NULL. - Whenever the instance is reset, any pending operation is aborted. By changing - the EFI MTFTPv4 Protocol driver instance configuration data, the client can - connect to different MTFTPv4 servers. The configuration parameters in - MtftpConfigData are used as the default parameters in later MTFTPv4 operations + + The Configure() function is used to set and change the configuration data for + this EFI MTFTPv4 Protocol driver instance. The configuration data can be reset + to startup defaults by calling Configure() with MtftpConfigData set to NULL. + Whenever the instance is reset, any pending operation is aborted. By changing + the EFI MTFTPv4 Protocol driver instance configuration data, the client can + connect to different MTFTPv4 servers. The configuration parameters in + MtftpConfigData are used as the default parameters in later MTFTPv4 operations and can be overridden in later operations. - + @param This Pointer to the EFI_MTFTP4_PROTOCOL instance - @param ConfigData MtftpConfigDataPointer to the configuration data + @param ConfigData MtftpConfigDataPointer to the configuration data structure - @retval EFI_SUCCESS The EFI MTFTPv4 Protocol driver was configured + @retval EFI_SUCCESS The EFI MTFTPv4 Protocol driver was configured successfully. @retval EFI_INVALID_PARAMETER One or more following conditions are TRUE: 1.This is NULL. - 2.MtftpConfigData.UseDefaultSetting is FALSE and - MtftpConfigData.StationIp is not a valid IPv4 + 2.MtftpConfigData.UseDefaultSetting is FALSE and + MtftpConfigData.StationIp is not a valid IPv4 unicast address. - 3.MtftpCofigData.UseDefaultSetting is FALSE and + 3.MtftpCofigData.UseDefaultSetting is FALSE and MtftpConfigData.SubnetMask is invalid. - 4.MtftpCofigData.ServerIp is not a valid IPv4 + 4.MtftpCofigData.ServerIp is not a valid IPv4 unicast address. - 5.MtftpConfigData.UseDefaultSetting is FALSE and - MtftpConfigData.GatewayIp is not a valid IPv4 - unicast address or is not in the same subnet + 5.MtftpConfigData.UseDefaultSetting is FALSE and + MtftpConfigData.GatewayIp is not a valid IPv4 + unicast address or is not in the same subnet with station address. - @retval EFI_ACCESS_DENIED The EFI configuration could not be changed at this - time because there is one MTFTP background operation + @retval EFI_ACCESS_DENIED The EFI configuration could not be changed at this + time because there is one MTFTP background operation in progress. - @retval EFI_NO_MAPPING When using a default address, configuration + @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP, RARP, etc.) has not finished yet. - @retval EFI_UNSUPPORTED A configuration protocol (DHCP, BOOTP, RARP, etc.) - could not be located when clients choose to use + @retval EFI_UNSUPPORTED A configuration protocol (DHCP, BOOTP, RARP, etc.) + could not be located when clients choose to use the default address settings. - @retval EFI_OUT_OF_RESOURCES The EFI MTFTPv4 Protocol driver instance data could + @retval EFI_OUT_OF_RESOURCES The EFI MTFTPv4 Protocol driver instance data could not be allocated. - @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. - The EFI MTFTPv4 Protocol driver instance is not + @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. + The EFI MTFTPv4 Protocol driver instance is not configured. **/ @@ -681,7 +681,7 @@ EfiMtftp4Configure ( return EFI_INVALID_PARAMETER; } - if ((Gateway != 0) && + if ((Gateway != 0) && (!IP4_NET_EQUAL (Gateway, Ip, Netmask) || (Netmask != 0 && !NetIp4IsUnicast (Gateway, Netmask)))) { return EFI_INVALID_PARAMETER; @@ -707,21 +707,21 @@ EfiMtftp4Configure ( /** Parses the options in an MTFTPv4 OACK packet. - - The ParseOptions() function parses the option fields in an MTFTPv4 OACK packet - and returns the number of options that were found and optionally a list of + + The ParseOptions() function parses the option fields in an MTFTPv4 OACK packet + and returns the number of options that were found and optionally a list of pointers to the options in the packet. - If one or more of the option fields are not valid, then EFI_PROTOCOL_ERROR is + If one or more of the option fields are not valid, then EFI_PROTOCOL_ERROR is returned and *OptionCount and *OptionList stop at the last valid option. The OptionList is allocated by this function, and caller should free it when used. @param This Pointer to the EFI_MTFTP4_PROTOCOL instance. @param PacketLen Length of the OACK packet to be parsed. - @param Packet Pointer to the OACK packet to be parsed. + @param Packet Pointer to the OACK packet to be parsed. @param OptionCount Pointer to the number of options in following OptionList. - @param OptionList Pointer to EFI_MTFTP4_OPTION storage. Call the + @param OptionList Pointer to EFI_MTFTP4_OPTION storage. Call the EFI Boot Service FreePool() to release theOptionList - if the options in this OptionList are not needed + if the options in this OptionList are not needed any more @retval EFI_SUCCESS The OACK packet was valid and the OptionCount and @@ -769,25 +769,25 @@ EfiMtftp4ParseOptions ( /** Downloads a file from an MTFTPv4 server. - - The ReadFile() function is used to initialize and start an MTFTPv4 download - process and optionally wait for completion. When the download operation completes, - whether successfully or not, the Token.Status field is updated by the EFI MTFTPv4 + + The ReadFile() function is used to initialize and start an MTFTPv4 download + process and optionally wait for completion. When the download operation completes, + whether successfully or not, the Token.Status field is updated by the EFI MTFTPv4 Protocol driver and then Token.Event is signaled (if it is not NULL). Data can be downloaded from the MTFTPv4 server into either of the following locations: 1.A fixed buffer that is pointed to by Token.Buffer 2.A download service function that is pointed to by Token.CheckPacket - If both Token.Buffer and Token.CheckPacket are used, then Token.CheckPacket - will be called first. If the call is successful, the packet will be stored in + If both Token.Buffer and Token.CheckPacket are used, then Token.CheckPacket + will be called first. If the call is successful, the packet will be stored in Token.Buffer. @param This Pointer to the EFI_MTFTP4_PROTOCOL instance - @param Token Pointer to the token structure to provide the + @param Token Pointer to the token structure to provide the parameters that are used in this operation. @retval EFI_SUCCESS The data file has been transferred successfully. @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated. - @retval EFI_BUFFER_TOO_SMALL BufferSize is not large enough to hold the downloaded + @retval EFI_BUFFER_TOO_SMALL BufferSize is not large enough to hold the downloaded data in downloading process. @retval EFI_ABORTED Current operation is aborted by user. @retval EFI_ICMP_ERROR An ICMP ERROR packet was received. @@ -811,24 +811,24 @@ EfiMtftp4ReadFile ( /** Sends a data file to an MTFTPv4 server. May be unsupported in some EFI implementations - The WriteFile() function is used to initialize an uploading operation with the - given option list and optionally wait for completion. If one or more of the - options is not supported by the server, the unsupported options are ignored and - a standard TFTP process starts instead. When the upload process completes, - whether successfully or not, Token.Event is signaled, and the EFI MTFTPv4 Protocol + The WriteFile() function is used to initialize an uploading operation with the + given option list and optionally wait for completion. If one or more of the + options is not supported by the server, the unsupported options are ignored and + a standard TFTP process starts instead. When the upload process completes, + whether successfully or not, Token.Event is signaled, and the EFI MTFTPv4 Protocol driver updates Token.Status. The caller can supply the data to be uploaded in the following two modes: 1.Through the user-provided buffer 2.Through a callback function With the user-provided buffer, the Token.BufferSize field indicates the length - of the buffer, and the driver will upload the data in the buffer. With an - EFI_MTFTP4_PACKET_NEEDED callback function, the driver will call this callback - function to get more data from the user to upload. See the definition of - EFI_MTFTP4_PACKET_NEEDED for more information. These two modes cannot be used at + of the buffer, and the driver will upload the data in the buffer. With an + EFI_MTFTP4_PACKET_NEEDED callback function, the driver will call this callback + function to get more data from the user to upload. See the definition of + EFI_MTFTP4_PACKET_NEEDED for more information. These two modes cannot be used at the same time. The callback function will be ignored if the user provides the buffer. @param This Pointer to the EFI_MTFTP4_PROTOCOL instance. - @param Token Pointer to the token structure to provide the + @param Token Pointer to the token structure to provide the parameters that are used in this function @retval EFI_SUCCESS The upload session has started. @@ -843,15 +843,15 @@ EfiMtftp4ReadFile ( format. 6. Token.Buffer and Token.PacketNeeded are both NULL. - 7. One or more IPv4 addresses in Token.OverrideData - are not valid unicast IPv4 addresses if + 7. One or more IPv4 addresses in Token.OverrideData + are not valid unicast IPv4 addresses if Token.OverrideData is not NULL. @retval EFI_UNSUPPORTED One or more options in the Token.OptionList are in the unsupported list of structure EFI_MTFTP4_MODE_DATA. @retval EFI_NOT_STARTED The EFI MTFTPv4 Protocol driver has not been started. - @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, + @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP, RARP, etc.) is not finished yet. - @retval EFI_ALREADY_STARTED This Token is already being used in another MTFTPv4 + @retval EFI_ALREADY_STARTED This Token is already being used in another MTFTPv4 session. @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated. @retval EFI_ACCESS_DENIED The previous operation has not completed yet. @@ -870,35 +870,35 @@ EfiMtftp4WriteFile ( /** - Downloads a data file "directory" from an MTFTPv4 server. + Downloads a data file "directory" from an MTFTPv4 server. May be unsupported in some EFI implementations - - The ReadDirectory() function is used to return a list of files on the MTFTPv4 - server that are logically (or operationally) related to Token.Filename. The - directory request packet that is sent to the server is built with the option + + The ReadDirectory() function is used to return a list of files on the MTFTPv4 + server that are logically (or operationally) related to Token.Filename. The + directory request packet that is sent to the server is built with the option list that was provided by caller, if present. - The file information that the server returns is put into either of the following + The file information that the server returns is put into either of the following locations: 1.A fixed buffer that is pointed to by Token.Buffer 2.A download service function that is pointed to by Token.CheckPacket - If both Token.Buffer and Token.CheckPacket are used, then Token.CheckPacket will + If both Token.Buffer and Token.CheckPacket are used, then Token.CheckPacket will be called first. If the call is successful, the packet will be stored in Token.Buffer. - The returned directory listing in the Token.Buffer or EFI_MTFTP4_PACKET consists - of a list of two or three variable-length ASCII strings, each terminated by a - null character, for each file in the directory. If the multicast option is involved, - the first field of each directory entry is the static multicast IP address and - UDP port number that is associated with the file name. The format of the field - is ip:ip:ip:ip:port. If the multicast option is not involved, this field and its + The returned directory listing in the Token.Buffer or EFI_MTFTP4_PACKET consists + of a list of two or three variable-length ASCII strings, each terminated by a + null character, for each file in the directory. If the multicast option is involved, + the first field of each directory entry is the static multicast IP address and + UDP port number that is associated with the file name. The format of the field + is ip:ip:ip:ip:port. If the multicast option is not involved, this field and its terminating null character are not present. - The next field of each directory entry is the file name and the last field is - the file information string. The information string contains the file size and - the create/modify timestamp. The format of the information string is filesize - yyyy-mm-dd hh:mm:ss:ffff. The timestamp is Coordinated Universal Time + The next field of each directory entry is the file name and the last field is + the file information string. The information string contains the file size and + the create/modify timestamp. The format of the information string is filesize + yyyy-mm-dd hh:mm:ss:ffff. The timestamp is Coordinated Universal Time (UTC; also known as Greenwich Mean Time [GMT]). The only difference between ReadFile and ReadDirectory is the opcode used. @param This Pointer to the EFI_MTFTP4_PROTOCOL instance - @param Token Pointer to the token structure to provide the + @param Token Pointer to the token structure to provide the parameters that are used in this function @retval EFI_SUCCESS The MTFTPv4 related file "directory" has been downloaded. @@ -913,15 +913,15 @@ EfiMtftp4WriteFile ( format. 6. Token.Buffer and Token.PacketNeeded are both NULL. - 7. One or more IPv4 addresses in Token.OverrideData - are not valid unicast IPv4 addresses if + 7. One or more IPv4 addresses in Token.OverrideData + are not valid unicast IPv4 addresses if Token.OverrideData is not NULL. @retval EFI_UNSUPPORTED One or more options in the Token.OptionList are in the unsupported list of structure EFI_MTFTP4_MODE_DATA. @retval EFI_NOT_STARTED The EFI MTFTPv4 Protocol driver has not been started. - @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, + @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP, RARP, etc.) is not finished yet. - @retval EFI_ALREADY_STARTED This Token is already being used in another MTFTPv4 + @retval EFI_ALREADY_STARTED This Token is already being used in another MTFTPv4 session. @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated. @retval EFI_ACCESS_DENIED The previous operation has not completed yet. @@ -940,31 +940,31 @@ EfiMtftp4ReadDirectory ( /** - Gets information about a file from an MTFTPv4 server. - - The GetInfo() function assembles an MTFTPv4 request packet with options; - sends it to the MTFTPv4 server; and may return an MTFTPv4 OACK, MTFTPv4 ERROR, - or ICMP ERROR packet. Retries occur only if no response packets are received + Gets information about a file from an MTFTPv4 server. + + The GetInfo() function assembles an MTFTPv4 request packet with options; + sends it to the MTFTPv4 server; and may return an MTFTPv4 OACK, MTFTPv4 ERROR, + or ICMP ERROR packet. Retries occur only if no response packets are received from the MTFTPv4 server before the timeout expires. - It is implemented with EfiMtftp4ReadFile: build a token, then pass it to + It is implemented with EfiMtftp4ReadFile: build a token, then pass it to EfiMtftp4ReadFile. In its check packet callback abort the opertions. @param This Pointer to the EFI_MTFTP4_PROTOCOL instance - @param OverrideData Data that is used to override the existing - parameters. If NULL, the default parameters that - were set in the EFI_MTFTP4_PROTOCOL.Configure() + @param OverrideData Data that is used to override the existing + parameters. If NULL, the default parameters that + were set in the EFI_MTFTP4_PROTOCOL.Configure() function are used @param Filename Pointer to null-terminated ASCII file name string - @param ModeStr Pointer to null-terminated ASCII mode string. If NULL, "octet" + @param ModeStr Pointer to null-terminated ASCII mode string. If NULL, "octet" will be used @param OptionCount Number of option/value string pairs in OptionList - @param OptionList Pointer to array of option/value string pairs. + @param OptionList Pointer to array of option/value string pairs. Ignored if OptionCount is zero @param PacketLength The number of bytes in the returned packet - @param Packet PacketThe pointer to the received packet. This + @param Packet PacketThe pointer to the received packet. This buffer must be freed by the caller. - @retval EFI_SUCCESS An MTFTPv4 OACK packet was received and is in + @retval EFI_SUCCESS An MTFTPv4 OACK packet was received and is in the Buffer. @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE: 1.This is NULL. @@ -972,21 +972,21 @@ EfiMtftp4ReadDirectory ( 3.OptionCount is not zero and OptionList is NULL. 4.One or more options in OptionList have wrong format. 5.PacketLength is NULL. - 6.One or more IPv4 addresses in OverrideData are - not valid unicast IPv4 addresses if OverrideData + 6.One or more IPv4 addresses in OverrideData are + not valid unicast IPv4 addresses if OverrideData is not NULL. @retval EFI_UNSUPPORTED One or more options in the OptionList are in the unsupported list of structure EFI_MTFTP4_MODE_DATA @retval EFI_NOT_STARTED The EFI MTFTPv4 Protocol driver has not been started. - @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, + @retval EFI_NO_MAPPING When using a default address, configuration (DHCP, BOOTP, RARP, etc.) has not finished yet. @retval EFI_ACCESS_DENIED The previous operation has not completed yet. @retval EFI_OUT_OF_RESOURCES Required system resources could not be allocated. - @retval EFI_TFTP_ERROR An MTFTPv4 ERROR packet was received and is in + @retval EFI_TFTP_ERROR An MTFTPv4 ERROR packet was received and is in the Buffer. - @retval EFI_ICMP_ERROR An ICMP ERROR packet was received and the Packet + @retval EFI_ICMP_ERROR An ICMP ERROR packet was received and the Packet is set to NULL. - @retval EFI_PROTOCOL_ERROR An unexpected MTFTPv4 packet was received and is + @retval EFI_PROTOCOL_ERROR An unexpected MTFTPv4 packet was received and is in the Buffer. @retval EFI_TIMEOUT No responses were received from the MTFTPv4 server. @retval EFI_DEVICE_ERROR An unexpected network error or system error occurred. @@ -1053,15 +1053,15 @@ EfiMtftp4GetInfo ( /** Polls for incoming data packets and processes outgoing data packets. - The Poll() function can be used by network drivers and applications to increase - the rate that data packets are moved between the communications device and the + The Poll() function can be used by network drivers and applications to increase + the rate that data packets are moved between the communications device and the transmit and receive queues. - In some systems, the periodic timer event in the managed network driver may not - poll the underlying communications device fast enough to transmit and/or receive - all data packets without missing incoming packets or dropping outgoing packets. - Drivers and applications that are experiencing packet loss should try calling + In some systems, the periodic timer event in the managed network driver may not + poll the underlying communications device fast enough to transmit and/or receive + all data packets without missing incoming packets or dropping outgoing packets. + Drivers and applications that are experiencing packet loss should try calling the Poll() function more often. - + @param This Pointer to the EFI_MTFTP4_PROTOCOL instance @retval EFI_SUCCESS Incoming or outgoing data was processed. @@ -1070,7 +1070,7 @@ EfiMtftp4GetInfo ( BOOTP, RARP, etc.) is not finished yet. @retval EFI_INVALID_PARAMETER This is NULL. @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. - @retval EFI_TIMEOUT Data was dropped out of the transmit and/or receive + @retval EFI_TIMEOUT Data was dropped out of the transmit and/or receive queue. Consider increasing the polling rate. **/ diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.h b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.h index 851b595eee..e24890cce8 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.h +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Impl.h @@ -1,14 +1,14 @@ /** @file - + Mtftp4 Implementation. - + Mtftp4 Implementation, it supports the following RFCs: RFC1350 - THE TFTP PROTOCOL (REVISION 2) RFC2090 - TFTP Multicast Option RFC2347 - TFTP Option Extension RFC2348 - TFTP Blocksize Option RFC2349 - TFTP Timeout Interval and Transfer Size Options - + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -171,8 +171,8 @@ Mtftp4CleanOperation ( /** Start the MTFTP session for upload. - - It will first init some states, then send the WRQ request packet, + + It will first init some states, then send the WRQ request packet, and start receiving the packet. @param Instance The MTFTP session @@ -190,9 +190,9 @@ Mtftp4WrqStart ( ); /** - Start the MTFTP session to download. - - It will first initialize some of the internal states then build and send a RRQ + Start the MTFTP session to download. + + It will first initialize some of the internal states then build and send a RRQ reqeuest packet, at last, it will start receive for the downloading. @param Instance The Mtftp session diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Option.h b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Option.h index b7fdbf23e1..a3fdc4dca2 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Option.h +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Option.h @@ -1,7 +1,7 @@ /** @file Routines to process MTFTP4 options. - -Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.
+ +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -38,8 +38,8 @@ typedef struct { } MTFTP4_OPTION; /** - Allocate and fill in a array of Mtftp options from the Packet. - + Allocate and fill in a array of Mtftp options from the Packet. + It first calls Mtftp4FillOption to get the option number, then allocate the array, at last, call Mtftp4FillOption again to save the options. diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Rrq.c b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Rrq.c index e983d79791..63115ba519 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Rrq.c +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Rrq.c @@ -1,8 +1,8 @@ /** @file Routines to process Rrq (download). - + (C) Copyright 2014 Hewlett-Packard Development Company, L.P.
-Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -37,9 +37,9 @@ Mtftp4RrqInput ( /** - Start the MTFTP session to download. - - It will first initialize some of the internal states then build and send a RRQ + Start the MTFTP session to download. + + It will first initialize some of the internal states then build and send a RRQ reqeuest packet, at last, it will start receive for the downloading. @param Instance The Mtftp session @@ -158,7 +158,7 @@ Mtftp4RrqSaveBlock ( // This is the last block, save the block no // if (DataLen < Instance->BlkSize) { - Completed = TRUE; + Completed = TRUE; Instance->LastBlock = Block; Mtftp4SetLastBlockNum (&Instance->Blocks, Block); } @@ -167,7 +167,7 @@ Mtftp4RrqSaveBlock ( // Remove this block number from the file hole. If Mtftp4RemoveBlockNum // returns EFI_NOT_FOUND, the block has been saved, don't save it again. // Note that : For bigger files, allowing the block counter to roll over - // to accept transfers of unlimited size. So TotalBlock is memorised as + // to accept transfers of unlimited size. So TotalBlock is memorised as // continuous block counter. // Status = Mtftp4RemoveBlockNum (&Instance->Blocks, Block, Completed, &TotalBlock); @@ -228,8 +228,8 @@ Mtftp4RrqSaveBlock ( /** - Function to process the received data packets. - + Function to process the received data packets. + It will save the block then send back an ACK if it is active. @param Instance The downloading MTFTP session @@ -318,7 +318,7 @@ Mtftp4RrqHandleData ( /** Validate whether the options received in the server's OACK packet is valid. - + The options are valid only if: 1. The server doesn't include options not requested by us 2. The server can only use smaller blksize than that is requested @@ -428,20 +428,20 @@ Mtftp4RrqConfigMcastPort ( return Status; } - if (!Config->UseDefaultSetting && + if (!Config->UseDefaultSetting && !EFI_IP4_EQUAL (&mZeroIp4Addr, &Config->GatewayIp)) { // // The station IP address is manually configured and the Gateway IP is not 0. // Add the default route for this UDP instance. // Status = McastIo->Protocol.Udp4->Routes ( - McastIo->Protocol.Udp4, + McastIo->Protocol.Udp4, FALSE, &mZeroIp4Addr, &mZeroIp4Addr, &Config->GatewayIp ); - + if (EFI_ERROR (Status)) { McastIo->Protocol.Udp4->Configure (McastIo->Protocol.Udp4, NULL); return Status; @@ -459,8 +459,8 @@ Mtftp4RrqConfigMcastPort ( /** - Function to process the OACK. - + Function to process the OACK. + It will first validate the OACK packet, then update the various negotiated parameters. @param Instance The download MTFTP session @@ -591,22 +591,22 @@ Mtftp4RrqHandleOack ( return Status; } - + // // Update the parameters used. // if (Reply.BlkSize != 0) { Instance->BlkSize = Reply.BlkSize; } - + if (Reply.Timeout != 0) { Instance->Timeout = Reply.Timeout; - } - } - + } + } + } else { Instance->Master = TRUE; - + if (Reply.BlkSize != 0) { Instance->BlkSize = Reply.BlkSize; } @@ -615,7 +615,7 @@ Mtftp4RrqHandleOack ( Instance->Timeout = Reply.Timeout; } } - + // // Send an ACK to (Expected - 1) which is 0 for unicast download, // or tell the server we want to receive the Expected block. @@ -762,7 +762,7 @@ Mtftp4RrqInput ( case EFI_MTFTP4_OPCODE_ERROR: Status = EFI_TFTP_ERROR; break; - + default: break; } diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.c b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.c index e4366b6ddb..71c679ed13 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.c +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.c @@ -1,6 +1,6 @@ /** @file Support routines for Mtftp. - + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -48,16 +48,16 @@ Mtftp4AllocateRange ( /** - Initialize the block range for either RRQ or WRQ. - - RRQ and WRQ have different requirements for Start and End. - For example, during start up, WRQ initializes its whole valid block range - to [0, 0xffff]. This is bacause the server will send us a ACK0 to inform us - to start the upload. When the client received ACK0, it will remove 0 from the + Initialize the block range for either RRQ or WRQ. + + RRQ and WRQ have different requirements for Start and End. + For example, during start up, WRQ initializes its whole valid block range + to [0, 0xffff]. This is bacause the server will send us a ACK0 to inform us + to start the upload. When the client received ACK0, it will remove 0 from the range, get the next block number, which is 1, then upload the BLOCK1. For RRQ - without option negotiation, the server will directly send us the BLOCK1 in - response to the client's RRQ. When received BLOCK1, the client will remove - it from the block range and send an ACK. It also works if there is option + without option negotiation, the server will directly send us the BLOCK1 in + response to the client's RRQ. When received BLOCK1, the client will remove + it from the block range and send an ACK. It also works if there is option negotiation. @param Head The block range head to initialize @@ -93,7 +93,7 @@ Mtftp4InitBlockRange ( @param Head The block range head - @return The first valid block number, -1 if the block range is empty. + @return The first valid block number, -1 if the block range is empty. **/ INTN @@ -113,10 +113,10 @@ Mtftp4GetNextBlockNum ( /** - Set the last block number of the block range list. - + Set the last block number of the block range list. + It will remove all the blocks after the Last. MTFTP initialize the block range - to the maximum possible range, such as [0, 0xffff] for WRQ. When it gets the + to the maximum possible range, such as [0, 0xffff] for WRQ. When it gets the last block number, it will call this function to set the last block number. @param Head The block range list @@ -159,7 +159,7 @@ Mtftp4SetLastBlockNum ( @param Head The block range list to remove from @param Num The block number to remove @param Completed Whether Num is the last block number - @param TotalBlock The continuous block number in all + @param TotalBlock The continuous block number in all @retval EFI_NOT_FOUND The block number isn't in the block range list @retval EFI_SUCCESS The block number has been removed from the list @@ -213,22 +213,22 @@ Mtftp4RemoveBlockNum ( Range->Start++; // - // Note that: RFC 1350 does not mention block counter roll-over, - // but several TFTP hosts implement the roll-over be able to accept - // transfers of unlimited size. There is no consensus, however, whether - // the counter should wrap around to zero or to one. Many implementations - // wrap to zero, because this is the simplest to implement. Here we choose + // Note that: RFC 1350 does not mention block counter roll-over, + // but several TFTP hosts implement the roll-over be able to accept + // transfers of unlimited size. There is no consensus, however, whether + // the counter should wrap around to zero or to one. Many implementations + // wrap to zero, because this is the simplest to implement. Here we choose // this solution. // - *TotalBlock = Num; - + *TotalBlock = Num; + if (Range->Round > 0) { - *TotalBlock += Range->Bound + MultU64x32 ((UINTN) (Range->Round -1), (UINT32) (Range->Bound + 1)) + 1; - } + *TotalBlock += Range->Bound + MultU64x32 ((UINTN) (Range->Round -1), (UINT32) (Range->Bound + 1)) + 1; + } if (Range->Start > Range->Bound) { - Range->Start = 0; - Range->Round ++; + Range->Start = 0; + Range->Round ++; } if ((Range->Start > Range->End) || Completed) { @@ -321,7 +321,7 @@ Mtftp4SendRequest ( Packet->OpCode = HTONS (Instance->Operation); BufferLength -= sizeof (Packet->OpCode); - + Cur = Packet->Rrq.Filename; Status = AsciiStrCpyS ((CHAR8 *) Cur, BufferLength, (CHAR8 *) Token->Filename); ASSERT_EFI_ERROR (Status); @@ -335,17 +335,17 @@ Mtftp4SendRequest ( for (Index = 0; Index < Token->OptionCount; ++Index) { OptionStrLength = AsciiStrLen ((CHAR8 *) Options[Index].OptionStr); ValueStrLength = AsciiStrLen ((CHAR8 *) Options[Index].ValueStr); - + Status = AsciiStrCpyS ((CHAR8 *) Cur, BufferLength, (CHAR8 *) Options[Index].OptionStr); ASSERT_EFI_ERROR (Status); BufferLength -= (UINT32) (OptionStrLength + 1); Cur += OptionStrLength + 1; - + Status = AsciiStrCpyS ((CHAR8 *) Cur, BufferLength, (CHAR8 *) Options[Index].ValueStr); ASSERT_EFI_ERROR (Status); BufferLength -= (UINT32) (ValueStrLength + 1); Cur += ValueStrLength + 1; - + } return Mtftp4SendPacket (Instance, Nbuf); @@ -356,7 +356,7 @@ Mtftp4SendRequest ( Build then send an error message. @param Instance The MTFTP session - @param ErrCode The error code + @param ErrCode The error code @param ErrInfo The error message @retval EFI_OUT_OF_RESOURCES Failed to allocate memory for the error packet @@ -395,7 +395,7 @@ Mtftp4SendError ( /** The callback function called when the packet is transmitted. - + It simply frees the packet. @param Packet The transmitted (or failed to) packet @@ -437,10 +437,10 @@ Mtftp4SetTimeout ( /** - Send the packet for the instance. - - It will first save a reference to the packet for later retransmission. - Then determine the destination port, listen port for requests, and connected + Send the packet for the instance. + + It will first save a reference to the packet for later retransmission. + Then determine the destination port, listen port for requests, and connected port for others. At last, send the packet out. @param Instance The Mtftp instance @@ -484,7 +484,7 @@ Mtftp4SendPacket ( ASSERT (Buffer != NULL); OpCode = NTOHS (*(UINT16 *)Buffer); - if ((OpCode == EFI_MTFTP4_OPCODE_RRQ) || + if ((OpCode == EFI_MTFTP4_OPCODE_RRQ) || (OpCode == EFI_MTFTP4_OPCODE_DIR) || (OpCode == EFI_MTFTP4_OPCODE_WRQ)) { UdpPoint.RemotePort = Instance->ListeningPort; @@ -634,7 +634,7 @@ Mtftp4OnTimerTick ( if (!Instance->HasTimeout) { continue; } - + Instance->HasTimeout = FALSE; // diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.h b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.h index fd8703a925..df18440a9e 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.h +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Support.h @@ -1,6 +1,6 @@ /** @file Support routines for MTFTP. - + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -30,16 +30,16 @@ typedef struct { /** - Initialize the block range for either RRQ or WRQ. - - RRQ and WRQ have different requirements for Start and End. - For example, during start up, WRQ initializes its whole valid block range - to [0, 0xffff]. This is bacause the server will send us a ACK0 to inform us - to start the upload. When the client received ACK0, it will remove 0 from the + Initialize the block range for either RRQ or WRQ. + + RRQ and WRQ have different requirements for Start and End. + For example, during start up, WRQ initializes its whole valid block range + to [0, 0xffff]. This is bacause the server will send us a ACK0 to inform us + to start the upload. When the client received ACK0, it will remove 0 from the range, get the next block number, which is 1, then upload the BLOCK1. For RRQ - without option negotiation, the server will directly send us the BLOCK1 in - response to the client's RRQ. When received BLOCK1, the client will remove - it from the block range and send an ACK. It also works if there is option + without option negotiation, the server will directly send us the BLOCK1 in + response to the client's RRQ. When received BLOCK1, the client will remove + it from the block range and send an ACK. It also works if there is option negotiation. @param Head The block range head to initialize @@ -62,7 +62,7 @@ Mtftp4InitBlockRange ( @param Head The block range head - @return The first valid block number, -1 if the block range is empty. + @return The first valid block number, -1 if the block range is empty. **/ INTN @@ -71,10 +71,10 @@ Mtftp4GetNextBlockNum ( ); /** - Set the last block number of the block range list. - + Set the last block number of the block range list. + It will remove all the blocks after the Last. MTFTP initialize the block range - to the maximum possible range, such as [0, 0xffff] for WRQ. When it gets the + to the maximum possible range, such as [0, 0xffff] for WRQ. When it gets the last block number, it will call this function to set the last block number. @param Head The block range list @@ -93,7 +93,7 @@ Mtftp4SetLastBlockNum ( @param Head The block range list to remove from @param Num The block number to remove @param Completed Wether Num is the last block number - @param TotalBlock The continuous block number in all + @param TotalBlock The continuous block number in all @retval EFI_NOT_FOUND The block number isn't in the block range list @retval EFI_SUCCESS The block number has been removed from the list @@ -120,10 +120,10 @@ Mtftp4SetTimeout ( ); /** - Send the packet for the instance. - - It will first save a reference to the packet for later retransmission. - Then determine the destination port, listen port for requests, and connected + Send the packet for the instance. + + It will first save a reference to the packet for later retransmission. + Then determine the destination port, listen port for requests, and connected port for others. At last, send the packet out. @param Instance The Mtftp instance @@ -158,7 +158,7 @@ Mtftp4SendRequest ( Build then send an error message. @param Instance The MTFTP session - @param ErrCode The error code + @param ErrCode The error code @param ErrInfo The error message @retval EFI_OUT_OF_RESOURCES Failed to allocate memory for the error packet diff --git a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Wrq.c b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Wrq.c index 438659a76e..cf1d50fe40 100644 --- a/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Wrq.c +++ b/MdeModulePkg/Universal/Network/Mtftp4Dxe/Mtftp4Wrq.c @@ -1,6 +1,6 @@ /** @file Routines to process Wrq (upload). - + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -124,9 +124,9 @@ Mtftp4WrqSendBlock ( /** - Function to handle received ACK packet. - - If the ACK number matches the expected block number, and there are more + Function to handle received ACK packet. + + If the ACK number matches the expected block number, and there are more data pending, send the next block. Otherwise tell the caller that we are done. @param Instance The MTFTP upload session @@ -150,7 +150,7 @@ Mtftp4WrqHandleAck ( UINT16 AckNum; INTN Expected; UINT64 TotalBlock; - + *Completed = FALSE; AckNum = NTOHS (Packet->Ack.Block[0]); Expected = Mtftp4GetNextBlockNum (&Instance->Blocks); @@ -175,7 +175,7 @@ Mtftp4WrqHandleAck ( Expected = Mtftp4GetNextBlockNum (&Instance->Blocks); if (Expected < 0) { - + // // The block range is empty. It may either because the the last // block has been ACKed, or the sequence number just looped back, @@ -202,8 +202,8 @@ Mtftp4WrqHandleAck ( /** - Check whether the received OACK is valid. - + Check whether the received OACK is valid. + The OACK is valid only if: 1. It only include options requested by us 2. It can only include a smaller block size @@ -244,8 +244,8 @@ Mtftp4WrqOackValid ( /** - Function to handle the MTFTP OACK packet. - + Function to handle the MTFTP OACK packet. + It parses the packet's options, and update the internal states of the session. @param Instance The MTFTP session @@ -458,7 +458,7 @@ Mtftp4WrqInput ( case EFI_MTFTP4_OPCODE_ERROR: Status = EFI_TFTP_ERROR; break; - + default: break; } @@ -492,8 +492,8 @@ ON_EXIT: /** Start the MTFTP session for upload. - - It will first init some states, then send the WRQ request packet, + + It will first init some states, then send the WRQ request packet, and start receiving the packet. @param Instance The MTFTP session diff --git a/MdeModulePkg/Universal/Network/SnpDxe/ComponentName.c b/MdeModulePkg/Universal/Network/SnpDxe/ComponentName.c index d8b8184018..a366574599 100644 --- a/MdeModulePkg/Universal/Network/SnpDxe/ComponentName.c +++ b/MdeModulePkg/Universal/Network/SnpDxe/ComponentName.c @@ -1,11 +1,11 @@ /** @file UEFI Component Name(2) protocol implementation for SnpDxe driver. -Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed -and made available under the terms and conditions of the BSD License which -accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php +Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed +and made available under the terms and conditions of the BSD License which +accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @@ -238,10 +238,10 @@ SimpleNetworkComponentNameGetDriverName ( @param Snp[in] A pointer to the EFI_SIMPLE_NETWORK_PROTOCOL. - + @retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully. @retval EFI_INVALID_PARAMETER The input parameter is invalid. - + **/ EFI_STATUS UpdateName ( @@ -285,7 +285,7 @@ UpdateName ( FreeUnicodeStringTable (gSimpleNetworkControllerNameTable); gSimpleNetworkControllerNameTable = NULL; } - + Status = AddUnicodeString2 ( "eng", gSimpleNetworkComponentName.SupportedLanguages, @@ -296,7 +296,7 @@ UpdateName ( if (EFI_ERROR (Status)) { return Status; } - + return AddUnicodeString2 ( "en", gSimpleNetworkComponentName2.SupportedLanguages, @@ -317,8 +317,8 @@ UpdateName ( and EFI_SUCCESS is returned. If the driver specified by This is not currently managing the controller specified by ControllerHandle and ChildHandle, then EFI_UNSUPPORTED is returned. If the driver specified by This does not - support the language specified by Language, then EFI_UNSUPPORTED is returned. - Currently not implemented. + support the language specified by Language, then EFI_UNSUPPORTED is returned. + Currently not implemented. @param This[in] A pointer to the EFI_COMPONENT_NAME2_PROTOCOL or EFI_COMPONENT_NAME_PROTOCOL instance. @@ -387,7 +387,7 @@ SimpleNetworkComponentNameGetControllerName ( { EFI_STATUS Status; EFI_SIMPLE_NETWORK_PROTOCOL *Snp; - + if (ChildHandle != NULL) { return EFI_UNSUPPORTED; } @@ -404,9 +404,9 @@ SimpleNetworkComponentNameGetControllerName ( return Status; } - // + // // Retrieve an instance of a produced protocol from ControllerHandle - // + // Status = gBS->OpenProtocol ( ControllerHandle, &gEfiSimpleNetworkProtocolGuid, diff --git a/MdeModulePkg/Universal/Network/SnpDxe/Initialize.c b/MdeModulePkg/Universal/Network/SnpDxe/Initialize.c index 63bdf92f55..a97891341b 100644 --- a/MdeModulePkg/Universal/Network/SnpDxe/Initialize.c +++ b/MdeModulePkg/Universal/Network/SnpDxe/Initialize.c @@ -1,11 +1,11 @@ /** @file - Implementation of initializing a network adapter. + Implementation of initializing a network adapter. -Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed -and made available under the terms and conditions of the BSD License which -accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php +Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed +and made available under the terms and conditions of the BSD License which +accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @@ -19,9 +19,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. Call UNDI to initialize the interface. @param Snp Pointer to snp driver structure. - @param CableDetectFlag Do/don't detect the cable (depending on what + @param CableDetectFlag Do/don't detect the cable (depending on what undi supports). - + @retval EFI_SUCCESS UNDI is initialized successfully. @retval EFI_DEVICE_ERROR UNDI could not be initialized. @retval Other Other errors as indicated. @@ -103,17 +103,17 @@ PxeInit ( // // There are two fields need to be checked here: - // First is the upper two bits (14 & 15) in the CDB.StatFlags field. Until these bits change to report + // First is the upper two bits (14 & 15) in the CDB.StatFlags field. Until these bits change to report // PXE_STATFLAGS_COMMAND_COMPLETE or PXE_STATFLAGS_COMMAND_FAILED, the command has not been executed by the UNDI. - // Second is the CDB.StatCode field. After command execution completes, either successfully or not, + // Second is the CDB.StatCode field. After command execution completes, either successfully or not, // the CDB.StatCode field contains the result of the command execution. // if ((((Snp->Cdb.StatFlags) & PXE_STATFLAGS_STATUS_MASK) == PXE_STATFLAGS_COMMAND_COMPLETE) && (Snp->Cdb.StatCode == PXE_STATCODE_SUCCESS)) { // - // If cable detect feature is enabled in CDB.OpFlags, check the CDB.StatFlags to see if there is an - // active connection to this network device. If the no media StatFlag is set, the UNDI and network - // device are still initialized. + // If cable detect feature is enabled in CDB.OpFlags, check the CDB.StatFlags to see if there is an + // active connection to this network device. If the no media StatFlag is set, the UNDI and network + // device are still initialized. // if (CableDetectFlag == PXE_OPFLAGS_INITIALIZE_DETECT_CABLE) { if(((Snp->Cdb.StatFlags) & PXE_STATFLAGS_INITIALIZED_NO_MEDIA) != PXE_STATFLAGS_INITIALIZED_NO_MEDIA) { @@ -122,7 +122,7 @@ PxeInit ( Snp->Mode.MediaPresent = FALSE; } } - + Snp->Mode.State = EfiSimpleNetworkInitialized; Status = EFI_SUCCESS; } else { @@ -151,8 +151,8 @@ PxeInit ( /** - Resets a network adapter and allocates the transmit and receive buffers - required by the network interface; optionally, also requests allocation of + Resets a network adapter and allocates the transmit and receive buffers + required by the network interface; optionally, also requests allocation of additional transmit and receive buffers. This function allocates the transmit and receive buffers required by the network @@ -164,8 +164,8 @@ PxeInit ( @param ExtraRxBufferSize The size, in bytes, of the extra receive buffer space that the driver should allocate for the network interface. - Some network interfaces will not be able to use the - extra buffer, and the caller will not know if it is + Some network interfaces will not be able to use the + extra buffer, and the caller will not know if it is actually being used. @param ExtraTxBufferSize The size, in bytes, of the extra transmit buffer space that the driver should allocate for the network interface. diff --git a/MdeModulePkg/Universal/Network/SnpDxe/Mcast_ip_to_mac.c b/MdeModulePkg/Universal/Network/SnpDxe/Mcast_ip_to_mac.c index 23dba90194..8b2ede2c9b 100644 --- a/MdeModulePkg/Universal/Network/SnpDxe/Mcast_ip_to_mac.c +++ b/MdeModulePkg/Universal/Network/SnpDxe/Mcast_ip_to_mac.c @@ -1,12 +1,12 @@ /** @file - Implementation of converting an multicast IP address to multicast HW MAC - address. - -Copyright (c) 2004 - 2007, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed -and made available under the terms and conditions of the BSD License which -accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php + Implementation of converting an multicast IP address to multicast HW MAC + address. + +Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed +and made available under the terms and conditions of the BSD License which +accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @@ -23,11 +23,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @param IP Multicast IP address. @param MAC Pointer to hold the return MAC address. - @retval EFI_SUCCESS The multicast IP address was mapped to the + @retval EFI_SUCCESS The multicast IP address was mapped to the multicast HW MAC address. - @retval EFI_INVALID_PARAMETER Invalid UNDI command. - @retval EFI_UNSUPPORTED Command is not supported by UNDI. - @retval EFI_DEVICE_ERROR Fail to execute UNDI command. + @retval EFI_INVALID_PARAMETER Invalid UNDI command. + @retval EFI_UNSUPPORTED Command is not supported by UNDI. + @retval EFI_DEVICE_ERROR Fail to execute UNDI command. **/ EFI_STATUS @@ -103,29 +103,29 @@ PxeIp2Mac ( /** Converts a multicast IP address to a multicast HW MAC address. - - This function converts a multicast IP address to a multicast HW MAC address + + This function converts a multicast IP address to a multicast HW MAC address for all packet transactions. If the mapping is accepted, then EFI_SUCCESS will be returned. @param This A pointer to the EFI_SIMPLE_NETWORK_PROTOCOL instance. @param IPv6 Set to TRUE if the multicast IP address is IPv6 [RFC 2460]. - Set to FALSE if the multicast IP address is IPv4 [RFC 791]. - @param IP The multicast IP address that is to be converted to a multicast + Set to FALSE if the multicast IP address is IPv4 [RFC 791]. + @param IP The multicast IP address that is to be converted to a multicast HW MAC address. @param MAC The multicast HW MAC address that is to be generated from IP. @retval EFI_SUCCESS The multicast IP address was mapped to the multicast HW MAC address. - @retval EFI_NOT_STARTED The Simple Network Protocol interface has not + @retval EFI_NOT_STARTED The Simple Network Protocol interface has not been started by calling Start(). @retval EFI_INVALID_PARAMETER IP is NULL. @retval EFI_INVALID_PARAMETER MAC is NULL. - @retval EFI_INVALID_PARAMETER IP does not point to a valid IPv4 or IPv6 + @retval EFI_INVALID_PARAMETER IP does not point to a valid IPv4 or IPv6 multicast address. - @retval EFI_DEVICE_ERROR The Simple Network Protocol interface has not + @retval EFI_DEVICE_ERROR The Simple Network Protocol interface has not been initialized by calling Initialize(). - @retval EFI_UNSUPPORTED IPv6 is TRUE and the implementation does not + @retval EFI_UNSUPPORTED IPv6 is TRUE and the implementation does not support IPv6 multicast to MAC address conversion. **/ diff --git a/MdeModulePkg/Universal/Network/SnpDxe/Nvdata.c b/MdeModulePkg/Universal/Network/SnpDxe/Nvdata.c index 443979087e..721b34a22a 100644 --- a/MdeModulePkg/Universal/Network/SnpDxe/Nvdata.c +++ b/MdeModulePkg/Universal/Network/SnpDxe/Nvdata.c @@ -1,12 +1,12 @@ /** @file - Implementation of reading and writing operations on the NVRAM device - attached to a network interface. - -Copyright (c) 2004 - 2009, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed -and made available under the terms and conditions of the BSD License which -accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php + Implementation of reading and writing operations on the NVRAM device + attached to a network interface. + +Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed +and made available under the terms and conditions of the BSD License which +accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @@ -97,51 +97,51 @@ PxeNvDataRead ( /** - Performs read and write operations on the NVRAM device attached to a network + Performs read and write operations on the NVRAM device attached to a network interface. - - This function performs read and write operations on the NVRAM device attached + + This function performs read and write operations on the NVRAM device attached to a network interface. If ReadWrite is TRUE, a read operation is performed. - If ReadWrite is FALSE, a write operation is performed. Offset specifies the - byte offset at which to start either operation. Offset must be a multiple of - NvRamAccessSize , and it must have a value between zero and NvRamSize. + If ReadWrite is FALSE, a write operation is performed. Offset specifies the + byte offset at which to start either operation. Offset must be a multiple of + NvRamAccessSize , and it must have a value between zero and NvRamSize. BufferSize specifies the length of the read or write operation. BufferSize must also be a multiple of NvRamAccessSize, and Offset + BufferSize must not exceed - NvRamSize. - If any of the above conditions is not met, then EFI_INVALID_PARAMETER will be - returned. - If all the conditions are met and the operation is "read," the NVRAM device - attached to the network interface will be read into Buffer and EFI_SUCCESS + NvRamSize. + If any of the above conditions is not met, then EFI_INVALID_PARAMETER will be + returned. + If all the conditions are met and the operation is "read," the NVRAM device + attached to the network interface will be read into Buffer and EFI_SUCCESS will be returned. If this is a write operation, the contents of Buffer will be - used to update the contents of the NVRAM device attached to the network + used to update the contents of the NVRAM device attached to the network interface and EFI_SUCCESS will be returned. - + It does the basic checking on the input parameters and retrieves snp structure and then calls the read_nvdata() call which does the actual reading @param This A pointer to the EFI_SIMPLE_NETWORK_PROTOCOL instance. @param ReadWrite TRUE for read operations, FALSE for write operations. - @param Offset Byte offset in the NVRAM device at which to start the read or - write operation. This must be a multiple of NvRamAccessSize - and less than NvRamSize. (See EFI_SIMPLE_NETWORK_MODE) - @param BufferSize The number of bytes to read or write from the NVRAM device. + @param Offset Byte offset in the NVRAM device at which to start the read or + write operation. This must be a multiple of NvRamAccessSize + and less than NvRamSize. (See EFI_SIMPLE_NETWORK_MODE) + @param BufferSize The number of bytes to read or write from the NVRAM device. This must also be a multiple of NvramAccessSize. @param Buffer A pointer to the data buffer. @retval EFI_SUCCESS The NVRAM access was performed. @retval EFI_NOT_STARTED The network interface has not been started. @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE: - * The This parameter is NULL - * The This parameter does not point to a valid + * The This parameter is NULL + * The This parameter does not point to a valid EFI_SIMPLE_NETWORK_PROTOCOL structure - * The Offset parameter is not a multiple of + * The Offset parameter is not a multiple of EFI_SIMPLE_NETWORK_MODE.NvRamAccessSize - * The Offset parameter is not less than + * The Offset parameter is not less than EFI_SIMPLE_NETWORK_MODE.NvRamSize - * The BufferSize parameter is not a multiple of + * The BufferSize parameter is not a multiple of EFI_SIMPLE_NETWORK_MODE.NvRamAccessSize * The Buffer parameter is NULL - @retval EFI_DEVICE_ERROR The command could not be sent to the network + @retval EFI_DEVICE_ERROR The command could not be sent to the network interface. @retval EFI_UNSUPPORTED This function is not supported by the network interface. diff --git a/MdeModulePkg/Universal/Network/SnpDxe/Receive_filters.c b/MdeModulePkg/Universal/Network/SnpDxe/Receive_filters.c index c37018c826..3b2c27d442 100644 --- a/MdeModulePkg/Universal/Network/SnpDxe/Receive_filters.c +++ b/MdeModulePkg/Universal/Network/SnpDxe/Receive_filters.c @@ -2,11 +2,11 @@ Implementation of managing the multicast receive filters of a network interface. -Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under the -terms and conditions of the BSD License which accompanies this distribution. The -full text of the license may be found at -http://opensource.org/licenses/bsd-license.php +Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under the +terms and conditions of the BSD License which accompanies this distribution. The +full text of the license may be found at +http://opensource.org/licenses/bsd-license.php THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @@ -24,8 +24,8 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @param EnableFlags Bit mask for enabling the receive filters. @param MCastAddressCount Multicast address count for a new multicast address list. - @param MCastAddressList List of new multicast addresses. - + @param MCastAddressList List of new multicast addresses. + @retval EFI_SUCCESS The multicast receive filter list was updated. @retval EFI_INVALID_PARAMETER Invalid UNDI command. @retval EFI_UNSUPPORTED Command is not supported by UNDI. @@ -115,13 +115,13 @@ PxeRecvFilterEnable ( @param Snp Pointer to snp driver structure @param DisableFlags Bit mask for disabling the receive filters - @param ResetMCastList Boolean flag to reset/delete the multicast filter + @param ResetMCastList Boolean flag to reset/delete the multicast filter list. @retval EFI_SUCCESS The multicast receive filter list was updated. @retval EFI_DEVICE_ERROR Fail to execute UNDI command. - -**/ + +**/ EFI_STATUS PxeRecvFilterDisable ( SNP_DRIVER *Snp, @@ -194,8 +194,8 @@ PxeRecvFilterDisable ( @param Snp Pointer to snp driver structure. @retval EFI_SUCCESS The receive filter was read. - @retval EFI_DEVICE_ERROR Fail to execute UNDI command. - + @retval EFI_DEVICE_ERROR Fail to execute UNDI command. + **/ EFI_STATUS PxeRecvFilterRead ( @@ -291,70 +291,70 @@ PxeRecvFilterRead ( /** Manages the multicast receive filters of a network interface. - - This function is used enable and disable the hardware and software receive + + This function is used enable and disable the hardware and software receive filters for the underlying network device. - The receive filter change is broken down into three steps: - * The filter mask bits that are set (ON) in the Enable parameter are added to - the current receive filter settings. + The receive filter change is broken down into three steps: + * The filter mask bits that are set (ON) in the Enable parameter are added to + the current receive filter settings. * The filter mask bits that are set (ON) in the Disable parameter are subtracted from the updated receive filter settings. * If the resulting receive filter setting is not supported by the hardware a more liberal setting is selected. - If the same bits are set in the Enable and Disable parameters, then the bits + If the same bits are set in the Enable and Disable parameters, then the bits in the Disable parameter takes precedence. - If the ResetMCastFilter parameter is TRUE, then the multicast address list - filter is disabled (irregardless of what other multicast bits are set in the - Enable and Disable parameters). The SNP->Mode->MCastFilterCount field is set + If the ResetMCastFilter parameter is TRUE, then the multicast address list + filter is disabled (irregardless of what other multicast bits are set in the + Enable and Disable parameters). The SNP->Mode->MCastFilterCount field is set to zero. The Snp->Mode->MCastFilter contents are undefined. - After enabling or disabling receive filter settings, software should verify - the new settings by checking the Snp->Mode->ReceiveFilterSettings, + After enabling or disabling receive filter settings, software should verify + the new settings by checking the Snp->Mode->ReceiveFilterSettings, Snp->Mode->MCastFilterCount and Snp->Mode->MCastFilter fields. - Note: Some network drivers and/or devices will automatically promote receive + Note: Some network drivers and/or devices will automatically promote receive filter settings if the requested setting can not be honored. For example, if - a request for four multicast addresses is made and the underlying hardware - only supports two multicast addresses the driver might set the promiscuous + a request for four multicast addresses is made and the underlying hardware + only supports two multicast addresses the driver might set the promiscuous or promiscuous multicast receive filters instead. The receiving software is - responsible for discarding any extra packets that get through the hardware + responsible for discarding any extra packets that get through the hardware receive filters. - Note: Note: To disable all receive filter hardware, the network driver must + Note: Note: To disable all receive filter hardware, the network driver must be Shutdown() and Stopped(). Calling ReceiveFilters() with Disable set to - Snp->Mode->ReceiveFilterSettings will make it so no more packets are - returned by the Receive() function, but the receive hardware may still be + Snp->Mode->ReceiveFilterSettings will make it so no more packets are + returned by the Receive() function, but the receive hardware may still be moving packets into system memory before inspecting and discarding them. - Unexpected system errors, reboots and hangs can occur if an OS is loaded + Unexpected system errors, reboots and hangs can occur if an OS is loaded and the network devices are not Shutdown() and Stopped(). - If ResetMCastFilter is TRUE, then the multicast receive filter list on the + If ResetMCastFilter is TRUE, then the multicast receive filter list on the network interface will be reset to the default multicast receive filter list. - If ResetMCastFilter is FALSE, and this network interface allows the multicast - receive filter list to be modified, then the MCastFilterCnt and MCastFilter - are used to update the current multicast receive filter list. The modified - receive filter list settings can be found in the MCastFilter field of + If ResetMCastFilter is FALSE, and this network interface allows the multicast + receive filter list to be modified, then the MCastFilterCnt and MCastFilter + are used to update the current multicast receive filter list. The modified + receive filter list settings can be found in the MCastFilter field of EFI_SIMPLE_NETWORK_MODE. If the network interface does not allow the multicast receive filter list to be modified, then EFI_INVALID_PARAMETER will be returned. If the driver has not been initialized, EFI_DEVICE_ERROR will be returned. - If the receive filter mask and multicast receive filter list have been + If the receive filter mask and multicast receive filter list have been successfully updated on the network interface, EFI_SUCCESS will be returned. @param This A pointer to the EFI_SIMPLE_NETWORK_PROTOCOL instance. @param Enable A bit mask of receive filters to enable on the network interface. @param Disable A bit mask of receive filters to disable on the network - interface. For backward compatibility with EFI 1.1 + interface. For backward compatibility with EFI 1.1 platforms, the EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST bit must be set when the ResetMCastFilter parameter is TRUE. - @param ResetMCastFilter Set to TRUE to reset the contents of the multicast - receive filters on the network interface to their - default values. + @param ResetMCastFilter Set to TRUE to reset the contents of the multicast + receive filters on the network interface to their + default values. @param MCastFilterCnt Number of multicast HW MAC addresses in the new MCastFilter - list. This value must be less than or equal to the - MCastFilterCnt field of EFI_SIMPLE_NETWORK_MODE. + list. This value must be less than or equal to the + MCastFilterCnt field of EFI_SIMPLE_NETWORK_MODE. This field is optional if ResetMCastFilter is TRUE. @param MCastFilter A pointer to a list of new multicast receive filter HW - MAC addresses. This list will replace any existing - multicast HW MAC address list. This field is optional + MAC addresses. This list will replace any existing + multicast HW MAC address list. This field is optional if ResetMCastFilter is TRUE. - + @retval EFI_SUCCESS The multicast receive filter list was updated. @retval EFI_NOT_STARTED The network interface has not been started. @retval EFI_INVALID_PARAMETER One or more of the following conditions is TRUE: @@ -363,9 +363,9 @@ PxeRecvFilterRead ( in Snp->Mode->ReceiveFilterMask * There are bits set in Disable that are not set in Snp->Mode->ReceiveFilterMask - * Multicast is being enabled (the - EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST bit is - set in Enable, it is not set in Disable, and + * Multicast is being enabled (the + EFI_SIMPLE_NETWORK_RECEIVE_MULTICAST bit is + set in Enable, it is not set in Disable, and ResetMCastFilter is FALSE) and MCastFilterCount is zero * Multicast is being enabled and MCastFilterCount @@ -377,7 +377,7 @@ PxeRecvFilterRead ( @retval EFI_DEVICE_ERROR One or more of the following conditions is TRUE: * The network interface has been started but has not been initialized - * An unexpected error was returned by the + * An unexpected error was returned by the underlying network driver or device @retval EFI_UNSUPPORTED This function is not supported by the network interface. diff --git a/MdeModulePkg/Universal/Network/SnpDxe/Reset.c b/MdeModulePkg/Universal/Network/SnpDxe/Reset.c index 2381264c11..498d706fd4 100644 --- a/MdeModulePkg/Universal/Network/SnpDxe/Reset.c +++ b/MdeModulePkg/Universal/Network/SnpDxe/Reset.c @@ -1,11 +1,11 @@ /** @file Implementation of resetting a network adapter. - -Copyright (c) 2004 - 2007, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed and made available under the -terms and conditions of the BSD License which accompanies this distribution. The -full text of the license may be found at -http://opensource.org/licenses/bsd-license.php + +Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed and made available under the +terms and conditions of the BSD License which accompanies this distribution. The +full text of the license may be found at +http://opensource.org/licenses/bsd-license.php THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @@ -70,16 +70,16 @@ PxeReset ( provided in the previous call to Initialize(). This function resets a network adapter and reinitializes it with the parameters - that were provided in the previous call to Initialize(). The transmit and + that were provided in the previous call to Initialize(). The transmit and receive queues are emptied and all pending interrupts are cleared. - Receive filters, the station address, the statistics, and the multicast-IP-to-HW - MAC addresses are not reset by this call. If the network interface was - successfully reset, then EFI_SUCCESS will be returned. If the driver has not + Receive filters, the station address, the statistics, and the multicast-IP-to-HW + MAC addresses are not reset by this call. If the network interface was + successfully reset, then EFI_SUCCESS will be returned. If the driver has not been initialized, EFI_DEVICE_ERROR will be returned. @param This A pointer to the EFI_SIMPLE_NETWORK_PROTOCOL instance. - @param ExtendedVerification Indicates that the driver may perform a more - exhaustive verification operation of the device + @param ExtendedVerification Indicates that the driver may perform a more + exhaustive verification operation of the device during reset. @retval EFI_SUCCESS The network interface was reset. diff --git a/MdeModulePkg/Universal/Network/SnpDxe/Shutdown.c b/MdeModulePkg/Universal/Network/SnpDxe/Shutdown.c index 1f51992778..670e93b037 100644 --- a/MdeModulePkg/Universal/Network/SnpDxe/Shutdown.c +++ b/MdeModulePkg/Universal/Network/SnpDxe/Shutdown.c @@ -1,11 +1,11 @@ /** @file Implementation of shuting down a network adapter. - -Copyright (c) 2004 - 2007, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed -and made available under the terms and conditions of the BSD License which -accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php + +Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed +and made available under the terms and conditions of the BSD License which +accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @@ -74,12 +74,12 @@ PxeShutdown ( /** - Resets a network adapter and leaves it in a state that is safe for another - driver to initialize. - + Resets a network adapter and leaves it in a state that is safe for another + driver to initialize. + This function releases the memory buffers assigned in the Initialize() call. Pending transmits and receives are lost, and interrupts are cleared and disabled. - After this call, only the Initialize() and Stop() calls may be used. If the + After this call, only the Initialize() and Stop() calls may be used. If the network interface was successfully shutdown, then EFI_SUCCESS will be returned. If the driver has not been initialized, EFI_DEVICE_ERROR will be returned. @@ -87,7 +87,7 @@ PxeShutdown ( @retval EFI_SUCCESS The network interface was shutdown. @retval EFI_NOT_STARTED The network interface has not been started. - @retval EFI_INVALID_PARAMETER This parameter was NULL or did not point to a valid + @retval EFI_INVALID_PARAMETER This parameter was NULL or did not point to a valid EFI_SIMPLE_NETWORK_PROTOCOL structure. @retval EFI_DEVICE_ERROR The command could not be sent to the network interface. @@ -128,7 +128,7 @@ SnpUndi32Shutdown ( Status = EFI_DEVICE_ERROR; goto ON_EXIT; } - + Status = PxeShutdown (Snp); Snp->Mode.State = EfiSimpleNetworkStarted; diff --git a/MdeModulePkg/Universal/Network/SnpDxe/Snp.c b/MdeModulePkg/Universal/Network/SnpDxe/Snp.c index 9f61aee057..43cb21b8c3 100644 --- a/MdeModulePkg/Universal/Network/SnpDxe/Snp.c +++ b/MdeModulePkg/Universal/Network/SnpDxe/Snp.c @@ -1,7 +1,7 @@ /** @file Implementation of driver entry point and driver binding protocol. -Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -275,7 +275,7 @@ SimpleNetworkDriverStart ( EFI_ACPI_ADDRESS_SPACE_DESCRIPTOR *BarDesc; BOOLEAN FoundIoBar; BOOLEAN FoundMemoryBar; - + DEBUG ((EFI_D_NET, "\nSnpNotifyNetworkInterfaceIdentifier() ")); Status = gBS->OpenProtocol ( @@ -411,7 +411,7 @@ SimpleNetworkDriverStart ( } Snp->MaxRecycledTxBuf = SNP_TX_BUFFER_INCREASEMENT; Snp->RecycledTxBufCount = 0; - + if (Nii->Revision >= EFI_NETWORK_INTERFACE_IDENTIFIER_PROTOCOL_REVISION) { Snp->IfNum = Nii->IfNum; diff --git a/MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf b/MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf index 90fd8d5475..021d45d44d 100644 --- a/MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf +++ b/MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.inf @@ -1,14 +1,14 @@ ## @file # This module produces EFI SNP Protocol. # -# This module produces Simple Network Protocol upon EFI Network Interface +# This module produces Simple Network Protocol upon EFI Network Interface # Identifier Protocol, to provide a packet level interface to a network adapter. # -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
-# This program and the accompanying materials are licensed -# and made available under the terms and conditions of the BSD License which -# accompanies this distribution. The full text of the license may be found at -# http://opensource.org/licenses/bsd-license.php +# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+# This program and the accompanying materials are licensed +# and made available under the terms and conditions of the BSD License which +# accompanies this distribution. The full text of the license may be found at +# http://opensource.org/licenses/bsd-license.php # # THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, # WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @@ -30,7 +30,7 @@ # # VALID_ARCHITECTURES = IA32 X64 IPF EBC # -# DRIVER_BINDING = mSimpleNetworkDriverBinding +# DRIVER_BINDING = mSimpleNetworkDriverBinding # COMPONENT_NAME = gSimpleNetworkComponentName # COMPONENT_NAME2 = gSimpleNetworkComponentName2 # diff --git a/MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.uni b/MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.uni index cd1e9ba521..55e8adf5ef 100644 --- a/MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.uni +++ b/MdeModulePkg/Universal/Network/SnpDxe/SnpDxe.uni @@ -4,13 +4,13 @@ // This module produces Simple Network Protocol upon EFI Network Interface // Identifier Protocol, to provide a packet level interface to a network adapter. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials are licensed // and made available under the terms and conditions of the BSD License which // accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/Network/SnpDxe/SnpDxeExtra.uni b/MdeModulePkg/Universal/Network/SnpDxe/SnpDxeExtra.uni index 5476a45f4e..7c220651da 100644 --- a/MdeModulePkg/Universal/Network/SnpDxe/SnpDxeExtra.uni +++ b/MdeModulePkg/Universal/Network/SnpDxe/SnpDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // SnpDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials are licensed // and made available under the terms and conditions of the BSD License which @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "SNP DXE Driver" diff --git a/MdeModulePkg/Universal/Network/SnpDxe/Start.c b/MdeModulePkg/Universal/Network/SnpDxe/Start.c index 210f081078..82d49c8b14 100644 --- a/MdeModulePkg/Universal/Network/SnpDxe/Start.c +++ b/MdeModulePkg/Universal/Network/SnpDxe/Start.c @@ -1,11 +1,11 @@ /** @file Implementation of starting a network adapter. - -Copyright (c) 2004 - 2007, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed -and made available under the terms and conditions of the BSD License which -accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php + +Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed +and made available under the terms and conditions of the BSD License which +accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @@ -22,7 +22,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @retval EFI_SUCCESS UNDI is started successfully. @retval EFI_DEVICE_ERROR UNDI could not be started. - + **/ EFI_STATUS PxeStart ( @@ -100,7 +100,7 @@ PxeStart ( /** Change the state of a network interface from "stopped" to "started." - + This function starts a network interface. If the network interface successfully starts, then EFI_SUCCESS will be returned. @@ -108,7 +108,7 @@ PxeStart ( @retval EFI_SUCCESS The network interface was started. @retval EFI_ALREADY_STARTED The network interface is already in the started state. - @retval EFI_INVALID_PARAMETER This parameter was NULL or did not point to a valid + @retval EFI_INVALID_PARAMETER This parameter was NULL or did not point to a valid EFI_SIMPLE_NETWORK_PROTOCOL structure. @retval EFI_DEVICE_ERROR The command could not be sent to the network interface. @retval EFI_UNSUPPORTED This function is not supported by the network interface. diff --git a/MdeModulePkg/Universal/Network/SnpDxe/Station_address.c b/MdeModulePkg/Universal/Network/SnpDxe/Station_address.c index 0917baf674..ce70fcdf36 100644 --- a/MdeModulePkg/Universal/Network/SnpDxe/Station_address.c +++ b/MdeModulePkg/Universal/Network/SnpDxe/Station_address.c @@ -1,11 +1,11 @@ /** @file Implementation of reading the MAC address of a network adapter. - -Copyright (c) 2004 - 2014, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed -and made available under the terms and conditions of the BSD License which -accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php + +Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed +and made available under the terms and conditions of the BSD License which +accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @@ -16,11 +16,11 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** - Call UNDI to read the MAC address of the NIC and update the mode structure - with the address. + Call UNDI to read the MAC address of the NIC and update the mode structure + with the address. @param Snp Pointer to snp driver structure. - + @retval EFI_SUCCESS The MAC address of the NIC is read successfully. @retval EFI_DEVICE_ERROR Failed to read the MAC address of the NIC. @@ -166,33 +166,33 @@ PxeSetStnAddr ( /** Modifies or resets the current station address, if supported. - - This function modifies or resets the current station address of a network + + This function modifies or resets the current station address of a network interface, if supported. If Reset is TRUE, then the current station address is - set to the network interface's permanent address. If Reset is FALSE, and the - network interface allows its station address to be modified, then the current - station address is changed to the address specified by New. If the network - interface does not allow its station address to be modified, then + set to the network interface's permanent address. If Reset is FALSE, and the + network interface allows its station address to be modified, then the current + station address is changed to the address specified by New. If the network + interface does not allow its station address to be modified, then EFI_INVALID_PARAMETER will be returned. If the station address is successfully updated on the network interface, EFI_SUCCESS will be returned. If the driver has not been initialized, EFI_DEVICE_ERROR will be returned. @param This A pointer to the EFI_SIMPLE_NETWORK_PROTOCOL instance. - @param Reset Flag used to reset the station address to the network interface's + @param Reset Flag used to reset the station address to the network interface's permanent address. @param New New station address to be used for the network interface. @retval EFI_SUCCESS The network interface's station address was updated. - @retval EFI_NOT_STARTED The Simple Network Protocol interface has not been + @retval EFI_NOT_STARTED The Simple Network Protocol interface has not been started by calling Start(). @retval EFI_INVALID_PARAMETER The New station address was not accepted by the NIC. @retval EFI_INVALID_PARAMETER Reset is FALSE and New is NULL. - @retval EFI_DEVICE_ERROR The Simple Network Protocol interface has not + @retval EFI_DEVICE_ERROR The Simple Network Protocol interface has not been initialized by calling Initialize(). - @retval EFI_DEVICE_ERROR An error occurred attempting to set the new + @retval EFI_DEVICE_ERROR An error occurred attempting to set the new station address. - @retval EFI_UNSUPPORTED The NIC does not support changing the network + @retval EFI_UNSUPPORTED The NIC does not support changing the network interface's station address. **/ diff --git a/MdeModulePkg/Universal/Network/SnpDxe/Stop.c b/MdeModulePkg/Universal/Network/SnpDxe/Stop.c index a52d3b1163..46032f3ed3 100644 --- a/MdeModulePkg/Universal/Network/SnpDxe/Stop.c +++ b/MdeModulePkg/Universal/Network/SnpDxe/Stop.c @@ -1,11 +1,11 @@ /** @file Implementation of stopping a network interface. - -Copyright (c) 2004 - 2016, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed -and made available under the terms and conditions of the BSD License which -accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php + +Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed +and made available under the terms and conditions of the BSD License which +accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @@ -19,7 +19,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. Call UNDI to stop the interface and changes the snp state. @param Snp Pointer to snp driver structure - + @retval EFI_SUCCESS The network interface was stopped. @retval EFI_DEVICE_ERROR SNP is not initialized. @@ -67,22 +67,22 @@ PxeStop ( /** Changes the state of a network interface from "started" to "stopped." - + This function stops a network interface. This call is only valid if the network interface is in the started state. If the network interface was successfully stopped, then EFI_SUCCESS will be returned. - - @param This A pointer to the EFI_SIMPLE_NETWORK_PROTOCOL + + @param This A pointer to the EFI_SIMPLE_NETWORK_PROTOCOL instance. - - + + @retval EFI_SUCCESS The network interface was stopped. @retval EFI_NOT_STARTED The network interface has not been started. - @retval EFI_INVALID_PARAMETER This parameter was NULL or did not point to a + @retval EFI_INVALID_PARAMETER This parameter was NULL or did not point to a valid EFI_SIMPLE_NETWORK_PROTOCOL structure. - @retval EFI_DEVICE_ERROR The command could not be sent to the network + @retval EFI_DEVICE_ERROR The command could not be sent to the network interface. - @retval EFI_UNSUPPORTED This function is not supported by the network + @retval EFI_UNSUPPORTED This function is not supported by the network interface. **/ diff --git a/MdeModulePkg/Universal/Network/SnpDxe/Transmit.c b/MdeModulePkg/Universal/Network/SnpDxe/Transmit.c index 2c7083eb1b..aff4e8410f 100644 --- a/MdeModulePkg/Universal/Network/SnpDxe/Transmit.c +++ b/MdeModulePkg/Universal/Network/SnpDxe/Transmit.c @@ -1,11 +1,11 @@ /** @file Implementation of transmitting a packet. - -Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed -and made available under the terms and conditions of the BSD License which -accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php + +Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed +and made available under the terms and conditions of the BSD License which +accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @@ -221,45 +221,45 @@ PxeTransmit ( /** Places a packet in the transmit queue of a network interface. - + This function places the packet specified by Header and Buffer on the transmit - queue. If HeaderSize is nonzero and HeaderSize is not equal to - This->Mode->MediaHeaderSize, then EFI_INVALID_PARAMETER will be returned. If + queue. If HeaderSize is nonzero and HeaderSize is not equal to + This->Mode->MediaHeaderSize, then EFI_INVALID_PARAMETER will be returned. If BufferSize is less than This->Mode->MediaHeaderSize, then EFI_BUFFER_TOO_SMALL - will be returned. If Buffer is NULL, then EFI_INVALID_PARAMETER will be + will be returned. If Buffer is NULL, then EFI_INVALID_PARAMETER will be returned. If HeaderSize is nonzero and DestAddr or Protocol is NULL, then EFI_INVALID_PARAMETER will be returned. If the transmit engine of the network - interface is busy, then EFI_NOT_READY will be returned. If this packet can be - accepted by the transmit engine of the network interface, the packet contents - specified by Buffer will be placed on the transmit queue of the network - interface, and EFI_SUCCESS will be returned. GetStatus() can be used to - determine when the packet has actually been transmitted. The contents of the - Buffer must not be modified until the packet has actually been transmitted. + interface is busy, then EFI_NOT_READY will be returned. If this packet can be + accepted by the transmit engine of the network interface, the packet contents + specified by Buffer will be placed on the transmit queue of the network + interface, and EFI_SUCCESS will be returned. GetStatus() can be used to + determine when the packet has actually been transmitted. The contents of the + Buffer must not be modified until the packet has actually been transmitted. The Transmit() function performs nonblocking I/O. A caller who wants to perform - blocking I/O, should call Transmit(), and then GetStatus() until the + blocking I/O, should call Transmit(), and then GetStatus() until the transmitted buffer shows up in the recycled transmit buffer. If the driver has not been initialized, EFI_DEVICE_ERROR will be returned. @param This A pointer to the EFI_SIMPLE_NETWORK_PROTOCOL instance. - @param HeaderSize The size, in bytes, of the media header to be filled in by the + @param HeaderSize The size, in bytes, of the media header to be filled in by the Transmit() function. If HeaderSize is nonzero, then it must be equal to This->Mode->MediaHeaderSize and the DestAddr and Protocol parameters must not be NULL. @param BufferSize The size, in bytes, of the entire packet (media header and data) to be transmitted through the network interface. - @param Buffer A pointer to the packet (media header followed by data) to be - transmitted. This parameter cannot be NULL. If HeaderSize is + @param Buffer A pointer to the packet (media header followed by data) to be + transmitted. This parameter cannot be NULL. If HeaderSize is zero, then the media header in Buffer must already be filled - in by the caller. If HeaderSize is nonzero, then the media + in by the caller. If HeaderSize is nonzero, then the media header will be filled in by the Transmit() function. - @param SrcAddr The source HW MAC address. If HeaderSize is zero, then this - parameter is ignored. If HeaderSize is nonzero and SrcAddr - is NULL, then This->Mode->CurrentAddress is used for the + @param SrcAddr The source HW MAC address. If HeaderSize is zero, then this + parameter is ignored. If HeaderSize is nonzero and SrcAddr + is NULL, then This->Mode->CurrentAddress is used for the source HW MAC address. - @param DestAddr The destination HW MAC address. If HeaderSize is zero, then + @param DestAddr The destination HW MAC address. If HeaderSize is zero, then this parameter is ignored. - @param Protocol The type of header to build. If HeaderSize is zero, then this - parameter is ignored. See RFC 1700, section "Ether Types," + @param Protocol The type of header to build. If HeaderSize is zero, then this + parameter is ignored. See RFC 1700, section "Ether Types," for examples. @retval EFI_SUCCESS The packet was placed on the transmit queue. diff --git a/MdeModulePkg/Universal/Network/SnpDxe/WaitForPacket.c b/MdeModulePkg/Universal/Network/SnpDxe/WaitForPacket.c index 23d7455fd1..137f9ed94d 100644 --- a/MdeModulePkg/Universal/Network/SnpDxe/WaitForPacket.c +++ b/MdeModulePkg/Universal/Network/SnpDxe/WaitForPacket.c @@ -1,11 +1,11 @@ /** @file Event handler to check for available packet. -Copyright (c) 2004 - 2008, Intel Corporation. All rights reserved.
-This program and the accompanying materials are licensed -and made available under the terms and conditions of the BSD License which -accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php +Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials are licensed +and made available under the terms and conditions of the BSD License which +accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/ComponentName.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/ComponentName.c index bb3a39c5b1..f1227691ec 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/ComponentName.c +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/ComponentName.c @@ -1,7 +1,7 @@ /** @file UEFI Component Name(2) protocol implementation for Tcp4Dxe driver. -Copyright (c) 2005 - 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -234,10 +234,10 @@ TcpComponentNameGetDriverName ( @param Tcp4[in] A pointer to the EFI_TCP4_PROTOCOL. - + @retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully. @retval EFI_INVALID_PARAMETER The input parameter is invalid. - + **/ EFI_STATUS UpdateName ( @@ -279,7 +279,7 @@ UpdateName ( FreeUnicodeStringTable (gTcpControllerNameTable); gTcpControllerNameTable = NULL; } - + Status = AddUnicodeString2 ( "eng", gTcp4ComponentName.SupportedLanguages, @@ -290,7 +290,7 @@ UpdateName ( if (EFI_ERROR (Status)) { return Status; } - + return AddUnicodeString2 ( "en", gTcp4ComponentName2.SupportedLanguages, @@ -387,10 +387,10 @@ TcpComponentNameGetControllerName ( if (ChildHandle == NULL) { return EFI_UNSUPPORTED; } - - // - // Make sure this driver produced ChildHandle - // + + // + // Make sure this driver produced ChildHandle + // Status = EfiTestChildHandle ( ControllerHandle, ChildHandle, @@ -400,9 +400,9 @@ TcpComponentNameGetControllerName ( return Status; } - // + // // Retrieve an instance of a produced protocol from ChildHandle - // + // Status = gBS->OpenProtocol ( ChildHandle, &gEfiTcp4ProtocolGuid, diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/SockImpl.h b/MdeModulePkg/Universal/Network/Tcp4Dxe/SockImpl.h index bfd750a8ce..bea7479eb2 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/SockImpl.h +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/SockImpl.h @@ -1,7 +1,7 @@ /** @file Socket implementation header file. -Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -20,10 +20,10 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** Signal a event with the given status. - + @param Token The token's event is to be signaled. @param TokenStatus The status to be sent with the event. - + **/ #define SIGNAL_TOKEN(Token, TokenStatus) \ do { \ @@ -36,7 +36,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. Supporting function for both SockImpl and SockInterface. @param Event The Event this notify function registered to, ignored. - + **/ VOID EFIAPI diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/SockInterface.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/SockInterface.c index bca4b02009..6dbabc4e51 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/SockInterface.c +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/SockInterface.c @@ -1,7 +1,7 @@ /** @file Interface function of the Socket. -Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -22,7 +22,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @param List Pointer to the token list to be searched. @param Event The event to be checked. - @retval TRUE The specific Event exists in the List. + @retval TRUE The specific Event exists in the List. @retval FALSE The specific Event is not in the List. **/ @@ -58,7 +58,7 @@ SockTokenExistedInList ( @param Sock Pointer to the instance's socket. @param Event The event to be checked. - @retval TRUE The Event exists in related socket's lists. + @retval TRUE The Event exists in related socket's lists. @retval FALSE The Event is not in related socket's lists. **/ @@ -250,7 +250,7 @@ SockDestroyChild ( data ProtoData. @param SockInitData Inital data to setting the socket. - + @return Pointer to the newly created socket. If NULL, error condition occured. **/ diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Socket.h b/MdeModulePkg/Universal/Network/Tcp4Dxe/Socket.h index 9c2e6d0b65..7ff2fc565e 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Socket.h +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Socket.h @@ -1,7 +1,7 @@ /** @file Socket header file. -Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.
+Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -85,31 +85,31 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** Set socket SO_NO_MORE_DATA flag. - + @param Sock Pointer to the socket - + **/ #define SOCK_NO_MORE_DATA(Sock) ((Sock)->Flag |= SO_NO_MORE_DATA) /** Check whether the socket is unconfigured. - + @param Sock Pointer to the socket - + @retval True The socket is unconfigued @retval False The socket is not unconfigued - + **/ #define SOCK_IS_UNCONFIGURED(Sock) ((Sock)->ConfigureState == SO_UNCONFIGURED) /** Check whether the socket is configured. - + @param Sock Pointer to the socket - + @retval True The socket is configued @retval False The socket is not configued - + **/ #define SOCK_IS_CONFIGURED(Sock) \ (((Sock)->ConfigureState == SO_CONFIGURED_ACTIVE) || \ @@ -117,109 +117,109 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** Check whether the socket is configured to active mode. - + @param Sock Pointer to the socket - + @retval True The socket is configued to active mode @retval False The socket is not configued to active mode - + **/ #define SOCK_IS_CONFIGURED_ACTIVE(Sock) \ ((Sock)->ConfigureState == SO_CONFIGURED_ACTIVE) /** Check whether the socket is configured to passive mode. - + @param Sock Pointer to the socket - + @retval True The socket is configued to passive mode @retval False The socket is not configued to passive mode - + **/ #define SOCK_IS_CONNECTED_PASSIVE(Sock) \ ((Sock)->ConfigureState == SO_CONFIGURED_PASSIVE) /** Check whether the socket is mapped. - + @param Sock Pointer to the socket - + @retval True The socket is no mapping @retval False The socket is mapped - + **/ #define SOCK_IS_NO_MAPPING(Sock) \ ((Sock)->ConfigureState == SO_NO_MAPPING) /** Check whether the socket is closed. - + @param Sock Pointer to the socket - + @retval True The socket is closed @retval False The socket is not closed - + **/ #define SOCK_IS_CLOSED(Sock) ((Sock)->State == SO_CLOSED) /** Check whether the socket is listening. - + @param Sock Pointer to the socket - + @retval True The socket is listening @retval False The socket is not listening - + **/ #define SOCK_IS_LISTENING(Sock) ((Sock)->State == SO_LISTENING) /** Check whether the socket is connecting. - + @param Sock Pointer to the socket - + @retval True The socket is connecting @retval False The socket is not connecting - + **/ #define SOCK_IS_CONNECTING(Sock) ((Sock)->State == SO_CONNECTING) /** Check whether the socket has connected. - + @param Sock Pointer to the socket - + @retval True The socket has connected @retval False The socket has not connected - + **/ #define SOCK_IS_CONNECTED(Sock) ((Sock)->State == SO_CONNECTED) /** Check whether the socket is disconnecting. - + @param Sock Pointer to the socket - + @retval True The socket is disconnecting @retval False The socket is not disconnecting - + **/ #define SOCK_IS_DISCONNECTING(Sock) ((Sock)->State == SO_DISCONNECTING) /** Check whether the socket is no more data. - + @param Sock Pointer to the socket - + @retval True The socket is no more data @retval False The socket still has data - + **/ #define SOCK_IS_NO_MORE_DATA(Sock) (0 != ((Sock)->Flag & SO_NO_MORE_DATA)) /** Set the size of the receive buffer. - + @param Sock Pointer to the socket @param Size The size to set @@ -228,9 +228,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** Get the size of the receive buffer. - + @param Sock Pointer to the socket - + @return The receive buffer size **/ @@ -238,9 +238,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** Get the size of the receive data. - + @param Sock Pointer to the socket - + @return The received data size **/ @@ -248,7 +248,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** Set the size of the send buffer. - + @param Sock Pointer to the socket @param Size The size to set @@ -257,9 +257,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** Get the size of the send buffer. - + @param Sock Pointer to the socket - + @return The send buffer size **/ @@ -267,9 +267,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** Get the size of the send data. - + @param Sock Pointer to the socket - + @return The send data size **/ @@ -277,7 +277,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** Set the backlog value of the socket. - + @param Sock Pointer to the socket @param Value The value to set @@ -286,9 +286,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** Get the backlog value of the socket. - + @param Sock Pointer to the socket - + @return The backlog value **/ @@ -296,7 +296,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** Set the socket with error state. - + @param Sock Pointer to the socket @param Error The error state @@ -342,7 +342,7 @@ typedef struct _SOCK_IO_TOKEN { } SOCK_IO_TOKEN; /// -/// The request issued from socket layer to protocol layer. +/// The request issued from socket layer to protocol layer. /// #define SOCK_ATTACH 0 ///< Attach current socket to a new PCB #define SOCK_DETACH 1 ///< Detach current socket from the PCB @@ -379,15 +379,15 @@ typedef struct _SOCK_BUFFER { /** The handler of protocol for request from socket. - + @param Socket The socket issuing the request to protocol @param Request The request issued by socket @param RequestData The request related data - + @retval EFI_SUCCESS The socket request is completed successfully. @retval other The error status returned by the corresponding TCP layer function. - + **/ typedef EFI_STATUS @@ -396,8 +396,8 @@ EFI_STATUS IN UINT8 Request, IN VOID *RequestData ); - - + + // // Socket provided oprerations for low layer protocol // @@ -420,15 +420,15 @@ SockSetState ( ); /** - Called by the low layer protocol to indicate the socket a connection is - established. - - This function just changes the socket's state to SO_CONNECTED + Called by the low layer protocol to indicate the socket a connection is + established. + + This function just changes the socket's state to SO_CONNECTED and signals the token used for connection establishment. @param Sock Pointer to the socket associated with the established connection. - + **/ VOID SockConnEstablished ( @@ -437,13 +437,13 @@ SockConnEstablished ( /** Called by the low layer protocol to indicate the connection is closed. - - This function flushes the socket, sets the state to SO_CLOSED and signals + + This function flushes the socket, sets the state to SO_CLOSED and signals the close token. @param Sock Pointer to the socket associated with the closed connection. - + **/ VOID SockConnClosed ( @@ -452,8 +452,8 @@ SockConnClosed ( /** Called by low layer protocol to indicate that some data is sent or processed. - - This function trims the sent data in the socket send buffer, signals the data + + This function trims the sent data in the socket send buffer, signals the data token if proper. @param Sock Pointer to the socket. @@ -490,7 +490,7 @@ SockGetDataToSend ( /** Called by the low layer protocol to indicate that there will be no more data from the communication peer. - + This function set the socket's state to SO_NO_MORE_DATA and signal all queued IO tokens with the error status EFI_CONNECTION_FIN. @@ -504,8 +504,8 @@ SockNoMoreData ( /** Called by the low layer protocol to deliver received data to socket layer. - - This function will append the data to the socket receive buffer, set ther + + This function will append the data to the socket receive buffer, set ther urgent data length and then check if any receive token can be signaled. @param Sock Pointer to the socket. @@ -573,9 +573,9 @@ EFI_STATUS IN SOCKET *This, IN VOID *Context ); - + /// -/// Proto type of the destroy callback +/// Proto type of the destroy callback /// typedef VOID @@ -618,7 +618,7 @@ typedef struct _SOCK_INIT_DATA { /// /// The union type of TCP and UDP protocol. -/// +/// typedef union _NET_PROTOCOL { EFI_TCP4_PROTOCOL TcpProtocol; ///< Tcp protocol EFI_UDP4_PROTOCOL UdpProtocol; ///< Udp protocol @@ -637,7 +637,7 @@ struct _SOCKET { EFI_HANDLE DriverBinding; ///< Socket's driver binding protocol EFI_DEVICE_PATH_PROTOCOL *ParentDevicePath; EFI_DEVICE_PATH_PROTOCOL *DevicePath; - LIST_ENTRY Link; + LIST_ENTRY Link; UINT8 ConfigureState; SOCK_TYPE Type; UINT8 State; @@ -655,7 +655,7 @@ struct _SOCKET { UINT32 ConnCnt; ///< the current count of connections to it SOCKET *Parent; ///< listening parent that accept the connection LIST_ENTRY ConnectionList; ///< the connections maintained by this socket - + // // The queue to buffer application's asynchronous token // @@ -714,7 +714,7 @@ typedef struct _TCP_RSV_DATA { data ProtoData. @param SockInitData Inital data to setting the socket. - + @return Pointer to the newly created socket. If NULL, error condition occured. **/ @@ -973,7 +973,7 @@ SockBufFirst ( @param SockEntry Pointer to the buffer block prior to the required one. - @return Pointer to the buffer block next to SockEntry. NULL if SockEntry is + @return Pointer to the buffer block next to SockEntry. NULL if SockEntry is the tail or head entry. **/ diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c index 702cae8d65..a0f97d6031 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dispatcher.c @@ -2,7 +2,7 @@ Tcp request dispatcher implementation. (C) Copyright 2014 Hewlett-Packard Development Company, L.P.
-Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -332,7 +332,7 @@ Tcp4DetachPcb ( ASSERT (Tcb != NULL); Tcp4FlushPcb (Tcb); - + IpIoRemoveIp (ProtoData->TcpService->IpIo, Tcb->IpInfo); FreePool (Tcb); diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.c index 7d84767f5e..2ff8eee869 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.c +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.c @@ -1,7 +1,7 @@ /** @file Tcp driver function. -Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -116,7 +116,7 @@ Tcp4CreateTimer ( /** Stop and destroy the heartbeat timer for TCP driver. - + **/ VOID Tcp4DestroyTimer ( @@ -138,7 +138,7 @@ Tcp4DestroyTimer ( /** Callback function which provided by user to remove one node in NetDestroyLinkList process. - + @param[in] Entry The entry to be removed. @param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList. @@ -221,32 +221,32 @@ Tcp4DriverEntryPoint ( /** Tests to see if this driver supports a given controller. - - If a child device is provided, it further tests to see if this driver supports + + If a child device is provided, it further tests to see if this driver supports creating a handle for the specified child device. @param This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. - @param ControllerHandle The handle of the controller to test. This handle - must support a protocol interface that supplies + @param ControllerHandle The handle of the controller to test. This handle + must support a protocol interface that supplies an I/O abstraction to the driver. - @param RemainingDevicePath A pointer to the remaining portion of a device path. + @param RemainingDevicePath A pointer to the remaining portion of a device path. This parameter is ignored by device drivers, and is optional for bus drivers. @retval EFI_SUCCESS The device specified by ControllerHandle and - RemainingDevicePath is supported by the driver + RemainingDevicePath is supported by the driver specified by This. @retval EFI_ALREADY_STARTED The device specified by ControllerHandle and - RemainingDevicePath is already being managed by + RemainingDevicePath is already being managed by the driver specified by This. @retval EFI_ACCESS_DENIED The device specified by ControllerHandle and - RemainingDevicePath is already being managed by a - different driver or an application that requires + RemainingDevicePath is already being managed by a + different driver or an application that requires exclusive access. @retval EFI_UNSUPPORTED The device specified by ControllerHandle and - RemainingDevicePath is not supported by the driver + RemainingDevicePath is not supported by the driver specified by This. - + **/ EFI_STATUS EFIAPI @@ -290,31 +290,31 @@ Tcp4DriverBindingSupported ( /** - Start this driver on ControllerHandle. - - The Start() function is designed to be invoked from the EFI boot service - ConnectController(). As a result, much of the error checking on the parameters - to Start() has been moved into this common boot service. It is legal to call - Start() from other locations, but the following calling restrictions must be + Start this driver on ControllerHandle. + + The Start() function is designed to be invoked from the EFI boot service + ConnectController(). As a result, much of the error checking on the parameters + to Start() has been moved into this common boot service. It is legal to call + Start() from other locations, but the following calling restrictions must be followed or the system behavior will not be deterministic. 1. ControllerHandle must be a valid EFI_HANDLE. - 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally + 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned EFI_DEVICE_PATH_PROTOCOL. - 3. Prior to calling Start(), the Supported() function for the driver specified - by This must have been called with the same calling parameters, and Supported() + 3. Prior to calling Start(), the Supported() function for the driver specified + by This must have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS. @param This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. - @param ControllerHandle The handle of the controller to start. This handle - must support a protocol interface that supplies + @param ControllerHandle The handle of the controller to start. This handle + must support a protocol interface that supplies an I/O abstraction to the driver. - @param RemainingDevicePath A pointer to the remaining portion of a device path. - This parameter is ignored by device drivers, and is + @param RemainingDevicePath A pointer to the remaining portion of a device path. + This parameter is ignored by device drivers, and is optional for bus drivers. @retval EFI_SUCCESS The device was started. @retval EFI_ALREADY_STARTED The device could not be started due to a device error. - @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack + @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources. **/ @@ -435,25 +435,25 @@ ON_ERROR: /** Stop this driver on ControllerHandle. - - The Stop() function is designed to be invoked from the EFI boot service - DisconnectController(). As a result, much of the error checking on the parameters - to Stop() has been moved into this common boot service. It is legal to call Stop() - from other locations, but the following calling restrictions must be followed + + The Stop() function is designed to be invoked from the EFI boot service + DisconnectController(). As a result, much of the error checking on the parameters + to Stop() has been moved into this common boot service. It is legal to call Stop() + from other locations, but the following calling restrictions must be followed or the system behavior will not be deterministic. - 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call + 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this same driver's Start() function. 2. The first NumberOfChildren handles of ChildHandleBuffer must all be a valid - EFI_HANDLE. In addition, all of these handles must have been created in this - driver's Start() function, and the Start() function must have called OpenProtocol() + EFI_HANDLE. In addition, all of these handles must have been created in this + driver's Start() function, and the Start() function must have called OpenProtocol() on ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER. - + @param This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. - @param ControllerHandle A handle to the device being stopped. The handle must - support a bus specific I/O protocol for the driver + @param ControllerHandle A handle to the device being stopped. The handle must + support a bus specific I/O protocol for the driver to use to stop the device. @param NumberOfChildren The number of child device handles in ChildHandleBuffer. - @param ChildHandleBuffer An array of child handles to be freed. May be NULL if + @param ChildHandleBuffer An array of child handles to be freed. May be NULL if NumberOfChildren is 0. @retval EFI_SUCCESS The device was stopped. @@ -505,7 +505,7 @@ Tcp4DriverBindingStop ( TcpServiceData = TCP4_FROM_THIS (ServiceBinding); if (NumberOfChildren != 0) { - List = &TcpServiceData->SocketList; + List = &TcpServiceData->SocketList; Context.ServiceBinding = ServiceBinding; Context.NumberOfChildren = NumberOfChildren; Context.ChildHandleBuffer = ChildHandleBuffer; @@ -541,7 +541,7 @@ Tcp4DriverBindingStop ( FreeUnicodeStringTable (gTcpControllerNameTable); gTcpControllerNameTable = NULL; } - + // // Release the TCP service data // @@ -554,15 +554,15 @@ Tcp4DriverBindingStop ( } /** - Open Ip4 and device path protocols for a created socket, and insert it in + Open Ip4 and device path protocols for a created socket, and insert it in socket list. - + @param This Pointer to the socket just created @param Context Context of the socket - + @retval EFI_SUCCESS This protocol is installed successfully. @retval other Some error occured. - + **/ EFI_STATUS Tcp4CreateSocketCallback ( @@ -620,11 +620,11 @@ Tcp4CreateSocketCallback ( } /** - Close Ip4 and device path protocols for a socket, and remove it from socket list. - + Close Ip4 and device path protocols for a socket, and remove it from socket list. + @param This Pointer to the socket to be removed @param Context Context of the socket - + **/ VOID Tcp4DestroySocketCallback ( @@ -654,15 +654,15 @@ Tcp4DestroySocketCallback ( /** Creates a child handle and installs a protocol. - - The CreateChild() function installs a protocol on ChildHandle. If ChildHandle - is a pointer to NULL, then a new handle is created and returned in ChildHandle. - If ChildHandle is not a pointer to NULL, then the protocol installs on the existing + + The CreateChild() function installs a protocol on ChildHandle. If ChildHandle + is a pointer to NULL, then a new handle is created and returned in ChildHandle. + If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle. @param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance. - @param ChildHandle Pointer to the handle of the child to create. If it is NULL, then - a new handle is created. If it is a pointer to an existing UEFI + @param ChildHandle Pointer to the handle of the child to create. If it is NULL, then + a new handle is created. If it is a pointer to an existing UEFI handle, then the protocol is added to the existing UEFI handle. @retval EFI_SUCCES The protocol was added to ChildHandle. @@ -722,22 +722,22 @@ Tcp4ServiceBindingCreateChild ( /** Destroys a child handle with a protocol installed on it. - - The DestroyChild() function does the opposite of CreateChild(). It removes a protocol - that was installed by CreateChild() from ChildHandle. If the removed protocol is the + + The DestroyChild() function does the opposite of CreateChild(). It removes a protocol + that was installed by CreateChild() from ChildHandle. If the removed protocol is the last protocol on ChildHandle, then ChildHandle is destroyed. @param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance. @param ChildHandle Handle of the child to destroy @retval EFI_SUCCES The protocol was removed from ChildHandle. - @retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is + @retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed. @retval EFI_INVALID_PARAMETER Child handle is NULL. @retval EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle because its services are being used. @retval other The child handle was not destroyed. - + **/ EFI_STATUS EFIAPI diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.h b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.h index edaa1a4a81..368f49c4dd 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.h +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Driver.h @@ -1,7 +1,7 @@ /** @file Tcp driver function header. -Copyright (c) 2005 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -30,7 +30,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. Tcp4ServiceBinding, \ TCP4_DRIVER_SIGNATURE \ ) - + /// /// TCP heartbeat tick timer. /// @@ -148,32 +148,32 @@ Tcp4DriverEntryPoint ( /** Tests to see if this driver supports a given controller. - - If a child device is provided, it further tests to see if this driver supports + + If a child device is provided, it further tests to see if this driver supports creating a handle for the specified child device. @param This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. - @param ControllerHandle The handle of the controller to test. This handle - must support a protocol interface that supplies + @param ControllerHandle The handle of the controller to test. This handle + must support a protocol interface that supplies an I/O abstraction to the driver. - @param RemainingDevicePath A pointer to the remaining portion of a device path. + @param RemainingDevicePath A pointer to the remaining portion of a device path. This parameter is ignored by device drivers, and is optional for bus drivers. @retval EFI_SUCCESS The device specified by ControllerHandle and - RemainingDevicePath is supported by the driver + RemainingDevicePath is supported by the driver specified by This. @retval EFI_ALREADY_STARTED The device specified by ControllerHandle and - RemainingDevicePath is already being managed by + RemainingDevicePath is already being managed by the driver specified by This. @retval EFI_ACCESS_DENIED The device specified by ControllerHandle and - RemainingDevicePath is already being managed by a - different driver or an application that requires + RemainingDevicePath is already being managed by a + different driver or an application that requires exclusive access. @retval EFI_UNSUPPORTED The device specified by ControllerHandle and - RemainingDevicePath is not supported by the driver + RemainingDevicePath is not supported by the driver specified by This. - + **/ EFI_STATUS EFIAPI @@ -184,31 +184,31 @@ Tcp4DriverBindingSupported ( ); /** - Start this driver on ControllerHandle. - - The Start() function is designed to be invoked from the EFI boot service - ConnectController(). As a result, much of the error checking on the parameters - to Start() has been moved into this common boot service. It is legal to call - Start() from other locations, but the following calling restrictions must be + Start this driver on ControllerHandle. + + The Start() function is designed to be invoked from the EFI boot service + ConnectController(). As a result, much of the error checking on the parameters + to Start() has been moved into this common boot service. It is legal to call + Start() from other locations, but the following calling restrictions must be followed or the system behavior will not be deterministic. 1. ControllerHandle must be a valid EFI_HANDLE. - 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally + 2. If RemainingDevicePath is not NULL, then it must be a pointer to a naturally aligned EFI_DEVICE_PATH_PROTOCOL. - 3. Prior to calling Start(), the Supported() function for the driver specified - by This must have been called with the same calling parameters, and Supported() + 3. Prior to calling Start(), the Supported() function for the driver specified + by This must have been called with the same calling parameters, and Supported() must have returned EFI_SUCCESS. @param This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. - @param ControllerHandle The handle of the controller to start. This handle - must support a protocol interface that supplies + @param ControllerHandle The handle of the controller to start. This handle + must support a protocol interface that supplies an I/O abstraction to the driver. - @param RemainingDevicePath A pointer to the remaining portion of a device path. - This parameter is ignored by device drivers, and is + @param RemainingDevicePath A pointer to the remaining portion of a device path. + This parameter is ignored by device drivers, and is optional for bus drivers. @retval EFI_SUCCESS The device was started. @retval EFI_ALREADY_STARTED The device could not be started due to a device error. - @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack + @retval EFI_OUT_OF_RESOURCES The request could not be completed due to a lack of resources. **/ @@ -222,25 +222,25 @@ Tcp4DriverBindingStart ( /** Stop this driver on ControllerHandle. - - The Stop() function is designed to be invoked from the EFI boot service - DisconnectController(). As a result, much of the error checking on the parameters - to Stop() has been moved into this common boot service. It is legal to call Stop() - from other locations, but the following calling restrictions must be followed + + The Stop() function is designed to be invoked from the EFI boot service + DisconnectController(). As a result, much of the error checking on the parameters + to Stop() has been moved into this common boot service. It is legal to call Stop() + from other locations, but the following calling restrictions must be followed or the system behavior will not be deterministic. - 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call + 1. ControllerHandle must be a valid EFI_HANDLE that was used on a previous call to this same driver's Start() function. 2. The first NumberOfChildren handles of ChildHandleBuffer must all be a valid - EFI_HANDLE. In addition, all of these handles must have been created in this - driver's Start() function, and the Start() function must have called OpenProtocol() + EFI_HANDLE. In addition, all of these handles must have been created in this + driver's Start() function, and the Start() function must have called OpenProtocol() on ControllerHandle with an Attribute of EFI_OPEN_PROTOCOL_BY_CHILD_CONTROLLER. - + @param This A pointer to the EFI_DRIVER_BINDING_PROTOCOL instance. - @param ControllerHandle A handle to the device being stopped. The handle must - support a bus specific I/O protocol for the driver + @param ControllerHandle A handle to the device being stopped. The handle must + support a bus specific I/O protocol for the driver to use to stop the device. @param NumberOfChildren The number of child device handles in ChildHandleBuffer. - @param ChildHandleBuffer An array of child handles to be freed. May be NULL if + @param ChildHandleBuffer An array of child handles to be freed. May be NULL if NumberOfChildren is 0. @retval EFI_SUCCESS The device was stopped. @@ -257,15 +257,15 @@ Tcp4DriverBindingStop ( ); /** - Open Ip4 and device path protocols for a created socket, and insert it in + Open Ip4 and device path protocols for a created socket, and insert it in socket list. - + @param This Pointer to the socket just created @param Context Context of the socket - + @retval EFI_SUCCESS This protocol is installed successfully. @retval other Some error occured. - + **/ EFI_STATUS Tcp4CreateSocketCallback ( @@ -274,11 +274,11 @@ Tcp4CreateSocketCallback ( ); /** - Close Ip4 and device path protocols for a socket, and remove it from socket list. - + Close Ip4 and device path protocols for a socket, and remove it from socket list. + @param This Pointer to the socket to be removed @param Context Context of the socket - + **/ VOID Tcp4DestroySocketCallback ( @@ -288,15 +288,15 @@ Tcp4DestroySocketCallback ( /** Creates a child handle and installs a protocol. - - The CreateChild() function installs a protocol on ChildHandle. If ChildHandle - is a pointer to NULL, then a new handle is created and returned in ChildHandle. - If ChildHandle is not a pointer to NULL, then the protocol installs on the existing + + The CreateChild() function installs a protocol on ChildHandle. If ChildHandle + is a pointer to NULL, then a new handle is created and returned in ChildHandle. + If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle. @param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance. - @param ChildHandle Pointer to the handle of the child to create. If it is NULL, then - a new handle is created. If it is a pointer to an existing UEFI + @param ChildHandle Pointer to the handle of the child to create. If it is NULL, then + a new handle is created. If it is a pointer to an existing UEFI handle, then the protocol is added to the existing UEFI handle. @retval EFI_SUCCES The protocol was added to ChildHandle. @@ -315,22 +315,22 @@ Tcp4ServiceBindingCreateChild ( /** Destroys a child handle with a protocol installed on it. - - The DestroyChild() function does the opposite of CreateChild(). It removes a protocol - that was installed by CreateChild() from ChildHandle. If the removed protocol is the + + The DestroyChild() function does the opposite of CreateChild(). It removes a protocol + that was installed by CreateChild() from ChildHandle. If the removed protocol is the last protocol on ChildHandle, then ChildHandle is destroyed. @param This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance. @param ChildHandle Handle of the child to destroy @retval EFI_SUCCES The protocol was removed from ChildHandle. - @retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is + @retval EFI_UNSUPPORTED ChildHandle does not support the protocol that is being removed. @retval EFI_INVALID_PARAMETER Child handle is NULL. @retval EFI_ACCESS_DENIED The protocol could not be removed from the ChildHandle because its services are being used. @retval other The child handle was not destroyed. - + **/ EFI_STATUS EFIAPI diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf index ba3c377b5f..5021cbc4b8 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.inf @@ -4,7 +4,7 @@ # This module produces EFI TCPv4(Transmission Control Protocol version 4) Protocol # upon EFI IPv4 Protocol, to provide basic TCPv4 I/O services. # -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at @@ -30,7 +30,7 @@ # # VALID_ARCHITECTURES = IA32 X64 IPF EBC # -# DRIVER_BINDING = mTcp4DriverBinding +# DRIVER_BINDING = mTcp4DriverBinding # COMPONENT_NAME = gTcp4ComponentName # COMPONENT_NAME2 = gTcp4ComponentName2 # diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.uni b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.uni index b6d30d9851..1514a39177 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.uni +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Dxe.uni @@ -4,13 +4,13 @@ // This module produces EFI TCPv4(Transmission Control Protocol version 4) Protocol // upon EFI IPv4 Protocol, to provide basic TCPv4 I/O services. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4DxeExtra.uni b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4DxeExtra.uni index a3e36b362c..0e6d2f2896 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4DxeExtra.uni +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4DxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // Tcp4Dxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "TCP v4 DXE Driver" diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Input.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Input.c index 72955c6c5e..f48efdac7c 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Input.c +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Input.c @@ -1,7 +1,7 @@ /** @file TCP input process routines. -Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -704,7 +704,7 @@ TcpInput ( TCP_SEQNO Right; TCP_SEQNO Urg; INT32 Usable; - + NET_CHECK_SIGNATURE (Nbuf, NET_BUF_SIGNATURE); Parent = NULL; @@ -717,7 +717,7 @@ TcpInput ( DEBUG ((EFI_D_NET, "TcpInput: received a malformed packet\n")); goto DISCARD; } - + Len = Nbuf->TotalSize - (Head->HeadLen << 2); if ((Head->HeadLen < 5) || (Len < 0) || @@ -1315,7 +1315,7 @@ StepSix: TcpSetKeepaliveTimer (Tcb); if (TCP_FLG_ON (Seg->Flag, TCP_FLG_URG) && - !TCP_FIN_RCVD (Tcb->State)) + !TCP_FIN_RCVD (Tcb->State)) { DEBUG ((EFI_D_NET, "TcpInput: received urgent data " diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Main.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Main.c index 2679f1b8a0..d8fc68c0a9 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Main.c +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Main.c @@ -1,7 +1,7 @@ /** @file Implementation of TCP4 protocol services. -Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -53,10 +53,10 @@ Tcp4ChkDataBuf ( /** Get the current operational status. - - The GetModeData() function copies the current operational settings of this - EFI TCPv4 Protocol instance into user-supplied buffers. This function can - also be used to retrieve the operational setting of underlying drivers + + The GetModeData() function copies the current operational settings of this + EFI TCPv4 Protocol instance into user-supplied buffers. This function can + also be used to retrieve the operational setting of underlying drivers such as IPv4, MNP, or SNP. @param This Pointer to the EFI_TCP4_PROTOCOL instance. @@ -64,7 +64,7 @@ Tcp4ChkDataBuf ( state. @param Tcp4ConfigData Pointer to the buffer to receive the current TCP configuration. - @param Ip4ModeData Pointer to the buffer to receive the current IPv4 + @param Ip4ModeData Pointer to the buffer to receive the current IPv4 configuration data used by the TCPv4 instance. @param MnpConfigData Pointer to the buffer to receive the current MNP configuration data indirectly used by the TCPv4 @@ -112,21 +112,21 @@ Tcp4GetModeData ( /** Initialize or brutally reset the operational parameters for this EFI TCPv4 instance. - + The Configure() function does the following: - * Initialize this EFI TCPv4 instance, i.e., initialize the communication end + * Initialize this EFI TCPv4 instance, i.e., initialize the communication end setting, specify active open or passive open for an instance. - * Reset this TCPv4 instance brutally, i.e., cancel all pending asynchronous - tokens, flush transmission and receiving buffer directly without informing + * Reset this TCPv4 instance brutally, i.e., cancel all pending asynchronous + tokens, flush transmission and receiving buffer directly without informing the communication peer. - No other TCPv4 Protocol operation can be executed by this instance - until it is configured properly. For an active TCP4 instance, after a proper - configuration it may call Connect() to initiates the three-way handshake. - For a passive TCP4 instance, its state will transit to Tcp4StateListen after - configuration, and Accept() may be called to listen the incoming TCP connection - request. If TcpConfigData is set to NULL, the instance is reset. Resetting - process will be done brutally, the state machine will be set to Tcp4StateClosed - directly, the receive queue and transmit queue will be flushed, and no traffic is + No other TCPv4 Protocol operation can be executed by this instance + until it is configured properly. For an active TCP4 instance, after a proper + configuration it may call Connect() to initiates the three-way handshake. + For a passive TCP4 instance, its state will transit to Tcp4StateListen after + configuration, and Accept() may be called to listen the incoming TCP connection + request. If TcpConfigData is set to NULL, the instance is reset. Resetting + process will be done brutally, the state machine will be set to Tcp4StateClosed + directly, the receive queue and transmit queue will be flushed, and no traffic is allowed through this instance. @param This Pointer to the EFI_TCP4_PROTOCOL instance. @@ -183,7 +183,7 @@ Tcp4Configure ( CopyMem (&Ip, &TcpConfigData->AccessPoint.StationAddress, sizeof (IP4_ADDR)); CopyMem (&SubnetMask, &TcpConfigData->AccessPoint.SubnetMask, sizeof (IP4_ADDR)); - if (!IP4_IS_VALID_NETMASK (NTOHL (SubnetMask)) || + if (!IP4_IS_VALID_NETMASK (NTOHL (SubnetMask)) || (SubnetMask != 0 && !NetIp4IsUnicast (NTOHL (Ip), NTOHL (SubnetMask)))) { return EFI_INVALID_PARAMETER; } @@ -214,35 +214,35 @@ Tcp4Configure ( /** Add or delete routing entries. - + The Routes() function adds or deletes a route from the instance's routing table. - The most specific route is selected by comparing the SubnetAddress with the + The most specific route is selected by comparing the SubnetAddress with the destination IP address's arithmetical AND to the SubnetMask. - The default route is added with both SubnetAddress and SubnetMask set to 0.0.0.0. + The default route is added with both SubnetAddress and SubnetMask set to 0.0.0.0. The default route matches all destination IP addresses if there is no more specific route. - Direct route is added with GatewayAddress set to 0.0.0.0. Packets are sent to - the destination host if its address can be found in the Address Resolution Protocol (ARP) - cache or it is on the local subnet. If the instance is configured to use default + Direct route is added with GatewayAddress set to 0.0.0.0. Packets are sent to + the destination host if its address can be found in the Address Resolution Protocol (ARP) + cache or it is on the local subnet. If the instance is configured to use default address, a direct route to the local network will be added automatically. - Each TCP instance has its own independent routing table. Instance that uses the - default IP address will have a copy of the EFI_IP4_CONFIG_PROTOCOL's routing table. - The copy will be updated automatically whenever the IP driver reconfigures its - instance. As a result, the previous modification to the instance's local copy - will be lost. The priority of checking the route table is specific with IP + Each TCP instance has its own independent routing table. Instance that uses the + default IP address will have a copy of the EFI_IP4_CONFIG_PROTOCOL's routing table. + The copy will be updated automatically whenever the IP driver reconfigures its + instance. As a result, the previous modification to the instance's local copy + will be lost. The priority of checking the route table is specific with IP implementation and every IP implementation must comply with RFC 1122. @param This Pointer to the EFI_TCP4_PROTOCOL instance. @param DeleteRoute If TRUE, delete the specified route from routing table; if FALSE, add the specified route to routing table. - DestinationAddress and SubnetMask are used as + DestinationAddress and SubnetMask are used as the keywords to search route entry. @param SubnetAddress The destination network. @param SubnetMask The subnet mask for the destination network. - @param GatewayAddress The gateway address for this route. - It must be on the same subnet with the station + @param GatewayAddress The gateway address for this route. + It must be on the same subnet with the station address unless a direct route is specified. - + @retval EFI_SUCCESS The operation completed successfully. @retval EFI_NOT_STARTED The EFI_TCP4_PROTOCOL instance has not been configured. @@ -288,21 +288,21 @@ Tcp4Routes ( /** Initiate a nonblocking TCP connection request for an active TCP instance. - The Connect() function will initiate an active open to the remote peer configured - in current TCP instance if it is configured active. If the connection succeeds - or fails due to any error, the ConnectionToken->CompletionToken.Event will be - signaled and ConnectionToken->CompletionToken.Status will be updated accordingly. - This function can only be called for the TCP instance in Tcp4StateClosed state. - The instance will transfer into Tcp4StateSynSent if the function returns EFI_SUCCESS. - If TCP three way handshake succeeds, its state will become Tcp4StateEstablished, + The Connect() function will initiate an active open to the remote peer configured + in current TCP instance if it is configured active. If the connection succeeds + or fails due to any error, the ConnectionToken->CompletionToken.Event will be + signaled and ConnectionToken->CompletionToken.Status will be updated accordingly. + This function can only be called for the TCP instance in Tcp4StateClosed state. + The instance will transfer into Tcp4StateSynSent if the function returns EFI_SUCCESS. + If TCP three way handshake succeeds, its state will become Tcp4StateEstablished, otherwise, the state will return to Tcp4StateClosed. - + @param This Pointer to the EFI_TCP4_PROTOCOL instance @param ConnectionToken Pointer to the connection token to return when the TCP three way handshake finishes. - @retval EFI_SUCCESS The connection request is successfully initiated - and the state of this TCPv4 instance has + @retval EFI_SUCCESS The connection request is successfully initiated + and the state of this TCPv4 instance has been changed to Tcp4StateSynSent. @retval EFI_NOT_STARTED This EFI_TCP4_PROTOCOL instance hasn't been configured. @@ -338,14 +338,14 @@ Tcp4Connect ( /** Listen on the passive instance to accept an incoming connection request. - The Accept() function initiates an asynchronous accept request to wait for an - incoming connection on the passive TCP instance. If a remote peer successfully - establishes a connection with this instance, a new TCP instance will be created - and its handle will be returned in ListenToken->NewChildHandle. The newly created - instance is configured by inheriting the passive instance's configuration and is + The Accept() function initiates an asynchronous accept request to wait for an + incoming connection on the passive TCP instance. If a remote peer successfully + establishes a connection with this instance, a new TCP instance will be created + and its handle will be returned in ListenToken->NewChildHandle. The newly created + instance is configured by inheriting the passive instance's configuration and is ready for use upon return. The instance is in the Tcp4StateEstablished state. - The ListenToken->CompletionToken.Event will be signaled when a new connection - is accepted, user aborts the listen or connection is reset. This function only + The ListenToken->CompletionToken.Event will be signaled when a new connection + is accepted, user aborts the listen or connection is reset. This function only can be called when current TCP instance is in Tcp4StateListen state. @param This Pointer to the EFI_TCP4_PROTOCOL instance @@ -389,8 +389,8 @@ Tcp4Accept ( /** Queues outgoing data into the transmit queue. - The Transmit() function queues a sending request to this TCPv4 instance along - with the user data. The status of the token is updated and the event in the token + The Transmit() function queues a sending request to this TCPv4 instance along + with the user data. The status of the token is updated and the event in the token will be signaled once the data is sent out or some error occurs. @param This Pointer to the EFI_TCP4_PROTOCOL instance @@ -406,11 +406,11 @@ Tcp4Accept ( @retval EFI_ACCESS_DENIED One or more of the following conditions is TRUE: * A transmit completion token with the same Token-> CompletionToken.Event was already in the - transmission queue. - * The current instance is in Tcp4StateClosed state - * The current instance is a passive one and - it is in Tcp4StateListen state. - * User has called Close() to disconnect this + transmission queue. + * The current instance is in Tcp4StateClosed state + * The current instance is a passive one and + it is in Tcp4StateListen state. + * User has called Close() to disconnect this connection. @retval EFI_NOT_READY The completion token could not be queued because the transmit queue is full. @@ -459,16 +459,16 @@ Tcp4Transmit ( /** Place an asynchronous receive request into the receiving queue. - The Receive() function places a completion token into the receive packet queue. - This function is always asynchronous. The caller must allocate the - Token->CompletionToken.Event and the FragmentBuffer used to receive data. He also - must fill the DataLength which represents the whole length of all FragmentBuffer. - When the receive operation completes, the EFI TCPv4 Protocol driver updates the - Token->CompletionToken.Status and Token->Packet.RxData fields and the - Token->CompletionToken.Event is signaled. If got data the data and its length - will be copy into the FragmentTable, in the same time the full length of received - data will be recorded in the DataLength fields. Providing a proper notification - function and context for the event will enable the user to receive the notification + The Receive() function places a completion token into the receive packet queue. + This function is always asynchronous. The caller must allocate the + Token->CompletionToken.Event and the FragmentBuffer used to receive data. He also + must fill the DataLength which represents the whole length of all FragmentBuffer. + When the receive operation completes, the EFI TCPv4 Protocol driver updates the + Token->CompletionToken.Status and Token->Packet.RxData fields and the + Token->CompletionToken.Event is signaled. If got data the data and its length + will be copy into the FragmentTable, in the same time the full length of received + data will be recorded in the DataLength fields. Providing a proper notification + function and context for the event will enable the user to receive the notification and receiving status. That notification function is guaranteed to not be re-entered. @param This Pointer to the EFI_TCP4_PROTOCOL instance. @@ -484,16 +484,16 @@ Tcp4Transmit ( @retval EFI_OUT_OF_RESOURCES The receive completion token could not be queued due to a lack of system resources. @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. - The EFI TCPv4 Protocol instance has been reset + The EFI TCPv4 Protocol instance has been reset to startup defaults. @retval EFI_ACCESS_DENIED One or more of the following conditions is TRUE: * A receive completion token with the same - Token->CompletionToken.Event was already in - the receive queue. - * The current instance is in Tcp4StateClosed state. - * The current instance is a passive one and it - is in Tcp4StateListen state. - * User has called Close() to disconnect this + Token->CompletionToken.Event was already in + the receive queue. + * The current instance is in Tcp4StateClosed state. + * The current instance is a passive one and it + is in Tcp4StateListen state. + * User has called Close() to disconnect this connection. @retval EFI_CONNECTION_FIN The communication peer has closed the connection and there is no any buffered data in the receive @@ -541,13 +541,13 @@ Tcp4Receive ( /** Disconnecting a TCP connection gracefully or reset a TCP connection. - Initiate an asynchronous close token to TCP driver. After Close() is called, - any buffered transmission data will be sent by TCP driver and the current - instance will have a graceful close working flow described as RFC 793 if - AbortOnClose is set to FALSE, otherwise, a rest packet will be sent by TCP - driver to fast disconnect this connection. When the close operation completes - successfully the TCP instance is in Tcp4StateClosed state, all pending - asynchronous operation is signaled and any buffers used for TCP network traffic + Initiate an asynchronous close token to TCP driver. After Close() is called, + any buffered transmission data will be sent by TCP driver and the current + instance will have a graceful close working flow described as RFC 793 if + AbortOnClose is set to FALSE, otherwise, a rest packet will be sent by TCP + driver to fast disconnect this connection. When the close operation completes + successfully the TCP instance is in Tcp4StateClosed state, all pending + asynchronous operation is signaled and any buffers used for TCP network traffic is flushed. @param This Pointer to the EFI_TCP4_PROTOCOL instance. @@ -557,7 +557,7 @@ Tcp4Receive ( @retval EFI_SUCCESS The operation completed successfully. @retval EFI_NOT_STARTED The EFI_TCP4_PROTOCOL instance hasn't been configured. - @retval EFI_ACCESS_DENIED One or more of the following are TRUE: + @retval EFI_ACCESS_DENIED One or more of the following are TRUE: * Configure() has been called with TcpConfigData set to NULL and this function has not returned. * Previous Close() call on this instance has not @@ -593,33 +593,33 @@ Tcp4Close ( /** Abort an asynchronous connection, listen, transmission or receive request. - The Cancel() function aborts a pending connection, listen, transmit or receive - request. If Token is not NULL and the token is in the connection, listen, - transmission or receive queue when it is being cancelled, its Token->Status - will be set to EFI_ABORTED and then Token->Event will be signaled. If the token - is not in one of the queues, which usually means that the asynchronous operation - has completed, EFI_NOT_FOUND is returned. If Token is NULL all asynchronous token + The Cancel() function aborts a pending connection, listen, transmit or receive + request. If Token is not NULL and the token is in the connection, listen, + transmission or receive queue when it is being cancelled, its Token->Status + will be set to EFI_ABORTED and then Token->Event will be signaled. If the token + is not in one of the queues, which usually means that the asynchronous operation + has completed, EFI_NOT_FOUND is returned. If Token is NULL all asynchronous token issued by Connect(), Accept(), Transmit() and Receive()will be aborted. NOTE: It has not been implemented currently. - + @param This Pointer to the EFI_TCP4_PROTOCOL instance. @param Token Pointer to a token that has been issued by Connect(), Accept(), Transmit() or Receive(). If NULL, all pending tokens issued by above four functions will be aborted. - + @retval EFI_SUCCESS The asynchronous I/O request is aborted and Token->Event is signaled. @retval EFI_INVALID_PARAMETER This is NULL. @retval EFI_NOT_STARTED This instance hasn's been configured. @retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP,RARP, etc.) hasn's finished yet. - @retval EFI_NOT_FOUND The asynchronous I/O request isn's found in the - transmission or receive queue. It has either + @retval EFI_NOT_FOUND The asynchronous I/O request isn's found in the + transmission or receive queue. It has either completed or wasn's issued by Transmit() and Receive(). @retval EFI_UNSUPPORTED The operation is not supported in current implementation. - + **/ EFI_STATUS EFIAPI @@ -635,11 +635,11 @@ Tcp4Cancel ( /** Poll to receive incoming data and transmit outgoing segments. - The Poll() function increases the rate that data is moved between the network - and application and can be called when the TCP instance is created successfully. - Its use is optional. In some implementations, the periodical timer in the MNP - driver may not poll the underlying communications device fast enough to avoid - drop packets. Drivers and applications that are experiencing packet loss should + The Poll() function increases the rate that data is moved between the network + and application and can be called when the TCP instance is created successfully. + Its use is optional. In some implementations, the periodical timer in the MNP + driver may not poll the underlying communications device fast enough to avoid + drop packets. Drivers and applications that are experiencing packet loss should try calling the Poll() function in a high frequency. @param This Pointer to the EFI_TCP4_PROTOCOL instance. diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Main.h b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Main.h index cd904584bf..c898a7ee2d 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Main.h +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Main.h @@ -1,7 +1,7 @@ /** @file TCP4 protocol services header file. -Copyright (c) 2005 - 2012, Intel Corporation. All rights reserved.
+Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -53,7 +53,7 @@ Tcp4Dispatcher ( IN UINT8 Request, IN VOID *Data OPTIONAL ); - + /// /// TCP mode data /// @@ -83,10 +83,10 @@ typedef struct { /** Get the current operational status of a TCP instance. - - The GetModeData() function copies the current operational settings of this - EFI TCPv4 Protocol instance into user-supplied buffers. This function can - also be used to retrieve the operational setting of underlying drivers + + The GetModeData() function copies the current operational settings of this + EFI TCPv4 Protocol instance into user-supplied buffers. This function can + also be used to retrieve the operational setting of underlying drivers such as IPv4, MNP, or SNP. @param This Pointer to the EFI_TCP4_PROTOCOL instance. @@ -94,7 +94,7 @@ typedef struct { state. @param Tcp4ConfigData Pointer to the buffer to receive the current TCP configuration. - @param Ip4ModeData Pointer to the buffer to receive the current IPv4 + @param Ip4ModeData Pointer to the buffer to receive the current IPv4 configuration data used by the TCPv4 instance. @param MnpConfigData Pointer to the buffer to receive the current MNP configuration data indirectly used by the TCPv4 @@ -124,21 +124,21 @@ Tcp4GetModeData ( /** Initialize or brutally reset the operational parameters for this EFI TCPv4 instance. - + The Configure() function does the following: - * Initialize this EFI TCPv4 instance, i.e., initialize the communication end + * Initialize this EFI TCPv4 instance, i.e., initialize the communication end setting, specify active open or passive open for an instance. - * Reset this TCPv4 instance brutally, i.e., cancel all pending asynchronous - tokens, flush transmission and receiving buffer directly without informing + * Reset this TCPv4 instance brutally, i.e., cancel all pending asynchronous + tokens, flush transmission and receiving buffer directly without informing the communication peer. - No other TCPv4 Protocol operation can be executed by this instance - until it is configured properly. For an active TCP4 instance, after a proper - configuration it may call Connect() to initiates the three-way handshake. - For a passive TCP4 instance, its state will transit to Tcp4StateListen after - configuration, and Accept() may be called to listen the incoming TCP connection - request. If TcpConfigData is set to NULL, the instance is reset. Resetting - process will be done brutally, the state machine will be set to Tcp4StateClosed - directly, the receive queue and transmit queue will be flushed, and no traffic is + No other TCPv4 Protocol operation can be executed by this instance + until it is configured properly. For an active TCP4 instance, after a proper + configuration it may call Connect() to initiates the three-way handshake. + For a passive TCP4 instance, its state will transit to Tcp4StateListen after + configuration, and Accept() may be called to listen the incoming TCP connection + request. If TcpConfigData is set to NULL, the instance is reset. Resetting + process will be done brutally, the state machine will be set to Tcp4StateClosed + directly, the receive queue and transmit queue will be flushed, and no traffic is allowed through this instance. @param This Pointer to the EFI_TCP4_PROTOCOL instance. @@ -168,35 +168,35 @@ Tcp4Configure ( /** Add or delete routing entries. - + The Routes() function adds or deletes a route from the instance's routing table. - The most specific route is selected by comparing the SubnetAddress with the + The most specific route is selected by comparing the SubnetAddress with the destination IP address's arithmetical AND to the SubnetMask. - The default route is added with both SubnetAddress and SubnetMask set to 0.0.0.0. + The default route is added with both SubnetAddress and SubnetMask set to 0.0.0.0. The default route matches all destination IP addresses if there is no more specific route. - Direct route is added with GatewayAddress set to 0.0.0.0. Packets are sent to - the destination host if its address can be found in the Address Resolution Protocol (ARP) - cache or it is on the local subnet. If the instance is configured to use default + Direct route is added with GatewayAddress set to 0.0.0.0. Packets are sent to + the destination host if its address can be found in the Address Resolution Protocol (ARP) + cache or it is on the local subnet. If the instance is configured to use default address, a direct route to the local network will be added automatically. - Each TCP instance has its own independent routing table. Instance that uses the - default IP address will have a copy of the EFI_IP4_CONFIG_PROTOCOL's routing table. - The copy will be updated automatically whenever the IP driver reconfigures its - instance. As a result, the previous modification to the instance's local copy - will be lost. The priority of checking the route table is specific with IP + Each TCP instance has its own independent routing table. Instance that uses the + default IP address will have a copy of the EFI_IP4_CONFIG_PROTOCOL's routing table. + The copy will be updated automatically whenever the IP driver reconfigures its + instance. As a result, the previous modification to the instance's local copy + will be lost. The priority of checking the route table is specific with IP implementation and every IP implementation must comply with RFC 1122. @param This Pointer to the EFI_TCP4_PROTOCOL instance. @param DeleteRoute If TRUE, delete the specified route from routing table; if FALSE, add the specified route to routing table. - DestinationAddress and SubnetMask are used as + DestinationAddress and SubnetMask are used as the keywords to search route entry. @param SubnetAddress The destination network. @param SubnetMask The subnet mask for the destination network. - @param GatewayAddress The gateway address for this route. - It must be on the same subnet with the station + @param GatewayAddress The gateway address for this route. + It must be on the same subnet with the station address unless a direct route is specified. - + @retval EFI_SUCCESS The operation completed successfully. @retval EFI_NOT_STARTED The EFI_TCP4_PROTOCOL instance has not been configured. @@ -224,21 +224,21 @@ Tcp4Routes ( /** Initiate a nonblocking TCP connection request for an active TCP instance. - The Connect() function will initiate an active open to the remote peer configured - in current TCP instance if it is configured active. If the connection succeeds - or fails due to any error, the ConnectionToken->CompletionToken.Event will be - signaled and ConnectionToken->CompletionToken.Status will be updated accordingly. - This function can only be called for the TCP instance in Tcp4StateClosed state. - The instance will transfer into Tcp4StateSynSent if the function returns EFI_SUCCESS. - If TCP three way handshake succeeds, its state will become Tcp4StateEstablished, + The Connect() function will initiate an active open to the remote peer configured + in current TCP instance if it is configured active. If the connection succeeds + or fails due to any error, the ConnectionToken->CompletionToken.Event will be + signaled and ConnectionToken->CompletionToken.Status will be updated accordingly. + This function can only be called for the TCP instance in Tcp4StateClosed state. + The instance will transfer into Tcp4StateSynSent if the function returns EFI_SUCCESS. + If TCP three way handshake succeeds, its state will become Tcp4StateEstablished, otherwise, the state will return to Tcp4StateClosed. - + @param This Pointer to the EFI_TCP4_PROTOCOL instance @param ConnectionToken Pointer to the connection token to return when the TCP three way handshake finishes. - @retval EFI_SUCCESS The connection request is successfully initiated - and the state of this TCPv4 instance has + @retval EFI_SUCCESS The connection request is successfully initiated + and the state of this TCPv4 instance has been changed to Tcp4StateSynSent. @retval EFI_NOT_STARTED This EFI_TCP4_PROTOCOL instance hasn't been configured. @@ -260,14 +260,14 @@ Tcp4Connect ( /** Listen on the passive instance to accept an incoming connection request. - The Accept() function initiates an asynchronous accept request to wait for an - incoming connection on the passive TCP instance. If a remote peer successfully - establishes a connection with this instance, a new TCP instance will be created - and its handle will be returned in ListenToken->NewChildHandle. The newly created - instance is configured by inheriting the passive instance's configuration and is + The Accept() function initiates an asynchronous accept request to wait for an + incoming connection on the passive TCP instance. If a remote peer successfully + establishes a connection with this instance, a new TCP instance will be created + and its handle will be returned in ListenToken->NewChildHandle. The newly created + instance is configured by inheriting the passive instance's configuration and is ready for use upon return. The instance is in the Tcp4StateEstablished state. - The ListenToken->CompletionToken.Event will be signaled when a new connection - is accepted, user aborts the listen or connection is reset. This function only + The ListenToken->CompletionToken.Event will be signaled when a new connection + is accepted, user aborts the listen or connection is reset. This function only can be called when current TCP instance is in Tcp4StateListen state. @param This Pointer to the EFI_TCP4_PROTOCOL instance @@ -297,8 +297,8 @@ Tcp4Accept ( /** Queues outgoing data into the transmit queue. - The Transmit() function queues a sending request to this TCPv4 instance along - with the user data. The status of the token is updated and the event in the token + The Transmit() function queues a sending request to this TCPv4 instance along + with the user data. The status of the token is updated and the event in the token will be signaled once the data is sent out or some error occurs. @param This Pointer to the EFI_TCP4_PROTOCOL instance @@ -314,11 +314,11 @@ Tcp4Accept ( @retval EFI_ACCESS_DENIED One or more of the following conditions is TRUE: * A transmit completion token with the same Token-> CompletionToken.Event was already in the - transmission queue. - * The current instance is in Tcp4StateClosed state - * The current instance is a passive one and - it is in Tcp4StateListen state. - * User has called Close() to disconnect this + transmission queue. + * The current instance is in Tcp4StateClosed state + * The current instance is a passive one and + it is in Tcp4StateListen state. + * User has called Close() to disconnect this connection. @retval EFI_NOT_READY The completion token could not be queued because the transmit queue is full. @@ -338,16 +338,16 @@ Tcp4Transmit ( /** Place an asynchronous receive request into the receiving queue. - The Receive() function places a completion token into the receive packet queue. - This function is always asynchronous. The caller must allocate the - Token->CompletionToken.Event and the FragmentBuffer used to receive data. He also - must fill the DataLength which represents the whole length of all FragmentBuffer. - When the receive operation completes, the EFI TCPv4 Protocol driver updates the - Token->CompletionToken.Status and Token->Packet.RxData fields and the - Token->CompletionToken.Event is signaled. If got data the data and its length - will be copy into the FragmentTable, in the same time the full length of received - data will be recorded in the DataLength fields. Providing a proper notification - function and context for the event will enable the user to receive the notification + The Receive() function places a completion token into the receive packet queue. + This function is always asynchronous. The caller must allocate the + Token->CompletionToken.Event and the FragmentBuffer used to receive data. He also + must fill the DataLength which represents the whole length of all FragmentBuffer. + When the receive operation completes, the EFI TCPv4 Protocol driver updates the + Token->CompletionToken.Status and Token->Packet.RxData fields and the + Token->CompletionToken.Event is signaled. If got data the data and its length + will be copy into the FragmentTable, in the same time the full length of received + data will be recorded in the DataLength fields. Providing a proper notification + function and context for the event will enable the user to receive the notification and receiving status. That notification function is guaranteed to not be re-entered. @param This Pointer to the EFI_TCP4_PROTOCOL instance. @@ -363,16 +363,16 @@ Tcp4Transmit ( @retval EFI_OUT_OF_RESOURCES The receive completion token could not be queued due to a lack of system resources. @retval EFI_DEVICE_ERROR An unexpected system or network error occurred. - The EFI TCPv4 Protocol instance has been reset + The EFI TCPv4 Protocol instance has been reset to startup defaults. @retval EFI_ACCESS_DENIED One or more of the following conditions is TRUE: * A receive completion token with the same - Token->CompletionToken.Event was already in - the receive queue. - * The current instance is in Tcp4StateClosed state. - * The current instance is a passive one and it - is in Tcp4StateListen state. - * User has called Close() to disconnect this + Token->CompletionToken.Event was already in + the receive queue. + * The current instance is in Tcp4StateClosed state. + * The current instance is a passive one and it + is in Tcp4StateListen state. + * User has called Close() to disconnect this connection. @retval EFI_CONNECTION_FIN The communication peer has closed the connection and there is no any buffered data in the receive @@ -391,13 +391,13 @@ Tcp4Receive ( /** Disconnecting a TCP connection gracefully or reset a TCP connection. - Initiate an asynchronous close token to TCP driver. After Close() is called, - any buffered transmission data will be sent by TCP driver and the current - instance will have a graceful close working flow described as RFC 793 if - AbortOnClose is set to FALSE, otherwise, a rest packet will be sent by TCP - driver to fast disconnect this connection. When the close operation completes - successfully the TCP instance is in Tcp4StateClosed state, all pending - asynchronous operation is signaled and any buffers used for TCP network traffic + Initiate an asynchronous close token to TCP driver. After Close() is called, + any buffered transmission data will be sent by TCP driver and the current + instance will have a graceful close working flow described as RFC 793 if + AbortOnClose is set to FALSE, otherwise, a rest packet will be sent by TCP + driver to fast disconnect this connection. When the close operation completes + successfully the TCP instance is in Tcp4StateClosed state, all pending + asynchronous operation is signaled and any buffers used for TCP network traffic is flushed. @param This Pointer to the EFI_TCP4_PROTOCOL instance. @@ -407,7 +407,7 @@ Tcp4Receive ( @retval EFI_SUCCESS The operation completed successfully. @retval EFI_NOT_STARTED The EFI_TCP4_PROTOCOL instance hasn't been configured. - @retval EFI_ACCESS_DENIED One or more of the following are TRUE: + @retval EFI_ACCESS_DENIED One or more of the following are TRUE: * Configure() has been called with TcpConfigData set to NULL and this function has not returned. * Previous Close() call on this instance has not @@ -429,33 +429,33 @@ Tcp4Close ( /** Abort an asynchronous connection, listen, transmission or receive request. - The Cancel() function aborts a pending connection, listen, transmit or receive - request. If Token is not NULL and the token is in the connection, listen, - transmission or receive queue when it is being cancelled, its Token->Status - will be set to EFI_ABORTED and then Token->Event will be signaled. If the token - is not in one of the queues, which usually means that the asynchronous operation - has completed, EFI_NOT_FOUND is returned. If Token is NULL all asynchronous token + The Cancel() function aborts a pending connection, listen, transmit or receive + request. If Token is not NULL and the token is in the connection, listen, + transmission or receive queue when it is being cancelled, its Token->Status + will be set to EFI_ABORTED and then Token->Event will be signaled. If the token + is not in one of the queues, which usually means that the asynchronous operation + has completed, EFI_NOT_FOUND is returned. If Token is NULL all asynchronous token issued by Connect(), Accept(), Transmit() and Receive()will be aborted. NOTE: It has not been implemented currently. - + @param This Pointer to the EFI_TCP4_PROTOCOL instance. @param Token Pointer to a token that has been issued by Connect(), Accept(), Transmit() or Receive(). If NULL, all pending tokens issued by above four functions will be aborted. - + @retval EFI_SUCCESS The asynchronous I/O request is aborted and Token->Event is signaled. @retval EFI_INVALID_PARAMETER This is NULL. @retval EFI_NOT_STARTED This instance hasn's been configured. @retval EFI_NO_MAPPING When using the default address, configuration (DHCP, BOOTP,RARP, etc.) hasn's finished yet. - @retval EFI_NOT_FOUND The asynchronous I/O request isn's found in the - transmission or receive queue. It has either + @retval EFI_NOT_FOUND The asynchronous I/O request isn's found in the + transmission or receive queue. It has either completed or wasn's issued by Transmit() and Receive(). @retval EFI_UNSUPPORTED The operation is not supported in current implementation. - + **/ EFI_STATUS EFIAPI @@ -467,11 +467,11 @@ Tcp4Cancel ( /** Poll to receive incoming data and transmit outgoing segments. - The Poll() function increases the rate that data is moved between the network - and application and can be called when the TCP instance is created successfully. - Its use is optional. In some implementations, the periodical timer in the MNP - driver may not poll the underlying communications device fast enough to avoid - drop packets. Drivers and applications that are experiencing packet loss should + The Poll() function increases the rate that data is moved between the network + and application and can be called when the TCP instance is created successfully. + Its use is optional. In some implementations, the periodical timer in the MNP + driver may not poll the underlying communications device fast enough to avoid + drop packets. Drivers and applications that are experiencing packet loss should try calling the Poll() function in a high frequency. @param This Pointer to the EFI_TCP4_PROTOCOL instance. diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c index 892d19b072..7fd8bb1fbe 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Misc.c @@ -1,7 +1,7 @@ /** @file Misc support routines for tcp. -Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -79,7 +79,7 @@ TcpInitTcbLocal ( // Tcb->RcvWndScale = 0; Tcb->RetxmitSeqMax = 0; - + Tcb->ProbeTimerOn = FALSE; } diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Option.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Option.c index 0da249c3cc..2817b80295 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Option.c +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Option.c @@ -1,7 +1,7 @@ /** @file Routines to process TCP option. - -Copyright (c) 2005 - 2006, Intel Corporation. All rights reserved.
+ +Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -16,9 +16,9 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** Get a UINT16 value from buffer. - + @param Buf Pointer to input buffer. - + @return The UINT16 value get from buffer. **/ @@ -34,9 +34,9 @@ TcpGetUint16 ( /** Get a UINT32 value from buffer. - + @param Buf Pointer to input buffer. - + @return The UINT32 value get from buffer. **/ @@ -52,9 +52,9 @@ TcpGetUint32 ( /** Put a UINT32 value in buffer. - + @param Buf Pointer to the buffer. - @param Data The UINT32 Date to put in buffer + @param Data The UINT32 Date to put in buffer **/ VOID diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Option.h b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Option.h index 9676df015d..5185aecea8 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Option.h +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Option.h @@ -1,7 +1,7 @@ /** @file Tcp option's routine header file. - -Copyright (c) 2005 - 2009, Intel Corporation. All rights reserved.
+ +Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Output.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Output.c index 5a3d837e1d..760b09a1ed 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Output.c +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Output.c @@ -1,7 +1,7 @@ /** @file TCP output process routines. - -Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.
+ +Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -687,10 +687,10 @@ TcpRetransmit ( "TcpRetransmit: retransmission without regard to the receiver window for TCB %p\n", Tcb) ); - + } else if (TCP_SEQ_GEQ (Tcb->SndWl2 + Tcb->SndWnd, Seq)) { Len = TCP_SUB_SEQ (Tcb->SndWl2 + Tcb->SndWnd, Seq); - + } else { DEBUG ( (EFI_D_WARN, @@ -700,7 +700,7 @@ TcpRetransmit ( return 0; } - + Len = MIN (Len, Tcb->SndMss); Nbuf = TcpGetSegmentSndQue (Tcb, Seq, Len); @@ -713,7 +713,7 @@ TcpRetransmit ( if (TcpTransmitSegment (Tcb, Nbuf) != 0) { goto OnError; } - + if (TCP_SEQ_GT (Seq, Tcb->RetxmitSeqMax)) { Tcb->RetxmitSeqMax = Seq; } @@ -793,7 +793,7 @@ SEND_AGAIN: // only send a segment without data if SYN or // FIN is set. // - if ((Len == 0) && + if ((Len == 0) && ((Flag & (TCP_FLG_SYN | TCP_FLG_FIN)) == 0)) { return Sent; } @@ -831,10 +831,10 @@ SEND_AGAIN: TCP_SEQ_LT (End + 1, Tcb->SndWnd + Tcb->SndWl2)) { DEBUG ( - (EFI_D_NET, - "TcpToSendData: send FIN " - "to peer for TCB %p in state %s\n", - Tcb, + (EFI_D_NET, + "TcpToSendData: send FIN " + "to peer for TCB %p in state %s\n", + Tcb, mTcpStateName[Tcb->State]) ); diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Proto.h b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Proto.h index 49d8a1da3b..37191fe651 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Proto.h +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Proto.h @@ -1,7 +1,7 @@ /** @file Tcp Protocol header file. -Copyright (c) 2005 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -49,11 +49,11 @@ typedef struct _TCP_CB TCP_CB; #define TCP_FLG_PSH 0x08 #define TCP_FLG_ACK 0x10 #define TCP_FLG_URG 0x20 - + // // mask for all the flags // -#define TCP_FLG_FLAG 0x3F +#define TCP_FLG_FLAG 0x3F #define TCP_CONNECT_REFUSED (-1) ///< TCP error status diff --git a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Timer.c b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Timer.c index a8e4a933cf..4cb0ee7b5e 100644 --- a/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Timer.c +++ b/MdeModulePkg/Universal/Network/Tcp4Dxe/Tcp4Timer.c @@ -1,7 +1,7 @@ /** @file TCP timer related functions. - -Copyright (c) 2005 - 2010, Intel Corporation. All rights reserved.
+ +Copyright (c) 2005 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -37,7 +37,7 @@ VOID TcpRexmitTimeout ( IN OUT TCP_CB *Tcb ); - + /** Timeout handler for window probe timer. @@ -289,7 +289,7 @@ Tcp2MSLTimeout ( /** - Update the timer status and the next expire time according to the timers + Update the timer status and the next expire time according to the timers to expire in a specific future time slot. @param Tcb Pointer to the TCP_CB of this TCP instance. @@ -555,7 +555,7 @@ TcpTickingDpc ( } } } - + // // If the Tcb still exist or some timer is set, update the timer // diff --git a/MdeModulePkg/Universal/Network/Udp4Dxe/ComponentName.c b/MdeModulePkg/Universal/Network/Udp4Dxe/ComponentName.c index cf311055e2..8baf395bc6 100644 --- a/MdeModulePkg/Universal/Network/Udp4Dxe/ComponentName.c +++ b/MdeModulePkg/Universal/Network/Udp4Dxe/ComponentName.c @@ -1,6 +1,6 @@ /** @file -Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -175,7 +175,7 @@ GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE mUdpDriverNameTable[] = { }; GLOBAL_REMOVE_IF_UNREFERENCED EFI_UNICODE_STRING_TABLE *gUdpControllerNameTable = NULL; - + /** Retrieves a Unicode string that is the user readable name of the driver. @@ -237,10 +237,10 @@ UdpComponentNameGetDriverName ( @param Udp4[in] A pointer to the EFI_UDP4_PROTOCOL. - + @retval EFI_SUCCESS Update the ControllerNameTable of this instance successfully. @retval EFI_INVALID_PARAMETER The input parameter is invalid. - + **/ EFI_STATUS UpdateName ( @@ -280,7 +280,7 @@ UpdateName ( FreeUnicodeStringTable (gUdpControllerNameTable); gUdpControllerNameTable = NULL; } - + Status = AddUnicodeString2 ( "eng", gUdp4ComponentName.SupportedLanguages, @@ -291,7 +291,7 @@ UpdateName ( if (EFI_ERROR (Status)) { return Status; } - + return AddUnicodeString2 ( "en", gUdp4ComponentName2.SupportedLanguages, @@ -388,7 +388,7 @@ UdpComponentNameGetControllerName ( if (ChildHandle == NULL) { return EFI_UNSUPPORTED; } - + // // Make sure this driver produced ChildHandle // diff --git a/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Driver.c b/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Driver.c index 4d179d1b28..8731995fb6 100644 --- a/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Driver.c +++ b/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Driver.c @@ -1,6 +1,6 @@ /** @file -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -30,7 +30,7 @@ EFI_SERVICE_BINDING_PROTOCOL mUdp4ServiceBinding = { /** Callback function which provided by user to remove one node in NetDestroyLinkList process. - + @param[in] Entry The entry to be removed. @param[in] Context Pointer to the callback context corresponds to the Context in NetDestroyLinkList. @@ -194,7 +194,7 @@ Udp4DriverBindingStart ( restrictions for this service. DisconnectController() must follow these calling restrictions. If any other agent wishes to call Stop() it must also follow these calling restrictions. - + @param[in] This Protocol instance pointer. @param[in] ControllerHandle Handle of device to stop driver on @param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number of @@ -266,7 +266,7 @@ Udp4DriverBindingStop ( &Udp4Service->ServiceBinding, NULL ); - + Udp4CleanService (Udp4Service); if (gUdpControllerNameTable != NULL) { @@ -282,14 +282,14 @@ Udp4DriverBindingStop ( /** Creates a child handle and installs a protocol. - - The CreateChild() function installs a protocol on ChildHandle. - If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle. + + The CreateChild() function installs a protocol on ChildHandle. + If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle. If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle. @param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance. @param[in] ChildHandle Pointer to the handle of the child to create. If it is NULL, - then a new handle is created. If it is a pointer to an existing UEFI handle, + then a new handle is created. If it is a pointer to an existing UEFI handle, then the protocol is added to the existing UEFI handle. @retval EFI_SUCCES The protocol was added to ChildHandle. @@ -419,9 +419,9 @@ ON_ERROR: /** Destroys a child handle with a protocol installed on it. - - The DestroyChild() function does the opposite of CreateChild(). It removes a protocol - that was installed by CreateChild() from ChildHandle. If the removed protocol is the + + The DestroyChild() function does the opposite of CreateChild(). It removes a protocol + that was installed by CreateChild() from ChildHandle. If the removed protocol is the last protocol on ChildHandle, then ChildHandle is destroyed. @param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance. @@ -497,7 +497,7 @@ Udp4ServiceBindingDestroyChild ( &gEfiIp4ProtocolGuid, gUdp4DriverBinding.DriverBindingHandle, Instance->ChildHandle - ); + ); // // Uninstall the Udp4Protocol previously installed on the ChildHandle. @@ -547,7 +547,7 @@ Udp4ServiceBindingDestroyChild ( This is the declaration of an EFI image entry point. This entry point is the same for UEFI Applications, UEFI OS Loaders, and UEFI Drivers including both device drivers and bus drivers. - + The entry point for Udp4 driver which installs the driver binding and component name protocol on its ImageHandle. diff --git a/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Driver.h b/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Driver.h index 88421aa816..0f96cd527f 100644 --- a/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Driver.h +++ b/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Driver.h @@ -1,6 +1,6 @@ /** @file -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -79,7 +79,7 @@ Udp4DriverBindingStart ( restrictions for this service. DisconnectController() must follow these calling restrictions. If any other agent wishes to call Stop() it must also follow these calling restrictions. - + @param[in] This Protocol instance pointer. @param[in] ControllerHandle Handle of device to stop driver on @param[in] NumberOfChildren Number of Handles in ChildHandleBuffer. If number of @@ -101,14 +101,14 @@ Udp4DriverBindingStop ( /** Creates a child handle and installs a protocol. - - The CreateChild() function installs a protocol on ChildHandle. - If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle. + + The CreateChild() function installs a protocol on ChildHandle. + If ChildHandle is a pointer to NULL, then a new handle is created and returned in ChildHandle. If ChildHandle is not a pointer to NULL, then the protocol installs on the existing ChildHandle. @param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance. @param[in] ChildHandle Pointer to the handle of the child to create. If it is NULL, - then a new handle is created. If it is a pointer to an existing UEFI handle, + then a new handle is created. If it is a pointer to an existing UEFI handle, then the protocol is added to the existing UEFI handle. @retval EFI_SUCCES The protocol was added to ChildHandle. @@ -127,9 +127,9 @@ Udp4ServiceBindingCreateChild ( /** Destroys a child handle with a protocol installed on it. - - The DestroyChild() function does the opposite of CreateChild(). It removes a protocol - that was installed by CreateChild() from ChildHandle. If the removed protocol is the + + The DestroyChild() function does the opposite of CreateChild(). It removes a protocol + that was installed by CreateChild() from ChildHandle. If the removed protocol is the last protocol on ChildHandle, then ChildHandle is destroyed. @param[in] This Pointer to the EFI_SERVICE_BINDING_PROTOCOL instance. diff --git a/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf b/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf index e1b4898c31..69b6d5d943 100644 --- a/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf +++ b/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.inf @@ -4,7 +4,7 @@ # This module produces EFI UDP(User Datagram Protocol) Protocol upon EFI IPv4 # Protocol, to provide basic UDPv4 I/O services. # -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at @@ -30,7 +30,7 @@ # # VALID_ARCHITECTURES = IA32 X64 IPF EBC # -# DRIVER_BINDING = gUdp4DriverBinding +# DRIVER_BINDING = gUdp4DriverBinding # COMPONENT_NAME = gUdp4ComponentName # COMPONENT_NAME2 = gUdp4ComponentName2 # diff --git a/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.uni b/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.uni index 87c235d528..891850bb09 100644 --- a/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.uni +++ b/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Dxe.uni @@ -4,13 +4,13 @@ // This module produces EFI UDP(User Datagram Protocol) Protocol upon EFI IPv4 // Protocol, to provide basic UDPv4 I/O services. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4DxeExtra.uni b/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4DxeExtra.uni index 249c4407ef..33a78d6c37 100644 --- a/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4DxeExtra.uni +++ b/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4DxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // Udp4Dxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "UDP v4 DXE Driver" diff --git a/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.c b/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.c index df41433a1a..7a09c7fe66 100644 --- a/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.c +++ b/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.c @@ -1,7 +1,7 @@ /** @file The implementation of the Udp4 protocol. - -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+ +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -844,7 +844,7 @@ Udp4ValidateTxToken ( CopyMem (&SourceAddress, &UdpSessionData->SourceAddress, sizeof (IP4_ADDR)); - if ((SourceAddress != 0) && + if ((SourceAddress != 0) && !Instance->ConfigData.UseDefaultAddress && (EFI_NTOHL(Instance->ConfigData.SubnetMask) != 0) && !NetIp4IsUnicast (HTONL (SourceAddress), EFI_NTOHL(Instance->ConfigData.SubnetMask))) { @@ -1812,7 +1812,7 @@ Udp4IcmpHandler ( NetbufFree (Packet); return; } - + Udp4Header = (EFI_UDP_HEADER *) NetbufGetByte (Packet, 0, NULL); ASSERT (Udp4Header != NULL); diff --git a/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.h b/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.h index 31edfbda43..dd4909e57a 100644 --- a/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.h +++ b/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Impl.h @@ -1,7 +1,7 @@ /** @file EFI UDPv4 protocol implementation. - -Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+ +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -158,7 +158,7 @@ Udp4GetModeData ( /** Initializes, changes, or resets the operational parameters for this instance of the EFI UDPv4 Protocol. - + The Configure() function is used to do the following: * Initialize and start this instance of the EFI UDPv4 Protocol. * Change the filtering rules and operational parameters. @@ -185,7 +185,7 @@ Udp4GetModeData ( @retval EFI_OUT_OF_RESOURCES The EFI UDPv4 Protocol driver cannot allocate memory for this EFI UDPv4 Protocol instance. @retval EFI_DEVICE_ERROR An unexpected network or system error occurred and this instance - was not opened. + was not opened. **/ EFI_STATUS @@ -197,7 +197,7 @@ Udp4Configure ( /** Joins and leaves multicast groups. - + The Groups() function is used to enable and disable the multicast group filtering. If the JoinFlag is FALSE and the MulticastAddress is NULL, then all currently joined groups are left. @@ -234,7 +234,7 @@ Udp4Groups ( /** Adds and deletes routing table entries. - + The Routes() function adds a route to or deletes a route from the routing table. Routes are determined by comparing the SubnetAddress with the destination IP address and arithmetically AND-ing it with the SubnetMask. The gateway address @@ -282,7 +282,7 @@ Udp4Routes ( /** Queues outgoing data packets into the transmit queue. - + The Transmit() function places a sending request to this instance of the EFI UDPv4 Protocol, alongside the transmit data that was filled by the user. Whenever the packet in the token is sent out or some errors occur, the Token.Event will @@ -319,7 +319,7 @@ Udp4Transmit ( /** Places an asynchronous receive request into the receiving queue. - + The Receive() function places a completion token into the receive packet queue. This function is always asynchronous. The caller must fill in the Token.Event field in the completion token, and this @@ -355,7 +355,7 @@ Udp4Receive ( /** Aborts an asynchronous transmit or receive request. - + The Cancel() function is used to abort a pending transmit or receive request. If the token is in the transmit or receive request queues, after calling this function, Token.Status will be set to EFI_ABORTED and then Token.Event will be @@ -390,7 +390,7 @@ Udp4Cancel ( /** Polls for incoming data packets and processes outgoing data packets. - + The Poll() function can be used by network drivers and applications to increase the rate that data packets are moved between the communications device and the transmit and receive queues. @@ -691,5 +691,5 @@ EFIAPI Udp4NetVectorExtFree ( VOID *Context ); - + #endif diff --git a/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Main.c b/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Main.c index d719883925..6950c693ae 100644 --- a/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Main.c +++ b/MdeModulePkg/Universal/Network/Udp4Dxe/Udp4Main.c @@ -1,7 +1,7 @@ /** @file (C) Copyright 2014 Hewlett-Packard Development Company, L.P.
-Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -96,7 +96,7 @@ Udp4GetModeData ( /** Initializes, changes, or resets the operational parameters for this instance of the EFI UDPv4 Protocol. - + The Configure() function is used to do the following: * Initialize and start this instance of the EFI UDPv4 Protocol. * Change the filtering rules and operational parameters. @@ -123,7 +123,7 @@ Udp4GetModeData ( @retval EFI_OUT_OF_RESOURCES The EFI UDPv4 Protocol driver cannot allocate memory for this EFI UDPv4 Protocol instance. @retval EFI_DEVICE_ERROR An unexpected network or system error occurred and this instance - was not opened. + was not opened. **/ EFI_STATUS @@ -281,7 +281,7 @@ Udp4Configure ( ASSERT (IsListEmpty (&Instance->DeliveredDgramQue)); } - + ON_EXIT: gBS->RestoreTPL (OldTpl); @@ -292,7 +292,7 @@ ON_EXIT: /** Joins and leaves multicast groups. - + The Groups() function is used to enable and disable the multicast group filtering. If the JoinFlag is FALSE and the MulticastAddress is NULL, then all currently joined groups are left. @@ -393,7 +393,7 @@ ON_EXIT: /** Adds and deletes routing table entries. - + The Routes() function adds a route to or deletes a route from the routing table. Routes are determined by comparing the SubnetAddress with the destination IP address and arithmetically AND-ing it with the SubnetMask. The gateway address @@ -467,7 +467,7 @@ Udp4Routes ( /** Queues outgoing data packets into the transmit queue. - + The Transmit() function places a sending request to this instance of the EFI UDPv4 Protocol, alongside the transmit data that was filled by the user. Whenever the packet in the token is sent out or some errors occur, the Token.Event will @@ -696,7 +696,7 @@ ON_EXIT: /** Places an asynchronous receive request into the receiving queue. - + The Receive() function places a completion token into the receive packet queue. This function is always asynchronous. The caller must fill in the Token.Event field in the completion token, and this @@ -796,7 +796,7 @@ ON_EXIT: /** Aborts an asynchronous transmit or receive request. - + The Cancel() function is used to abort a pending transmit or receive request. If the token is in the transmit or receive request queues, after calling this function, Token.Status will be set to EFI_ABORTED and then Token.Event will be @@ -867,7 +867,7 @@ Udp4Cancel ( /** Polls for incoming data packets and processes outgoing data packets. - + The Poll() function can be used by network drivers and applications to increase the rate that data packets are moved between the communications device and the transmit and receive queues. diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/ComponentName.c b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/ComponentName.c index f4ef59ce5e..a085ef61f3 100644 --- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/ComponentName.c +++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/ComponentName.c @@ -1,6 +1,6 @@ /** @file -Copyright (c) 2007 - 2012, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -316,7 +316,7 @@ PxeBcComponentNameGetControllerName ( EFI_PXE_BASE_CODE_PROTOCOL *PxeBc; EFI_HANDLE NicHandle; EFI_STATUS Status; - + if (ControllerHandle == NULL || ChildHandle != NULL) { return EFI_UNSUPPORTED; } diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c index e48b54c876..f7b975f299 100644 --- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c +++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.c @@ -171,7 +171,7 @@ PxeBcParseCachedDhcpPacket ( ); } // - // Second, Check if bootfilename and serverhostname is overloaded to carry DHCP options refers to rfc-2132. + // Second, Check if bootfilename and serverhostname is overloaded to carry DHCP options refers to rfc-2132. // If yes, try to parse options from the BootFileName field, then ServerName field. // Option = Options[PXEBC_DHCP4_TAG_INDEX_OVERLOAD]; @@ -229,7 +229,7 @@ PxeBcParseCachedDhcpPacket ( // if (Options[PXEBC_DHCP4_TAG_INDEX_BOOTFILE] != NULL) { // - // RFC 2132, Section 9.5 does not strictly state Bootfile name (option 67) is null + // RFC 2132, Section 9.5 does not strictly state Bootfile name (option 67) is null // terminated string. So force to append null terminated character at the end of string. // Ptr8 = (UINT8*)&Options[PXEBC_DHCP4_TAG_INDEX_BOOTFILE]->Data[0]; @@ -685,7 +685,7 @@ PxeBcCacheDhcpOffer ( **/ EFI_STATUS -PxeBcSetIp4Policy ( +PxeBcSetIp4Policy ( IN PXEBC_PRIVATE_DATA *Private ) { @@ -705,7 +705,7 @@ PxeBcSetIp4Policy ( if (EFI_ERROR (Status)) { return Status; } - + if (Policy != Ip4Config2PolicyStatic) { Policy = Ip4Config2PolicyStatic; Status= Ip4Config2->SetData ( @@ -716,7 +716,7 @@ PxeBcSetIp4Policy ( ); if (EFI_ERROR (Status)) { return Status; - } + } } return EFI_SUCCESS; @@ -943,7 +943,7 @@ PxeBcDhcpCallBack ( Status = EFI_ABORTED; break; } - + if (Mode->SendGUID) { // // send the system GUID instead of the MAC address as the hardware address @@ -981,7 +981,7 @@ PxeBcDhcpCallBack ( // break; } - + if (Private->NumOffers < PXEBC_MAX_OFFER_NUM) { // // Cache the dhcp offers in Private->Dhcp4Offers[] @@ -1669,12 +1669,12 @@ PxeBcSelectBootPrompt ( VendorOpt = &Packet->PxeVendorOption; // - // According to the PXE specification 2.1, Table 2-1 PXE DHCP Options (Full - // List), we must not consider a boot prompt or boot menu if all of the + // According to the PXE specification 2.1, Table 2-1 PXE DHCP Options (Full + // List), we must not consider a boot prompt or boot menu if all of the // following hold: // - the PXE_DISCOVERY_CONTROL PXE tag is present inside the Vendor Options // (=43) DHCP tag, and - // - the PXE_DISCOVERY_CONTROL PXE tag has bit 3 set, and + // - the PXE_DISCOVERY_CONTROL PXE tag has bit 3 set, and // - a boot file name has been presented with DHCP option 67. // if (IS_DISABLE_PROMPT_MENU (VendorOpt->DiscoverCtrl) && diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.h b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.h index d19d2a318f..d8336c5e82 100644 --- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.h +++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDhcp.h @@ -2,7 +2,7 @@ Dhcp and Discover routines for PxeBc. Copyright (c) 2013, Red Hat, Inc. -Copyright (c) 2007 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -258,7 +258,7 @@ typedef struct { This function initialize the DHCP4 message instance. This function will pad each item of dhcp4 message packet. - + @param Seed Pointer to the message instance of the DHCP4 packet. @param Udp4 Pointer to the EFI_UDP4_PROTOCOL instance. @@ -304,7 +304,7 @@ PxeBcCheckSelectedOffer ( /** Callback routine. - + EFI_DHCP4_CALLBACK is provided by the consumer of the EFI DHCPv4 Protocol driver to intercept events that occurred in the configuration process. This structure provides advanced control of each state transition of the DHCP process. The @@ -352,7 +352,7 @@ PxeBcDhcpCallBack ( **/ EFI_STATUS -PxeBcSetIp4Policy ( +PxeBcSetIp4Policy ( IN PXEBC_PRIVATE_DATA *Private ); @@ -363,8 +363,8 @@ PxeBcSetIp4Policy ( @param Type PxeBc option boot item type @param Layer PxeBc option boot item layer @param UseBis Use BIS or not - @param DestIp Ip address for server - @param IpCount The total count of the server ip address + @param DestIp Ip address for server + @param IpCount The total count of the server ip address @param SrvList Server list @param IsDiscv Discover the vendor or not @param Reply The dhcp4 packet of Pxe reply @@ -372,8 +372,8 @@ PxeBcSetIp4Policy ( @retval EFI_SUCCESS Operation succeeds. @retval EFI_OUT_OF_RESOURCES Allocate memory pool failed. @retval EFI_NOT_FOUND There is no vendor option exists. - @retval EFI_TIMEOUT Send Pxe Discover time out. - + @retval EFI_TIMEOUT Send Pxe Discover time out. + **/ EFI_STATUS PxeBcDiscvBootService ( @@ -394,8 +394,8 @@ PxeBcDiscvBootService ( @param Private Pointer to PxeBc private data. @param OptList Pointer to a DHCP option list. - - @param IsDhcpDiscover Discover dhcp option or not. + + @param IsDhcpDiscover Discover dhcp option or not. @return The index item number of the option list. @@ -413,7 +413,7 @@ PxeBcBuildDhcpOptions ( @param OptList Pointer to the list of the options @param Type the type of option - @param Layer the layer of the boot options + @param Layer the layer of the boot options @param OptLen length of opotion **/ @@ -433,7 +433,7 @@ PxeBcCreateBootOptions ( @param Length The length of the dhcp options. @param OptTag The option OpCode. - @return NULL if the buffer length is 0 and OpCode is not + @return NULL if the buffer length is 0 and OpCode is not DHCP4_TAG_EOP, or the pointer to the buffer. **/ @@ -467,11 +467,11 @@ PxeBcParseVendorOptions ( @param Private Pointer to PxeBc private data. @retval EFI_SUCCESS Select boot prompt done. - @retval EFI_TIMEOUT Select boot prompt time out. + @retval EFI_TIMEOUT Select boot prompt time out. @retval EFI_NOT_FOUND The proxy offer is not Pxe10. @retval EFI_ABORTED User cancel the operation. @retval EFI_NOT_READY Read the input key from the keybroad has not finish. - + **/ EFI_STATUS PxeBcSelectBootPrompt ( @@ -485,10 +485,10 @@ PxeBcSelectBootPrompt ( @param Private Pointer to PxeBc private data. @param Type The type of the menu. @param UseDefaultItem Use default item or not. - + @retval EFI_ABORTED User cancel operation. @retval EFI_SUCCESS Select the boot menu success. - @retval EFI_NOT_READY Read the input key from the keybroad has not finish. + @retval EFI_NOT_READY Read the input key from the keybroad has not finish. **/ EFI_STATUS diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDriver.h b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDriver.h index f436c895b4..b7bf069dd6 100644 --- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDriver.h +++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcDriver.h @@ -1,6 +1,6 @@ /** @file -Copyright (c) 2007, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -20,7 +20,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. order to make drivers as small as possible, there are a few calling restrictions for this service. ConnectController() must follow these calling restrictions. If any other agent wishes to call - Supported() it must also follow these calling restrictions. + Supported() it must also follow these calling restrictions. PxeBc requires DHCP4 and MTFTP4 protocols. @param This Protocol instance pointer. @@ -40,7 +40,7 @@ PxeBcDriverBindingSupported ( IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL * RemainingDevicePath OPTIONAL ); - + /** Start this driver on ControllerHandle. This service is called by the EFI boot service ConnectController(). In order to make @@ -66,7 +66,7 @@ PxeBcDriverBindingStart ( IN EFI_HANDLE ControllerHandle, IN EFI_DEVICE_PATH_PROTOCOL * RemainingDevicePath OPTIONAL ); - + /** Stop this driver on ControllerHandle. This service is called by the EFI boot service DisconnectController(). In order to @@ -74,7 +74,7 @@ PxeBcDriverBindingStart ( restrictions for this service. DisconnectController() must follow these calling restrictions. If any other agent wishes to call Stop() it must also follow these calling restrictions. - + @param This Protocol instance pointer. @param ControllerHandle Handle of device to stop driver on @param NumberOfChildren Number of Handles in ChildHandleBuffer. If number of @@ -93,7 +93,7 @@ PxeBcDriverBindingStop ( IN UINTN NumberOfChildren, IN EFI_HANDLE *ChildHandleBuffer ); - + extern EFI_COMPONENT_NAME2_PROTOCOL gPxeBcComponentName2; extern EFI_COMPONENT_NAME_PROTOCOL gPxeBcComponentName; extern EFI_DRIVER_BINDING_PROTOCOL gPxeBcDriverBinding; diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c index 825a22cae9..3fa3be99c1 100644 --- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c +++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcImpl.c @@ -1,7 +1,7 @@ /** @file Interface routines for PxeBc. -Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -354,7 +354,7 @@ EfiPxeBcStart ( // // Configure block size for TFTP as a default value to handle all link layers. - // + // Private->BlockSize = MIN (Private->Ip4MaxPacketSize, PXEBC_DEFAULT_PACKET_SIZE) - PXEBC_DEFAULT_UDP_OVERHEAD_SIZE - PXEBC_DEFAULT_TFTP_OVERHEAD_SIZE; // @@ -363,7 +363,7 @@ EfiPxeBcStart ( if (PcdGet64 (PcdTftpBlockSize) != 0) { Private->BlockSize = (UINTN) PcdGet64 (PcdTftpBlockSize); } - + Private->AddressIsOk = FALSE; ZeroMem (Mode, sizeof (EFI_PXE_BASE_CODE_MODE)); @@ -415,17 +415,17 @@ EfiPxeBcStart ( } // - //DHCP4 service allows only one of its children to be configured in - //the active state, If the DHCP4 D.O.R.A started by IP4 auto - //configuration and has not been completed, the Dhcp4 state machine - //will not be in the right state for the PXE to start a new round D.O.R.A. + //DHCP4 service allows only one of its children to be configured in + //the active state, If the DHCP4 D.O.R.A started by IP4 auto + //configuration and has not been completed, the Dhcp4 state machine + //will not be in the right state for the PXE to start a new round D.O.R.A. //so we need to switch it's policy to static. // Status = PxeBcSetIp4Policy (Private); if (EFI_ERROR (Status)) { goto ON_EXIT; } - + Status = Private->Ip4->Configure (Private->Ip4, &Private->Ip4ConfigData); if (EFI_ERROR (Status)) { goto ON_EXIT; @@ -726,35 +726,35 @@ ON_EXIT: CopyMem (&Private->Udp4CfgData.SubnetMask, &Private->SubnetMask, sizeof (EFI_IPv4_ADDRESS)); CopyMem (&Private->Ip4ConfigData.StationAddress, &Private->StationIp, sizeof (EFI_IPv4_ADDRESS)); CopyMem (&Private->Ip4ConfigData.SubnetMask, &Private->SubnetMask, sizeof (EFI_IPv4_ADDRESS)); - + // // Reconfigure the Ip4 instance to capture background ICMP packets with new station Ip address. // Private->Ip4->Cancel (Private->Ip4, &Private->IcmpErrorRcvToken); Private->Ip4->Configure (Private->Ip4, NULL); - + Status = Private->Ip4->Configure (Private->Ip4, &Private->Ip4ConfigData); if (EFI_ERROR (Status)) { goto ON_EXIT; } - + Status = Private->Ip4->Receive (Private->Ip4, &Private->IcmpErrorRcvToken); if (EFI_ERROR (Status)) { goto ON_EXIT; - } + } } } Private->Udp4Read->Configure (Private->Udp4Read, &Private->Udp4CfgData); // - // Dhcp(), Discover(), and Mtftp() set the IP filter, and return with the IP + // Dhcp(), Discover(), and Mtftp() set the IP filter, and return with the IP // receive filter list emptied and the filter set to EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP. // ZeroMem(&IpFilter, sizeof (EFI_PXE_BASE_CODE_IP_FILTER)); IpFilter.Filters = EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP; This->SetIpFilter (This, &IpFilter); - + return Status; } @@ -864,7 +864,7 @@ EfiPxeBcDiscover ( if (!Mode->PxeDiscoverValid || !Mode->PxeReplyReceived || (!Mode->PxeBisReplyReceived && UseBis)) { Status = EFI_INVALID_PARAMETER; - goto ON_EXIT; + goto ON_EXIT; } DefaultInfo.IpCnt = 1; @@ -888,7 +888,7 @@ EfiPxeBcDiscover ( // Address is not acquired or no discovery options. // Status = EFI_INVALID_PARAMETER; - goto ON_EXIT; + goto ON_EXIT; } DefaultInfo.UseMCast = (BOOLEAN)!IS_DISABLE_MCAST_DISCOVER (VendorOpt->DiscoverCtrl); @@ -936,9 +936,9 @@ EfiPxeBcDiscover ( if (CreatedInfo == NULL) { Status = EFI_OUT_OF_RESOURCES; goto ON_EXIT; - - } - + + } + CopyMem (CreatedInfo, &DefaultInfo, sizeof (DefaultInfo)); Info = CreatedInfo; SrvList = Info->SrvList; @@ -965,7 +965,7 @@ EfiPxeBcDiscover ( if (Index != Info->IpCnt) { Status = EFI_INVALID_PARAMETER; - goto ON_EXIT; + goto ON_EXIT; } } } @@ -1005,7 +1005,7 @@ EfiPxeBcDiscover ( ); if (!EFI_ERROR (Status)) { break; - } + } } } else if (Info->UseMCast) { @@ -1063,15 +1063,15 @@ EfiPxeBcDiscover ( ON_EXIT: Private->Udp4Read->Configure (Private->Udp4Read, &Private->Udp4CfgData); - + // - // Dhcp(), Discover(), and Mtftp() set the IP filter, and return with the IP + // Dhcp(), Discover(), and Mtftp() set the IP filter, and return with the IP // receive filter list emptied and the filter set to EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP. // ZeroMem(&IpFilter, sizeof (EFI_PXE_BASE_CODE_IP_FILTER)); IpFilter.Filters = EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP; This->SetIpFilter (This, &IpFilter); - + return Status; } @@ -1172,8 +1172,8 @@ EfiPxeBcMtftp ( if ((This == NULL) || (Filename == NULL) || (BufferSize == NULL) || - ((ServerIp == NULL) || - (IP4_IS_UNSPECIFIED (NTOHL (ServerIp->Addr[0])) || + ((ServerIp == NULL) || + (IP4_IS_UNSPECIFIED (NTOHL (ServerIp->Addr[0])) || IP4_IS_LOCAL_BROADCAST (NTOHL (ServerIp->Addr[0])))) || ((BufferPtr == NULL) && DontUseBuffer) || ((BlockSize != NULL) && (*BlockSize < 512))) { @@ -1307,7 +1307,7 @@ EfiPxeBcMtftp ( ON_EXIT: Private->Udp4Read->Configure (Private->Udp4Read, &Private->Udp4CfgData); // - // Dhcp(), Discover(), and Mtftp() set the IP filter, and return with the IP + // Dhcp(), Discover(), and Mtftp() set the IP filter, and return with the IP // receive filter list emptied and the filter set to EFI_PXE_BASE_CODE_IP_FILTER_STATION_IP. // ZeroMem(&IpFilter, sizeof (EFI_PXE_BASE_CODE_IP_FILTER)); @@ -1454,7 +1454,7 @@ EfiPxeBcUdpWrite ( Private->CurrentUdpSrcPort = 0; return EFI_INVALID_PARAMETER; } - + ZeroMem (&Token, sizeof (EFI_UDP4_COMPLETION_TOKEN)); ZeroMem (&Udp4Session, sizeof (EFI_UDP4_SESSION_DATA)); @@ -2022,13 +2022,13 @@ EfiPxeBcSetIpFilter ( } } } - + // // Check whether we need reconfigure the UDP instance. // Udp4Cfg = &Private->Udp4CfgData; if ((AcceptPromiscuous != Udp4Cfg->AcceptPromiscuous) || - (AcceptBroadcast != Udp4Cfg->AcceptBroadcast) || MultiCastUpdate) { + (AcceptBroadcast != Udp4Cfg->AcceptBroadcast) || MultiCastUpdate) { // // Clear the UDP instance configuration, all joined groups will be left // during the operation. @@ -2326,13 +2326,13 @@ EfiPxeBcSetStationIP ( } if (NewStationIp != NULL) { - if (IP4_IS_UNSPECIFIED(NTOHL (NewStationIp->Addr[0])) || + if (IP4_IS_UNSPECIFIED(NTOHL (NewStationIp->Addr[0])) || IP4_IS_LOCAL_BROADCAST(NTOHL (NewStationIp->Addr[0])) || (NewSubnetMask != NULL && NewSubnetMask->Addr[0] != 0 && !NetIp4IsUnicast (NTOHL (NewStationIp->Addr[0]), NTOHL (NewSubnetMask->Addr[0])))) { return EFI_INVALID_PARAMETER; } } - + Private = PXEBC_PRIVATE_DATA_FROM_PXEBC (This); Mode = Private->PxeBc.Mode; @@ -2806,7 +2806,7 @@ EfiPxeLoadFile ( if (FilePath == NULL || !IsDevicePathEnd (FilePath)) { return EFI_INVALID_PARAMETER; } - + Private = PXEBC_PRIVATE_DATA_FROM_LOADFILE (This); PxeBc = &Private->PxeBc; NewMakeCallback = FALSE; @@ -2933,7 +2933,7 @@ EfiPxeLoadFile ( AsciiPrint ("\n NBP file downloaded successfully.\n"); // // The DHCP4 can have only one configured child instance so we need to stop - // reset the DHCP4 child before we return. Otherwise the other programs which + // reset the DHCP4 child before we return. Otherwise the other programs which // also need to use DHCP4 will be impacted. // The functionality of PXE Base Code protocol will not be stopped, // when downloading is successfully. diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcMtftp.c b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcMtftp.c index 8017b73dd7..88767c8394 100644 --- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcMtftp.c +++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcMtftp.c @@ -1,7 +1,7 @@ /** @file PxeBc MTFTP functions. - -Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.
+ +Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -25,19 +25,19 @@ CHAR8 *mMtftpOptions[PXE_MTFTP_OPTION_MAXIMUM_INDEX] = { /** This is a callback function when packets received/transmitted in Mtftp driver. - A callback function that is provided by the caller to intercept + A callback function that is provided by the caller to intercept the EFI_MTFTP4_OPCODE_DATA or EFI_MTFTP4_OPCODE_DATA8 packets processed in the - EFI_MTFTP4_PROTOCOL.ReadFile() function, and alternatively to intercept - EFI_MTFTP4_OPCODE_OACK or EFI_MTFTP4_OPCODE_ERROR packets during a call to + EFI_MTFTP4_PROTOCOL.ReadFile() function, and alternatively to intercept + EFI_MTFTP4_OPCODE_OACK or EFI_MTFTP4_OPCODE_ERROR packets during a call to EFI_MTFTP4_PROTOCOL.ReadFile(), WriteFile() or ReadDirectory(). - + @param This Pointer to Mtftp protocol instance @param Token Pointer to Mtftp token @param PacketLen Length of Mtftp packet @param Packet Pointer to Mtftp packet @retval EFI_SUCCESS Operation sucess - @retval EFI_ABORTED Abort transfer process + @retval EFI_ABORTED Abort transfer process **/ EFI_STATUS @@ -88,7 +88,7 @@ PxeBcCheckPacket ( /** This function is to get size of a file by Tftp. - + @param Private Pointer to PxeBc private data @param Config Pointer to Mtftp configuration data @param Filename Pointer to file name @@ -99,7 +99,7 @@ PxeBcCheckPacket ( @retval EFI_NOT_FOUND Parse the tftp ptions failed. @retval EFI_DEVICE_ERROR The network device encountered an error during this operation. @retval Other Has not get the size of the file. - + **/ EFI_STATUS PxeBcTftpGetFileSize ( @@ -227,7 +227,7 @@ ON_ERROR: @retval EFI_SUCCESS Read the data success from the special file. @retval EFI_DEVICE_ERROR The network device encountered an error during this operation. @retval other Read data from file failed. - + **/ EFI_STATUS PxeBcTftpReadFile ( @@ -310,7 +310,7 @@ PxeBcTftpReadFile ( @retval EFI_SUCCESS Write the data success into the special file. @retval EFI_DEVICE_ERROR The network device encountered an error during this operation. @retval other Write data into file failed. - + **/ EFI_STATUS PxeBcTftpWriteFile ( @@ -381,10 +381,10 @@ PxeBcTftpWriteFile ( @param BufferSize Pointer to buffer size. @param DontUseBuffer Indicate whether with a receive buffer. - @retval EFI_SUCCES Get the data from the file included in directory success. + @retval EFI_SUCCES Get the data from the file included in directory success. @retval EFI_DEVICE_ERROR The network device encountered an error during this operation. @retval other Operation failed. - + **/ EFI_STATUS PxeBcTftpReadDirectory ( diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcMtftp.h b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcMtftp.h index 241b079d72..903dd4fbb6 100644 --- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcMtftp.h +++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcMtftp.h @@ -1,7 +1,7 @@ /** @file Mtftp routines for PxeBc. - -Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.
+ +Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -27,7 +27,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** This function is to get size of a file by Tftp. - + @param Private Pointer to PxeBc private data @param Config Pointer to Mtftp configuration data @param Filename Pointer to file name @@ -38,7 +38,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. @retval EFI_NOT_FOUND Parse the tftp ptions failed. @retval EFI_DEVICE_ERROR The network device encountered an error during this operation. @retval Other Has not get the size of the file. - + **/ EFI_STATUS PxeBcTftpGetFileSize ( @@ -64,7 +64,7 @@ PxeBcTftpGetFileSize ( @retval EFI_SUCCESS Read the data success from the special file. @retval EFI_DEVICE_ERROR The network device encountered an error during this operation. @retval other Read data from file failed. - + **/ EFI_STATUS PxeBcTftpReadFile ( @@ -92,7 +92,7 @@ PxeBcTftpReadFile ( @retval EFI_SUCCESS Write the data success into the special file. @retval EFI_DEVICE_ERROR The network device encountered an error during this operation. @retval other Write data into file failed. - + **/ EFI_STATUS PxeBcTftpWriteFile ( @@ -117,10 +117,10 @@ PxeBcTftpWriteFile ( @param BufferSize Pointer to buffer size. @param DontUseBuffer Indicate whether with a receive buffer. - @retval EFI_SUCCES Get the data from the file included in directory success. + @retval EFI_SUCCES Get the data from the file included in directory success. @retval EFI_DEVICE_ERROR The network device encountered an error during this operation. @retval other Operation failed. - + **/ EFI_STATUS PxeBcTftpReadDirectory ( diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.c b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.c index c1cabca8b9..1401ca5ec2 100644 --- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.c +++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.c @@ -1,7 +1,7 @@ /** @file Support routines for PxeBc. -Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -42,7 +42,7 @@ PxeBcCommonNotify ( @param SubnetMask Pointer to the subnetmask of the station ip address. @param Gateway Pointer to the gateway ip address. @param SrcPort Pointer to the srouce port of the station. - @param Ttl The time to live field of the IP header. + @param Ttl The time to live field of the IP header. @param ToS The type of service field of the IP header. @retval EFI_SUCCESS The configuration settings were set, changed, or reset successfully. @@ -166,7 +166,7 @@ CvtNum ( @param Number The unsigned int number will be converted. @param Buffer Pointer to the buffer to store the decimal number after transform. @param[in] BufferSize The maxsize of the buffer. - + @return the length of the number after transform. **/ diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.h b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.h index 59e9b3276e..a28c9740c1 100644 --- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.h +++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/PxeBcSupport.h @@ -1,6 +1,6 @@ /** @file Support routines for PxeBc. -Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -16,7 +16,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** - The common notify function associated with various PxeBc events. + The common notify function associated with various PxeBc events. @param Event The event signaled. @param Context The context. @@ -38,7 +38,7 @@ PxeBcCommonNotify ( @param SubnetMask Pointer to the subnetmask of the station ip address. @param Gateway Pointer to the gateway ip address. @param SrcPort Pointer to the srouce port of the station. - @param Ttl The time to live field of the IP header. + @param Ttl The time to live field of the IP header. @param ToS The type of service field of the IP header. @retval EFI_SUCCESS The configuration settings were set, changed, or reset successfully. @@ -79,7 +79,7 @@ VOID PxeBcShowIp4Addr ( IN EFI_IPv4_ADDRESS *Ip ); - + /** Convert number to ASCII value. @@ -103,7 +103,7 @@ CvtNum ( @param Number The unsigned int number will be converted. @param Buffer Pointer to the buffer to store the decimal number after transform. @param[in] BufferSize The maxsize of the buffer. - + @return the length of the number after transform. **/ @@ -112,7 +112,7 @@ UtoA10 ( IN UINTN Number, IN CHAR8 *Buffer, IN UINTN BufferSize - + ); diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxe4BcDxe.uni b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxe4BcDxe.uni index 1770b15b6f..e97c3cadd9 100644 --- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxe4BcDxe.uni +++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxe4BcDxe.uni @@ -6,13 +6,13 @@ // Protocol to provide one clean way to otain control from the boot manager if the // boot patch is from the remote device. // -// Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxe4BcDxeExtra.uni b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxe4BcDxeExtra.uni index eb59002e3a..2c1bda1a8b 100644 --- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxe4BcDxeExtra.uni +++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxe4BcDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // UefiPxe4BcDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "UEFI PXE Base Code DXE Driver" diff --git a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf index fe8f210467..121d68ed26 100644 --- a/MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf +++ b/MdeModulePkg/Universal/Network/UefiPxeBcDxe/UefiPxeBcDxe.inf @@ -6,7 +6,7 @@ # Protocol to provide one clean way to otain control from the boot manager if the # boot patch is from the remote device. # -# Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
# This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License # which accompanies this distribution. The full text of the license may be found at @@ -34,7 +34,7 @@ # # VALID_ARCHITECTURES = IA32 X64 IPF # -# DRIVER_BINDING = gPxeBcDriverBinding +# DRIVER_BINDING = gPxeBcDriverBinding # COMPONENT_NAME = gPxeBcComponentName # COMPONENT_NAME2 = gPxeBcComponentName2 # @@ -51,7 +51,7 @@ PxeBcDhcp.c PxeBcMtftp.h PxeBcDriver.h - + [Packages] MdePkg/MdePkg.dec @@ -86,8 +86,8 @@ gEfiIp4ProtocolGuid ## TO_START gEfiIp4Config2ProtocolGuid ## TO_START -[Pcd] - gEfiMdeModulePkgTokenSpaceGuid.PcdTftpBlockSize ## SOMETIMES_CONSUMES +[Pcd] + gEfiMdeModulePkgTokenSpaceGuid.PcdTftpBlockSize ## SOMETIMES_CONSUMES [UserExtensions.TianoCore."ExtraFiles"] UefiPxe4BcDxeExtra.uni diff --git a/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDriver.c b/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDriver.c index 7dfea2e32a..91d0ed2b39 100644 --- a/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDriver.c +++ b/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDriver.c @@ -1,7 +1,7 @@ /** @file The driver binding for VLAN configuration module. -Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full @@ -279,7 +279,7 @@ VlanConfigDriverBindingStop ( if (NumberOfChildren != 1 || ChildHandleBuffer[0] != PrivateData->DriverHandle) { return EFI_DEVICE_ERROR; } - + return UninstallVlanConfigForm (PrivateData); } diff --git a/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.uni b/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.uni index dabec1f1c5..715bf8c5e2 100644 --- a/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.uni +++ b/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxe.uni @@ -4,13 +4,13 @@ // This module produces EFI HII Configuration Access Protocol to provide one way to // configurate VALN setting // -// Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxeExtra.uni b/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxeExtra.uni index 1c15b7cedb..d338520cab 100644 --- a/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxeExtra.uni +++ b/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // VlanConfigDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "VLAN Configuration DXE Driver" diff --git a/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigImpl.c b/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigImpl.c index f035706218..0bdffa2ee4 100644 --- a/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigImpl.c +++ b/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigImpl.c @@ -1,7 +1,7 @@ /** @file HII Config Access protocol implementation of VLAN configuration module. -Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full @@ -327,7 +327,7 @@ VlanCallback ( break; } } - + HiiSetBrowserData (&gVlanConfigFormSetGuid, mVlanStorageName, sizeof (VLAN_CONFIGURATION), (UINT8 *) Configuration, NULL); FreePool (Configuration); return EFI_SUCCESS; @@ -607,7 +607,7 @@ UninstallVlanConfigForm ( { EFI_STATUS Status; EFI_VLAN_CONFIG_PROTOCOL *VlanConfig; - + // // End the parent-child relationship. // diff --git a/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigStrings.uni b/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigStrings.uni index d7a1769ff4..0e658378f5 100644 --- a/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigStrings.uni +++ b/MdeModulePkg/Universal/Network/VlanConfigDxe/VlanConfigStrings.uni @@ -1,7 +1,7 @@ ///** @file // String definitions for VLAN Configuration Form. // -// Copyright (c) 2010 - 2011, Intel Corporation. All rights reserved.
+// Copyright (c) 2010 - 2018, Intel Corporation. All rights reserved.
// This program and the accompanying materials // are licensed and made available under the terms and conditions // of the BSD License which accompanies this distribution. The full @@ -35,4 +35,4 @@ #string STR_VLAN_REMOVE_VLAN_HELP #language en-US "Remove selected VLANs" #string STR_VLAN_NULL_STRING #language en-US "" #string STR_GET_CURRENT_SETTING #language en-US "Enter Configuration Menu" -#string STR_GET_CURRENT_SETTING_HELP #language en-US "Press ENTER to enter configuration menu for VLAN configuration." \ No newline at end of file +#string STR_GET_CURRENT_SETTING_HELP #language en-US "Press ENTER to enter configuration menu for VLAN configuration." diff --git a/MdeModulePkg/Universal/PCD/Dxe/Pcd.c b/MdeModulePkg/Universal/PCD/Dxe/Pcd.c index c30e9d3b15..bc308af1c5 100644 --- a/MdeModulePkg/Universal/PCD/Dxe/Pcd.c +++ b/MdeModulePkg/Universal/PCD/Dxe/Pcd.c @@ -3,7 +3,7 @@ produce the implementation of native PCD protocol and EFI_PCD_PROTOCOL defined in PI 1.4a Vol3. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -22,7 +22,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. EFI_LOCK mPcdDatabaseLock = EFI_INITIALIZE_LOCK_VARIABLE(TPL_NOTIFY); /// -/// PCD_PROTOCOL the EDKII native implementation which support dynamic +/// PCD_PROTOCOL the EDKII native implementation which support dynamic /// type and dynamicEx type PCDs. /// PCD_PROTOCOL mPcdInstance = { @@ -112,9 +112,9 @@ EFI_HANDLE mPcdHandle = NULL; /** Main entry for PCD DXE driver. - + This routine initialize the PCD database and install PCD_PROTOCOL. - + @param ImageHandle Image handle for PCD DXE driver. @param SystemTable Pointer to SystemTable. @@ -245,21 +245,21 @@ DxeGetPcdInfoGetSku ( /** Sets the SKU value for subsequent calls to set or get PCD token values. - SetSku() sets the SKU Id to be used for subsequent calls to set or get PCD values. + SetSku() sets the SKU Id to be used for subsequent calls to set or get PCD values. SetSku() is normally called only once by the system. - For each item (token), the database can hold a single value that applies to all SKUs, - or multiple values, where each value is associated with a specific SKU Id. Items with multiple, - SKU-specific values are called SKU enabled. - + For each item (token), the database can hold a single value that applies to all SKUs, + or multiple values, where each value is associated with a specific SKU Id. Items with multiple, + SKU-specific values are called SKU enabled. + The SKU Id of zero is reserved as a default. - For tokens that are not SKU enabled, the system ignores any set SKU Id and works with the - single value for that token. For SKU-enabled tokens, the system will use the SKU Id set by the - last call to SetSku(). If no SKU Id is set or the currently set SKU Id isn't valid for the specified token, - the system uses the default SKU Id. If the system attempts to use the default SKU Id and no value has been + For tokens that are not SKU enabled, the system ignores any set SKU Id and works with the + single value for that token. For SKU-enabled tokens, the system will use the SKU Id set by the + last call to SetSku(). If no SKU Id is set or the currently set SKU Id isn't valid for the specified token, + the system uses the default SKU Id. If the system attempts to use the default SKU Id and no value has been set for that Id, the results are unpredictable. - @param[in] SkuId The SKU value that will be used when the PCD service will retrieve and + @param[in] SkuId The SKU value that will be used when the PCD service will retrieve and set values associated with a PCD token. **/ @@ -318,13 +318,13 @@ DxePcdSetSku ( /** Retrieves an 8-bit value for a given PCD token. - Retrieves the current byte-sized value for a PCD token number. + Retrieves the current byte-sized value for a PCD token number. If the TokenNumber is invalid, the results are unpredictable. - - @param[in] TokenNumber The PCD token number. + + @param[in] TokenNumber The PCD token number. @return The UINT8 value. - + **/ UINT8 EFIAPI @@ -338,13 +338,13 @@ DxePcdGet8 ( /** Retrieves an 16-bit value for a given PCD token. - Retrieves the current 16-bits value for a PCD token number. + Retrieves the current 16-bits value for a PCD token number. If the TokenNumber is invalid, the results are unpredictable. - - @param[in] TokenNumber The PCD token number. + + @param[in] TokenNumber The PCD token number. @return The UINT16 value. - + **/ UINT16 EFIAPI @@ -358,13 +358,13 @@ DxePcdGet16 ( /** Retrieves an 32-bit value for a given PCD token. - Retrieves the current 32-bits value for a PCD token number. + Retrieves the current 32-bits value for a PCD token number. If the TokenNumber is invalid, the results are unpredictable. - - @param[in] TokenNumber The PCD token number. + + @param[in] TokenNumber The PCD token number. @return The UINT32 value. - + **/ UINT32 EFIAPI @@ -378,13 +378,13 @@ DxePcdGet32 ( /** Retrieves an 64-bit value for a given PCD token. - Retrieves the current 64-bits value for a PCD token number. + Retrieves the current 64-bits value for a PCD token number. If the TokenNumber is invalid, the results are unpredictable. - - @param[in] TokenNumber The PCD token number. + + @param[in] TokenNumber The PCD token number. @return The UINT64 value. - + **/ UINT64 EFIAPI @@ -398,15 +398,15 @@ DxePcdGet64 ( /** Retrieves a pointer to a value for a given PCD token. - Retrieves the current pointer to the buffer for a PCD token number. - Do not make any assumptions about the alignment of the pointer that - is returned by this function call. If the TokenNumber is invalid, + Retrieves the current pointer to the buffer for a PCD token number. + Do not make any assumptions about the alignment of the pointer that + is returned by this function call. If the TokenNumber is invalid, the results are unpredictable. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @return The pointer to the buffer to be retrived. - + **/ VOID * EFIAPI @@ -420,15 +420,15 @@ DxePcdGetPtr ( /** Retrieves a Boolean value for a given PCD token. - Retrieves the current boolean value for a PCD token number. - Do not make any assumptions about the alignment of the pointer that - is returned by this function call. If the TokenNumber is invalid, + Retrieves the current boolean value for a PCD token number. + Do not make any assumptions about the alignment of the pointer that + is returned by this function call. If the TokenNumber is invalid, the results are unpredictable. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @return The Boolean value. - + **/ BOOLEAN EFIAPI @@ -442,13 +442,13 @@ DxePcdGetBool ( /** Retrieves the size of the value for a given PCD token. - Retrieves the current size of a particular PCD token. + Retrieves the current size of a particular PCD token. If the TokenNumber is invalid, the results are unpredictable. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @return The size of the value for the PCD token. - + **/ UINTN EFIAPI @@ -470,23 +470,23 @@ DxePcdGetSize ( // // Backup the TokenNumber passed in as GetPtrTypeSize need the original TokenNumber - // + // TmpTokenNumber = TokenNumber; // EBC compiler is very choosy. It may report warning about comparison - // between UINTN and 0 . So we add 1 in each size of the + // between UINTN and 0 . So we add 1 in each size of the // comparison. ASSERT (TokenNumber + 1 < mPcdTotalTokenCount + 1); // EBC compiler is very choosy. It may report warning about comparison - // between UINTN and 0 . So we add 1 in each size of the + // between UINTN and 0 . So we add 1 in each size of the // comparison. IsPeiDb = (BOOLEAN) (TokenNumber + 1 < mPeiLocalTokenCount + 1); - - TokenNumber = IsPeiDb ? TokenNumber : + + TokenNumber = IsPeiDb ? TokenNumber : (TokenNumber - mPeiLocalTokenCount); - LocalTokenNumberTable = IsPeiDb ? (UINT32 *)((UINT8 *)mPcdDatabase.PeiDb + mPcdDatabase.PeiDb->LocalTokenNumberTableOffset) + LocalTokenNumberTable = IsPeiDb ? (UINT32 *)((UINT8 *)mPcdDatabase.PeiDb + mPcdDatabase.PeiDb->LocalTokenNumberTableOffset) : (UINT32 *)((UINT8 *)mPcdDatabase.DxeDb + mPcdDatabase.DxeDb->LocalTokenNumberTableOffset); Size = (LocalTokenNumberTable[TokenNumber] & PCD_DATUM_TYPE_ALL_SET) >> PCD_DATUM_TYPE_SHIFT; @@ -505,16 +505,16 @@ DxePcdGetSize ( /** Retrieves an 8-bit value for a given PCD token. - Retrieves the 8-bit value of a particular PCD token. + Retrieves the 8-bit value of a particular PCD token. If the TokenNumber is invalid or the token space - specified by Guid does not exist, the results are + specified by Guid does not exist, the results are unpredictable. @param[in] Guid The token space for the token number. - @param[in] ExTokenNumber The PCD token number. + @param[in] ExTokenNumber The PCD token number. @return The size 8-bit value for the PCD token. - + **/ UINT8 EFIAPI @@ -529,16 +529,16 @@ DxePcdGet8Ex ( /** Retrieves an 16-bit value for a given PCD token. - Retrieves the 16-bit value of a particular PCD token. + Retrieves the 16-bit value of a particular PCD token. If the TokenNumber is invalid or the token space - specified by Guid does not exist, the results are + specified by Guid does not exist, the results are unpredictable. @param[in] Guid The token space for the token number. - @param[in] ExTokenNumber The PCD token number. + @param[in] ExTokenNumber The PCD token number. @return The size 16-bit value for the PCD token. - + **/ UINT16 EFIAPI @@ -553,16 +553,16 @@ DxePcdGet16Ex ( /** Retrieves an 32-bit value for a given PCD token. - Retrieves the 32-bit value of a particular PCD token. + Retrieves the 32-bit value of a particular PCD token. If the TokenNumber is invalid or the token space - specified by Guid does not exist, the results are + specified by Guid does not exist, the results are unpredictable. @param[in] Guid The token space for the token number. - @param[in] ExTokenNumber The PCD token number. + @param[in] ExTokenNumber The PCD token number. @return The size 32-bit value for the PCD token. - + **/ UINT32 EFIAPI @@ -577,16 +577,16 @@ DxePcdGet32Ex ( /** Retrieves an 64-bit value for a given PCD token. - Retrieves the 64-bit value of a particular PCD token. + Retrieves the 64-bit value of a particular PCD token. If the TokenNumber is invalid or the token space - specified by Guid does not exist, the results are + specified by Guid does not exist, the results are unpredictable. @param[in] Guid The token space for the token number. - @param[in] ExTokenNumber The PCD token number. + @param[in] ExTokenNumber The PCD token number. @return The size 64-bit value for the PCD token. - + **/ UINT64 EFIAPI @@ -601,16 +601,16 @@ DxePcdGet64Ex ( /** Retrieves a pointer to a value for a given PCD token. - Retrieves the current pointer to the buffer for a PCD token number. - Do not make any assumptions about the alignment of the pointer that - is returned by this function call. If the TokenNumber is invalid, + Retrieves the current pointer to the buffer for a PCD token number. + Do not make any assumptions about the alignment of the pointer that + is returned by this function call. If the TokenNumber is invalid, the results are unpredictable. @param[in] Guid The token space for the token number. - @param[in] ExTokenNumber The PCD token number. + @param[in] ExTokenNumber The PCD token number. @return The pointer to the buffer to be retrived. - + **/ VOID * EFIAPI @@ -625,16 +625,16 @@ DxePcdGetPtrEx ( /** Retrieves an Boolean value for a given PCD token. - Retrieves the Boolean value of a particular PCD token. + Retrieves the Boolean value of a particular PCD token. If the TokenNumber is invalid or the token space - specified by Guid does not exist, the results are + specified by Guid does not exist, the results are unpredictable. @param[in] Guid The token space for the token number. - @param[in] ExTokenNumber The PCD token number. + @param[in] ExTokenNumber The PCD token number. @return The size Boolean value for the PCD token. - + **/ BOOLEAN EFIAPI @@ -649,14 +649,14 @@ DxePcdGetBoolEx ( /** Retrieves the size of the value for a given PCD token. - Retrieves the current size of a particular PCD token. + Retrieves the current size of a particular PCD token. If the TokenNumber is invalid, the results are unpredictable. @param[in] Guid The token space for the token number. - @param[in] ExTokenNumber The PCD token number. + @param[in] ExTokenNumber The PCD token number. @return The size of the value for the PCD token. - + **/ UINTN EFIAPI @@ -671,19 +671,19 @@ DxePcdGetSizeEx ( /** Sets an 8-bit value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -698,19 +698,19 @@ DxePcdSet8 ( /** Sets an 16-bit value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -725,19 +725,19 @@ DxePcdSet16 ( /** Sets an 32-bit value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -752,19 +752,19 @@ DxePcdSet32 ( /** Sets an 64-bit value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -779,23 +779,23 @@ DxePcdSet64 ( /** Sets a value of a specified size for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. - @param[in] TokenNumber The PCD token number. - @param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token. - On input, if the SizeOfValue is greater than the maximum size supported - for this TokenNumber then the output value of SizeOfValue will reflect + @param[in] TokenNumber The PCD token number. + @param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token. + On input, if the SizeOfValue is greater than the maximum size supported + for this TokenNumber then the output value of SizeOfValue will reflect the maximum size supported for this TokenNumber. @param[in] Buffer The buffer to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -811,19 +811,19 @@ DxePcdSetPtr ( /** Sets an Boolean value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -838,20 +838,20 @@ DxePcdSetBool ( /** Sets an 8-bit value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. - @param[in] ExTokenNumber The PCD token number. + @param[in] ExTokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -867,20 +867,20 @@ DxePcdSet8Ex ( /** Sets an 16-bit value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. - @param[in] ExTokenNumber The PCD token number. + @param[in] ExTokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -896,20 +896,20 @@ DxePcdSet16Ex ( /** Sets an 32-bit value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. - @param[in] ExTokenNumber The PCD token number. + @param[in] ExTokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -925,20 +925,20 @@ DxePcdSet32Ex ( /** Sets an 64-bit value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. - @param[in] ExTokenNumber The PCD token number. + @param[in] ExTokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -954,24 +954,24 @@ DxePcdSet64Ex ( /** Sets a value of a specified size for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. - @param[in] ExTokenNumber The PCD token number. - @param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token. - On input, if the SizeOfValue is greater than the maximum size supported - for this TokenNumber then the output value of SizeOfValue will reflect + @param[in] ExTokenNumber The PCD token number. + @param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token. + On input, if the SizeOfValue is greater than the maximum size supported + for this TokenNumber then the output value of SizeOfValue will reflect the maximum size supported for this TokenNumber. @param[in] Buffer The buffer to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -988,20 +988,20 @@ DxePcdSetPtrEx ( /** Sets an Boolean value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. - @param[in] ExTokenNumber The PCD token number. + @param[in] ExTokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -1018,10 +1018,10 @@ DxePcdSetBoolEx ( Specifies a function to be called anytime the value of a designated token is changed. @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. - @param[in] TokenNumber The PCD token number. - @param[in] CallBackFunction The function prototype called when the value associated with the CallBackToken is set. + @param[in] TokenNumber The PCD token number. + @param[in] CallBackFunction The function prototype called when the value associated with the CallBackToken is set. - @retval EFI_SUCCESS The PCD service has successfully established a call event + @retval EFI_SUCCESS The PCD service has successfully established a call event for the CallBackToken requested. @retval EFI_NOT_FOUND The PCD service could not find the referenced token number. @@ -1035,7 +1035,7 @@ DxeRegisterCallBackOnSet ( ) { EFI_STATUS Status; - + if (CallBackFunction == NULL) { return EFI_INVALID_PARAMETER; } @@ -1047,7 +1047,7 @@ DxeRegisterCallBackOnSet ( Status = DxeRegisterCallBackWorker (TokenNumber, Guid, CallBackFunction); EfiReleaseLock (&mPcdDatabaseLock); - + return Status; } @@ -1055,10 +1055,10 @@ DxeRegisterCallBackOnSet ( Cancels a previously set callback function for a particular PCD token number. @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. - @param[in] TokenNumber The PCD token number. - @param[in] CallBackFunction The function prototype called when the value associated with the CallBackToken is set. + @param[in] TokenNumber The PCD token number. + @param[in] CallBackFunction The function prototype called when the value associated with the CallBackToken is set. - @retval EFI_SUCCESS The PCD service has successfully established a call event + @retval EFI_SUCCESS The PCD service has successfully established a call event for the CallBackToken requested. @retval EFI_NOT_FOUND The PCD service could not find the referenced token number. @@ -1072,7 +1072,7 @@ DxeUnRegisterCallBackOnSet ( ) { EFI_STATUS Status; - + if (CallBackFunction == NULL) { return EFI_INVALID_PARAMETER; } @@ -1081,35 +1081,35 @@ DxeUnRegisterCallBackOnSet ( // Aquire lock to prevent reentrance from TPL_CALLBACK level // EfiAcquireLock (&mPcdDatabaseLock); - + Status = DxeUnRegisterCallBackWorker (TokenNumber, Guid, CallBackFunction); EfiReleaseLock (&mPcdDatabaseLock); - + return Status; } /** - Retrieves the next valid token number in a given namespace. - - This is useful since the PCD infrastructure contains a sparse list of token numbers, - and one cannot a priori know what token numbers are valid in the database. - - If TokenNumber is 0 and Guid is not NULL, then the first token from the token space specified by Guid is returned. - If TokenNumber is not 0 and Guid is not NULL, then the next token in the token space specified by Guid is returned. - If TokenNumber is 0 and Guid is NULL, then the first token in the default token space is returned. - If TokenNumber is not 0 and Guid is NULL, then the next token in the default token space is returned. - The token numbers in the default token space may not be related to token numbers in token spaces that are named by Guid. - If the next token number can be retrieved, then it is returned in TokenNumber, and EFI_SUCCESS is returned. - If TokenNumber represents the last token number in the token space specified by Guid, then EFI_NOT_FOUND is returned. + Retrieves the next valid token number in a given namespace. + + This is useful since the PCD infrastructure contains a sparse list of token numbers, + and one cannot a priori know what token numbers are valid in the database. + + If TokenNumber is 0 and Guid is not NULL, then the first token from the token space specified by Guid is returned. + If TokenNumber is not 0 and Guid is not NULL, then the next token in the token space specified by Guid is returned. + If TokenNumber is 0 and Guid is NULL, then the first token in the default token space is returned. + If TokenNumber is not 0 and Guid is NULL, then the next token in the default token space is returned. + The token numbers in the default token space may not be related to token numbers in token spaces that are named by Guid. + If the next token number can be retrieved, then it is returned in TokenNumber, and EFI_SUCCESS is returned. + If TokenNumber represents the last token number in the token space specified by Guid, then EFI_NOT_FOUND is returned. If TokenNumber is not present in the token space specified by Guid, then EFI_NOT_FOUND is returned. - @param[in] Guid The 128-bit unique value that designates the namespace from which to retrieve the next token. - This is an optional parameter that may be NULL. If this parameter is NULL, then a request is + @param[in] Guid The 128-bit unique value that designates the namespace from which to retrieve the next token. + This is an optional parameter that may be NULL. If this parameter is NULL, then a request is being made to retrieve tokens from the default token space. - @param[in, out] TokenNumber - A pointer to the PCD token number to use to find the subsequent token number. + @param[in, out] TokenNumber + A pointer to the PCD token number to use to find the subsequent token number. @retval EFI_SUCCESS The PCD service has retrieved the next valid token number. @retval EFI_NOT_FOUND The PCD service could not find data from the requested token number. @@ -1135,18 +1135,18 @@ DxePcdGetNextToken ( // if (Guid == NULL) { // EBC compiler is very choosy. It may report warning about comparison - // between UINTN and 0 . So we add 1 in each size of the + // between UINTN and 0 . So we add 1 in each size of the // comparison. if (((*TokenNumber + 1 > mPeiNexTokenCount + 1) && (*TokenNumber + 1 <= mPeiLocalTokenCount + 1)) || ((*TokenNumber + 1 > (mPeiLocalTokenCount + mDxeNexTokenCount + 1)))) { return EFI_NOT_FOUND; } - + (*TokenNumber)++; if ((*TokenNumber + 1 > mPeiNexTokenCount + 1) && (*TokenNumber + 1 <= mPeiLocalTokenCount + 1)) { // - // The first Non-Ex type Token Number for DXE PCD + // The first Non-Ex type Token Number for DXE PCD // database is mPeiLocalTokenCount + 1 // if (mDxeNexTokenCount > 0) { @@ -1249,9 +1249,9 @@ GetDistinctTokenSpace ( // *ExMapTableSize = TsIdx + 1; return DistinctTokenSpace; - + } - + /** Retrieves the next valid PCD token namespace for a given namespace. @@ -1263,7 +1263,7 @@ GetDistinctTokenSpace ( token namespace on the platform. If *Guid is NULL, then the GUID of the first token space of the current platform is returned. If the search cannot locate the next valid token namespace, an error is returned and the value of *Guid is undefined. - + @retval EFI_SUCCESS The PCD service retrieved the value requested. @retval EFI_NOT_FOUND The PCD service could not find the next valid token namespace. @@ -1286,14 +1286,14 @@ DxePcdGetNextTokenSpace ( BOOLEAN DxeExMapTableEmpty; ASSERT (Guid != NULL); - + PeiExMapTableEmpty = mPeiExMapTableEmpty; DxeExMapTableEmpty = mDxeExMapTableEmpty; if (PeiExMapTableEmpty && DxeExMapTableEmpty) { return EFI_NOT_FOUND; } - + if (TmpTokenSpaceBuffer[0] == NULL) { PeiTokenSpaceTableSize = 0; @@ -1340,7 +1340,7 @@ DxePcdGetNextTokenSpace ( *Guid = TmpTokenSpaceBuffer[0]; return EFI_SUCCESS; } - + for (Idx = 0; Idx < TmpTokenSpaceBufferCount; Idx++) { if (CompareGuid (*Guid, TmpTokenSpaceBuffer[Idx])) { if (Idx == TmpTokenSpaceBufferCount - 1) { diff --git a/MdeModulePkg/Universal/PCD/Dxe/Pcd.inf b/MdeModulePkg/Universal/PCD/Dxe/Pcd.inf index a20b645a45..e6b3e0d920 100644 --- a/MdeModulePkg/Universal/PCD/Dxe/Pcd.inf +++ b/MdeModulePkg/Universal/PCD/Dxe/Pcd.inf @@ -1,19 +1,19 @@ ## @file # PCD DXE driver manage database contains all dynamic PCD entries and produce the implementation of PCD protocol. # -# This version PCD DXE depends on the external PCD database binary file, not built in PCD data base. +# This version PCD DXE depends on the external PCD database binary file, not built in PCD data base. # There are two PCD Protocols as follows: -# 1) PCD_PROTOCOL +# 1) PCD_PROTOCOL # It is EDKII implementation which support Dynamic/DynamicEx type Pcds. # 2) EFI_PCD_PROTOCOL -# It is defined by PI specification 1.2, Vol 3 which only support dynamicEx +# It is defined by PI specification 1.2, Vol 3 which only support dynamicEx # type Pcd. # -# For dynamicEx type PCD, it is compatible between PCD_PROTOCOL and EFI_PCD_PROTOCOL. +# For dynamicEx type PCD, it is compatible between PCD_PROTOCOL and EFI_PCD_PROTOCOL. # PCD DXE driver will produce above two protocols at same time. # -# PCD database is generated as the separate binary image at build time. The binary image -# will be intergrated into Firmware volume together with PCD driver. +# PCD database is generated as the separate binary image at build time. The binary image +# will be intergrated into Firmware volume together with PCD driver. # # //////////////////////////////////////////////////////////////////////////////// # // // @@ -22,94 +22,94 @@ # //////////////////////////////////////////////////////////////////////////////// # # 1, Introduction -# PCD database hold all dynamic type PCD information. The structure of PEI PCD -# database is generated by build tools according to dynamic PCD usage for +# PCD database hold all dynamic type PCD information. The structure of PEI PCD +# database is generated by build tools according to dynamic PCD usage for # specified platform. -# +# # 2, Dynamic Type PCD # Dynamic type PCD is used for the configuration/setting which value is determined -# dynamic. In contrast, the value of static type PCD (FeatureFlag, FixedPcd, -# PatchablePcd) is fixed in final generated FD image in build time. -# +# dynamic. In contrast, the value of static type PCD (FeatureFlag, FixedPcd, +# PatchablePcd) is fixed in final generated FD image in build time. +# # 2.1 The "dynamic" determination means one of below cases: -# a) The PCD setting value is produced by someone driver and consumed by +# a) The PCD setting value is produced by someone driver and consumed by # other driver in execution time. # b) The PCD setting value is set/get by user from FrontPage. # c) The PCD setting value is produced by platform OEM vendor in specified area. -# +# # 2.2 According to module distribution way, dynamic PCD could be classfied as: # a) Dynamic: -# If module is released in source code and will be built with platform +# If module is released in source code and will be built with platform # DSC, the dynamic PCD used by this module can be accessed as: -# PcdGetxx(PcdSampleDynamicPcd); +# PcdGetxx(PcdSampleDynamicPcd); # In building platform, build tools will translate PcdSampleDynamicPcd to -# pair of {Token Space Guid: Token Number} for this PCD. +# pair of {Token Space Guid: Token Number} for this PCD. # b) DynamicEx: # If module is release as binary and will not pariticpate platform building, # the dynamic PCD used by this module need be accessed as: # PcdGetxxEx(gEfiMyTokenspaceGuid, PcdSampleDynamicPcd) # Developer need explicity gives {Token Space Guid:Token Number} as parameter # in writting source code. -# +# # 2.3 According to PCD value's storage method, dynamic PCD could be classfied as: -# a) Default Storage: -# - The PCD value is stored in PCD database maintained by PCD driver in boot +# a) Default Storage: +# - The PCD value is stored in PCD database maintained by PCD driver in boot # time memory. -# - This type is used for communication between PEIM/DXE driver, DXE/DXE -# driver. But all set/get value will be losted after boot-time memory +# - This type is used for communication between PEIM/DXE driver, DXE/DXE +# driver. But all set/get value will be losted after boot-time memory # is turn off. -# - [PcdsDynamicDefault] is used as section name for this type PCD in +# - [PcdsDynamicDefault] is used as section name for this type PCD in # platform DSC file. [PcdsDynamicExDefault] is used for dynamicEx type PCD. -# -# b) Variable Storage: -# - The PCD value is stored in variable area. +# +# b) Variable Storage: +# - The PCD value is stored in variable area. # - As default storage type, this type PCD could be used for PEI/DXE driver -# communication. But beside it, this type PCD could also be used to store +# communication. But beside it, this type PCD could also be used to store # the value associate with a HII setting via variable interface. -# - In PEI phase, the PCD value could only be got but can not be set due +# - In PEI phase, the PCD value could only be got but can not be set due # to variable area is readonly. -# - [PcdsDynamicHii] is used as section name for this type PCD in platform +# - [PcdsDynamicHii] is used as section name for this type PCD in platform # DSC file. [PcdsDynamicExHii] is for dynamicEx type PCD. -# +# # c) OEM specificed storage area: -# - The PCD value is stored in OEM specified area which base address is +# - The PCD value is stored in OEM specified area which base address is # specified by a FixedAtBuild PCD setting - PcdVpdBaseAddress. # - The area is read only for PEI and DXE phase. -# - [PcdsDynamicVpd] is used as section name for this type PCD in platform +# - [PcdsDynamicVpd] is used as section name for this type PCD in platform # DSC file. [PcdsDynamicExVpd] is for dynamicex type PCD. -# +# # 2.4 When and how to use dynamic PCD # Module developer do not care the used PCD is dynamic or static when writting -# source code/INF. Dynamic PCD and dynamic type is pointed by platform integrator +# source code/INF. Dynamic PCD and dynamic type is pointed by platform integrator # in platform DSC file. Please ref section 2.3 to get matching between dynamic # PCD type and section name in DSC file. -# +# # 3, PCD database: -# Although dynamic PCD could be in different storage type as above description, +# Although dynamic PCD could be in different storage type as above description, # but the basic information and default value for all dynamic PCD is hold # by PCD database maintained by PEI/DXE driver. -# +# # As the whole EFI BIOS boot path is divided into PEI/DXE phase, the PCD database # also is divided into Pei/Dxe database maintaied by PcdPeim/PcdDxe driver separatly. # To make PcdPeim's driver image smaller, PEI PCD database only hold all dynamic # PCD information used in PEI phase or use in both PEI/DXE phase. And DXE PCD # database contains all PCDs used in PEI/DXE phase in memory. -# -# Build tool will generate PCD database into the separate binary file for -# PEI/DXE PCD driver according to dynamic PCD section in platform DSC file. -# +# +# Build tool will generate PCD database into the separate binary file for +# PEI/DXE PCD driver according to dynamic PCD section in platform DSC file. +# # 3.1 PcdPeim and PcdDxe # PEI PCD database is maintained by PcdPeim driver run from flash. PcdPeim driver -# build guid hob in temporary memory and copy the binary data base from flash -# to temporary memory for PEI PCD database. +# build guid hob in temporary memory and copy the binary data base from flash +# to temporary memory for PEI PCD database. # DXE PCD database is maintained by PcdDxe driver.At entry point of PcdDxe driver, # a new PCD database is allocated in boot-time memory which including all # PEI PCD and DXE PCD entry. -# +# # Pcd driver should run as early as possible before any other driver access # dynamic PCD's value. PEI/DXE "Apriori File" mechanism make it possible by # making PcdPeim/PcdDxe as first dispatching driver in PEI/DXE phase. -# +# # 3.2 Token space Guid/Token number, Platform token, Local token number # Dynamic PCD # +-----------+ +---------+ @@ -129,42 +129,42 @@ # | Token | # | Number | # +-----------+ -# -# +# +# # 3.2.1 Pair of Token space guid + Token number # Any type PCD is identified by pair of "TokenSpaceGuid + TokeNumber". But it -# is not easy maintained by PCD driver, and hashed token number will make -# searching slowly. +# is not easy maintained by PCD driver, and hashed token number will make +# searching slowly. # # 3.2.2 Platform Token Number -# "Platform token number" concept is introduced for mapping to a pair of -# "TokenSpaceGuid + TokenNumber". The platform token number is generated by -# build tool in autogen.h and all of them are continual in a platform scope +# "Platform token number" concept is introduced for mapping to a pair of +# "TokenSpaceGuid + TokenNumber". The platform token number is generated by +# build tool in autogen.h and all of them are continual in a platform scope # started from 1.(0 meaning invalid internal token number) # With auto-generated "platform token number", PcdGet(PcdSampleDynamicPcd) -# in source code is translated to LibPcdGet(_PCD_TOKEN_PcdSampleDynamicPcd) +# in source code is translated to LibPcdGet(_PCD_TOKEN_PcdSampleDynamicPcd) # in autogen.h. # Notes: The mapping between pair of "tokenspace guid + token number" and # "internal token number" need build tool establish, so "platform token number" # mechanism is not suitable for binary module which use DynamicEx type PCD. # To access a dynamicEx type PCD, pair of "token space guid/token number" all need # to be specificed for PcdSet/PcdGet accessing macro. -# -# Platform Token Number is started from 1, and inceased continuous. From whole +# +# Platform Token Number is started from 1, and inceased continuous. From whole # platform scope, there are two zones: PEI Zone and DXE Zone # | Platform Token Number # ----------|---------------------------------------------------------------- # PEI Zone: | 1 ~ PEI_LOCAL_TOKEN_NUMBER # DXE Zone: | (PEI_LOCAL_TOKEN_NUMBER + 1) ~ (PEI_LOCAL_TOKEN_NUMBER + DXE_LOCAL_TOKEN_NUMBER) -# +# # 3.2.3 Local Token Number -# To fast searching a PCD entry in PCD database, PCD driver translate +# To fast searching a PCD entry in PCD database, PCD driver translate # platform token number to local token number via a mapping table. # For binary DynamicEx type PCD, there is a another mapping table to translate # "token space guid + token number" to local token number directly. # Local token number is identifier for all internal interface in PCD PEI/DXE # driver. -# +# # A local token number is a 32-bit value in following meaning: # 32 ------------- 28 ---------- 24 -------- 0 # | PCD type mask | Datum Type | Offset | @@ -184,13 +184,13 @@ # Offset : indicate the related offset of PCD value in PCD database array. # Based on local token number, PCD driver could fast determine PCD type, value # type and get PCD entry from PCD database. -# +# # 3.3 PCD Database binary file -# PCD Database binary file will be created at build time as the standalone binary image. -# To understand the binary image layout, PCD Database C structure is still generated +# PCD Database binary file will be created at build time as the standalone binary image. +# To understand the binary image layout, PCD Database C structure is still generated # as comments by build tools in PCD driver's autogen.h/ # autogen.c file. In generated C structure, following information is stored: -# - ExMapTable: This table is used translate a binary dynamicex type PCD's +# - ExMapTable: This table is used translate a binary dynamicex type PCD's # "tokenguid + token" to local token number. # - LocalTokenNumberTable: # This table stores all local token number in array, use "Internal @@ -200,19 +200,19 @@ # HII type PCD's variable GUID. # - SkuIdTable: TBD # - SystemSkuId: TBD -# - PCD value structure: +# - PCD value structure: # Every PCD has a value record in PCD database. For different -# datum type PCD has different record structure which will be +# datum type PCD has different record structure which will be # introduced in 3.3.1 -# -# In a PCD database structure, there are two major area: Init and UnInit. -# Init area is use stored above PCD internal structure such as ExMapTable, -# LocalTokenNumberTable etc and the (default) value of PCD which has default +# +# In a PCD database structure, there are two major area: Init and UnInit. +# Init area is use stored above PCD internal structure such as ExMapTable, +# LocalTokenNumberTable etc and the (default) value of PCD which has default # value specified in platform DSC file. # Unint area is used stored the value of PCD which has no default value in # platform DSC file, the value of NULL, 0 specified in platform DSC file can # be seemed as "no default value". -# +# # 3.3.1 Simple Sample PCD Database C Structure # A general sample of PCD database structue is as follows: # typedef struct _PCD_DATABASE { @@ -224,7 +224,7 @@ # SIZE_INFO SizeTable[PEI_SIZE_TABLE_SIZE]; # UINT8 SkuIdTable[PEI_SKUID_TABLE_SIZE]; # SKU_ID SystemSkuId; -# +# # //===== Following is value structure for PCD with default value # .... # .... @@ -236,11 +236,11 @@ # .... # } UnInit; # } -# +# # 3.3.2 PCD value structure in PCD database C structure # The value's structure is generated by build tool in PCD database C structure. # The PCDs in different datum type has different value structure. -# +# # 3.3.2.1 UINT8/UINT16/UINT32/UINT64 datum type PCD # The C structure for these datum type PCD is just a UINT8/UINT16/UINT32/UINT64 # data member in PCD database, For example: @@ -248,36 +248,36 @@ # Above structure is generated by build tool, the member name is "PcdCName_Guidvalue" # Member type is UINT16 according to PcdHardwareErrorRecordLevel declaration # in DEC file. -# +# # 3.3.2.2 VOID* datum type PCD # The value of VOID* datum type PCD is a UINT8/UINT16 array in PCD database. -# +# # 3.3.2.2.1 VOID* - string type -# If the default value for VOID* datum type PCD like L"xxx", the PCD is -# used for unicode string, and C structure of this datum type PCD is +# If the default value for VOID* datum type PCD like L"xxx", the PCD is +# used for unicode string, and C structure of this datum type PCD is # UINT16 string array in PCD database, for example: # UINT16 StringTable[29]; # The number of 29 in above sample is max size of a unicode string. -# +# # If the default value for VOID* datum type PCD like "xxx", the PCD is -# used for ascii string, and C structure of this datum type PCD is +# used for ascii string, and C structure of this datum type PCD is # UINT8 string array in PCD database, for example: # UINT8 StringTable[20]; # The number of 20 in above sample is max size of a ascii string. -# +# # 3.3.2.2.2 VOID* - byte array # If the default value of VOID* datum type PCD like {'0x29', '0x01', '0xf2'} -# the PCD is used for byte array. The generated structrue is same as +# the PCD is used for byte array. The generated structrue is same as # above ascii string table, # UINT8 StringTable[13]; # The number of 13 in above sample is max size of byte array. -# +# # 3.3.3 Some utility structures in PCD Database # 3.3.3.1 GuidTable # GuidTable array is used to store all related GUID value in PCD database: # - Variable GUID for HII type PCD -# - Token space GUID for dynamicex type PCD -# +# - Token space GUID for dynamicex type PCD +# # Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials diff --git a/MdeModulePkg/Universal/PCD/Dxe/PcdDxe.uni b/MdeModulePkg/Universal/PCD/Dxe/PcdDxe.uni index 0883ad881e..90b37e01cc 100644 --- a/MdeModulePkg/Universal/PCD/Dxe/PcdDxe.uni +++ b/MdeModulePkg/Universal/PCD/Dxe/PcdDxe.uni @@ -8,35 +8,35 @@ // 2) EFI_PCD_PROTOCOL // It is defined by PI specification 1.2, Vol 3 which only support dynamicEx // type Pcd. -// +// // For dynamicEx type PCD, it is compatible between PCD_PROTOCOL and EFI_PCD_PROTOCOL. // PCD DXE driver will produce above two protocols at same time. -// +// // PCD database is generated as the separate binary image at build time. The binary image // will be intergrated into Firmware volume together with PCD driver. -// +// // //////////////////////////////////////////////////////////////////////////////// // // // // // Introduction of PCD database // // // // // //////////////////////////////////////////////////////////////////////////////// -// +// // 1, Introduction // PCD database hold all dynamic type PCD information. The structure of PEI PCD // database is generated by build tools according to dynamic PCD usage for // specified platform. -// +// // 2, Dynamic Type PCD // Dynamic type PCD is used for the configuration/setting which value is determined // dynamic. In contrast, the value of static type PCD (FeatureFlag, FixedPcd, // PatchablePcd) is fixed in final generated FD image in build time. -// +// // 2.1 The "dynamic" determination means one of below cases: // a) The PCD setting value is produced by someone driver and consumed by // other driver in execution time. // b) The PCD setting value is set/get by user from FrontPage. // c) The PCD setting value is produced by platform OEM vendor in specified area. -// +// // 2.2 According to module distribution way, dynamic PCD could be classfied as: // a) Dynamic: // If module is released in source code and will be built with platform @@ -50,7 +50,7 @@ // PcdGetxxEx(gEfiMyTokenspaceGuid, PcdSampleDynamicPcd) // Developer need explicity gives {Token Space Guid:Token Number} as parameter // in writting source code. -// +// // 2.3 According to PCD value's storage method, dynamic PCD could be classfied as: // a) Default Storage: // - The PCD value is stored in PCD database maintained by PCD driver in boot @@ -60,7 +60,7 @@ // is turn off. // - [PcdsDynamicDefault] is used as section name for this type PCD in // platform DSC file. [PcdsDynamicExDefault] is used for dynamicEx type PCD. -// +// // b) Variable Storage: // - The PCD value is stored in variable area. // - As default storage type, this type PCD could be used for PEI/DXE driver @@ -70,34 +70,34 @@ // to variable area is readonly. // - [PcdsDynamicHii] is used as section name for this type PCD in platform // DSC file. [PcdsDynamicExHii] is for dynamicEx type PCD. -// +// // c) OEM specificed storage area: // - The PCD value is stored in OEM specified area which base address is // specified by a FixedAtBuild PCD setting - PcdVpdBaseAddress. // - The area is read only for PEI and DXE phase. // - [PcdsDynamicVpd] is used as section name for this type PCD in platform // DSC file. [PcdsDynamicExVpd] is for dynamicex type PCD. -// +// // 2.4 When and how to use dynamic PCD // Module developer do not care the used PCD is dynamic or static when writting // source code/INF. Dynamic PCD and dynamic type is pointed by platform integrator // in platform DSC file. Please ref section 2.3 to get matching between dynamic // PCD type and section name in DSC file. -// +// // 3, PCD database: // Although dynamic PCD could be in different storage type as above description, // but the basic information and default value for all dynamic PCD is hold // by PCD database maintained by PEI/DXE driver. -// +// // As the whole EFI BIOS boot path is divided into PEI/DXE phase, the PCD database // also is divided into Pei/Dxe database maintaied by PcdPeim/PcdDxe driver separatly. // To make PcdPeim's driver image smaller, PEI PCD database only hold all dynamic // PCD information used in PEI phase or use in both PEI/DXE phase. And DXE PCD // database contains all PCDs used in PEI/DXE phase in memory. -// +// // Build tool will generate PCD database into the separate binary file for // PEI/DXE PCD driver according to dynamic PCD section in platform DSC file. -// +// // 3.1 PcdPeim and PcdDxe // PEI PCD database is maintained by PcdPeim driver run from flash. PcdPeim driver // build guid hob in temporary memory and copy the binary data base from flash @@ -105,11 +105,11 @@ // DXE PCD database is maintained by PcdDxe driver.At entry point of PcdDxe driver, // a new PCD database is allocated in boot-time memory which including all // PEI PCD and DXE PCD entry. -// +// // Pcd driver should run as early as possible before any other driver access // dynamic PCD's value. PEI/DXE "Apriori File" mechanism make it possible by // making PcdPeim/PcdDxe as first dispatching driver in PEI/DXE phase. -// +// // 3.2 Token space Guid/Token number, Platform token, Local token number // Dynamic PCD // +-----------+ +---------+ @@ -129,13 +129,13 @@ // | Token | // | Number | // +-----------+ -// -// +// +// // 3.2.1 Pair of Token space guid + Token number // Any type PCD is identified by pair of "TokenSpaceGuid + TokeNumber". But it // is not easy maintained by PCD driver, and hashed token number will make // searching slowly. -// +// // 3.2.2 Platform Token Number // "Platform token number" concept is introduced for mapping to a pair of // "TokenSpaceGuid + TokenNumber". The platform token number is generated by @@ -149,14 +149,14 @@ // mechanism is not suitable for binary module which use DynamicEx type PCD. // To access a dynamicEx type PCD, pair of "token space guid/token number" all need // to be specificed for PcdSet/PcdGet accessing macro. -// +// // Platform Token Number is started from 1, and inceased continuous. From whole // platform scope, there are two zones: PEI Zone and DXE Zone // | Platform Token Number // ----------|---------------------------------------------------------------- // PEI Zone: | 1 ~ PEI_LOCAL_TOKEN_NUMBER // DXE Zone: | (PEI_LOCAL_TOKEN_NUMBER + 1) ~ (PEI_LOCAL_TOKEN_NUMBER + DXE_LOCAL_TOKEN_NUMBER) -// +// // 3.2.3 Local Token Number // To fast searching a PCD entry in PCD database, PCD driver translate // platform token number to local token number via a mapping table. @@ -164,7 +164,7 @@ // "token space guid + token number" to local token number directly. // Local token number is identifier for all internal interface in PCD PEI/DXE // driver. -// +// // A local token number is a 32-bit value in following meaning: // 32 ------------- 28 ---------- 24 -------- 0 // | PCD type mask | Datum Type | Offset | @@ -184,7 +184,7 @@ // Offset : indicate the related offset of PCD value in PCD database array. // Based on local token number, PCD driver could fast determine PCD type, value // type and get PCD entry from PCD database. -// +// // 3.3 PCD Database binary file // PCD Database binary file will be created at build time as the standalone binary image. // To understand the binary image layout, PCD Database C structure is still generated @@ -204,7 +204,7 @@ // Every PCD has a value record in PCD database. For different // datum type PCD has different record structure which will be // introduced in 3.3.1 -// +// // In a PCD database structure, there are two major area: Init and UnInit. // Init area is use stored above PCD internal structure such as ExMapTable, // LocalTokenNumberTable etc and the (default) value of PCD which has default @@ -212,7 +212,7 @@ // Unint area is used stored the value of PCD which has no default value in // platform DSC file, the value of NULL, 0 specified in platform DSC file can // be seemed as "no default value". -// +// // 3.3.1 Simple Sample PCD Database C Structure // A general sample of PCD database structue is as follows: // typedef struct _PCD_DATABASE { @@ -224,7 +224,7 @@ // SIZE_INFO SizeTable[PEI_SIZE_TABLE_SIZE]; // UINT8 SkuIdTable[PEI_SKUID_TABLE_SIZE]; // SKU_ID SystemSkuId; -// +// // //===== Following is value structure for PCD with default value // .... // .... @@ -236,11 +236,11 @@ // .... // } UnInit; // } -// +// // 3.3.2 PCD value structure in PCD database C structure // The value's structure is generated by build tool in PCD database C structure. // The PCDs in different datum type has different value structure. -// +// // 3.3.2.1 UINT8/UINT16/UINT32/UINT64 datum type PCD // The C structure for these datum type PCD is just a UINT8/UINT16/UINT32/UINT64 // data member in PCD database, For example: @@ -248,30 +248,30 @@ // Above structure is generated by build tool, the member name is "PcdCName_Guidvalue" // Member type is UINT16 according to PcdHardwareErrorRecordLevel declaration // in DEC file. -// +// // 3.3.2.2 VOID* datum type PCD // The value of VOID* datum type PCD is a UINT8/UINT16 array in PCD database. -// +// // 3.3.2.2.1 VOID* - string type // If the default value for VOID* datum type PCD like L"xxx", the PCD is // used for unicode string, and C structure of this datum type PCD is // UINT16 string array in PCD database, for example: // UINT16 StringTable[29]; // The number of 29 in above sample is max size of a unicode string. -// +// // If the default value for VOID* datum type PCD like "xxx", the PCD is // used for ascii string, and C structure of this datum type PCD is // UINT8 string array in PCD database, for example: // UINT8 StringTable[20]; // The number of 20 in above sample is max size of a ascii string. -// +// // 3.3.2.2.2 VOID* - byte array // If the default value of VOID* datum type PCD like {'0x29', '0x01', '0xf2'} // the PCD is used for byte array. The generated structrue is same as // above ascii string table, // UINT8 StringTable[13]; // The number of 13 in above sample is max size of byte array. -// +// // 3.3.3 Some utility structures in PCD Database // 3.3.3.1 GuidTable // GuidTable array is used to store all related GUID value in PCD database: diff --git a/MdeModulePkg/Universal/PCD/Dxe/PcdDxeExtra.uni b/MdeModulePkg/Universal/PCD/Dxe/PcdDxeExtra.uni index 729312a2d8..436cd7ce60 100644 --- a/MdeModulePkg/Universal/PCD/Dxe/PcdDxeExtra.uni +++ b/MdeModulePkg/Universal/PCD/Dxe/PcdDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // PcdDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Platform Configuration Database DXE Driver" diff --git a/MdeModulePkg/Universal/PCD/Dxe/Service.c b/MdeModulePkg/Universal/PCD/Dxe/Service.c index 1e487f04c3..0517152366 100644 --- a/MdeModulePkg/Universal/PCD/Dxe/Service.c +++ b/MdeModulePkg/Universal/PCD/Dxe/Service.c @@ -2,7 +2,7 @@ Help functions used by PCD DXE driver. Copyright (c) 2014, Hewlett-Packard Development Company, L.P.
-Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -19,23 +19,23 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. PCD_DATABASE mPcdDatabase; -UINT32 mPcdTotalTokenCount; -UINT32 mPeiLocalTokenCount; -UINT32 mDxeLocalTokenCount; -UINT32 mPeiNexTokenCount; -UINT32 mDxeNexTokenCount; +UINT32 mPcdTotalTokenCount; +UINT32 mPeiLocalTokenCount; +UINT32 mDxeLocalTokenCount; +UINT32 mPeiNexTokenCount; +UINT32 mDxeNexTokenCount; UINT32 mPeiExMapppingTableSize; UINT32 mDxeExMapppingTableSize; UINT32 mPeiGuidTableSize; UINT32 mDxeGuidTableSize; -BOOLEAN mPeiExMapTableEmpty; -BOOLEAN mDxeExMapTableEmpty; +BOOLEAN mPeiExMapTableEmpty; +BOOLEAN mDxeExMapTableEmpty; BOOLEAN mPeiDatabaseEmpty; LIST_ENTRY *mCallbackFnTable; EFI_GUID **TmpTokenSpaceBuffer; -UINTN TmpTokenSpaceBufferCount; +UINTN TmpTokenSpaceBufferCount; UINTN mPeiPcdDbSize = 0; PEI_PCD_DATABASE *mPeiPcdDbBinary = NULL; @@ -66,7 +66,7 @@ GetLocalTokenNumber ( // TokenNumber--; - LocalTokenNumberTable = IsPeiDb ? (UINT32 *)((UINT8 *)mPcdDatabase.PeiDb + mPcdDatabase.PeiDb->LocalTokenNumberTableOffset) : + LocalTokenNumberTable = IsPeiDb ? (UINT32 *)((UINT8 *)mPcdDatabase.PeiDb + mPcdDatabase.PeiDb->LocalTokenNumberTableOffset) : (UINT32 *)((UINT8 *)mPcdDatabase.DxeDb + mPcdDatabase.DxeDb->LocalTokenNumberTableOffset); TokenNumber = IsPeiDb ? TokenNumber : TokenNumber - mPeiLocalTokenCount; @@ -133,7 +133,7 @@ GetPcdName ( CHAR8 *Name; // - // Return NULL when PCD name table is absent. + // Return NULL when PCD name table is absent. // if (IsPeiDb) { if (mPcdDatabase.PeiDb->PcdNameTableOffset == 0) { @@ -181,7 +181,7 @@ GetPcdName ( // AsciiStrCatS (Name, NameSize, TokenSpaceName); Name[AsciiStrSize (TokenSpaceName) - sizeof (CHAR8)] = '.'; - AsciiStrCatS (Name, NameSize, PcdName); + AsciiStrCatS (Name, NameSize, PcdName); } return Name; @@ -198,7 +198,7 @@ GetPcdName ( @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. @param[in] TokenNumber The PCD token number. @param[out] PcdInfo The returned information associated with the requested TokenNumber. - The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName. + The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName. @retval EFI_SUCCESS The PCD information was returned successfully @retval EFI_NOT_FOUND The PCD service could not find the requested token number. @@ -247,7 +247,7 @@ ExGetPcdInfo ( PcdInfo->PcdSize = 0; // // Here use one representative in the token space to get the TokenSpaceCName. - // + // PcdInfo->PcdName = GetPcdName (TRUE, IsPeiDb, ExMapTable[Index].TokenNumber); return EFI_SUCCESS; } else if (ExMapTable[Index].ExTokenNumber == TokenNumber) { @@ -352,10 +352,10 @@ DxeGetPcdInfo ( /** Get the PCD entry pointer in PCD database. - + This routine will visit PCD database to find the PCD entry according to given - token number. The given token number is autogened by build tools and it will be - translated to local token number. Local token number contains PCD's type and + token number. The given token number is autogened by build tools and it will be + translated to local token number. Local token number contains PCD's type and offset of PCD entry in PCD database. @param TokenNumber Token's number, it is autogened by build tools @@ -385,7 +385,7 @@ GetWorker ( EFI_STATUS Status; UINT32 LocalTokenNumber; UINT32 Offset; - STRING_HEAD StringTableIdx; + STRING_HEAD StringTableIdx; BOOLEAN IsPeiDb; // @@ -407,7 +407,7 @@ GetWorker ( // // EBC compiler is very choosy. It may report warning about comparison - // between UINTN and 0 . So we add 1 in each size of the + // between UINTN and 0 . So we add 1 in each size of the // comparison. // ASSERT (TokenNumber + 1 < mPcdTotalTokenCount + 1); @@ -415,14 +415,14 @@ GetWorker ( ASSERT ((GetSize == DxePcdGetSize (TokenNumber + 1)) || (GetSize == 0)); // EBC compiler is very choosy. It may report warning about comparison - // between UINTN and 0 . So we add 1 in each size of the + // between UINTN and 0 . So we add 1 in each size of the // comparison. IsPeiDb = (BOOLEAN) ((TokenNumber + 1 < mPeiLocalTokenCount + 1) ? TRUE : FALSE); LocalTokenNumber = GetLocalTokenNumber (IsPeiDb, TokenNumber + 1); PcdDb = IsPeiDb ? ((UINT8 *) mPcdDatabase.PeiDb) : ((UINT8 *) mPcdDatabase.DxeDb); - + if (IsPeiDb) { StringTable = (UINT8 *) ((UINT8 *)mPcdDatabase.PeiDb + mPcdDatabase.PeiDb->StringTableOffset); } else { @@ -453,11 +453,11 @@ GetWorker ( if ((LocalTokenNumber & PCD_TYPE_ALL_SET) == (PCD_TYPE_HII|PCD_TYPE_STRING)) { // - // If a HII type PCD's datum type is VOID*, the DefaultValueOffset is the index of + // If a HII type PCD's datum type is VOID*, the DefaultValueOffset is the index of // string array in string table. // - StringTableIdx = *(STRING_HEAD*)((UINT8 *) PcdDb + VariableHead->DefaultValueOffset); - VaraiableDefaultBuffer = (UINT8 *) (StringTable + StringTableIdx); + StringTableIdx = *(STRING_HEAD*)((UINT8 *) PcdDb + VariableHead->DefaultValueOffset); + VaraiableDefaultBuffer = (UINT8 *) (StringTable + StringTableIdx); } else { VaraiableDefaultBuffer = (UINT8 *) PcdDb + VariableHead->DefaultValueOffset; } @@ -501,7 +501,7 @@ GetWorker ( default: ASSERT (FALSE); break; - + } EfiReleaseLock (&mPcdDatabaseLock); @@ -515,9 +515,9 @@ GetWorker ( This routine will register a callback function to a PCD entry by given token number and token space guid. - + @param TokenNumber PCD token's number, it is autogened by build tools. - @param Guid PCD token space's guid, + @param Guid PCD token space's guid, if not NULL, this PCD is dynamicEx type PCD. @param CallBackFunction Callback function pointer @@ -565,7 +565,7 @@ DxeRegisterCallBackWorker ( FnTableEntry->CallbackFn = CallBackFunction; InsertTailList (ListHead, &FnTableEntry->Node); - + return EFI_SUCCESS; } @@ -617,7 +617,7 @@ DxeUnRegisterCallBackWorker ( // RemoveEntryList (ListNode); FreePool (FnTableEntry); - + return EFI_SUCCESS; } ListNode = GetNextNode (ListHead, ListNode); @@ -628,16 +628,16 @@ DxeUnRegisterCallBackWorker ( /** Get next token number in given token space. - + This routine is used for dynamicEx type PCD. It will firstly scan token space - table to get token space according to given token space guid. Then scan given - token number in found token space, if found, then return next token number in + table to get token space according to given token space guid. Then scan given + token number in found token space, if found, then return next token number in this token space. - @param Guid Token space guid. Next token number will be scaned in + @param Guid Token space guid. Next token number will be scaned in this token space. - @param TokenNumber Token number. - If PCD_INVALID_TOKEN_NUMBER, return first token number in + @param TokenNumber Token number. + If PCD_INVALID_TOKEN_NUMBER, return first token number in token space table. If not PCD_INVALID_TOKEN_NUMBER, return next token number in token space table. @@ -668,8 +668,8 @@ ExGetNextTokeNumber ( UINTN ExMapTableCount; // - // Scan token space guid - // + // Scan token space guid + // MatchGuid = ScanGuid (GuidTable, SizeOfGuidTable, Guid); if (MatchGuid == NULL) { return EFI_NOT_FOUND; @@ -734,12 +734,12 @@ ExGetNextTokeNumber ( DXE_PCD_DATABASE * LocateExPcdBinary ( VOID -) +) { EFI_STATUS Status; - + // - // Search the External Pcd database from one section of current FFS, + // Search the External Pcd database from one section of current FFS, // and read it to memory // Status = GetSectionFromFfs ( @@ -838,7 +838,7 @@ UpdatePcdDatabase ( /** Initialize the PCD database in DXE phase. - + PCD database in DXE phase also contains PCD database in PEI phase which is copied from GUID Hob. @@ -869,7 +869,7 @@ BuildPcdDxeDataBase ( GuidHob = GetFirstGuidHob (&gPcdDataBaseHobGuid); if (GuidHob != NULL) { - // + // // If no PEIMs use dynamic Pcd Entry, the Pcd Service PEIM // should not be included at all. So the GuidHob could // be NULL. If it is NULL, we just copy over the DXE Default @@ -916,7 +916,7 @@ BuildPcdDxeDataBase ( mPcdTotalTokenCount = mPeiLocalTokenCount + mDxeLocalTokenCount; mPeiNexTokenCount = mPeiLocalTokenCount - mPcdDatabase.PeiDb->ExTokenCount; - mDxeNexTokenCount = mDxeLocalTokenCount - mPcdDatabase.DxeDb->ExTokenCount; + mDxeNexTokenCount = mDxeLocalTokenCount - mPcdDatabase.DxeDb->ExTokenCount; mPeiExMapTableEmpty = (mPcdDatabase.PeiDb->ExTokenCount == 0) ? TRUE : FALSE; mDxeExMapTableEmpty = (mPcdDatabase.DxeDb->ExTokenCount == 0) ? TRUE : FALSE; @@ -933,7 +933,7 @@ BuildPcdDxeDataBase ( // // EBC compiler is very choosy. It may report warning about comparison - // between UINTN and 0 . So we add 1 in each size of the + // between UINTN and 0 . So we add 1 in each size of the // comparison. // for (Index = 0; Index + 1 < mPcdTotalTokenCount + 1; Index++) { @@ -946,7 +946,7 @@ BuildPcdDxeDataBase ( @param VariableGuid Variable's guid @param VariableName Variable's unicode name string - @param VariableData Variable's data pointer, + @param VariableData Variable's data pointer, @param VariableSize Variable's size. @return the status of gRT->GetVariable @@ -965,7 +965,7 @@ GetHiiVariable ( Size = 0; Buffer = NULL; - + // // Firstly get the real size of HII variable // @@ -976,7 +976,7 @@ GetHiiVariable ( &Size, Buffer ); - + // // Allocate buffer to hold whole variable data according to variable size. // @@ -998,7 +998,7 @@ GetHiiVariable ( *VariableSize = Size; } else { // - // Use Default Data only when variable is not found. + // Use Default Data only when variable is not found. // For other error status, correct data can't be got, and trig ASSERT(). // ASSERT (Status == EFI_NOT_FOUND); @@ -1008,7 +1008,7 @@ GetHiiVariable ( } /** - Invoke the callback function when dynamic PCD entry was set, if this PCD entry + Invoke the callback function when dynamic PCD entry was set, if this PCD entry has registered callback function. @param ExTokenNumber DynamicEx PCD's token number, if this PCD entry is dyanmicEx @@ -1044,14 +1044,14 @@ InvokeCallbackOnSet ( while (ListNode != ListHead) { FnTableEntry = CR_FNENTRY_FROM_LISTNODE (ListNode, CALLBACK_FN_ENTRY, Node); - FnTableEntry->CallbackFn(Guid, + FnTableEntry->CallbackFn(Guid, (Guid == NULL) ? TokenNumber : ExTokenNumber, Data, Size); - + ListNode = GetNextNode (ListHead, ListNode); } - + return; } @@ -1088,10 +1088,10 @@ SetValueWorker ( @retval EFI_INVALID_PARAMETER If this PCD type is VPD, VPD PCD can not be set. @retval EFI_INVALID_PARAMETER If Size can not be set to size table. - @retval EFI_INVALID_PARAMETER If Size of non-Ptr type PCD does not match the size information in PCD database. + @retval EFI_INVALID_PARAMETER If Size of non-Ptr type PCD does not match the size information in PCD database. @retval EFI_NOT_FOUND If value type of PCD entry is intergrate, but not in range of UINT8, UINT16, UINT32, UINT64 - @retval EFI_NOT_FOUND Can not find the PCD type according to token number. + @retval EFI_NOT_FOUND Can not find the PCD type according to token number. **/ EFI_STATUS SetWorker ( @@ -1125,10 +1125,10 @@ SetWorker ( TokenNumber--; TmpTokenNumber = TokenNumber; - + // // EBC compiler is very choosy. It may report warning about comparison - // between UINTN and 0 . So we add 1 in each size of the + // between UINTN and 0 . So we add 1 in each size of the // comparison. // ASSERT (TokenNumber + 1 < mPcdTotalTokenCount + 1); @@ -1150,7 +1150,7 @@ SetWorker ( // // EBC compiler is very choosy. It may report warning about comparison - // between UINTN and 0 . So we add 1 in each size of the + // between UINTN and 0 . So we add 1 in each size of the // comparison. // if ((TokenNumber + 1 < mPeiNexTokenCount + 1) || @@ -1165,7 +1165,7 @@ SetWorker ( // // EBC compiler is very choosy. It may report warning about comparison - // between UINTN and 0 . So we add 1 in each size of the + // between UINTN and 0 . So we add 1 in each size of the // comparison. // IsPeiDb = (BOOLEAN) ((TokenNumber + 1 < mPeiLocalTokenCount + 1) ? TRUE : FALSE); @@ -1182,7 +1182,7 @@ SetWorker ( StringTable = (UINT8 *) ((UINT8 *)mPcdDatabase.DxeDb + mPcdDatabase.DxeDb->StringTableOffset); } - + InternalData = PcdDb + Offset; switch (LocalTokenNumber & PCD_TYPE_ALL_SET) { @@ -1190,7 +1190,7 @@ SetWorker ( ASSERT (FALSE); Status = EFI_INVALID_PARAMETER; break; - + case PCD_TYPE_STRING: if (SetPtrTypeSize (TmpTokenNumber, Size)) { CopyMem (StringTable + *((STRING_HEAD *)InternalData), Data, *Size); @@ -1223,7 +1223,7 @@ SetWorker ( Attributes = VariableHead->Attributes; Status = SetHiiVariable (Guid, Name, Attributes, Data, *Size, VariableOffset); break; - + case PCD_TYPE_DATA: if (PtrType) { if (SetPtrTypeSize (TmpTokenNumber, Size)) { @@ -1267,7 +1267,7 @@ SetWorker ( } EfiReleaseLock (&mPcdDatabaseLock); - + return Status; } @@ -1286,7 +1286,7 @@ ExGetWorker ( IN CONST EFI_GUID *Guid, IN UINTN ExTokenNumber, IN UINTN GetSize - ) + ) { return GetWorker(GetExPcdTokenNumber (Guid, (UINT32) ExTokenNumber), GetSize); } @@ -1315,12 +1315,12 @@ ExSetValueWorker ( /** Set value for a dynamic-ex PCD entry. - - This routine find the local token number according to dynamic-ex PCD's token + + This routine find the local token number according to dynamic-ex PCD's token space guid and token number firstly, and invoke callback function if this PCD entry registered callback function. Finally, invoken general SetWorker to set PCD value. - + @param ExTokenNumber Dynamic-ex PCD token number. @param Guid Token space guid for dynamic-ex PCD. @param Data PCD value want to be set @@ -1341,7 +1341,7 @@ ExSetWorker ( ) { UINTN TokenNumber; - + TokenNumber = GetExPcdTokenNumber (Guid, (UINT32) ExTokenNumber); InvokeCallbackOnSet ((UINT32) ExTokenNumber, Guid, TokenNumber, Data, *SetSize); @@ -1431,9 +1431,9 @@ GetVariableSizeAndDataFromHiiPcd ( /** Set value for HII-type PCD. - A HII-type PCD's value is stored in a variable. Setting/Getting the value of + A HII-type PCD's value is stored in a variable. Setting/Getting the value of HII-type PCD is to visit this variable. - + @param VariableGuid Guid of variable which stored value of a HII-type PCD. @param VariableName Unicode name of variable which stored value of a HII-type PCD. @param SetAttributes Attributes bitmask to set for the variable. @@ -1473,7 +1473,7 @@ SetHiiVariable ( &Size, NULL ); - + if (Status == EFI_BUFFER_TOO_SMALL) { // // Patch new PCD's value to offset in given HII variable. @@ -1493,7 +1493,7 @@ SetHiiVariable ( &Size, Buffer ); - + ASSERT_EFI_ERROR (Status); CopyMem ((UINT8 *)Buffer + Offset, Data, DataSize); @@ -1543,9 +1543,9 @@ SetHiiVariable ( ); FreePool (Buffer); - return Status; + return Status; } - + // // If we drop to here, the value is failed to be written in to variable area. // @@ -1558,14 +1558,14 @@ SetHiiVariable ( A dynamic-ex type PCD, developer must provide pair of token space guid: token number in DEC file. PCD database maintain a mapping table that translate pair of {token space guid: token number} to Token Number. - + @param Guid Token space guid for dynamic-ex PCD entry. @param ExTokenNumber Dynamic-ex PCD token number. @return Token Number for dynamic-ex PCD. **/ -UINTN +UINTN GetExPcdTokenNumber ( IN CONST EFI_GUID *Guid, IN UINT32 ExTokenNumber @@ -1622,7 +1622,7 @@ GetExPcdTokenNumber ( /** Wrapper function of getting index of PCD entry in size table. - + @param LocalTokenNumberTableIdx Index of this PCD in local token number table. @param IsPeiDb If TRUE, the pcd entry is initialized in PEI phase, If FALSE, the pcd entry is initialized in DXE phase. @@ -1639,7 +1639,7 @@ GetSizeTableIndex ( UINTN LocalTokenNumber; UINTN Index; UINTN SizeTableIdx; - + if (IsPeiDb) { LocalTokenNumberTable = (UINT32 *)((UINT8 *)mPcdDatabase.PeiDb + mPcdDatabase.PeiDb->LocalTokenNumberTableOffset); } else { @@ -1653,7 +1653,7 @@ GetSizeTableIndex ( if ((LocalTokenNumber & PCD_DATUM_TYPE_ALL_SET) == PCD_DATUM_TYPE_POINTER) { // - // SizeTable only contain record for PCD_DATUM_TYPE_POINTER type + // SizeTable only contain record for PCD_DATUM_TYPE_POINTER type // PCD entry. // if ((LocalTokenNumber & PCD_TYPE_VPD) != 0) { @@ -1676,7 +1676,7 @@ GetSizeTableIndex ( } - return SizeTableIdx; + return SizeTableIdx; } /** @@ -1701,7 +1701,7 @@ GetPtrTypeSize ( UINT32 *LocalTokenNumberTable; // EBC compiler is very choosy. It may report warning about comparison - // between UINTN and 0 . So we add 1 in each size of the + // between UINTN and 0 . So we add 1 in each size of the // comparison. IsPeiDb = (BOOLEAN) (LocalTokenNumberTableIdx + 1 < mPeiLocalTokenCount + 1); @@ -1718,12 +1718,12 @@ GetPtrTypeSize ( LocalTokenNumber = LocalTokenNumberTable[LocalTokenNumberTableIdx]; ASSERT ((LocalTokenNumber & PCD_DATUM_TYPE_ALL_SET) == PCD_DATUM_TYPE_POINTER); - + SizeTableIdx = GetSizeTableIndex (LocalTokenNumberTableIdx, IsPeiDb); *MaxSize = SizeTable[SizeTableIdx]; // - // SizeTable only contain record for PCD_DATUM_TYPE_POINTER type + // SizeTable only contain record for PCD_DATUM_TYPE_POINTER type // PCD entry. // if ((LocalTokenNumber & PCD_TYPE_VPD) != 0) { @@ -1769,7 +1769,7 @@ SetPtrTypeSize ( // // EBC compiler is very choosy. It may report warning about comparison - // between UINTN and 0 . So we add 1 in each size of the + // between UINTN and 0 . So we add 1 in each size of the // comparison. // IsPeiDb = (BOOLEAN) (LocalTokenNumberTableIdx + 1 < mPeiLocalTokenCount + 1); @@ -1786,12 +1786,12 @@ SetPtrTypeSize ( LocalTokenNumber = LocalTokenNumberTable[LocalTokenNumberTableIdx]; ASSERT ((LocalTokenNumber & PCD_DATUM_TYPE_ALL_SET) == PCD_DATUM_TYPE_POINTER); - + SizeTableIdx = GetSizeTableIndex (LocalTokenNumberTableIdx, IsPeiDb); MaxSize = SizeTable[SizeTableIdx]; // - // SizeTable only contain record for PCD_DATUM_TYPE_POINTER type + // SizeTable only contain record for PCD_DATUM_TYPE_POINTER type // PCD entry. // if ((LocalTokenNumber & PCD_TYPE_VPD) != 0) { @@ -1805,8 +1805,8 @@ SetPtrTypeSize ( (*CurrentSize == MAX_ADDRESS)) { *CurrentSize = MaxSize; return FALSE; - } - + } + // // We have only two entry for Non-Sku enabled PCD entry: // 1) MAX SIZE @@ -1833,7 +1833,7 @@ VariableLockDynamicHiiPcd ( { EFI_STATUS Status; PCD_DATABASE_INIT *Database; - UINT32 LocalTokenCount; + UINT32 LocalTokenCount; UINTN TokenNumber; UINT32 LocalTokenNumber; UINTN Offset; diff --git a/MdeModulePkg/Universal/PCD/Dxe/Service.h b/MdeModulePkg/Universal/PCD/Dxe/Service.h index cd0e227705..ddd5fa471e 100644 --- a/MdeModulePkg/Universal/PCD/Dxe/Service.h +++ b/MdeModulePkg/Universal/PCD/Dxe/Service.h @@ -1,7 +1,7 @@ /** @file Private functions used by PCD DXE driver. -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -109,21 +109,21 @@ DxeGetPcdInfoGetSku ( /** Sets the SKU value for subsequent calls to set or get PCD token values. - SetSku() sets the SKU Id to be used for subsequent calls to set or get PCD values. + SetSku() sets the SKU Id to be used for subsequent calls to set or get PCD values. SetSku() is normally called only once by the system. - For each item (token), the database can hold a single value that applies to all SKUs, - or multiple values, where each value is associated with a specific SKU Id. Items with multiple, - SKU-specific values are called SKU enabled. - - The SKU Id of zero is reserved as a default. The valid SkuId range is 1 to 255. - For tokens that are not SKU enabled, the system ignores any set SKU Id and works with the - single value for that token. For SKU-enabled tokens, the system will use the SKU Id set by the - last call to SetSku(). If no SKU Id is set or the currently set SKU Id isn't valid for the specified token, - the system uses the default SKU Id. If the system attempts to use the default SKU Id and no value has been + For each item (token), the database can hold a single value that applies to all SKUs, + or multiple values, where each value is associated with a specific SKU Id. Items with multiple, + SKU-specific values are called SKU enabled. + + The SKU Id of zero is reserved as a default. The valid SkuId range is 1 to 255. + For tokens that are not SKU enabled, the system ignores any set SKU Id and works with the + single value for that token. For SKU-enabled tokens, the system will use the SKU Id set by the + last call to SetSku(). If no SKU Id is set or the currently set SKU Id isn't valid for the specified token, + the system uses the default SKU Id. If the system attempts to use the default SKU Id and no value has been set for that Id, the results are unpredictable. - @param[in] SkuId The SKU value that will be used when the PCD service will retrieve and + @param[in] SkuId The SKU value that will be used when the PCD service will retrieve and set values associated with a PCD token. **/ @@ -136,13 +136,13 @@ DxePcdSetSku ( /** Retrieves an 8-bit value for a given PCD token. - Retrieves the current byte-sized value for a PCD token number. + Retrieves the current byte-sized value for a PCD token number. If the TokenNumber is invalid, the results are unpredictable. - - @param[in] TokenNumber The PCD token number. + + @param[in] TokenNumber The PCD token number. @return The UINT8 value. - + **/ UINT8 EFIAPI @@ -153,13 +153,13 @@ DxePcdGet8 ( /** Retrieves an 16-bit value for a given PCD token. - Retrieves the current 16-bits value for a PCD token number. + Retrieves the current 16-bits value for a PCD token number. If the TokenNumber is invalid, the results are unpredictable. - - @param[in] TokenNumber The PCD token number. + + @param[in] TokenNumber The PCD token number. @return The UINT16 value. - + **/ UINT16 EFIAPI @@ -170,13 +170,13 @@ DxePcdGet16 ( /** Retrieves an 32-bit value for a given PCD token. - Retrieves the current 32-bits value for a PCD token number. + Retrieves the current 32-bits value for a PCD token number. If the TokenNumber is invalid, the results are unpredictable. - - @param[in] TokenNumber The PCD token number. + + @param[in] TokenNumber The PCD token number. @return The UINT32 value. - + **/ UINT32 EFIAPI @@ -187,13 +187,13 @@ DxePcdGet32 ( /** Retrieves an 64-bit value for a given PCD token. - Retrieves the current 64-bits value for a PCD token number. + Retrieves the current 64-bits value for a PCD token number. If the TokenNumber is invalid, the results are unpredictable. - - @param[in] TokenNumber The PCD token number. + + @param[in] TokenNumber The PCD token number. @return The UINT64 value. - + **/ UINT64 EFIAPI @@ -204,15 +204,15 @@ DxePcdGet64 ( /** Retrieves a pointer to a value for a given PCD token. - Retrieves the current pointer to the buffer for a PCD token number. - Do not make any assumptions about the alignment of the pointer that - is returned by this function call. If the TokenNumber is invalid, + Retrieves the current pointer to the buffer for a PCD token number. + Do not make any assumptions about the alignment of the pointer that + is returned by this function call. If the TokenNumber is invalid, the results are unpredictable. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @return The pointer to the buffer to be retrieved. - + **/ VOID * EFIAPI @@ -223,15 +223,15 @@ DxePcdGetPtr ( /** Retrieves a Boolean value for a given PCD token. - Retrieves the current boolean value for a PCD token number. - Do not make any assumptions about the alignment of the pointer that - is returned by this function call. If the TokenNumber is invalid, + Retrieves the current boolean value for a PCD token number. + Do not make any assumptions about the alignment of the pointer that + is returned by this function call. If the TokenNumber is invalid, the results are unpredictable. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @return The Boolean value. - + **/ BOOLEAN EFIAPI @@ -242,13 +242,13 @@ DxePcdGetBool ( /** Retrieves the size of the value for a given PCD token. - Retrieves the current size of a particular PCD token. + Retrieves the current size of a particular PCD token. If the TokenNumber is invalid, the results are unpredictable. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @return The size of the value for the PCD token. - + **/ UINTN EFIAPI @@ -259,16 +259,16 @@ DxePcdGetSize ( /** Retrieves an 8-bit value for a given PCD token. - Retrieves the 8-bit value of a particular PCD token. + Retrieves the 8-bit value of a particular PCD token. If the TokenNumber is invalid or the token space - specified by Guid does not exist, the results are + specified by Guid does not exist, the results are unpredictable. @param[in] Guid The token space for the token number. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @return The size 8-bit value for the PCD token. - + **/ UINT8 EFIAPI @@ -280,16 +280,16 @@ DxePcdGet8Ex ( /** Retrieves an 16-bit value for a given PCD token. - Retrieves the 16-bit value of a particular PCD token. + Retrieves the 16-bit value of a particular PCD token. If the TokenNumber is invalid or the token space - specified by Guid does not exist, the results are + specified by Guid does not exist, the results are unpredictable. @param[in] Guid The token space for the token number. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @return The size 16-bit value for the PCD token. - + **/ UINT16 EFIAPI @@ -301,16 +301,16 @@ DxePcdGet16Ex ( /** Retrieves an 32-bit value for a given PCD token. - Retrieves the 32-bit value of a particular PCD token. + Retrieves the 32-bit value of a particular PCD token. If the TokenNumber is invalid or the token space - specified by Guid does not exist, the results are + specified by Guid does not exist, the results are unpredictable. @param[in] Guid The token space for the token number. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @return The size 32-bit value for the PCD token. - + **/ UINT32 EFIAPI @@ -322,16 +322,16 @@ DxePcdGet32Ex ( /** Retrieves an 64-bit value for a given PCD token. - Retrieves the 64-bit value of a particular PCD token. + Retrieves the 64-bit value of a particular PCD token. If the TokenNumber is invalid or the token space - specified by Guid does not exist, the results are + specified by Guid does not exist, the results are unpredictable. @param[in] Guid The token space for the token number. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @return The size 64-bit value for the PCD token. - + **/ UINT64 EFIAPI @@ -343,16 +343,16 @@ DxePcdGet64Ex ( /** Retrieves a pointer to a value for a given PCD token. - Retrieves the current pointer to the buffer for a PCD token number. - Do not make any assumptions about the alignment of the pointer that - is returned by this function call. If the TokenNumber is invalid, + Retrieves the current pointer to the buffer for a PCD token number. + Do not make any assumptions about the alignment of the pointer that + is returned by this function call. If the TokenNumber is invalid, the results are unpredictable. @param[in] Guid The token space for the token number. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @return The pointer to the buffer to be retrieved. - + **/ VOID * EFIAPI @@ -364,16 +364,16 @@ DxePcdGetPtrEx ( /** Retrieves an Boolean value for a given PCD token. - Retrieves the Boolean value of a particular PCD token. + Retrieves the Boolean value of a particular PCD token. If the TokenNumber is invalid or the token space - specified by Guid does not exist, the results are + specified by Guid does not exist, the results are unpredictable. @param[in] Guid The token space for the token number. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @return The size Boolean value for the PCD token. - + **/ BOOLEAN EFIAPI @@ -385,14 +385,14 @@ DxePcdGetBoolEx ( /** Retrieves the size of the value for a given PCD token. - Retrieves the current size of a particular PCD token. + Retrieves the current size of a particular PCD token. If the TokenNumber is invalid, the results are unpredictable. @param[in] Guid The token space for the token number. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @return The size of the value for the PCD token. - + **/ UINTN EFIAPI @@ -404,19 +404,19 @@ DxePcdGetSizeEx ( /** Sets an 8-bit value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -428,19 +428,19 @@ DxePcdSet8 ( /** Sets an 16-bit value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -452,19 +452,19 @@ DxePcdSet16 ( /** Sets an 32-bit value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -476,19 +476,19 @@ DxePcdSet32 ( /** Sets an 64-bit value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -501,23 +501,23 @@ DxePcdSet64 ( /** Sets a value of a specified size for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. - @param[in] TokenNumber The PCD token number. - @param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token. - On input, if the SizeOfValue is greater than the maximum size supported - for this TokenNumber then the output value of SizeOfValue will reflect + @param[in] TokenNumber The PCD token number. + @param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token. + On input, if the SizeOfValue is greater than the maximum size supported + for this TokenNumber then the output value of SizeOfValue will reflect the maximum size supported for this TokenNumber. @param[in] Buffer The buffer to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -530,19 +530,19 @@ DxePcdSetPtr ( /** Sets an Boolean value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -555,20 +555,20 @@ DxePcdSetBool ( /** Sets an 8-bit value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -581,20 +581,20 @@ DxePcdSet8Ex ( /** Sets an 16-bit value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -607,20 +607,20 @@ DxePcdSet16Ex ( /** Sets an 32-bit value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -633,20 +633,20 @@ DxePcdSet32Ex ( /** Sets an 64-bit value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -659,24 +659,24 @@ DxePcdSet64Ex ( /** Sets a value of a specified size for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. - @param[in] TokenNumber The PCD token number. - @param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token. - On input, if the SizeOfValue is greater than the maximum size supported - for this TokenNumber then the output value of SizeOfValue will reflect + @param[in] TokenNumber The PCD token number. + @param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token. + On input, if the SizeOfValue is greater than the maximum size supported + for this TokenNumber then the output value of SizeOfValue will reflect the maximum size supported for this TokenNumber. @param[in] Buffer The buffer to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -690,20 +690,20 @@ DxePcdSetPtrEx ( /** Sets an Boolean value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -717,10 +717,10 @@ DxePcdSetBoolEx ( Specifies a function to be called anytime the value of a designated token is changed. @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. - @param[in] TokenNumber The PCD token number. - @param[in] CallBackFunction The function prototype called when the value associated with the CallBackToken is set. + @param[in] TokenNumber The PCD token number. + @param[in] CallBackFunction The function prototype called when the value associated with the CallBackToken is set. - @retval EFI_SUCCESS The PCD service has successfully established a call event + @retval EFI_SUCCESS The PCD service has successfully established a call event for the CallBackToken requested. @retval EFI_NOT_FOUND The PCD service could not find the referenced token number. @@ -737,10 +737,10 @@ DxeRegisterCallBackOnSet ( Cancels a previously set callback function for a particular PCD token number. @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. - @param[in] TokenNumber The PCD token number. - @param[in] CallBackFunction The function prototype called when the value associated with the CallBackToken is set. + @param[in] TokenNumber The PCD token number. + @param[in] CallBackFunction The function prototype called when the value associated with the CallBackToken is set. - @retval EFI_SUCCESS The PCD service has successfully established a call event + @retval EFI_SUCCESS The PCD service has successfully established a call event for the CallBackToken requested. @retval EFI_NOT_FOUND The PCD service could not find the referenced token number. @@ -754,29 +754,29 @@ DxeUnRegisterCallBackOnSet ( ); /** - Retrieves the next valid token number in a given namespace. - - This is useful since the PCD infrastructure contains a sparse list of token numbers, - and one cannot a priori know what token numbers are valid in the database. - - If TokenNumber is 0 and Guid is not NULL, then the first token from the token space specified by Guid is returned. - If TokenNumber is not 0 and Guid is not NULL, then the next token in the token space specified by Guid is returned. - If TokenNumber is 0 and Guid is NULL, then the first token in the default token space is returned. - If TokenNumber is not 0 and Guid is NULL, then the next token in the default token space is returned. - The token numbers in the default token space may not be related to token numbers in token spaces that are named by Guid. - If the next token number can be retrieved, then it is returned in TokenNumber, and EFI_SUCCESS is returned. - If TokenNumber represents the last token number in the token space specified by Guid, then EFI_NOT_FOUND is returned. + Retrieves the next valid token number in a given namespace. + + This is useful since the PCD infrastructure contains a sparse list of token numbers, + and one cannot a priori know what token numbers are valid in the database. + + If TokenNumber is 0 and Guid is not NULL, then the first token from the token space specified by Guid is returned. + If TokenNumber is not 0 and Guid is not NULL, then the next token in the token space specified by Guid is returned. + If TokenNumber is 0 and Guid is NULL, then the first token in the default token space is returned. + If TokenNumber is not 0 and Guid is NULL, then the next token in the default token space is returned. + The token numbers in the default token space may not be related to token numbers in token spaces that are named by Guid. + If the next token number can be retrieved, then it is returned in TokenNumber, and EFI_SUCCESS is returned. + If TokenNumber represents the last token number in the token space specified by Guid, then EFI_NOT_FOUND is returned. If TokenNumber is not present in the token space specified by Guid, then EFI_NOT_FOUND is returned. - @param[in] Guid The 128-bit unique value that designates the namespace from which to retrieve the next token. - This is an optional parameter that may be NULL. If this parameter is NULL, then a request is + @param[in] Guid The 128-bit unique value that designates the namespace from which to retrieve the next token. + This is an optional parameter that may be NULL. If this parameter is NULL, then a request is being made to retrieve tokens from the default token space. - @param[in, out] TokenNumber - A pointer to the PCD token number to use to find the subsequent token number. + @param[in, out] TokenNumber + A pointer to the PCD token number to use to find the subsequent token number. - @retval EFI_SUCCESS The PCD service retrieved the next valid token number. Or the input token number - is already the last valid token number in the PCD database. + @retval EFI_SUCCESS The PCD service retrieved the next valid token number. Or the input token number + is already the last valid token number in the PCD database. In the later case, *TokenNumber is updated with the value of 0. @retval EFI_NOT_FOUND If this input token number and token namespace does not exist on the platform. @@ -790,8 +790,8 @@ DxePcdGetNextToken ( /** Get next token space in PCD database according to given token space guid. - - @param Guid Given token space guid. If NULL, then Guid will be set to + + @param Guid Given token space guid. If NULL, then Guid will be set to the first PCD token space in PCD database, If not NULL, then Guid will be set to next PCD token space. @@ -825,7 +825,7 @@ typedef struct { @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. @param[in] TokenNumber The PCD token number. @param[out] PcdInfo The returned information associated with the requested TokenNumber. - The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName. + The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName. @retval EFI_SUCCESS The PCD information was returned successfully @retval EFI_NOT_FOUND The PCD service could not find the requested token number. @@ -865,10 +865,10 @@ SetValueWorker ( @retval EFI_INVALID_PARAMETER If this PCD type is VPD, VPD PCD can not be set. @retval EFI_INVALID_PARAMETER If Size can not be set to size table. - @retval EFI_INVALID_PARAMETER If Size of non-Ptr type PCD does not match the size information in PCD database. + @retval EFI_INVALID_PARAMETER If Size of non-Ptr type PCD does not match the size information in PCD database. @retval EFI_NOT_FOUND If value type of PCD entry is intergrate, but not in range of UINT8, UINT16, UINT32, UINT64 - @retval EFI_NOT_FOUND Can not find the PCD type according to token number. + @retval EFI_NOT_FOUND Can not find the PCD type according to token number. **/ EFI_STATUS SetWorker ( @@ -899,12 +899,12 @@ ExSetValueWorker ( /** Set value for a dynamic PCD entry. - - This routine find the local token number according to dynamic-ex PCD's token + + This routine find the local token number according to dynamic-ex PCD's token space guid and token number firstly, and invoke callback function if this PCD entry registered callback function. Finally, invoken general SetWorker to set PCD value. - + @param ExTokenNumber Dynamic-ex PCD token number. @param Guid Token space guid for dynamic-ex PCD. @param Data PCD value want to be set @@ -926,10 +926,10 @@ ExSetWorker ( /** Get the PCD entry pointer in PCD database. - + This routine will visit PCD database to find the PCD entry according to given - token number. The given token number is autogened by build tools and it will be - translated to local token number. Local token number contains PCD's type and + token number. The given token number is autogened by build tools and it will be + translated to local token number. Local token number contains PCD's type and offset of PCD entry in PCD database. @param TokenNumber Token's number, it is autogened by build tools @@ -966,7 +966,7 @@ ExGetWorker ( @param VariableGuid Variable's guid @param VariableName Variable's unicode name string - @param VariableData Variable's data pointer, + @param VariableData Variable's data pointer, @param VariableSize Variable's size. @return the status of gRT->GetVariable @@ -982,9 +982,9 @@ GetHiiVariable ( /** Set value for HII-type PCD. - A HII-type PCD's value is stored in a variable. Setting/Getting the value of + A HII-type PCD's value is stored in a variable. Setting/Getting the value of HII-type PCD is to visit this variable. - + @param VariableGuid Guid of variable which stored value of a HII-type PCD. @param VariableName Unicode name of variable which stored value of a HII-type PCD. @param SetAttributes Attributes bitmask to set for the variable. @@ -1010,9 +1010,9 @@ SetHiiVariable ( This routine will register a callback function to a PCD entry by given token number and token space guid. - + @param TokenNumber PCD token's number, it is autogened by build tools. - @param Guid PCD token space's guid, + @param Guid PCD token space's guid, if not NULL, this PCD is dynamicEx type PCD. @param CallBackFunction Callback function pointer @@ -1049,7 +1049,7 @@ DxeUnRegisterCallBackWorker ( /** Initialize the PCD database in DXE phase. - + PCD database in DXE phase also contains PCD database in PEI phase which is copied from GUID Hob. @@ -1065,7 +1065,7 @@ BuildPcdDxeDataBase ( A dynamic-ex type PCD, developer must provide pair of token space guid: token number in DEC file. PCD database maintain a mapping table that translate pair of {token space guid: token number} to Token Number. - + @param Guid Token space guid for dynamic-ex PCD entry. @param ExTokenNumber Dynamic-ex PCD token number. @@ -1080,16 +1080,16 @@ GetExPcdTokenNumber ( /** Get next token number in given token space. - + This routine is used for dynamicEx type PCD. It will firstly scan token space - table to get token space according to given token space guid. Then scan given - token number in found token space, if found, then return next token number in + table to get token space according to given token space guid. Then scan given + token number in found token space, if found, then return next token number in this token space. - @param Guid Token space guid. Next token number will be scaned in + @param Guid Token space guid. Next token number will be scaned in this token space. - @param TokenNumber Token number. - If PCD_INVALID_TOKEN_NUMBER, return first token number in + @param TokenNumber Token number. + If PCD_INVALID_TOKEN_NUMBER, return first token number in token space table. If not PCD_INVALID_TOKEN_NUMBER, return next token number in token space table. @@ -1176,18 +1176,18 @@ UpdatePcdDatabase ( extern PCD_DATABASE mPcdDatabase; -extern UINT32 mPcdTotalTokenCount; -extern UINT32 mPeiLocalTokenCount; -extern UINT32 mDxeLocalTokenCount; -extern UINT32 mPeiNexTokenCount; -extern UINT32 mDxeNexTokenCount; +extern UINT32 mPcdTotalTokenCount; +extern UINT32 mPeiLocalTokenCount; +extern UINT32 mDxeLocalTokenCount; +extern UINT32 mPeiNexTokenCount; +extern UINT32 mDxeNexTokenCount; extern UINT32 mPeiExMapppingTableSize; extern UINT32 mDxeExMapppingTableSize; extern UINT32 mPeiGuidTableSize; extern UINT32 mDxeGuidTableSize; -extern BOOLEAN mPeiExMapTableEmpty; -extern BOOLEAN mDxeExMapTableEmpty; +extern BOOLEAN mPeiExMapTableEmpty; +extern BOOLEAN mDxeExMapTableEmpty; extern BOOLEAN mPeiDatabaseEmpty; extern EFI_GUID **TmpTokenSpaceBuffer; diff --git a/MdeModulePkg/Universal/PCD/Pei/Pcd.c b/MdeModulePkg/Universal/PCD/Pei/Pcd.c index 8d9328b544..e552e15176 100644 --- a/MdeModulePkg/Universal/PCD/Pei/Pcd.c +++ b/MdeModulePkg/Universal/PCD/Pei/Pcd.c @@ -1,7 +1,7 @@ -/** @file +/** @file All Pcd Ppi services are implemented here. - -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+ +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -23,33 +23,33 @@ PCD_PPI mPcdPpiInstance = { PeiPcdSetSku, PeiPcdGet8, - PeiPcdGet16, - PeiPcdGet32, - PeiPcdGet64, - PeiPcdGetPtr, - PeiPcdGetBool, + PeiPcdGet16, + PeiPcdGet32, + PeiPcdGet64, + PeiPcdGetPtr, + PeiPcdGetBool, PeiPcdGetSize, PeiPcdGet8Ex, - PeiPcdGet16Ex, - PeiPcdGet32Ex, - PeiPcdGet64Ex, - PeiPcdGetPtrEx, - PeiPcdGetBoolEx, + PeiPcdGet16Ex, + PeiPcdGet32Ex, + PeiPcdGet64Ex, + PeiPcdGetPtrEx, + PeiPcdGetBoolEx, PeiPcdGetSizeEx, - + PeiPcdSet8, - PeiPcdSet16, - PeiPcdSet32, - PeiPcdSet64, - PeiPcdSetPtr, - PeiPcdSetBool, + PeiPcdSet16, + PeiPcdSet32, + PeiPcdSet64, + PeiPcdSetPtr, + PeiPcdSetBool, PeiPcdSet8Ex, - PeiPcdSet16Ex, - PeiPcdSet32Ex, - PeiPcdSet64Ex, - PeiPcdSetPtrEx, + PeiPcdSet16Ex, + PeiPcdSet32Ex, + PeiPcdSet64Ex, + PeiPcdSetPtrEx, PeiPcdSetBoolEx, PeiRegisterCallBackOnSet, @@ -64,7 +64,7 @@ PCD_PPI mPcdPpiInstance = { /// EFI_PEI_PCD_PPI mEfiPcdPpiInstance = { PeiPcdSetSku, - + PeiPcdGet8Ex, PeiPcdGet16Ex, PeiPcdGet32Ex, @@ -327,7 +327,7 @@ EFI_PEI_NOTIFY_DESCRIPTOR mEndOfPeiSignalPpiNotifyList[] = { /** Main entry for PCD PEIM driver. - + This routine initialize the PCD database for PEI phase and install PCD_PPI/EFI_PEI_PCD_PPI. @param FileHandle Handle of the file being invoked. @@ -439,21 +439,21 @@ PeiGetPcdInfoGetSku ( /** Sets the SKU value for subsequent calls to set or get PCD token values. - SetSku() sets the SKU Id to be used for subsequent calls to set or get PCD values. + SetSku() sets the SKU Id to be used for subsequent calls to set or get PCD values. SetSku() is normally called only once by the system. - For each item (token), the database can hold a single value that applies to all SKUs, - or multiple values, where each value is associated with a specific SKU Id. Items with multiple, - SKU-specific values are called SKU enabled. - + For each item (token), the database can hold a single value that applies to all SKUs, + or multiple values, where each value is associated with a specific SKU Id. Items with multiple, + SKU-specific values are called SKU enabled. + The SKU Id of zero is reserved as a default. - For tokens that are not SKU enabled, the system ignores any set SKU Id and works with the - single value for that token. For SKU-enabled tokens, the system will use the SKU Id set by the - last call to SetSku(). If no SKU Id is set or the currently set SKU Id isn't valid for the specified token, - the system uses the default SKU Id. If the system attempts to use the default SKU Id and no value has been + For tokens that are not SKU enabled, the system ignores any set SKU Id and works with the + single value for that token. For SKU-enabled tokens, the system will use the SKU Id set by the + last call to SetSku(). If no SKU Id is set or the currently set SKU Id isn't valid for the specified token, + the system uses the default SKU Id. If the system attempts to use the default SKU Id and no value has been set for that Id, the results are unpredictable. - @param[in] SkuId The SKU value that will be used when the PCD service will retrieve and + @param[in] SkuId The SKU value that will be used when the PCD service will retrieve and set values associated with a PCD token. **/ @@ -582,13 +582,13 @@ PeiPcdSetSku ( /** Retrieves an 8-bit value for a given PCD token. - Retrieves the current byte-sized value for a PCD token number. + Retrieves the current byte-sized value for a PCD token number. If the TokenNumber is invalid, the results are unpredictable. - - @param[in] TokenNumber The PCD token number. + + @param[in] TokenNumber The PCD token number. @return The UINT8 value. - + **/ UINT8 EFIAPI @@ -602,13 +602,13 @@ PeiPcdGet8 ( /** Retrieves an 16-bit value for a given PCD token. - Retrieves the current 16-bits value for a PCD token number. + Retrieves the current 16-bits value for a PCD token number. If the TokenNumber is invalid, the results are unpredictable. - - @param[in] TokenNumber The PCD token number. + + @param[in] TokenNumber The PCD token number. @return The UINT16 value. - + **/ UINT16 EFIAPI @@ -622,13 +622,13 @@ PeiPcdGet16 ( /** Retrieves an 32-bit value for a given PCD token. - Retrieves the current 32-bits value for a PCD token number. + Retrieves the current 32-bits value for a PCD token number. If the TokenNumber is invalid, the results are unpredictable. - - @param[in] TokenNumber The PCD token number. + + @param[in] TokenNumber The PCD token number. @return The UINT32 value. - + **/ UINT32 EFIAPI @@ -642,13 +642,13 @@ PeiPcdGet32 ( /** Retrieves an 64-bit value for a given PCD token. - Retrieves the current 64-bits value for a PCD token number. + Retrieves the current 64-bits value for a PCD token number. If the TokenNumber is invalid, the results are unpredictable. - - @param[in] TokenNumber The PCD token number. + + @param[in] TokenNumber The PCD token number. @return The UINT64 value. - + **/ UINT64 EFIAPI @@ -662,15 +662,15 @@ PeiPcdGet64 ( /** Retrieves a pointer to a value for a given PCD token. - Retrieves the current pointer to the buffer for a PCD token number. - Do not make any assumptions about the alignment of the pointer that - is returned by this function call. If the TokenNumber is invalid, + Retrieves the current pointer to the buffer for a PCD token number. + Do not make any assumptions about the alignment of the pointer that + is returned by this function call. If the TokenNumber is invalid, the results are unpredictable. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @return The pointer to the buffer to be retrieved. - + **/ VOID * EFIAPI @@ -684,15 +684,15 @@ PeiPcdGetPtr ( /** Retrieves a Boolean value for a given PCD token. - Retrieves the current boolean value for a PCD token number. - Do not make any assumptions about the alignment of the pointer that - is returned by this function call. If the TokenNumber is invalid, + Retrieves the current boolean value for a PCD token number. + Do not make any assumptions about the alignment of the pointer that + is returned by this function call. If the TokenNumber is invalid, the results are unpredictable. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @return The Boolean value. - + **/ BOOLEAN EFIAPI @@ -706,13 +706,13 @@ PeiPcdGetBool ( /** Retrieves the size of the value for a given PCD token. - Retrieves the current size of a particular PCD token. + Retrieves the current size of a particular PCD token. If the TokenNumber is invalid, the results are unpredictable. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @return The size of the value for the PCD token. - + **/ UINTN EFIAPI @@ -735,7 +735,7 @@ PeiPcdGetSize ( TokenNumber--; // EBC compiler is very choosy. It may report warning about comparison - // between UINTN and 0 . So we add 1 in each size of the + // between UINTN and 0 . So we add 1 in each size of the // comparison. ASSERT (TokenNumber + 1 < (LocalTokenCount + 1)); @@ -755,16 +755,16 @@ PeiPcdGetSize ( /** Retrieves an 8-bit value for a given PCD token. - Retrieves the 8-bit value of a particular PCD token. + Retrieves the 8-bit value of a particular PCD token. If the TokenNumber is invalid or the token space - specified by Guid does not exist, the results are + specified by Guid does not exist, the results are unpredictable. @param[in] Guid The token space for the token number. - @param[in] ExTokenNumber The PCD token number. + @param[in] ExTokenNumber The PCD token number. @return The size 8-bit value for the PCD token. - + **/ UINT8 EFIAPI @@ -779,16 +779,16 @@ PeiPcdGet8Ex ( /** Retrieves an 16-bit value for a given PCD token. - Retrieves the 16-bit value of a particular PCD token. + Retrieves the 16-bit value of a particular PCD token. If the TokenNumber is invalid or the token space - specified by Guid does not exist, the results are + specified by Guid does not exist, the results are unpredictable. @param[in] Guid The token space for the token number. - @param[in] ExTokenNumber The PCD token number. + @param[in] ExTokenNumber The PCD token number. @return The size 16-bit value for the PCD token. - + **/ UINT16 EFIAPI @@ -803,16 +803,16 @@ PeiPcdGet16Ex ( /** Retrieves an 32-bit value for a given PCD token. - Retrieves the 32-bit value of a particular PCD token. + Retrieves the 32-bit value of a particular PCD token. If the TokenNumber is invalid or the token space - specified by Guid does not exist, the results are + specified by Guid does not exist, the results are unpredictable. @param[in] Guid The token space for the token number. - @param[in] ExTokenNumber The PCD token number. + @param[in] ExTokenNumber The PCD token number. @return The size 32-bit value for the PCD token. - + **/ UINT32 EFIAPI @@ -827,16 +827,16 @@ PeiPcdGet32Ex ( /** Retrieves an 64-bit value for a given PCD token. - Retrieves the 64-bit value of a particular PCD token. + Retrieves the 64-bit value of a particular PCD token. If the TokenNumber is invalid or the token space - specified by Guid does not exist, the results are + specified by Guid does not exist, the results are unpredictable. @param[in] Guid The token space for the token number. - @param[in] ExTokenNumber The PCD token number. + @param[in] ExTokenNumber The PCD token number. @return The size 64-bit value for the PCD token. - + **/ UINT64 EFIAPI @@ -851,16 +851,16 @@ PeiPcdGet64Ex ( /** Retrieves a pointer to a value for a given PCD token. - Retrieves the current pointer to the buffer for a PCD token number. - Do not make any assumptions about the alignment of the pointer that - is returned by this function call. If the TokenNumber is invalid, + Retrieves the current pointer to the buffer for a PCD token number. + Do not make any assumptions about the alignment of the pointer that + is returned by this function call. If the TokenNumber is invalid, the results are unpredictable. @param[in] Guid The token space for the token number. - @param[in] ExTokenNumber The PCD token number. + @param[in] ExTokenNumber The PCD token number. @return The pointer to the buffer to be retrieved. - + **/ VOID * EFIAPI @@ -875,16 +875,16 @@ PeiPcdGetPtrEx ( /** Retrieves an Boolean value for a given PCD token. - Retrieves the Boolean value of a particular PCD token. + Retrieves the Boolean value of a particular PCD token. If the TokenNumber is invalid or the token space - specified by Guid does not exist, the results are + specified by Guid does not exist, the results are unpredictable. @param[in] Guid The token space for the token number. - @param[in] ExTokenNumber The PCD token number. + @param[in] ExTokenNumber The PCD token number. @return The size Boolean value for the PCD token. - + **/ BOOLEAN EFIAPI @@ -899,14 +899,14 @@ PeiPcdGetBoolEx ( /** Retrieves the size of the value for a given PCD token. - Retrieves the current size of a particular PCD token. + Retrieves the current size of a particular PCD token. If the TokenNumber is invalid, the results are unpredictable. @param[in] Guid The token space for the token number. - @param[in] ExTokenNumber The PCD token number. + @param[in] ExTokenNumber The PCD token number. @return The size of the value for the PCD token. - + **/ UINTN EFIAPI @@ -921,19 +921,19 @@ PeiPcdGetSizeEx ( /** Sets an 8-bit value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -948,19 +948,19 @@ PeiPcdSet8 ( /** Sets an 16-bit value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -975,19 +975,19 @@ PeiPcdSet16 ( /** Sets an 32-bit value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -1002,19 +1002,19 @@ PeiPcdSet32 ( /** Sets an 64-bit value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -1029,23 +1029,23 @@ PeiPcdSet64 ( /** Sets a value of a specified size for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. - @param[in] TokenNumber The PCD token number. - @param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token. - On input, if the SizeOfValue is greater than the maximum size supported - for this TokenNumber then the output value of SizeOfValue will reflect + @param[in] TokenNumber The PCD token number. + @param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token. + On input, if the SizeOfValue is greater than the maximum size supported + for this TokenNumber then the output value of SizeOfValue will reflect the maximum size supported for this TokenNumber. @param[in] Buffer The buffer to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -1061,19 +1061,19 @@ PeiPcdSetPtr ( /** Sets an Boolean value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -1088,20 +1088,20 @@ PeiPcdSetBool ( /** Sets an 8-bit value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. - @param[in] ExTokenNumber The PCD token number. + @param[in] ExTokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -1117,20 +1117,20 @@ PeiPcdSet8Ex ( /** Sets an 16-bit value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. - @param[in] ExTokenNumber The PCD token number. + @param[in] ExTokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -1146,20 +1146,20 @@ PeiPcdSet16Ex ( /** Sets an 32-bit value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. - @param[in] ExTokenNumber The PCD token number. + @param[in] ExTokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -1175,20 +1175,20 @@ PeiPcdSet32Ex ( /** Sets an 64-bit value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. - @param[in] ExTokenNumber The PCD token number. + @param[in] ExTokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -1204,24 +1204,24 @@ PeiPcdSet64Ex ( /** Sets a value of a specified size for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. - @param[in] ExTokenNumber The PCD token number. - @param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token. - On input, if the SizeOfValue is greater than the maximum size supported - for this TokenNumber then the output value of SizeOfValue will reflect + @param[in] ExTokenNumber The PCD token number. + @param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token. + On input, if the SizeOfValue is greater than the maximum size supported + for this TokenNumber then the output value of SizeOfValue will reflect the maximum size supported for this TokenNumber. @param[in] Value The buffer to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -1238,20 +1238,20 @@ PeiPcdSetPtrEx ( /** Sets an Boolean value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. @param [in] Guid The 128-bit unique value that designates the namespace from which to extract the value. - @param [in] ExTokenNumber The PCD token number. + @param [in] ExTokenNumber The PCD token number. @param [in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -1268,10 +1268,10 @@ PeiPcdSetBoolEx ( Specifies a function to be called anytime the value of a designated token is changed. @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. - @param[in] ExTokenNumber The PCD token number. - @param[in] CallBackFunction The function prototype called when the value associated with the CallBackToken is set. + @param[in] ExTokenNumber The PCD token number. + @param[in] CallBackFunction The function prototype called when the value associated with the CallBackToken is set. - @retval EFI_SUCCESS The PCD service has successfully established a call event + @retval EFI_SUCCESS The PCD service has successfully established a call event for the CallBackToken requested. @retval EFI_NOT_FOUND The PCD service could not find the referenced token number. @@ -1299,10 +1299,10 @@ PeiRegisterCallBackOnSet ( Cancels a previously set callback function for a particular PCD token number. @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. - @param[in] ExTokenNumber The PCD token number. - @param[in] CallBackFunction The function prototype called when the value associated with the CallBackToken is set. + @param[in] ExTokenNumber The PCD token number. + @param[in] CallBackFunction The function prototype called when the value associated with the CallBackToken is set. - @retval EFI_SUCCESS The PCD service has successfully established a call event + @retval EFI_SUCCESS The PCD service has successfully established a call event for the CallBackToken requested. @retval EFI_NOT_FOUND The PCD service could not find the referenced token number. @@ -1327,26 +1327,26 @@ PcdUnRegisterCallBackOnSet ( } /** - Retrieves the next valid token number in a given namespace. - - This is useful since the PCD infrastructure contains a sparse list of token numbers, - and one cannot a priori know what token numbers are valid in the database. - - If TokenNumber is 0 and Guid is not NULL, then the first token from the token space specified by Guid is returned. - If TokenNumber is not 0 and Guid is not NULL, then the next token in the token space specified by Guid is returned. - If TokenNumber is 0 and Guid is NULL, then the first token in the default token space is returned. - If TokenNumber is not 0 and Guid is NULL, then the next token in the default token space is returned. - The token numbers in the default token space may not be related to token numbers in token spaces that are named by Guid. - If the next token number can be retrieved, then it is returned in TokenNumber, and EFI_SUCCESS is returned. - If TokenNumber represents the last token number in the token space specified by Guid, then EFI_NOT_FOUND is returned. + Retrieves the next valid token number in a given namespace. + + This is useful since the PCD infrastructure contains a sparse list of token numbers, + and one cannot a priori know what token numbers are valid in the database. + + If TokenNumber is 0 and Guid is not NULL, then the first token from the token space specified by Guid is returned. + If TokenNumber is not 0 and Guid is not NULL, then the next token in the token space specified by Guid is returned. + If TokenNumber is 0 and Guid is NULL, then the first token in the default token space is returned. + If TokenNumber is not 0 and Guid is NULL, then the next token in the default token space is returned. + The token numbers in the default token space may not be related to token numbers in token spaces that are named by Guid. + If the next token number can be retrieved, then it is returned in TokenNumber, and EFI_SUCCESS is returned. + If TokenNumber represents the last token number in the token space specified by Guid, then EFI_NOT_FOUND is returned. If TokenNumber is not present in the token space specified by Guid, then EFI_NOT_FOUND is returned. - @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. - This is an optional parameter that may be NULL. If this parameter is NULL, then a request + @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. + This is an optional parameter that may be NULL. If this parameter is NULL, then a request is being made to retrieve tokens from the default token space. @param[in, out] TokenNumber A pointer to the PCD token number to use to find the subsequent token number. - + @retval EFI_SUCCESS The PCD service has retrieved the next valid token number. @retval EFI_NOT_FOUND The PCD service could not find data from the requested token number. @@ -1366,7 +1366,7 @@ PeiPcdGetNextToken ( UINTN Index; BOOLEAN Found; BOOLEAN PeiExMapTableEmpty; - UINTN PeiNexTokenNumber; + UINTN PeiNexTokenNumber; if (!FeaturePcdGet (PcdPeiFullPcdDatabaseEnable)) { return EFI_UNSUPPORTED; @@ -1466,7 +1466,7 @@ PeiPcdGetNextToken ( token namespace on the platform. If *Guid is NULL, then the GUID of the first token space of the current platform is returned. If the search cannot locate the next valid token namespace, an error is returned and the value of *Guid is undefined. - + @retval EFI_SUCCESS The PCD service retrieved the value requested. @retval EFI_NOT_FOUND The PCD service could not find the next valid token namespace. @@ -1500,14 +1500,14 @@ PeiPcdGetNextTokenSpace ( } else { PeiExMapTableEmpty = FALSE; } - + if (PeiExMapTableEmpty) { return EFI_NOT_FOUND; } ExMapTable = (DYNAMICEX_MAPPING *)((UINT8 *)PeiPcdDb + PeiPcdDb->ExMapTableOffset); GuidTable = (EFI_GUID *)((UINT8 *)PeiPcdDb + PeiPcdDb->GuidTableOffset); - + if (*Guid == NULL) { // // return the first Token Space Guid. @@ -1521,7 +1521,7 @@ PeiPcdGetNextTokenSpace ( if (MatchGuid == NULL) { return EFI_NOT_FOUND; } - + GuidTableIdx = MatchGuid - GuidTable; Found = FALSE; @@ -1561,7 +1561,7 @@ PeiPcdGetNextTokenSpace ( /** Get PCD value's size for POINTER type PCD. - + The POINTER type PCD's value will be stored into a buffer in specified size. The max size of this PCD's value is described in PCD's definition in DEC file. @@ -1588,12 +1588,12 @@ GetPtrTypeSize ( LocalTokenNumber = *((UINT32 *)((UINT8 *)Database + Database->LocalTokenNumberTableOffset) + LocalTokenNumberTableIdx); ASSERT ((LocalTokenNumber & PCD_DATUM_TYPE_ALL_SET) == PCD_DATUM_TYPE_POINTER); - + SizeTable = (SIZE_INFO *)((UINT8 *)Database + Database->SizeTableOffset); *MaxSize = SizeTable[SizeTableIdx]; // - // SizeTable only contain record for PCD_DATUM_TYPE_POINTER type + // SizeTable only contain record for PCD_DATUM_TYPE_POINTER type // PCD entry. // if ((LocalTokenNumber & PCD_TYPE_VPD) != 0) { @@ -1616,7 +1616,7 @@ GetPtrTypeSize ( /** Set PCD value's size for POINTER type PCD. - + The POINTER type PCD's value will be stored into a buffer in specified size. The max size of this PCD's value is described in PCD's definition in DEC file. @@ -1639,7 +1639,7 @@ SetPtrTypeSize ( UINTN LocalTokenNumber; SIZE_INFO *SizeTable; UINTN MaxSize; - + SizeTableIdx = GetSizeTableIndex (LocalTokenNumberTableIdx, Database); LocalTokenNumber = *((UINT32 *)((UINT8 *)Database + Database->LocalTokenNumberTableOffset) + LocalTokenNumberTableIdx); @@ -1650,7 +1650,7 @@ SetPtrTypeSize ( MaxSize = SizeTable[SizeTableIdx]; // - // SizeTable only contain record for PCD_DATUM_TYPE_POINTER type + // SizeTable only contain record for PCD_DATUM_TYPE_POINTER type // PCD entry. // if ((LocalTokenNumber & PCD_TYPE_VPD) != 0) { @@ -1665,7 +1665,7 @@ SetPtrTypeSize ( *CurrentSize = MaxSize; return FALSE; } - + // // We have only two entry for Non-Sku enabled PCD entry: // 1) MAX SIZE diff --git a/MdeModulePkg/Universal/PCD/Pei/Pcd.inf b/MdeModulePkg/Universal/PCD/Pei/Pcd.inf index 3cba28944c..c2a3ccbbc0 100644 --- a/MdeModulePkg/Universal/PCD/Pei/Pcd.inf +++ b/MdeModulePkg/Universal/PCD/Pei/Pcd.inf @@ -1,18 +1,18 @@ ## @file # PCD PEIM produces PCD database to manage all dynamic PCD in PEI phase and install Pcd Ppi service. # -# This version PCD PEIM depends on the external PCD database binary file, not built in PCD data base. +# This version PCD PEIM depends on the external PCD database binary file, not built in PCD data base. # There are two PCD PPIs as follows: -# 1) PCD_PPI +# 1) PCD_PPI # It is EDKII implementation which support Dynamic/DynamicEx Pcds. # 2) EFI_PEI_PCD_PPI -# It is defined by PI specification 1.2, Vol 3 which only support dynamicEx +# It is defined by PI specification 1.2, Vol 3 which only support dynamicEx # type Pcd. # For dynamicEx type PCD, it is compatible between PCD_PPI and EFI_PEI_PCD_PPI. # PCD PEIM driver will produce above two PPIs at same time. # -# PCD database is generated as the separate binary image at build time. The binary image -# will be intergrated into Firmware volume together with PCD driver. +# PCD database is generated as the separate binary image at build time. The binary image +# will be intergrated into Firmware volume together with PCD driver. # # //////////////////////////////////////////////////////////////////////////////// # // // @@ -21,94 +21,94 @@ # //////////////////////////////////////////////////////////////////////////////// # # 1, Introduction -# PCD database hold all dynamic type PCD information. The structure of PEI PCD -# database is generated by build tools according to dynamic PCD usage for +# PCD database hold all dynamic type PCD information. The structure of PEI PCD +# database is generated by build tools according to dynamic PCD usage for # specified platform. -# +# # 2, Dynamic Type PCD # Dynamic type PCD is used for the configuration/setting which value is determined -# dynamic. In contrast, the value of static type PCD (FeatureFlag, FixedPcd, -# PatchablePcd) is fixed in final generated FD image in build time. -# +# dynamic. In contrast, the value of static type PCD (FeatureFlag, FixedPcd, +# PatchablePcd) is fixed in final generated FD image in build time. +# # 2.1 The "dynamic" determination means one of below cases: -# a) The PCD setting value is produced by someone driver and consumed by +# a) The PCD setting value is produced by someone driver and consumed by # other driver in execution time. # b) The PCD setting value is set/get by user from FrontPage. # c) The PCD setting value is produced by platform OEM vendor in specified area. -# +# # 2.2 According to module distribution way, dynamic PCD could be classfied as: # a) Dynamic: -# If module is released in source code and will be built with platform +# If module is released in source code and will be built with platform # DSC, the dynamic PCD used by this module can be accessed as: -# PcdGetxx(PcdSampleDynamicPcd); +# PcdGetxx(PcdSampleDynamicPcd); # In building platform, build tools will translate PcdSampleDynamicPcd to -# pair of {Token Space Guid: Token Number} for this PCD. +# pair of {Token Space Guid: Token Number} for this PCD. # b) DynamicEx: # If module is release as binary and will not pariticpate platform building, # the dynamic PCD used by this module need be accessed as: # PcdGetxxEx(gEfiMyTokenspaceGuid, PcdSampleDynamicPcd) # Developer need explicity gives {Token Space Guid:Token Number} as parameter # in writting source code. -# +# # 2.3 According to PCD value's storage method, dynamic PCD could be classfied as: -# a) Default Storage: -# - The PCD value is stored in PCD database maintained by PCD driver in boot +# a) Default Storage: +# - The PCD value is stored in PCD database maintained by PCD driver in boot # time memory. -# - This type is used for communication between PEIM/DXE driver, DXE/DXE -# driver. But all set/get value will be losted after boot-time memory +# - This type is used for communication between PEIM/DXE driver, DXE/DXE +# driver. But all set/get value will be losted after boot-time memory # is turn off. -# - [PcdsDynamicDefault] is used as section name for this type PCD in +# - [PcdsDynamicDefault] is used as section name for this type PCD in # platform DSC file. [PcdsDynamicExDefault] is used for dynamicEx type PCD. -# -# b) Variable Storage: -# - The PCD value is stored in variable area. +# +# b) Variable Storage: +# - The PCD value is stored in variable area. # - As default storage type, this type PCD could be used for PEI/DXE driver -# communication. But beside it, this type PCD could also be used to store +# communication. But beside it, this type PCD could also be used to store # the value associate with a HII setting via variable interface. -# - In PEI phase, the PCD value could only be got but can not be set due +# - In PEI phase, the PCD value could only be got but can not be set due # to variable area is readonly. -# - [PcdsDynamicHii] is used as section name for this type PCD in platform +# - [PcdsDynamicHii] is used as section name for this type PCD in platform # DSC file. [PcdsDynamicExHii] is for dynamicEx type PCD. -# +# # c) OEM specificed storage area: -# - The PCD value is stored in OEM specified area which base address is +# - The PCD value is stored in OEM specified area which base address is # specified by a FixedAtBuild PCD setting - PcdVpdBaseAddress. # - The area is read only for PEI and DXE phase. -# - [PcdsDynamicVpd] is used as section name for this type PCD in platform +# - [PcdsDynamicVpd] is used as section name for this type PCD in platform # DSC file. [PcdsDynamicExVpd] is for dynamicex type PCD. -# +# # 2.4 When and how to use dynamic PCD # Module developer do not care the used PCD is dynamic or static when writting -# source code/INF. Dynamic PCD and dynamic type is pointed by platform integrator +# source code/INF. Dynamic PCD and dynamic type is pointed by platform integrator # in platform DSC file. Please ref section 2.3 to get matching between dynamic # PCD type and section name in DSC file. -# +# # 3, PCD database: -# Although dynamic PCD could be in different storage type as above description, +# Although dynamic PCD could be in different storage type as above description, # but the basic information and default value for all dynamic PCD is hold # by PCD database maintained by PEI/DXE driver. -# +# # As the whole EFI BIOS boot path is divided into PEI/DXE phase, the PCD database # also is divided into Pei/Dxe database maintaied by PcdPeim/PcdDxe driver separatly. # To make PcdPeim's driver image smaller, PEI PCD database only hold all dynamic # PCD information used in PEI phase or use in both PEI/DXE phase. And DXE PCD # database contains all PCDs used in PEI/DXE phase in memory. -# -# Build tool will generate PCD database into the separate binary file for -# PEI/DXE PCD driver according to dynamic PCD section in platform DSC file. -# +# +# Build tool will generate PCD database into the separate binary file for +# PEI/DXE PCD driver according to dynamic PCD section in platform DSC file. +# # 3.1 PcdPeim and PcdDxe # PEI PCD database is maintained by PcdPeim driver run from flash. PcdPeim driver -# build guid hob in temporary memory and copy the binary data base from flash -# to temporary memory for PEI PCD database. +# build guid hob in temporary memory and copy the binary data base from flash +# to temporary memory for PEI PCD database. # DXE PCD database is maintained by PcdDxe driver.At entry point of PcdDxe driver, # a new PCD database is allocated in boot-time memory which including all # PEI PCD and DXE PCD entry. -# +# # Pcd driver should run as early as possible before any other driver access # dynamic PCD's value. PEI/DXE "Apriori File" mechanism make it possible by # making PcdPeim/PcdDxe as first dispatching driver in PEI/DXE phase. -# +# # 3.2 Token space Guid/Token number, Platform token, Local token number # Dynamic PCD # +-----------+ +---------+ @@ -128,42 +128,42 @@ # | Token | # | Number | # +-----------+ -# -# +# +# # 3.2.1 Pair of Token space guid + Token number # Any type PCD is identified by pair of "TokenSpaceGuid + TokeNumber". But it -# is not easy maintained by PCD driver, and hashed token number will make -# searching slowly. +# is not easy maintained by PCD driver, and hashed token number will make +# searching slowly. # # 3.2.2 Platform Token Number -# "Platform token number" concept is introduced for mapping to a pair of -# "TokenSpaceGuid + TokenNumber". The platform token number is generated by -# build tool in autogen.h and all of them are continual in a platform scope +# "Platform token number" concept is introduced for mapping to a pair of +# "TokenSpaceGuid + TokenNumber". The platform token number is generated by +# build tool in autogen.h and all of them are continual in a platform scope # started from 1.(0 meaning invalid internal token number) # With auto-generated "platform token number", PcdGet(PcdSampleDynamicPcd) -# in source code is translated to LibPcdGet(_PCD_TOKEN_PcdSampleDynamicPcd) +# in source code is translated to LibPcdGet(_PCD_TOKEN_PcdSampleDynamicPcd) # in autogen.h. # Notes: The mapping between pair of "tokenspace guid + token number" and # "internal token number" need build tool establish, so "platform token number" # mechanism is not suitable for binary module which use DynamicEx type PCD. # To access a dynamicEx type PCD, pair of "token space guid/token number" all need # to be specificed for PcdSet/PcdGet accessing macro. -# -# Platform Token Number is started from 1, and inceased continuous. From whole +# +# Platform Token Number is started from 1, and inceased continuous. From whole # platform scope, there are two zones: PEI Zone and DXE Zone # | Platform Token Number # ----------|---------------------------------------------------------------- # PEI Zone: | 1 ~ PEI_LOCAL_TOKEN_NUMBER # DXE Zone: | (PEI_LOCAL_TOKEN_NUMBER + 1) ~ (PEI_LOCAL_TOKEN_NUMBER + DXE_LOCAL_TOKEN_NUMBER) -# +# # 3.2.3 Local Token Number -# To fast searching a PCD entry in PCD database, PCD driver translate +# To fast searching a PCD entry in PCD database, PCD driver translate # platform token number to local token number via a mapping table. # For binary DynamicEx type PCD, there is a another mapping table to translate # "token space guid + token number" to local token number directly. # Local token number is identifier for all internal interface in PCD PEI/DXE # driver. -# +# # A local token number is a 32-bit value in following meaning: # 32 ------------- 28 ---------- 24 -------- 0 # | PCD type mask | Datum Type | Offset | @@ -183,13 +183,13 @@ # Offset : indicate the related offset of PCD value in PCD database array. # Based on local token number, PCD driver could fast determine PCD type, value # type and get PCD entry from PCD database. -# +# # 3.3 PCD Database binary file -# PCD Database binary file will be created at build time as the standalone binary image. -# To understand the binary image layout, PCD Database C structure is still generated +# PCD Database binary file will be created at build time as the standalone binary image. +# To understand the binary image layout, PCD Database C structure is still generated # as comments by build tools in PCD driver's autogen.h/ # autogen.c file. In generated C structure, following information is stored: -# - ExMapTable: This table is used translate a binary dynamicex type PCD's +# - ExMapTable: This table is used translate a binary dynamicex type PCD's # "tokenguid + token" to local token number. # - LocalTokenNumberTable: # This table stores all local token number in array, use "Internal @@ -199,19 +199,19 @@ # HII type PCD's variable GUID. # - SkuIdTable: TBD # - SystemSkuId: TBD -# - PCD value structure: +# - PCD value structure: # Every PCD has a value record in PCD database. For different -# datum type PCD has different record structure which will be +# datum type PCD has different record structure which will be # introduced in 3.3.1 -# -# In a PCD database structure, there are two major area: Init and UnInit. -# Init area is use stored above PCD internal structure such as ExMapTable, -# LocalTokenNumberTable etc and the (default) value of PCD which has default +# +# In a PCD database structure, there are two major area: Init and UnInit. +# Init area is use stored above PCD internal structure such as ExMapTable, +# LocalTokenNumberTable etc and the (default) value of PCD which has default # value specified in platform DSC file. # Unint area is used stored the value of PCD which has no default value in # platform DSC file, the value of NULL, 0 specified in platform DSC file can # be seemed as "no default value". -# +# # 3.3.1 Simple Sample PCD Database C Structure # A general sample of PCD database structue is as follows: # typedef struct _PCD_DATABASE { @@ -223,7 +223,7 @@ # SIZE_INFO SizeTable[PEI_SIZE_TABLE_SIZE]; # UINT8 SkuIdTable[PEI_SKUID_TABLE_SIZE]; # SKU_ID SystemSkuId; -# +# # //===== Following is value structure for PCD with default value # .... # .... @@ -235,11 +235,11 @@ # .... # } UnInit; # } -# +# # 3.3.2 PCD value structure in PCD database C structure # The value's structure is generated by build tool in PCD database C structure. # The PCDs in different datum type has different value structure. -# +# # 3.3.2.1 UINT8/UINT16/UINT32/UINT64 datum type PCD # The C structure for these datum type PCD is just a UINT8/UINT16/UINT32/UINT64 # data member in PCD database, For example: @@ -247,36 +247,36 @@ # Above structure is generated by build tool, the member name is "PcdCName_Guidvalue" # Member type is UINT16 according to PcdHardwareErrorRecordLevel declaration # in DEC file. -# +# # 3.3.2.2 VOID* datum type PCD # The value of VOID* datum type PCD is a UINT8/UINT16 array in PCD database. -# +# # 3.3.2.2.1 VOID* - string type -# If the default value for VOID* datum type PCD like L"xxx", the PCD is -# used for unicode string, and C structure of this datum type PCD is +# If the default value for VOID* datum type PCD like L"xxx", the PCD is +# used for unicode string, and C structure of this datum type PCD is # UINT16 string array in PCD database, for example: # UINT16 StringTable[29]; # The number of 29 in above sample is max size of a unicode string. -# +# # If the default value for VOID* datum type PCD like "xxx", the PCD is -# used for ascii string, and C structure of this datum type PCD is +# used for ascii string, and C structure of this datum type PCD is # UINT8 string array in PCD database, for example: # UINT8 StringTable[20]; # The number of 20 in above sample is max size of a ascii string. -# +# # 3.3.2.2.2 VOID* - byte array # If the default value of VOID* datum type PCD like {'0x29', '0x01', '0xf2'} -# the PCD is used for byte array. The generated structrue is same as +# the PCD is used for byte array. The generated structrue is same as # above ascii string table, # UINT8 StringTable[13]; # The number of 13 in above sample is max size of byte array. -# +# # 3.3.3 Some utility structures in PCD Database # 3.3.3.1 GuidTable # GuidTable array is used to store all related GUID value in PCD database: # - Variable GUID for HII type PCD -# - Token space GUID for dynamicex type PCD -# +# - Token space GUID for dynamicex type PCD +# # Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials @@ -327,7 +327,7 @@ [Guids] ## PRODUCES ## HOB ## SOMETIMES_CONSUMES ## HOB - gPcdDataBaseHobGuid + gPcdDataBaseHobGuid gPcdDataBaseSignatureGuid ## CONSUMES ## GUID # PCD database signature GUID. gEfiMdeModulePkgTokenSpaceGuid ## SOMETIMES_CONSUMES ## GUID diff --git a/MdeModulePkg/Universal/PCD/Pei/PcdPeim.uni b/MdeModulePkg/Universal/PCD/Pei/PcdPeim.uni index 3e7c5566f0..88cfe01f5b 100644 --- a/MdeModulePkg/Universal/PCD/Pei/PcdPeim.uni +++ b/MdeModulePkg/Universal/PCD/Pei/PcdPeim.uni @@ -10,32 +10,32 @@ // type Pcd. // For dynamicEx type PCD, it is compatible between PCD_PPI and EFI_PEI_PCD_PPI. // PCD PEIM driver will produce above two PPIs at same time. -// +// // PCD database is generated as the separate binary image at build time. The binary image // will be intergrated into Firmware volume together with PCD driver. -// +// // //////////////////////////////////////////////////////////////////////////////// // // // // // Introduction of PCD database // // // // // //////////////////////////////////////////////////////////////////////////////// -// +// // 1, Introduction // PCD database hold all dynamic type PCD information. The structure of PEI PCD // database is generated by build tools according to dynamic PCD usage for // specified platform. -// +// // 2, Dynamic Type PCD // Dynamic type PCD is used for the configuration/setting which value is determined // dynamic. In contrast, the value of static type PCD (FeatureFlag, FixedPcd, // PatchablePcd) is fixed in final generated FD image in build time. -// +// // 2.1 The "dynamic" determination means one of below cases: // a) The PCD setting value is produced by someone driver and consumed by // other driver in execution time. // b) The PCD setting value is set/get by user from FrontPage. // c) The PCD setting value is produced by platform OEM vendor in specified area. -// +// // 2.2 According to module distribution way, dynamic PCD could be classfied as: // a) Dynamic: // If module is released in source code and will be built with platform @@ -49,7 +49,7 @@ // PcdGetxxEx(gEfiMyTokenspaceGuid, PcdSampleDynamicPcd) // Developer need explicity gives {Token Space Guid:Token Number} as parameter // in writting source code. -// +// // 2.3 According to PCD value's storage method, dynamic PCD could be classfied as: // a) Default Storage: // - The PCD value is stored in PCD database maintained by PCD driver in boot @@ -59,7 +59,7 @@ // is turn off. // - [PcdsDynamicDefault] is used as section name for this type PCD in // platform DSC file. [PcdsDynamicExDefault] is used for dynamicEx type PCD. -// +// // b) Variable Storage: // - The PCD value is stored in variable area. // - As default storage type, this type PCD could be used for PEI/DXE driver @@ -69,34 +69,34 @@ // to variable area is readonly. // - [PcdsDynamicHii] is used as section name for this type PCD in platform // DSC file. [PcdsDynamicExHii] is for dynamicEx type PCD. -// +// // c) OEM specificed storage area: // - The PCD value is stored in OEM specified area which base address is // specified by a FixedAtBuild PCD setting - PcdVpdBaseAddress. // - The area is read only for PEI and DXE phase. // - [PcdsDynamicVpd] is used as section name for this type PCD in platform // DSC file. [PcdsDynamicExVpd] is for dynamicex type PCD. -// +// // 2.4 When and how to use dynamic PCD // Module developer do not care the used PCD is dynamic or static when writting // source code/INF. Dynamic PCD and dynamic type is pointed by platform integrator // in platform DSC file. Please ref section 2.3 to get matching between dynamic // PCD type and section name in DSC file. -// +// // 3, PCD database: // Although dynamic PCD could be in different storage type as above description, // but the basic information and default value for all dynamic PCD is hold // by PCD database maintained by PEI/DXE driver. -// +// // As the whole EFI BIOS boot path is divided into PEI/DXE phase, the PCD database // also is divided into Pei/Dxe database maintaied by PcdPeim/PcdDxe driver separatly. // To make PcdPeim's driver image smaller, PEI PCD database only hold all dynamic // PCD information used in PEI phase or use in both PEI/DXE phase. And DXE PCD // database contains all PCDs used in PEI/DXE phase in memory. -// +// // Build tool will generate PCD database into the separate binary file for // PEI/DXE PCD driver according to dynamic PCD section in platform DSC file. -// +// // 3.1 PcdPeim and PcdDxe // PEI PCD database is maintained by PcdPeim driver run from flash. PcdPeim driver // build guid hob in temporary memory and copy the binary data base from flash @@ -104,11 +104,11 @@ // DXE PCD database is maintained by PcdDxe driver.At entry point of PcdDxe driver, // a new PCD database is allocated in boot-time memory which including all // PEI PCD and DXE PCD entry. -// +// // Pcd driver should run as early as possible before any other driver access // dynamic PCD's value. PEI/DXE "Apriori File" mechanism make it possible by // making PcdPeim/PcdDxe as first dispatching driver in PEI/DXE phase. -// +// // 3.2 Token space Guid/Token number, Platform token, Local token number // Dynamic PCD // +-----------+ +---------+ @@ -128,13 +128,13 @@ // | Token | // | Number | // +-----------+ -// -// +// +// // 3.2.1 Pair of Token space guid + Token number // Any type PCD is identified by pair of "TokenSpaceGuid + TokeNumber". But it // is not easy maintained by PCD driver, and hashed token number will make // searching slowly. -// +// // 3.2.2 Platform Token Number // "Platform token number" concept is introduced for mapping to a pair of // "TokenSpaceGuid + TokenNumber". The platform token number is generated by @@ -148,14 +148,14 @@ // mechanism is not suitable for binary module which use DynamicEx type PCD. // To access a dynamicEx type PCD, pair of "token space guid/token number" all need // to be specificed for PcdSet/PcdGet accessing macro. -// +// // Platform Token Number is started from 1, and inceased continuous. From whole // platform scope, there are two zones: PEI Zone and DXE Zone // | Platform Token Number // ----------|---------------------------------------------------------------- // PEI Zone: | 1 ~ PEI_LOCAL_TOKEN_NUMBER // DXE Zone: | (PEI_LOCAL_TOKEN_NUMBER + 1) ~ (PEI_LOCAL_TOKEN_NUMBER + DXE_LOCAL_TOKEN_NUMBER) -// +// // 3.2.3 Local Token Number // To fast searching a PCD entry in PCD database, PCD driver translate // platform token number to local token number via a mapping table. @@ -163,7 +163,7 @@ // "token space guid + token number" to local token number directly. // Local token number is identifier for all internal interface in PCD PEI/DXE // driver. -// +// // A local token number is a 32-bit value in following meaning: // 32 ------------- 28 ---------- 24 -------- 0 // | PCD type mask | Datum Type | Offset | @@ -183,7 +183,7 @@ // Offset : indicate the related offset of PCD value in PCD database array. // Based on local token number, PCD driver could fast determine PCD type, value // type and get PCD entry from PCD database. -// +// // 3.3 PCD Database binary file // PCD Database binary file will be created at build time as the standalone binary image. // To understand the binary image layout, PCD Database C structure is still generated @@ -203,7 +203,7 @@ // Every PCD has a value record in PCD database. For different // datum type PCD has different record structure which will be // introduced in 3.3.1 -// +// // In a PCD database structure, there are two major area: Init and UnInit. // Init area is use stored above PCD internal structure such as ExMapTable, // LocalTokenNumberTable etc and the (default) value of PCD which has default @@ -211,7 +211,7 @@ // Unint area is used stored the value of PCD which has no default value in // platform DSC file, the value of NULL, 0 specified in platform DSC file can // be seemed as "no default value". -// +// // 3.3.1 Simple Sample PCD Database C Structure // A general sample of PCD database structue is as follows: // typedef struct _PCD_DATABASE { @@ -223,7 +223,7 @@ // SIZE_INFO SizeTable[PEI_SIZE_TABLE_SIZE]; // UINT8 SkuIdTable[PEI_SKUID_TABLE_SIZE]; // SKU_ID SystemSkuId; -// +// // //===== Following is value structure for PCD with default value // .... // .... @@ -235,11 +235,11 @@ // .... // } UnInit; // } -// +// // 3.3.2 PCD value structure in PCD database C structure // The value's structure is generated by build tool in PCD database C structure. // The PCDs in different datum type has different value structure. -// +// // 3.3.2.1 UINT8/UINT16/UINT32/UINT64 datum type PCD // The C structure for these datum type PCD is just a UINT8/UINT16/UINT32/UINT64 // data member in PCD database, For example: @@ -247,30 +247,30 @@ // Above structure is generated by build tool, the member name is "PcdCName_Guidvalue" // Member type is UINT16 according to PcdHardwareErrorRecordLevel declaration // in DEC file. -// +// // 3.3.2.2 VOID* datum type PCD // The value of VOID* datum type PCD is a UINT8/UINT16 array in PCD database. -// +// // 3.3.2.2.1 VOID* - string type // If the default value for VOID* datum type PCD like L"xxx", the PCD is // used for unicode string, and C structure of this datum type PCD is // UINT16 string array in PCD database, for example: // UINT16 StringTable[29]; // The number of 29 in above sample is max size of a unicode string. -// +// // If the default value for VOID* datum type PCD like "xxx", the PCD is // used for ascii string, and C structure of this datum type PCD is // UINT8 string array in PCD database, for example: // UINT8 StringTable[20]; // The number of 20 in above sample is max size of a ascii string. -// +// // 3.3.2.2.2 VOID* - byte array // If the default value of VOID* datum type PCD like {'0x29', '0x01', '0xf2'} // the PCD is used for byte array. The generated structrue is same as // above ascii string table, // UINT8 StringTable[13]; // The number of 13 in above sample is max size of byte array. -// +// // 3.3.3 Some utility structures in PCD Database // 3.3.3.1 GuidTable // GuidTable array is used to store all related GUID value in PCD database: diff --git a/MdeModulePkg/Universal/PCD/Pei/PcdPeimExtra.uni b/MdeModulePkg/Universal/PCD/Pei/PcdPeimExtra.uni index a618943612..9cbf7c33f7 100644 --- a/MdeModulePkg/Universal/PCD/Pei/PcdPeimExtra.uni +++ b/MdeModulePkg/Universal/PCD/Pei/PcdPeimExtra.uni @@ -1,7 +1,7 @@ // /** @file // PcdPeim Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Platform Configuration Database PEI Module" diff --git a/MdeModulePkg/Universal/PCD/Pei/Service.c b/MdeModulePkg/Universal/PCD/Pei/Service.c index e8a0b6ca10..bb4b52baf3 100644 --- a/MdeModulePkg/Universal/PCD/Pei/Service.c +++ b/MdeModulePkg/Universal/PCD/Pei/Service.c @@ -2,7 +2,7 @@ The driver internal functions are implmented here. They build Pei PCD database, and provide access service to PCD database. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -101,7 +101,7 @@ GetPcdName ( CHAR8 *Name; // - // Return NULL when PCD name table is absent. + // Return NULL when PCD name table is absent. // if (Database->PcdNameTableOffset == 0) { return NULL; @@ -140,7 +140,7 @@ GetPcdName ( // AsciiStrCatS (Name, NameSize, TokenSpaceName); Name[AsciiStrSize (TokenSpaceName) - sizeof (CHAR8)] = '.'; - AsciiStrCatS (Name, NameSize, PcdName); + AsciiStrCatS (Name, NameSize, PcdName); } return Name; @@ -156,7 +156,7 @@ GetPcdName ( @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. @param[in] TokenNumber The PCD token number. @param[out] PcdInfo The returned information associated with the requested TokenNumber. - The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName. + The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName. @retval EFI_SUCCESS The PCD information was returned successfully @retval EFI_NOT_FOUND The PCD service could not find the requested token number. @@ -202,7 +202,7 @@ ExGetPcdInfo ( PcdInfo->PcdSize = 0; // // Here use one representative in the token space to get the TokenSpaceCName. - // + // PcdInfo->PcdName = GetPcdName (TRUE, Database, ExMapTable[Index].TokenNumber); return EFI_SUCCESS; } else if (ExMapTable[Index].ExTokenNumber == TokenNumber) { @@ -345,7 +345,7 @@ PeiRegisterCallBackWorker ( // TokenNumber--; // EBC compiler is very choosy. It may report warning about comparison - // between UINTN and 0 . So we add 1 in each size of the + // between UINTN and 0 . So we add 1 in each size of the // comparison. ASSERT ((TokenNumber + 1) < (LocalTokenCount + 1)); } @@ -362,7 +362,7 @@ PeiRegisterCallBackWorker ( GuidHob = GetFirstGuidHob (&gEfiCallerIdGuid); ASSERT (GuidHob != NULL); - + CallbackTable = GET_GUID_HOB_DATA (GuidHob); CallbackTable = CallbackTable + (TokenNumber * PcdGet32 (PcdMaxPeiPcdCallBackNumberPerPcdEntry)); @@ -383,7 +383,7 @@ PeiRegisterCallBackWorker ( /** - Find the Pcd database. + Find the Pcd database. @param FileHandle Handle of the file the external PCD database binary located. @@ -452,7 +452,7 @@ BuildPcdDatabase ( SizeOfCallbackFnTable = Database->LocalTokenCount * sizeof (PCD_PPI_CALLBACK) * PcdGet32 (PcdMaxPeiPcdCallBackNumberPerPcdEntry); CallbackFnTable = BuildGuidHob (&gEfiCallerIdGuid, SizeOfCallbackFnTable); - + ZeroMem (CallbackFnTable, SizeOfCallbackFnTable); return Database; @@ -520,7 +520,7 @@ GetHiiVariable ( } /** - Invoke the callback function when dynamic PCD entry was set, if this PCD entry + Invoke the callback function when dynamic PCD entry was set, if this PCD entry has registered callback function. @param ExTokenNumber DynamicEx PCD's token number, if this PCD entry is dyanmicEx @@ -559,14 +559,14 @@ InvokeCallbackOnSet ( if (Guid == NULL) { // EBC compiler is very choosy. It may report warning about comparison - // between UINTN and 0 . So we add 1 in each size of the + // between UINTN and 0 . So we add 1 in each size of the // comparison. ASSERT (TokenNumber + 1 < (LocalTokenCount + 1)); } GuidHob = GetFirstGuidHob (&gEfiCallerIdGuid); ASSERT (GuidHob != NULL); - + CallbackTable = GET_GUID_HOB_DATA (GuidHob); CallbackTable += (TokenNumber * PcdGet32 (PcdMaxPeiPcdCallBackNumberPerPcdEntry)); @@ -616,7 +616,7 @@ SetValueWorker ( @retval EFI_INVALID_PARAMETER If Size of non-Ptr type PCD does not match the size information in PCD database. @retval EFI_NOT_FOUND If value type of PCD entry is intergrate, but not in range of UINT8, UINT16, UINT32, UINT64 - @retval EFI_NOT_FOUND Can not find the PCD type according to token number. + @retval EFI_NOT_FOUND Can not find the PCD type according to token number. **/ EFI_STATUS SetWorker ( @@ -638,7 +638,7 @@ SetWorker ( if (!FeaturePcdGet(PcdPeiFullPcdDatabaseEnable)) { return EFI_UNSUPPORTED; } - + // // TokenNumber Zero is reserved as PCD_INVALID_TOKEN_NUMBER. // We have to decrement TokenNumber by 1 to make it usable @@ -649,7 +649,7 @@ SetWorker ( LocalTokenCount = PeiPcdDb->LocalTokenCount; // EBC compiler is very choosy. It may report warning about comparison - // between UINTN and 0 . So we add 1 in each size of the + // between UINTN and 0 . So we add 1 in each size of the // comparison. ASSERT (TokenNumber + 1 < (LocalTokenCount + 1)); @@ -682,7 +682,7 @@ SetWorker ( Offset = LocalTokenNumber & PCD_DATABASE_OFFSET_MASK; InternalData = (VOID *) ((UINT8 *) PeiPcdDb + Offset); - + switch (LocalTokenNumber & PCD_TYPE_ALL_SET) { case PCD_TYPE_VPD: case PCD_TYPE_HII: @@ -734,7 +734,7 @@ SetWorker ( return EFI_NOT_FOUND; } } - + } ASSERT (FALSE); @@ -766,12 +766,12 @@ ExSetValueWorker ( /** Set value for a dynamic-ex PCD entry. - - This routine find the local token number according to dynamic-ex PCD's token + + This routine find the local token number according to dynamic-ex PCD's token space guid and token number firstly, and invoke callback function if this PCD entry registered callback function. Finally, invoken general SetWorker to set PCD value. - + @param ExTokenNumber Dynamic-ex PCD token number. @param Guid Token space guid for dynamic-ex PCD. @param Data PCD value want to be set @@ -801,7 +801,7 @@ ExSetWorker ( if (TokenNumber == PCD_INVALID_TOKEN_NUMBER) { return EFI_NOT_FOUND; } - + InvokeCallbackOnSet (ExTokenNumber, Guid, TokenNumber, Data, *Size); return SetWorker (TokenNumber, Data, Size, PtrType); @@ -824,16 +824,16 @@ ExGetWorker ( IN UINTN ExTokenNumber, IN UINTN GetSize ) -{ +{ return GetWorker (GetExPcdTokenNumber (Guid, ExTokenNumber), GetSize); } /** Get the PCD entry pointer in PCD database. - + This routine will visit PCD database to find the PCD entry according to given - token number. The given token number is autogened by build tools and it will be - translated to local token number. Local token number contains PCD's type and + token number. The given token number is autogened by build tools and it will be + translated to local token number. Local token number contains PCD's type and offset of PCD entry in PCD database. @param TokenNumber Token's number, it is autogened by build tools @@ -873,7 +873,7 @@ GetWorker ( LocalTokenCount = PeiPcdDb->LocalTokenCount; // EBC compiler is very choosy. It may report warning about comparison - // between UINTN and 0 . So we add 1 in each size of the + // between UINTN and 0 . So we add 1 in each size of the // comparison. ASSERT (TokenNumber + 1 < (LocalTokenCount + 1)); @@ -891,21 +891,21 @@ GetWorker ( VpdHead = (VPD_HEAD *) ((UINT8 *)PeiPcdDb + Offset); return (VOID *) ((UINTN) PcdGet32 (PcdVpdBaseAddress) + VpdHead->Offset); } - + case PCD_TYPE_HII|PCD_TYPE_STRING: case PCD_TYPE_HII: { VariableHead = (VARIABLE_HEAD *) ((UINT8 *)PeiPcdDb + Offset); - + Guid = (EFI_GUID *) ((UINT8 *)PeiPcdDb + PeiPcdDb->GuidTableOffset) + VariableHead->GuidTableIndex; Name = (UINT16*)&StringTable[VariableHead->StringIndex]; if ((LocalTokenNumber & PCD_TYPE_ALL_SET) == (PCD_TYPE_HII|PCD_TYPE_STRING)) { // - // If a HII type PCD's datum type is VOID*, the DefaultValueOffset is the index of + // If a HII type PCD's datum type is VOID*, the DefaultValueOffset is the index of // string array in string table. // - VaraiableDefaultBuffer = (UINT8 *) &StringTable[*(STRING_HEAD*)((UINT8*) PeiPcdDb + VariableHead->DefaultValueOffset)]; + VaraiableDefaultBuffer = (UINT8 *) &StringTable[*(STRING_HEAD*)((UINT8*) PeiPcdDb + VariableHead->DefaultValueOffset)]; } else { VaraiableDefaultBuffer = (UINT8 *) PeiPcdDb + VariableHead->DefaultValueOffset; } @@ -943,13 +943,13 @@ GetWorker ( default: ASSERT (FALSE); break; - + } ASSERT (FALSE); - + return NULL; - + } /** @@ -958,14 +958,14 @@ GetWorker ( A dynamic-ex type PCD, developer must provide pair of token space guid: token number in DEC file. PCD database maintain a mapping table that translate pair of {token space guid: token number} to Token Number. - + @param Guid Token space guid for dynamic-ex PCD entry. @param ExTokenNumber Dynamic-ex PCD token number. @return Token Number for dynamic-ex PCD. **/ -UINTN +UINTN GetExPcdTokenNumber ( IN CONST EFI_GUID *Guid, IN UINTN ExTokenNumber @@ -989,16 +989,16 @@ GetExPcdTokenNumber ( // error in the BUILD system. // ASSERT (MatchGuid != NULL); - + MatchGuidIdx = MatchGuid - GuidTable; - + for (Index = 0; Index < PeiPcdDb->ExTokenCount; Index++) { - if ((ExTokenNumber == ExMap[Index].ExTokenNumber) && + if ((ExTokenNumber == ExMap[Index].ExTokenNumber) && (MatchGuidIdx == ExMap[Index].ExGuidIndex)) { return ExMap[Index].TokenNumber; } } - + return PCD_INVALID_TOKEN_NUMBER; } @@ -1017,7 +1017,7 @@ GetPcdDatabase ( GuidHob = GetFirstGuidHob (&gPcdDataBaseHobGuid); ASSERT (GuidHob != NULL); - + return (PEI_PCD_DATABASE *) GET_GUID_HOB_DATA (GuidHob); } @@ -1047,7 +1047,7 @@ GetSizeTableIndex ( if ((LocalTokenNumber & PCD_DATUM_TYPE_ALL_SET) == PCD_DATUM_TYPE_POINTER) { // - // SizeTable only contain record for PCD_DATUM_TYPE_POINTER type + // SizeTable only contain record for PCD_DATUM_TYPE_POINTER type // PCD entry. // if ((LocalTokenNumber & PCD_TYPE_VPD) != 0) { diff --git a/MdeModulePkg/Universal/PCD/Pei/Service.h b/MdeModulePkg/Universal/PCD/Pei/Service.h index 3a7910a900..a8299ccb7d 100644 --- a/MdeModulePkg/Universal/PCD/Pei/Service.h +++ b/MdeModulePkg/Universal/PCD/Pei/Service.h @@ -1,7 +1,7 @@ /** @file The internal header file declares the private functions used by PeiPcd driver. -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -108,21 +108,21 @@ PeiGetPcdInfoGetSku ( /** Sets the SKU value for subsequent calls to set or get PCD token values. - SetSku() sets the SKU Id to be used for subsequent calls to set or get PCD values. + SetSku() sets the SKU Id to be used for subsequent calls to set or get PCD values. SetSku() is normally called only once by the system. - For each item (token), the database can hold a single value that applies to all SKUs, - or multiple values, where each value is associated with a specific SKU Id. Items with multiple, - SKU-specific values are called SKU enabled. - - The SKU Id of zero is reserved as a default. The valid SkuId range is 1 to 255. - For tokens that are not SKU enabled, the system ignores any set SKU Id and works with the - single value for that token. For SKU-enabled tokens, the system will use the SKU Id set by the - last call to SetSku(). If no SKU Id is set or the currently set SKU Id isn't valid for the specified token, - the system uses the default SKU Id. If the system attempts to use the default SKU Id and no value has been + For each item (token), the database can hold a single value that applies to all SKUs, + or multiple values, where each value is associated with a specific SKU Id. Items with multiple, + SKU-specific values are called SKU enabled. + + The SKU Id of zero is reserved as a default. The valid SkuId range is 1 to 255. + For tokens that are not SKU enabled, the system ignores any set SKU Id and works with the + single value for that token. For SKU-enabled tokens, the system will use the SKU Id set by the + last call to SetSku(). If no SKU Id is set or the currently set SKU Id isn't valid for the specified token, + the system uses the default SKU Id. If the system attempts to use the default SKU Id and no value has been set for that Id, the results are unpredictable. - @param[in] SkuId The SKU value that will be used when the PCD service will retrieve and + @param[in] SkuId The SKU value that will be used when the PCD service will retrieve and set values associated with a PCD token. **/ @@ -135,13 +135,13 @@ PeiPcdSetSku ( /** Retrieves an 8-bit value for a given PCD token. - Retrieves the current byte-sized value for a PCD token number. + Retrieves the current byte-sized value for a PCD token number. If the TokenNumber is invalid, the results are unpredictable. - - @param[in] TokenNumber The PCD token number. + + @param[in] TokenNumber The PCD token number. @return The UINT8 value. - + **/ UINT8 EFIAPI @@ -152,13 +152,13 @@ PeiPcdGet8 ( /** Retrieves an 16-bit value for a given PCD token. - Retrieves the current 16-bits value for a PCD token number. + Retrieves the current 16-bits value for a PCD token number. If the TokenNumber is invalid, the results are unpredictable. - - @param[in] TokenNumber The PCD token number. + + @param[in] TokenNumber The PCD token number. @return The UINT16 value. - + **/ UINT16 EFIAPI @@ -169,13 +169,13 @@ PeiPcdGet16 ( /** Retrieves an 32-bit value for a given PCD token. - Retrieves the current 32-bits value for a PCD token number. + Retrieves the current 32-bits value for a PCD token number. If the TokenNumber is invalid, the results are unpredictable. - - @param[in] TokenNumber The PCD token number. + + @param[in] TokenNumber The PCD token number. @return The UINT32 value. - + **/ UINT32 EFIAPI @@ -186,13 +186,13 @@ PeiPcdGet32 ( /** Retrieves an 64-bit value for a given PCD token. - Retrieves the current 64-bits value for a PCD token number. + Retrieves the current 64-bits value for a PCD token number. If the TokenNumber is invalid, the results are unpredictable. - - @param[in] TokenNumber The PCD token number. + + @param[in] TokenNumber The PCD token number. @return The UINT64 value. - + **/ UINT64 EFIAPI @@ -203,15 +203,15 @@ PeiPcdGet64 ( /** Retrieves a pointer to a value for a given PCD token. - Retrieves the current pointer to the buffer for a PCD token number. - Do not make any assumptions about the alignment of the pointer that - is returned by this function call. If the TokenNumber is invalid, + Retrieves the current pointer to the buffer for a PCD token number. + Do not make any assumptions about the alignment of the pointer that + is returned by this function call. If the TokenNumber is invalid, the results are unpredictable. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @return The pointer to the buffer to be retrived. - + **/ VOID * EFIAPI @@ -222,15 +222,15 @@ PeiPcdGetPtr ( /** Retrieves a Boolean value for a given PCD token. - Retrieves the current boolean value for a PCD token number. - Do not make any assumptions about the alignment of the pointer that - is returned by this function call. If the TokenNumber is invalid, + Retrieves the current boolean value for a PCD token number. + Do not make any assumptions about the alignment of the pointer that + is returned by this function call. If the TokenNumber is invalid, the results are unpredictable. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @return The Boolean value. - + **/ BOOLEAN EFIAPI @@ -241,13 +241,13 @@ PeiPcdGetBool ( /** Retrieves the size of the value for a given PCD token. - Retrieves the current size of a particular PCD token. + Retrieves the current size of a particular PCD token. If the TokenNumber is invalid, the results are unpredictable. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @return The size of the value for the PCD token. - + **/ UINTN EFIAPI @@ -258,16 +258,16 @@ PeiPcdGetSize ( /** Retrieves an 8-bit value for a given PCD token. - Retrieves the 8-bit value of a particular PCD token. + Retrieves the 8-bit value of a particular PCD token. If the TokenNumber is invalid or the token space - specified by Guid does not exist, the results are + specified by Guid does not exist, the results are unpredictable. @param[in] Guid The token space for the token number. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @return The size 8-bit value for the PCD token. - + **/ UINT8 EFIAPI @@ -279,16 +279,16 @@ PeiPcdGet8Ex ( /** Retrieves an 16-bit value for a given PCD token. - Retrieves the 16-bit value of a particular PCD token. + Retrieves the 16-bit value of a particular PCD token. If the TokenNumber is invalid or the token space - specified by Guid does not exist, the results are + specified by Guid does not exist, the results are unpredictable. @param[in] Guid The token space for the token number. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @return The size 16-bit value for the PCD token. - + **/ UINT16 EFIAPI @@ -300,16 +300,16 @@ PeiPcdGet16Ex ( /** Retrieves an 32-bit value for a given PCD token. - Retrieves the 32-bit value of a particular PCD token. + Retrieves the 32-bit value of a particular PCD token. If the TokenNumber is invalid or the token space - specified by Guid does not exist, the results are + specified by Guid does not exist, the results are unpredictable. @param[in] Guid The token space for the token number. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @return The size 32-bit value for the PCD token. - + **/ UINT32 EFIAPI @@ -321,16 +321,16 @@ PeiPcdGet32Ex ( /** Retrieves an 64-bit value for a given PCD token. - Retrieves the 64-bit value of a particular PCD token. + Retrieves the 64-bit value of a particular PCD token. If the TokenNumber is invalid or the token space - specified by Guid does not exist, the results are + specified by Guid does not exist, the results are unpredictable. @param[in] Guid The token space for the token number. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @return The size 64-bit value for the PCD token. - + **/ UINT64 EFIAPI @@ -342,16 +342,16 @@ PeiPcdGet64Ex ( /** Retrieves a pointer to a value for a given PCD token. - Retrieves the current pointer to the buffer for a PCD token number. - Do not make any assumptions about the alignment of the pointer that - is returned by this function call. If the TokenNumber is invalid, + Retrieves the current pointer to the buffer for a PCD token number. + Do not make any assumptions about the alignment of the pointer that + is returned by this function call. If the TokenNumber is invalid, the results are unpredictable. @param[in] Guid The token space for the token number. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @return The pointer to the buffer to be retrived. - + **/ VOID * EFIAPI @@ -363,16 +363,16 @@ PeiPcdGetPtrEx ( /** Retrieves an Boolean value for a given PCD token. - Retrieves the Boolean value of a particular PCD token. + Retrieves the Boolean value of a particular PCD token. If the TokenNumber is invalid or the token space - specified by Guid does not exist, the results are + specified by Guid does not exist, the results are unpredictable. @param[in] Guid The token space for the token number. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @return The size Boolean value for the PCD token. - + **/ BOOLEAN EFIAPI @@ -384,14 +384,14 @@ PeiPcdGetBoolEx ( /** Retrieves the size of the value for a given PCD token. - Retrieves the current size of a particular PCD token. + Retrieves the current size of a particular PCD token. If the TokenNumber is invalid, the results are unpredictable. @param[in] Guid The token space for the token number. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @return The size of the value for the PCD token. - + **/ UINTN EFIAPI @@ -403,19 +403,19 @@ PeiPcdGetSizeEx ( /** Sets an 8-bit value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -427,19 +427,19 @@ PeiPcdSet8 ( /** Sets an 16-bit value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -451,19 +451,19 @@ PeiPcdSet16 ( /** Sets an 32-bit value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -475,19 +475,19 @@ PeiPcdSet32 ( /** Sets an 64-bit value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -499,23 +499,23 @@ PeiPcdSet64 ( /** Sets a value of a specified size for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. - @param[in] TokenNumber The PCD token number. - @param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token. - On input, if the SizeOfValue is greater than the maximum size supported - for this TokenNumber then the output value of SizeOfValue will reflect + @param[in] TokenNumber The PCD token number. + @param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token. + On input, if the SizeOfValue is greater than the maximum size supported + for this TokenNumber then the output value of SizeOfValue will reflect the maximum size supported for this TokenNumber. @param[in] Buffer The buffer to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -528,19 +528,19 @@ PeiPcdSetPtr ( /** Sets an Boolean value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -552,20 +552,20 @@ PeiPcdSetBool ( /** Sets an 8-bit value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -578,20 +578,20 @@ PeiPcdSet8Ex ( /** Sets an 16-bit value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -604,20 +604,20 @@ PeiPcdSet16Ex ( /** Sets an 32-bit value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -630,20 +630,20 @@ PeiPcdSet32Ex ( /** Sets an 64-bit value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -656,24 +656,24 @@ PeiPcdSet64Ex ( /** Sets a value of a specified size for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. - @param[in] TokenNumber The PCD token number. - @param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token. - On input, if the SizeOfValue is greater than the maximum size supported - for this TokenNumber then the output value of SizeOfValue will reflect + @param[in] TokenNumber The PCD token number. + @param[in, out] SizeOfBuffer A pointer to the length of the value being set for the PCD token. + On input, if the SizeOfValue is greater than the maximum size supported + for this TokenNumber then the output value of SizeOfValue will reflect the maximum size supported for this TokenNumber. @param[in] Buffer The buffer to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -687,20 +687,20 @@ PeiPcdSetPtrEx ( /** Sets an Boolean value for a given PCD token. - When the PCD service sets a value, it will check to ensure that the - size of the value being set is compatible with the Token's existing definition. + When the PCD service sets a value, it will check to ensure that the + size of the value being set is compatible with the Token's existing definition. If it is not, an error will be returned. @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. - @param[in] TokenNumber The PCD token number. + @param[in] TokenNumber The PCD token number. @param[in] Value The value to set for the PCD token. @retval EFI_SUCCESS Procedure returned successfully. - @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data - being set was incompatible with a call to this function. + @retval EFI_INVALID_PARAMETER The PCD service determined that the size of the data + being set was incompatible with a call to this function. Use GetSize() to retrieve the size of the target data. @retval EFI_NOT_FOUND The PCD service could not find the requested token number. - + **/ EFI_STATUS EFIAPI @@ -714,10 +714,10 @@ PeiPcdSetBoolEx ( Specifies a function to be called anytime the value of a designated token is changed. @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. - @param[in] TokenNumber The PCD token number. - @param[in] CallBackFunction The function prototype called when the value associated with the CallBackToken is set. + @param[in] TokenNumber The PCD token number. + @param[in] CallBackFunction The function prototype called when the value associated with the CallBackToken is set. - @retval EFI_SUCCESS The PCD service has successfully established a call event + @retval EFI_SUCCESS The PCD service has successfully established a call event for the CallBackToken requested. @retval EFI_NOT_FOUND The PCD service could not find the referenced token number. @@ -734,10 +734,10 @@ PeiRegisterCallBackOnSet ( Cancels a previously set callback function for a particular PCD token number. @param [in] Guid The 128-bit unique value that designates the namespace from which to extract the value. - @param [in] TokenNumber The PCD token number. - @param [in] CallBackFunction The function prototype called when the value associated with the CallBackToken is set. + @param [in] TokenNumber The PCD token number. + @param [in] CallBackFunction The function prototype called when the value associated with the CallBackToken is set. - @retval EFI_SUCCESS The PCD service has successfully established a call event + @retval EFI_SUCCESS The PCD service has successfully established a call event for the CallBackToken requested. @retval EFI_NOT_FOUND The PCD service could not find the referenced token number. @@ -751,28 +751,28 @@ PcdUnRegisterCallBackOnSet ( ); /** - Retrieves the next valid token number in a given namespace. - - This is useful since the PCD infrastructure contains a sparse list of token numbers, - and one cannot a priori know what token numbers are valid in the database. - - If TokenNumber is 0 and Guid is not NULL, then the first token from the token space specified by Guid is returned. - If TokenNumber is not 0 and Guid is not NULL, then the next token in the token space specified by Guid is returned. - If TokenNumber is 0 and Guid is NULL, then the first token in the default token space is returned. - If TokenNumber is not 0 and Guid is NULL, then the next token in the default token space is returned. - The token numbers in the default token space may not be related to token numbers in token spaces that are named by Guid. - If the next token number can be retrieved, then it is returned in TokenNumber, and EFI_SUCCESS is returned. - If TokenNumber represents the last token number in the token space specified by Guid, then EFI_NOT_FOUND is returned. + Retrieves the next valid token number in a given namespace. + + This is useful since the PCD infrastructure contains a sparse list of token numbers, + and one cannot a priori know what token numbers are valid in the database. + + If TokenNumber is 0 and Guid is not NULL, then the first token from the token space specified by Guid is returned. + If TokenNumber is not 0 and Guid is not NULL, then the next token in the token space specified by Guid is returned. + If TokenNumber is 0 and Guid is NULL, then the first token in the default token space is returned. + If TokenNumber is not 0 and Guid is NULL, then the next token in the default token space is returned. + The token numbers in the default token space may not be related to token numbers in token spaces that are named by Guid. + If the next token number can be retrieved, then it is returned in TokenNumber, and EFI_SUCCESS is returned. + If TokenNumber represents the last token number in the token space specified by Guid, then EFI_NOT_FOUND is returned. If TokenNumber is not present in the token space specified by Guid, then EFI_NOT_FOUND is returned. - @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. - This is an optional parameter that may be NULL. If this parameter is NULL, then a request + @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. + This is an optional parameter that may be NULL. If this parameter is NULL, then a request is being made to retrieve tokens from the default token space. @param[in, out] TokenNumber A pointer to the PCD token number to use to find the subsequent token number. - - @retval EFI_SUCCESS The PCD service has retrieved the next valid token number. - Or the input token number is already the last valid token number in the PCD database. + + @retval EFI_SUCCESS The PCD service has retrieved the next valid token number. + Or the input token number is already the last valid token number in the PCD database. In the later case, *TokenNumber is updated with the value of 0. @retval EFI_NOT_FOUND If this input token number and token namespace does not exist on the platform. @@ -787,20 +787,20 @@ PeiPcdGetNextToken ( /** Retrieves the next valid PCD token namespace for a given namespace. - @param[in, out] Guid An indirect pointer to EFI_GUID. On input it designates - a known token namespace from which the search will start. On output, - it designates the next valid token namespace on the platform. If the input - token namespace does not exist on the platform, an error is returned and - the value of *Guid is undefined. If *Guid is NULL, then the GUID of the - first token space of the current platform is assigned to *Guid the function - return EFI_SUCCESS. If *Guid is NULL and there is no namespace exist in - the platform other than the default (NULL) tokennamespace, *Guid is unchanged - and the function return EFI_SUCCESS. If this input token namespace is the last - namespace on the platform, *Guid will be assigned to NULL and the function return - EFI_SUCCESS. - - @retval EFI_SUCCESS The PCD service retrieved the next valid token space Guid. - Or the input token space Guid is already the last valid token space Guid + @param[in, out] Guid An indirect pointer to EFI_GUID. On input it designates + a known token namespace from which the search will start. On output, + it designates the next valid token namespace on the platform. If the input + token namespace does not exist on the platform, an error is returned and + the value of *Guid is undefined. If *Guid is NULL, then the GUID of the + first token space of the current platform is assigned to *Guid the function + return EFI_SUCCESS. If *Guid is NULL and there is no namespace exist in + the platform other than the default (NULL) tokennamespace, *Guid is unchanged + and the function return EFI_SUCCESS. If this input token namespace is the last + namespace on the platform, *Guid will be assigned to NULL and the function return + EFI_SUCCESS. + + @retval EFI_SUCCESS The PCD service retrieved the next valid token space Guid. + Or the input token space Guid is already the last valid token space Guid in the PCD database. In the later case, *Guid is updated with the value of NULL. @retval EFI_NOT_FOUND If the input token namespace does not exist on the platform. @@ -820,7 +820,7 @@ PeiPcdGetNextTokenSpace ( @param[in] Guid The 128-bit unique value that designates the namespace from which to extract the value. @param[in] TokenNumber The PCD token number. @param[out] PcdInfo The returned information associated with the requested TokenNumber. - The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName. + The caller is responsible for freeing the buffer that is allocated by callee for PcdInfo->PcdName. @retval EFI_SUCCESS The PCD information was returned successfully @retval EFI_NOT_FOUND The PCD service could not find the requested token number. @@ -875,7 +875,7 @@ SetValueWorker ( @retval EFI_INVALID_PARAMETER If Size of non-Ptr type PCD does not match the size information in PCD database. @retval EFI_NOT_FOUND If value type of PCD entry is intergrate, but not in range of UINT8, UINT16, UINT32, UINT64 - @retval EFI_NOT_FOUND Can not find the PCD type according to token number. + @retval EFI_NOT_FOUND Can not find the PCD type according to token number. **/ EFI_STATUS SetWorker ( @@ -906,12 +906,12 @@ ExSetValueWorker ( /** Set value for a dynamic PCD entry. - - This routine find the local token number according to dynamic-ex PCD's token + + This routine find the local token number according to dynamic-ex PCD's token space guid and token number firstly, and invoke callback function if this PCD entry registered callback function. Finally, invoken general SetWorker to set PCD value. - + @param ExTokenNumber Dynamic-ex PCD token number. @param Guid Token space guid for dynamic-ex PCD. @param Data PCD value want to be set @@ -933,10 +933,10 @@ ExSetWorker ( /** Get the PCD entry pointer in PCD database. - + This routine will visit PCD database to find the PCD entry according to given - token number. The given token number is autogened by build tools and it will be - translated to local token number. Local token number contains PCD's type and + token number. The given token number is autogened by build tools and it will be + translated to local token number. Local token number contains PCD's type and offset of PCD entry in PCD database. @param TokenNumber Token's number, it is autogened by build tools @@ -980,7 +980,7 @@ typedef struct { A dynamic-ex type PCD, developer must provide pair of token space guid: token number in DEC file. PCD database maintain a mapping table that translate pair of {token space guid: token number} to Token Number. - + @param Guid Token space guid for dynamic-ex PCD entry. @param ExTokenNumber Token number for dynamic-ex PCD. @@ -1045,7 +1045,7 @@ GetSizeTableIndex ( /** Get PCD value's size for POINTER type PCD. - + The POINTER type PCD's value will be stored into a buffer in specificed size. The max size of this PCD's value is described in PCD's definition in DEC file. @@ -1065,7 +1065,7 @@ GetPtrTypeSize ( /** Set PCD value's size for POINTER type PCD. - + The POINTER type PCD's value will be stored into a buffer in specificed size. The max size of this PCD's value is described in PCD's definition in DEC file. diff --git a/MdeModulePkg/Universal/PcatSingleSegmentPciCfg2Pei/PcatSingleSegmentPciCfg2PeiExtra.uni b/MdeModulePkg/Universal/PcatSingleSegmentPciCfg2Pei/PcatSingleSegmentPciCfg2PeiExtra.uni index d19af92778..855ec0e877 100644 --- a/MdeModulePkg/Universal/PcatSingleSegmentPciCfg2Pei/PcatSingleSegmentPciCfg2PeiExtra.uni +++ b/MdeModulePkg/Universal/PcatSingleSegmentPciCfg2Pei/PcatSingleSegmentPciCfg2PeiExtra.uni @@ -1,7 +1,7 @@ // /** @file // PcatSingleSegmentPciCfg2Pei Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Single Segment PCI Configuration PEI Module" diff --git a/MdeModulePkg/Universal/PcatSingleSegmentPciCfg2Pei/PciCfg2.c b/MdeModulePkg/Universal/PcatSingleSegmentPciCfg2Pei/PciCfg2.c index ed53e12699..4b9efe298b 100644 --- a/MdeModulePkg/Universal/PcatSingleSegmentPciCfg2Pei/PciCfg2.c +++ b/MdeModulePkg/Universal/PcatSingleSegmentPciCfg2Pei/PciCfg2.c @@ -1,9 +1,9 @@ /** @file - This driver installs Single Segment Pci Configuration 2 PPI - to provide read, write and modify access to Pci configuration space in PEI phase. + This driver installs Single Segment Pci Configuration 2 PPI + to provide read, write and modify access to Pci configuration space in PEI phase. To follow PI specification, these services also support access to the unaligned Pci address. - Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -56,7 +56,7 @@ PciCfgAddressConvert ( @retval EFI_SUCCESS The function completed successfully. @retval EFI_INVALID_PARAMETER The invalid access width. - + **/ EFI_STATUS EFIAPI @@ -157,7 +157,7 @@ PciCfg2Write ( // Unaligned Pci address access, break up the request into byte by byte. // PciWrite8 (PciLibAddress, *((UINT8 *) Buffer)); - PciWrite8 (PciLibAddress + 1, *((UINT8 *) Buffer + 1)); + PciWrite8 (PciLibAddress + 1, *((UINT8 *) Buffer + 1)); } } else if (Width == EfiPeiPciCfgWidthUint32) { if ((PciLibAddress & 0x03) == 0) { @@ -176,9 +176,9 @@ PciCfg2Write ( // Unaligned Pci address access, break up the request into byte by byte. // PciWrite8 (PciLibAddress, *((UINT8 *) Buffer)); - PciWrite8 (PciLibAddress + 1, *((UINT8 *) Buffer + 1)); - PciWrite8 (PciLibAddress + 2, *((UINT8 *) Buffer + 2)); - PciWrite8 (PciLibAddress + 3, *((UINT8 *) Buffer + 3)); + PciWrite8 (PciLibAddress + 1, *((UINT8 *) Buffer + 1)); + PciWrite8 (PciLibAddress + 2, *((UINT8 *) Buffer + 2)); + PciWrite8 (PciLibAddress + 3, *((UINT8 *) Buffer + 3)); } } else { return EFI_INVALID_PARAMETER; @@ -292,9 +292,9 @@ EFI_PEI_PPI_DESCRIPTOR gPciCfg2PpiList = { }; /** - Module's entry function. + Module's entry function. This routine will install EFI_PEI_PCI_CFG2_PPI. - + @param FileHandle Handle of the file being invoked. @param PeiServices Describes the list of possible PEI Services. diff --git a/MdeModulePkg/Universal/PlatformDriOverrideDxe/InternalPlatDriOverrideDxe.h b/MdeModulePkg/Universal/PlatformDriOverrideDxe/InternalPlatDriOverrideDxe.h index 75af763522..a9354c6cf4 100644 --- a/MdeModulePkg/Universal/PlatformDriOverrideDxe/InternalPlatDriOverrideDxe.h +++ b/MdeModulePkg/Universal/PlatformDriOverrideDxe/InternalPlatDriOverrideDxe.h @@ -2,7 +2,7 @@ Ihe internal heder file includes the required Protocol/Guid/Library and the shared function APIs. -Copyright (c) 2007 - 2013, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -146,8 +146,8 @@ GetDriverFromMapping ( @retval EFI_INVALID_PARAMETER ControllerDevicePath or MappingDataBase is NULL. @retval EFI_NOT_FOUND ControllerDevicePath is not found in MappingDataBase or - DriverImageDevicePath is not found in the found DriverImage Info list. - @retval EFI_SUCCESS The controller's total override driver number and + DriverImageDevicePath is not found in the found DriverImage Info list. + @retval EFI_SUCCESS The controller's total override driver number and input DriverImage's order number is correctly return. **/ EFI_STATUS @@ -169,14 +169,14 @@ CheckMapping ( override driver image item @param DriverImageDevicePath The driver image device path need to be insert @param MappingDataBase Mapping database list entry pointer - @param DriverImageNO The inserted order number. If this number is taken, + @param DriverImageNO The inserted order number. If this number is taken, the larger available number will be used. @retval EFI_INVALID_PARAMETER ControllerDevicePath is NULL, or DriverImageDevicePath is NULL or MappingDataBase is NULL - @retval EFI_ALREADY_STARTED The input Controller to input DriverImage has been + @retval EFI_ALREADY_STARTED The input Controller to input DriverImage has been recorded into the mapping database. - @retval EFI_SUCCESS The Controller and DriverImage are inserted into + @retval EFI_SUCCESS The Controller and DriverImage are inserted into the mapping database successfully. **/ @@ -193,7 +193,7 @@ InsertDriverImage ( /** Delete a controller's override driver from the mapping database. - @param ControllerDevicePath The controller device path will be deleted + @param ControllerDevicePath The controller device path will be deleted when all drivers images on it are removed. @param DriverImageDevicePath The driver image device path will be delete. If NULL, all driver image will be delete. @@ -201,7 +201,7 @@ InsertDriverImage ( @retval EFI_INVALID_PARAMETER ControllerDevicePath is NULL, or MappingDataBase is NULL @retval EFI_NOT_FOUND ControllerDevicePath is not found in MappingDataBase or - DriverImageDevicePath is not found in the found DriverImage Info list. + DriverImageDevicePath is not found in the found DriverImage Info list. @retval EFI_SUCCESS Delete the specified driver successfully. **/ diff --git a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c index 76c240b73d..b2ddf1020b 100644 --- a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c +++ b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.c @@ -1,6 +1,6 @@ /** @file This file also installs UEFI PLATFORM_DRIVER_OVERRIDE_PROTOCOL. - + The main code offers a UI interface in device manager to let user configure platform override protocol to override the default algorithm for matching drivers to controllers. @@ -13,7 +13,7 @@ 4. It save all the mapping info in NV variables which will be consumed by platform override protocol driver to publish the platform override protocol. -Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -96,7 +96,7 @@ HII_VENDOR_DEVICE_PATH mHiiVendorDevicePath = { { END_DEVICE_PATH_TYPE, END_ENTIRE_DEVICE_PATH_SUBTYPE, - { + { (UINT8) (END_DEVICE_PATH_LENGTH), (UINT8) ((END_DEVICE_PATH_LENGTH) >> 8) } @@ -107,7 +107,7 @@ HII_VENDOR_DEVICE_PATH mHiiVendorDevicePath = { Converting a given device to an unicode string. @param DevPath Given device path instance - + @return Converted string from given device path. @retval L"?" Converting failed. **/ @@ -131,7 +131,7 @@ DevicePathToStr ( } /** - Worker function to get the driver name by ComponentName or ComponentName2 protocol + Worker function to get the driver name by ComponentName or ComponentName2 protocol according to the driver binding handle. @param DriverBindingHandle The Handle of DriverBinding. @@ -197,7 +197,7 @@ GetComponentNameWorker ( /** - Get the driver name by ComponentName or ComponentName2 protocol + Get the driver name by ComponentName or ComponentName2 protocol according to the driver binding handle @param DriverBindingHandle The Handle of DriverBinding. @@ -219,7 +219,7 @@ GetComponentName ( DriverName = GetComponentNameWorker (DriverBindingHandle, &gEfiComponentName2ProtocolGuid, L"PlatformLang"); if (DriverName == NULL) { // - // If we can not get driver name from Component Name 2 protocol, we can try ISO 639-2 Component Name protocol. + // If we can not get driver name from Component Name 2 protocol, we can try ISO 639-2 Component Name protocol. // DriverName = GetComponentNameWorker (DriverBindingHandle, &gEfiComponentNameProtocolGuid, L"Lang"); } @@ -266,7 +266,7 @@ GetImageName ( // Make sure device path node is aligned when accessing it's FV Name Guid field. // AlignedDevPathNode = AllocateCopyPool (DevicePathNodeLength(DevPathNode), DevPathNode); - + // // Find the Fv File path // @@ -298,9 +298,9 @@ GetImageName ( Buffer = NULL; } } - + FreePool (AlignedDevPathNode); - + // // Next device path node // @@ -344,13 +344,13 @@ UpdateDeviceSelectPage ( VOID *StartOpCodeHandle; VOID *EndOpCodeHandle; EFI_IFR_GUID_LABEL *StartLabel; - EFI_IFR_GUID_LABEL *EndLabel; + EFI_IFR_GUID_LABEL *EndLabel; // // Set current page form ID. // - mCurrentPage = FORM_ID_DEVICE; - + mCurrentPage = FORM_ID_DEVICE; + // // Initial the mapping database in memory // @@ -507,7 +507,7 @@ UpdateDeviceSelectPage ( // Save the device path string toke for next access use // mControllerToken[Index] = NewStringToken; - + HiiCreateGotoOpCode ( StartOpCodeHandle, FORM_ID_DRIVER, @@ -575,7 +575,7 @@ GetDriverBindingHandleFromImageHandle ( if (EFI_ERROR (Status) || (DriverBindingHandleCount == 0)) { return NULL; } - + // // Get the first Driver Binding handle which has the specific image handle. // @@ -819,7 +819,7 @@ UpdateBindingDriverSelectPage ( // NewStrSize = StrSize (DriverName); NewString = AllocateZeroPool (NewStrSize); - ASSERT (NewString != NULL); + ASSERT (NewString != NULL); if (EFI_ERROR (CheckMapping (mControllerDevicePathProtocol[mSelectedCtrIndex], LoadedImageDevicePath, &mMappingDataBase, NULL, NULL))) { mDriSelection[Index] = FALSE; } else { @@ -842,7 +842,7 @@ UpdateBindingDriverSelectPage ( NewStrSize = StrSize (DriverName); NewString = AllocateZeroPool (NewStrSize); - ASSERT (NewString != NULL); + ASSERT (NewString != NULL); StrCatS (NewString, NewStrSize/sizeof(CHAR16), DriverName); NewStringHelpToken = HiiSetString (Private->RegisteredHandle, DriverImageFilePathToken[Index], NewString, NULL); ASSERT (NewStringHelpToken != 0); @@ -1058,7 +1058,7 @@ UpdatePrioritySelectPage ( FakeNvData->DriOrder[Index] = (UINT8) OrderNO[MinNO]; TempNO[MinNO] = MAX_CHOICE_NUM + 1; } - + // // Create Order List OpCode // @@ -1289,7 +1289,7 @@ PlatOverMngrRouteConfig ( if (!HiiIsConfigHdrMatch (Configuration, &gPlatformOverridesManagerGuid, mVariableName)) { return EFI_NOT_FOUND; } - + *Progress = Configuration + StrLen (Configuration); Private = EFI_CALLBACK_INFO_FROM_THIS (This); FakeNvData = &Private->FakeNvData; @@ -1365,7 +1365,7 @@ PlatOverMngrCallback ( if (Value == NULL) { return EFI_INVALID_PARAMETER; } - + if (KeyValue == KEY_VALUE_DRIVER_GOTO_PREVIOUS) { UpdateDeviceSelectPage (Private, KeyValue, FakeNvData); // @@ -1426,7 +1426,7 @@ PlatOverMngrCallback ( ASSERT (FALSE); } break; - + case KEY_VALUE_ORDER_SAVE_AND_EXIT: Status = CommitChanges (Private, KeyValue, FakeNvData); *ActionRequest = EFI_BROWSER_ACTION_REQUEST_SUBMIT; @@ -1526,14 +1526,14 @@ GetDriver ( This driver doesn't support this API. @param This A pointer to the EFI_PLATFORM_DRIVER_OVERRIDE_ - PROTOCOL instance. + PROTOCOL instance. @param ControllerHandle The device handle of the controller to check if a driver override - exists. + exists. @param DriverImagePath On input, a pointer to the previous driver device path returned by GetDriverPath(). On output, a pointer to the next driver device path. Passing in a pointer to NULL, will return the first driver device path for ControllerHandle. - + @retval EFI_UNSUPPORTED **/ EFI_STATUS @@ -1550,18 +1550,18 @@ GetDriverPath ( /** Used to associate a driver image handle with a device path that was returned on a prior call to the - GetDriverPath() service. This driver image handle will then be available through the + GetDriverPath() service. This driver image handle will then be available through the GetDriver() service. This driver doesn't support this API. @param This A pointer to the EFI_PLATFORM_DRIVER_OVERRIDE_ - PROTOCOL instance. - @param ControllerHandle The device handle of the controller. + PROTOCOL instance. + @param ControllerHandle The device handle of the controller. @param DriverImagePath A pointer to the driver device path that was returned in a prior - call to GetDriverPath(). + call to GetDriverPath(). @param DriverImageHandle The driver image handle that was returned by LoadImage() - when the driver specified by DriverImagePath was loaded - into memory. - + when the driver specified by DriverImagePath was loaded + into memory. + @retval EFI_UNSUPPORTED **/ EFI_STATUS @@ -1597,7 +1597,7 @@ PlatDriOverrideDxeInit ( EFI_STATUS Status; EFI_FORM_BROWSER2_PROTOCOL *FormBrowser2; VOID *Instance; - + // // There should only be one Form Configuration protocol // @@ -1626,7 +1626,7 @@ PlatDriOverrideDxeInit ( if (!EFI_ERROR (Status)) { return EFI_ALREADY_STARTED; } - + mCallerImageHandle = ImageHandle; mCallbackInfo = AllocateZeroPool (sizeof (EFI_CALLBACK_INFO)); if (mCallbackInfo == NULL) { @@ -1691,7 +1691,7 @@ PlatDriOverrideDxeInit ( // mDriverImageHandleCount = 0; mCurrentPage = 0; - + return EFI_SUCCESS; Finish: diff --git a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.uni b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.uni index 22d33d313f..ef9e890c3d 100644 --- a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.uni +++ b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxe.uni @@ -4,11 +4,11 @@ // It doesn't install again if this protocol exists. // It only implements one interface GetDriver of PLATFORM_DRIVER_OVERRIDE_PROTOCOL protocol // and doesn't support other two interfaces GetDriverPath, DriverLoaded. -// +// // This driver also offers an UI interface in device manager to let user configure // platform override protocol to override the default algorithm for matching // drivers to controllers. -// +// // The main flow: // 1. It dynamicly locate all controller device path. // 2. It dynamicly locate all drivers which support binding protocol. @@ -16,16 +16,16 @@ // mapping between drivers to controllers. // 4. It save all the mapping info in NV variables for the following boot, // which will be consumed by GetDriver API of the produced the platform override protocol. -// +// // Caution: This module is a sample implementation for the test purpose. // -// Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxeExtra.uni b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxeExtra.uni index 0648a02afd..5226fd6556 100644 --- a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxeExtra.uni +++ b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // PlatDriOverrideDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Platform Driver Override DXE Driver" diff --git a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideLib.c b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideLib.c index 86c34be88d..d49f6c9953 100644 --- a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideLib.c +++ b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatDriOverrideLib.c @@ -1,7 +1,7 @@ /** @file Implementation of the shared functions to do the platform driver vverride mapping. - Copyright (c) 2007 - 2015, Intel Corporation. All rights reserved.
+ Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -751,7 +751,7 @@ InitOverridesMapping ( // // Check buffer overflow. // - if ((OverrideItem->ControllerDevicePath == NULL) || (VariableIndex < (UINT8 *) ControllerDevicePath) || + if ((OverrideItem->ControllerDevicePath == NULL) || (VariableIndex < (UINT8 *) ControllerDevicePath) || (VariableIndex > (UINT8 *) VariableBuffer + BufferSize)) { Corrupted = TRUE; break; @@ -781,7 +781,7 @@ InitOverridesMapping ( // // Check buffer overflow // - if ((DriverImageInfo->DriverImagePath == NULL) || (VariableIndex < (UINT8 *) DriverDevicePath) || + if ((DriverImageInfo->DriverImagePath == NULL) || (VariableIndex < (UINT8 *) DriverDevicePath) || (VariableIndex < (UINT8 *) VariableBuffer + BufferSize)) { Corrupted = TRUE; break; @@ -1094,7 +1094,7 @@ SaveOverridesMapping ( if (EFI_ERROR (Status)) { if (NumIndex > 0) { // - // Delete all PlatDriOver variables when full mapping can't be set. + // Delete all PlatDriOver variables when full mapping can't be set. // DeleteOverridesVariables (); } @@ -1112,7 +1112,7 @@ SaveOverridesMapping ( @param ImageHandle The Image handle @param BindingHandle The BindingHandle of the found Driver Binding protocol. - If Binding protocol is not found, it is set to NULL. + If Binding protocol is not found, it is set to NULL. @return Pointer into the Binding Protocol interface @retval NULL The parameter is not valid or the binding protocol is not found. @@ -1551,8 +1551,8 @@ GetDriverFromMapping ( @retval EFI_INVALID_PARAMETER ControllerDevicePath or MappingDataBase is NULL. @retval EFI_NOT_FOUND ControllerDevicePath is not found in MappingDataBase or - DriverImageDevicePath is not found in the found DriverImage Info list. - @retval EFI_SUCCESS The controller's total override driver number and + DriverImageDevicePath is not found in the found DriverImage Info list. + @retval EFI_SUCCESS The controller's total override driver number and input DriverImage's order number is correctly return. **/ EFI_STATUS @@ -1668,14 +1668,14 @@ CheckMapping ( override driver image item @param DriverImageDevicePath The driver image device path need to be insert @param MappingDataBase Mapping database list entry pointer - @param DriverImageNO The inserted order number. If this number is taken, + @param DriverImageNO The inserted order number. If this number is taken, the larger available number will be used. @retval EFI_INVALID_PARAMETER ControllerDevicePath is NULL, or DriverImageDevicePath is NULL or MappingDataBase is NULL - @retval EFI_ALREADY_STARTED The input Controller to input DriverImage has been + @retval EFI_ALREADY_STARTED The input Controller to input DriverImage has been recorded into the mapping database. - @retval EFI_SUCCESS The Controller and DriverImage are inserted into + @retval EFI_SUCCESS The Controller and DriverImage are inserted into the mapping database successfully. **/ @@ -1799,7 +1799,7 @@ InsertDriverImage ( /** Delete a controller's override driver from the mapping database. - @param ControllerDevicePath The controller device path will be deleted + @param ControllerDevicePath The controller device path will be deleted when all drivers images on it are removed. @param DriverImageDevicePath The driver image device path will be delete. If NULL, all driver image will be delete. @@ -1807,7 +1807,7 @@ InsertDriverImage ( @retval EFI_INVALID_PARAMETER ControllerDevicePath is NULL, or MappingDataBase is NULL @retval EFI_NOT_FOUND ControllerDevicePath is not found in MappingDataBase or - DriverImageDevicePath is not found in the found DriverImage Info list. + DriverImageDevicePath is not found in the found DriverImage Info list. @retval EFI_SUCCESS Delete the specified driver successfully. **/ diff --git a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatOverMngr.h b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatOverMngr.h index ca2094551d..86d9a2bb96 100644 --- a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatOverMngr.h +++ b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatOverMngr.h @@ -1,9 +1,9 @@ /** @file - + The defintions are required both by Source code and Vfr file. - The PLAT_OVER_MNGR_DATA structure, form guid and Ifr question ID are defined. + The PLAT_OVER_MNGR_DATA structure, form guid and Ifr question ID are defined. -Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at diff --git a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatformDriOverrideDxe.inf b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatformDriOverrideDxe.inf index 4225fb92c3..5bd9e44edd 100644 --- a/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatformDriOverrideDxe.inf +++ b/MdeModulePkg/Universal/PlatformDriOverrideDxe/PlatformDriOverrideDxe.inf @@ -1,9 +1,9 @@ ## @file # This driver produces UEFI PLATFORM_DRIVER_OVERRIDE_PROTOCOL if this protocol doesn't exist. # It doesn't install again if this protocol exists. -# It only implements one interface GetDriver of PLATFORM_DRIVER_OVERRIDE_PROTOCOL protocol -# and doesn't support other two interfaces GetDriverPath, DriverLoaded. -# +# It only implements one interface GetDriver of PLATFORM_DRIVER_OVERRIDE_PROTOCOL protocol +# and doesn't support other two interfaces GetDriverPath, DriverLoaded. +# # This driver also offers an UI interface in device manager to let user configure # platform override protocol to override the default algorithm for matching # drivers to controllers. @@ -13,12 +13,12 @@ # 2. It dynamicly locate all drivers which support binding protocol. # 3. It export and dynamicly update two menu to let user select the # mapping between drivers to controllers. -# 4. It save all the mapping info in NV variables for the following boot, +# 4. It save all the mapping info in NV variables for the following boot, # which will be consumed by GetDriver API of the produced the platform override protocol. # # Caution: This module is a sample implementation for the test purpose. # -# Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -70,8 +70,8 @@ DevicePathLib DxeServicesTableLib UefiRuntimeServicesTableLib - PrintLib - + PrintLib + [Guids] # # This GUID C Name is not required for build since it is from UefiLib and not directly used by this module source. diff --git a/MdeModulePkg/Universal/PrintDxe/PrintDxe.uni b/MdeModulePkg/Universal/PrintDxe/PrintDxe.uni index 10f0ff81c5..e0a3317e6e 100644 --- a/MdeModulePkg/Universal/PrintDxe/PrintDxe.uni +++ b/MdeModulePkg/Universal/PrintDxe/PrintDxe.uni @@ -3,13 +3,13 @@ // // This driver produces Print2 protocols layered on top of the PrintLib from the MdePkg. // -// Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.
+// Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/PrintDxe/PrintDxeExtra.uni b/MdeModulePkg/Universal/PrintDxe/PrintDxeExtra.uni index 339fac2a5c..3e0402b994 100644 --- a/MdeModulePkg/Universal/PrintDxe/PrintDxeExtra.uni +++ b/MdeModulePkg/Universal/PrintDxe/PrintDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // PrintDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Formatted String DXE Driver" diff --git a/MdeModulePkg/Universal/PropertiesTableAttributesDxe/PropertiesTableAttributesDxe.c b/MdeModulePkg/Universal/PropertiesTableAttributesDxe/PropertiesTableAttributesDxe.c index 718c567346..4d1a46f64c 100644 --- a/MdeModulePkg/Universal/PropertiesTableAttributesDxe/PropertiesTableAttributesDxe.c +++ b/MdeModulePkg/Universal/PropertiesTableAttributesDxe/PropertiesTableAttributesDxe.c @@ -4,7 +4,7 @@ This module sets EFI_MEMORY_XP for attributes of EfiACPIMemoryNVS and EfiReservedMemoryType in UEFI memory map, if and only of PropertiesTable is published and has BIT0 set. -Copyright (c) 2015, Intel Corporation. All rights reserved.
+Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -130,7 +130,7 @@ UpdateMemoryAttributesDefault ( if (EFI_ERROR (Status)) { goto Done; } - + ASSERT (PropertiesTable != NULL); DEBUG ((EFI_D_INFO, "MemoryProtectionAttribute - 0x%016lx\n", PropertiesTable->MemoryProtectionAttribute)); diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.h b/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.h index 0defa56e81..6e699ff8ac 100644 --- a/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.h +++ b/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.h @@ -2,7 +2,7 @@ EFI_REGULAR_EXPRESSION_PROTOCOL Header File. (C) Copyright 2015 Hewlett Packard Enterprise Development LP
- + This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License that accompanies this distribution. The full text of the license may be found at diff --git a/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.inf b/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.inf index d4d9a83992..d8a1490021 100644 --- a/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.inf +++ b/MdeModulePkg/Universal/RegularExpressionDxe/RegularExpressionDxe.inf @@ -70,16 +70,16 @@ gEfiRegexSyntaxTypePerlGuid ## CONSUMES ## GUID [Protocols] - gEfiRegularExpressionProtocolGuid ## PRODUCES + gEfiRegularExpressionProtocolGuid ## PRODUCES [BuildOptions] # Override MSFT build option to remove /Oi and /GL - MSFT:DEBUG_*_IA32_CC_FLAGS == /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm - MSFT:RELEASE_*_IA32_CC_FLAGS == /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF - MSFT:DEBUG_*_X64_CC_FLAGS == /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2s /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm /X - MSFT:RELEASE_*_X64_CC_FLAGS == /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2s /FIAutoGen.h /EHs-c- /GR- /GF /Gy /X - MSFT:DEBUG_*_IPF_CC_FLAGS == /nologo /c /WX /GS- /W4 /EHs-c- /GR- /Gy /Os /FIAutoGen.h /QIPF_fr32 /Zi /X - MSFT:RELEASE_*_IPF_CC_FLAGS == /nologo /c /WX /GS- /W4 /EHs-c- /GR- /Gy /Os /FIAutoGen.h /QIPF_fr32 /X + MSFT:DEBUG_*_IA32_CC_FLAGS == /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm + MSFT:RELEASE_*_IA32_CC_FLAGS == /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2 /FIAutoGen.h /EHs-c- /GR- /GF + MSFT:DEBUG_*_X64_CC_FLAGS == /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2s /FIAutoGen.h /EHs-c- /GR- /GF /Gy /Zi /Gm /X + MSFT:RELEASE_*_X64_CC_FLAGS == /nologo /c /WX /GS- /W4 /Gs32768 /D UNICODE /O1b2s /FIAutoGen.h /EHs-c- /GR- /GF /Gy /X + MSFT:DEBUG_*_IPF_CC_FLAGS == /nologo /c /WX /GS- /W4 /EHs-c- /GR- /Gy /Os /FIAutoGen.h /QIPF_fr32 /Zi /X + MSFT:RELEASE_*_IPF_CC_FLAGS == /nologo /c /WX /GS- /W4 /EHs-c- /GR- /Gy /Os /FIAutoGen.h /QIPF_fr32 /X INTEL:*_*_*_CC_FLAGS = /Oi- # Oniguruma: potentially uninitialized local variable used @@ -91,6 +91,6 @@ # Oniguruma: old style declaration in st.c MSFT:*_*_*_CC_FLAGS = /wd4131 - # Oniguruma: 'type cast' : truncation from 'OnigUChar *' to 'unsigned int' + # Oniguruma: 'type cast' : truncation from 'OnigUChar *' to 'unsigned int' MSFT:*_*_*_CC_FLAGS = /wd4305 /wd4306 diff --git a/MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.c b/MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.c index 8a2dc8a9bd..3871418b60 100644 --- a/MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.c +++ b/MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.c @@ -1,7 +1,7 @@ /** @file Report Status Code Router PEIM which produces Report Stataus Code Handler PPI and Status Code PPI. - Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -71,19 +71,19 @@ CreateRscHandlerCallbackPacket ( /** Register the callback function for ReportStatusCode() notification. - + When this function is called the function pointer is added to an internal list and any future calls to ReportStatusCode() will be forwarded to the Callback function. @param[in] Callback A pointer to a function of type EFI_PEI_RSC_HANDLER_CALLBACK that is called when a call to ReportStatusCode() occurs. - + @retval EFI_SUCCESS Function was successfully registered. @retval EFI_INVALID_PARAMETER The callback function was NULL. @retval EFI_OUT_OF_RESOURCES The internal buffer ran out of space. No more functions can be registered. @retval EFI_ALREADY_STARTED The function was already registered. It can't be registered again. - + **/ EFI_STATUS EFIAPI @@ -127,7 +127,7 @@ Register ( // // If the total number of handlers in current packet is max value 64, // search an entry with NULL pointer and fill new handler into this entry. - // + // FreePacket = NumberOfEntries; FreeEntryIndex = Index; } @@ -142,7 +142,7 @@ Register ( CallbackEntry = (EFI_PEI_RSC_HANDLER_CALLBACK *) (FreePacket + 1); CallbackEntry[FreeEntryIndex] = Callback; - + if (*FreePacket == FreeEntryIndex) { // // If new registered callback is added as a new entry in the packet, @@ -156,16 +156,16 @@ Register ( /** Remove a previously registered callback function from the notification list. - + ReportStatusCode() messages will no longer be forwarded to the Callback function. - + @param[in] Callback A pointer to a function of type EFI_PEI_RSC_HANDLER_CALLBACK that is to be unregistered. @retval EFI_SUCCESS The function was successfully unregistered. @retval EFI_INVALID_PARAMETER The callback function was NULL. @retval EFI_NOT_FOUND The callback function was not found to be unregistered. - + **/ EFI_STATUS EFIAPI @@ -269,7 +269,7 @@ ReportDispatcher ( /** Entry point of Status Code PEIM. - + This function is the entry point of this Status Code Router PEIM. It produces Report Stataus Code Handler PPI and Status Code PPI. diff --git a/MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.h b/MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.h index 318a3f5af1..c660f37ee8 100644 --- a/MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.h +++ b/MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPei.h @@ -1,7 +1,7 @@ /** @file Internal include file for Report Status Code Router PEIM. - Copyright (c) 2009, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -28,13 +28,13 @@ /** Register the callback function for ReportStatusCode() notification. - + When this function is called the function pointer is added to an internal list and any future calls to ReportStatusCode() will be forwarded to the Callback function. @param[in] Callback A pointer to a function of type EFI_PEI_RSC_HANDLER_CALLBACK that is called when a call to ReportStatusCode() occurs. - + @retval EFI_SUCCESS Function was successfully registered. @retval EFI_INVALID_PARAMETER The callback function was NULL. @retval EFI_OUT_OF_RESOURCES The internal buffer ran out of space. No more functions can be @@ -50,16 +50,16 @@ Register ( /** Remove a previously registered callback function from the notification list. - + ReportStatusCode() messages will no longer be forwarded to the Callback function. - + @param[in] Callback A pointer to a function of type EFI_PEI_RSC_HANDLER_CALLBACK that is to be unregistered. @retval EFI_SUCCESS The function was successfully unregistered. @retval EFI_INVALID_PARAMETER The callback function was NULL. @retval EFI_NOT_FOUND The callback function was not found to be unregistered. - + **/ EFI_STATUS EFIAPI diff --git a/MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPeiExtra.uni b/MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPeiExtra.uni index f4cca9a5f5..44bbfb7e09 100644 --- a/MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPeiExtra.uni +++ b/MdeModulePkg/Universal/ReportStatusCodeRouter/Pei/ReportStatusCodeRouterPeiExtra.uni @@ -1,7 +1,7 @@ // /** @file // ReportStatusCodeRouterPei Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Status Code Routing PEI Module" diff --git a/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.c b/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.c index f859075da6..1aa1204f46 100644 --- a/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.c +++ b/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.c @@ -2,7 +2,7 @@ Report Status Code Router Driver which produces Report Stataus Code Handler Protocol and Status Code Runtime Protocol. - Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -79,7 +79,7 @@ RscHandlerNotification ( /** Register the callback function for ReportStatusCode() notification. - + When this function is called the function pointer is added to an internal list and any future calls to ReportStatusCode() will be forwarded to the Callback function. During the bootservices, this is the callback for which this service can be invoked. The report status code router @@ -93,11 +93,11 @@ RscHandlerNotification ( 2. not unregister at exit boot services so that the router will still have its callback address 3. the caller must be self-contained (eg. Not call out into any boot-service interfaces) and be runtime safe, in general. - + @param[in] Callback A pointer to a function of type EFI_RSC_HANDLER_CALLBACK that is called when a call to ReportStatusCode() occurs. - @param[in] Tpl TPL at which callback can be safely invoked. - + @param[in] Tpl TPL at which callback can be safely invoked. + @retval EFI_SUCCESS Function was successfully registered. @retval EFI_INVALID_PARAMETER The callback function was NULL. @retval EFI_OUT_OF_RESOURCES The internal buffer ran out of space. No more functions can be @@ -166,13 +166,13 @@ Register ( /** Remove a previously registered callback function from the notification list. - + A callback function must be unregistered before it is deallocated. It is important that any registered callbacks that are not runtime complaint be unregistered when ExitBootServices() is called. - + @param[in] Callback A pointer to a function of type EFI_RSC_HANDLER_CALLBACK that is to be unregistered. - + @retval EFI_SUCCESS The function was successfully unregistered. @retval EFI_INVALID_PARAMETER The callback function was NULL. @retval EFI_NOT_FOUND The callback function was not found to be unregistered. @@ -343,7 +343,7 @@ VirtualAddressChangeCallBack ( IN VOID *Context ) { - EFI_STATUS Status; + EFI_STATUS Status; LIST_ENTRY *Link; RSC_HANDLER_CALLBACK_ENTRY *CallbackEntry; @@ -369,7 +369,7 @@ VirtualAddressChangeCallBack ( @param ImageHandle The firmware allocated handle for the EFI image. @param SystemTable A pointer to the EFI System Table. - + @retval EFI_SUCCESS The entry point is executed successfully. **/ diff --git a/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.h b/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.h index c82f296f8d..8d6f8d096e 100644 --- a/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.h +++ b/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.h @@ -1,7 +1,7 @@ /** @file Internal include file for Report Status Code Router Driver. - Copyright (c) 2009, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -56,7 +56,7 @@ typedef struct { /** Register the callback function for ReportStatusCode() notification. - + When this function is called the function pointer is added to an internal list and any future calls to ReportStatusCode() will be forwarded to the Callback function. During the bootservices, this is the callback for which this service can be invoked. The report status code router @@ -70,11 +70,11 @@ typedef struct { 2. not unregister at exit boot services so that the router will still have its callback address 3. the caller must be self-contained (eg. Not call out into any boot-service interfaces) and be runtime safe, in general. - + @param[in] Callback A pointer to a function of type EFI_RSC_HANDLER_CALLBACK that is called when a call to ReportStatusCode() occurs. - @param[in] Tpl TPL at which callback can be safely invoked. - + @param[in] Tpl TPL at which callback can be safely invoked. + @retval EFI_SUCCESS Function was successfully registered. @retval EFI_INVALID_PARAMETER The callback function was NULL. @retval EFI_OUT_OF_RESOURCES The internal buffer ran out of space. No more functions can be @@ -91,13 +91,13 @@ Register ( /** Remove a previously registered callback function from the notification list. - + A callback function must be unregistered before it is deallocated. It is important that any registered callbacks that are not runtime complaint be unregistered when ExitBootServices() is called. - + @param[in] Callback A pointer to a function of type EFI_RSC_HANDLER_CALLBACK that is to be unregistered. - + @retval EFI_SUCCESS The function was successfully unregistered. @retval EFI_INVALID_PARAMETER The callback function was NULL. @retval EFI_NOT_FOUND The callback function was not found to be unregistered. diff --git a/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf b/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf index 0445d94340..9556260082 100644 --- a/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf +++ b/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxe.inf @@ -1,7 +1,7 @@ ## @file # Report Status Code Router Driver which produces Report Stataus Code Handler Protocol and Status Code Runtime Protocol. # -# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -19,7 +19,7 @@ MODULE_UNI_FILE = ReportStatusCodeRouterRuntimeDxe.uni FILE_GUID = D93CE3D8-A7EB-4730-8C8E-CC466A9ECC3C MODULE_TYPE = DXE_RUNTIME_DRIVER - VERSION_STRING = 1.0 + VERSION_STRING = 1.0 ENTRY_POINT = GenericStatusCodeRuntimeDxeEntry # diff --git a/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxeExtra.uni b/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxeExtra.uni index d16c249412..679dae2853 100644 --- a/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxeExtra.uni +++ b/MdeModulePkg/Universal/ReportStatusCodeRouter/RuntimeDxe/ReportStatusCodeRouterRuntimeDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // ReportStatusCodeRouterRuntimeDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Status Code Routing DXE Driver" diff --git a/MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterSmm.c b/MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterSmm.c index 79c8d1e36f..f8fef59875 100644 --- a/MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterSmm.c +++ b/MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterSmm.c @@ -2,7 +2,7 @@ Report Status Code Router Driver which produces SMM Report Stataus Code Handler Protocol and SMM Status Code Protocol. - Copyright (c) 2009 - 2011, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -34,19 +34,19 @@ EFI_SMM_RSC_HANDLER_PROTOCOL mSmmRscHandlerProtocol = { /** Register the callback function for ReportStatusCode() notification. - + When this function is called the function pointer is added to an internal list and any future calls to ReportStatusCode() will be forwarded to the Callback function. @param[in] Callback A pointer to a function of type EFI_PEI_RSC_HANDLER_CALLBACK that is called when a call to ReportStatusCode() occurs. - + @retval EFI_SUCCESS Function was successfully registered. @retval EFI_INVALID_PARAMETER The callback function was NULL. @retval EFI_OUT_OF_RESOURCES The internal buffer ran out of space. No more functions can be registered. @retval EFI_ALREADY_STARTED The function was already registered. It can't be registered again. - + **/ EFI_STATUS EFIAPI @@ -84,16 +84,16 @@ Register ( /** Remove a previously registered callback function from the notification list. - + ReportStatusCode() messages will no longer be forwarded to the Callback function. - + @param[in] Callback A pointer to a function of type EFI_PEI_RSC_HANDLER_CALLBACK that is to be unregistered. @retval EFI_SUCCESS The function was successfully unregistered. @retval EFI_INVALID_PARAMETER The callback function was NULL. @retval EFI_NOT_FOUND The callback function was not found to be unregistered. - + **/ EFI_STATUS EFIAPI @@ -197,7 +197,7 @@ ReportDispatcher ( @param ImageHandle The firmware allocated handle for the EFI image. @param SystemTable A pointer to the EFI System Table. - + @retval EFI_SUCCESS The entry point is executed successfully. **/ @@ -212,7 +212,7 @@ GenericStatusCodeSmmEntry ( EFI_HANDLE Handle; Handle = NULL; - + // // Install SmmRscHandler Protocol // diff --git a/MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterSmm.h b/MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterSmm.h index 83f1bed003..cdf4d08f26 100644 --- a/MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterSmm.h +++ b/MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterSmm.h @@ -1,7 +1,7 @@ /** @file Internal include file for Report Status Code Router Driver. - Copyright (c) 2009 - 2010, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -37,19 +37,19 @@ typedef struct { /** Register the callback function for ReportStatusCode() notification. - + When this function is called the function pointer is added to an internal list and any future calls to ReportStatusCode() will be forwarded to the Callback function. @param[in] Callback A pointer to a function of type EFI_PEI_RSC_HANDLER_CALLBACK that is called when a call to ReportStatusCode() occurs. - + @retval EFI_SUCCESS Function was successfully registered. @retval EFI_INVALID_PARAMETER The callback function was NULL. @retval EFI_OUT_OF_RESOURCES The internal buffer ran out of space. No more functions can be registered. @retval EFI_ALREADY_STARTED The function was already registered. It can't be registered again. - + **/ EFI_STATUS EFIAPI @@ -59,16 +59,16 @@ Register ( /** Remove a previously registered callback function from the notification list. - + ReportStatusCode() messages will no longer be forwarded to the Callback function. - + @param[in] Callback A pointer to a function of type EFI_PEI_RSC_HANDLER_CALLBACK that is to be unregistered. @retval EFI_SUCCESS The function was successfully unregistered. @retval EFI_INVALID_PARAMETER The callback function was NULL. @retval EFI_NOT_FOUND The callback function was not found to be unregistered. - + **/ EFI_STATUS EFIAPI diff --git a/MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterSmm.inf b/MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterSmm.inf index 36c97ef57a..3e845ca162 100644 --- a/MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterSmm.inf +++ b/MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterSmm.inf @@ -1,7 +1,7 @@ ## @file # Report Status Code Router Driver which produces SMM Report Stataus Code Handler Protocol and SMM Status Code Protocol. # -# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -20,7 +20,7 @@ FILE_GUID = A6885402-D022-4b0e-A509-4711B90F2A39 MODULE_TYPE = DXE_SMM_DRIVER PI_SPECIFICATION_VERSION = 0x0001000A - VERSION_STRING = 1.0 + VERSION_STRING = 1.0 ENTRY_POINT = GenericStatusCodeSmmEntry # diff --git a/MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterSmmExtra.uni b/MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterSmmExtra.uni index af3dc75523..afe4ff5501 100644 --- a/MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterSmmExtra.uni +++ b/MdeModulePkg/Universal/ReportStatusCodeRouter/Smm/ReportStatusCodeRouterSmmExtra.uni @@ -1,7 +1,7 @@ // /** @file // ReportStatusCodeRouterSmm Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Status Code Routing SMM Driver" diff --git a/MdeModulePkg/Universal/ResetSystemPei/ResetSystem.c b/MdeModulePkg/Universal/ResetSystemPei/ResetSystem.c index 2c9b8a1bae..6236184e9d 100644 --- a/MdeModulePkg/Universal/ResetSystemPei/ResetSystem.c +++ b/MdeModulePkg/Universal/ResetSystemPei/ResetSystem.c @@ -235,7 +235,7 @@ UnregisterResetNotify ( @param[in] FileHandle Handle of the file being invoked. @param[in] PeiServices Describes the list of possible PEI Services. - + @retval EFI_SUCCESS The entry point is executed successfully. @retval EFI_ALREADY_STARTED The Reset2 PPI was already installed. @retval others Status code returned from PeiServicesInstallPpi(). diff --git a/MdeModulePkg/Universal/ResetSystemPei/ResetSystemPei.uni b/MdeModulePkg/Universal/ResetSystemPei/ResetSystemPei.uni index 6d2d650c37..46c69013e5 100644 --- a/MdeModulePkg/Universal/ResetSystemPei/ResetSystemPei.uni +++ b/MdeModulePkg/Universal/ResetSystemPei/ResetSystemPei.uni @@ -1,13 +1,13 @@ // /** @file // This driver implements Reset2, ResetFilter and ResetHandler PPIs. // -// Copyright (c) 2017, Intel Corporation. All rights reserved.
+// Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials are // licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/ResetSystemPei/ResetSystemPeiExtra.uni b/MdeModulePkg/Universal/ResetSystemPei/ResetSystemPeiExtra.uni index 2681afc707..c43860aff6 100644 --- a/MdeModulePkg/Universal/ResetSystemPei/ResetSystemPeiExtra.uni +++ b/MdeModulePkg/Universal/ResetSystemPei/ResetSystemPeiExtra.uni @@ -1,7 +1,7 @@ // /** @file // ResetSystemPei Localized Strings and Content // -// Copyright (c) 2017, Intel Corporation. All rights reserved.
+// Copyright (c) 2017 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials are // licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Reset System PEIM" diff --git a/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystem.c b/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystem.c index 2c795426f5..f23b5e86f9 100644 --- a/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystem.c +++ b/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystem.c @@ -1,7 +1,7 @@ /** @file Reset Architectural and Reset Notification protocols implementation. - Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -162,9 +162,9 @@ RESET_NOTIFICATION_INSTANCE mPlatformSpecificResetHandler = { It initializes the Reset Architectural Protocol. - @param[in] ImageHandle The firmware allocated handle for the EFI image. + @param[in] ImageHandle The firmware allocated handle for the EFI image. @param[in] SystemTable A pointer to the EFI System Table. - + @retval EFI_SUCCESS The entry point is executed successfully. @retval other Cannot install ResetArch protocol. @@ -207,7 +207,7 @@ InitializeResetSystem ( } /** - Put the system into S3 power state. + Put the system into S3 power state. **/ VOID DoS3 ( @@ -293,7 +293,7 @@ ResetSystem ( Entry->ResetNotify (ResetType, ResetStatus, DataSize, ResetData); } // - // call reset notification functions registered through the + // call reset notification functions registered through the // EDKII_PLATFORM_SPECIFIC_RESET_HANDLER_PROTOCOL. // for ( Link = GetFirstNode (&mPlatformSpecificResetHandler.ResetNotifies) diff --git a/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystem.h b/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystem.h index ea5660274b..1848a92872 100644 --- a/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystem.h +++ b/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystem.h @@ -1,6 +1,6 @@ /** @file - Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -63,9 +63,9 @@ typedef struct { It initializes the Reset Architectural Protocol. - @param[in] ImageHandle The firmware allocated handle for the EFI image. + @param[in] ImageHandle The firmware allocated handle for the EFI image. @param[in] SystemTable A pointer to the EFI System Table. - + @retval EFI_SUCCESS The entry point is executed successfully. @retval other Cannot install ResetArch protocol. diff --git a/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.uni b/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.uni index 3e1e12da33..d10c86d23f 100644 --- a/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.uni +++ b/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxe.uni @@ -1,13 +1,13 @@ // /** @file // This driver implements Reset Architectural and Reset Notification protocols. // -// Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials are // licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxeExtra.uni b/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxeExtra.uni index 32448f24ec..a437a61e87 100644 --- a/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxeExtra.uni +++ b/MdeModulePkg/Universal/ResetSystemRuntimeDxe/ResetSystemRuntimeDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // ResetSystemRuntimeDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials are // licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Reset System DXE Driver" diff --git a/MdeModulePkg/Universal/SectionExtractionDxe/SectionExtractionDxe.c b/MdeModulePkg/Universal/SectionExtractionDxe/SectionExtractionDxe.c index b100883be6..096a497f5a 100644 --- a/MdeModulePkg/Universal/SectionExtractionDxe/SectionExtractionDxe.c +++ b/MdeModulePkg/Universal/SectionExtractionDxe/SectionExtractionDxe.c @@ -1,14 +1,14 @@ /** @file Section Extraction DXE Driver -Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -318,12 +318,12 @@ CustomGuidedSectionExtract ( /** Main entry for the Section Extraction DXE module. - This routine registers the Section Extraction Protocols that have been registered + This routine registers the Section Extraction Protocols that have been registered with the Section Extraction Library. - + @param[in] ImageHandle The firmware allocated handle for the EFI image. @param[in] SystemTable A pointer to the EFI System Table. - + @retval EFI_SUCCESS The entry point is executed successfully. @retval other Some error occurs when executing this entry point. diff --git a/MdeModulePkg/Universal/SectionExtractionDxe/SectionExtractionDxeExtra.uni b/MdeModulePkg/Universal/SectionExtractionDxe/SectionExtractionDxeExtra.uni index 21aa52a6a0..33c9a89d45 100644 --- a/MdeModulePkg/Universal/SectionExtractionDxe/SectionExtractionDxeExtra.uni +++ b/MdeModulePkg/Universal/SectionExtractionDxe/SectionExtractionDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // Section Extraction DXE Module Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,6 +12,6 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Section Extraction DXE" diff --git a/MdeModulePkg/Universal/SectionExtractionPei/SectionExtractionPei.c b/MdeModulePkg/Universal/SectionExtractionPei/SectionExtractionPei.c index 63fc94cb51..97e321d551 100644 --- a/MdeModulePkg/Universal/SectionExtractionPei/SectionExtractionPei.c +++ b/MdeModulePkg/Universal/SectionExtractionPei/SectionExtractionPei.c @@ -2,13 +2,13 @@ Section Extraction PEIM Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -50,7 +50,7 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. output buffer. If the input section's GuidedSectionHeader. Attributes field has the - EFI_GUIDED_SECTION_AUTH_STATUS_VALID + EFI_GUIDED_SECTION_AUTH_STATUS_VALID bit as clear, AuthenticationStatus must return zero. These bits reflect the @@ -60,14 +60,14 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. EFI_SUCCESS, the value of AuthenticationStatus is undefined. - + @retval EFI_SUCCESS The InputSection was successfully processed and the section contents were returned. - + @retval EFI_OUT_OF_RESOURCES The system has insufficient resources to process the request. - + @retval EFI_INVALID_PARAMETER The GUID in InputSection does not match this instance of the GUIDed Section Extraction PPI. @@ -121,7 +121,7 @@ CONST EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI mCustomGuidedSectionExtractionPpi = output buffer. If the input section's GuidedSectionHeader. Attributes field has the - EFI_GUIDED_SECTION_AUTH_STATUS_VALID + EFI_GUIDED_SECTION_AUTH_STATUS_VALID bit as clear, AuthenticationStatus must return zero. These bits reflect the @@ -131,14 +131,14 @@ CONST EFI_PEI_GUIDED_SECTION_EXTRACTION_PPI mCustomGuidedSectionExtractionPpi = EFI_SUCCESS, the value of AuthenticationStatus is undefined. - + @retval EFI_SUCCESS The InputSection was successfully processed and the section contents were returned. - + @retval EFI_OUT_OF_RESOURCES The system has insufficient resources to process the request. - + @retval EFI_INVALID_PARAMETER The GUID in InputSection does not match this instance of the GUIDed Section Extraction PPI. @@ -159,7 +159,7 @@ CustomGuidedSectionExtract ( UINT32 ScratchBufferSize; UINT32 OutputBufferSize; UINT16 SectionAttribute; - + // // Init local variable // @@ -174,12 +174,12 @@ CustomGuidedSectionExtract ( &ScratchBufferSize, &SectionAttribute ); - + if (EFI_ERROR (Status)) { DEBUG ((DEBUG_ERROR, "GetInfo from guided section Failed - %r\n", Status)); return Status; } - + if (ScratchBufferSize != 0) { // // Allocate scratch buffer @@ -190,7 +190,7 @@ CustomGuidedSectionExtract ( } } - if (((SectionAttribute & EFI_GUIDED_SECTION_PROCESSING_REQUIRED) != 0) && OutputBufferSize > 0) { + if (((SectionAttribute & EFI_GUIDED_SECTION_PROCESSING_REQUIRED) != 0) && OutputBufferSize > 0) { // // Allocate output buffer // @@ -200,9 +200,9 @@ CustomGuidedSectionExtract ( } DEBUG ((DEBUG_INFO, "Customized Guided section Memory Size required is 0x%x and address is 0x%p\n", OutputBufferSize, *OutputBuffer)); } - + Status = ExtractGuidedSectionDecode ( - InputSection, + InputSection, OutputBuffer, ScratchBuffer, AuthenticationStatus @@ -214,16 +214,16 @@ CustomGuidedSectionExtract ( DEBUG ((DEBUG_ERROR, "Extract guided section Failed - %r\n", Status)); return Status; } - + *OutputSize = (UINTN) OutputBufferSize; - + return EFI_SUCCESS; } /** Main entry for Section Extraction PEIM driver. - - This routine registers the Section Extraction PPIs that have been registered + + This routine registers the Section Extraction PPIs that have been registered with the Section Extraction Library. @param FileHandle Handle of the file being invoked. @@ -238,7 +238,7 @@ EFIAPI SectionExtractionPeiEntry ( IN EFI_PEI_FILE_HANDLE FileHandle, IN CONST EFI_PEI_SERVICES **PeiServices - ) + ) { EFI_STATUS Status; EFI_GUID *ExtractHandlerGuidTable; @@ -246,10 +246,10 @@ SectionExtractionPeiEntry ( EFI_PEI_PPI_DESCRIPTOR *GuidPpi; // - // Get custom extract guided section method guid list + // Get custom extract guided section method guid list // ExtractHandlerNumber = ExtractGuidedSectionGetGuidList (&ExtractHandlerGuidTable); - + // // Install custom extraction guid PPI // @@ -264,6 +264,6 @@ SectionExtractionPeiEntry ( ASSERT_EFI_ERROR (Status); } } - + return EFI_SUCCESS; } diff --git a/MdeModulePkg/Universal/SectionExtractionPei/SectionExtractionPei.inf b/MdeModulePkg/Universal/SectionExtractionPei/SectionExtractionPei.inf index 912031a27b..91800cec01 100644 --- a/MdeModulePkg/Universal/SectionExtractionPei/SectionExtractionPei.inf +++ b/MdeModulePkg/Universal/SectionExtractionPei/SectionExtractionPei.inf @@ -3,7 +3,7 @@ # # Produce one or more Section Extraction PPIs. # -# Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -41,7 +41,7 @@ DebugLib MemoryAllocationLib PeiServicesLib - + [Depex] gEfiPeiMemoryDiscoveredPpiGuid diff --git a/MdeModulePkg/Universal/SectionExtractionPei/SectionExtractionPeiExtra.uni b/MdeModulePkg/Universal/SectionExtractionPei/SectionExtractionPeiExtra.uni index 0c0a944000..cb58f93301 100644 --- a/MdeModulePkg/Universal/SectionExtractionPei/SectionExtractionPeiExtra.uni +++ b/MdeModulePkg/Universal/SectionExtractionPei/SectionExtractionPeiExtra.uni @@ -1,7 +1,7 @@ // /** @file // Section Extraction PEIM Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,6 +12,6 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Section Extraction PEI" diff --git a/MdeModulePkg/Universal/SecurityStubDxe/SecurityStub.c b/MdeModulePkg/Universal/SecurityStubDxe/SecurityStub.c index a75d8dc223..86dfeb5478 100644 --- a/MdeModulePkg/Universal/SecurityStubDxe/SecurityStub.c +++ b/MdeModulePkg/Universal/SecurityStubDxe/SecurityStub.c @@ -1,14 +1,14 @@ /** @file This driver produces Security2 and Security architectural protocol based on SecurityManagementLib. - - Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -28,31 +28,31 @@ EFI_HANDLE mSecurityArchProtocolHandle = NULL; /** - The EFI_SECURITY_ARCH_PROTOCOL (SAP) is used to abstract platform-specific - policy from the DXE core response to an attempt to use a file that returns a - given status for the authentication check from the section extraction protocol. + The EFI_SECURITY_ARCH_PROTOCOL (SAP) is used to abstract platform-specific + policy from the DXE core response to an attempt to use a file that returns a + given status for the authentication check from the section extraction protocol. - The possible responses in a given SAP implementation may include locking - flash upon failure to authenticate, attestation logging for all signed drivers, - and other exception operations. The File parameter allows for possible logging + The possible responses in a given SAP implementation may include locking + flash upon failure to authenticate, attestation logging for all signed drivers, + and other exception operations. The File parameter allows for possible logging within the SAP of the driver. If File is NULL, then EFI_INVALID_PARAMETER is returned. - If the file specified by File with an authentication status specified by + If the file specified by File with an authentication status specified by AuthenticationStatus is safe for the DXE Core to use, then EFI_SUCCESS is returned. - If the file specified by File with an authentication status specified by - AuthenticationStatus is not safe for the DXE Core to use under any circumstances, + If the file specified by File with an authentication status specified by + AuthenticationStatus is not safe for the DXE Core to use under any circumstances, then EFI_ACCESS_DENIED is returned. - If the file specified by File with an authentication status specified by - AuthenticationStatus is not safe for the DXE Core to use right now, but it - might be possible to use it at a future time, then EFI_SECURITY_VIOLATION is + If the file specified by File with an authentication status specified by + AuthenticationStatus is not safe for the DXE Core to use right now, but it + might be possible to use it at a future time, then EFI_SECURITY_VIOLATION is returned. @param This The EFI_SECURITY_ARCH_PROTOCOL instance. - @param AuthenticationStatus + @param AuthenticationStatus This is the authentication type returned from the Section Extraction protocol. See the Section Extraction Protocol Specification for details on this type. @@ -71,18 +71,18 @@ SecurityStubAuthenticateState ( ) { EFI_STATUS Status; - - Status = ExecuteSecurity2Handlers (EFI_AUTH_OPERATION_AUTHENTICATION_STATE, - AuthenticationStatus, + + Status = ExecuteSecurity2Handlers (EFI_AUTH_OPERATION_AUTHENTICATION_STATE, + AuthenticationStatus, File, - NULL, - 0, + NULL, + 0, FALSE ); if (Status == EFI_SUCCESS) { Status = ExecuteSecurityHandlers (AuthenticationStatus, File); } - + return Status; } @@ -98,7 +98,7 @@ SecurityStubAuthenticateState ( these cases. If the FileBuffer is NULL, the interface will determine if the DevicePath can be connected in order to support the User Identification policy. - + @param This The EFI_SECURITY2_ARCH_PROTOCOL instance. @param File A pointer to the device path of the file that is being dispatched. This will optionally be used for logging. @@ -107,7 +107,7 @@ SecurityStubAuthenticateState ( @param BootPolicy A boot policy that was used to call LoadImage() UEFI service. If FileAuthentication() is invoked not from the LoadImage(), BootPolicy must be set to FALSE. - + @retval EFI_SUCCESS The file specified by DevicePath and non-NULL FileBuffer did authenticate, and the platform policy dictates that the DXE Foundation may use the file. @@ -150,14 +150,14 @@ Security2StubAuthenticate ( } } - return ExecuteSecurity2Handlers (EFI_AUTH_OPERATION_VERIFY_IMAGE | - EFI_AUTH_OPERATION_DEFER_IMAGE_LOAD | + return ExecuteSecurity2Handlers (EFI_AUTH_OPERATION_VERIFY_IMAGE | + EFI_AUTH_OPERATION_DEFER_IMAGE_LOAD | EFI_AUTH_OPERATION_MEASURE_IMAGE | - EFI_AUTH_OPERATION_CONNECT_POLICY, - 0, + EFI_AUTH_OPERATION_CONNECT_POLICY, + 0, File, - FileBuffer, - FileSize, + FileBuffer, + FileSize, BootPolicy ); } @@ -165,12 +165,12 @@ Security2StubAuthenticate ( // // Security2 and Security Architectural Protocol instance produced by this driver // -EFI_SECURITY_ARCH_PROTOCOL mSecurityStub = { - SecurityStubAuthenticateState +EFI_SECURITY_ARCH_PROTOCOL mSecurityStub = { + SecurityStubAuthenticateState }; -EFI_SECURITY2_ARCH_PROTOCOL mSecurity2Stub = { - Security2StubAuthenticate +EFI_SECURITY2_ARCH_PROTOCOL mSecurity2Stub = { + Security2StubAuthenticate }; /** @@ -178,7 +178,7 @@ EFI_SECURITY2_ARCH_PROTOCOL mSecurity2Stub = { @param ImageHandle The image handle of this driver. @param SystemTable A pointer to the EFI System Table. - + @retval EFI_SUCCESS Install the sample Security Architectural Protocol successfully. **/ diff --git a/MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.uni b/MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.uni index 2050dd6b34..5264da1733 100644 --- a/MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.uni +++ b/MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxe.uni @@ -3,13 +3,13 @@ // // This driver produces security2 and security architectural protocol based on SecurityManagementLib. // -// Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxeExtra.uni b/MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxeExtra.uni index dfc807b29b..f6b665e77b 100644 --- a/MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxeExtra.uni +++ b/MdeModulePkg/Universal/SecurityStubDxe/SecurityStubDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // SecurityStubDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Security Stub DXE Driver" diff --git a/MdeModulePkg/Universal/SerialDxe/SerialDxeExtra.uni b/MdeModulePkg/Universal/SerialDxe/SerialDxeExtra.uni index 3790487cef..e10da15ec3 100644 --- a/MdeModulePkg/Universal/SerialDxe/SerialDxeExtra.uni +++ b/MdeModulePkg/Universal/SerialDxe/SerialDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // SerialDxe Localized Strings and Content // -// Copyright (c) 2008 - 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2008 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "SerialDxe Driver" diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c b/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c index 297741c0fe..17a13c9562 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Expression.c @@ -1,7 +1,7 @@ /** @file Utility functions for expression evaluation. -Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -157,7 +157,7 @@ PushStack ( (*StackPtr)->Buffer = AllocateCopyPool(Data->BufferLen, Data->Buffer); ASSERT ((*StackPtr)->Buffer != NULL); } - + *StackPtr = *StackPtr + 1; return EFI_SUCCESS; @@ -210,7 +210,7 @@ ResetCurrentExpressionStack ( mCurrentExpressionPointer = mCurrentExpressionStack; mFormExpressionPointer = mFormExpressionStack; mStatementExpressionPointer = mStatementExpressionStack; - mOptionExpressionPointer = mOptionExpressionStack; + mOptionExpressionPointer = mOptionExpressionStack; } @@ -293,7 +293,7 @@ ResetMapExpressionListStack ( pointer @param StackEnd On input: old stack end; On output: new stack end @param MemberSize The stack member size. - + @retval EFI_SUCCESS Grow stack success. @retval EFI_OUT_OF_RESOURCES No enough memory for stack space. @@ -383,7 +383,7 @@ PushConditionalStack ( // // Push the item onto the stack // - CopyMem (*StackPtr, Data, sizeof (FORM_EXPRESSION *)); + CopyMem (*StackPtr, Data, sizeof (FORM_EXPRESSION *)); *StackPtr = *StackPtr + 1; return EFI_SUCCESS; @@ -426,15 +426,15 @@ PopConditionalStack ( /** Get the expression list count. - - @param Level Which type this expression belong to. Form, + + @param Level Which type this expression belong to. Form, statement or option? @retval >=0 The expression count @retval -1 Input parameter error. **/ -INTN +INTN GetConditionalExpressionCount ( IN EXPRESS_LEVEL Level ) @@ -449,13 +449,13 @@ GetConditionalExpressionCount ( default: ASSERT (FALSE); return -1; - } + } } /** Get the expression Buffer pointer. - - @param Level Which type this expression belong to. Form, + + @param Level Which type this expression belong to. Form, statement or option? @retval The start pointer of the expression buffer or NULL. @@ -476,7 +476,7 @@ GetConditionalExpressionList ( default: ASSERT (FALSE); return NULL; - } + } } @@ -484,7 +484,7 @@ GetConditionalExpressionList ( Push the expression options onto the Stack. @param Pointer Pointer to the current expression. - @param Level Which type this expression belong to. Form, + @param Level Which type this expression belong to. Form, statement or option? @retval EFI_SUCCESS The value was pushed onto the stack. @@ -528,7 +528,7 @@ PushConditionalExpression ( /** Pop the expression options from the Stack - @param Level Which type this expression belong to. Form, + @param Level Which type this expression belong to. Form, statement or option? @retval EFI_SUCCESS The value was pushed onto the stack. @@ -992,7 +992,7 @@ IfrStrToUpper ( /** Check whether this value type can be transfer to EFI_IFR_TYPE_BUFFER type. - EFI_IFR_TYPE_REF, EFI_IFR_TYPE_DATE and EFI_IFR_TYPE_TIME are converted to + EFI_IFR_TYPE_REF, EFI_IFR_TYPE_DATE and EFI_IFR_TYPE_TIME are converted to EFI_IFR_TYPE_BUFFER when do the value compare. @param Value Expression value to compare on. @@ -1048,11 +1048,11 @@ IsTypeInUINT64 ( /** Return the buffer length for this value. - EFI_IFR_TYPE_REF, EFI_IFR_TYPE_DATE and EFI_IFR_TYPE_TIME are converted to + EFI_IFR_TYPE_REF, EFI_IFR_TYPE_DATE and EFI_IFR_TYPE_TIME are converted to EFI_IFR_TYPE_BUFFER when do the value compare. @param Value Expression value to compare on. - + @retval BufLen Return the buffer length. **/ @@ -1082,7 +1082,7 @@ GetLengthForValue ( /** Return the buffer pointer for this value. - EFI_IFR_TYPE_REF, EFI_IFR_TYPE_DATE and EFI_IFR_TYPE_TIME are converted to + EFI_IFR_TYPE_REF, EFI_IFR_TYPE_DATE and EFI_IFR_TYPE_TIME are converted to EFI_IFR_TYPE_BUFFER when do the value compare. @param Value Expression value to compare on. @@ -1181,13 +1181,13 @@ IfrToString ( case EFI_IFR_TYPE_BOOLEAN: String = (Value.Value.b) ? L"True" : L"False"; break; - + case EFI_IFR_TYPE_BUFFER: case EFI_IFR_TYPE_DATE: case EFI_IFR_TYPE_TIME: case EFI_IFR_TYPE_REF: // - // + 3 is base on the unicode format, the length may be odd number, + // + 3 is base on the unicode format, the length may be odd number, // so need 1 byte to align, also need 2 bytes for L'\0'. // if (Value.Type == EFI_IFR_TYPE_BUFFER) { @@ -1202,20 +1202,20 @@ IfrToString ( ASSERT (TmpBuf != NULL); if (Format == EFI_IFR_STRING_ASCII) { CopyMem (TmpBuf, SrcBuf, SrcLen); - PrintFormat = L"%a"; + PrintFormat = L"%a"; } else { // Format == EFI_IFR_STRING_UNICODE CopyMem (TmpBuf, SrcBuf, SrcLen * sizeof (CHAR16)); - PrintFormat = L"%s"; + PrintFormat = L"%s"; } UnicodeSPrint (Buffer, sizeof (Buffer), PrintFormat, TmpBuf); - String = Buffer; + String = Buffer; FreePool (TmpBuf); if (Value.Type == EFI_IFR_TYPE_BUFFER) { FreePool (Value.Buffer); } break; - + default: Result->Type = EFI_IFR_TYPE_UNDEFINED; return EFI_SUCCESS; @@ -1587,8 +1587,8 @@ IfrMatch2 ( RegExSyntaxTypeList = NULL; Status = RegularExpressionProtocol->GetInfo ( - RegularExpressionProtocol, - &RegExSyntaxTypeListSize, + RegularExpressionProtocol, + &RegExSyntaxTypeListSize, RegExSyntaxTypeList ); if (Status == EFI_BUFFER_TOO_SMALL) { @@ -1598,8 +1598,8 @@ IfrMatch2 ( goto Done; } Status = RegularExpressionProtocol->GetInfo ( - RegularExpressionProtocol, - &RegExSyntaxTypeListSize, + RegularExpressionProtocol, + &RegExSyntaxTypeListSize, RegExSyntaxTypeList ); } else if (EFI_ERROR (Status)) { @@ -1613,7 +1613,7 @@ IfrMatch2 ( // Result->Type = EFI_IFR_TYPE_BOOLEAN; Status = RegularExpressionProtocol->MatchString ( - RegularExpressionProtocol, + RegularExpressionProtocol, String[0], String[1], SyntaxType, @@ -1631,7 +1631,7 @@ IfrMatch2 ( } // - // Type specified by SyntaxType is not supported + // Type specified by SyntaxType is not supported // in any of the EFI_REGULAR_EXPRESSION_PROTOCOL instances. // Result->Type = EFI_IFR_TYPE_UNDEFINED; @@ -1697,7 +1697,7 @@ IfrFind ( Status = PopExpression (&Value[2]); if (EFI_ERROR (Status)) { return Status; - } + } if (Value[0].Type > EFI_IFR_TYPE_NUM_SIZE_64) { Result->Type = EFI_IFR_TYPE_UNDEFINED; @@ -1792,7 +1792,7 @@ IfrMid ( Status = PopExpression (&Value[2]); if (EFI_ERROR (Status)) { return Status; - } + } if (Value[0].Type > EFI_IFR_TYPE_NUM_SIZE_64) { Result->Type = EFI_IFR_TYPE_UNDEFINED; @@ -1838,7 +1838,7 @@ IfrMid ( Result->BufferLen = 0; Result->Buffer = NULL; } else { - Result->BufferLen = (UINT16)((BufferLen - Base) < Length ? (BufferLen - Base) : Length); + Result->BufferLen = (UINT16)((BufferLen - Base) < Length ? (BufferLen - Base) : Length); Result->Buffer = AllocateZeroPool (Result->BufferLen); ASSERT (Result->Buffer != NULL); CopyMem (Result->Buffer, &Buffer[Base], Result->BufferLen); @@ -1848,7 +1848,7 @@ IfrMid ( FreePool (Value[2].Buffer); } } - + return Status; } @@ -1893,9 +1893,9 @@ IfrToken ( Status = PopExpression (&Value[2]); if (EFI_ERROR (Status)) { return Status; - } + } - if (Value[0].Type > EFI_IFR_TYPE_NUM_SIZE_64) { + if (Value[0].Type > EFI_IFR_TYPE_NUM_SIZE_64) { Result->Type = EFI_IFR_TYPE_UNDEFINED; return EFI_SUCCESS; } @@ -1910,7 +1910,7 @@ IfrToken ( for (Index = 0; Index < 2; Index++) { if (Value[Index + 1].Type != EFI_IFR_TYPE_STRING) { Result->Type = EFI_IFR_TYPE_UNDEFINED; - Status = EFI_SUCCESS; + Status = EFI_SUCCESS; goto Done; } @@ -2008,7 +2008,7 @@ IfrSpan ( Status = PopExpression (&Value[2]); if (EFI_ERROR (Status)) { return Status; - } + } if (Value[0].Type > EFI_IFR_TYPE_NUM_SIZE_64) { Result->Type = EFI_IFR_TYPE_UNDEFINED; @@ -2256,7 +2256,7 @@ CompareHiiValue ( Buf1Len = GetLengthForValue(Value1); Buf2 = GetBufferForValue(Value2); Buf2Len = GetLengthForValue(Value2); - + Len = Buf1Len > Buf2Len ? Buf2Len : Buf1Len; *Result = CompareMem (Buf1, Buf2, Len); if ((*Result == 0) && (Buf1Len != Buf2Len)) { @@ -2267,7 +2267,7 @@ CompareHiiValue ( *Result = Buf1Len > Buf2Len ? 1 : -1; } return EFI_SUCCESS; - } + } // // Take types(integer, boolean) as integer @@ -2334,7 +2334,7 @@ CheckUserPrivilege ( /// Enumerate all user information of the current user profile /// to look for any EFI_USER_INFO_ACCESS_SETUP record. /// - + for (UserInfoHandle = NULL;;) { Status = mUserManager->GetNextInfo (mUserManager, UserProfileHandle, &UserInfoHandle); if (EFI_ERROR (Status)) { @@ -2399,11 +2399,11 @@ CheckUserPrivilege ( @param FormSetGuid The formset guid which include the question. @param QuestionId The question id which need to get value from. @param Value The return data about question's value. - + @retval TRUE Get the question value success. @retval FALSE Get the question value failed. **/ -BOOLEAN +BOOLEAN GetQuestionValueFromForm ( IN EFI_DEVICE_PATH_PROTOCOL *DevicePath, IN EFI_HII_HANDLE InputHiiHandle, @@ -2420,10 +2420,10 @@ GetQuestionValueFromForm ( BOOLEAN GetTheVal; LIST_ENTRY *Link; - // - // The input parameter DevicePath or InputHiiHandle must have one valid input. // - ASSERT ((DevicePath != NULL && InputHiiHandle == NULL) || + // The input parameter DevicePath or InputHiiHandle must have one valid input. + // + ASSERT ((DevicePath != NULL && InputHiiHandle == NULL) || (DevicePath == NULL && InputHiiHandle != NULL) ); GetTheVal = TRUE; @@ -2441,7 +2441,7 @@ GetQuestionValueFromForm ( } } else { HiiHandle = InputHiiHandle; - } + } ASSERT (HiiHandle != NULL); // @@ -2457,7 +2457,7 @@ GetQuestionValueFromForm ( // // Base on the Question Id to get the question info. - // + // Question = IdToQuestion(FormSet, NULL, QuestionId); if (Question == NULL) { GetTheVal = FALSE; @@ -2480,7 +2480,7 @@ GetQuestionValueFromForm ( Form = NULL; } ASSERT (Form != NULL); - + // // Get the question value. // @@ -2491,7 +2491,7 @@ GetQuestionValueFromForm ( } CopyMem (Value, &Question->HiiValue, sizeof (EFI_HII_VALUE)); - + Done: // // Clean the formset structure and restore the global parameter. @@ -2499,7 +2499,7 @@ Done: if (FormSet != NULL) { DestroyFormSet (FormSet); } - + return GetTheVal; } @@ -2705,7 +2705,7 @@ EvaluateExpression ( TempBuffer [Index/2] = (UINT8) ((DigitUint8 << 4) + TempBuffer [Index/2]); } } - } + } } } break; @@ -2804,7 +2804,7 @@ EvaluateExpression ( if (EFI_ERROR (Status)) { goto Done; } - + // // Validate the expression value // @@ -3017,14 +3017,14 @@ EvaluateExpression ( // // When converting from a string, if case-insensitive compare // with "true" is True, then push True. If a case-insensitive compare - // with "false" is True, then push False. Otherwise, push Undefined. + // with "false" is True, then push False. Otherwise, push Undefined. // StrPtr = GetToken (Value->Value.string, FormSet->HiiHandle); if (StrPtr == NULL) { Status = EFI_INVALID_PARAMETER; goto Done; } - + IfrStrToUpper (StrPtr); if (StrCmp (StrPtr, L"TRUE") == 0){ Value->Value.b = TRUE; @@ -3038,11 +3038,11 @@ EvaluateExpression ( FreePool (StrPtr); } else if (Value->Type == EFI_IFR_TYPE_BUFFER) { // - // When converting from a buffer, if the buffer is all zeroes, - // then push False. Otherwise push True. + // When converting from a buffer, if the buffer is all zeroes, + // then push False. Otherwise push True. // for (Index =0; Index < Value->BufferLen; Index ++) { - if (Value->Buffer[Index] != 0) { + if (Value->Buffer[Index] != 0) { break; } } @@ -3379,15 +3379,15 @@ EvaluateExpression ( goto Done; } - if (Data2.Type > EFI_IFR_TYPE_BOOLEAN && - Data2.Type != EFI_IFR_TYPE_STRING && + if (Data2.Type > EFI_IFR_TYPE_BOOLEAN && + Data2.Type != EFI_IFR_TYPE_STRING && !IsTypeInBuffer(&Data2)) { Value->Type = EFI_IFR_TYPE_UNDEFINED; break; } - if (Data1.Type > EFI_IFR_TYPE_BOOLEAN && - Data1.Type != EFI_IFR_TYPE_STRING && + if (Data1.Type > EFI_IFR_TYPE_BOOLEAN && + Data1.Type != EFI_IFR_TYPE_STRING && !IsTypeInBuffer(&Data1)) { Value->Type = EFI_IFR_TYPE_UNDEFINED; break; @@ -3400,7 +3400,7 @@ EvaluateExpression ( if (Data2.Type == EFI_IFR_TYPE_BUFFER) { FreePool (Data2.Buffer); } - + if (Status == EFI_UNSUPPORTED) { Value->Type = EFI_IFR_TYPE_UNDEFINED; Status = EFI_SUCCESS; @@ -3446,7 +3446,7 @@ EvaluateExpression ( if (EFI_ERROR (Status)) { goto Done; } - + Status = IfrMatch (FormSet, Value); break; @@ -3624,7 +3624,7 @@ Done: /** Check whether the result is TRUE or FALSE. - + For the EFI_HII_VALUE value type is numeric, return TRUE if the value is not 0. @@ -3661,20 +3661,20 @@ IsTrue ( } /** - Return the result of the expression list. Check the expression list and - return the highest priority express result. + Return the result of the expression list. Check the expression list and + return the highest priority express result. Priority: DisableIf > SuppressIf > GrayOutIf > FALSE @param ExpList The input expression list. @param Evaluate Whether need to evaluate the expression first. @param FormSet FormSet associated with this expression. - @param Form Form associated with this expression. + @param Form Form associated with this expression. - @retval EXPRESS_RESULT Return the higher priority express result. + @retval EXPRESS_RESULT Return the higher priority express result. DisableIf > SuppressIf > GrayOutIf > FALSE **/ -EXPRESS_RESULT +EXPRESS_RESULT EvaluateExpressionList ( IN FORM_EXPRESSION_LIST *ExpList, IN BOOLEAN Evaluate, @@ -3697,7 +3697,7 @@ EvaluateExpressionList ( // // Check whether need to evaluate the expression first. // - if (Evaluate) { + if (Evaluate) { while (ExpList->Count > Index) { Status = EvaluateExpression (FormSet, Form, ExpList->Expression[Index++]); if (EFI_ERROR (Status)) { @@ -3726,12 +3726,12 @@ EvaluateExpressionList ( break; default: - return ExpressFalse; + return ExpressFalse; } ReturnVal = ReturnVal < CompareOne ? CompareOne : ReturnVal; } } - + return ReturnVal; } diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Expression.h b/MdeModulePkg/Universal/SetupBrowserDxe/Expression.h index 5660a997b8..6968a5b7c6 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Expression.h +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Expression.h @@ -1,7 +1,7 @@ /** @file Private structure, MACRO and function definitions for User Interface related functionalities. -Copyright (c) 2004 - 2013, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -17,15 +17,15 @@ WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. /** Get the expression list count. - - @param Level Which type this expression belong to. Form, + + @param Level Which type this expression belong to. Form, statement or option? @retval >=0 The expression count @retval -1 Input parameter error. **/ -INTN +INTN GetConditionalExpressionCount ( IN EXPRESS_LEVEL Level ); @@ -74,8 +74,8 @@ PushScope ( /** Get the expression Buffer pointer. - - @param Level Which type this expression belong to. Form, + + @param Level Which type this expression belong to. Form, statement or option? @retval The start pointer of the expression buffer or NULL. @@ -144,7 +144,7 @@ ExtendValueToU64 ( Push the expression options onto the Stack. @param Pointer Pointer to the current expression. - @param Level Which type this expression belong to. Form, + @param Level Which type this expression belong to. Form, statement or option? @retval EFI_SUCCESS The value was pushed onto the stack. @@ -160,7 +160,7 @@ PushConditionalExpression ( /** Pop the expression options from the Stack - @param Level Which type this expression belong to. Form, + @param Level Which type this expression belong to. Form, statement or option? @retval EFI_SUCCESS The value was pushed onto the stack. @@ -225,20 +225,20 @@ EvaluateExpression ( IN OUT FORM_EXPRESSION *Expression ); /** - Return the result of the expression list. Check the expression list and - return the highest priority express result. + Return the result of the expression list. Check the expression list and + return the highest priority express result. Priority: DisableIf > SuppressIf > GrayOutIf > FALSE @param ExpList The input expression list. @param Evaluate Whether need to evaluate the expression first. @param FormSet FormSet associated with this expression. - @param Form Form associated with this expression. + @param Form Form associated with this expression. - @retval EXPRESS_RESULT Return the higher priority express result. + @retval EXPRESS_RESULT Return the higher priority express result. DisableIf > SuppressIf > GrayOutIf > FALSE **/ -EXPRESS_RESULT +EXPRESS_RESULT EvaluateExpressionList ( IN FORM_EXPRESSION_LIST *ExpList, IN BOOLEAN Evaluate, diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c b/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c index 9bda482a4a..3d28e7aa50 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/IfrParse.c @@ -1,7 +1,7 @@ /** @file Parser for IFR binary encoding. -Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -37,7 +37,7 @@ CreateStatement ( { FORM_BROWSER_STATEMENT *Statement; EFI_IFR_STATEMENT_HEADER *StatementHdr; - INTN ConditionalExprCount; + INTN ConditionalExprCount; if (Form == NULL) { // @@ -70,8 +70,8 @@ CreateStatement ( // // Form is inside of suppressif // - - Statement->Expression = (FORM_EXPRESSION_LIST *) AllocatePool( + + Statement->Expression = (FORM_EXPRESSION_LIST *) AllocatePool( (UINTN) (sizeof(FORM_EXPRESSION_LIST) + ((ConditionalExprCount -1) * sizeof(FORM_EXPRESSION *)))); ASSERT (Statement->Expression != NULL); Statement->Expression->Count = (UINTN) ConditionalExprCount; @@ -246,7 +246,7 @@ CreateQuestion ( // Check whether old string node already exist. // Find = FALSE; - if (!IsListEmpty(&Statement->Storage->NameValueListHead)) { + if (!IsListEmpty(&Statement->Storage->NameValueListHead)) { Link = GetFirstNode (&Statement->Storage->NameValueListHead); while (!IsNull (&Statement->Storage->NameValueListHead, Link)) { NameValueNode = NAME_VALUE_NODE_FROM_LINK (Link); @@ -326,7 +326,7 @@ InitializeConfigHdr ( { CHAR16 *Name; - if (Storage->BrowserStorage->Type == EFI_HII_VARSTORE_BUFFER || + if (Storage->BrowserStorage->Type == EFI_HII_VARSTORE_BUFFER || Storage->BrowserStorage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER) { Name = Storage->BrowserStorage->Name; } else { @@ -621,7 +621,7 @@ GetFstStgFromVarId ( @param Storage browser storage info. @return Pointer to a FORMSET_STORAGE data structure. - + **/ FORMSET_STORAGE * @@ -707,7 +707,7 @@ InitializeRequestElement ( // // Prepare // - if (Storage->Type == EFI_HII_VARSTORE_BUFFER || + if (Storage->Type == EFI_HII_VARSTORE_BUFFER || Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER) { StrLen = UnicodeSPrint ( RequestElement, @@ -1522,7 +1522,7 @@ ParseOpCodes ( ExpressionOpCode->ValueType = ((EFI_IFR_GET *) OpCodeData)->VarStoreType; switch (ExpressionOpCode->ValueType) { case EFI_IFR_TYPE_BOOLEAN: - case EFI_IFR_TYPE_NUM_SIZE_8: + case EFI_IFR_TYPE_NUM_SIZE_8: ExpressionOpCode->ValueWidth = 1; break; @@ -1563,8 +1563,8 @@ ParseOpCodes ( } CopyMem (&ExpressionOpCode->VarStoreInfo.VarName, &((EFI_IFR_GET *) OpCodeData)->VarStoreInfo.VarName, sizeof (EFI_STRING_ID)); CopyMem (&ExpressionOpCode->VarStoreInfo.VarOffset, &((EFI_IFR_GET *) OpCodeData)->VarStoreInfo.VarOffset, sizeof (UINT16)); - if ((ExpressionOpCode->VarStorage != NULL) && - (ExpressionOpCode->VarStorage->Type == EFI_HII_VARSTORE_NAME_VALUE || + if ((ExpressionOpCode->VarStorage != NULL) && + (ExpressionOpCode->VarStorage->Type == EFI_HII_VARSTORE_NAME_VALUE || ExpressionOpCode->VarStorage->Type == EFI_HII_VARSTORE_EFI_VARIABLE)) { ExpressionOpCode->ValueName = GetToken (ExpressionOpCode->VarStoreInfo.VarName, FormSet->HiiHandle); if (ExpressionOpCode->ValueName == NULL) { @@ -1754,7 +1754,7 @@ ParseOpCodes ( // // Form is inside of suppressif // - CurrentForm->SuppressExpression = (FORM_EXPRESSION_LIST *) AllocatePool( + CurrentForm->SuppressExpression = (FORM_EXPRESSION_LIST *) AllocatePool( (UINTN) (sizeof(FORM_EXPRESSION_LIST) + ((ConditionalExprCount -1) * sizeof(FORM_EXPRESSION *)))); ASSERT (CurrentForm->SuppressExpression != NULL); CurrentForm->SuppressExpression->Count = (UINTN) ConditionalExprCount; @@ -1820,7 +1820,7 @@ ParseOpCodes ( // // Form is inside of suppressif // - CurrentForm->SuppressExpression = (FORM_EXPRESSION_LIST *) AllocatePool( + CurrentForm->SuppressExpression = (FORM_EXPRESSION_LIST *) AllocatePool( (UINTN) (sizeof(FORM_EXPRESSION_LIST) + ((ConditionalExprCount -1) * sizeof(FORM_EXPRESSION *)))); ASSERT (CurrentForm->SuppressExpression != NULL); CurrentForm->SuppressExpression->Count = (UINTN) ConditionalExprCount; @@ -1972,7 +1972,7 @@ ParseOpCodes ( } } } - CurrentStatement->StorageWidth = (UINT16) sizeof (EFI_HII_REF); + CurrentStatement->StorageWidth = (UINT16) sizeof (EFI_HII_REF); InitializeRequestElement (FormSet, CurrentStatement, CurrentForm); break; @@ -2282,7 +2282,7 @@ ParseOpCodes ( // // Form is inside of suppressif // - CurrentOption->SuppressExpression = (FORM_EXPRESSION_LIST *) AllocatePool( + CurrentOption->SuppressExpression = (FORM_EXPRESSION_LIST *) AllocatePool( (UINTN) (sizeof(FORM_EXPRESSION_LIST) + ((ConditionalExprCount -1) * sizeof(FORM_EXPRESSION *)))); ASSERT (CurrentOption->SuppressExpression != NULL); CurrentOption->SuppressExpression->Count = (UINTN) ConditionalExprCount; @@ -2396,11 +2396,11 @@ ParseOpCodes ( } if (SuppressForOption) { - PushConditionalExpression(CurrentExpression, ExpressOption); + PushConditionalExpression(CurrentExpression, ExpressOption); } else if (SuppressForQuestion) { - PushConditionalExpression(CurrentExpression, ExpressStatement); + PushConditionalExpression(CurrentExpression, ExpressStatement); } else { - PushConditionalExpression(CurrentExpression, ExpressForm); + PushConditionalExpression(CurrentExpression, ExpressForm); } // @@ -2655,7 +2655,7 @@ ParseOpCodes ( default: ASSERT (ParentStatement != NULL); ParentStatement->Locked = TRUE; - } + } break; // @@ -2679,7 +2679,7 @@ ParseOpCodes ( ResetScopeStack (); return Status; } - + // // Parent statement end tag found, update ParentStatement info. // @@ -2722,7 +2722,7 @@ ParseOpCodes ( case EFI_IFR_SUPPRESS_IF_OP: if (SuppressForOption) { - PopConditionalExpression(ExpressOption); + PopConditionalExpression(ExpressOption); } else if (SuppressForQuestion) { PopConditionalExpression(ExpressStatement); } else { diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c index 97713ebb60..ded1c7ad11 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Presentation.c @@ -1,7 +1,7 @@ /** @file Utility functions for UI presentation. -Copyright (c) 2004 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2004 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2015 Hewlett Packard Enterprise Development LP
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -74,7 +74,7 @@ EvaluateFormExpressions ( Base on the opcode buffer info to get the display statement. @param OpCode The input opcode buffer for this statement. - + @retval Statement The statement use this opcode buffer. **/ @@ -103,7 +103,7 @@ GetDisplayStatement ( Free the refresh event list. **/ -VOID +VOID FreeRefreshEvent ( VOID ) @@ -123,7 +123,7 @@ FreeRefreshEvent ( } /** - Check whether this statement value is changed. If yes, update the statement value and return TRUE; + Check whether this statement value is changed. If yes, update the statement value and return TRUE; else return FALSE. @param Statement The statement need to check. @@ -145,7 +145,7 @@ UpdateStatement ( // Question value may be changed, need invoke its Callback() // ProcessCallBackFunction (gCurrentSelection, gCurrentSelection->FormSet, gCurrentSelection->Form, Statement, EFI_BROWSER_ACTION_RETRIEVE, FALSE); - + if (mHiiPackageListUpdated) { // // Package list is updated, force to reparse IFR binary of target Formset @@ -157,8 +157,8 @@ UpdateStatement ( /** Refresh the question which has refresh guid event attribute. - - @param Event The event which has this function related. + + @param Event The event which has this function related. @param Context The input context info related to this event or the status code return to the caller. **/ VOID @@ -177,7 +177,7 @@ RefreshEventNotifyForStatement( /** Refresh the questions within this form. - + @param Event The event which has this function related. @param Context The input context info related to this event or the status code return to the caller. **/ @@ -450,11 +450,11 @@ UpdateHotkeyList ( @param QuestionId The question id for this request question. - @retval The attribute for this question or NULL if not found this + @retval The attribute for this question or NULL if not found this question in the list. **/ -UINT32 +UINT32 ProcessQuestionExtraAttr ( IN EFI_QUESTION_ID QuestionId ) @@ -588,7 +588,7 @@ AddStatementToDisplayForm ( // // Get the minimal refresh interval value for later use. // - if ((Statement->RefreshInterval != 0) && + if ((Statement->RefreshInterval != 0) && (MinRefreshInterval == 0 || Statement->RefreshInterval < MinRefreshInterval)) { MinRefreshInterval = Statement->RefreshInterval; } @@ -649,7 +649,7 @@ UpdateDataChangedFlag ( // // Base on the system level to check whether need to show the NV flag. - // + // switch (gBrowserSettingScope) { case SystemLevel: // @@ -700,13 +700,13 @@ InitializeDisplayFormData ( InitializeListHead (&gDisplayFormData.HotKeyListHead); Status = gBS->CreateEvent ( - EVT_NOTIFY_WAIT, + EVT_NOTIFY_WAIT, TPL_CALLBACK, EfiEventEmptyFunction, NULL, &mValueChangedEvent ); - ASSERT_EFI_ERROR (Status); + ASSERT_EFI_ERROR (Status); } /** @@ -863,7 +863,7 @@ GetBrowserStatement ( @param Form Form data structure. **/ -VOID +VOID UpdateStatementStatusForForm ( IN FORM_BROWSER_FORMSET *FormSet, IN FORM_BROWSER_FORM *Form @@ -894,7 +894,7 @@ UpdateStatementStatusForForm ( @param FormSet FormSet data structure. **/ -VOID +VOID UpdateStatementStatusForFormSet ( IN FORM_BROWSER_FORMSET *FormSet ) @@ -919,10 +919,10 @@ UpdateStatementStatusForFormSet ( @param SettingScope Setting Scope for Default action. **/ -VOID +VOID UpdateStatementStatus ( IN FORM_BROWSER_FORMSET *FormSet, - IN FORM_BROWSER_FORM *Form, + IN FORM_BROWSER_FORM *Form, IN BROWSER_SETTING_SCOPE SettingScope ) { @@ -966,7 +966,7 @@ UpdateStatementStatus ( @retval EFI_SUCESSS This function always return successfully for now. **/ -EFI_STATUS +EFI_STATUS ProcessAction ( IN UINT32 Action, IN UINT16 DefaultId @@ -1051,7 +1051,7 @@ GetFormsetGuidFromHiiHandle ( BufferSize = 0; HiiPackageList = NULL; FindGuid = FALSE; - + Status = mHiiDatabase->ExportPackageLists (mHiiDatabase, HiiHandle, &BufferSize, HiiPackageList); if (Status == EFI_BUFFER_TOO_SMALL) { HiiPackageList = AllocatePool (BufferSize); @@ -1068,7 +1068,7 @@ GetFormsetGuidFromHiiHandle ( // Offset = sizeof (EFI_HII_PACKAGE_LIST_HEADER); Offset2 = 0; - CopyMem (&PackageListLength, &HiiPackageList->PackageLength, sizeof (UINT32)); + CopyMem (&PackageListLength, &HiiPackageList->PackageLength, sizeof (UINT32)); while (Offset < PackageListLength) { Package = ((UINT8 *) HiiPackageList) + Offset; @@ -1257,7 +1257,7 @@ ProcessChangedData ( case BROWSER_ACTION_DISCARD: DiscardForm (Selection->FormSet, Selection->Form, Scope); break; - + case BROWSER_ACTION_SUBMIT: Status = SubmitForm (Selection->FormSet, Selection->Form, Scope); if (EFI_ERROR (Status)) { @@ -1331,7 +1331,7 @@ ProcessGotoOpCode ( FORM_BROWSER_FORM *RefForm; EFI_STATUS Status; EFI_HII_HANDLE HiiHandle; - + Status = EFI_SUCCESS; StringPtr = NULL; HiiHandle = NULL; @@ -1440,7 +1440,7 @@ ProcessGotoOpCode ( if ((RefForm != NULL) && (RefForm->SuppressExpression != NULL)) { if (EvaluateExpressionList(RefForm->SuppressExpression, TRUE, Selection->FormSet, RefForm) != ExpressFalse) { // - // Form is suppressed. + // Form is suppressed. // PopupErrorMessage(BROWSER_FORM_SUPPRESS, NULL, NULL, NULL); return EFI_SUCCESS; @@ -1565,14 +1565,14 @@ ProcessUserInput ( case EFI_IFR_REF_OP: Status = ProcessGotoOpCode(Statement, gCurrentSelection); break; - + case EFI_IFR_ACTION_OP: // // Process the Config string // Status = ProcessQuestionConfig (gCurrentSelection, Statement); break; - + case EFI_IFR_RESET_BUTTON_OP: // // Reset Question to default value specified by DefaultId @@ -1812,9 +1812,9 @@ IsNvUpdateRequiredForForm ( about the Selection, form and formset to be displayed. On output, Selection return the screen item that is selected by user. - @param SettingLevel Input Settting level, if it is FormLevel, just exit current form. + @param SettingLevel Input Settting level, if it is FormLevel, just exit current form. else, we need to exit current formset. - + @retval TRUE Exit current form. @retval FALSE User press ESC and keep in current form. **/ @@ -1827,7 +1827,7 @@ FindNextMenu ( FORM_ENTRY_INFO *CurrentMenu; FORM_ENTRY_INFO *ParentMenu; BROWSER_SETTING_SCOPE Scope; - + CurrentMenu = Selection->CurrentMenu; Scope = FormSetLevel; @@ -1893,7 +1893,7 @@ FindNextMenu ( @retval TRUE do the reconnect behavior success. @retval FALSE do the reconnect behavior failed. - + **/ BOOLEAN ReconnectController ( @@ -1926,7 +1926,7 @@ ReconnectController ( @retval EFI_SUCCESS The call back function executes successfully. @return Other value if the call back function failed to execute. **/ -EFI_STATUS +EFI_STATUS ProcessCallBackFunction ( IN OUT UI_MENU_SELECTION *Selection, IN FORM_BROWSER_FORMSET *FormSet, @@ -1976,7 +1976,7 @@ ProcessCallBackFunction ( if ((Question != NULL) && (Statement != Question)) { continue; } - + if ((Statement->QuestionFlags & EFI_IFR_FLAG_CALLBACK) != EFI_IFR_FLAG_CALLBACK) { continue; } @@ -2104,7 +2104,7 @@ ProcessCallBackFunction ( // IsQuestionValueChanged(gCurrentSelection->FormSet, gCurrentSelection->Form, Statement, GetSetValueWithEditBuffer); // - // According the spec, return value from call back of "changing" and + // According the spec, return value from call back of "changing" and // "retrieve" should update to the question's temp buffer. // SetQuestionValue(FormSet, Form, Statement, GetSetValueWithEditBuffer); @@ -2113,7 +2113,7 @@ ProcessCallBackFunction ( case EFI_BROWSER_ACTION_RETRIEVE: // - // According the spec, return value from call back of "changing" and + // According the spec, return value from call back of "changing" and // "retrieve" should update to the question's temp buffer. // SetQuestionValue(FormSet, Form, Statement, GetSetValueWithEditBuffer); @@ -2124,9 +2124,9 @@ ProcessCallBackFunction ( } } else { // - // If the callback returns EFI_UNSUPPORTED for EFI_BROWSER_ACTION_CHANGING, - // then the browser will use the value passed to Callback() and ignore the - // value returned by Callback(). + // If the callback returns EFI_UNSUPPORTED for EFI_BROWSER_ACTION_CHANGING, + // then the browser will use the value passed to Callback() and ignore the + // value returned by Callback(). // if (Action == EFI_BROWSER_ACTION_CHANGING && Status == EFI_UNSUPPORTED) { if (HiiValue->Type == EFI_IFR_TYPE_BUFFER) { @@ -2134,7 +2134,7 @@ ProcessCallBackFunction ( } else { CopyMem (&HiiValue->Value, &BackUpValue, sizeof (EFI_IFR_TYPE_VALUE)); } - + // // Do the question validation. // @@ -2150,7 +2150,7 @@ ProcessCallBackFunction ( } // - // According the spec, return fail from call back of "changing" and + // According the spec, return fail from call back of "changing" and // "retrieve", should restore the question's value. // if (Action == EFI_BROWSER_ACTION_CHANGING && Status != EFI_UNSUPPORTED) { @@ -2226,8 +2226,8 @@ ProcessCallBackFunction ( /** Call the retrieve type call back function for one question to get the initialize data. - - This function only used when in the initialize stage, because in this stage, the + + This function only used when in the initialize stage, because in this stage, the Selection->Form is not ready. For other case, use the ProcessCallBackFunction instead. @param ConfigAccess The config access protocol produced by the hii driver. @@ -2237,7 +2237,7 @@ ProcessCallBackFunction ( @retval EFI_SUCCESS The call back function executes successfully. @return Other value if the call back function failed to execute. **/ -EFI_STATUS +EFI_STATUS ProcessRetrieveForQuestion ( IN EFI_HII_CONFIG_ACCESS_PROTOCOL *ConfigAccess, IN FORM_BROWSER_STATEMENT *Statement, @@ -2265,7 +2265,7 @@ ProcessRetrieveForQuestion ( // TypeValue = (EFI_IFR_TYPE_VALUE *) Statement->BufferValue; } - + ActionRequest = EFI_BROWSER_ACTION_REQUEST_NONE; Status = ConfigAccess->Callback ( ConfigAccess, @@ -2357,7 +2357,7 @@ SetupBrowser ( // // IFR is updated, force to reparse the IFR binary - // This check is shared by EFI_BROWSER_ACTION_FORM_CLOSE and + // This check is shared by EFI_BROWSER_ACTION_FORM_CLOSE and // EFI_BROWSER_ACTION_RETRIEVE, so code place here. // if (mHiiPackageListUpdated) { @@ -2395,7 +2395,7 @@ SetupBrowser ( if (Selection->Form->SuppressExpression != NULL) { if (EvaluateExpressionList(Selection->Form->SuppressExpression, TRUE, Selection->FormSet, Selection->Form) == ExpressSuppress) { // - // Form is suppressed. + // Form is suppressed. // PopupErrorMessage(BROWSER_FORM_SUPPRESS, NULL, NULL, NULL); Status = EFI_NOT_FOUND; @@ -2484,8 +2484,8 @@ SetupBrowser ( // Statement = Selection->Statement; if (Statement != NULL) { - if ((ConfigAccess != NULL) && - ((Statement->QuestionFlags & EFI_IFR_FLAG_CALLBACK) == EFI_IFR_FLAG_CALLBACK) && + if ((ConfigAccess != NULL) && + ((Statement->QuestionFlags & EFI_IFR_FLAG_CALLBACK) == EFI_IFR_FLAG_CALLBACK) && (Statement->Operand != EFI_IFR_PASSWORD_OP)) { Status = ProcessCallBackFunction(Selection, Selection->FormSet, Selection->Form, Statement, EFI_BROWSER_ACTION_CHANGING, FALSE); if (Statement->Operand == EFI_IFR_REF_OP) { @@ -2495,7 +2495,7 @@ SetupBrowser ( if (!EFI_ERROR (Status)) { Status = ProcessGotoOpCode(Statement, Selection); } - + // // Callback return error status or status return from process goto opcode. // @@ -2512,8 +2512,8 @@ SetupBrowser ( } - if (!EFI_ERROR (Status) && - (Statement->Operand != EFI_IFR_REF_OP) && + if (!EFI_ERROR (Status) && + (Statement->Operand != EFI_IFR_REF_OP) && ((Statement->Storage == NULL) || (Statement->Storage != NULL && Statement->ValueChanged))) { // // Only question value has been changed, browser will trig CHANGED callback. @@ -2540,11 +2540,11 @@ SetupBrowser ( } // - // If question has EFI_IFR_FLAG_RESET_REQUIRED/EFI_IFR_FLAG_RECONNECT_REQUIRED flag and without storage + // If question has EFI_IFR_FLAG_RESET_REQUIRED/EFI_IFR_FLAG_RECONNECT_REQUIRED flag and without storage // and process question success till here, trig the gResetFlag/gFlagReconnect. // - if ((Status == EFI_SUCCESS) && - (Statement->Storage == NULL)) { + if ((Status == EFI_SUCCESS) && + (Statement->Storage == NULL)) { if ((Statement->QuestionFlags & EFI_IFR_FLAG_RESET_REQUIRED) != 0) { gResetRequiredFormLevel = TRUE; gResetRequiredSystemLevel = TRUE; @@ -2581,8 +2581,8 @@ SetupBrowser ( // Before exit the form, invoke ConfigAccess.Callback() with EFI_BROWSER_ACTION_FORM_CLOSE // for each question with callback flag. // - if ((ConfigAccess != NULL) && - ((Selection->Action == UI_ACTION_EXIT) || + if ((ConfigAccess != NULL) && + ((Selection->Action == UI_ACTION_EXIT) || (Selection->Handle != mCurrentHiiHandle) || (!CompareGuid (&Selection->FormSetGuid, &mCurrentFormSetGuid)) || (Selection->FormId != mCurrentFormId))) { diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c index c2cfa5c5c8..922219a58e 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.c @@ -1,7 +1,7 @@ /** @file Entry and initialization module for the browser. -Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -152,7 +152,7 @@ GetFirstFormId ( **/ FORM_ENTRY_INFO * UiFindMenuList ( - IN EFI_HII_HANDLE HiiHandle, + IN EFI_HII_HANDLE HiiHandle, IN EFI_GUID *FormSetGuid, IN UINT16 FormId ) @@ -168,7 +168,7 @@ UiFindMenuList ( while (!IsNull (&mPrivateData.FormBrowserEx2.FormViewHistoryHead, Link)) { MenuList = FORM_ENTRY_INFO_FROM_LINK (Link); Link = GetNextNode (&mPrivateData.FormBrowserEx2.FormViewHistoryHead, Link); - + // // If already find the menu, free the menus behind it. // @@ -208,7 +208,7 @@ UiFindMenuList ( @param CurrentMenu Current Menu @param SettingLevel Whether find parent menu in Form Level or Formset level. - In form level, just find the parent menu; + In form level, just find the parent menu; In formset level, find the parent menu which has different formset guid value. @@ -228,7 +228,7 @@ UiFindParentMenu ( if (CurrentMenu == NULL) { return NULL; } - + ParentMenu = NULL; Link = &CurrentMenu->Link; @@ -285,7 +285,7 @@ UiFreeMenuList ( /** Copy current Menu list to the new menu list. - + @param NewMenuListHead New create Menu list. @param CurrentMenuListHead Current Menu list. @@ -622,7 +622,7 @@ SendForm ( distribution. **/ -EFI_STATUS +EFI_STATUS ProcessStorage ( IN OUT UINTN *ResultsDataSize, IN OUT EFI_STRING *ResultsData, @@ -696,8 +696,8 @@ ProcessStorage ( } /** - This routine called this service in the browser to retrieve or set certain uncommitted - state information that resides in the open formsets. + This routine called this service in the browser to retrieve or set certain uncommitted + state information that resides in the open formsets. @param This A pointer to the EFI_FORM_BROWSER2_PROTOCOL instance. @@ -801,7 +801,7 @@ BrowserCallback ( // // Different formsets may have same varstore, so here just set the flag // not exit the circle. - // + // Found = TRUE; break; } @@ -826,7 +826,7 @@ BrowserCallback ( } FormsetStorage = FORMSET_STORAGE_FROM_LINK (Link); - + Status = ProcessStorage (&TotalSize, &ResultsData, RetrieveData, FormsetStorage->BrowserStorage); if (EFI_ERROR (Status)) { return Status; @@ -837,7 +837,7 @@ BrowserCallback ( Status = TotalSize <= *ResultsDataSize ? EFI_SUCCESS : EFI_BUFFER_TOO_SMALL; *ResultsDataSize = TotalSize; } - + return Status; } @@ -936,7 +936,7 @@ InitializeSetup ( &mPrivateData.FormBrowserEx2 ); ASSERT_EFI_ERROR (Status); - + Status = gBS->InstallProtocolInterface ( &mPrivateData.Handle, &gEdkiiFormBrowserExProtocolGuid, @@ -962,7 +962,7 @@ InitializeSetup ( &Registration ); } - + return EFI_SUCCESS; } @@ -1465,7 +1465,7 @@ BufferToValue ( Buffer = NULL; IsString = (BOOLEAN) ((Question->HiiValue.Type == EFI_IFR_TYPE_STRING) ? TRUE : FALSE); - if (Question->Storage->Type == EFI_HII_VARSTORE_BUFFER || + if (Question->Storage->Type == EFI_HII_VARSTORE_BUFFER || Question->Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER) { IsBufferStorage = TRUE; } else { @@ -1620,17 +1620,17 @@ GetQuestionValue ( FreePool (Question->ValueExpression->Result.Buffer); } Question->HiiValue.Type = Question->ValueExpression->Result.Type; - CopyMem (&Question->HiiValue.Value, &Question->ValueExpression->Result.Value, sizeof (EFI_IFR_TYPE_VALUE)); + CopyMem (&Question->HiiValue.Value, &Question->ValueExpression->Result.Value, sizeof (EFI_IFR_TYPE_VALUE)); } return Status; } - + // // Get question value by read expression. // if (Question->ReadExpression != NULL && Form->FormType == STANDARD_MAP_FORM_TYPE) { Status = EvaluateExpression (FormSet, Form, Question->ReadExpression); - if (!EFI_ERROR (Status) && + if (!EFI_ERROR (Status) && ((Question->ReadExpression->Result.Type < EFI_IFR_TYPE_OTHER) || (Question->ReadExpression->Result.Type == EFI_IFR_TYPE_BUFFER))) { // // Only update question value to the valid result. @@ -1647,7 +1647,7 @@ GetQuestionValue ( FreePool (Question->ReadExpression->Result.Buffer); } Question->HiiValue.Type = Question->ReadExpression->Result.Type; - CopyMem (&Question->HiiValue.Value, &Question->ReadExpression->Result.Value, sizeof (EFI_IFR_TYPE_VALUE)); + CopyMem (&Question->HiiValue.Value, &Question->ReadExpression->Result.Value, sizeof (EFI_IFR_TYPE_VALUE)); return EFI_SUCCESS; } } @@ -1748,7 +1748,7 @@ GetQuestionValue ( Dst = (UINT8 *) &Question->HiiValue.Value; } - if (Storage->Type == EFI_HII_VARSTORE_BUFFER || + if (Storage->Type == EFI_HII_VARSTORE_BUFFER || Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER) { IsBufferStorage = TRUE; } else { @@ -1933,7 +1933,7 @@ SetQuestionValue ( if (Question->ValueExpression != NULL) { return Status; } - + // // Before set question value, evaluate its write expression. // @@ -2028,7 +2028,7 @@ SetQuestionValue ( Src = (UINT8 *) &Question->HiiValue.Value; } - if (Storage->Type == EFI_HII_VARSTORE_BUFFER || + if (Storage->Type == EFI_HII_VARSTORE_BUFFER || Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER) { IsBufferStorage = TRUE; } else { @@ -2199,7 +2199,7 @@ SetQuestionValue ( return Status; } FreePool (ConfigResp); - + // // Sync storage, from editbuffer to buffer. // @@ -2322,9 +2322,9 @@ ValidateQuestion ( } /** - Perform question check. - - If one question has more than one check, process form high priority to low. + Perform question check. + + If one question has more than one check, process form high priority to low. Only one error info will be popup. @param FormSet FormSet data structure. @@ -2425,7 +2425,7 @@ NoSubmitCheck ( @param Storage The storage which need to sync. @param ConfigRequest The config request string which used to sync storage. - @param SyncOrRestore Sync the buffer to editbuffer or Restore the + @param SyncOrRestore Sync the buffer to editbuffer or Restore the editbuffer to buffer if TRUE, copy the editbuffer to the buffer. if FALSE, copy the buffer to the editbuffer. @@ -2452,7 +2452,7 @@ SynchronizeStorage ( Status = EFI_SUCCESS; Result = NULL; - if (Storage->Type == EFI_HII_VARSTORE_BUFFER || + if (Storage->Type == EFI_HII_VARSTORE_BUFFER || (Storage->Type == EFI_HII_VARSTORE_EFI_VARIABLE_BUFFER)) { BufferSize = Storage->Size; @@ -2787,7 +2787,7 @@ UpdateFlagForForm ( if ((Question->QuestionFlags & EFI_IFR_FLAG_RECONNECT_REQUIRED) != 0) { gFlagReconnect = TRUE; } - } + } } } @@ -2796,7 +2796,7 @@ UpdateFlagForForm ( Also clean ValueChanged flag for all statements. Form level or formset level, only one. - + @param SetFlag Whether need to set the Reset Flag. @param FormSet FormSet data structure. @param Form Form data structure. @@ -2806,7 +2806,7 @@ VOID ValueChangeResetFlagUpdate ( IN BOOLEAN SetFlag, IN FORM_BROWSER_FORMSET *FormSet, - IN FORM_BROWSER_FORM *Form + IN FORM_BROWSER_FORM *Form ) { FORM_BROWSER_FORM *CurrentForm; @@ -2827,8 +2827,8 @@ ValueChangeResetFlagUpdate ( } /** - Base on the return Progress string to find the form. - + Base on the return Progress string to find the form. + Base on the first return Offset/Width (Name) string to find the form which keep this string. @@ -3109,9 +3109,9 @@ ConfirmSaveFail ( ASSERT (StringBuffer != NULL); UnicodeSPrint ( - StringBuffer, - 24 * sizeof (CHAR16) + StrSize (FormTitle), - L"Submit Fail For Form: %s.", + StringBuffer, + 24 * sizeof (CHAR16) + StrSize (FormTitle), + L"Submit Fail For Form: %s.", FormTitle ); @@ -3148,9 +3148,9 @@ ConfirmNoSubmitFail ( ASSERT (StringBuffer != NULL); UnicodeSPrint ( - StringBuffer, - 24 * sizeof (CHAR16) + StrSize (FormTitle), - L"NO_SUBMIT_IF error For Form: %s.", + StringBuffer, + 24 * sizeof (CHAR16) + StrSize (FormTitle), + L"NO_SUBMIT_IF error For Form: %s.", FormTitle ); @@ -3251,7 +3251,7 @@ DiscardForm ( while (!IsNull (&FormSet->FormListHead, Link)) { Form = FORM_BROWSER_FORM_FROM_LINK (Link); Link = GetNextNode (&FormSet->FormListHead, Link); - + // // Call callback with Changed type to inform the driver. // @@ -3292,7 +3292,7 @@ DiscardForm ( mSystemLevelFormSet = OldFormSet; } - return EFI_SUCCESS; + return EFI_SUCCESS; } /** @@ -3441,9 +3441,9 @@ SubmitForForm ( @param FormSet FormSet data structure. @param SkipProcessFail Whether skip to process the save failed storage. - If submit formset is called when do system level save, - set this value to true and process the failed formset - together. + If submit formset is called when do system level save, + set this value to true and process the failed formset + together. if submit formset is called when do formset level save, set the value to false and process the failed storage right after process all storages for this formset. @@ -3478,7 +3478,7 @@ SubmitForFormSet ( return EFI_SUCCESS; } - Form = NULL; + Form = NULL; Status = NoSubmitCheck (FormSet, &Form, &Question); if (EFI_ERROR (Status)) { if (SkipProcessFail) { @@ -3639,7 +3639,7 @@ SubmitForFormSet ( // // 5. Update the NV flag. - // + // ValueChangeResetFlagUpdate(TRUE, FormSet, NULL); // @@ -3690,7 +3690,7 @@ SubmitForSystem ( // // Remove maintain backup list after save except for the current using FormSet. - // + // if (!IsHiiHandleInBrowserContext (LocalFormSet->HiiHandle)) { CleanBrowserStorage(LocalFormSet); RemoveEntryList (&LocalFormSet->Link); @@ -3937,7 +3937,7 @@ GetOffsetFromConfigResp ( RequestElement += StrLen (Question->BlockName) + StrLen (L"&VALUE="); return RequestElement; } - + // // 2. Change all hex digits in Question->BlockName to lower and compare again. // @@ -3973,7 +3973,7 @@ GetDefaultValueFromAltCfg ( IN FORM_BROWSER_FORM *Form, IN OUT FORM_BROWSER_STATEMENT *Question ) -{ +{ BROWSER_STORAGE *Storage; FORMSET_STORAGE *FormSetStorage; CHAR16 *ConfigResp; @@ -4039,7 +4039,7 @@ INTN GetDefaultIdForCallBack ( UINTN DefaultId ) -{ +{ if (DefaultId == EFI_HII_DEFAULT_CLASS_STANDARD) { return EFI_BROWSER_ACTION_DEFAULT_STANDARD; } else if (DefaultId == EFI_HII_DEFAULT_CLASS_MANUFACTURING) { @@ -4240,7 +4240,7 @@ GetQuestionDefault ( // There are Five ways to specify default value for a Question: // 1, use call back function (highest priority) // 2, use ExtractConfig function - // 3, use nested EFI_IFR_DEFAULT + // 3, use nested EFI_IFR_DEFAULT // 4, set flags of EFI_ONE_OF_OPTION (provide Standard and Manufacturing default) // 5, set flags of EFI_IFR_CHECKBOX (provide Standard and Manufacturing default) (lowest priority) // @@ -4291,7 +4291,7 @@ ReGetDefault: // // Get default value from altcfg string. // - if (ConfigAccess != NULL) { + if (ConfigAccess != NULL) { Status = GetDefaultValueFromAltCfg(FormSet, Form, Question); if (!EFI_ERROR (Status)) { return Status; @@ -4328,7 +4328,7 @@ ReGetDefault: FreePool (Default->ValueExpression->Result.Buffer); } HiiValue->Type = Default->ValueExpression->Result.Type; - CopyMem (&HiiValue->Value, &Default->ValueExpression->Result.Value, sizeof (EFI_IFR_TYPE_VALUE)); + CopyMem (&HiiValue->Value, &Default->ValueExpression->Result.Value, sizeof (EFI_IFR_TYPE_VALUE)); } else { // // Default value is embedded in EFI_IFR_DEFAULT @@ -4467,7 +4467,7 @@ ReGetDefault: } break; default: - break; + break; } } else { if ((HiiValue->Value.u64 < Question->Minimum) || (HiiValue->Value.u64 > Question->Maximum)) { @@ -4776,7 +4776,7 @@ CleanAltCfgForFormSet ( /** Reset Questions to their initial value or default value in a Form, Formset or System. - GetDefaultValueScope parameter decides which questions will reset + GetDefaultValueScope parameter decides which questions will reset to its default value. @param FormSet FormSet data structure. @@ -5067,7 +5067,7 @@ IsQuestionValueChanged ( /** Initialize Question's Edit copy from Storage. - @param Selection Selection contains the information about + @param Selection Selection contains the information about the Selection, form and formset to be displayed. Selection action may be updated in retrieve callback. If Selection is NULL, only initialize Question value. @@ -5087,7 +5087,7 @@ LoadFormConfig ( EFI_STATUS Status; LIST_ENTRY *Link; FORM_BROWSER_STATEMENT *Question; - + Link = GetFirstNode (&Form->StatementListHead); while (!IsNull (&Form->StatementListHead, Link)) { Question = FORM_BROWSER_STATEMENT_FROM_LINK (Link); @@ -5117,7 +5117,7 @@ LoadFormConfig ( /** Initialize Question's Edit copy from Storage for the whole Formset. - @param Selection Selection contains the information about + @param Selection Selection contains the information about the Selection, form and formset to be displayed. Selection action may be updated in retrieve callback. If Selection is NULL, only initialize Question value. @@ -5153,7 +5153,7 @@ LoadFormSetConfig ( // // Finished question initialization. - // + // FormSet->QuestionInited = TRUE; return EFI_SUCCESS; @@ -5189,8 +5189,8 @@ RemoveElement ( DestStr = NewStr; NewStr += StrLen (RequestElement); CopyMem (DestStr, NewStr, StrSize (NewStr)); - - Storage->SpareStrLen += StrLen (RequestElement); + + Storage->SpareStrLen += StrLen (RequestElement); } /** @@ -5235,7 +5235,7 @@ RemoveConfigRequest ( if (Storage->BrowserStorage->Type == EFI_HII_VARSTORE_NAME_VALUE) { RequestElement = StrStr (ConfigRequest, L"PATH"); ASSERT (RequestElement != NULL); - RequestElement = StrStr (RequestElement, SearchKey); + RequestElement = StrStr (RequestElement, SearchKey); } else { RequestElement = StrStr (ConfigRequest, SearchKey); } @@ -5305,7 +5305,7 @@ CleanBrowserStorage ( RemoveConfigRequest (Storage, Storage->ConfigRequest); } else if (Storage->BrowserStorage->Type == EFI_HII_VARSTORE_BUFFER || Storage->BrowserStorage->Type == EFI_HII_VARSTORE_NAME_VALUE) { - if (Storage->BrowserStorage->ConfigRequest != NULL) { + if (Storage->BrowserStorage->ConfigRequest != NULL) { FreePool (Storage->BrowserStorage->ConfigRequest); Storage->BrowserStorage->ConfigRequest = NULL; } @@ -5324,7 +5324,7 @@ CleanBrowserStorage ( @retval FALSE The Element not in the configReqeust String. **/ -BOOLEAN +BOOLEAN ElementValidation ( BROWSER_STORAGE *BrowserStorage, CHAR16 *RequestElement @@ -5391,7 +5391,7 @@ AppendConfigRequest ( @retval FALSE All elements covered by current used elements. **/ -BOOLEAN +BOOLEAN ConfigRequestAdjust ( IN BROWSER_STORAGE *Storage, IN CHAR16 *Request, @@ -5440,7 +5440,7 @@ ConfigRequestAdjust ( if (Storage->Type == EFI_HII_VARSTORE_NAME_VALUE) { RequestElement = StrStr (ConfigRequest, L"PATH"); ASSERT (RequestElement != NULL); - RequestElement = StrStr (RequestElement, SearchKey); + RequestElement = StrStr (RequestElement, SearchKey); } else { RequestElement = StrStr (ConfigRequest, SearchKey); } @@ -5476,7 +5476,7 @@ ConfigRequestAdjust ( *NextRequestElement = L'\0'; } } - + if (!ElementValidation (Storage, RequestElement)) { // // Add this element to the Storage->BrowserStorage->AllRequestElement. @@ -5545,7 +5545,7 @@ LoadStorage ( } // - // Just update the ConfigRequest, if storage already initialized. + // Just update the ConfigRequest, if storage already initialized. // if (Storage->BrowserStorage->Initialized) { ConfigRequestAdjust(Storage->BrowserStorage, Storage->ConfigRequest, FALSE); @@ -5569,9 +5569,9 @@ LoadStorage ( ConfigRequest = AllocateZeroPool (StrLen); ASSERT (ConfigRequest != NULL); UnicodeSPrint ( - ConfigRequest, - StrLen, - L"%s&OFFSET=0&WIDTH=%04x", + ConfigRequest, + StrLen, + L"%s&OFFSET=0&WIDTH=%04x", Storage->ConfigHdr, Storage->BrowserStorage->Size); } else { @@ -5601,7 +5601,7 @@ LoadStorage ( if (StrPtr != NULL) { *StrPtr = L'\0'; } - + Status = ConfigRespToStorage (Storage->BrowserStorage, Result); FreePool (Result); } @@ -5609,7 +5609,7 @@ LoadStorage ( Storage->BrowserStorage->ConfigRequest = AllocateCopyPool (StrSize (Storage->ConfigRequest), Storage->ConfigRequest); // - // Input NULL for ConfigRequest field means sync all fields from editbuffer to buffer. + // Input NULL for ConfigRequest field means sync all fields from editbuffer to buffer. // SynchronizeStorage(Storage->BrowserStorage, NULL, TRUE); @@ -5737,7 +5737,7 @@ InitializeCurrentSetting ( // // Extract default from IFR binary for no storage questions. - // + // ExtractDefault (FormSet, NULL, EFI_HII_DEFAULT_CLASS_STANDARD, FormSetLevel, GetDefaultForNoStorage, NULL, TRUE, FALSE); // @@ -5989,7 +5989,7 @@ InitializeFormSet ( /** - Save globals used by previous call to SendForm(). SendForm() may be called from + Save globals used by previous call to SendForm(). SendForm() may be called from HiiConfigAccess.Callback(), this will cause SendForm() be reentried. So, save globals of previous call to SendForm() and restore them upon exit. @@ -6134,13 +6134,13 @@ RestoreBrowserContext ( /** Find the matched FormSet context in the backup maintain list based on HiiHandle. - + @param Handle The Hii Handle. - + @return the found FormSet context. If no found, NULL will return. **/ -FORM_BROWSER_FORMSET * +FORM_BROWSER_FORMSET * GetFormSetFromHiiHandle ( EFI_HII_HANDLE Handle ) @@ -6159,15 +6159,15 @@ GetFormSetFromHiiHandle ( return FormSet; } } - + return NULL; } /** Check whether the input HII handle is the FormSet that is being used. - + @param Handle The Hii Handle. - + @retval TRUE HII handle is being used. @retval FALSE HII handle is not being used. @@ -6201,20 +6201,20 @@ IsHiiHandleInBrowserContext ( } Link = GetNextNode (&gBrowserContextList, Link); } - + return FALSE; } /** - Perform Password check. + Perform Password check. Passwork may be encrypted by driver that requires the specific check. - + @param Form Form where Password Statement is in. @param Statement Password statement @param PasswordString Password string to be checked. It may be NULL. NULL means to restore password. "" string can be used to checked whether old password does exist. - + @return Status Status of Password check. **/ EFI_STATUS @@ -6245,7 +6245,7 @@ PasswordCheck ( // return EFI_UNSUPPORTED; } - + // // Prepare password string in HII database // @@ -6279,7 +6279,7 @@ PasswordCheck ( /** Find the registered HotKey based on KeyData. - + @param[in] KeyData A pointer to a buffer that describes the keystroke information for the hot key. @@ -6301,7 +6301,7 @@ GetHotKeyFromRegisterList ( } Link = GetNextNode (&gBrowserHotKeyList, Link); } - + return NULL; } @@ -6310,11 +6310,11 @@ GetHotKeyFromRegisterList ( All hot keys have the same scope. The mixed hot keys with the different level are not supported. If no scope is set, the default scope will be FormSet level. After all registered hot keys are removed, previous Scope can reset to another level. - - @param[in] Scope Scope level to be set. - + + @param[in] Scope Scope level to be set. + @retval EFI_SUCCESS Scope is set correctly. - @retval EFI_INVALID_PARAMETER Scope is not the valid value specified in BROWSER_SETTING_SCOPE. + @retval EFI_INVALID_PARAMETER Scope is not the valid value specified in BROWSER_SETTING_SCOPE. @retval EFI_UNSPPORTED Scope level is different from current one that the registered hot keys have. **/ @@ -6347,15 +6347,15 @@ SetScope ( Only support hot key that is not printable character (control key, function key, etc.). If the action value is zero, the hot key will be unregistered if it has been registered. If the same hot key has been registered, the new action and help string will override the previous ones. - + @param[in] KeyData A pointer to a buffer that describes the keystroke - information for the hot key. Its type is EFI_INPUT_KEY to + information for the hot key. Its type is EFI_INPUT_KEY to be supported by all ConsoleIn devices. - @param[in] Action Action value that describes what action will be trigged when the hot key is pressed. + @param[in] Action Action value that describes what action will be trigged when the hot key is pressed. @param[in] DefaultId Specifies the type of defaults to retrieve, which is only for DEFAULT action. @param[in] HelpString Help string that describes the hot key information. Its value may be NULL for the unregistered hot key. - + @retval EFI_SUCCESS Hot key is registered or unregistered. @retval EFI_INVALID_PARAMETER KeyData is NULL or HelpString is NULL on register. @retval EFI_NOT_FOUND KeyData is not found to be unregistered. @@ -6376,7 +6376,7 @@ RegisterHotKey ( // // Check input parameters. // - if (KeyData == NULL || KeyData->UnicodeChar != CHAR_NULL || + if (KeyData == NULL || KeyData->UnicodeChar != CHAR_NULL || (Action != BROWSER_ACTION_UNREGISTER && HelpString == NULL)) { return EFI_INVALID_PARAMETER; } @@ -6385,14 +6385,14 @@ RegisterHotKey ( // Check whether the input KeyData is in BrowserHotKeyList. // HotKey = GetHotKeyFromRegisterList (KeyData); - + // // Unregister HotKey // if (Action == BROWSER_ACTION_UNREGISTER) { if (HotKey != NULL) { // - // The registered HotKey is found. + // The registered HotKey is found. // Remove it from List, and free its resource. // RemoveEntryList (&HotKey->Link); @@ -6401,7 +6401,7 @@ RegisterHotKey ( return EFI_SUCCESS; } else { // - // The registered HotKey is not found. + // The registered HotKey is not found. // return EFI_NOT_FOUND; } @@ -6434,11 +6434,11 @@ RegisterHotKey ( } /** - Register Exit handler function. - When more than one handler function is registered, the latter one will override the previous one. - When NULL handler is specified, the previous Exit handler will be unregistered. - - @param[in] Handler Pointer to handler function. + Register Exit handler function. + When more than one handler function is registered, the latter one will override the previous one. + When NULL handler is specified, the previous Exit handler will be unregistered. + + @param[in] Handler Pointer to handler function. **/ VOID @@ -6510,7 +6510,7 @@ IsBrowserDataModified ( @retval EFI_INVALID_PARAMETER The input action value is invalid. **/ -EFI_STATUS +EFI_STATUS EFIAPI ExecuteAction ( IN UINT32 Action, @@ -6530,7 +6530,7 @@ ExecuteAction ( Form = NULL; if (gBrowserSettingScope < SystemLevel) { FormSet = gCurrentSelection->FormSet; - Form = gCurrentSelection->Form; + Form = gCurrentSelection->Form; } // @@ -6625,16 +6625,16 @@ SaveReminder ( break; } } - + // - // No data is changed. No save is required. + // No data is changed. No save is required. // if (!IsDataChanged) { return DataSavedAction; } - + // - // If data is changed, prompt user to save or discard it. + // If data is changed, prompt user to save or discard it. // do { ConfirmRet = (UINT32) mFormDisplay->ConfirmDataChange(); diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.h b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.h index 09e0be7494..4dd7176ba5 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/Setup.h +++ b/MdeModulePkg/Universal/SetupBrowserDxe/Setup.h @@ -1,7 +1,7 @@ /** @file Private MACRO, structure and function definitions for Setup Browser module. -Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -271,7 +271,7 @@ typedef struct { typedef struct { UINTN Signature; LIST_ENTRY Link; - + EFI_IFR_ONE_OF_OPTION *OpCode; // OneOfOption Data EFI_STRING_ID Text; @@ -286,14 +286,14 @@ typedef struct { typedef enum { ExpressFalse = 0, - ExpressGrayOut, + ExpressGrayOut, ExpressSuppress, ExpressDisable } EXPRESS_RESULT; typedef enum { ExpressNone = 0, - ExpressForm, + ExpressForm, ExpressStatement, ExpressOption } EXPRESS_LEVEL; @@ -390,7 +390,7 @@ typedef struct { CHAR16 *ConfigRequest; // = + CHAR16 *ConfigAltResp; // Alt config response string for this ConfigRequest. - UINTN ElementCount; // Number of in the + UINTN ElementCount; // Number of in the UINTN SpareStrLen; CHAR16 *RestoreConfigRequest; // When submit form fail, the element need to be restored CHAR16 *SyncConfigRequest; // When submit form fail, the element need to be synced @@ -773,10 +773,10 @@ ValidateFormSet ( @param SettingScope Setting Scope for Default action. **/ -VOID +VOID UpdateStatementStatus ( IN FORM_BROWSER_FORMSET *FormSet, - IN FORM_BROWSER_FORM *Form, + IN FORM_BROWSER_FORM *Form, IN BROWSER_SETTING_SCOPE SettingScope ); @@ -922,13 +922,13 @@ EFI_STATUS InitializeFormSet ( IN EFI_HII_HANDLE Handle, IN OUT EFI_GUID *FormSetGuid, - OUT FORM_BROWSER_FORMSET *FormSet + OUT FORM_BROWSER_FORMSET *FormSet ); /** Reset Questions to their initial value or default value in a Form, Formset or System. - GetDefaultValueScope parameter decides which questions will reset + GetDefaultValueScope parameter decides which questions will reset to its default value. @param FormSet FormSet data structure. @@ -961,7 +961,7 @@ ExtractDefault ( /** Initialize Question's Edit copy from Storage. - @param Selection Selection contains the information about + @param Selection Selection contains the information about the Selection, form and formset to be displayed. Selection action may be updated in retrieve callback. If Selection is NULL, only initialize Question value. @@ -981,7 +981,7 @@ LoadFormConfig ( /** Initialize Question's Edit copy from Storage for the whole Formset. - @param Selection Selection contains the information about + @param Selection Selection contains the information about the Selection, form and formset to be displayed. Selection action may be updated in retrieve callback. If Selection is NULL, only initialize Question value. @@ -1071,7 +1071,7 @@ GetIfrBinaryData ( ); /** - Save globals used by previous call to SendForm(). SendForm() may be called from + Save globals used by previous call to SendForm(). SendForm() may be called from HiiConfigAccess.Callback(), this will cause SendForm() be reentried. So, save globals of previous call to SendForm() and restore them upon exit. @@ -1175,9 +1175,9 @@ BrowserCallback ( about the Selection, form and formset to be displayed. On output, Selection return the screen item that is selected by user. - @param SettingLevel Input Settting level, if it is FormLevel, just exit current form. + @param SettingLevel Input Settting level, if it is FormLevel, just exit current form. else, we need to exit current formset. - + @retval TRUE Exit current form. @retval FALSE User press ESC and keep in current form. **/ @@ -1229,7 +1229,7 @@ IsNvUpdateRequiredForFormSet ( @retval EFI_SUCCESS The call back function executes successfully. @return Other value if the call back function failed to execute. **/ -EFI_STATUS +EFI_STATUS ProcessCallBackFunction ( IN OUT UI_MENU_SELECTION *Selection, IN FORM_BROWSER_FORMSET *FormSet, @@ -1238,11 +1238,11 @@ ProcessCallBackFunction ( IN EFI_BROWSER_ACTION Action, IN BOOLEAN SkipSaveOrDiscard ); - + /** Call the retrieve type call back function for one question to get the initialize data. - - This function only used when in the initialize stage, because in this stage, the + + This function only used when in the initialize stage, because in this stage, the Selection->Form is not ready. For other case, use the ProcessCallBackFunction instead. @param ConfigAccess The config access protocol produced by the hii driver. @@ -1252,7 +1252,7 @@ ProcessCallBackFunction ( @retval EFI_SUCCESS The call back function executes successfully. @return Other value if the call back function failed to execute. **/ -EFI_STATUS +EFI_STATUS ProcessRetrieveForQuestion ( IN EFI_HII_CONFIG_ACCESS_PROTOCOL *ConfigAccess, IN FORM_BROWSER_STATEMENT *Statement, @@ -1261,22 +1261,22 @@ ProcessRetrieveForQuestion ( /** Find the matched FormSet context in the backup maintain list based on HiiHandle. - + @param Handle The Hii Handle. - + @return the found FormSet context. If no found, NULL will return. **/ -FORM_BROWSER_FORMSET * +FORM_BROWSER_FORMSET * GetFormSetFromHiiHandle ( EFI_HII_HANDLE Handle ); /** Check whether the input HII handle is the FormSet that is being used. - + @param Handle The Hii Handle. - + @retval TRUE HII handle is being used. @retval FALSE HII handle is not being used. @@ -1291,11 +1291,11 @@ IsHiiHandleInBrowserContext ( All hot keys have the same scope. The mixed hot keys with the different level are not supported. If no scope is set, the default scope will be FormSet level. After all registered hot keys are removed, previous Scope can reset to another level. - - @param[in] Scope Scope level to be set. - + + @param[in] Scope Scope level to be set. + @retval EFI_SUCCESS Scope is set correctly. - @retval EFI_INVALID_PARAMETER Scope is not the valid value specified in BROWSER_SETTING_SCOPE. + @retval EFI_INVALID_PARAMETER Scope is not the valid value specified in BROWSER_SETTING_SCOPE. @retval EFI_UNSPPORTED Scope level is different from current one that the registered hot keys have. **/ @@ -1310,15 +1310,15 @@ SetScope ( Only support hot key that is not printable character (control key, function key, etc.). If the action value is zero, the hot key will be unregistered if it has been registered. If the same hot key has been registered, the new action and help string will override the previous ones. - + @param[in] KeyData A pointer to a buffer that describes the keystroke - information for the hot key. Its type is EFI_INPUT_KEY to + information for the hot key. Its type is EFI_INPUT_KEY to be supported by all ConsoleIn devices. - @param[in] Action Action value that describes what action will be trigged when the hot key is pressed. + @param[in] Action Action value that describes what action will be trigged when the hot key is pressed. @param[in] DefaultId Specifies the type of defaults to retrieve, which is only for DEFAULT action. @param[in] HelpString Help string that describes the hot key information. Its value may be NULL for the unregistered hot key. - + @retval EFI_SUCCESS Hot key is registered or unregistered. @retval EFI_INVALID_PARAMETER KeyData is NULL. @retval EFI_NOT_FOUND KeyData is not found to be unregistered. @@ -1335,11 +1335,11 @@ RegisterHotKey ( ); /** - Register Exit handler function. - When more than one handler function is registered, the latter one will override the previous one. - When NULL handler is specified, the previous Exit handler will be unregistered. - - @param[in] Handler Pointer to handler function. + Register Exit handler function. + When more than one handler function is registered, the latter one will override the previous one. + When NULL handler is specified, the previous Exit handler will be unregistered. + + @param[in] Handler Pointer to handler function. **/ VOID @@ -1349,22 +1349,22 @@ RegiserExitHandler ( ); /** - - Check whether the browser data has been modified. + + Check whether the browser data has been modified. @retval TRUE Browser data is changed. @retval FALSE No browser data is changed. **/ -BOOLEAN +BOOLEAN EFIAPI IsBrowserDataModified ( VOID ); /** - - Execute the action requested by the Action parameter. + + Execute the action requested by the Action parameter. @param[in] Action Execute the request action. @param[in] DefaultId The default Id info when need to load default value. @@ -1373,7 +1373,7 @@ IsBrowserDataModified ( @retval EFI_INVALID_PARAMETER The input action value is invalid. **/ -EFI_STATUS +EFI_STATUS EFIAPI ExecuteAction ( IN UINT32 Action, @@ -1411,7 +1411,7 @@ IsResetRequired ( /** Find the registered HotKey based on KeyData. - + @param[in] KeyData A pointer to a buffer that describes the keystroke information for the hot key. @@ -1435,7 +1435,7 @@ FORM_BROWSER_STATEMENT * GetBrowserStatement ( IN FORM_DISPLAY_ENGINE_STATEMENT *DisplayStatement ); - + /** Password may be stored as encrypted by Configuration Driver. When change a password, user will be challenged with old password. To validate user input old @@ -1495,7 +1495,7 @@ EFI_STATUS SetupBrowser ( IN OUT UI_MENU_SELECTION *Selection ); - + /** Free up the resource allocated for all strings required by Setup Browser. @@ -1538,7 +1538,7 @@ UiAddMenuList ( **/ FORM_ENTRY_INFO * UiFindMenuList ( - IN EFI_HII_HANDLE HiiHandle, + IN EFI_HII_HANDLE HiiHandle, IN EFI_GUID *FormSetGuid, IN UINT16 FormId ); @@ -1559,7 +1559,7 @@ UiFreeMenuList ( @param CurrentMenu Current Menu @param SettingLevel Whether find parent menu in Form Level or Formset level. - In form level, just find the parent menu; + In form level, just find the parent menu; In formset level, find the parent menu which has different formset guid value. @@ -1570,7 +1570,7 @@ UiFindParentMenu ( IN FORM_ENTRY_INFO *CurrentMenu, IN BROWSER_SETTING_SCOPE SettingLevel ); - + /** Validate the HiiHandle. @@ -1587,7 +1587,7 @@ ValidateHiiHandle ( /** Copy current Menu list to the new menu list. - + @param NewMenuListHead New create Menu list. @param CurrentMenuListHead Current Menu list. @@ -1649,7 +1649,7 @@ SetArrayData ( /** Compare two Hii value. - + @param Value1 Expression value to compare on left-hand. @param Value2 Expression value to compare on right-hand. @param Result Return value after compare. @@ -1657,10 +1657,10 @@ SetArrayData ( return Positive value if Value1 is greater than Value2. retval Negative value if Value1 is less than Value2. @param HiiHandle Only required for string compare. - + @retval other Could not perform compare on two values. @retval EFI_SUCCESS Compare the value success. - + **/ EFI_STATUS CompareHiiValue ( @@ -1671,15 +1671,15 @@ CompareHiiValue ( ); /** - Perform Password check. + Perform Password check. Passwork may be encrypted by driver that requires the specific check. - + @param Form Form where Password Statement is in. @param Statement Password statement @param PasswordString Password string to be checked. It may be NULL. NULL means to restore password. "" string can be used to checked whether old password does exist. - + @return Status Status of Password check. **/ EFI_STATUS @@ -1703,7 +1703,7 @@ FORM_BROWSER_STATEMENT * GetBrowserStatement ( IN FORM_DISPLAY_ENGINE_STATEMENT *DisplayStatement ); - + /** Initialize the Display form structure data. @@ -1757,7 +1757,7 @@ DevicePathToHiiHandle ( @retval FALSE All elements covered by current used elements. **/ -BOOLEAN +BOOLEAN ConfigRequestAdjust ( IN BROWSER_STORAGE *Storage, IN CHAR16 *Request, @@ -1765,8 +1765,8 @@ ConfigRequestAdjust ( ); /** - Perform question check. - + Perform question check. + If one question has more than one check, process form high priority to low. @param FormSet FormSet data structure. @@ -1843,7 +1843,7 @@ GetFstStgFromVarId ( @param Storage browser storage info. @return Pointer to a FORMSET_STORAGE data structure. - + **/ FORMSET_STORAGE * @@ -1858,7 +1858,7 @@ GetFstStgFromBrsStg ( @retval TRUE do the reconnect behavior success. @retval FALSE do the reconnect behavior failed. - + **/ BOOLEAN ReconnectController ( diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowser.uni b/MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowser.uni index 4d158360ef..c81126e96a 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowser.uni +++ b/MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowser.uni @@ -3,13 +3,13 @@ // // It also produces FormBrowserEx(2) protocol to let user register the different Hot key service. // -// Copyright (c) 2007 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf b/MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf index f7b53ea1d2..4f847d4061 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf +++ b/MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserDxe.inf @@ -1,9 +1,9 @@ ## @file # The DXE driver produces FORM BROWSER2 protocol defined in UEFI specification. # -# It also produces FormBrowserEx(2) protocol to let user register the different Hot key service. +# It also produces FormBrowserEx(2) protocol to let user register the different Hot key service. # -# Copyright (c) 2007 - 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2007 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License diff --git a/MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserExtra.uni b/MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserExtra.uni index b456e2a54c..73c924a369 100644 --- a/MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserExtra.uni +++ b/MdeModulePkg/Universal/SetupBrowserDxe/SetupBrowserExtra.uni @@ -1,7 +1,7 @@ // /** @file // SetupBrowser Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Setup Browser DXE Driver" diff --git a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c b/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c index 4e757e1c47..78955f3a56 100644 --- a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c +++ b/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.c @@ -1,15 +1,15 @@ /** @file - This code produces the Smbios protocol. It also responsible for constructing + This code produces the Smbios protocol. It also responsible for constructing SMBIOS table into system table. - -Copyright (c) 2009 - 2017, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -165,7 +165,7 @@ SMBIOS_TABLE_3_0_ENTRY_POINT Smbios30EntryPointStructureData = { @retval EFI_SUCCESS Size retured in Size. @retval EFI_INVALID_PARAMETER Input SMBIOS structure mal-formed or Size is NULL. - + **/ EFI_STATUS EFIAPI @@ -180,7 +180,7 @@ GetSmbiosStructureSize ( UINTN StrLen; UINTN MaxLen; INT8* CharInStr; - + if (Size == NULL || NumberOfStrings == NULL) { return EFI_INVALID_PARAMETER; } @@ -193,7 +193,7 @@ GetSmbiosStructureSize ( // // look for the two consecutive zeros, check the string limit by the way. // - while (*CharInStr != 0 || *(CharInStr+1) != 0) { + while (*CharInStr != 0 || *(CharInStr+1) != 0) { if (*CharInStr == 0) { *Size += 1; CharInStr++; @@ -251,7 +251,7 @@ GetSmbiosStructureSize ( @retval TRUE Smbios handle already in use. @retval FALSE Smbios handle is NOT used. - + **/ BOOLEAN EFIAPI @@ -262,7 +262,7 @@ CheckSmbiosHandleExistance ( { LIST_ENTRY *Link; SMBIOS_HANDLE_ENTRY *HandleEntry; - + for (Link = Head->ForwardLink; Link != Head; Link = Link->ForwardLink) { HandleEntry = SMBIOS_HANDLE_ENTRY_FROM_LINK(Link); if (HandleEntry->SmbiosHandle == Handle) { @@ -286,7 +286,7 @@ EFIAPI GetMaxSmbiosHandle ( IN CONST EFI_SMBIOS_PROTOCOL *This, IN OUT EFI_SMBIOS_HANDLE *MaxHandle - ) + ) { if (This->MajorVersion == 2 && This->MinorVersion == 0) { *MaxHandle = 0xFFFE; @@ -304,7 +304,7 @@ GetMaxSmbiosHandle ( @retval EFI_SUCCESS Smbios handle got. @retval EFI_OUT_OF_RESOURCES Smbios handle is NOT available. - + **/ EFI_STATUS EFIAPI @@ -343,8 +343,8 @@ GetAvailableSmbiosHandle ( will be assigned to the SMBIOS record. If the SMBIOS handle is already in use, EFI_ALREADY_STARTED is returned and the SMBIOS record is not updated. @param Record The data for the fixed portion of the SMBIOS record. The format of the record is - determined by EFI_SMBIOS_TABLE_HEADER.Type. The size of the formatted area is defined - by EFI_SMBIOS_TABLE_HEADER.Length and either followed by a double-null (0x0000) or + determined by EFI_SMBIOS_TABLE_HEADER.Type. The size of the formatted area is defined + by EFI_SMBIOS_TABLE_HEADER.Length and either followed by a double-null (0x0000) or a set of null terminated strings and a null. @retval EFI_SUCCESS Record was added. @@ -375,11 +375,11 @@ SmbiosAdd ( EFI_SMBIOS_RECORD_HEADER *InternalRecord; BOOLEAN Smbios32BitTable; BOOLEAN Smbios64BitTable; - + if (SmbiosHandle == NULL) { return EFI_INVALID_PARAMETER; } - + Private = SMBIOS_INSTANCE_FROM_THIS (This); // // Check whether SmbiosHandle is already in use @@ -417,14 +417,14 @@ SmbiosAdd ( Smbios32BitTable = FALSE; Smbios64BitTable = FALSE; - if ((This->MajorVersion < 0x3) || + if ((This->MajorVersion < 0x3) || ((This->MajorVersion >= 0x3) && ((PcdGet32 (PcdSmbiosEntryPointProvideMethod) & BIT0) == BIT0))) { // // For SMBIOS 32-bit table, the length of the entire structure table (including all strings) must be reported // in the Structure Table Length field of the SMBIOS Structure Table Entry Point, // which is a WORD field limited to 65,535 bytes. So the max size of 32-bit table should not exceed 65,535 bytes. // - if ((EntryPointStructure != NULL) && + if ((EntryPointStructure != NULL) && (EntryPointStructure->TableLength + StructureSize > SMBIOS_TABLE_MAX_LENGTH)) { DEBUG ((EFI_D_INFO, "SmbiosAdd: Total length exceeds max 32-bit table length with type = %d size = 0x%x\n", Record->Type, StructureSize)); } else { @@ -432,7 +432,7 @@ SmbiosAdd ( DEBUG ((EFI_D_INFO, "SmbiosAdd: Smbios type %d with size 0x%x is added to 32-bit table\n", Record->Type, StructureSize)); } } - + // // For SMBIOS 3.0, Structure table maximum size in Entry Point structure is DWORD field limited to 0xFFFFFFFF bytes. // @@ -441,7 +441,7 @@ SmbiosAdd ( // For SMBIOS 64-bit table, Structure table maximum size in SMBIOS 3.0 (64-bit) Entry Point // is a DWORD field limited to 0xFFFFFFFF bytes. So the max size of 64-bit table should not exceed 0xFFFFFFFF bytes. // - if ((Smbios30EntryPointStructure != NULL) && + if ((Smbios30EntryPointStructure != NULL) && (Smbios30EntryPointStructure->TableMaximumSize + StructureSize > SMBIOS_3_0_TABLE_MAX_LENGTH)) { DEBUG ((EFI_D_INFO, "SmbiosAdd: Total length exceeds max 64-bit table length with type = %d size = 0x%x\n", Record->Type, StructureSize)); } else { @@ -459,12 +459,12 @@ SmbiosAdd ( // // Enter into critical section - // + // Status = EfiAcquireLockOrFail (&Private->DataLock); if (EFI_ERROR (Status)) { return Status; } - + RecordSize = sizeof (EFI_SMBIOS_RECORD_HEADER) + StructureSize; TotalSize = sizeof (EFI_SMBIOS_ENTRY) + RecordSize; @@ -520,7 +520,7 @@ SmbiosAdd ( // configuration table without depending on PI SMBIOS protocol. // SmbiosTableConstruction (Smbios32BitTable, Smbios64BitTable); - + // // Leave critical section // @@ -567,7 +567,7 @@ SmbiosUpdateString ( EFI_SMBIOS_HANDLE MaxSmbiosHandle; EFI_SMBIOS_TABLE_HEADER *Record; EFI_SMBIOS_RECORD_HEADER *InternalRecord; - + // // Check args validity // @@ -594,7 +594,7 @@ SmbiosUpdateString ( } else if (This->MajorVersion < 3) { // // Reference SMBIOS 2.7, chapter 6.1.3, it will have no limit on the length of each individual text string. - // However, the length of the entire structure table (including all strings) must be reported + // However, the length of the entire structure table (including all strings) must be reported // in the Structure Table Length field of the SMBIOS Structure Table Entry Point, // which is a WORD field limited to 65,535 bytes. // @@ -606,7 +606,7 @@ SmbiosUpdateString ( // // SMBIOS 3.0 defines the Structure table maximum size as DWORD field limited to 0xFFFFFFFF bytes. // The input string length should not exceed 0xFFFFFFFF bytes. - // + // return EFI_UNSUPPORTED; } } @@ -614,7 +614,7 @@ SmbiosUpdateString ( Private = SMBIOS_INSTANCE_FROM_THIS (This); // // Enter into critical section - // + // Status = EfiAcquireLockOrFail (&Private->DataLock); if (EFI_ERROR (Status)) { return Status; @@ -637,7 +637,7 @@ SmbiosUpdateString ( // Point to unformed string section // StrStart = (CHAR8 *) Record + Record->Length; - + for (StrIndex = 1, TargetStrOffset = 0; StrIndex < *StringNumber; StrStart++, TargetStrOffset++) { // // A string ends in 00h @@ -645,21 +645,21 @@ SmbiosUpdateString ( if (*StrStart == 0) { StrIndex++; } - + // // String section ends in double-null (0000h) // if (*StrStart == 0 && *(StrStart + 1) == 0) { EfiReleaseLock (&Private->DataLock); return EFI_NOT_FOUND; - } + } } if (*StrStart == 0) { StrStart++; TargetStrOffset++; } - + // // Now we get the string target // @@ -676,15 +676,15 @@ SmbiosUpdateString ( EfiReleaseLock (&Private->DataLock); return EFI_SUCCESS; } - + SmbiosEntry->Smbios32BitTable = FALSE; SmbiosEntry->Smbios64BitTable = FALSE; - if ((This->MajorVersion < 0x3) || + if ((This->MajorVersion < 0x3) || ((This->MajorVersion >= 0x3) && ((PcdGet32 (PcdSmbiosEntryPointProvideMethod) & BIT0) == BIT0))) { // // 32-bit table is produced, check the valid length. // - if ((EntryPointStructure != NULL) && + if ((EntryPointStructure != NULL) && (EntryPointStructure->TableLength + InputStrLen - TargetStrLen > SMBIOS_TABLE_MAX_LENGTH)) { // // The length of the entire structure table (including all strings) must be reported @@ -696,13 +696,13 @@ SmbiosUpdateString ( DEBUG ((EFI_D_INFO, "SmbiosUpdateString: New smbios record add to 32-bit table\n")); SmbiosEntry->Smbios32BitTable = TRUE; } - } + } if ((This->MajorVersion >= 0x3) && ((PcdGet32 (PcdSmbiosEntryPointProvideMethod) & BIT1) == BIT1)) { // // 64-bit table is produced, check the valid length. // - if ((Smbios30EntryPointStructure != NULL) && + if ((Smbios30EntryPointStructure != NULL) && (Smbios30EntryPointStructure->TableMaximumSize + InputStrLen - TargetStrLen > SMBIOS_3_0_TABLE_MAX_LENGTH)) { DEBUG ((EFI_D_INFO, "SmbiosUpdateString: Total length exceeds max 64-bit table length\n")); } else { @@ -818,7 +818,7 @@ SmbiosRemove ( Private = SMBIOS_INSTANCE_FROM_THIS (This); // // Enter into critical section - // + // Status = EfiAcquireLockOrFail (&Private->DataLock); if (EFI_ERROR (Status)) { return Status; @@ -833,7 +833,7 @@ SmbiosRemove ( // Remove specified smobios record from DataList // RemoveEntryList(Link); - // + // // Remove this handle from AllocatedHandleList // Head = &Private->AllocatedHandleListHead; @@ -872,7 +872,7 @@ SmbiosRemove ( // EfiReleaseLock (&Private->DataLock); return EFI_INVALID_PARAMETER; - + } /** @@ -882,13 +882,13 @@ SmbiosRemove ( @param SmbiosHandle On entry, points to the previous handle of the SMBIOS record. On exit, points to the next SMBIOS record handle. If it is FFFEh on entry, then the first SMBIOS record handle will be returned. If it returns FFFEh on exit, then there are no more SMBIOS records. - @param Type On entry it means return the next SMBIOS record of type Type. If a NULL is passed in + @param Type On entry it means return the next SMBIOS record of type Type. If a NULL is passed in this functionally it ignored. Type is not modified by the GetNext() function. @param Record On exit, points to the SMBIOS Record consisting of the formatted area followed by the unformatted area. The unformatted area optionally contains text strings. - @param ProducerHandle On exit, points to the ProducerHandle registered by Add(). If no ProducerHandle was passed into Add() NULL is returned. - If a NULL pointer is passed in no data will be returned - + @param ProducerHandle On exit, points to the ProducerHandle registered by Add(). If no ProducerHandle was passed into Add() NULL is returned. + If a NULL pointer is passed in no data will be returned + @retval EFI_SUCCESS SMBIOS record information was successfully returned in Record. @retval EFI_NOT_FOUND The SMBIOS record with SmbiosHandle was the last available record. @@ -919,14 +919,14 @@ SmbiosGetNext ( Head = &Private->DataListHead; for (Link = Head->ForwardLink; Link != Head; Link = Link->ForwardLink) { SmbiosEntry = SMBIOS_ENTRY_FROM_LINK(Link); - SmbiosTableHeader = (EFI_SMBIOS_TABLE_HEADER*)(SmbiosEntry->RecordHeader + 1); + SmbiosTableHeader = (EFI_SMBIOS_TABLE_HEADER*)(SmbiosEntry->RecordHeader + 1); // // If SmbiosHandle is 0xFFFE, the first matched SMBIOS record handle will be returned // if (*SmbiosHandle == SMBIOS_HANDLE_PI_RESERVED) { if ((Type != NULL) && (*Type != SmbiosTableHeader->Type)) { - continue; + continue; } *SmbiosHandle = SmbiosTableHeader->Handle; @@ -947,33 +947,33 @@ SmbiosGetNext ( if (StartPointFound) { if ((Type != NULL) && (*Type != SmbiosTableHeader->Type)) { - continue; + continue; } - + *SmbiosHandle = SmbiosTableHeader->Handle; - *Record = SmbiosTableHeader; + *Record = SmbiosTableHeader; if (ProducerHandle != NULL) { *ProducerHandle = SmbiosEntry->RecordHeader->ProducerHandle; } - return EFI_SUCCESS; + return EFI_SUCCESS; } } *SmbiosHandle = SMBIOS_HANDLE_PI_RESERVED; return EFI_NOT_FOUND; - + } /** Allow the caller to discover all of the SMBIOS records. @param This The EFI_SMBIOS_PROTOCOL instance. - @param CurrentSmbiosEntry On exit, points to the SMBIOS entry on the list which includes the returned SMBIOS record information. - If *CurrentSmbiosEntry is NULL on entry, then the first SMBIOS entry on the list will be returned. + @param CurrentSmbiosEntry On exit, points to the SMBIOS entry on the list which includes the returned SMBIOS record information. + If *CurrentSmbiosEntry is NULL on entry, then the first SMBIOS entry on the list will be returned. @param Record On exit, points to the SMBIOS Record consisting of the formatted area followed by the unformatted area. The unformatted area optionally contains text strings. - + @retval EFI_SUCCESS SMBIOS record information was successfully returned in Record. *CurrentSmbiosEntry points to the SMBIOS entry which includes the returned SMBIOS record information. @retval EFI_NOT_FOUND There is no more SMBIOS entry. @@ -1005,32 +1005,32 @@ GetNextSmbiosRecord ( // Head = &(*CurrentSmbiosEntry)->Link; } - + Link = Head->ForwardLink; - + if (Link == &Private->DataListHead) { // // If no more SMBIOS entry in the list, return not found. // return EFI_NOT_FOUND; } - + SmbiosEntry = SMBIOS_ENTRY_FROM_LINK(Link); SmbiosTableHeader = (EFI_SMBIOS_TABLE_HEADER*)(SmbiosEntry->RecordHeader + 1); - *Record = SmbiosTableHeader; + *Record = SmbiosTableHeader; *CurrentSmbiosEntry = SmbiosEntry; - return EFI_SUCCESS; + return EFI_SUCCESS; } /** Assembles SMBIOS table from the SMBIOS protocol. Produce Table Entry Point and return the pointer to it. - + @param TableEntryPointStructure On exit, points to the SMBIOS entrypoint structure. - + @retval EFI_SUCCESS Structure created sucessfully. @retval EFI_OUT_OF_RESOURCES No enough memory. - + **/ EFI_STATUS EFIAPI @@ -1048,7 +1048,7 @@ SmbiosCreateTable ( EFI_SMBIOS_TABLE_HEADER *SmbiosRecord; EFI_SMBIOS_TABLE_END_STRUCTURE EndStructure; EFI_SMBIOS_ENTRY *CurrentSmbiosEntry; - + Status = EFI_SUCCESS; BufferPointer = NULL; @@ -1081,9 +1081,9 @@ SmbiosCreateTable ( return EFI_OUT_OF_RESOURCES; } } - + EntryPointStructure = (SMBIOS_TABLE_ENTRY_POINT *) (UINTN) PhysicalAddress; - + CopyMem ( EntryPointStructure, &EntryPointStructureData, @@ -1109,7 +1109,7 @@ SmbiosCreateTable ( CurrentSmbiosEntry = NULL; do { Status = GetNextSmbiosRecord (SmbiosProtocol, &CurrentSmbiosEntry, &SmbiosRecord); - + if ((Status == EFI_SUCCESS) && (CurrentSmbiosEntry->Smbios32BitTable)) { GetSmbiosStructureSize(SmbiosProtocol, SmbiosRecord, &RecordSize, &NumOfStr); // @@ -1122,7 +1122,7 @@ SmbiosCreateTable ( } } } while (!EFI_ERROR(Status)); - + // // Create End-Of-Table structure // @@ -1140,15 +1140,15 @@ SmbiosCreateTable ( if (EFI_SIZE_TO_PAGES ((UINT32) EntryPointStructure->TableLength) > mPreAllocatedPages) { // - // If new SMBIOS table size exceeds the previous allocated page, + // If new SMBIOS table size exceeds the previous allocated page, // it is time to re-allocate memory (below 4GB). - // + // DEBUG ((EFI_D_INFO, "%a() re-allocate SMBIOS 32-bit table\n", __FUNCTION__)); if (EntryPointStructure->TableAddress != 0) { // // Free the previous allocated page - // + // FreePages ( (VOID*)(UINTN)EntryPointStructure->TableAddress, mPreAllocatedPages @@ -1156,7 +1156,7 @@ SmbiosCreateTable ( EntryPointStructure->TableAddress = 0; mPreAllocatedPages = 0; } - + PhysicalAddress = 0xffffffff; Status = gBS->AllocatePages ( AllocateMaxAddress, @@ -1173,7 +1173,7 @@ SmbiosCreateTable ( mPreAllocatedPages = EFI_SIZE_TO_PAGES (EntryPointStructure->TableLength); } } - + // // Assemble the tables // @@ -1189,7 +1189,7 @@ SmbiosCreateTable ( BufferPointer = BufferPointer + RecordSize; } } while (!EFI_ERROR(Status)); - + // // Assemble End-Of-Table structure // @@ -1240,7 +1240,7 @@ SmbiosCreate64BitTable ( EFI_SMBIOS_TABLE_HEADER *SmbiosRecord; EFI_SMBIOS_TABLE_END_STRUCTURE EndStructure; EFI_SMBIOS_ENTRY *CurrentSmbiosEntry; - + Status = EFI_SUCCESS; BufferPointer = NULL; @@ -1264,9 +1264,9 @@ SmbiosCreate64BitTable ( DEBUG ((EFI_D_ERROR, "SmbiosCreate64BitTable() could not allocate Smbios30EntryPointStructure\n")); return EFI_OUT_OF_RESOURCES; } - + Smbios30EntryPointStructure = (SMBIOS_TABLE_3_0_ENTRY_POINT *) (UINTN) PhysicalAddress; - + CopyMem ( Smbios30EntryPointStructure, &Smbios30EntryPointStructureData, @@ -1286,7 +1286,7 @@ SmbiosCreate64BitTable ( CurrentSmbiosEntry = NULL; do { Status = GetNextSmbiosRecord (SmbiosProtocol, &CurrentSmbiosEntry, &SmbiosRecord); - + if ((Status == EFI_SUCCESS) && (CurrentSmbiosEntry->Smbios64BitTable)) { GetSmbiosStructureSize(SmbiosProtocol, SmbiosRecord, &RecordSize, &NumOfStr); // @@ -1309,7 +1309,7 @@ SmbiosCreate64BitTable ( if (EFI_SIZE_TO_PAGES (Smbios30EntryPointStructure->TableMaximumSize) > mPre64BitAllocatedPages) { // - // If new SMBIOS table size exceeds the previous allocated page, + // If new SMBIOS table size exceeds the previous allocated page, // it is time to re-allocate memory at anywhere. // DEBUG ((EFI_D_INFO, "%a() re-allocate SMBIOS 64-bit table\n", @@ -1317,7 +1317,7 @@ SmbiosCreate64BitTable ( if (Smbios30EntryPointStructure->TableAddress != 0) { // // Free the previous allocated page - // + // FreePages ( (VOID*)(UINTN)Smbios30EntryPointStructure->TableAddress, mPre64BitAllocatedPages @@ -1383,7 +1383,7 @@ SmbiosCreate64BitTable ( /** Create Smbios Table and installs the Smbios Table to the System Table. - + @param Smbios32BitTable The flag to update 32-bit table. @param Smbios64BitTable The flag to update 64-bit table. @@ -1416,7 +1416,7 @@ SmbiosTableConstruction ( /** - Driver to produce Smbios protocol and pre-allocate 1 page for the final SMBIOS table. + Driver to produce Smbios protocol and pre-allocate 1 page for the final SMBIOS table. @param ImageHandle Module's image handle @param SystemTable Pointer of EFI_SYSTEM_TABLE @@ -1445,7 +1445,7 @@ SmbiosDriverEntryPoint ( InitializeListHead (&mPrivateData.DataListHead); InitializeListHead (&mPrivateData.AllocatedHandleListHead); EfiInitializeLock (&mPrivateData.DataLock, TPL_NOTIFY); - + // // Make a new handle and install the protocol // diff --git a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.h b/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.h index 10cff8dd59..0f5aa7355e 100644 --- a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.h +++ b/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.h @@ -1,14 +1,14 @@ /** @file This code supports the implementation of the Smbios protocol - -Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + +Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -115,10 +115,10 @@ typedef struct { /** Create Smbios Table and installs the Smbios Table to the System Table. - + @param Smbios32BitTable The flag to update 32-bit table. @param Smbios64BitTable The flag to update 64-bit table. - + **/ VOID EFIAPI diff --git a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf b/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf index 4fd6b97b42..0e623aeb41 100644 --- a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf +++ b/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxe.inf @@ -1,7 +1,7 @@ ## @file # This driver initializes and installs the SMBIOS protocol, constructs SMBIOS table into system configuration table. # -# Copyright (c) 2009 - 2015, Intel Corporation. All rights reserved.
+# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -49,7 +49,7 @@ [Protocols] gEfiSmbiosProtocolGuid ## PRODUCES - + [Guids] gEfiSmbiosTableGuid ## SOMETIMES_PRODUCES ## SystemTable gEfiSmbios3TableGuid ## SOMETIMES_PRODUCES ## SystemTable diff --git a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxeExtra.uni b/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxeExtra.uni index 94f5ec59a5..05c7bce393 100644 --- a/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxeExtra.uni +++ b/MdeModulePkg/Universal/SmbiosDxe/SmbiosDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // SmbiosDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "SMBIOS DXE Driver" diff --git a/MdeModulePkg/Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxe.inf b/MdeModulePkg/Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxe.inf index 5d3aa67f7c..879bc21481 100644 --- a/MdeModulePkg/Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxe.inf +++ b/MdeModulePkg/Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxe.inf @@ -8,10 +8,10 @@ # asset numbers or serial numbers, MUST NOT be measured into PCR [1], # or any other PCR. # The OEM types are skipped and platform code can measure them by self if required. -# +# # A platform may use its own policy to filter some fields in SMBIOS table. # -# Copyright (c) 2015 - 2017, Intel Corporation. All rights reserved.
+# Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License diff --git a/MdeModulePkg/Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxeExtra.uni b/MdeModulePkg/Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxeExtra.uni index ed298ad9e6..d9a8d4cb69 100644 --- a/MdeModulePkg/Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxeExtra.uni +++ b/MdeModulePkg/Universal/SmbiosMeasurementDxe/SmbiosMeasurementDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // SmbiosMeasurementDxe Localized Strings and Content // -// Copyright (c) 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2015 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "SMBIOS Measurement DXE Driver" diff --git a/MdeModulePkg/Universal/StatusCodeHandler/Pei/MemoryStausCodeWorker.c b/MdeModulePkg/Universal/StatusCodeHandler/Pei/MemoryStausCodeWorker.c index bdf1d2700e..b2981121cb 100644 --- a/MdeModulePkg/Universal/StatusCodeHandler/Pei/MemoryStausCodeWorker.c +++ b/MdeModulePkg/Universal/StatusCodeHandler/Pei/MemoryStausCodeWorker.c @@ -1,7 +1,7 @@ /** @file PEI memory status code worker. - Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -90,7 +90,7 @@ MemoryStatusCodeReportWorker ( MEMORY_STATUSCODE_RECORD *Record; // - // Find GUID'ed HOBs to locate current record buffer. + // Find GUID'ed HOBs to locate current record buffer. // Hob.Raw = GetFirstGuidHob (&gMemoryStatusCodeRecordGuid); ASSERT (Hob.Raw != NULL); diff --git a/MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWorker.c b/MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWorker.c index 1b891b307d..96d5896520 100644 --- a/MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWorker.c +++ b/MdeModulePkg/Universal/StatusCodeHandler/Pei/SerialStatusCodeWorker.c @@ -1,7 +1,7 @@ /** @file Serial I/O status code reporting worker. - Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -94,9 +94,9 @@ SerialStatusCodeReportWorker ( Value, Instance ); - + ASSERT(CharCount > 0); - + if (CallerId != NULL) { CharCount += AsciiSPrint ( &Buffer[CharCount], diff --git a/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.c b/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.c index 368f2056d9..f9d9f154ba 100644 --- a/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.c +++ b/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.c @@ -2,7 +2,7 @@ Report Status Code Handler PEIM which produces general handlers and hook them onto the PEI status code router. - Copyright (c) 2009, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -17,7 +17,7 @@ /** Entry point of Status Code PEIM. - + This function is the entry point of this Status Code PEIM. It initializes supported status code devices according to PCD settings, and installs Status Code PPI. @@ -54,13 +54,13 @@ StatusCodeHandlerPeiEntry ( if (FeaturePcdGet (PcdStatusCodeUseSerial)) { Status = SerialPortInitialize(); ASSERT_EFI_ERROR (Status); - Status = RscHandlerPpi->Register (SerialStatusCodeReportWorker); + Status = RscHandlerPpi->Register (SerialStatusCodeReportWorker); ASSERT_EFI_ERROR (Status); } if (FeaturePcdGet (PcdStatusCodeUseMemory)) { Status = MemoryStatusCodeInitializeWorker (); ASSERT_EFI_ERROR (Status); - Status = RscHandlerPpi->Register (MemoryStatusCodeReportWorker); + Status = RscHandlerPpi->Register (MemoryStatusCodeReportWorker); ASSERT_EFI_ERROR (Status); } diff --git a/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf b/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf index 7c4faa360e..5d96fe3041 100644 --- a/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf +++ b/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPei.inf @@ -1,7 +1,7 @@ ## @file # Report Status Code Handler PEIM which produces general handlers and hook them onto the PEI status code router. # -# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -19,7 +19,7 @@ MODULE_UNI_FILE = StatusCodeHandlerPei.uni FILE_GUID = 9D225237-FA01-464C-A949-BAABC02D31D0 MODULE_TYPE = PEIM - VERSION_STRING = 1.0 + VERSION_STRING = 1.0 ENTRY_POINT = StatusCodeHandlerPeiEntry # @@ -48,13 +48,13 @@ PrintLib DebugLib BaseMemoryLib - + [Guids] ## SOMETIMES_PRODUCES ## HOB ## SOMETIMES_CONSUMES ## HOB gMemoryStatusCodeRecordGuid gEfiStatusCodeDataTypeStringGuid ## SOMETIMES_CONSUMES ## UNDEFINED - + [Ppis] gEfiPeiRscHandlerPpiGuid ## CONSUMES diff --git a/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPeiExtra.uni b/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPeiExtra.uni index 273f09a577..520ec5ec3a 100644 --- a/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPeiExtra.uni +++ b/MdeModulePkg/Universal/StatusCodeHandler/Pei/StatusCodeHandlerPeiExtra.uni @@ -1,7 +1,7 @@ // /** @file // StatusCodeHandlerPei Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Status Code Handler PEI Module" diff --git a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/MemoryStatusCodeWorker.c b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/MemoryStatusCodeWorker.c index a306d7517f..bf0cf2d089 100644 --- a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/MemoryStatusCodeWorker.c +++ b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/MemoryStatusCodeWorker.c @@ -1,7 +1,7 @@ /** @file Runtime memory status code worker. - Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -42,7 +42,7 @@ RtMemoryStatusCodeInitializeWorker ( mRtMemoryStatusCodeTable->RecordIndex = 0; mRtMemoryStatusCodeTable->NumberOfRecords = 0; - mRtMemoryStatusCodeTable->MaxRecordsNumber = + mRtMemoryStatusCodeTable->MaxRecordsNumber = (PcdGet16 (PcdStatusCodeMemorySize) * 1024) / sizeof (MEMORY_STATUSCODE_RECORD); Status = gBS->InstallConfigurationTable (&gMemoryStatusCodeRecordGuid, mRtMemoryStatusCodeTable); @@ -51,7 +51,7 @@ RtMemoryStatusCodeInitializeWorker ( /** - Report status code into runtime memory. If the runtime pool is full, roll back to the + Report status code into runtime memory. If the runtime pool is full, roll back to the first record and overwrite it. @param CodeType Indicates the type of status code being reported. diff --git a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusCodeWorker.c b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusCodeWorker.c index 45986fcae3..66fb9e7c8d 100644 --- a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusCodeWorker.c +++ b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/SerialStatusCodeWorker.c @@ -1,14 +1,14 @@ /** @file Serial I/O status code reporting worker. - Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -16,7 +16,7 @@ /** Convert status code value and extended data to readable ASCII string, send string to serial I/O device. - + @param CodeType Indicates the type of status code being reported. @param Value Describes the current status of a hardware or software entity. This included information about the class and subclass that is used to @@ -73,9 +73,9 @@ SerialStatusCodeReportWorker ( // Print DEBUG() information into output buffer. // CharCount = AsciiBSPrint ( - Buffer, - sizeof (Buffer), - Format, + Buffer, + sizeof (Buffer), + Format, Marker ); } else if ((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) { @@ -83,15 +83,15 @@ SerialStatusCodeReportWorker ( // Print ERROR information into output buffer. // CharCount = AsciiSPrint ( - Buffer, - sizeof (Buffer), - "ERROR: C%08x:V%08x I%x", - CodeType, - Value, + Buffer, + sizeof (Buffer), + "ERROR: C%08x:V%08x I%x", + CodeType, + Value, Instance ); ASSERT (CharCount > 0); - + if (CallerId != NULL) { CharCount += AsciiSPrint ( &Buffer[CharCount], @@ -120,10 +120,10 @@ SerialStatusCodeReportWorker ( // Print PROGRESS information into output buffer. // CharCount = AsciiSPrint ( - Buffer, - sizeof (Buffer), - "PROGRESS CODE: V%08x I%x\n\r", - Value, + Buffer, + sizeof (Buffer), + "PROGRESS CODE: V%08x I%x\n\r", + Value, Instance ); } else if (Data != NULL && @@ -143,11 +143,11 @@ SerialStatusCodeReportWorker ( // Code type is not defined. // CharCount = AsciiSPrint ( - Buffer, - sizeof (Buffer), - "Undefined: C%08x:V%08x I%x\n\r", - CodeType, - Value, + Buffer, + sizeof (Buffer), + "Undefined: C%08x:V%08x I%x\n\r", + CodeType, + Value, Instance ); } diff --git a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.c b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.c index 9149ca4efa..e47e083ff1 100644 --- a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.c +++ b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.c @@ -2,7 +2,7 @@ Status Code Handler Driver which produces general handlers and hook them onto the DXE status code router. - Copyright (c) 2006 - 2009, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -66,9 +66,9 @@ VirtualAddressChangeCallBack ( } /** - Dispatch initialization request to sub status code devices based on + Dispatch initialization request to sub status code devices based on customized feature flags. - + **/ VOID InitializationDispatcherWorker ( @@ -99,11 +99,11 @@ InitializationDispatcherWorker ( } // - // Replay Status code which saved in GUID'ed HOB to all supported devices. + // Replay Status code which saved in GUID'ed HOB to all supported devices. // if (FeaturePcdGet (PcdStatusCodeReplayIn)) { - // - // Journal GUID'ed HOBs to find all record entry, if found, + // + // Journal GUID'ed HOBs to find all record entry, if found, // then output record to support replay device. // Hob.Raw = GetFirstGuidHob (&gMemoryStatusCodeRecordGuid); @@ -152,7 +152,7 @@ InitializationDispatcherWorker ( @param ImageHandle The firmware allocated handle for the EFI image. @param SystemTable A pointer to the EFI System Table. - + @retval EFI_SUCCESS The entry point is executed successfully. **/ diff --git a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.h b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.h index a3185f5b52..5c1239d355 100644 --- a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.h +++ b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.h @@ -1,7 +1,7 @@ /** @file Internal include file for Status Code Handler Driver. - Copyright (c) 2006 - 2012, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -45,7 +45,7 @@ extern RUNTIME_MEMORY_STATUSCODE_HEADER *mRtMemoryStatusCodeTable; /** Locates Serial I/O Protocol as initialization for serial status code worker. - + @retval EFI_SUCCESS Serial I/O Protocol is successfully located. **/ @@ -86,7 +86,7 @@ SerialStatusCodeReportWorker ( /** Initialize runtime memory status code table as initialization for runtime memory status code worker - + @retval EFI_SUCCESS Runtime memory status code table successfully initialized. @retval others Errors from gBS->InstallConfigurationTable(). @@ -97,7 +97,7 @@ RtMemoryStatusCodeInitializeWorker ( ); /** - Report status code into runtime memory. If the runtime pool is full, roll back to the + Report status code into runtime memory. If the runtime pool is full, roll back to the first record and overwrite it. @param CodeType Indicates the type of status code being reported. diff --git a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf index 637804f5de..928ae15b6f 100644 --- a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf +++ b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxe.inf @@ -1,7 +1,7 @@ ## @file # Status Code Handler Driver which produces general handlers and hook them onto the DXE status code router. # -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# (C) Copyright 2016 Hewlett Packard Enterprise Development LP
# # This program and the accompanying materials @@ -51,7 +51,7 @@ ReportStatusCodeLib DebugLib BaseMemoryLib - + [Guids] ## SOMETIMES_CONSUMES ## HOB ## SOMETIMES_PRODUCES ## SystemTable diff --git a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxeExtra.uni b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxeExtra.uni index 2093444b50..4c19b6b79c 100644 --- a/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxeExtra.uni +++ b/MdeModulePkg/Universal/StatusCodeHandler/RuntimeDxe/StatusCodeHandlerRuntimeDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // StatusCodeHandlerRuntimeDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Status Code Handler DXE Driver" diff --git a/MdeModulePkg/Universal/StatusCodeHandler/Smm/MemoryStatusCodeWorker.c b/MdeModulePkg/Universal/StatusCodeHandler/Smm/MemoryStatusCodeWorker.c index 6baf2dd0f2..8d3b61c4cb 100644 --- a/MdeModulePkg/Universal/StatusCodeHandler/Smm/MemoryStatusCodeWorker.c +++ b/MdeModulePkg/Universal/StatusCodeHandler/Smm/MemoryStatusCodeWorker.c @@ -1,15 +1,15 @@ /** @file Runtime memory status code worker. - Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+ Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php + This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -48,7 +48,7 @@ MemoryStatusCodeInitializeWorker ( /** - Report status code into runtime memory. If the runtime pool is full, roll back to the + Report status code into runtime memory. If the runtime pool is full, roll back to the first record and overwrite it. @param CodeType Indicates the type of status code being reported. diff --git a/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWorker.c b/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWorker.c index 8f2fbf4f7a..0f1e12f977 100644 --- a/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWorker.c +++ b/MdeModulePkg/Universal/StatusCodeHandler/Smm/SerialStatusCodeWorker.c @@ -1,14 +1,14 @@ /** @file Serial I/O status code reporting worker. - Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.
- This program and the accompanying materials - are licensed and made available under the terms and conditions of the BSD License - which accompanies this distribution. The full text of the license may be found at - http://opensource.org/licenses/bsd-license.php - - THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, - WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
+ This program and the accompanying materials + are licensed and made available under the terms and conditions of the BSD License + which accompanies this distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, + WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ @@ -16,7 +16,7 @@ /** Convert status code value and extended data to readable ASCII string, send string to serial I/O device. - + @param CodeType Indicates the type of status code being reported. @param Value Describes the current status of a hardware or software entity. This included information about the class and subclass that is used to @@ -73,9 +73,9 @@ SerialStatusCodeReportWorker ( // Print DEBUG() information into output buffer. // CharCount = AsciiBSPrint ( - Buffer, - sizeof (Buffer), - Format, + Buffer, + sizeof (Buffer), + Format, Marker ); } else if ((CodeType & EFI_STATUS_CODE_TYPE_MASK) == EFI_ERROR_CODE) { @@ -83,15 +83,15 @@ SerialStatusCodeReportWorker ( // Print ERROR information into output buffer. // CharCount = AsciiSPrint ( - Buffer, - sizeof (Buffer), - "ERROR: C%08x:V%08x I%x", - CodeType, - Value, + Buffer, + sizeof (Buffer), + "ERROR: C%08x:V%08x I%x", + CodeType, + Value, Instance ); ASSERT (CharCount > 0); - + if (CallerId != NULL) { CharCount += AsciiSPrint ( &Buffer[CharCount], @@ -120,10 +120,10 @@ SerialStatusCodeReportWorker ( // Print PROGRESS information into output buffer. // CharCount = AsciiSPrint ( - Buffer, - sizeof (Buffer), - "PROGRESS CODE: V%08x I%x\n\r", - Value, + Buffer, + sizeof (Buffer), + "PROGRESS CODE: V%08x I%x\n\r", + Value, Instance ); } else if (Data != NULL && @@ -143,11 +143,11 @@ SerialStatusCodeReportWorker ( // Code type is not defined. // CharCount = AsciiSPrint ( - Buffer, - sizeof (Buffer), - "Undefined: C%08x:V%08x I%x\n\r", - CodeType, - Value, + Buffer, + sizeof (Buffer), + "Undefined: C%08x:V%08x I%x\n\r", + CodeType, + Value, Instance ); } diff --git a/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.c b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.c index 5e84ea43da..846685b1c9 100644 --- a/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.c +++ b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.c @@ -2,7 +2,7 @@ Status Code Handler Driver which produces general handlers and hook them onto the SMM status code router. - Copyright (c) 2009, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -19,9 +19,9 @@ EFI_SMM_RSC_HANDLER_PROTOCOL *mRscHandlerProtocol = NULL; /** - Dispatch initialization request to sub status code devices based on + Dispatch initialization request to sub status code devices based on customized feature flags. - + **/ VOID InitializationDispatcherWorker ( @@ -54,7 +54,7 @@ InitializationDispatcherWorker ( @param ImageHandle The firmware allocated handle for the EFI image. @param SystemTable A pointer to the EFI System Table. - + @retval EFI_SUCCESS The entry point is executed successfully. **/ diff --git a/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.h b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.h index 1a374c2ead..6b80b0acbb 100644 --- a/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.h +++ b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.h @@ -1,7 +1,7 @@ /** @file Internal include file for Status Code Handler Driver. - Copyright (c) 2009 - 2012, Intel Corporation. All rights reserved.
+ Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
(C) Copyright 2016 Hewlett Packard Enterprise Development LP
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License @@ -83,7 +83,7 @@ SerialStatusCodeReportWorker ( /** Initialize runtime memory status code table as initialization for runtime memory status code worker - + @retval EFI_SUCCESS Runtime memory status code table successfully initialized. **/ @@ -93,7 +93,7 @@ MemoryStatusCodeInitializeWorker ( ); /** - Report status code into runtime memory. If the runtime pool is full, roll back to the + Report status code into runtime memory. If the runtime pool is full, roll back to the first record and overwrite it. @param CodeType Indicates the type of status code being reported. diff --git a/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.inf b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.inf index 7b5073546e..fbc62f5f4e 100644 --- a/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.inf +++ b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmm.inf @@ -1,7 +1,7 @@ ## @file # Status Code Handler Driver which produces general handlers and hook them onto the SMM status code router. # -# Copyright (c) 2009 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2009 - 2018, Intel Corporation. All rights reserved.
# (C) Copyright 2016 Hewlett Packard Enterprise Development LP
# # This program and the accompanying materials @@ -21,7 +21,7 @@ FILE_GUID = 79CD78D8-6EDC-4978-BD02-3299C387AB17 MODULE_TYPE = DXE_SMM_DRIVER PI_SPECIFICATION_VERSION = 0x0001000A - VERSION_STRING = 1.0 + VERSION_STRING = 1.0 ENTRY_POINT = StatusCodeHandlerSmmEntry # diff --git a/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmmExtra.uni b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmmExtra.uni index 05422d5ee5..03225ac3bd 100644 --- a/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmmExtra.uni +++ b/MdeModulePkg/Universal/StatusCodeHandler/Smm/StatusCodeHandlerSmmExtra.uni @@ -1,7 +1,7 @@ // /** @file // StatusCodeHandlerSmm Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Status Code Handler SMM Driver" diff --git a/MdeModulePkg/Universal/TimestampDxe/TimestampDxe.c b/MdeModulePkg/Universal/TimestampDxe/TimestampDxe.c index 30349b5ec5..bce2d8c0ac 100644 --- a/MdeModulePkg/Universal/TimestampDxe/TimestampDxe.c +++ b/MdeModulePkg/Universal/TimestampDxe/TimestampDxe.c @@ -1,7 +1,7 @@ /** @file Implementation of Timestamp Protocol using UEFI APIs. - -Copyright (c) 2013, Intel Corporation. All rights reserved.
+ +Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -45,9 +45,9 @@ EFI_TIMESTAMP_PROPERTIES mTimestampProperties = { will always roll over to zero. The properties of the counter can be retrieved from GetProperties(). The caller should be prepared for the function to return the same value twice across successive calls. The counter value will not go backwards other than when wrapping, as defined by EndValue in GetProperties(). - The frequency of the returned timestamp counter value must remain constant. Power management operations that - affect clocking must not change the returned counter frequency. The quantization of counter value updates may - vary as long as the value reflecting time passed remains consistent. + The frequency of the returned timestamp counter value must remain constant. Power management operations that + affect clocking must not change the returned counter frequency. The quantization of counter value updates may + vary as long as the value reflecting time passed remains consistent. @retval The current value of the free running timestamp counter. @@ -63,7 +63,7 @@ TimestampDriverGetTimestamp ( // UINT64 TimestampValue; TimestampValue = 0; - + // // Get the timestamp // @@ -72,7 +72,7 @@ TimestampDriverGetTimestamp ( } else { TimestampValue = GetPerformanceCounter() - mTimerLibStartValue; } - + return TimestampValue; } @@ -81,9 +81,9 @@ TimestampDriverGetTimestamp ( @param[out] Properties The properties of the timestamp counter. - @retval EFI_SUCCESS The properties were successfully retrieved. - @retval EFI_DEVICE_ERROR An error occurred trying to retrieve the properties of the timestamp - counter subsystem. Properties is not pedated. + @retval EFI_SUCCESS The properties were successfully retrieved. + @retval EFI_DEVICE_ERROR An error occurred trying to retrieve the properties of the timestamp + counter subsystem. Properties is not pedated. @retval EFI_INVALID_PARAMETER Properties is NULL. **/ @@ -96,12 +96,12 @@ TimestampDriverGetProperties( if (Properties == NULL) { return EFI_INVALID_PARAMETER; } - + // // Get timestamp properties // CopyMem((VOID *) Properties, (VOID *) &mTimestampProperties, sizeof (mTimestampProperties)); - + return EFI_SUCCESS; } @@ -130,26 +130,26 @@ TimestampDriverInitialize ( ) { EFI_STATUS Status; - + EFI_HANDLE TimestampHandle; TimestampHandle = NULL; - + // // Get the start value, end value and frequency in Timerlib // mTimestampProperties.Frequency = GetPerformanceCounterProperties(&mTimerLibStartValue, &mTimerLibEndValue); - + // - // Set the EndValue + // Set the EndValue // if (mTimerLibEndValue > mTimerLibStartValue) { mTimestampProperties.EndValue = mTimerLibEndValue - mTimerLibStartValue; } else { mTimestampProperties.EndValue = mTimerLibStartValue - mTimerLibEndValue; } - + DEBUG ((EFI_D_INFO, "TimerFrequency:0x%lx, TimerLibStartTime:0x%lx, TimerLibEndtime:0x%lx\n", mTimestampProperties.Frequency, mTimerLibStartValue, mTimerLibEndValue)); - + // // Install the Timestamp Protocol onto a new handle // @@ -159,7 +159,7 @@ TimestampDriverInitialize ( &mTimestamp, NULL ); - + ASSERT_EFI_ERROR (Status); return EFI_SUCCESS; diff --git a/MdeModulePkg/Universal/TimestampDxe/TimestampDxe.inf b/MdeModulePkg/Universal/TimestampDxe/TimestampDxe.inf index f71d5262ea..07858857e3 100644 --- a/MdeModulePkg/Universal/TimestampDxe/TimestampDxe.inf +++ b/MdeModulePkg/Universal/TimestampDxe/TimestampDxe.inf @@ -1,7 +1,7 @@ ## @file # Generic Timestamp driver producing Timestamp Protocol using UEFI APIs. # -# Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -32,7 +32,7 @@ MdePkg/MdePkg.dec [Sources] - TimestampDxe.c + TimestampDxe.c [LibraryClasses] UefiBootServicesTableLib diff --git a/MdeModulePkg/Universal/TimestampDxe/TimestampDxeExtra.uni b/MdeModulePkg/Universal/TimestampDxe/TimestampDxeExtra.uni index aba52deb8d..f99138ff4c 100644 --- a/MdeModulePkg/Universal/TimestampDxe/TimestampDxeExtra.uni +++ b/MdeModulePkg/Universal/TimestampDxe/TimestampDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // TimestampDxe Localized Strings and Content // -// Copyright (c) 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2014 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Timestamp DXE Driver" diff --git a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c index 8202d37daa..1bcf931b96 100644 --- a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c +++ b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariable.c @@ -29,7 +29,7 @@ VARIABLE_INFO_ENTRY *gVariableInfo = NULL; #define ISO_639_2_ENTRY_SIZE 3 /** - Update the variable region with Variable information. These are the same + Update the variable region with Variable information. These are the same arguments as the EFI Variable services. @param[in] VariableName Name of variable @@ -40,7 +40,7 @@ VARIABLE_INFO_ENTRY *gVariableInfo = NULL; @param[in] DataSize Size of data. 0 means delete - @param[in] Attributes Attribues of the variable + @param[in] Attributes Attribues of the variable @param[in] Variable The variable information which is used to keep track of variable usage. @@ -272,13 +272,13 @@ GetEndPointer ( } /** - Routine used to track statistical information about variable usage. + Routine used to track statistical information about variable usage. The data is stored in the EFI system table so it can be accessed later. - VariableInfo.efi can dump out the table. Only Boot Services variable + VariableInfo.efi can dump out the table. Only Boot Services variable accesses are tracked by this code. The PcdVariableCollectStatistics - build flag controls if this feature is enabled. + build flag controls if this feature is enabled. - A read that hits in the cache will have Read and Cache true for + A read that hits in the cache will have Read and Cache true for the transaction. Data is allocated by this routine, but never freed. @@ -328,7 +328,7 @@ UpdateVariableInfo ( gBS->InstallConfigurationTable (&gEfiVariableGuid, gVariableInfo); } - + for (Entry = gVariableInfo; Entry != NULL; Entry = Entry->Next) { if (CompareGuid (VendorGuid, &Entry->VendorGuid)) { if (StrCmp (VariableName, Entry->Name) == 0) { @@ -399,7 +399,7 @@ GetIndexFromSupportedLangCodes( IN CHAR8 *SupportedLang, IN CHAR8 *Lang, IN BOOLEAN Iso639Language - ) + ) { UINTN Index; UINTN CompareLength; @@ -434,8 +434,8 @@ GetIndexFromSupportedLangCodes( // Determine the length of the next language code in SupportedLang // for (CompareLength = 0; SupportedLang[CompareLength] != '\0' && SupportedLang[CompareLength] != ';'; CompareLength++); - - if ((CompareLength == LanguageLength) && + + if ((CompareLength == LanguageLength) && (AsciiStrnCmp (Lang, SupportedLang, CompareLength) == 0)) { // // Successfully find the index of Lang string in SupportedLang string. @@ -523,7 +523,7 @@ GetLangFromSupportedLangCodes ( return CopyMem (mVariableModuleGlobal->PlatformLang, Supported - CompareLength, CompareLength); } SubIndex++; - + // // Skip ';' characters in Supported // @@ -533,10 +533,10 @@ GetLangFromSupportedLangCodes ( } /** - Returns a pointer to an allocated buffer that contains the best matching language - from a set of supported languages. - - This function supports both ISO 639-2 and RFC 4646 language codes, but language + Returns a pointer to an allocated buffer that contains the best matching language + from a set of supported languages. + + This function supports both ISO 639-2 and RFC 4646 language codes, but language code types may not be mixed in a single call to this function. This function supports a variable argument list that allows the caller to pass in a prioritized list of language codes to test against all the language codes in SupportedLanguages. @@ -544,37 +544,37 @@ GetLangFromSupportedLangCodes ( If SupportedLanguages is NULL, then ASSERT(). @param[in] SupportedLanguages A pointer to a Null-terminated ASCII string that - contains a set of language codes in the format + contains a set of language codes in the format specified by Iso639Language. @param[in] Iso639Language If not zero, then all language codes are assumed to be in ISO 639-2 format. If zero, then all language codes are assumed to be in RFC 4646 language format - @param[in] ... A variable argument list that contains pointers to + @param[in] ... A variable argument list that contains pointers to Null-terminated ASCII strings that contain one or more language codes in the format specified by Iso639Language. The first language code from each of these language code lists is used to determine if it is an exact or - close match to any of the language codes in + close match to any of the language codes in SupportedLanguages. Close matches only apply to RFC 4646 language codes, and the matching algorithm from RFC 4647 - is used to determine if a close match is present. If + is used to determine if a close match is present. If an exact or close match is found, then the matching language code from SupportedLanguages is returned. If no matches are found, then the next variable argument - parameter is evaluated. The variable argument list + parameter is evaluated. The variable argument list is terminated by a NULL. @retval NULL The best matching language could not be found in SupportedLanguages. - @retval NULL There are not enough resources available to return the best matching + @retval NULL There are not enough resources available to return the best matching language. - @retval Other A pointer to a Null-terminated ASCII string that is the best matching + @retval Other A pointer to a Null-terminated ASCII string that is the best matching language in SupportedLanguages. **/ CHAR8 * EFIAPI VariableGetBestLanguage ( - IN CONST CHAR8 *SupportedLanguages, + IN CONST CHAR8 *SupportedLanguages, IN UINTN Iso639Language, ... ) @@ -649,7 +649,7 @@ VariableGetBestLanguage ( LanguageLength = 0; } else { // - // If RFC 4646 mode, then trim Language from the right to the next '-' character + // If RFC 4646 mode, then trim Language from the right to the next '-' character // for (LanguageLength--; LanguageLength > 0 && Language[LanguageLength] != '-'; LanguageLength--); } @@ -658,7 +658,7 @@ VariableGetBestLanguage ( VA_END (Args); // - // No matches were found + // No matches were found // return NULL; } @@ -723,7 +723,7 @@ AutoUpdateLangVariable( ASSERT (mVariableModuleGlobal->PlatformLangCodes != NULL); // - // PlatformLang holds a single language from PlatformLangCodes, + // PlatformLang holds a single language from PlatformLangCodes, // so the size of PlatformLangCodes is enough for the PlatformLang. // if (mVariableModuleGlobal->PlatformLang != NULL) { @@ -753,7 +753,7 @@ AutoUpdateLangVariable( ASSERT (mVariableModuleGlobal->LangCodes != NULL); } - if (SetLanguageCodes + if (SetLanguageCodes && (mVariableModuleGlobal->PlatformLangCodes != NULL) && (mVariableModuleGlobal->LangCodes != NULL)) { // @@ -785,7 +785,7 @@ AutoUpdateLangVariable( } } } - + // // According to UEFI spec, "Lang" and "PlatformLang" is NV|BS|RT attributions. // @@ -849,7 +849,7 @@ AutoUpdateLangVariable( // FindVariable (L"PlatformLang", &gEfiGlobalVariableGuid, &Variable, (VARIABLE_GLOBAL *)mVariableModuleGlobal); - Status = UpdateVariable (L"PlatformLang", &gEfiGlobalVariableGuid, BestPlatformLang, + Status = UpdateVariable (L"PlatformLang", &gEfiGlobalVariableGuid, BestPlatformLang, AsciiStrSize (BestPlatformLang), Attributes, &Variable); DEBUG ((EFI_D_INFO, "Variable Driver Auto Update Lang, Lang:%a, PlatformLang:%a\n", BestLang, BestPlatformLang)); @@ -860,7 +860,7 @@ AutoUpdateLangVariable( } /** - Update the variable region with Variable information. These are the same + Update the variable region with Variable information. These are the same arguments as the EFI Variable services. @param[in] VariableName Name of variable @@ -907,10 +907,10 @@ UpdateVariable ( // Update/Delete existing variable // - if (EfiAtRuntime ()) { + if (EfiAtRuntime ()) { // - // If EfiAtRuntime and the variable is Volatile and Runtime Access, - // the volatile is ReadOnly, and SetVariable should be aborted and + // If EfiAtRuntime and the variable is Volatile and Runtime Access, + // the volatile is ReadOnly, and SetVariable should be aborted and // return EFI_WRITE_PROTECTED. // if (Variable->Volatile) { @@ -952,21 +952,21 @@ UpdateVariable ( // Variable->CurrPtr->State &= VAR_IN_DELETED_TRANSITION; } - + } else { // // No found existing variable, Create a new variable - // - + // + // // Make sure we are trying to create a new variable. - // Setting a data variable with no access, or zero DataSize attributes means to delete it. + // Setting a data variable with no access, or zero DataSize attributes means to delete it. // if (DataSize == 0 || (Attributes & (EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_BOOTSERVICE_ACCESS)) == 0) { Status = EFI_NOT_FOUND; goto Done; } - + // // Only variable have NV|RT attribute can be created in Runtime // @@ -974,14 +974,14 @@ UpdateVariable ( (((Attributes & EFI_VARIABLE_RUNTIME_ACCESS) == 0) || ((Attributes & EFI_VARIABLE_NON_VOLATILE) == 0))) { Status = EFI_INVALID_PARAMETER; goto Done; - } + } } - + // // Function part - create a new variable and copy the data. // Both update a variable and create a variable will come here. // - + VarNameOffset = sizeof (VARIABLE_HEADER); VarNameSize = StrSize (VariableName); VarDataOffset = VarNameOffset + VarNameSize + GET_PAD_SIZE (VarNameSize); @@ -989,9 +989,9 @@ UpdateVariable ( if ((Attributes & EFI_VARIABLE_NON_VOLATILE) != 0) { NonVolatileVarableStoreSize = ((VARIABLE_STORE_HEADER *)(UINTN)(Global->NonVolatileVariableBase))->Size; - if ((((Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) != 0) + if ((((Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) != 0) && ((HEADER_ALIGN (VarSize) + mVariableModuleGlobal->HwErrVariableTotalSize) > PcdGet32 (PcdHwErrStorageSize))) - || (((Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == 0) + || (((Attributes & EFI_VARIABLE_HARDWARE_ERROR_RECORD) == 0) && ((HEADER_ALIGN (VarSize) + mVariableModuleGlobal->CommonVariableTotalSize) > NonVolatileVarableStoreSize - sizeof (VARIABLE_STORE_HEADER) - PcdGet32 (PcdHwErrStorageSize)))) { Status = EFI_OUT_OF_RESOURCES; goto Done; @@ -1144,21 +1144,21 @@ FindVariable ( /** This code finds variable in storage blocks (Volatile or Non-Volatile). - + @param VariableName A Null-terminated Unicode string that is the name of the vendor's variable. @param VendorGuid A unique identifier for the vendor. - @param Attributes If not NULL, a pointer to the memory location to return the + @param Attributes If not NULL, a pointer to the memory location to return the attributes bitmask for the variable. @param DataSize Size of Data found. If size is less than the data, this value contains the required size. - @param Data On input, the size in bytes of the return Data buffer. + @param Data On input, the size in bytes of the return Data buffer. On output, the size of data returned in Data. @param Global Pointer to VARIABLE_GLOBAL structure - @retval EFI_SUCCESS The function completed successfully. + @retval EFI_SUCCESS The function completed successfully. @retval EFI_NOT_FOUND The variable was not found. - @retval EFI_BUFFER_TOO_SMALL DataSize is too small for the result. DataSize has + @retval EFI_BUFFER_TOO_SMALL DataSize is too small for the result. DataSize has been updated with the size needed to complete the request. @retval EFI_INVALID_PARAMETER VariableName or VendorGuid or DataSize is NULL. @@ -1208,7 +1208,7 @@ EmuGetVariable ( } VariableDataPtr = GetVariableDataPtr (Variable.CurrPtr); ASSERT (VariableDataPtr != NULL); - + CopyMem (Data, VariableDataPtr, VarDataSize); if (Attributes != NULL) { *Attributes = Variable.CurrPtr->Attributes; @@ -1368,9 +1368,9 @@ Done: This code sets variable in storage blocks (Volatile or Non-Volatile). @param VariableName A Null-terminated Unicode string that is the name of the vendor's - variable. Each VariableName is unique for each - VendorGuid. VariableName must contain 1 or more - Unicode characters. If VariableName is an empty Unicode + variable. Each VariableName is unique for each + VendorGuid. VariableName must contain 1 or more + Unicode characters. If VariableName is an empty Unicode string, then EFI_INVALID_PARAMETER is returned. @param VendorGuid A unique identifier for the vendor @param Attributes Attributes bitmask to set for the variable @@ -1381,10 +1381,10 @@ Done: @param VolatileOffset The offset of last volatile variable @param NonVolatileOffset The offset of last non-volatile variable - @retval EFI_SUCCESS The firmware has successfully stored the variable and its data as + @retval EFI_SUCCESS The firmware has successfully stored the variable and its data as defined by the Attributes. - @retval EFI_INVALID_PARAMETER An invalid combination of attribute bits was supplied, or the - DataSize exceeds the maximum allowed, or VariableName is an empty + @retval EFI_INVALID_PARAMETER An invalid combination of attribute bits was supplied, or the + DataSize exceeds the maximum allowed, or VariableName is an empty Unicode string, or VendorGuid is NULL. @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the variable and its data. @retval EFI_DEVICE_ERROR The variable could not be saved due to a hardware failure. @@ -1413,7 +1413,7 @@ EmuSetVariable ( // if (VariableName == NULL || VariableName[0] == 0 || VendorGuid == NULL) { return EFI_INVALID_PARAMETER; - } + } if (DataSize != 0 && Data == NULL) { return EFI_INVALID_PARAMETER; @@ -1433,11 +1433,11 @@ EmuSetVariable ( return EFI_INVALID_PARAMETER; } - + if ((UINTN)(~0) - DataSize < StrSize(VariableName)){ // - // Prevent whole variable size overflow - // + // Prevent whole variable size overflow + // return EFI_INVALID_PARAMETER; } @@ -1463,7 +1463,7 @@ EmuSetVariable ( // if (StrSize (VariableName) + DataSize > PcdGet32 (PcdMaxVariableSize) - sizeof (VARIABLE_HEADER)) { return EFI_INVALID_PARAMETER; - } + } } AcquireLockOnlyAtBootTime(&Global->VariableServicesLock); @@ -1471,7 +1471,7 @@ EmuSetVariable ( // // Check whether the input variable is already existed // - + Status = FindVariable (VariableName, VendorGuid, &Variable, Global); // @@ -1491,18 +1491,18 @@ EmuSetVariable ( @param Attributes Attributes bitmask to specify the type of variables on which to return information. - @param MaximumVariableStorageSize On output the maximum size of the storage space available for - the EFI variables associated with the attributes specified. - @param RemainingVariableStorageSize Returns the remaining size of the storage space available for EFI + @param MaximumVariableStorageSize On output the maximum size of the storage space available for + the EFI variables associated with the attributes specified. + @param RemainingVariableStorageSize Returns the remaining size of the storage space available for EFI variables associated with the attributes specified. - @param MaximumVariableSize Returns the maximum size of an individual EFI variable + @param MaximumVariableSize Returns the maximum size of an individual EFI variable associated with the attributes specified. @param Global Pointer to VARIABLE_GLOBAL structure. @retval EFI_SUCCESS Valid answer returned. @retval EFI_INVALID_PARAMETER An invalid combination of attribute bits was supplied - @retval EFI_UNSUPPORTED The attribute is not supported on this platform, and the - MaximumVariableStorageSize, RemainingVariableStorageSize, + @retval EFI_UNSUPPORTED The attribute is not supported on this platform, and the + MaximumVariableStorageSize, RemainingVariableStorageSize, MaximumVariableSize are undefined. **/ @@ -1529,12 +1529,12 @@ EmuQueryVariableInfo ( if(MaximumVariableStorageSize == NULL || RemainingVariableStorageSize == NULL || MaximumVariableSize == NULL || Attributes == 0) { return EFI_INVALID_PARAMETER; } - + if((Attributes & (EFI_VARIABLE_NON_VOLATILE | EFI_VARIABLE_BOOTSERVICE_ACCESS | EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_HARDWARE_ERROR_RECORD)) == 0) { // // Make sure the Attributes combination is supported by the platform. // - return EFI_UNSUPPORTED; + return EFI_UNSUPPORTED; } else if ((Attributes & (EFI_VARIABLE_RUNTIME_ACCESS | EFI_VARIABLE_BOOTSERVICE_ACCESS)) == EFI_VARIABLE_RUNTIME_ACCESS) { // // Make sure if runtime bit is set, boot service bit is set also. @@ -1633,7 +1633,7 @@ EmuQueryVariableInfo ( } else if ((*RemainingVariableStorageSize - sizeof (VARIABLE_HEADER)) < *MaximumVariableSize) { *MaximumVariableSize = *RemainingVariableStorageSize - sizeof (VARIABLE_HEADER); } - + ReleaseLockOnlyAtBootTime (&Global->VariableServicesLock); return EFI_SUCCESS; } @@ -1674,7 +1674,7 @@ InitializeVariableStore ( // // Note that in EdkII variable driver implementation, Hardware Error Record type variable // is stored with common variable in the same NV region. So the platform integrator should - // ensure that the value of PcdHwErrStorageSize is less than or equal to the value of + // ensure that the value of PcdHwErrStorageSize is less than or equal to the value of // PcdVariableStoreSize. // ASSERT (PcdGet32 (PcdHwErrStorageSize) <= PcdGet32 (PcdVariableStoreSize)); diff --git a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf index 0dafddee55..12d52dd130 100644 --- a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf +++ b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxe.inf @@ -4,7 +4,7 @@ # This module installs variable arch protocol and variable write arch protocol to provide # four EFI_RUNTIME_SERVICES: SetVariable, GetVariable, GetNextVariableName and QueryVariableInfo. # -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -85,4 +85,4 @@ TRUE [UserExtensions.TianoCore."ExtraFiles"] - EmuVariableRuntimeDxeExtra.uni \ No newline at end of file + EmuVariableRuntimeDxeExtra.uni diff --git a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxeExtra.uni b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxeExtra.uni index c3bbd2bf7b..a500037373 100644 --- a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxeExtra.uni +++ b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/EmuVariableRuntimeDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // EmuVariableRuntimeDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Emulation Variable DXE Driver" diff --git a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/InitVariable.c b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/InitVariable.c index 309a4b8dbf..dac0464253 100644 --- a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/InitVariable.c +++ b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/InitVariable.c @@ -1,9 +1,9 @@ /** @file - Implment all four UEFI runtime variable services and + Implment all four UEFI runtime variable services and install variable architeture protocol. - -Copyright (c) 2006 - 2016, Intel Corporation. All rights reserved.
+ +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -29,7 +29,7 @@ EFI_EVENT mVirtualAddressChangeEvent = NULL; data, this value contains the required size. @param Data The buffer to return the contents of the variable. May be NULL with a zero DataSize in order to determine the size buffer needed. - + @return EFI_INVALID_PARAMETER Invalid parameter @return EFI_SUCCESS Find the specified variable @return EFI_NOT_FOUND Not found @@ -203,13 +203,13 @@ VariableClassAddressChangeEvent ( /** EmuVariable Driver main entry point. The Variable driver places the 4 EFI - runtime services in the EFI System Table and installs arch protocols + runtime services in the EFI System Table and installs arch protocols for variable read and write services being available. It also registers notification function for EVT_SIGNAL_VIRTUAL_ADDRESS_CHANGE event. - @param[in] ImageHandle The firmware allocated handle for the EFI image. + @param[in] ImageHandle The firmware allocated handle for the EFI image. @param[in] SystemTable A pointer to the EFI System Table. - + @retval EFI_SUCCESS Variable service successfully initialized. **/ diff --git a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/Variable.h b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/Variable.h index 985f567919..2851582d0d 100644 --- a/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/Variable.h +++ b/MdeModulePkg/Universal/Variable/EmuRuntimeDxe/Variable.h @@ -3,7 +3,7 @@ The internal header file includes the common header files, defines internal structure and functions used by EmuVariable module. -Copyright (c) 2006 - 2017, Intel Corporation. All rights reserved.
+Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -139,21 +139,21 @@ VariableClassAddressChangeEvent ( /** This code finds variable in storage blocks (Volatile or Non-Volatile). - + @param VariableName A Null-terminated Unicode string that is the name of the vendor's variable. @param VendorGuid A unique identifier for the vendor. - @param Attributes If not NULL, a pointer to the memory location to return the + @param Attributes If not NULL, a pointer to the memory location to return the attributes bitmask for the variable. @param DataSize Size of Data found. If size is less than the data, this value contains the required size. - @param Data On input, the size in bytes of the return Data buffer. + @param Data On input, the size in bytes of the return Data buffer. On output, the size of data returned in Data. @param Global Pointer to VARIABLE_GLOBAL structure - @retval EFI_SUCCESS The function completed successfully. + @retval EFI_SUCCESS The function completed successfully. @retval EFI_NOT_FOUND The variable was not found. - @retval EFI_BUFFER_TOO_SMALL DataSize is too small for the result. DataSize has + @retval EFI_BUFFER_TOO_SMALL DataSize is too small for the result. DataSize has been updated with the size needed to complete the request. @retval EFI_INVALID_PARAMETER VariableName or VendorGuid or DataSize is NULL. @@ -206,9 +206,9 @@ EmuGetNextVariableName ( This code sets variable in storage blocks (Volatile or Non-Volatile). @param VariableName A Null-terminated Unicode string that is the name of the vendor's - variable. Each VariableName is unique for each - VendorGuid. VariableName must contain 1 or more - Unicode characters. If VariableName is an empty Unicode + variable. Each VariableName is unique for each + VendorGuid. VariableName must contain 1 or more + Unicode characters. If VariableName is an empty Unicode string, then EFI_INVALID_PARAMETER is returned. @param VendorGuid A unique identifier for the vendor @param Attributes Attributes bitmask to set for the variable @@ -219,10 +219,10 @@ EmuGetNextVariableName ( @param VolatileOffset The offset of last volatile variable @param NonVolatileOffset The offset of last non-volatile variable - @retval EFI_SUCCESS The firmware has successfully stored the variable and its data as + @retval EFI_SUCCESS The firmware has successfully stored the variable and its data as defined by the Attributes. - @retval EFI_INVALID_PARAMETER An invalid combination of attribute bits was supplied, or the - DataSize exceeds the maximum allowed, or VariableName is an empty + @retval EFI_INVALID_PARAMETER An invalid combination of attribute bits was supplied, or the + DataSize exceeds the maximum allowed, or VariableName is an empty Unicode string, or VendorGuid is NULL. @retval EFI_OUT_OF_RESOURCES Not enough storage is available to hold the variable and its data. @retval EFI_DEVICE_ERROR The variable could not be saved due to a hardware failure. @@ -249,18 +249,18 @@ EmuSetVariable ( @param Attributes Attributes bitmask to specify the type of variables on which to return information. - @param MaximumVariableStorageSize On output the maximum size of the storage space available for - the EFI variables associated with the attributes specified. - @param RemainingVariableStorageSize Returns the remaining size of the storage space available for EFI + @param MaximumVariableStorageSize On output the maximum size of the storage space available for + the EFI variables associated with the attributes specified. + @param RemainingVariableStorageSize Returns the remaining size of the storage space available for EFI variables associated with the attributes specified. - @param MaximumVariableSize Returns the maximum size of an individual EFI variable + @param MaximumVariableSize Returns the maximum size of an individual EFI variable associated with the attributes specified. @param Global Pointer to VARIABLE_GLOBAL structure. @retval EFI_SUCCESS Valid answer returned. @retval EFI_INVALID_PARAMETER An invalid combination of attribute bits was supplied - @retval EFI_UNSUPPORTED The attribute is not supported on this platform, and the - MaximumVariableStorageSize, RemainingVariableStorageSize, + @retval EFI_UNSUPPORTED The attribute is not supported on this platform, and the + MaximumVariableStorageSize, RemainingVariableStorageSize, MaximumVariableSize are undefined. **/ diff --git a/MdeModulePkg/Universal/Variable/Pei/PeiVariable.uni b/MdeModulePkg/Universal/Variable/Pei/PeiVariable.uni index 65ca7d02db..c27d694943 100644 --- a/MdeModulePkg/Universal/Variable/Pei/PeiVariable.uni +++ b/MdeModulePkg/Universal/Variable/Pei/PeiVariable.uni @@ -3,13 +3,13 @@ // // This module implements ReadOnly Variable Services required by PEIM and installs PEI ReadOnly Varaiable2 PPI. // -// Copyright (c) 2006 - 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License // which accompanies this distribution. The full text of the license may be found at // http://opensource.org/licenses/bsd-license.php -// +// // THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, // WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. // diff --git a/MdeModulePkg/Universal/Variable/Pei/PeiVariableExtra.uni b/MdeModulePkg/Universal/Variable/Pei/PeiVariableExtra.uni index 8b967d4e8f..3d24f294c6 100644 --- a/MdeModulePkg/Universal/Variable/Pei/PeiVariableExtra.uni +++ b/MdeModulePkg/Universal/Variable/Pei/PeiVariableExtra.uni @@ -1,7 +1,7 @@ // /** @file // PeiVariable Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -13,8 +13,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Variable Access PEI Module" diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxeExtra.uni b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxeExtra.uni index 2d8eaf2669..b31790d053 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxeExtra.uni +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableRuntimeDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // VariableRuntimeDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "VariableRuntimeDxe module" diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmExtra.uni b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmExtra.uni index 0de8776086..089533a5f1 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmExtra.uni +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmExtra.uni @@ -1,7 +1,7 @@ // /** @file // VariableSmm Localized Strings and Content // -// Copyright (c) 2013 - 2015, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "VariableSmm module" diff --git a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxeExtra.uni b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxeExtra.uni index 674e201e88..842ded5589 100644 --- a/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxeExtra.uni +++ b/MdeModulePkg/Universal/Variable/RuntimeDxe/VariableSmmRuntimeDxeExtra.uni @@ -1,7 +1,7 @@ // /** @file // VariableSmmRuntimeDxe Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "VariableSmmRuntimeDxe module" diff --git a/MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.c b/MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.c index 6dedfbf702..df8062a6cc 100644 --- a/MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.c +++ b/MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.c @@ -1,7 +1,7 @@ /** @file Implementation of Watchdog Timer Architectural Protocol using UEFI APIs. - -Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+ +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at @@ -74,7 +74,7 @@ WatchdogTimerDriverExpires ( if (mWatchdogTimerNotifyFunction != NULL) { mWatchdogTimerNotifyFunction (mWatchdogTimerPeriod); } - + DEBUG ((EFI_D_ERROR, "Watchdog Timer resetting system\n")); // diff --git a/MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.h b/MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.h index e7bb0b2bfd..3eec749f59 100644 --- a/MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.h +++ b/MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.h @@ -1,14 +1,14 @@ /** @file - The internal include file for WatchDogTimer module. - -Copyright (c) 2006 - 2008, Intel Corporation. All rights reserved.
-This program and the accompanying materials -are licensed and made available under the terms and conditions of the BSD License -which accompanies this distribution. The full text of the license may be found at -http://opensource.org/licenses/bsd-license.php - -THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, -WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. + The internal include file for WatchDogTimer module. + +Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
+This program and the accompanying materials +are licensed and made available under the terms and conditions of the BSD License +which accompanies this distribution. The full text of the license may be found at +http://opensource.org/licenses/bsd-license.php + +THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, +WITHOUT WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. **/ diff --git a/MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf b/MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf index bde84574b9..cd2daf3033 100644 --- a/MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf +++ b/MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimer.inf @@ -1,7 +1,7 @@ ## @file # Generic watchdog timer driver producing Watchdog Timer Architectural Protocol using UEFI APIs. # -# Copyright (c) 2006 - 2014, Intel Corporation. All rights reserved.
+# Copyright (c) 2006 - 2018, Intel Corporation. All rights reserved.
# # This program and the accompanying materials # are licensed and made available under the terms and conditions of the BSD License @@ -53,4 +53,4 @@ # [UserExtensions.TianoCore."ExtraFiles"] - WatchdogTimerExtra.uni \ No newline at end of file + WatchdogTimerExtra.uni diff --git a/MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimerExtra.uni b/MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimerExtra.uni index 1d83d5ed25..836d68b5dd 100644 --- a/MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimerExtra.uni +++ b/MdeModulePkg/Universal/WatchdogTimerDxe/WatchdogTimerExtra.uni @@ -1,7 +1,7 @@ // /** @file // WatchdogTimer Localized Strings and Content // -// Copyright (c) 2013 - 2014, Intel Corporation. All rights reserved.
+// Copyright (c) 2013 - 2018, Intel Corporation. All rights reserved.
// // This program and the accompanying materials // are licensed and made available under the terms and conditions of the BSD License @@ -12,8 +12,8 @@ // // **/ -#string STR_PROPERTIES_MODULE_NAME -#language en-US +#string STR_PROPERTIES_MODULE_NAME +#language en-US "Watchdog Timer DXE Driver" -- 2.39.2