started link script rewrite - needed lots of symbol changes because leading underscores in symbol names

This commit is contained in:
Markus Fröschle
2012-10-13 21:14:57 +00:00
parent ba38052af4
commit e50cc71df2
7 changed files with 373 additions and 45 deletions

View File

@@ -3,33 +3,34 @@
void _startup(void)
{
asm("\n\t"
".extern _initialize_hardware\n\t"
"bra warmstart\n\t"
"jmp __BOOT_FLASH + 8 | ist zugleich reset vector\n\t"
"jmp ___BOOT_FLASH + 8 | ist zugleich reset vector\n\t"
"| disable interrupts\n\t"
"warmstart:\n\t"
"| disable interrupts\n\t"
"move.w #0x2700,sr\n\t"
"|// Initialize MBAR\n\t"
"MOVE.L #__MBAR,D0\n\t"
"MOVE.L #___MBAR,D0\n\t"
"MOVEC D0,MBAR\n\t"
"MOVE.L D0,rt_mbar\n\t"
"MOVE.L D0,_rt_mbar\n\t"
"| mmu off\n\t"
"move.l #__MMUBAR+1,d0\n\t"
"move.l #___MMUBAR+1,d0\n\t"
"movec d0,MMUBAR | mmubar setzen\n\t"
"clr.l d0\n\t"
"move.l d0,MCF_MMU_MMUCR\n\t | mmu off"
"|/* 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"
"move.l #__RAMBAR1 + 0x1,d0\n\t"""
"move.l #___RAMBAR1 + 0x1,d0\n\t"""
"movec d0,RAMBAR1\n\t"
"| STACKPOINTER AUF ENDE SRAM1\n\t"
"lea __SUP_SP,a7\n\t"
"lea ___SUP_SP,a7\n\t"
"| instruction cache on\n\t"
"move.l #0x000C8100,d0\n\t"
"movec d0,cacr\n\t"
"nop\n\t"
"| initialize any hardware specific issues\n\t"
"bra __initialize_hardware\n\t"
"bra _initialize_hardware\n\t"
);
}