From 772df0f6467ee855e6c25f4ffd9e0c328a524465 Mon Sep 17 00:00:00 2001 From: David Karoly Date: Sun, 12 Mar 2023 10:11:12 +0100 Subject: [PATCH] kernel/arm/paging: assume nothing is dirty This is a workaround to allow early bootup to progress further. Eventually accessed and modified page flags will need to be implemented but for now this patch allows to proceed with bringup attempts for the ARM port. Change-Id: Icad415a5d484213a76a90ca79bb76463140a8bdf Reviewed-on: https://review.haiku-os.org/c/haiku/+/6197 Tested-by: Commit checker robot Tested-by: Automation Reviewed-by: Fredrik Holmqvist --- .../arch/arm/paging/32bit/ARMVMTranslationMap32Bit.cpp | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/system/kernel/arch/arm/paging/32bit/ARMVMTranslationMap32Bit.cpp b/src/system/kernel/arch/arm/paging/32bit/ARMVMTranslationMap32Bit.cpp index 458200e991..3a71cff331 100644 --- a/src/system/kernel/arch/arm/paging/32bit/ARMVMTranslationMap32Bit.cpp +++ b/src/system/kernel/arch/arm/paging/32bit/ARMVMTranslationMap32Bit.cpp @@ -394,7 +394,7 @@ ARMVMTranslationMap32Bit::UnmapPage(VMArea* area, addr_t address, // PageUnmapped() will unlock for us PageUnmapped(area, (oldEntry & ARM_PTE_ADDRESS_MASK) / B_PAGE_SIZE, - true /*(oldEntry & ARM_PTE_ACCESSED) != 0*/, true /*(oldEntry & ARM_PTE_DIRTY) != 0*/, + true /*(oldEntry & ARM_PTE_ACCESSED) != 0*/, false /*(oldEntry & ARM_PTE_DIRTY) != 0*/, updatePageQueue); return B_OK; @@ -462,7 +462,7 @@ ARMVMTranslationMap32Bit::UnmapPages(VMArea* area, addr_t base, size_t size, // transfer the accessed/dirty flags to the page if (/*(oldEntry & ARM_PTE_ACCESSED) != 0*/ true) // XXX IRA page->accessed = true; - if (/*(oldEntry & ARM_PTE_DIRTY) != 0 */ true) + if (/*(oldEntry & ARM_PTE_DIRTY) != 0 */ false) page->modified = true; // remove the mapping object/decrement the wired_count of the @@ -590,7 +590,7 @@ ARMVMTranslationMap32Bit::UnmapArea(VMArea* area, bool deletingAddressSpace, InvalidatePage(address); } - if (true /*(oldEntry & ARM_PTE_DIRTY) != 0*/) + if (false /*(oldEntry & ARM_PTE_DIRTY) != 0*/) page->modified = true; if (pageFullyUnmapped) { @@ -855,7 +855,7 @@ ARMVMTranslationMap32Bit::ClearAccessedAndModified(VMArea* area, addr_t address, pinner.Unlock(); - _modified = true /* (oldEntry & X86_PTE_DIRTY) != 0 */; // XXX IRA + _modified = false /* (oldEntry & X86_PTE_DIRTY) != 0 */; // XXX IRA if (true /*(oldEntry & ARM_PTE_ACCESSED) != 0*/) { // Note, that we only need to invalidate the address, if the