hrev49059 adds 2 changesets to branch 'master'
old head: 62d30d9e49d587f54159a213a7e68ea47cb5e254
new head: f178e4a2486664eeb56af602d8601521dcb337a6
overview:
http://cgit.haiku-os.org/haiku/log/?qt=range&q=f178e4a24866+%5E62d30d9e49d5
----------------------------------------------------------------------------
f427a82d48f7: arm: Add debug function to dump mmu state
* We don't change the data cache (and other) settings.
Interesting to know their state on each platform.
* Not used by default as it needs called after
serial-init in u-boot
f178e4a24866: arm: bcm2835 framebuffer
* Drop some messy mmu externs
* Set proper page flags
[ Alexander von Gluck IV <kallisti5@xxxxxxxxxxx> ]
----------------------------------------------------------------------------
2 files changed, 40 insertions(+), 4 deletions(-)
.../boot/arch/arm/arch_framebuffer_bcm2835.cpp | 6 ++--
src/system/boot/arch/arm/arch_mmu.cpp | 38 ++++++++++++++++++++
############################################################################
Commit: f427a82d48f7c68e3e4f78f3365ae3f54ad55f51
URL: http://cgit.haiku-os.org/haiku/commit/?id=f427a82d48f7
Author: Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date: Sun Apr 19 23:35:11 2015 UTC
arm: Add debug function to dump mmu state
* We don't change the data cache (and other) settings.
Interesting to know their state on each platform.
* Not used by default as it needs called after
serial-init in u-boot
----------------------------------------------------------------------------
diff --git a/src/system/boot/arch/arm/arch_mmu.cpp
b/src/system/boot/arch/arm/arch_mmu.cpp
index 6dac993..4ffa3dd 100644
--- a/src/system/boot/arch/arm/arch_mmu.cpp
+++ b/src/system/boot/arch/arm/arch_mmu.cpp
@@ -209,6 +209,44 @@ mmu_write_C1(uint32 value)
}
+/*
+ * Dump current MMU Control Register state
+ * For debugging, can be added to loader temporarly post-serial-init
+ */
+void
+mmu_dump_C1()
+{
+ uint32 cpValue = mmu_read_C1();
+
+ dprintf("MMU CP15:c1 State:\n");
+
+ if ((cpValue & (1 << 0)) != 0)
+ dprintf(" - MMU Enabled\n");
+ else
+ dprintf(" - MMU Disabled\n");
+
+ if ((cpValue & (1 << 2)) != 0)
+ dprintf(" - Data Cache Enabled\n");
+ else
+ dprintf(" - Data Cache Disabled\n");
+
+ if ((cpValue & (1 << 3)) != 0)
+ dprintf(" - Write Buffer Enabled\n");
+ else
+ dprintf(" - Write Buffer Disabled\n");
+
+ if ((cpValue & (1 << 12)) != 0)
+ dprintf(" - Instruction Cache Enabled\n");
+ else
+ dprintf(" - Instruction Cache Disabled\n");
+
+ if ((cpValue & (1 << 13)) != 0)
+ dprintf(" - Vector Table @ 0xFFFF0000\n");
+ else
+ dprintf(" - Vector Table @ 0x00000000\n");
+}
+
+
void
mmu_write_DACR(uint32 value)
{
############################################################################
Revision: hrev49059
Commit: f178e4a2486664eeb56af602d8601521dcb337a6
URL: http://cgit.haiku-os.org/haiku/commit/?id=f178e4a24866
Author: Alexander von Gluck IV <kallisti5@xxxxxxxxxxx>
Date: Mon Apr 20 01:13:05 2015 UTC
arm: bcm2835 framebuffer
* Drop some messy mmu externs
* Set proper page flags
----------------------------------------------------------------------------
diff --git a/src/system/boot/arch/arm/arch_framebuffer_bcm2835.cpp
b/src/system/boot/arch/arm/arch_framebuffer_bcm2835.cpp
index 76b0a5f..dcbc48c 100644
--- a/src/system/boot/arch/arm/arch_framebuffer_bcm2835.cpp
+++ b/src/system/boot/arch/arm/arch_framebuffer_bcm2835.cpp
@@ -26,11 +26,10 @@
#include <string.h>
#include "arch_mailbox.h"
+#include "arch_mmu.h"
//XXX
-extern "C" addr_t
-mmu_map_physical_memory(addr_t physicalAddress, size_t size, uint32 flags);
extern "C" bool
mmu_get_virtual_mapping(addr_t virtualAddress, phys_addr_t *_physicalAddress);
@@ -162,8 +161,7 @@ ArchFBArmBCM2835::SetVideoMode(int width, int height, int
depth)
=
BCM283X_BUS_TO_PHYSICAL(sFramebufferConfig.frame_buffer_address);
fSize = sFramebufferConfig.screen_size;
- // kDefaultPageFlags?
- fBase = (addr_t)mmu_map_physical_memory(fPhysicalBase, fSize, 0);
+ fBase = (addr_t)mmu_map_physical_memory(fPhysicalBase, fSize,
kDefaultPageFlags);
dprintf("video framebuffer: va: %p pa: %p\n", (void *)fBase,
(void *)fPhysicalBase);