Use CR constants instead of hardcoded values
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
2023-01-04 16:33:28 +01:00
parent a5b3350559
commit b7e5f1b5c1
3 changed files with 72 additions and 2 deletions

View File

@@ -206,13 +206,13 @@ BlEnablePaging(IN PLIST_ENTRY MemoryMappings,
MemoryMap->DescriptorVersion, MemoryMap->Map);
/* Enable Physical Address Extension (PAE) */
HlWriteControlRegister(4, HlReadControlRegister(4) | 0x00000020);
HlWriteControlRegister(4, HlReadControlRegister(4) | CR4_PAE);
/* Write page mappings to CR3 */
HlWriteControlRegister(3, (UINT_PTR)*PtePointer);
/* Enable paging */
HlWriteControlRegister(0, HlReadControlRegister(0) | 0x80000000);
HlWriteControlRegister(0, HlReadControlRegister(0) | CR0_PG);
/* Return success */
return STATUS_EFI_SUCCESS;