diff options
| author | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-28 12:21:04 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal.elmahrouss@icloud.com> | 2024-01-28 12:21:04 +0100 |
| commit | 89326d7a262b48701cec9dba71b43235d18c6e30 (patch) | |
| tree | 65cb88458c14cd8f6cb547410306a81c5feac913 /Private/NewBoot/Source | |
| parent | 43bc0df214e217962bb6b0d7e4f4e47ee8e6153e (diff) | |
Work: getting the bootloader to work on AMD64
Signed-off-by: Amlal El Mahrouss <amlal.elmahrouss@icloud.com>
Diffstat (limited to 'Private/NewBoot/Source')
| -rw-r--r-- | Private/NewBoot/Source/HEL/AMD64/EFIApi.hxx | 10 | ||||
| -rw-r--r-- | Private/NewBoot/Source/HEL/AMD64/EFIApiCrt0.cxx | 15 |
2 files changed, 13 insertions, 12 deletions
diff --git a/Private/NewBoot/Source/HEL/AMD64/EFIApi.hxx b/Private/NewBoot/Source/HEL/AMD64/EFIApi.hxx index a10efc38..6fac74a9 100644 --- a/Private/NewBoot/Source/HEL/AMD64/EFIApi.hxx +++ b/Private/NewBoot/Source/HEL/AMD64/EFIApi.hxx @@ -14,12 +14,12 @@ /// @brief auto-mount and boots from a bootable drive. /// does not return on success. -void newboot_mount_drive(const char* name); -void newboot_boot_file(const char* path); +void newboot_mount_drive(const char *name); +void newboot_boot_file(const char *path); -/// @brief initializes xpm library. +/// @brief initializes epm library. void newboot_init_epm(void); -/// @brief frees the xpm library, called when newboot_auto_mount/newboot_boot_file +/// @brief frees the epm library, called when newboot_auto_mount/newboot_boot_file /// succeeds. -void newboot_fini_xpm(void); +void newboot_fini_epm(void); diff --git a/Private/NewBoot/Source/HEL/AMD64/EFIApiCrt0.cxx b/Private/NewBoot/Source/HEL/AMD64/EFIApiCrt0.cxx index 23357681..916a546d 100644 --- a/Private/NewBoot/Source/HEL/AMD64/EFIApiCrt0.cxx +++ b/Private/NewBoot/Source/HEL/AMD64/EFIApiCrt0.cxx @@ -11,23 +11,24 @@ #define main efi_main -typedef EFI_STATUS(*EfiMainType)(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable); +typedef EFI_STATUS (*EfiMainType)(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable); -EFI_STATUS main(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) +EFI_STATUS main(EFI_HANDLE ImageHandle, EFI_SYSTEM_TABLE *SystemTable) { InitializeLib(ImageHandle, SystemTable); Print(L"NewBoot: Booting from EPM...\r\n"); - newboot_init_epm(); - + // init + newboot_init_epm(); + //! these two should execute a program if any on it. newboot_mount_drive("epm:///system/"); newboot_mount_drive("epm:///efi/"); - newboot_fini_xpm(); - + // bye + newboot_fini_epm(); + Print(L"NewBoot: No auto-mount found.\r\n"); return EFI_LOAD_ERROR; } - |
