Clean up and comments.
This commit is contained in:
@@ -1,19 +1,33 @@
|
|||||||
|
/* This object file must be the first to be linked,
|
||||||
|
* so it will be placed at the very beginning of the ROM.
|
||||||
|
*/
|
||||||
|
|
||||||
.equ MCF_MMU_MMUCR, __MMUBAR + 0
|
.equ MCF_MMU_MMUCR, __MMUBAR + 0
|
||||||
.global _startup
|
|
||||||
|
.global _rom_header
|
||||||
|
.global _rom_entry
|
||||||
|
|
||||||
.extern _initialize_hardware
|
.extern _initialize_hardware
|
||||||
.extern _rt_mbar
|
.extern _rt_mbar
|
||||||
|
|
||||||
_startup:
|
/* ROM header */
|
||||||
bra.s warmstart
|
_rom_header:
|
||||||
jmp ___BOOT_FLASH + 8 /* that's also our reset vector */
|
/* The first long is supposed to be the initial SP.
|
||||||
|
* We replace it by bra.s to allow running the ROM from the first byte.
|
||||||
|
* Then we add a fake jmp instruction for pretty disassembly.
|
||||||
|
*/
|
||||||
|
bra.s _rom_entry // Short jump to the real entry point
|
||||||
|
.short 0x4ef9 // Fake jmp instruction
|
||||||
|
|
||||||
|
/* The second long is the initial PC */
|
||||||
|
.long _rom_entry // Real entry point
|
||||||
|
|
||||||
|
/* ROM entry point */
|
||||||
|
_rom_entry:
|
||||||
/* disable interrupts */
|
/* disable interrupts */
|
||||||
warmstart:
|
|
||||||
move.w #0x2700,SR
|
move.w #0x2700,SR
|
||||||
|
|
||||||
/* Initialize MBAR */
|
/* Initialize MBAR */
|
||||||
|
|
||||||
move.l #__MBAR,d0
|
move.l #__MBAR,d0
|
||||||
movec d0,MBAR
|
movec d0,MBAR
|
||||||
move.l d0,_rt_mbar
|
move.l d0,_rt_mbar
|
||||||
|
|||||||
Reference in New Issue
Block a user