Clean up CACR initialization.
This commit is contained in:
@@ -81,9 +81,6 @@ void clear_caches(void)
|
|||||||
" move.l d0,a0\n\t"
|
" move.l d0,a0\n\t"
|
||||||
" cmpi.w #4,d0 | all ways?\n\t"
|
" cmpi.w #4,d0 | all ways?\n\t"
|
||||||
" bne cfa_setloop | no->\n\t"
|
" bne cfa_setloop | no->\n\t"
|
||||||
" nop\n\t"
|
|
||||||
" move.l _rt_cacr,d0 | get cacr shadow register\n\t"
|
|
||||||
" movec d0,cacr | set old value\n\t"
|
|
||||||
" move.l (sp)+,d2\n\t"
|
" move.l (sp)+,d2\n\t"
|
||||||
" move.w d2,sr | restore previous interrupt mask\n\t"
|
" move.w d2,sr | restore previous interrupt mask\n\t"
|
||||||
/* input */ :
|
/* input */ :
|
||||||
|
|||||||
@@ -82,9 +82,6 @@ _mmu_init:
|
|||||||
clr.l d0
|
clr.l d0
|
||||||
movec d0,ASID // ASID allways 0
|
movec d0,ASID // ASID allways 0
|
||||||
move.l d0,_rt_asid // sichern
|
move.l d0,_rt_asid // sichern
|
||||||
movec d0,cacr // cache aus
|
|
||||||
move.l d0,_rt_cacr // sichern
|
|
||||||
nop
|
|
||||||
|
|
||||||
move.l #0xC03FC040,d0 // data r/w precise c000'0000-ffff'ffff
|
move.l #0xC03FC040,d0 // data r/w precise c000'0000-ffff'ffff
|
||||||
movec d0,ACR0
|
movec d0,ACR0
|
||||||
@@ -171,10 +168,6 @@ _mmu_init:
|
|||||||
move.l d1,MCF_MMU_MMUDR
|
move.l d1,MCF_MMU_MMUDR
|
||||||
move.l d3,MCF_MMU_MMUOR // setzen instr
|
move.l d3,MCF_MMU_MMUOR // setzen instr
|
||||||
*/
|
*/
|
||||||
move.l #0xa10ca120,d0
|
|
||||||
move.l d0,_rt_cacr // sichern
|
|
||||||
movec d0,cacr
|
|
||||||
nop
|
|
||||||
rts
|
rts
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
|||||||
@@ -33,10 +33,14 @@ warmstart:
|
|||||||
/* set stack pointer to end of SRAM1 */
|
/* set stack pointer to end of SRAM1 */
|
||||||
lea __SUP_SP,a7
|
lea __SUP_SP,a7
|
||||||
|
|
||||||
/* instruction cache on */
|
/* Initialize the processor caches.
|
||||||
move.l #0x000C8100,d0
|
* The instruction cache is fully enabled.
|
||||||
|
* The data cache is enabled, but cache-inhibited by default.
|
||||||
|
* Later, the MMU will fully activate the data cache for specific areas.
|
||||||
|
* It is important to enable both caches now, otherwise cpushl would hang.
|
||||||
|
*/
|
||||||
|
move.l #0xa50c8120,d0
|
||||||
movec d0,cacr
|
movec d0,cacr
|
||||||
nop
|
|
||||||
|
|
||||||
/* initialize any hardware specific issues */
|
/* initialize any hardware specific issues */
|
||||||
bra _initialize_hardware
|
bra _initialize_hardware
|
||||||
|
|||||||
@@ -573,9 +573,6 @@ cfa_setloop:
|
|||||||
move.l d0,a0
|
move.l d0,a0
|
||||||
cmpi.w #4,d0 // all ways?
|
cmpi.w #4,d0 // all ways?
|
||||||
bne cfa_setloop // nein->
|
bne cfa_setloop // nein->
|
||||||
nop
|
|
||||||
move.l _rt_cacr,d0 // holen
|
|
||||||
movec d0,cacr // setzen
|
|
||||||
move.w d2,sr // alte interrupt maske
|
move.w d2,sr // alte interrupt maske
|
||||||
movem.l (a7),d0-d2/a0 // register zur<EFBFBD>ck
|
movem.l (a7),d0-d2/a0 // register zur<EFBFBD>ck
|
||||||
lea 16(a7),a7
|
lea 16(a7),a7
|
||||||
|
|||||||
@@ -675,14 +675,6 @@ void initialize_hardware(void) {
|
|||||||
uint32_t *dst; /* destination address to copy to */
|
uint32_t *dst; /* destination address to copy to */
|
||||||
uint32_t *jmp; /* address of BaS() routine to jmp at after copy */
|
uint32_t *jmp; /* address of BaS() routine to jmp at after copy */
|
||||||
|
|
||||||
__asm__ __volatile__(
|
|
||||||
"move.l #0x000C8120,D0\n\t"
|
|
||||||
"move.l D0,_rt_cacr\n\t"
|
|
||||||
"movec D0,CACR\n\t"
|
|
||||||
"nop\n\t"
|
|
||||||
: : : "d0", "memory"
|
|
||||||
);
|
|
||||||
|
|
||||||
init_gpio();
|
init_gpio();
|
||||||
init_serial();
|
init_serial();
|
||||||
init_slt();
|
init_slt();
|
||||||
|
|||||||
Reference in New Issue
Block a user