From 7bbfacd46175491f31cb8b4552655cd8a5b27fc2 Mon Sep 17 00:00:00 2001 From: "Eric W. Biederman" Date: Tue, 2 Jul 2002 07:14:44 +0000 Subject: [PATCH] Files I missed earlier --- src/lib/version.c | 62 ++++++++++++++++++++++++++++++ src/mainboard/bcm/e100/mainboard.c | 7 +++- 2 files changed, 68 insertions(+), 1 deletion(-) create mode 100644 src/lib/version.c diff --git a/src/lib/version.c b/src/lib/version.c new file mode 100644 index 0000000000..73d52ca843 --- /dev/null +++ b/src/lib/version.c @@ -0,0 +1,62 @@ +#include + +#define __STR(X) #X +#define STR(X) __STR(X) + +#ifndef MAINBOARD_VENDOR +#error MAINBOARD_VENDOR not defined +#endif +#ifndef MAINBOARD_PART_NUMBER +#error MAINBOARD_PART_NUMBER not defined +#endif + +#ifndef LINUXBIOS_VERSION +#error LINUXBIOS_VERSION not defined +#endif +#ifndef LINUXBIOS_BUILD +#error LINUXBIOS_BUILD not defined +#endif + +#ifndef LINUXBIOS_COMPILE_TIME +#error LINUXBIOS_COMPILE_TIME not defined +#endif +#ifndef LINUXBIOS_COMPILE_BY +#error LINUXBIOS_COMPILE_BY not defined +#endif +#ifndef LINUXBIOS_COMPILE_HOST +#error LINUXBIOS_COMPILE_HOST not defined +#endif + +#ifndef LINUXBIOS_COMPILER +#error LINUXBIOS_COMPILER not defined +#endif +#ifndef LINUXBIOS_LINKER +#error LINUXBIOS_LINKER not defined +#endif +#ifndef LINUXBIOS_ASSEMBLER +#error LINUXBIOS_ASSEMBLER not defined +#endif + + +#ifndef LINUXBIOS_EXTRA_VERSION +#define LINUXBIOS_EXTRA_VERSION +#endif + +const char mainboard_vendor[] = STR(MAINBOARD_VENDOR); +const char mainboard_part_number[] = STR(MAINBOARD_PART_NUMBER); + +const char linuxbios_version[] = STR(LINUXBIOS_VERSION); +const char linuxbios_extra_version[] = STR(LINUXBIOS_EXTRA_VERSION); +const char linuxbios_build[] = STR(LINUXBIOS_BUILD); + +const char linuxbios_compile_time[] = STR(LINUXBIOS_COMPILE_TIME); +const char linuxbios_compile_by[] = STR(LINUXBIOS_COMPILE_BY); +const char linuxbios_compile_host[] = STR(LINUXBIOS_COMPILE_HOST); +const char linuxbios_compile_domain[] = STR(LINUXBIOS_COMPILE_DOMAIN); +const char linuxbios_compiler[] = STR(LINUXBIOS_COMPILER); +const char linuxbios_linker[] = STR(LINUXBIOS_LINKER); +const char linuxbios_assembler[] = STR(LINUXBIOS_ASSEMBLER); + + + + diff --git a/src/mainboard/bcm/e100/mainboard.c b/src/mainboard/bcm/e100/mainboard.c index 3ab195ac8e..7c7373b72c 100644 --- a/src/mainboard/bcm/e100/mainboard.c +++ b/src/mainboard/bcm/e100/mainboard.c @@ -1,3 +1,5 @@ +#include +#include #include #include #include @@ -59,6 +61,7 @@ led_off(int led) void mainboard_fixup(void) { + struct mem_range *mem; unsigned long ramsize; int errors = 0; struct pci_dev *pcidev; @@ -69,7 +72,9 @@ mainboard_fixup(void) led_on(10); beep_on(); - ramsize = sizeram() * 1024; + /* FIXME this is not how sizeram is intened to be called! */ + mem = sizeram(); + ramsize = (mem[1].sizek + mem[1].basek) * 1024; if (ramcheck(0x00100000, ramsize, 20) != 0) { error("DRAM Test Error"); }