diff options
| author | Amlal <amlalelmahrouss@icloud.com> | 2024-04-26 14:06:51 +0000 |
|---|---|---|
| committer | Amlal <amlalelmahrouss@icloud.com> | 2024-04-26 14:06:51 +0000 |
| commit | db0681412191dcceb5aa99cf31fb8339d6bc4adb (patch) | |
| tree | 590a4ccfa858b45ddeef4a4a279bdbb57f2c80e8 /Private/FirmwareKit | |
| parent | 97eb8462433a831f8a02a08acfc7ca32e794d37d (diff) | |
| parent | 3210d2e3f38a73090bcdbdd68623c676868529ce (diff) | |
Merged in MHR-16 (pull request #7)
MHR-16
Diffstat (limited to 'Private/FirmwareKit')
| -rw-r--r-- | Private/FirmwareKit/EFI/API.hxx | 3 | ||||
| -rw-r--r-- | Private/FirmwareKit/EFI/EFI.hxx | 10 | ||||
| -rw-r--r-- | Private/FirmwareKit/Handover.hxx | 2 |
3 files changed, 7 insertions, 8 deletions
diff --git a/Private/FirmwareKit/EFI/API.hxx b/Private/FirmwareKit/EFI/API.hxx index 0e2ef200..4cf8e603 100644 --- a/Private/FirmwareKit/EFI/API.hxx +++ b/Private/FirmwareKit/EFI/API.hxx @@ -47,8 +47,7 @@ Bascially frees everything we have in the EFI side. inline void ExitBootServices(UInt64 MapKey, EfiHandlePtr ImageHandle) noexcept { if (!ST) return; - while (ST->BootServices->ExitBootServices(ImageHandle, MapKey) != kEfiOk) - ; + ST->BootServices->ExitBootServices(ImageHandle, MapKey); } enum { diff --git a/Private/FirmwareKit/EFI/EFI.hxx b/Private/FirmwareKit/EFI/EFI.hxx index 7f8223cf..c967647c 100644 --- a/Private/FirmwareKit/EFI/EFI.hxx +++ b/Private/FirmwareKit/EFI/EFI.hxx @@ -50,6 +50,9 @@ typedef struct EfiHandle { /* UEFI uses wide characters by default. */ typedef WideChar EfiCharType; +typedef UInt64 EfiPhysicalAddress; +typedef UIntPtr EfiVirtualAddress; + /// What's BootBolicy? /// If TRUE, indicates that the request originates from the boot manager, and /// that the boot manager is attempting to load FilePath as a boot selection. If @@ -200,13 +203,13 @@ typedef struct EfiMemoryDescriptor { /// 0xfffffffffffff000. Kind EFI_PHYSICAL_ADDRESS is defined in the /// AllocatePages() function description /// - UIntPtr PhysicalStart; + EfiPhysicalAddress PhysicalStart; /// /// Virtual address of the first byte in the memory region. /// VirtualStart must be aligned on a 4 KiB boundary, /// and must not be above 0xfffffffffffff000. /// - UIntPtr VirtualStart; + EfiVirtualAddress VirtualStart; /// /// NumberOfPagesNumber of 4 KiB pages in the memory region. /// NumberOfPages must not be 0, and must not be any value @@ -417,9 +420,6 @@ typedef struct EfiFileDevicePathProtocol { WideChar Path[kPathLen]; } EfiFileDevicePathProtocol; -typedef UInt64 EfiPhysicalAddress; -typedef UIntPtr EfiVirtualAddress; - typedef UInt64(EFI_API *EfiExitBootServices)(VoidPtr ImageHandle, UInt32 MapKey); diff --git a/Private/FirmwareKit/Handover.hxx b/Private/FirmwareKit/Handover.hxx index 4131467d..afec440d 100644 --- a/Private/FirmwareKit/Handover.hxx +++ b/Private/FirmwareKit/Handover.hxx @@ -64,7 +64,6 @@ struct HandoverInformationHeader { voidPtr f_VirtualStart; SizeT f_VirtualSize; voidPtr f_PhysicalStart; - SizeT f_PhysicalSize; WideChar f_FirmwareVendorName[32]; SizeT f_FirmwareVendorLen; struct { @@ -79,6 +78,7 @@ struct HandoverInformationHeader { UInt32 f_PixelFormat; UInt32 f_PixelPerLine; } f_GOP; + UInt64 f_FirmwareSpecific[8]; }; /// @brief Bootloader main type. |
