diff options
| author | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-03-23 11:48:58 +0100 |
|---|---|---|
| committer | Amlal El Mahrouss <amlal@el-mahrouss-logic.com> | 2024-03-23 11:48:58 +0100 |
| commit | cc90e0380480a0116a11a89877ad974520cbbba3 (patch) | |
| tree | 37f8bcb831a0f67f9022333926af5404707e7d39 /Private | |
| parent | bade8f979077b0dacb27b13ee4b06922199b3fca (diff) | |
HCR-12: Add documentation for code.
Diffstat (limited to 'Private')
| -rw-r--r-- | Private/NewBoot/Source/HEL/AMD64/BootMain.cxx | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/Private/NewBoot/Source/HEL/AMD64/BootMain.cxx b/Private/NewBoot/Source/HEL/AMD64/BootMain.cxx index 9b7aa034..b9e59db4 100644 --- a/Private/NewBoot/Source/HEL/AMD64/BootMain.cxx +++ b/Private/NewBoot/Source/HEL/AMD64/BootMain.cxx @@ -17,14 +17,21 @@ #define kMaxBufSize 256 +/// @brief kernel main entrypoint/ +/// @param handoverInfo EXTERN_C void Main(HEL::HandoverInformationHeader* handoverInfo); +/// @brief Bootloader main type. typedef void (*bt_main_type)(HEL::HandoverInformationHeader* handoverInfo); +/// @brief Main EFI entrypoint. +/// @param ImageHandle Handle of this image. +/// @param SystemTable The system table of it. +/// @return EFI_EXTERN_C EFI_API Int EfiMain(EfiHandlePtr ImageHandle, EfiSystemTable* SystemTable) { - InitEFI(SystemTable); // Init the efi library. - InitGOP(); // Quick Toolkit for UI + InitEFI(SystemTable); // Init the EFI library. + InitGOP(); // Init the GOP. BTextWriter writer; /// Splash screen stuff @@ -39,7 +46,7 @@ EFI_EXTERN_C EFI_API Int EfiMain(EfiHandlePtr ImageHandle, BDeviceATA ataDrv; if (ataDrv) { - Char namePart[kEPMNameLength] = { "HCoreSystemPartition" }; + Char namePart[kEPMNameLength] = { "BootBlock" }; boot_try_write_partition_map(namePart, kEPMNameLength, &ataDrv); } @@ -55,7 +62,7 @@ EFI_EXTERN_C EFI_API Int EfiMain(EfiHandlePtr ImageHandle, // This will tell us about the current kernel. BFileReader systemManifest(L".MANIFEST", ImageHandle); - systemManifest.Size(1); + systemManifest.Size(kMaxBufSize); systemManifest.ReadAll(); UInt32 MapKey = 0; |
