summaryrefslogtreecommitdiffhomepage
path: root/Private/NewBoot
diff options
context:
space:
mode:
authorAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-25 16:43:00 +0100
committerAmlal El Mahrouss <amlal@el-mahrouss-logic.com>2024-03-25 16:43:00 +0100
commitbe29b406526c931a606d4d4de545f71e62bc893a (patch)
tree99a37a287dda888803653df9e13cb1336150cb85 /Private/NewBoot
parentf5e0bc85b06c84e0c6bc1da471630d02ff2ed7a3 (diff)
Kernel: A lot of preliminary changes before AHCI and SMP support.
Diffstat (limited to 'Private/NewBoot')
-rw-r--r--Private/NewBoot/BootKit/BootKit.hxx2
-rw-r--r--Private/NewBoot/Source/HEL/AMD64/BootEPM.cxx2
-rw-r--r--Private/NewBoot/Source/HEL/AMD64/BootMain.cxx4
3 files changed, 5 insertions, 3 deletions
diff --git a/Private/NewBoot/BootKit/BootKit.hxx b/Private/NewBoot/BootKit/BootKit.hxx
index bad13d85..7012767c 100644
--- a/Private/NewBoot/BootKit/BootKit.hxx
+++ b/Private/NewBoot/BootKit/BootKit.hxx
@@ -205,4 +205,4 @@ class BVersionString final {
static const CharacterTypeUTF16 *Shared() { return BOOTLOADER_VERSION; }
};
-Void boot_try_write_partition_map(const Char* namePart, SizeT namePartLength, BDeviceATA* ataInterface);
+Void boot_try_read_partition_map(const Char* namePart, SizeT namePartLength, BDeviceATA* ataInterface);
diff --git a/Private/NewBoot/Source/HEL/AMD64/BootEPM.cxx b/Private/NewBoot/Source/HEL/AMD64/BootEPM.cxx
index 36702198..da28a3f3 100644
--- a/Private/NewBoot/Source/HEL/AMD64/BootEPM.cxx
+++ b/Private/NewBoot/Source/HEL/AMD64/BootEPM.cxx
@@ -13,7 +13,7 @@ STATIC const BlockGUID kEPMGuid = {
0x425d,
{0xbe, 0x7b, 0x75, 0xa3, 0x7c, 0xc6, 0x79, 0xbc}};
-Void boot_try_write_partition_map(const Char* namePart, SizeT namePartLength,
+Void boot_try_read_partition_map(const Char* namePart, SizeT namePartLength,
BDeviceATA* ataInterface) {
if (namePartLength > kEPMNameLength || !namePart) return;
if (!ataInterface) return;
diff --git a/Private/NewBoot/Source/HEL/AMD64/BootMain.cxx b/Private/NewBoot/Source/HEL/AMD64/BootMain.cxx
index 1f0bbc9b..21481f85 100644
--- a/Private/NewBoot/Source/HEL/AMD64/BootMain.cxx
+++ b/Private/NewBoot/Source/HEL/AMD64/BootMain.cxx
@@ -47,7 +47,9 @@ EFI_EXTERN_C EFI_API Int EfiMain(EfiHandlePtr ImageHandle,
if (ataDrv) {
Char namePart[kEPMNameLength] = { "BootBlock" };
- boot_try_write_partition_map(namePart, kEPMNameLength, &ataDrv);
+
+ /// tries to read an EPM block, or writes one if it fails.
+ boot_try_read_partition_map(namePart, kEPMNameLength, &ataDrv);
}
/// Read Kernel blob.