started link script rewrite - needed lots of symbol changes because leading underscores in symbol names
This commit is contained in:
@@ -4,10 +4,10 @@
|
||||
|
||||
#include "startcf.h"
|
||||
|
||||
.extern ___Bas_base
|
||||
.extern ___SUP_SP
|
||||
.extern ___BOOT_FLASH
|
||||
.extern ___RAMBAR0
|
||||
.extern __Bas_base
|
||||
.extern __SUP_SP
|
||||
.extern __BOOT_FLASH
|
||||
.extern __RAMBAR0
|
||||
.extern _rt_cacr
|
||||
.extern _rt_mod
|
||||
.extern _rt_ssp
|
||||
@@ -16,44 +16,44 @@
|
||||
.extern _illegal_instruction
|
||||
.extern _privileg_violation
|
||||
.extern _mmutr_miss
|
||||
.extern ___MBAR
|
||||
.extern ___MMUBAR
|
||||
.extern __MBAR
|
||||
.extern __MMUBAR
|
||||
.extern _video_tlb
|
||||
.extern _video_sbt
|
||||
.extern cpusha
|
||||
|
||||
/* Register read/write macros */
|
||||
#define MCF_MMU_MMUCR ___MMUBAR
|
||||
#define MCF_MMU_MMUOR ___MMUBAR+0x04
|
||||
#define MCF_MMU_MMUSR ___MMUBAR+0x08
|
||||
#define MCF_MMU_MMUAR ___MMUBAR+0x10
|
||||
#define MCF_MMU_MMUTR ___MMUBAR+0x14
|
||||
#define MCF_MMU_MMUDR ___MMUBAR+0x18
|
||||
#define MCF_MMU_MMUCR __MMUBAR
|
||||
#define MCF_MMU_MMUOR __MMUBAR+0x04
|
||||
#define MCF_MMU_MMUSR __MMUBAR+0x08
|
||||
#define MCF_MMU_MMUAR __MMUBAR+0x10
|
||||
#define MCF_MMU_MMUTR __MMUBAR+0x14
|
||||
#define MCF_MMU_MMUDR __MMUBAR+0x18
|
||||
|
||||
#define MCF_EPORT_EPPAR ___MBAR+0xF00
|
||||
#define MCF_EPORT_EPDDR ___MBAR+0xF04
|
||||
#define MCF_EPORT_EPIER ___MBAR+0xF05
|
||||
#define MCF_EPORT_EPDR ___MBAR+0xF08
|
||||
#define MCF_EPORT_EPPDR ___MBAR+0xF09
|
||||
#define MCF_EPORT_EPFR ___MBAR+0xF0C
|
||||
#define MCF_EPORT_EPPAR __MBAR+0xF00
|
||||
#define MCF_EPORT_EPDDR __MBAR+0xF04
|
||||
#define MCF_EPORT_EPIER __MBAR+0xF05
|
||||
#define MCF_EPORT_EPDR __MBAR+0xF08
|
||||
#define MCF_EPORT_EPPDR __MBAR+0xF09
|
||||
#define MCF_EPORT_EPFR __MBAR+0xF0C
|
||||
|
||||
#define MCF_GPIO_PODR_FEC1L ___MBAR+0xA07
|
||||
#define MCF_GPIO_PODR_FEC1L __MBAR+0xA07
|
||||
|
||||
#define MCF_PSC0_PSCTB_8BIT ___MBAR+0x860C
|
||||
#define MCF_PSC0_PSCTB_8BIT __MBAR+0x860C
|
||||
|
||||
#define MCF_PSC3_PSCRB_8BIT ___MBAR+0x890C
|
||||
#define MCF_PSC3_PSCTB_8BIT ___MBAR+0x890C
|
||||
#define MCF_PSC3_PSCRB_8BIT __MBAR+0x890C
|
||||
#define MCF_PSC3_PSCTB_8BIT __MBAR+0x890C
|
||||
|
||||
.global _vec_init
|
||||
|
||||
//mmu ---------------------------------------------------
|
||||
/* Register read/write macros */
|
||||
#define MCF_MMU_MMUCR ___MMUBAR
|
||||
#define MCF_MMU_MMUOR ___MMUBAR+0x04
|
||||
#define MCF_MMU_MMUSR ___MMUBAR+0x08
|
||||
#define MCF_MMU_MMUAR ___MMUBAR+0x10
|
||||
#define MCF_MMU_MMUTR ___MMUBAR+0x14
|
||||
#define MCF_MMU_MMUDR ___MMUBAR+0x18
|
||||
#define MCF_MMU_MMUCR __MMUBAR
|
||||
#define MCF_MMU_MMUOR __MMUBAR+0x04
|
||||
#define MCF_MMU_MMUSR __MMUBAR+0x08
|
||||
#define MCF_MMU_MMUAR __MMUBAR+0x10
|
||||
#define MCF_MMU_MMUTR __MMUBAR+0x14
|
||||
#define MCF_MMU_MMUDR __MMUBAR+0x18
|
||||
|
||||
|
||||
/* Bit definitions and macros for MCF_MMU_MMUCR */
|
||||
@@ -111,7 +111,7 @@
|
||||
*********************************************************************/
|
||||
|
||||
/* Register read/write macros */
|
||||
#define MCF_GPT0_GMS ___MBAR+0x800
|
||||
#define MCF_GPT0_GMS __MBAR+0x800
|
||||
|
||||
/*********************************************************************
|
||||
*
|
||||
@@ -119,7 +119,7 @@
|
||||
*
|
||||
*********************************************************************/
|
||||
|
||||
#define MCF_SLT0_SCNT ___MBAR+0x908
|
||||
#define MCF_SLT0_SCNT __MBAR+0x908
|
||||
|
||||
/**********************************************************/
|
||||
// macros
|
||||
|
||||
@@ -3,33 +3,34 @@
|
||||
void _startup(void)
|
||||
{
|
||||
asm("\n\t"
|
||||
".extern _initialize_hardware\n\t"
|
||||
"bra warmstart\n\t"
|
||||
"jmp __BOOT_FLASH + 8 | ist zugleich reset vector\n\t"
|
||||
"jmp ___BOOT_FLASH + 8 | ist zugleich reset vector\n\t"
|
||||
"| disable interrupts\n\t"
|
||||
"warmstart:\n\t"
|
||||
"| disable interrupts\n\t"
|
||||
"move.w #0x2700,sr\n\t"
|
||||
"|// Initialize MBAR\n\t"
|
||||
"MOVE.L #__MBAR,D0\n\t"
|
||||
"MOVE.L #___MBAR,D0\n\t"
|
||||
"MOVEC D0,MBAR\n\t"
|
||||
"MOVE.L D0,rt_mbar\n\t"
|
||||
"MOVE.L D0,_rt_mbar\n\t"
|
||||
"| mmu off\n\t"
|
||||
"move.l #__MMUBAR+1,d0\n\t"
|
||||
"move.l #___MMUBAR+1,d0\n\t"
|
||||
"movec d0,MMUBAR | mmubar setzen\n\t"
|
||||
"clr.l d0\n\t"
|
||||
"move.l d0,MCF_MMU_MMUCR\n\t | mmu off"
|
||||
"|/* Initialize RAMBARs: locate SRAM and validate it */\n\t"
|
||||
"move.l #__RAMBAR0 + 0x7,d0\n\t | supervisor only"
|
||||
"move.l #___RAMBAR0 + 0x7,d0\n\t | supervisor only"
|
||||
"movec d0,RAMBAR0\n\t"
|
||||
"move.l #__RAMBAR1 + 0x1,d0\n\t"""
|
||||
"move.l #___RAMBAR1 + 0x1,d0\n\t"""
|
||||
"movec d0,RAMBAR1\n\t"
|
||||
"| STACKPOINTER AUF ENDE SRAM1\n\t"
|
||||
"lea __SUP_SP,a7\n\t"
|
||||
"lea ___SUP_SP,a7\n\t"
|
||||
"| instruction cache on\n\t"
|
||||
"move.l #0x000C8100,d0\n\t"
|
||||
"movec d0,cacr\n\t"
|
||||
"nop\n\t"
|
||||
"| initialize any hardware specific issues\n\t"
|
||||
"bra __initialize_hardware\n\t"
|
||||
"bra _initialize_hardware\n\t"
|
||||
);
|
||||
}
|
||||
|
||||
@@ -11,12 +11,12 @@
|
||||
.extern ___MMUBAR
|
||||
|
||||
/* Register read/write macros */
|
||||
#define MCF_MMU_MMUCR ___MMUBAR
|
||||
#define MCF_MMU_MMUOR ___MMUBAR+0x04
|
||||
#define MCF_MMU_MMUSR ___MMUBAR+0x08
|
||||
#define MCF_MMU_MMUAR ___MMUBAR+0x10
|
||||
#define MCF_MMU_MMUTR ___MMUBAR+0x14
|
||||
#define MCF_MMU_MMUDR ___MMUBAR+0x18
|
||||
#define MCF_MMU_MMUCR __MMUBAR
|
||||
#define MCF_MMU_MMUOR __MMUBAR+0x04
|
||||
#define MCF_MMU_MMUSR __MMUBAR+0x08
|
||||
#define MCF_MMU_MMUAR __MMUBAR+0x10
|
||||
#define MCF_MMU_MMUTR __MMUBAR+0x14
|
||||
#define MCF_MMU_MMUDR __MMUBAR+0x18
|
||||
|
||||
.global _privileg_violation
|
||||
.global cpusha
|
||||
|
||||
@@ -14,7 +14,7 @@
|
||||
static const uint8_t *FPGA_FLASH_DATA = (uint8_t *) 0xe0700000L;
|
||||
static const uint8_t *FPGA_FLASH_DATA_END = (uint8_t *) 0xe0800000L;
|
||||
|
||||
extern unsigned long _VRAM;
|
||||
extern unsigned long __VRAM;
|
||||
extern unsigned long _Bas_base;
|
||||
extern unsigned long BaS;
|
||||
extern unsigned long _BOOT_FLASH[];
|
||||
|
||||
Reference in New Issue
Block a user