added code to access MIDI and IKBD in mmu.c
This commit is contained in:
@@ -4,9 +4,9 @@
|
|||||||
/*
|
/*
|
||||||
* ACIA registers
|
* ACIA registers
|
||||||
*/
|
*/
|
||||||
#define keyctl volatile uint8_t *0xfffc00
|
#define keyctl 0xfffc00
|
||||||
#define keybd volatile uint8_t *0xfffc02
|
#define keybd 0xfffc02
|
||||||
#define midictl volatile uint8_t *0xfffc04
|
#define midictl 0xfffc04
|
||||||
#define midi volatile uint8_t *0xfffc06
|
#define midi 0xfffc06
|
||||||
|
|
||||||
#endif /* _ACIA_H_ */
|
#endif /* _ACIA_H_ */
|
||||||
|
|||||||
@@ -1,4 +1,5 @@
|
|||||||
#include "mmu.h"
|
#include "mmu.h"
|
||||||
|
#include "acia.h"
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* mmu.c
|
* mmu.c
|
||||||
@@ -365,6 +366,21 @@ void mmutr_miss(void)
|
|||||||
debug_print("MMU TLB MISS at 0x%08x\r\n", address);
|
debug_print("MMU TLB MISS at 0x%08x\r\n", address);
|
||||||
flush_and_invalidate_caches();
|
flush_and_invalidate_caches();
|
||||||
|
|
||||||
|
switch (address)
|
||||||
|
{
|
||||||
|
case keyctl:
|
||||||
|
case keybd:
|
||||||
|
/* do something to emulate the IKBD access */
|
||||||
|
debug_print("IKBD access\r\n");
|
||||||
|
break;
|
||||||
|
|
||||||
|
case midictl:
|
||||||
|
case midi:
|
||||||
|
/* do something to emulate MIDI access */
|
||||||
|
debug_print("MIDI ACIA access\r\n");
|
||||||
|
break;
|
||||||
|
|
||||||
|
default:
|
||||||
/* add missed page to TLB */
|
/* add missed page to TLB */
|
||||||
MCF_MMU_MMUTR = (address & 0xfff00000) | /* virtual aligned to 1M */
|
MCF_MMU_MMUTR = (address & 0xfff00000) | /* virtual aligned to 1M */
|
||||||
MCF_MMU_MMUTR_SG | /* shared global */
|
MCF_MMU_MMUTR_SG | /* shared global */
|
||||||
@@ -383,6 +399,7 @@ void mmutr_miss(void)
|
|||||||
MCF_MMU_MMUOR = MCF_MMU_MMUOR_ITLB | /* instruction */
|
MCF_MMU_MMUOR = MCF_MMU_MMUOR_ITLB | /* instruction */
|
||||||
MCF_MMU_MMUOR_ACC | /* access TLB */
|
MCF_MMU_MMUOR_ACC | /* access TLB */
|
||||||
MCF_MMU_MMUOR_UAA; /* update allocation address field */
|
MCF_MMU_MMUOR_UAA; /* update allocation address field */
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user