From b7aa0a94ff7d495bdb300508bf0a34b8072827fb Mon Sep 17 00:00:00 2001 From: Alexander von Gluck IV Date: Thu, 24 May 2012 10:25:52 -0500 Subject: [PATCH] ARM platform: Undo change to MMU page table assignment * While the baremetal arm book I have says mrc, it breaks verdex and doesn't work on the Pi. * Moving the page table address to the p15 coprocessor makes more logical sense anyway... i think mrc was a typo. --- src/system/boot/platform/raspberrypi_arm/mmu.cpp | 2 +- src/system/boot/platform/u-boot/mmu.cpp | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/src/system/boot/platform/raspberrypi_arm/mmu.cpp b/src/system/boot/platform/raspberrypi_arm/mmu.cpp index b80ad8b79f..bf1d3d6c2f 100644 --- a/src/system/boot/platform/raspberrypi_arm/mmu.cpp +++ b/src/system/boot/platform/raspberrypi_arm/mmu.cpp @@ -200,7 +200,7 @@ mmu_set_TTBR(uint32 ttb) { TRACE("%s: Set Translation Table Base to 0x%" B_PRIx32 "\n", __func__, ttb); ttb &= 0xffffc000; - asm volatile("MRC p15, 0, %[adr], c2, c0, 0"::[adr] "r" (ttb)); + asm volatile("MCR p15, 0, %[adr], c2, c0, 0"::[adr] "r" (ttb)); } diff --git a/src/system/boot/platform/u-boot/mmu.cpp b/src/system/boot/platform/u-boot/mmu.cpp index 60891dcfdd..bab74229fd 100644 --- a/src/system/boot/platform/u-boot/mmu.cpp +++ b/src/system/boot/platform/u-boot/mmu.cpp @@ -205,7 +205,7 @@ void mmu_set_TTBR(uint32 ttb) { ttb &= 0xffffc000; - asm volatile("MRC p15, 0, %[adr], c2, c0, 0"::[adr] "r" (ttb)); + asm volatile("MCR p15, 0, %[adr], c2, c0, 0"::[adr] "r" (ttb)); }