Changeset 98bcbda3 in rtems
- Timestamp:
- 03/23/98 18:35:41 (26 years ago)
- Branches:
- 4.10, 4.11, 4.8, 4.9, 5, master
- Children:
- 5839b0c1
- Parents:
- 61bbe543
- Location:
- c/src/lib/libbsp/m68k/gen68360
- Files:
-
- 9 edited
Legend:
- Unmodified
- Added
- Removed
-
c/src/lib/libbsp/m68k/gen68360/README
r61bbe543 r98bcbda3 4 4 5 5 # 6 # This package works best with a version of GCC that has been modified 7 # to support the `-mcpu32' argument. I have submitted the required 8 # changes to the GCC maintainers. 9 # 10 11 # 12 # As of 1998/01/22, no gcc version (gcc 2.8.0 and egcs 1.0 are current) 13 # includes proper multilib support for the 68360. This is basically 14 # a m68020 without bitfields from gcc's perspective and there is 15 # no multilib entry which corresponds to this. See the tool build 16 # INSTRUCTIONS for information on how to address this. 6 # This package requires a version of GCC that supports the `-mcpu32' option. 17 7 # 18 8 … … 31 21 # This board support package works with several different versions of 32 22 # MC68360 systems. The choice of hardware is made at the final link-edit 33 # phase by setting the Makefile LDFLAGSdefinition appropriately.23 # phase by setting the Makefile CLAGS_LD definition appropriately. 34 24 # 35 25 # Decisions made at compile time include: … … 43 33 # 44 34 # Decisions to be made a link-edit time are: 45 # - The amount of dynamic RAM in the system. This value applies46 # only to hardware versions which support different sizes of RAM.47 # The default value is 4 Mbytes. To specify 16 Mbytes of memory,48 # --defsym RamSize=0x100000049 #50 35 # - The size of the memory allocator heap. The default value is 51 36 # 64 kbytes. If the KA9Q network package is used the heap … … 53 38 # busy, the heap should be even larger. 54 39 # To choose a heap size of 256 kbytes, 55 # --defsym HeapSize=0x40000 56 # 57 # - The Ethernet address for network boot proms. 40 # CFLAGS_LD += -Wl,--defsym -Wl,HeapSize=0x40000 58 41 59 42 BSP NAME: gen68360 or gen68360_040 … … 104 87 bus width: 8-bit PROM, 32-bit DRAM 105 88 ROM: To 1 MByte, 180 nsec (3 wait states), chip select 0 106 RAM: 1 to 64MByte DRAM SIMM, 60 nsec (0 wait states), parity or nonparity89 RAM: 1 to 16 MByte DRAM SIMM, 60 nsec (0 wait states), parity or nonparity 107 90 108 91 Host System 109 92 ----------- 110 NEXTSTEP 3.3 (Intel and Motorola), Solaris 2.5 111 gcc-2.7.2 112 binutils-2.6 93 OPENSTEP 4.2 (Intel and Motorola), Solaris 2.5, Linux 2.0.29 113 94 114 95 Verification (Standalone 68360) -
c/src/lib/libbsp/m68k/gen68360/include/bsp.h
r61bbe543 r98bcbda3 125 125 * Values assigned by link editor 126 126 */ 127 extern void *_RomBase, *_RamBase , *_RamSize;127 extern void *_RomBase, *_RamBase; 128 128 129 129 /* -
c/src/lib/libbsp/m68k/gen68360/network/network.c
r61bbe543 r98bcbda3 818 818 * reset exception handler. The following 819 819 * 4 bytes contain the value loaded into the 820 * program counter. The low order three821 * octets of the boards' Ethernet address are822 * stored in the three bytes immediately823 * pr eceding this initial program counter value.820 * program counter. The boards' Ethernet 821 * address is stored in the six bytes 822 * immediately preceding this initial 823 * program counter value. 824 824 * 825 * See startup/linkcmds and start360/start360.s 826 * for details on how this is done. 827 * 828 * The high order three octets of the Ethernet 829 * address are fixed and indicate that the 830 * address is that of a Motorola device. 825 * See start360/start360.s. 831 826 */ 832 827 extern void *_RomBase; /* From linkcmds */ 833 828 const unsigned long *ExceptionVectors; 834 829 const unsigned char *entryPoint; 835 836 /*837 * Set up the fixed portion of the address838 */839 iface->hwaddr[0] = 0x08;840 iface->hwaddr[1] = 0x00;841 iface->hwaddr[2] = 0x3e;842 830 843 831 /* … … 850 838 >= (1 * 1024 * 1024)) { 851 839 printf ("Warning -- Ethernet address can not be found in bootstrap PROM.\n"); 840 iface->hwaddr[0] = 0x08; 841 iface->hwaddr[1] = 0xF3; 842 iface->hwaddr[2] = 0x3E; 852 843 iface->hwaddr[3] = 0xC2; 853 844 iface->hwaddr[4] = 0xE7; … … 855 846 } 856 847 else { 857 iface->hwaddr[3] = entryPoint[-3]; 858 iface->hwaddr[4] = entryPoint[-2]; 859 iface->hwaddr[5] = entryPoint[-1]; 848 memcpy (iface->hwaddr, entryPoint - 6, 6); 860 849 } 861 850 } -
c/src/lib/libbsp/m68k/gen68360/start/start360.s
r61bbe543 r98bcbda3 309 309 /* 310 310 * Place the low-order 3 octets of the board's ethernet address at 311 * a `well-known' fixed location relative to the beginning of ROM.311 * a `well-known' fixed location relative to the startup location. 312 312 */ 313 313 .align 2 314 .long ETHERNET_ADDRESS | Low-order 3 octets of ethernet address 315 316 /* 317 * For some reason, the symbol start must not be global. 318 * 319 * .global start 320 */ 314 .word 0 | Padding 315 ethernet_address_buffer: 316 .word 0x08F3 | Default address 317 .word 0xDEAD 318 .word 0xCAFE 321 319 322 320 /* -
c/src/lib/libbsp/m68k/gen68360/start360/start360.s
r61bbe543 r98bcbda3 309 309 /* 310 310 * Place the low-order 3 octets of the board's ethernet address at 311 * a `well-known' fixed location relative to the beginning of ROM.311 * a `well-known' fixed location relative to the startup location. 312 312 */ 313 313 .align 2 314 .long ETHERNET_ADDRESS | Low-order 3 octets of ethernet address 315 316 /* 317 * For some reason, the symbol start must not be global. 318 * 319 * .global start 320 */ 314 .word 0 | Padding 315 ethernet_address_buffer: 316 .word 0x08F3 | Default address 317 .word 0xDEAD 318 .word 0xCAFE 321 319 322 320 /* -
c/src/lib/libbsp/m68k/gen68360/startup/init68360.c
r61bbe543 r98bcbda3 39 39 extern void _CopyDataClearBSSAndStart (void); 40 40 41 #if (defined ( m68040) || defined (m68lc040) || defined (m68ec040))41 #if (defined (__mc68040__)) 42 42 /* 43 43 ******************************************* … … 408 408 /* 409 409 * Step 11: Remap Chip Select 0 (CS0*), set up GMR 410 * /411 /*412 * 1024/2048/4096 addresses per DRAM page (1M/4M/16M DRAM chips)413 * 60 nsec DRAM414 * 180 nsec ROM (3 wait states)415 * /416 switch ((unsigned long)&_RamSize) {417 default:418 case 4*1024*1024:419 m360.gmr = M360_GMR_RCNT(23) | M360_GMR_RFEN|420 M360_GMR_R CYC(0) | M360_GMR_PGS(3) |410 * 32-bit DRAM 411 * Internal DRAM address multiplexing 412 * 60 nsec DRAM 413 * 180 nsec ROM (3 wait states) 414 * 15.36 usec DRAM refresh interval 415 * The DRAM page size selection is not modified since this 416 * startup code may be running in a bootstrap PROM or in 417 * a program downloaded by the bootstrap PROM. 418 */ 419 m360.gmr = (m360.gmr & 0x001C0000) | M360_GMR_RCNT(23) | 420 M360_GMR_RFEN | M360_GMR_RCYC(0) | 421 421 M360_GMR_DPS_32BIT | M360_GMR_NCS | 422 422 M360_GMR_GAMX; 423 break;424 425 case 16*1024*1024:426 m360.gmr = M360_GMR_RCNT(23) | M360_GMR_RFEN |427 M360_GMR_RCYC(0) | M360_GMR_PGS(5) |428 M360_GMR_DPS_32BIT | M360_GMR_NCS |429 M360_GMR_GAMX;430 break;431 432 case 64*1024*1024:433 m360.gmr = M360_GMR_RCNT(23) | M360_GMR_RFEN |434 M360_GMR_RCYC(0) | M360_GMR_PGS(7) |435 M360_GMR_DPS_32BIT | M360_GMR_NCS |436 M360_GMR_GAMX;437 break;438 }439 423 m360.memc[0].br = (unsigned long)&_RomBase | M360_MEMC_BR_WP | 440 424 M360_MEMC_BR_V; … … 444 428 /* 445 429 * Step 12: Initialize the system RAM 446 */ 447 /* 448 * Set up option/base registers 449 * 4M/16M/64M DRAM 450 * 60 nsec DRAM 451 * Wait for chips to power up 452 * Perform 8 read cycles 453 * Set all parity bits to correct state 454 * Enable parity checking 455 */ 456 switch ((unsigned long)&_RamSize) { 457 default: 458 case 4*1024*1024: 430 * Do this only if the DRAM has not already been set up 431 */ 432 if ((m360.memc[1].br & M360_MEMC_BR_V) == 0) { 433 /* 434 * Set up GMR DRAM page size, option and base registers 435 * Assume 16Mbytes of DRAM 436 * 60 nsec DRAM 437 */ 438 m360.gmr = (m360.gmr & ~0x001C0000) | M360_GMR_PGS(5); 459 439 m360.memc[1].or = M360_MEMC_OR_TCYC(0) | 460 M360_MEMC_OR_4MB | 461 M360_MEMC_OR_DRAM; 462 break; 463 464 case 16*1024*1024: 465 m360.memc[1].or = M360_MEMC_OR_TCYC(0) | 466 M360_MEMC_OR_16MB | 467 M360_MEMC_OR_DRAM; 468 break; 469 470 case 64*1024*1024: 471 m360.memc[1].or = M360_MEMC_OR_TCYC(0) | 472 M360_MEMC_OR_64MB | 473 M360_MEMC_OR_DRAM; 474 break; 440 M360_MEMC_OR_16MB | 441 M360_MEMC_OR_DRAM; 442 m360.memc[1].br = (unsigned long)&_RamBase | M360_MEMC_BR_V; 443 444 /* 445 * Wait for chips to power up 446 * Perform 8 read cycles 447 */ 448 for (i = 0; i < 50000; i++) 449 continue; 450 for (i = 0; i < 8; ++i) 451 *((volatile unsigned long *)(unsigned long)&_RamBase); 452 453 /* 454 * Determine memory size (1, 4, or 16 Mbytes) 455 * Set GMR DRAM page size appropriately. 456 * The OR is left at 16 Mbytes. The bootstrap PROM places its 457 * .data and .bss segments at the top of the 16 Mbyte space. 458 * A 1 Mbyte or 4 Mbyte DRAM will show up several times in 459 * the memory map, but will work with the same bootstrap PROM. 460 */ 461 *(volatile char *)&_RamBase = 0; 462 *((volatile char *)&_RamBase+0x00C01800) = 1; 463 if (*(volatile char *)&_RamBase) { 464 m360.gmr = (m360.gmr & ~0x001C0000) | M360_GMR_PGS(1); 465 } 466 else { 467 *((volatile char *)&_RamBase+0x00801000) = 1; 468 if (*(volatile char *)&_RamBase) { 469 m360.gmr = (m360.gmr & ~0x001C0000) | M360_GMR_PGS(3); 470 } 471 } 472 473 /* 474 * Enable parity checking 475 */ 476 m360.memc[1].br |= M360_MEMC_BR_PAREN; 475 477 } 476 m360.memc[1].br = (unsigned long)&_RamBase | M360_MEMC_BR_V;477 for (i = 0; i < 50000; i++)478 continue;479 for (i = 0; i < 8; ++i)480 *((volatile unsigned long *)(unsigned long)&_RamBase);481 for (i = 0 ; i < (unsigned long)&_RamSize ; i += sizeof (unsigned long)) {482 volatile unsigned long *lp;483 lp = (unsigned long *)((unsigned char *)&_RamBase + i);484 *lp = *lp;485 }486 m360.memc[1].br = (unsigned long)&_RamBase |487 M360_MEMC_BR_PAREN | M360_MEMC_BR_V;488 478 489 479 /* -
c/src/lib/libbsp/m68k/gen68360/startup/linkcmds
r61bbe543 r98bcbda3 18 18 * the lines marked XXX below to use a constant value. 19 19 */ 20 RamSize = DEFINED(RamSize) ? RamSize : 4M;21 20 HeapSize = DEFINED(HeapSize) ? HeapSize : 0x10000; 22 21 StackSize = DEFINED(StackSize) ? StackSize : 0x1000; … … 24 23 /* 25 24 * Declare on-board memory. 26 * It would be nice if the ram length could be given as27 * LENGTH=RamSize, but gld doesn't allow non-constant28 * values in the LENGTH expression.29 25 */ 30 26 MEMORY { … … 35 31 36 32 /* 37 * Declare low-order three octets of Ethernet address.38 */39 ETHERNET_ADDRESS = DEFINED(ETHERNET_ADDRESS) ? ETHERNET_ADDRESS : 0xDEAD12;40 41 /*42 33 * Load objects 43 34 */ 44 35 SECTIONS { 45 /*46 * Hardware variations47 */48 _RamSize = RamSize;49 __RamSize = RamSize;50 51 36 /* 52 37 * Boot PROM -
c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.bootp
r61bbe543 r98bcbda3 22 22 * the lines marked XXX below to use a constant value. 23 23 */ 24 RamSize = DEFINED(RamSize) ? RamSize : 4M;25 24 HeapSize = DEFINED(HeapSize) ? HeapSize : 0x10000; 26 25 StackSize = DEFINED(StackSize) ? StackSize : 0x1000; … … 28 27 /* 29 28 * Declare on-board memory. 30 * It would be nice if the ram length could be given as31 * LENGTH=RamSize, but gld doesn't allow non-constant32 * values in the LENGTH expression.33 29 */ 34 30 MEMORY { … … 40 36 41 37 /* 42 * Declare low-order three octets of Ethernet address.43 */44 ETHERNET_ADDRESS = DEFINED(ETHERNET_ADDRESS) ? ETHERNET_ADDRESS : 0xDEAD12;45 46 /*47 38 * Load objects 48 39 */ 49 40 SECTIONS { 50 /*51 * Hardware variations52 */53 _RamSize = RamSize;54 __RamSize = RamSize;55 56 41 /* 57 42 * Boot PROM -
c/src/lib/libbsp/m68k/gen68360/startup/linkcmds.prom
r61bbe543 r98bcbda3 29 29 * the lines marked XXX below to use a constant value. 30 30 */ 31 RamSize = DEFINED(RamSize) ? RamSize : 4M;32 31 HeapSize = DEFINED(HeapSize) ? HeapSize : 0x10000; 33 32 StackSize = DEFINED(StackSize) ? StackSize : 0x1000; … … 35 34 /* 36 35 * Declare on-board memory. 37 * It would be nice if the ram length could be given as38 * LENGTH=RamSize, but gld doesn't allow non-constant39 * values in the LENGTH expression.40 36 */ 41 37 MEMORY { … … 46 42 47 43 /* 48 * Declare low-order three octets of Ethernet address.49 */50 ETHERNET_ADDRESS = DEFINED(ETHERNET_ADDRESS) ? ETHERNET_ADDRESS : 0xDEAD12;51 52 /*53 44 * Load objects 54 45 */ 55 46 SECTIONS { 56 /*57 * Hardware variations58 */59 _RamSize = RamSize;60 __RamSize = RamSize;61 62 47 /* 63 48 * Boot PROM
Note: See TracChangeset
for help on using the changeset viewer.