fixed a typo in linker script
avoid copy of BaS if linked to RAM
This commit is contained in:
@@ -78,13 +78,18 @@
|
||||
.global _mmu_init
|
||||
.global _mmutr_miss
|
||||
|
||||
//
|
||||
// to avoid chicken and egg situations, we need to make sure that MMU TLB miss exceptions do not end up in a memory
|
||||
// area that in turn cause a TLB miss exception themself after the MMU is enabled. At least the exception handler must live
|
||||
// in an area that's either covered by one of the ACR's or a locked MMU TLB entry.
|
||||
//
|
||||
.text
|
||||
_mmu_init:
|
||||
move.l d3,-(sp) // Backup registers
|
||||
move.l d2,-(sp)
|
||||
|
||||
clr.l d0
|
||||
movec d0,ASID // ASID allways 0
|
||||
movec d0,ASID // ASID always 0
|
||||
move.l d0,_rt_asid // save shadow register
|
||||
|
||||
move.l #0xC03FC040,d0 // data r/w precise c000'0000-ffff'ffff
|
||||
|
||||
@@ -961,14 +961,22 @@ void initialize_hardware(void) {
|
||||
//video_1280_1024();
|
||||
init_ac97();
|
||||
|
||||
xprintf("copying BaS (%p - %p) to RAM (%p - %p)\r\n", BAS_LMA, BAS_LMA + BAS_SIZE, BAS_IN_RAM, BAS_IN_RAM + BAS_SIZE);
|
||||
memcpy((void *) BAS_IN_RAM, BAS_LMA, BAS_SIZE);
|
||||
xprintf("finished.\r\n");
|
||||
if (BAS_LMA != BAS_IN_RAM)
|
||||
{
|
||||
xprintf("copying BaS (%p - %p) to RAM (%p - %p)\r\n", BAS_LMA, BAS_LMA + BAS_SIZE, BAS_IN_RAM, BAS_IN_RAM + BAS_SIZE);
|
||||
memcpy((void *) BAS_IN_RAM, BAS_LMA, BAS_SIZE);
|
||||
xprintf("finished.\r\n");
|
||||
|
||||
/* we have copied a code area, so flush the caches */
|
||||
flush_and_invalidate_caches();
|
||||
/* we have copied a code area, so flush the caches */
|
||||
flush_and_invalidate_caches();
|
||||
|
||||
/* jump into the BaS in RAM */
|
||||
}
|
||||
else
|
||||
{
|
||||
xprintf("no BaS copy necessary - running from RAM already\r\n");
|
||||
}
|
||||
|
||||
/* jump into the BaS */
|
||||
extern void BaS(void);
|
||||
BaS();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user