diff --git a/source/start.s b/source/start.s index 52f88b9..4c91264 100644 --- a/source/start.s +++ b/source/start.s @@ -5,6 +5,13 @@ _start: @ Change the stack pointer mov sp, #0x27000000 + @ Disable caches / MPU + mrc p15, 0, r0, c1, c0, 0 @ read control register + bic r0, #(1<<12) @ - instruction cache disable + bic r0, #(1<<2) @ - data cache disable + bic r0, #(1<<0) @ - mpu disable + mcr p15, 0, r0, c1, c0, 0 @ write control register + @ Give read/write access to all the memory regions ldr r0, =0x33333333 mcr p15, 0, r0, c5, c0, 2 @ write data access @@ -32,7 +39,7 @@ _start: mcr p15, 0, r8, c2, c0, 0 @ Data cacheable 0, 3, 5 mcr p15, 0, r8, c2, c0, 1 @ Inst cacheable 0, 3, 5 - @ Enable caches + @ Enable caches / MPU mrc p15, 0, r0, c1, c0, 0 @ read control register orr r0, r0, #(1<<12) @ - instruction cache enable orr r0, r0, #(1<<2) @ - data cache enable