Fixed correct inline assembly usage.

This commit is contained in:
Vincent Rivière
2012-10-14 20:54:20 +00:00
parent 4e6371ec0f
commit 1134522122

View File

@@ -2,7 +2,7 @@
void startup(void) void startup(void)
{ {
asm("\n\t" __asm__ __volatile__ ("\n\t"
".extern _initialize_hardware\n\t" ".extern _initialize_hardware\n\t"
"bra.s warmstart\n\t" "bra.s warmstart\n\t"
"jmp ___BOOT_FLASH + 8 | ist zugleich reset vector\n\t" "jmp ___BOOT_FLASH + 8 | ist zugleich reset vector\n\t"
@@ -10,20 +10,20 @@ void startup(void)
"warmstart:\n\t" "warmstart:\n\t"
"| disable interrupts\n\t" "| disable interrupts\n\t"
"move.w #0x2700,sr\n\t" "move.w #0x2700,sr\n\t"
); : : : "memory");
/* Initialize MBAR */ /* Initialize MBAR */
asm("MOVE.L #__MBAR,D0\n\t"); __asm__ __volatile__ ("MOVE.L #__MBAR,D0\n\t" : : : "memory");
asm("MOVEC D0,MBAR\n\t"); __asm__ __volatile__ ("MOVEC D0,MBAR\n\t" : : : "memory");
asm("MOVE.L D0,_rt_mbar\n\t"); __asm__ __volatile__ ("MOVE.L D0,_rt_mbar\n\t" : : : "memory");
/* mmu off */ /* mmu off */
asm("move.l #__MMUBAR+1,d0\n\t"); __asm__ __volatile__ ("move.l #__MMUBAR+1,d0\n\t" : : : "memory");
asm("movec d0,MMUBAR"); /* set mmubar */ __asm__ __volatile__ ("movec d0,MMUBAR" : : : "memory"); /* set mmubar */
MCF_MMU_MMUCR = 0L; /* MMU off */ MCF_MMU_MMUCR = 0L; /* MMU off */
asm( __asm__ __volatile__ (
"|/* Initialize RAMBARs: locate SRAM and validate it */\n\t" "|/* Initialize RAMBARs: locate SRAM and validate it */\n\t"
"move.l #__RAMBAR0 + 0x7,d0\n\t | supervisor only" "move.l #__RAMBAR0 + 0x7,d0\n\t | supervisor only"
"movec d0,RAMBAR0\n\t" "movec d0,RAMBAR0\n\t"
@@ -37,5 +37,5 @@ void startup(void)
"nop\n\t" "nop\n\t"
"| initialize any hardware specific issues\n\t" "| initialize any hardware specific issues\n\t"
"bra _initialize_hardware\n\t" "bra _initialize_hardware\n\t"
); : : : "memory");
} }