thanks to ultimo and others I think I have the pi2 switching back to svc and secure mode now.
and other cleanup
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
|
||||
#ARMGNU ?= arm-none-eabi
|
||||
ARMGNU ?= arm-linux-gnueabi
|
||||
ARMGNU ?= arm-none-eabi
|
||||
#ARMGNU ?= arm-linux-gnueabi
|
||||
|
||||
COPS = -Wall -O2 -nostdlib -nostartfiles -ffreestanding
|
||||
|
||||
|
||||
@@ -32,27 +32,33 @@ extern unsigned int timer_tick ( void );
|
||||
extern void start1 ( void );
|
||||
extern void start2 ( void );
|
||||
extern void start3 ( void );
|
||||
|
||||
extern unsigned int showcpu0 ( void );
|
||||
|
||||
//------------------------------------------------------------------------
|
||||
int notmain ( void )
|
||||
{
|
||||
unsigned int ra;
|
||||
unsigned int rb;
|
||||
unsigned int rc;
|
||||
|
||||
uart_init();
|
||||
hexstring(0x12345678);
|
||||
|
||||
hexstring(showcpu0());
|
||||
PUT32(0x40,0);
|
||||
ra=GET32(0x40);
|
||||
start1();
|
||||
start2();
|
||||
start3();
|
||||
while(1)
|
||||
for(rc=0;rc<10;)
|
||||
//while(1)
|
||||
{
|
||||
rb=GET32(0x40);
|
||||
if(rb!=ra)
|
||||
{
|
||||
ra=rb;
|
||||
hexstring(ra);
|
||||
rc++;
|
||||
}
|
||||
}
|
||||
return(0);
|
||||
|
||||
@@ -27,6 +27,12 @@ GETPC:
|
||||
mov r0,lr
|
||||
bx lr
|
||||
|
||||
.globl showcpu0
|
||||
showcpu0:
|
||||
mrc p15, 0, r0, c0, c0, 5
|
||||
bx lr
|
||||
|
||||
|
||||
|
||||
.globl start1
|
||||
start1:
|
||||
|
||||
Reference in New Issue
Block a user