diff --git a/c/src/lib/libbsp/powerpc/gen5200/ChangeLog b/c/src/lib/libbsp/powerpc/gen5200/ChangeLog index 516ff9ce9c..b9c7e5bbd2 100644 --- a/c/src/lib/libbsp/powerpc/gen5200/ChangeLog +++ b/c/src/lib/libbsp/powerpc/gen5200/ChangeLog @@ -1,3 +1,9 @@ +2008-07-01 Joel Sherrill + + * Makefile.am, include/bsp.h: Add bsp_uboot_getenv() to obtain U-Boot + environment variables. + * startup/uboot_support.c: New file. + 2008-06-10 Joel Sherrill * irq/irq.c: Add units. diff --git a/c/src/lib/libbsp/powerpc/gen5200/Makefile.am b/c/src/lib/libbsp/powerpc/gen5200/Makefile.am index e167bd2dc5..e7a3c9f3a0 100644 --- a/c/src/lib/libbsp/powerpc/gen5200/Makefile.am +++ b/c/src/lib/libbsp/powerpc/gen5200/Makefile.am @@ -85,7 +85,7 @@ startup_SOURCES = startup/bspclean.c ../../shared/bsplibc.c \ ../../shared/bsppost.c startup/bspstart.c ../../shared/bootcard.c \ ../../shared/sbrk.c ../shared/uboot_dump_bdinfo.c \ ../../shared/gnatinstallhandler.c startup/cpuinit.c \ - ../shared/showbats.c + ../shared/showbats.c startup/uboot_support.c ../shared/uboot_getenv.c vectors_SOURCES = vectors/vectors_init.c vectors/vectors.h \ vectors/vectors.S diff --git a/c/src/lib/libbsp/powerpc/gen5200/include/bsp.h b/c/src/lib/libbsp/powerpc/gen5200/include/bsp.h index cd1f051b6d..11253ef9a4 100644 --- a/c/src/lib/libbsp/powerpc/gen5200/include/bsp.h +++ b/c/src/lib/libbsp/powerpc/gen5200/include/bsp.h @@ -261,6 +261,14 @@ Thread _Thread_Idle_body(uint32_t ignored); /* BSP specific IRQ Benchmarking support */ void BSP_IRQ_Benchmarking_Reset(void); void BSP_IRQ_Benchmarking_Report(void); + +#if defined(HAS_UBOOT) + /* Routine to obtain U-Boot environment variables */ + const char *bsp_uboot_getenv( + const char *name + ); +#endif + #ifdef __cplusplus } #endif diff --git a/c/src/lib/libbsp/powerpc/gen5200/startup/uboot_support.c b/c/src/lib/libbsp/powerpc/gen5200/startup/uboot_support.c new file mode 100644 index 0000000000..96352b29a4 --- /dev/null +++ b/c/src/lib/libbsp/powerpc/gen5200/startup/uboot_support.c @@ -0,0 +1,25 @@ +/* + * This file contains variables which assist the shared + * U-Boot code. + * + * COPYRIGHT (c) 1989-2008. + * On-Line Applications Research Corporation (OAR). + * + * The license and distribution terms for this file may be + * found in the file LICENSE in this distribution or at + * http://www.rtems.com/license/LICENSE. + * + * $Id$ + */ + +#include + +#include + +#if defined(HAS_UBOOT) +/* Base address of U-Boot environment variables */ +const uint8_t *uboot_environment = (const char *)0xfff40000; + +/* Length of area reserved for U-Boot environment variables */ +const size_t *uboot_environment_size = 0x10000; +#endif