diff options
author | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-12-11 15:46:53 +0000 |
---|---|---|
committer | Joel Sherrill <joel.sherrill@OARcorp.com> | 2007-12-11 15:46:53 +0000 |
commit | d11d1d2aa8010181e4834e570b234f9dff081021 (patch) | |
tree | 97ffad3a59d6fdbe1d4c47171b2e70b705fa788d /c/src/lib/libbsp | |
parent | 2007-12-11 Joel Sherrill <joel.sherrill@OARcorp.com> (diff) | |
download | rtems-d11d1d2aa8010181e4834e570b234f9dff081021.tar.bz2 |
2007-12-11 Joel Sherrill <joel.sherrill@OARcorp.com>
* README, include/bsp.h, startup/bspstart.c: Eliminate copies of the
Configuration Table. Use the RTEMS provided accessor macros to obtain
configuration fields.
Diffstat (limited to 'c/src/lib/libbsp')
-rw-r--r-- | c/src/lib/libbsp/powerpc/gen405/ChangeLog | 6 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/gen405/README | 21 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/gen405/include/bsp.h | 2 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/gen405/startup/bspstart.c | 12 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/helas403/ChangeLog | 6 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/helas403/README | 35 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/helas403/include/bsp.h | 2 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/helas403/startup/bspstart.c | 12 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/virtex/ChangeLog | 6 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/virtex/README | 7 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/virtex/include/bsp.h | 3 | ||||
-rw-r--r-- | c/src/lib/libbsp/powerpc/virtex/startup/bspstart.c | 16 |
12 files changed, 55 insertions, 73 deletions
diff --git a/c/src/lib/libbsp/powerpc/gen405/ChangeLog b/c/src/lib/libbsp/powerpc/gen405/ChangeLog index b959fa89ca..efb5e7f0bd 100644 --- a/c/src/lib/libbsp/powerpc/gen405/ChangeLog +++ b/c/src/lib/libbsp/powerpc/gen405/ChangeLog @@ -1,3 +1,9 @@ +2007-12-11 Joel Sherrill <joel.sherrill@OARcorp.com> + + * README, include/bsp.h, startup/bspstart.c: Eliminate copies of the + Configuration Table. Use the RTEMS provided accessor macros to obtain + configuration fields. + 2007-12-04 Joel Sherrill <joel.sherrill@OARcorp.com> * include/bsp.h, startup/bspstart.c: Move interrupt_stack_size field diff --git a/c/src/lib/libbsp/powerpc/gen405/README b/c/src/lib/libbsp/powerpc/gen405/README index 4ab5a71d3c..5002ed04dd 100644 --- a/c/src/lib/libbsp/powerpc/gen405/README +++ b/c/src/lib/libbsp/powerpc/gen405/README @@ -44,9 +44,9 @@ Notes Board description ----------------- -clock rate: 234 MHz -ROM: 16MByte FLASH -RAM: 64MByte DRAM +clock rate:234 MHz +ROM: 16 MByte FLASH +RAM: 64 MByte DRAM gen405 only supports single processor operations. @@ -60,20 +60,19 @@ For adapting this BSP to other boards, the following files should be modified: - c/src/lib/libbsp/powerpc/gen405/startup/linkcmds - for the memory layout required + for the memory layout required - c/src/lib/libbsp/powerpc/gen405/startup/bspstart.c - for adaption of BSP_Configuration. here you can select - the clock source for the timers and the serial interface - (system clock or external clock pin), the clock rates, initial - baud rate and other stuff + Here you can select the clock source for the timers and the + serial interface (system clock or external clock pin), the clock + rates, initial baud rate and other stuff - c/src/lib/libbsp/powerpc/gen405/include/bsp.h - some BSP-related constants + some BSP-related constants The actual drivers are placed in - c/src/lib/libcpu/powerpc/ppc403/* - well, they should be generic, so there _should_ be no reason - to mess around there (but who knows...) + well, they should be generic, so there _should_ be no reason + to mess around there (but who knows...) diff --git a/c/src/lib/libbsp/powerpc/gen405/include/bsp.h b/c/src/lib/libbsp/powerpc/gen405/include/bsp.h index 1c1aee5ea9..34dc85303f 100644 --- a/c/src/lib/libbsp/powerpc/gen405/include/bsp.h +++ b/c/src/lib/libbsp/powerpc/gen405/include/bsp.h @@ -67,8 +67,6 @@ extern "C" { /* miscellaneous stuff assumed to exist */ -extern rtems_configuration_table BSP_Configuration; /* owned by BSP */ - /* * Device Driver Table Entries */ diff --git a/c/src/lib/libbsp/powerpc/gen405/startup/bspstart.c b/c/src/lib/libbsp/powerpc/gen405/startup/bspstart.c index 62f9af6913..8cd5a38eb8 100644 --- a/c/src/lib/libbsp/powerpc/gen405/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/gen405/startup/bspstart.c @@ -64,14 +64,6 @@ #include <rtems/libcsupport.h> #include <ictrl.h> -/* - * The original table from the application and our copy of it with - * some changes. - */ - -extern rtems_configuration_table Configuration; -rtems_configuration_table BSP_Configuration; -char *rtems_progname; void *bsp_ram_end = (void *)RAM_END; /* first addr behind avail. ram area */ /* @@ -175,8 +167,8 @@ void bsp_start( void ) -remove RAM_END from bsp.h, this cannot be valid... or must be a function call */ - BSP_Configuration.work_space_start = (void *) - ((char *)(bsp_ram_end)) - BSP_Configuration.work_space_size; + Configuration.work_space_start = (void *) + ((char *)(bsp_ram_end)) - rtems_configuration_get_work_space_size(); /* * initialize the device driver parameters diff --git a/c/src/lib/libbsp/powerpc/helas403/ChangeLog b/c/src/lib/libbsp/powerpc/helas403/ChangeLog index 7b5d9c4273..3348ba3801 100644 --- a/c/src/lib/libbsp/powerpc/helas403/ChangeLog +++ b/c/src/lib/libbsp/powerpc/helas403/ChangeLog @@ -1,3 +1,9 @@ +2007-12-11 Joel Sherrill <joel.sherrill@OARcorp.com> + + * README, include/bsp.h, startup/bspstart.c: Eliminate copies of the + Configuration Table. Use the RTEMS provided accessor macros to obtain + configuration fields. + 2007-12-04 Joel Sherrill <joel.sherrill@OARcorp.com> * include/bsp.h, startup/bspstart.c: Move interrupt_stack_size field diff --git a/c/src/lib/libbsp/powerpc/helas403/README b/c/src/lib/libbsp/powerpc/helas403/README index 38523385b4..4e677a11b2 100644 --- a/c/src/lib/libbsp/powerpc/helas403/README +++ b/c/src/lib/libbsp/powerpc/helas403/README @@ -45,11 +45,11 @@ Notes Board description ----------------- -clock rate: 25 MHz -bus width: 8-bit PROM, 32-bit DRAM -ROM: Up to 512KByte (Am29F040), 90 nsec chip select 0 -RAM: 4 to 32 MByte DRAM SIMM (autodetect), 70 nsec, - no parity, at CS7 or CS6+CS7 (for two-bank-SIMMs) +clock rate: 25 MHz +bus width: 8-bit PROM, 32-bit DRAM +ROM: Up to 512KByte (Am29F040), 90 nsec chip select 0 +RAM: 4 to 32 MByte DRAM SIMM (autodetect), 70 nsec, + no parity, at CS7 or CS6+CS7 (for two-bank-SIMMs) helas403 only supports single processor operations. @@ -62,8 +62,8 @@ system. The rough features of this board are described above. This BSP contains files for two startup methods: - Direct start from Flash after powerup (with code run out of flash): This is the default configuration, it uses the files - flashentry/flashentry.s - startup/linkcmds + flashentry/flashentry.s + startup/linkcmds Please note, that this configuration is good to startup the system, but it will not gain maximum performance due to slow Flash access (8 @@ -71,8 +71,8 @@ bit wide only) - Start after software download into DRAM: This configuration will use: - dlentry/dlentry.s - startup/linkcmds.dl + dlentry/dlentry.s + startup/linkcmds.dl If you want to use the download configuration, it is sufficient to rename the file "startup/linkcmds.dl" to "startup/linkcmds", it will @@ -84,23 +84,22 @@ For adapting this BSP to other boards, the following files should be modified: - c/src/lib/libbsp/powerpc/helas403/flashentry/flashentry.s - for the memory controller configuration and other basic stuff + for the memory controller configuration and other basic stuff - c/src/lib/libbsp/powerpc/helas403/startup/linkcmds[.dl] - for the memory layout required + for the memory layout required - c/src/lib/libbsp/powerpc/helas403/startup/bspstart.c - for adaption of BSP_Configuration. here you can select - the clock source for the timers and the serial interface - (system clock or external clock pin), the clock rates, initial - baud rate and other stuff + Here you can select the clock source for the timers and the serial + interface (system clock or external clock pin), the clock rates, + initial baud rate and other stuff - c/src/lib/libbsp/powerpc/helas403/include/bsp.h - some BSP-related constants + some BSP-related constants The actual drivers are placed in - c/src/lib/libcpu/powerpc/ppc403/* - well, they should be generic, so there _should_ be no reason - to mess around there (but who knows...) + well, they should be generic, so there _should_ be no reason + to mess around there (but who knows...) diff --git a/c/src/lib/libbsp/powerpc/helas403/include/bsp.h b/c/src/lib/libbsp/powerpc/helas403/include/bsp.h index 305f7d427a..774c8fe5c8 100644 --- a/c/src/lib/libbsp/powerpc/helas403/include/bsp.h +++ b/c/src/lib/libbsp/powerpc/helas403/include/bsp.h @@ -64,8 +64,6 @@ extern "C" { /* miscellaneous stuff assumed to exist */ -extern rtems_configuration_table BSP_Configuration; /* owned by BSP */ - /* * Device Driver Table Entries */ diff --git a/c/src/lib/libbsp/powerpc/helas403/startup/bspstart.c b/c/src/lib/libbsp/powerpc/helas403/startup/bspstart.c index ee00a0418c..f2a180b96d 100644 --- a/c/src/lib/libbsp/powerpc/helas403/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/helas403/startup/bspstart.c @@ -62,14 +62,6 @@ #include <rtems/libcsupport.h> #include <ictrl.h> -/* - * The original table from the application and our copy of it with - * some changes. - */ - -extern rtems_configuration_table Configuration; -rtems_configuration_table BSP_Configuration; -char *rtems_progname; void *bsp_ram_end = (void *)RAM_END; /* first addr behind avail. ram area */ /* @@ -165,8 +157,8 @@ void bsp_start( void ) -remove RAM_END from bsp.h, this cannot be valid... or must be a function call */ - BSP_Configuration.work_space_start = (void *) - ((char *)(bsp_ram_end)) - BSP_Configuration.work_space_size; + Configuration.work_space_start = (void *) + ((char *)(bsp_ram_end)) - rtems_configuration_get_work_space_size(); /* * initialize the device driver parameters diff --git a/c/src/lib/libbsp/powerpc/virtex/ChangeLog b/c/src/lib/libbsp/powerpc/virtex/ChangeLog index 298351fbe5..b71c860ee8 100644 --- a/c/src/lib/libbsp/powerpc/virtex/ChangeLog +++ b/c/src/lib/libbsp/powerpc/virtex/ChangeLog @@ -1,3 +1,9 @@ +2007-12-11 Joel Sherrill <joel.sherrill@OARcorp.com> + + * README, include/bsp.h, startup/bspstart.c: Eliminate copies of the + Configuration Table. Use the RTEMS provided accessor macros to obtain + configuration fields. + 2007-12-10 Till Straumann <strauman@slac.stanford.edu> * irq/irq_init.c: diff --git a/c/src/lib/libbsp/powerpc/virtex/README b/c/src/lib/libbsp/powerpc/virtex/README index 8c91efa9a6..9092af511a 100644 --- a/c/src/lib/libbsp/powerpc/virtex/README +++ b/c/src/lib/libbsp/powerpc/virtex/README @@ -76,10 +76,9 @@ modified: for the memory layout required - c/src/lib/libbsp/powerpc/virtex/startup/bspstart.c - for adaption of BSP_Configuration. here you can select - the clock source for the timers and the serial interface - (system clock or external clock pin), the clock rates, initial - baud rate and other stuff + Here you can select the clock source for the timers and the + serial interface (system clock or external clock pin), the clock + rates, initial baud rate and other stuff - c/src/lib/libbsp/powerpc/virtex/include/bsp.h some BSP-related constants diff --git a/c/src/lib/libbsp/powerpc/virtex/include/bsp.h b/c/src/lib/libbsp/powerpc/virtex/include/bsp.h index ad525641fb..607996b325 100644 --- a/c/src/lib/libbsp/powerpc/virtex/include/bsp.h +++ b/c/src/lib/libbsp/powerpc/virtex/include/bsp.h @@ -72,9 +72,6 @@ extern uint32_t _top_of_ram; /* miscellaneous stuff assumed to exist */ -extern rtems_configuration_table BSP_Configuration; /* owned by BSP */ - - /* Network Defines */ #if 1 /* EB/doe changes */ #define RTEMS_BSP_NETWORK_DRIVER_NAME "eth0" diff --git a/c/src/lib/libbsp/powerpc/virtex/startup/bspstart.c b/c/src/lib/libbsp/powerpc/virtex/startup/bspstart.c index 5203d44a1a..9417fb80f7 100644 --- a/c/src/lib/libbsp/powerpc/virtex/startup/bspstart.c +++ b/c/src/lib/libbsp/powerpc/virtex/startup/bspstart.c @@ -73,16 +73,6 @@ SPR_RW(SPRG1) #include RTEMS_XPARAMETERS_H #include <stdio.h> -/* - * The original table from the application and our copy of it with - * some changes. - */ - -extern rtems_configuration_table Configuration; -rtems_configuration_table BSP_Configuration; - -char *rtems_progname; - uint32_t _heap_start; uint32_t _heap_end; uint32_t _top_of_ram; @@ -150,8 +140,8 @@ void bsp_pretasking_hook(void) /* round up from the top of workspace to next 64k boundary, get * default heapsize from linker script */ - heap_start = (((uint32_t)BSP_Configuration.work_space_start + - BSP_Configuration.work_space_size) + 0x18000) & 0xffff0000; + heap_start = (((uint32_t)Configuration.work_space_start + + rtems_configuration_get_work_space_size()) + 0x18000) & 0xffff0000; heap_end = _heap_start + (uint32_t)&_HeapSize; @@ -254,7 +244,7 @@ void bsp_start( void ) extern int _end; /* round _end up to next 64k boundary for start of workspace */ - BSP_Configuration.work_space_start = (void *)((((uint32_t)&_end) + 0x18000) & 0xffff0000); + Configuration.work_space_start = (void *)((((uint32_t)&_end) + 0x18000) & 0xffff0000); } } |