Renamed _tos_base to __TOS.

This commit is contained in:
Vincent Rivière
2012-11-07 21:53:01 +00:00
parent ca1671cf52
commit 97099dc581
3 changed files with 10 additions and 8 deletions

View File

@@ -14,10 +14,10 @@ SECTIONS {
/* ST-RAM */
__STRAM = ___SDRAM;
__STRAM_END = _tos_base;
__STRAM_END = __TOS;
/* TOS */
_tos_base = 0x00e00000;
__TOS = 0x00e00000;
/* FastRAM */
__FASTRAM = 0x10000000;

View File

@@ -11,7 +11,6 @@
#include "bas_printf.h"
extern uint32_t Bas_base[];
extern uint8_t tos_base[];
/* imported routines */
extern int mmu_init();
@@ -25,6 +24,8 @@ extern void wait_10ms();
extern void wait_1ms();
/* Symbols from the linker script */
extern uint8_t _TOS[];
#define TOS ((uint32_t)_TOS) /* final TOS location */
extern uint8_t _EMUTOS[];
#define EMUTOS ((uint32_t)_EMUTOS) /* where EmuTOS is stored in flash */
extern uint8_t _EMUTOS_SIZE[];
@@ -36,7 +37,7 @@ void BaS(void)
int az_sectors;
int i;
uint8_t *src;
uint8_t *dst = tos_base;
uint8_t *dst = (uint8_t *)TOS;
uint32_t *adr;
/*
az_sectors = sd_card_init();
@@ -202,6 +203,6 @@ void BaS(void)
xprintf("Call OS. BaS finished...\r\n");
ROM_HEADER* os_header = (ROM_HEADER*)tos_base;
ROM_HEADER* os_header = (ROM_HEADER*)TOS;
os_header->initial_pc();
}

View File

@@ -16,6 +16,7 @@
.extern cpusha
.extern _video_tlb
.extern _video_sbt
.extern __TOS
/* Register read/write macros */
#define MCF_MMU_MMUCR __MMUBAR
@@ -136,9 +137,9 @@ _mmu_init:
move.l d0,_video_tlb // set page as video page
clr.l _video_sbt // clear time
//-------------------------------------------------------------------------------------
// 00e0'0000 locked
move.l #0x00e00000|std_mmutr,d0
move.l #0x00e00000|cb_mmudr|MCF_MMU_MMUDR_LK,d1
// Make the TOS (in SDRAM) read-only
move.l #__TOS+std_mmutr,d0
move.l #__TOS+cb_mmudr+MCF_MMU_MMUDR_LK,d1
move.l d0,MCF_MMU_MMUTR
move.l d1,MCF_MMU_MMUDR
move.l d2,MCF_MMU_MMUOR // setzen read only ?????? noch nicht