diff options
Diffstat (limited to 'c/src/lib/libbsp/m68k/efi332/start')
-rw-r--r-- | c/src/lib/libbsp/m68k/efi332/start/.cvsignore | 2 | ||||
-rw-r--r-- | c/src/lib/libbsp/m68k/efi332/start/Makefile.am | 65 | ||||
-rw-r--r-- | c/src/lib/libbsp/m68k/efi332/start/except_vect_332_ROM.S | 290 | ||||
-rw-r--r-- | c/src/lib/libbsp/m68k/efi332/start/ram_init.ld | 22 | ||||
-rw-r--r-- | c/src/lib/libbsp/m68k/efi332/start/ram_init.sed | 47 | ||||
-rw-r--r-- | c/src/lib/libbsp/m68k/efi332/start/start.c | 228 |
6 files changed, 0 insertions, 654 deletions
diff --git a/c/src/lib/libbsp/m68k/efi332/start/.cvsignore b/c/src/lib/libbsp/m68k/efi332/start/.cvsignore deleted file mode 100644 index 282522db03..0000000000 --- a/c/src/lib/libbsp/m68k/efi332/start/.cvsignore +++ /dev/null @@ -1,2 +0,0 @@ -Makefile -Makefile.in diff --git a/c/src/lib/libbsp/m68k/efi332/start/Makefile.am b/c/src/lib/libbsp/m68k/efi332/start/Makefile.am deleted file mode 100644 index 917008e050..0000000000 --- a/c/src/lib/libbsp/m68k/efi332/start/Makefile.am +++ /dev/null @@ -1,65 +0,0 @@ -## -## $Id$ -## - -C_FILES = start.c -OBJS = $(C_FILES:%.c=$(ARCH)/%$(LIB_VARIANT).$(OBJEXT)) -S_FILES = except_vect_332_ROM.S -OBJS += $(S_FILES:%.c=$(ARCH)/%$(LIB_VARIANT).$(OBJEXT)) - -include $(top_srcdir)/../../../../automake/compile.am -include $(top_srcdir)/../../../../automake/lib.am -include $(top_srcdir)/../../bspstart.am - -# -# (OPTIONAL) Add local stuff here using += -# - -project_lib_DATA = $(ARCH)/start$(LIB_VARIANT).$(OBJEXT) -project_lib_DATA += $(ARCH)/except_vect_332_ROM$(LIB_VARIANT).$(OBJEXT) -project_lib_DATA += $(ARCH)/ram_init$(LIB_VARIANT) -project_lib_DATA += $(ARCH)/ram_init_FW$(LIB_VARIANT) - -$(ARCH)/ram_init$(LIB_VARIANT): $(srcdir)/start.c $(srcdir)/ram_init.ld $(srcdir)/ram_init.sed $(ARCH)/$(dirstamp) - sed -f $(srcdir)/ram_init.sed $(srcdir)/start.c >$(ARCH)/ram_init.S - $(CC) -D SIM_CRB=0x0000 -E $(ARCH)/ram_init.S >$(ARCH)/ram_init1.S - sed "/.$(OBJEXT)rg/ {N; s/\n/%/; P;}; /\.text/P; D;" $(ARCH)/ram_init1.S | \ - sort | sed "h;1{s/.*/.data/;P;g;};s/%.*//;P;g;s/.*%//;" \ - >$(ARCH)/ram_init2.S - $(CC) -nostdlib -Wl,-T$(srcdir)/ram_init.ld $(ARCH)/ram_init2.S \ - -o $(ARCH)/ram_init$(LIB_VARIANT) - -$(ARCH)/ram_init_FW$(LIB_VARIANT): $(srcdir)/ram_init.ld $(ARCH)/ram_init.S $(ARCH)/$(dirstamp) - $(CC) -D FLASHWRITE -D SIM_CRB=0x0000 -E $(ARCH)/ram_init.S \ - >$(ARCH)/ram_init_FW1.S - sed "/.$(OBJEXT)rg/ {N; s/\n/%/; P;}; /\.text/P; D;" $(ARCH)/ram_init_FW1.S | \ - sort | sed "h;1{s/.*/.data/;P;g;};s/%.*//;P;g;s/.*%//;" \ - >$(ARCH)/ram_init_FW2.S - $(CC) -nostdlib -Wl,-T$(srcdir)/ram_init.ld $(ARCH)/ram_init_FW2.S \ - -o $(ARCH)/ram_init_FW$(LIB_VARIANT) - -all-local: $(TMPINSTALL_FILES) - -EXTRA_DIST = start.c except_vect_332_ROM.S ram_init.ld ram_init.sed - -$(PROJECT_LIB)/$(dirstamp): - @$(mkdir_p) $(PROJECT_LIB) - @: > $(PROJECT_LIB)/$(dirstamp) - -$(PROJECT_LIB)/start$(LIB_VARIANT).$(OBJEXT): $(ARCH)/start$(LIB_VARIANT).$(OBJEXT) $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/start$(LIB_VARIANT).$(OBJEXT) -TMPINSTALL_FILES += $(PROJECT_LIB)/start$(LIB_VARIANT).$(OBJEXT) - -$(PROJECT_LIB)/except_vect_332_ROM$(LIB_VARIANT).$(OBJEXT): $(ARCH)/except_vect_332_ROM$(LIB_VARIANT).$(OBJEXT) $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/except_vect_332_ROM$(LIB_VARIANT).$(OBJEXT) -TMPINSTALL_FILES += $(PROJECT_LIB)/except_vect_332_ROM$(LIB_VARIANT).$(OBJEXT) - -$(PROJECT_LIB)/ram_init$(LIB_VARIANT): $(ARCH)/ram_init$(LIB_VARIANT) $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/ram_init$(LIB_VARIANT) -TMPINSTALL_FILES += $(PROJECT_LIB)/ram_init$(LIB_VARIANT) - -$(PROJECT_LIB)/ram_init_FW$(LIB_VARIANT): $(ARCH)/ram_init_FW$(LIB_VARIANT) $(PROJECT_LIB)/$(dirstamp) - $(INSTALL_DATA) $< $(PROJECT_LIB)/ram_init_FW$(LIB_VARIANT) -TMPINSTALL_FILES += $(PROJECT_LIB)/ram_init_FW$(LIB_VARIANT) - -include $(top_srcdir)/../../../../automake/local.am diff --git a/c/src/lib/libbsp/m68k/efi332/start/except_vect_332_ROM.S b/c/src/lib/libbsp/m68k/efi332/start/except_vect_332_ROM.S deleted file mode 100644 index 9eb2f20556..0000000000 --- a/c/src/lib/libbsp/m68k/efi332/start/except_vect_332_ROM.S +++ /dev/null @@ -1,290 +0,0 @@ -/* - * $Id$ - */ - -/* Exception Vector definitions follow */ - - /* !!! Warning !!! This table is not tested, and - the user must make sure it is complete. */ - - /* If we use TRAP #15 for reboot, note that group 0 and 1 exceptions - will have priority. */ - - /* Vector 0: RESET: Initial SSP */ - .long _RamEnd - /* Vector 1: RESET: Initial PC */ - .long start - - /* default action for undefined vectors is to re-boot */ - - /* Note group 0 and 1 exception (like trace) have priority - over other exceptions (like trap #15) that may call this. */ - - /* Vectors 2-255 */ - .long reboot /* exception vector: 2 */ - .long reboot /* exception vector: 3 */ - .long reboot /* exception vector: 4 */ - .long reboot /* exception vector: 5 */ - .long reboot /* exception vector: 6 */ - .long reboot /* exception vector: 7 */ - .long reboot /* exception vector: 8 */ - .long reboot /* exception vector: 9 */ - .long reboot /* exception vector: 10 */ - .long reboot /* exception vector: 11 */ - .long reboot /* exception vector: 12 */ - .long reboot /* exception vector: 13 */ - .long reboot /* exception vector: 14 */ - .long reboot /* exception vector: 15 */ - .long reboot /* exception vector: 16 */ - .long reboot /* exception vector: 17 */ - .long reboot /* exception vector: 18 */ - .long reboot /* exception vector: 19 */ - .long reboot /* exception vector: 20 */ - .long reboot /* exception vector: 21 */ - .long reboot /* exception vector: 22 */ - .long reboot /* exception vector: 23 */ - .long reboot /* exception vector: 24 */ - .long reboot /* exception vector: 25 */ - .long reboot /* exception vector: 26 */ - .long reboot /* exception vector: 27 */ - .long reboot /* exception vector: 28 */ - .long reboot /* exception vector: 29 */ - .long reboot /* exception vector: 30 */ - .long reboot /* exception vector: 31 */ - .long reboot /* exception vector: 32 */ - .long reboot /* exception vector: 33 */ - .long reboot /* exception vector: 34 */ - .long reboot /* exception vector: 35 */ - .long reboot /* exception vector: 36 */ - .long reboot /* exception vector: 37 */ - .long reboot /* exception vector: 38 */ - .long reboot /* exception vector: 39 */ - .long reboot /* exception vector: 40 */ - .long reboot /* exception vector: 41 */ - .long reboot /* exception vector: 42 */ - .long reboot /* exception vector: 43 */ - .long reboot /* exception vector: 44 */ - .long reboot /* exception vector: 45 */ - .long reboot /* exception vector: 46 */ - .long _reboot /* the reboot trap: 47 */ - .long reboot /* exception vector: 48 */ - .long reboot /* exception vector: 49 */ - .long reboot /* exception vector: 50 */ - .long reboot /* exception vector: 51 */ - .long reboot /* exception vector: 52 */ - .long reboot /* exception vector: 53 */ - .long reboot /* exception vector: 54 */ - .long reboot /* exception vector: 55 */ - .long reboot /* exception vector: 56 */ - .long reboot /* exception vector: 57 */ - .long reboot /* exception vector: 58 */ - .long reboot /* exception vector: 59 */ - .long reboot /* exception vector: 60 */ - .long reboot /* exception vector: 61 */ - .long reboot /* exception vector: 62 */ - .long reboot /* exception vector: 63 */ - .long reboot /* exception vector: 64 */ - .long reboot /* exception vector: 65 */ - .long reboot /* exception vector: 66 */ - .long reboot /* exception vector: 67 */ - .long reboot /* exception vector: 68 */ - .long reboot /* exception vector: 69 */ - .long reboot /* exception vector: 70 */ - .long reboot /* exception vector: 71 */ - .long reboot /* exception vector: 72 */ - .long reboot /* exception vector: 73 */ - .long reboot /* exception vector: 74 */ - .long reboot /* exception vector: 75 */ - .long reboot /* exception vector: 76 */ - .long reboot /* exception vector: 77 */ - .long reboot /* exception vector: 78 */ - .long reboot /* exception vector: 79 */ - .long reboot /* exception vector: 80 */ - .long reboot /* exception vector: 81 */ - .long reboot /* exception vector: 82 */ - .long reboot /* exception vector: 83 */ - .long reboot /* exception vector: 84 */ - .long reboot /* exception vector: 85 */ - .long reboot /* exception vector: 86 */ - .long reboot /* exception vector: 87 */ - .long reboot /* exception vector: 88 */ - .long reboot /* exception vector: 89 */ - .long reboot /* exception vector: 90 */ - .long reboot /* exception vector: 91 */ - .long reboot /* exception vector: 92 */ - .long reboot /* exception vector: 93 */ - .long reboot /* exception vector: 94 */ - .long reboot /* exception vector: 95 */ - .long reboot /* exception vector: 96 */ - .long reboot /* exception vector: 97 */ - .long reboot /* exception vector: 98 */ - .long reboot /* exception vector: 99 */ - .long reboot /* exception vector: 100 */ - .long reboot /* exception vector: 101 */ - .long reboot /* exception vector: 102 */ - .long reboot /* exception vector: 103 */ - .long reboot /* exception vector: 104 */ - .long reboot /* exception vector: 105 */ - .long reboot /* exception vector: 106 */ - .long reboot /* exception vector: 107 */ - .long reboot /* exception vector: 108 */ - .long reboot /* exception vector: 109 */ - .long reboot /* exception vector: 110 */ - .long reboot /* exception vector: 111 */ - .long reboot /* exception vector: 112 */ - .long reboot /* exception vector: 113 */ - .long reboot /* exception vector: 114 */ - .long reboot /* exception vector: 115 */ - .long reboot /* exception vector: 116 */ - .long reboot /* exception vector: 117 */ - .long reboot /* exception vector: 118 */ - .long reboot /* exception vector: 119 */ - .long reboot /* exception vector: 120 */ - .long reboot /* exception vector: 121 */ - .long reboot /* exception vector: 122 */ - .long reboot /* exception vector: 123 */ - .long reboot /* exception vector: 124 */ - .long reboot /* exception vector: 125 */ - .long reboot /* exception vector: 126 */ - .long reboot /* exception vector: 127 */ - .long reboot /* exception vector: 128 */ - .long reboot /* exception vector: 129 */ - .long reboot /* exception vector: 130 */ - .long reboot /* exception vector: 131 */ - .long reboot /* exception vector: 132 */ - .long reboot /* exception vector: 133 */ - .long reboot /* exception vector: 134 */ - .long reboot /* exception vector: 135 */ - .long reboot /* exception vector: 136 */ - .long reboot /* exception vector: 137 */ - .long reboot /* exception vector: 138 */ - .long reboot /* exception vector: 139 */ - .long reboot /* exception vector: 140 */ - .long reboot /* exception vector: 141 */ - .long reboot /* exception vector: 142 */ - .long reboot /* exception vector: 143 */ - .long reboot /* exception vector: 144 */ - .long reboot /* exception vector: 145 */ - .long reboot /* exception vector: 146 */ - .long reboot /* exception vector: 147 */ - .long reboot /* exception vector: 148 */ - .long reboot /* exception vector: 149 */ - .long reboot /* exception vector: 150 */ - .long reboot /* exception vector: 151 */ - .long reboot /* exception vector: 152 */ - .long reboot /* exception vector: 153 */ - .long reboot /* exception vector: 154 */ - .long reboot /* exception vector: 155 */ - .long reboot /* exception vector: 156 */ - .long reboot /* exception vector: 157 */ - .long reboot /* exception vector: 158 */ - .long reboot /* exception vector: 159 */ - .long reboot /* exception vector: 160 */ - .long reboot /* exception vector: 161 */ - .long reboot /* exception vector: 162 */ - .long reboot /* exception vector: 163 */ - .long reboot /* exception vector: 164 */ - .long reboot /* exception vector: 165 */ - .long reboot /* exception vector: 166 */ - .long reboot /* exception vector: 167 */ - .long reboot /* exception vector: 168 */ - .long reboot /* exception vector: 169 */ - .long reboot /* exception vector: 170 */ - .long reboot /* exception vector: 171 */ - .long reboot /* exception vector: 172 */ - .long reboot /* exception vector: 173 */ - .long reboot /* exception vector: 174 */ - .long reboot /* exception vector: 175 */ - .long reboot /* exception vector: 176 */ - .long reboot /* exception vector: 177 */ - .long reboot /* exception vector: 178 */ - .long reboot /* exception vector: 179 */ - .long reboot /* exception vector: 180 */ - .long reboot /* exception vector: 181 */ - .long reboot /* exception vector: 182 */ - .long reboot /* exception vector: 183 */ - .long reboot /* exception vector: 184 */ - .long reboot /* exception vector: 185 */ - .long reboot /* exception vector: 186 */ - .long reboot /* exception vector: 187 */ - .long reboot /* exception vector: 188 */ - .long reboot /* exception vector: 189 */ - .long reboot /* exception vector: 190 */ - .long reboot /* exception vector: 191 */ - .long reboot /* exception vector: 192 */ - .long reboot /* exception vector: 193 */ - .long reboot /* exception vector: 194 */ - .long reboot /* exception vector: 195 */ - .long reboot /* exception vector: 196 */ - .long reboot /* exception vector: 197 */ - .long reboot /* exception vector: 198 */ - .long reboot /* exception vector: 199 */ - .long reboot /* exception vector: 200 */ - .long reboot /* exception vector: 201 */ - .long reboot /* exception vector: 202 */ - .long reboot /* exception vector: 203 */ - .long reboot /* exception vector: 204 */ - .long reboot /* exception vector: 205 */ - .long reboot /* exception vector: 206 */ - .long reboot /* exception vector: 207 */ - .long reboot /* exception vector: 208 */ - .long reboot /* exception vector: 209 */ - .long reboot /* exception vector: 210 */ - .long reboot /* exception vector: 211 */ - .long reboot /* exception vector: 212 */ - .long reboot /* exception vector: 213 */ - .long reboot /* exception vector: 214 */ - .long reboot /* exception vector: 215 */ - .long reboot /* exception vector: 216 */ - .long reboot /* exception vector: 217 */ - .long reboot /* exception vector: 218 */ - .long reboot /* exception vector: 219 */ - .long reboot /* exception vector: 220 */ - .long reboot /* exception vector: 221 */ - .long reboot /* exception vector: 222 */ - .long reboot /* exception vector: 223 */ - .long reboot /* exception vector: 224 */ - .long reboot /* exception vector: 225 */ - .long reboot /* exception vector: 226 */ - .long reboot /* exception vector: 227 */ - .long reboot /* exception vector: 228 */ - .long reboot /* exception vector: 229 */ - .long reboot /* exception vector: 230 */ - .long reboot /* exception vector: 231 */ - .long reboot /* exception vector: 232 */ - .long reboot /* exception vector: 233 */ - .long reboot /* exception vector: 234 */ - .long reboot /* exception vector: 235 */ - .long reboot /* exception vector: 236 */ - .long reboot /* exception vector: 237 */ - .long reboot /* exception vector: 238 */ - .long reboot /* exception vector: 239 */ - .long reboot /* exception vector: 240 */ - .long reboot /* exception vector: 241 */ - .long reboot /* exception vector: 242 */ - .long reboot /* exception vector: 243 */ - .long reboot /* exception vector: 244 */ - .long reboot /* exception vector: 245 */ - .long reboot /* exception vector: 246 */ - .long reboot /* exception vector: 247 */ - .long reboot /* exception vector: 248 */ - .long reboot /* exception vector: 249 */ - .long reboot /* exception vector: 250 */ - .long reboot /* exception vector: 251 */ - .long reboot /* exception vector: 252 */ - .long reboot /* exception vector: 253 */ - .long reboot /* exception vector: 254 */ - .long reboot /* exception vector: 255 */ - - -_reboot: - move #0x2700,%sr /* mask interrupts */ - movea.l (0x0).w,%a7 /* load stack */ - movea.l (0x4).w,%a0 /* jmp to location of reset vector */ - jmp (%a0) - -reboot: - trap #15 /* use trap exception to enter supervisor - state. Trace mode ( and other group 0 - and 1 exceptions) *could* screw this up if - not vectored to reboot or did not return. */ diff --git a/c/src/lib/libbsp/m68k/efi332/start/ram_init.ld b/c/src/lib/libbsp/m68k/efi332/start/ram_init.ld deleted file mode 100644 index d469431027..0000000000 --- a/c/src/lib/libbsp/m68k/efi332/start/ram_init.ld +++ /dev/null @@ -1,22 +0,0 @@ -OUTPUT_ARCH(m68k) -__DYNAMIC = 0; - -start = 0; - -MEMORY -{ - ram : ORIGIN = 0xfffa00, LENGTH = 256K -} - -SECTIONS -{ - .text : { - *(.text) - } >ram - .data : { - *(.data) - } >ram - .bss : { - *(.bss) - } >ram -} diff --git a/c/src/lib/libbsp/m68k/efi332/start/ram_init.sed b/c/src/lib/libbsp/m68k/efi332/start/ram_init.sed deleted file mode 100644 index ae664ca32d..0000000000 --- a/c/src/lib/libbsp/m68k/efi332/start/ram_init.sed +++ /dev/null @@ -1,47 +0,0 @@ -1 { -i\ -#include <efi332.h>\ -#define ASM\ -#include "sim.h"\ -\ -/* This file is automatically generated from EFI332_crt0.c -- DO NOT EDIT */\ -\ -/* note: For one reason or another, I could not get '|' (bit-or) to\ - work in the version of gas I'm using. I've replaced them with \ - '+' (addition) for this file. */\ -\ - .text\ -\ - -D; -}; -/include in ram_init.S/,/end include in ram_init.S/ { -/\*.*= *\(.*\)/ { -s/*/ .org / -h; -s/=.*// -P; -g; -/(.*short int)/ s/.*short int)/ .short / -/(.*char)/ s/.*char)/ .byte / -s/\/\*.*\*\/// -t dumby -:dumby -s/;//; -t next -N; -s/ *\/\*.*\*\/ *// -t dumby -b dumby -:next -s/ / /g -s/ / / -s/ *\n *//g -s/|/+/g -P; -D; -} -P; -D; -} -D; diff --git a/c/src/lib/libbsp/m68k/efi332/start/start.c b/c/src/lib/libbsp/m68k/efi332/start/start.c deleted file mode 100644 index 20ad83bea2..0000000000 --- a/c/src/lib/libbsp/m68k/efi332/start/start.c +++ /dev/null @@ -1,228 +0,0 @@ -/* - * $Id - */ - -#include <efi332.h> -#include <sim.h> -#define __START_C__ -#include "bsp.h" - -m68k_isr_entry M68Kvec[256]; -m68k_isr_entry vectors[256]; -char * const __argv[]= {"main", ""}; - -void boot_card(int argc, char * const argv[]); - -/* - * This prototype really should have the noreturn attribute but - * that causes a warning. Not sure how to fix that. - */ -/* void dumby_start () __attribute__ ((noreturn)); */ -void dumby_start (); - -void dumby_start() { - - /* We need to by-pass the link instruction since the RAM chip- - select pins are not yet configured. */ - asm volatile ( ".global start ;\n\ - start:"); - - /* disable interrupts, load stack pointer */ - asm volatile ( "oriw #0x0700, %sr;\n\ - moveal #M68Kvec, %a0;\n\ - movec %a0, %vbr;\n\ - movel #end, %d0;\n\ - addl " STACK_SIZE ",%d0;\n\ - movel %d0,%sp;\n\ - movel %d0,%a6" - ); - - /* include in ram_init.S */ - /* - * Initalize the SIM module. - * The stack pointer is not usable until the RAM chip select lines - * are configured. The following code must remain inline. - */ - - /* Module Configuration Register */ - /* see section(s) 3.1.3-3.1.6 of the SIM Reference Manual */ - *SIMCR = (unsigned short int) - (FRZSW | FRZBM | SAM(0,8,SHEN) | (MM*SIM_MM) | SAM(SIM_IARB,0,IARB)); - - /* Synthesizer Control Register */ - /* see section(s) 4.8 */ - /* end include in ram_init.S */ - *SYNCR = (unsigned short int) - ( SAM(EFI_W,15,VCO) | SAM(0x0,14,PRESCALE) | SAM(EFI_Y,8,COUNTER) | STSIM ); - while (! (*SYNCR & SLOCK)); /* protect from clock overshoot */ - /* include in ram_init.S */ - *SYNCR = (unsigned short int) - ( SAM(EFI_W,15,VCO) | SAM(EFI_X,14,PRESCALE) | SAM(EFI_Y,8,COUNTER) | STSIM ); - - /* System Protection Control Register */ - /* !!! can only write to once after reset !!! */ - /* see section 3.8.4 of the SIM Reference Manual */ - *SYPCR = (unsigned char)( SAM(0x3,4,SWT) | HME | BME ); - - /* Periodic Interrupr Control Register */ - /* see section 3.8.2 of the SIM Reference Manual */ - *PICR = (unsigned short int) - ( SAM(0,8,PIRQL) | SAM(EFI_PIV,0,PIV) ); - /* ^^^ zero disables interrupt, don't enable here or ram_init will - be wrong. It's enabled below. */ - - /* Periodic Interrupt Timer Register */ - /* see section 3.8.3 of the SIM Reference Manual */ - *PITR = (unsigned short int)( SAM(0x09,0,PITM) ); - /* 1.098mS interrupt */ - - /* Port C Data */ - /* load values before enabled */ - *PORTC = (unsigned char) 0x0; - - /* Chip-Select Base Address Register */ - /* see section 7 of the SIM Reference Manual */ - *CSBARBT = (unsigned short int) - (((0x000000 >> 8)&0xfff8) | BS_512K ); /* 512k bytes located at 0x0000 */ - *CSBAR0 = (unsigned short int) - (((0x000000 >> 8)&0xfff8) | BS_1M ); /* 1M bytes located at 0x0000 */ - *CSBAR1 = (unsigned short int) - (((0x080000 >> 8)&0xfff8) | BS_256K ); /* 256k bytes located at 0x80000 */ - *CSBAR2 = (unsigned short int) - (((0x080000 >> 8)&0xfff8) | BS_256K ); /* 256k bytes located at 0x80000 */ - *CSBAR3 = (unsigned short int) - (((0x0C0000 >> 8)&0xfff8) | BS_256K ); /* 256k bytes located at 0xC0000 */ - *CSBAR4 = (unsigned short int) - (((0x0C0000 >> 8)&0xfff8) | BS_256K ); /* 256k bytes located at 0xC0000 */ - *CSBAR5 = (unsigned short int) - (0xfff8 | BS_64K); /* AVEC interrupts */ -#ifdef EFI332_v040b - *CSBAR6 = (unsigned short int) - (((0x000000 >> 8)&0xfff8) | BS_512K ); /* 512k bytes located at 0x0000 */ - *CSBAR8 = (unsigned short int) /* PCMCIA IOCS */ - (((0x0c0000 >> 8)&0xfff8) | BS_64K ); /* 64k bytes located at 0xc0000 */ - *CSBAR9 = (unsigned short int) /* PCMCIA MEMCS */ - (((0x0D0000 >> 8)&0xfff8) | BS_64K ); /* 64k bytes located at 0xd0000 */ -#else /* EFI332_v040b */ - *CSBAR10 = (unsigned short int) - (((0x000000 >> 8)&0xfff8) | BS_512K ); /* 512k bytes located at 0x0000 */ -#endif /* EFI332_v040b */ - - /* Chip-Select Options Registers */ - /* see section 7 of the SIM Reference Manual */ -#ifdef FLASHWRITE - *CSORBT = (unsigned short int) - ( BothBytes | ReadWrite | SyncAS | WaitStates_2 | UserSupSpace ); -#else /* FLASHWRITE */ - *CSORBT = (unsigned short int) - ( BothBytes | ReadOnly | SyncAS | WaitStates_0 | UserSupSpace ); -#endif /* FLASHWRITE */ - *CSOR0 = (unsigned short int) - ( BothBytes | ReadOnly | SyncAS | External | UserSupSpace ); - *CSOR1 = (unsigned short int) - ( LowerByte | ReadWrite | SyncAS | FastTerm | UserSupSpace ); - *CSOR2 = (unsigned short int) - ( UpperByte | ReadWrite | SyncAS | FastTerm | UserSupSpace ); - *CSOR3 = (unsigned short int) - ( LowerByte | ReadWrite | SyncAS | FastTerm | UserSupSpace ); - *CSOR4 = (unsigned short int) - ( UpperByte | ReadWrite | SyncAS | FastTerm | UserSupSpace ); - *CSOR5 = (unsigned short int) - ( BothBytes | ReadWrite | SyncAS | CPUSpace | IPLevel_any | AVEC ); -#ifdef EFI332_v040b - *CSOR6 = (unsigned short int) - ( BothBytes | ReadOnly | SyncAS | External | UserSupSpace ); - *CSOR8 = (unsigned short int) - ( BothBytes | ReadWrite | SyncAS | External | UserSupSpace ); - *CSOR9 = (unsigned short int) - ( BothBytes | ReadWrite | SyncAS | External | UserSupSpace ); -#else /* EFI332_v040b */ - *CSOR10 = (unsigned short int) - ( BothBytes | ReadOnly | SyncAS | External | UserSupSpace ); -#endif /* EFI332_v040b */ - - /* Chip Select Pin Assignment Register 0 */ - /* see section 7 of the SIM Reference Manual */ - *CSPAR0 = (unsigned short int)( - SAM(DisOut,CS_5,0x3000) | /* AVEC (internally) */ - SAM(CS16bit,CS_4,0x0c00) | /* RAM UDS, bank2 */ - SAM(CS16bit,CS_3,0x0300) | /* RAM LDS, bank2 */ - SAM(CS16bit,CS_2,0x00c0)| /* RAM UDS, bank1 */ - SAM(CS16bit,CS_1,0x0030)| /* RAM LDS, bank1 */ - SAM(CS16bit,CS_0,0x000c)| /* W/!R */ - SAM(CS16bit,CSBOOT,0x0003) /* ROM CS */ - ); - - /* Chip Select Pin Assignment Register 1 */ - /* see section 7 of the SIM Reference Manual */ -#ifdef EFI332_v040b - *CSPAR1 = (unsigned short int)( - SAM(DisOut,CS_10,0x300)| /* ECLK */ - SAM(CS16bit,CS_9,0x0c0) | /* PCMCIA MEMCS */ - SAM(CS16bit,CS_8,0x030) | /* PCMCIA IOCS */ - SAM(DisOut,CS_7,0x00c) | /* PC4 */ - SAM(CS16bit,CS_6,0x003) /* ROM !OE */ - ); -#else /* EFI332_v040b */ - *CSPAR1 = (unsigned short int)( - SAM(CS16bit,CS_10,0x300)| /* ROM !OE */ - SAM(DisOut,CS_9,0x0c0) | /* PC6 */ - SAM(DisOut,CS_8,0x030) | /* PC5 */ - SAM(DisOut,CS_7,0x00c) | /* PC4 */ - SAM(DisOut,CS_6,0x003) /* PC3 */ - ); -#endif /* EFI332_v040b */ - - /* Port E and F Data Register */ - /* see section 9 of the SIM Reference Manual */ - *PORTE0 = (unsigned char) 0; - *PORTF0 = (unsigned char) 0; - - /* Port E and F Data Direction Register */ - /* see section 9 of the SIM Reference Manual */ - *DDRE = (unsigned char) 0xff; - *DDRF = (unsigned char) 0xfd; - - /* Port E and F Pin Assignment Register */ - /* see section 9 of the SIM Reference Manual */ - *PEPAR = (unsigned char) 0xc3; /* siz1|siz0|dsack1|dsack0 */ - *PFPAR = (unsigned char) 0; - - /* end of SIM initalization code */ - /* end include in ram_init.S */ - - - - /* - * Initialize RAM by copying the .data section out of ROM (if - * needed) and "zero-ing" the .bss section. - */ - { - register char *src = _etext; - register char *dst = _copy_start; - - if (_copy_data_from_rom) - /* ROM has data at end of text; copy it. */ - while (dst < _edata) - *dst++ = *src++; - - /* Zero bss */ - for (dst = _clear_start; dst< end; dst++) - *dst = 0; - } - - /* - * Initalize the board. - */ - /* Spurious should be called in the predriver hook */ - /* Spurious_Initialize(); */ - console_init(); - - /* - * Execute main with arguments argc and agrv. - */ - boot_card(1,__argv); - reboot(); - -} - |