summaryrefslogtreecommitdiffhomepage
path: root/Private/NewBoot/Source
diff options
context:
space:
mode:
Diffstat (limited to 'Private/NewBoot/Source')
-rw-r--r--Private/NewBoot/Source/HEL/AMD64/BootEPM.cxx2
-rw-r--r--Private/NewBoot/Source/HEL/AMD64/BootMain.cxx4
2 files changed, 4 insertions, 2 deletions
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.