Author: mcayland Date: Sun Mar 14 17:09:44 2010 New Revision: 693 URL: http://tracker.coreboot.org/trac/openbios/changeset/693
Log: Fix the sys_info.h header file so it doesn't reference functions both inside and outside of libopenbios, and move the firmware configuration header file to include/arch/common. Following through the code showed that elfnote.c and linuxbios.c were being used by sys_info and so these are also renamed to elf_info.c and linuxbios_info.c for clarity.
Signed-off-by: Mark Cave-Ayland mark.cave-ayland@siriusit.co.uk
Added: trunk/openbios-devel/include/arch/common/ trunk/openbios-devel/include/arch/common/fw_cfg.h (props changed) - copied unchanged from r692, trunk/openbios-devel/include/openbios/fw_cfg.h trunk/openbios-devel/include/libopenbios/sys_info.h (contents, props changed) - copied, changed from r692, trunk/openbios-devel/include/sys_info.h trunk/openbios-devel/libopenbios/elf_info.c (contents, props changed) - copied, changed from r692, trunk/openbios-devel/libopenbios/elfnote.c trunk/openbios-devel/libopenbios/linuxbios_info.c (contents, props changed) - copied, changed from r692, trunk/openbios-devel/libopenbios/linuxbios.c Deleted: trunk/openbios-devel/include/openbios/fw_cfg.h trunk/openbios-devel/include/sys_info.h trunk/openbios-devel/libopenbios/elfnote.c trunk/openbios-devel/libopenbios/linuxbios.c Modified: trunk/openbios-devel/arch/amd64/boot.c trunk/openbios-devel/arch/amd64/builtin.c trunk/openbios-devel/arch/amd64/elfload.c trunk/openbios-devel/arch/amd64/linux_load.c trunk/openbios-devel/arch/amd64/multiboot.c trunk/openbios-devel/arch/amd64/openbios.c trunk/openbios-devel/arch/amd64/plainboot.c trunk/openbios-devel/arch/amd64/segment.c trunk/openbios-devel/arch/amd64/sys_info.c trunk/openbios-devel/arch/ppc/qemu/init.c trunk/openbios-devel/arch/ppc/qemu/main.c trunk/openbios-devel/arch/sparc32/aoutload.c trunk/openbios-devel/arch/sparc32/boot.c trunk/openbios-devel/arch/sparc32/boot.h trunk/openbios-devel/arch/sparc32/builtin.c trunk/openbios-devel/arch/sparc32/context.c trunk/openbios-devel/arch/sparc32/elfload.c trunk/openbios-devel/arch/sparc32/entry.S trunk/openbios-devel/arch/sparc32/forthload.c trunk/openbios-devel/arch/sparc32/lib.c trunk/openbios-devel/arch/sparc32/linux_load.c trunk/openbios-devel/arch/sparc32/multiboot.c trunk/openbios-devel/arch/sparc32/openbios.c trunk/openbios-devel/arch/sparc32/plainboot.c trunk/openbios-devel/arch/sparc32/romvec.c trunk/openbios-devel/arch/sparc32/sys_info.c trunk/openbios-devel/arch/sparc64/aoutload.c trunk/openbios-devel/arch/sparc64/boot.c trunk/openbios-devel/arch/sparc64/boot.h trunk/openbios-devel/arch/sparc64/builtin.c trunk/openbios-devel/arch/sparc64/console.c trunk/openbios-devel/arch/sparc64/context.c trunk/openbios-devel/arch/sparc64/elfload.c trunk/openbios-devel/arch/sparc64/entry.S trunk/openbios-devel/arch/sparc64/fcodeload.c trunk/openbios-devel/arch/sparc64/forthload.c trunk/openbios-devel/arch/sparc64/lib.c trunk/openbios-devel/arch/sparc64/linux_load.c trunk/openbios-devel/arch/sparc64/multiboot.c trunk/openbios-devel/arch/sparc64/openbios.c trunk/openbios-devel/arch/sparc64/plainboot.c trunk/openbios-devel/arch/sparc64/sys_info.c trunk/openbios-devel/arch/x86/boot.c trunk/openbios-devel/arch/x86/builtin.c trunk/openbios-devel/arch/x86/context.c trunk/openbios-devel/arch/x86/elfload.c trunk/openbios-devel/arch/x86/forthload.c trunk/openbios-devel/arch/x86/linux_load.c trunk/openbios-devel/arch/x86/multiboot.c trunk/openbios-devel/arch/x86/openbios.c trunk/openbios-devel/arch/x86/plainboot.c trunk/openbios-devel/arch/x86/segment.c trunk/openbios-devel/arch/x86/sys_info.c trunk/openbios-devel/drivers/fw_cfg.c trunk/openbios-devel/drivers/obio.c trunk/openbios-devel/include/arch/ppc/io.h trunk/openbios-devel/include/arch/sparc64/io.h trunk/openbios-devel/libopenbios/build.xml
Modified: trunk/openbios-devel/arch/amd64/boot.c ============================================================================== --- trunk/openbios-devel/arch/amd64/boot.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/amd64/boot.c Sun Mar 14 17:09:44 2010 (r693) @@ -7,7 +7,7 @@ #include "libopenbios/elfload.h" #include "openbios/nvram.h" #include "libc/diskio.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h"
int elf_load(struct sys_info *, const char *filename, const char *cmdline); int linux_load(struct sys_info *, const char *filename, const char *cmdline);
Modified: trunk/openbios-devel/arch/amd64/builtin.c ============================================================================== --- trunk/openbios-devel/arch/amd64/builtin.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/amd64/builtin.c Sun Mar 14 17:09:44 2010 (r693) @@ -8,7 +8,7 @@
#include "openbios/config.h" #include <asm/types.h> -#include "sys_info.h" +#include "libopenbios/sys_info.h"
/* * wrap an array around the hex'ed dictionary file
Modified: trunk/openbios-devel/arch/amd64/elfload.c ============================================================================== --- trunk/openbios-devel/arch/amd64/elfload.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/amd64/elfload.c Sun Mar 14 17:09:44 2010 (r693) @@ -8,7 +8,7 @@ #include "openbios/elf.h" #include "asm/elf.h" #include "elf_boot.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "libopenbios/ipchecksum.h" #include "loadfs.h" #define printf printk
Modified: trunk/openbios-devel/arch/amd64/linux_load.c ============================================================================== --- trunk/openbios-devel/arch/amd64/linux_load.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/amd64/linux_load.c Sun Mar 14 17:09:44 2010 (r693) @@ -11,7 +11,7 @@ #include "openbios/config.h" #include "kernel/kernel.h" #include "libopenbios/bindings.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "context.h" #include "segment.h" #include "loadfs.h"
Modified: trunk/openbios-devel/arch/amd64/multiboot.c ============================================================================== --- trunk/openbios-devel/arch/amd64/multiboot.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/amd64/multiboot.c Sun Mar 14 17:09:44 2010 (r693) @@ -2,7 +2,7 @@
#include "openbios/config.h" #include "asm/io.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "multiboot.h"
#define printf printk
Modified: trunk/openbios-devel/arch/amd64/openbios.c ============================================================================== --- trunk/openbios-devel/arch/amd64/openbios.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/amd64/openbios.c Sun Mar 14 17:09:44 2010 (r693) @@ -12,11 +12,12 @@ #include "dict.h" #include "kernel/kernel.h" #include "kernel/stack.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "openbios.h" #include "relocate.h"
void boot(void); +void collect_sys_info(struct sys_info *info);
static char intdict[256 * 1024];
Modified: trunk/openbios-devel/arch/amd64/plainboot.c ============================================================================== --- trunk/openbios-devel/arch/amd64/plainboot.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/amd64/plainboot.c Sun Mar 14 17:09:44 2010 (r693) @@ -7,7 +7,7 @@ */
#include "openbios/config.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "multiboot.h"
#define FIXED_DICTSTART 0xfffe0000
Modified: trunk/openbios-devel/arch/amd64/segment.c ============================================================================== --- trunk/openbios-devel/arch/amd64/segment.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/amd64/segment.c Sun Mar 14 17:09:44 2010 (r693) @@ -5,7 +5,7 @@
#include "openbios/config.h" #include "kernel/kernel.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "relocate.h" #include "segment.h"
Modified: trunk/openbios-devel/arch/amd64/sys_info.c ============================================================================== --- trunk/openbios-devel/arch/amd64/sys_info.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/amd64/sys_info.c Sun Mar 14 17:09:44 2010 (r693) @@ -1,6 +1,6 @@ #include "openbios/config.h" #include "kernel/kernel.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "context.h"
#define printf printk
Modified: trunk/openbios-devel/arch/ppc/qemu/init.c ============================================================================== --- trunk/openbios-devel/arch/ppc/qemu/init.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/ppc/qemu/init.c Sun Mar 14 17:09:44 2010 (r693) @@ -31,7 +31,7 @@ #include "libc/byteorder.h" #include "libc/vsprintf.h" #define NO_QEMU_PROTOS -#include "openbios/fw_cfg.h" +#include "arch/common/fw_cfg.h" #include "arch/ppc/processor.h"
#define UUID_FMT "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x"
Modified: trunk/openbios-devel/arch/ppc/qemu/main.c ============================================================================== --- trunk/openbios-devel/arch/ppc/qemu/main.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/ppc/qemu/main.c Sun Mar 14 17:09:44 2010 (r693) @@ -23,7 +23,7 @@ #include "kernel.h" #include "libopenbios/ofmem.h" #define NO_QEMU_PROTOS -#include "openbios/fw_cfg.h" +#include "arch/common/fw_cfg.h"
//#define DEBUG_QEMU
Modified: trunk/openbios-devel/arch/sparc32/aoutload.c ============================================================================== --- trunk/openbios-devel/arch/sparc32/aoutload.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/sparc32/aoutload.c Sun Mar 14 17:09:44 2010 (r693) @@ -6,7 +6,7 @@ #include "openbios/config.h" #include "kernel/kernel.h" #include "a.out.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "loadfs.h" #include "boot.h" #define printf printk
Modified: trunk/openbios-devel/arch/sparc32/boot.c ============================================================================== --- trunk/openbios-devel/arch/sparc32/boot.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/sparc32/boot.c Sun Mar 14 17:09:44 2010 (r693) @@ -9,7 +9,7 @@ #include "drivers/drivers.h" #include "libc/diskio.h" #include "libc/vsprintf.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "openprom.h" #include "boot.h"
Modified: trunk/openbios-devel/arch/sparc32/boot.h ============================================================================== --- trunk/openbios-devel/arch/sparc32/boot.h Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/sparc32/boot.h Sun Mar 14 17:09:44 2010 (r693) @@ -33,6 +33,7 @@
// sys_info.c extern unsigned int qemu_mem_size; +extern void collect_sys_info(struct sys_info *info);
// romvec.c extern struct linux_arguments_v0 obp_arg;
Modified: trunk/openbios-devel/arch/sparc32/builtin.c ============================================================================== --- trunk/openbios-devel/arch/sparc32/builtin.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/sparc32/builtin.c Sun Mar 14 17:09:44 2010 (r693) @@ -8,7 +8,7 @@
#include "openbios/config.h" #include "asm/types.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h"
/* * wrap an array around the hex'ed dictionary file
Modified: trunk/openbios-devel/arch/sparc32/context.c ============================================================================== --- trunk/openbios-devel/arch/sparc32/context.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/sparc32/context.c Sun Mar 14 17:09:44 2010 (r693) @@ -6,7 +6,7 @@ #include "openbios/config.h" #include "kernel/kernel.h" #include "context.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "boot.h"
#define MAIN_STACK_SIZE 16384
Modified: trunk/openbios-devel/arch/sparc32/elfload.c ============================================================================== --- trunk/openbios-devel/arch/sparc32/elfload.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/sparc32/elfload.c Sun Mar 14 17:09:44 2010 (r693) @@ -8,7 +8,7 @@ #include "openbios/elf.h" #include "asm/elf.h" #include "elf_boot.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "libopenbios/ipchecksum.h" #include "loadfs.h" #include "boot.h"
Modified: trunk/openbios-devel/arch/sparc32/entry.S ============================================================================== --- trunk/openbios-devel/arch/sparc32/entry.S Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/sparc32/entry.S Sun Mar 14 17:09:44 2010 (r693) @@ -12,7 +12,7 @@ #include "asm/crs.h" #define NO_QEMU_PROTOS #define NO_OPENBIOS_PROTOS -#include "openbios/fw_cfg.h" +#include "arch/common/fw_cfg.h"
#define CFG_ADDR 0x00000510 #define CFG_ASI 0x2d
Modified: trunk/openbios-devel/arch/sparc32/forthload.c ============================================================================== --- trunk/openbios-devel/arch/sparc32/forthload.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/sparc32/forthload.c Sun Mar 14 17:09:44 2010 (r693) @@ -9,7 +9,7 @@ #include "openbios/config.h" #include "kernel/kernel.h" #include "libopenbios/bindings.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "loadfs.h" #include "boot.h" #define printk printk
Modified: trunk/openbios-devel/arch/sparc32/lib.c ============================================================================== --- trunk/openbios-devel/arch/sparc32/lib.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/sparc32/lib.c Sun Mar 14 17:09:44 2010 (r693) @@ -13,7 +13,7 @@ #include "asm/asi.h" #include "pgtsrmmu.h" #include "openprom.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "boot.h"
#define NCTX_SWIFT 0x100
Modified: trunk/openbios-devel/arch/sparc32/linux_load.c ============================================================================== --- trunk/openbios-devel/arch/sparc32/linux_load.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/sparc32/linux_load.c Sun Mar 14 17:09:44 2010 (r693) @@ -11,7 +11,7 @@ #include "openbios/config.h" #include "kernel/kernel.h" #include "libopenbios/bindings.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "context.h" #include "loadfs.h" #include "boot.h"
Modified: trunk/openbios-devel/arch/sparc32/multiboot.c ============================================================================== --- trunk/openbios-devel/arch/sparc32/multiboot.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/sparc32/multiboot.c Sun Mar 14 17:09:44 2010 (r693) @@ -2,7 +2,7 @@
#include "openbios/config.h" #include "asm/io.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "multiboot.h"
#define printf printk
Modified: trunk/openbios-devel/arch/sparc32/openbios.c ============================================================================== --- trunk/openbios-devel/arch/sparc32/openbios.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/sparc32/openbios.c Sun Mar 14 17:09:44 2010 (r693) @@ -15,7 +15,7 @@ #include "kernel/stack.h" #include "openbios/nvram.h" #include "../../drivers/timer.h" // XXX -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "openbios.h" #include "boot.h" #include "video_subr.h"
Modified: trunk/openbios-devel/arch/sparc32/plainboot.c ============================================================================== --- trunk/openbios-devel/arch/sparc32/plainboot.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/sparc32/plainboot.c Sun Mar 14 17:09:44 2010 (r693) @@ -7,7 +7,7 @@ */
#include "openbios/config.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "multiboot.h"
#define FIXED_DICTSTART 0xfffe0000
Modified: trunk/openbios-devel/arch/sparc32/romvec.c ============================================================================== --- trunk/openbios-devel/arch/sparc32/romvec.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/sparc32/romvec.c Sun Mar 14 17:09:44 2010 (r693) @@ -11,7 +11,7 @@ #include "openbios/config.h" #include "libopenbios/bindings.h" #include "drivers/drivers.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "boot.h"
#ifdef CONFIG_DEBUG_OBP
Modified: trunk/openbios-devel/arch/sparc32/sys_info.c ============================================================================== --- trunk/openbios-devel/arch/sparc32/sys_info.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/sparc32/sys_info.c Sun Mar 14 17:09:44 2010 (r693) @@ -1,7 +1,7 @@ #include "openbios/config.h" #include "kernel/kernel.h" #include "elf_boot.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "context.h" #include "boot.h"
Modified: trunk/openbios-devel/arch/sparc64/aoutload.c ============================================================================== --- trunk/openbios-devel/arch/sparc64/aoutload.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/sparc64/aoutload.c Sun Mar 14 17:09:44 2010 (r693) @@ -7,7 +7,7 @@ #include "kernel/kernel.h" #define CONFIG_SPARC64_PAGE_SIZE_8KB #include "a.out.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "loadfs.h" #include "boot.h" #define printf printk
Modified: trunk/openbios-devel/arch/sparc64/boot.c ============================================================================== --- trunk/openbios-devel/arch/sparc64/boot.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/sparc64/boot.c Sun Mar 14 17:09:44 2010 (r693) @@ -8,7 +8,7 @@ #include "openbios/nvram.h" #include "libc/diskio.h" #include "libc/vsprintf.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "boot.h"
struct sys_info sys_info;
Modified: trunk/openbios-devel/arch/sparc64/boot.h ============================================================================== --- trunk/openbios-devel/arch/sparc64/boot.h Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/sparc64/boot.h Sun Mar 14 17:09:44 2010 (r693) @@ -37,6 +37,7 @@
// sys_info.c extern uint64_t qemu_mem_size; +extern void collect_sys_info(struct sys_info *info);
// console.c void ob_su_init(uint64_t base, uint64_t offset, int intr);
Modified: trunk/openbios-devel/arch/sparc64/builtin.c ============================================================================== --- trunk/openbios-devel/arch/sparc64/builtin.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/sparc64/builtin.c Sun Mar 14 17:09:44 2010 (r693) @@ -8,7 +8,7 @@
#include "openbios/config.h" #include "asm/types.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h"
/* * wrap an array around the hex'ed dictionary file
Modified: trunk/openbios-devel/arch/sparc64/console.c ============================================================================== --- trunk/openbios-devel/arch/sparc64/console.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/sparc64/console.c Sun Mar 14 17:09:44 2010 (r693) @@ -13,7 +13,7 @@ #include "openbios.h" #include "video_subr.h" #include "libc/vsprintf.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "boot.h"
/* ******************************************************************
Modified: trunk/openbios-devel/arch/sparc64/context.c ============================================================================== --- trunk/openbios-devel/arch/sparc64/context.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/sparc64/context.c Sun Mar 14 17:09:44 2010 (r693) @@ -6,7 +6,7 @@ #include "openbios/config.h" #include "kernel/kernel.h" #include "context.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "boot.h"
#define MAIN_STACK_SIZE 16384
Modified: trunk/openbios-devel/arch/sparc64/elfload.c ============================================================================== --- trunk/openbios-devel/arch/sparc64/elfload.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/sparc64/elfload.c Sun Mar 14 17:09:44 2010 (r693) @@ -8,7 +8,7 @@ #include "openbios/elf.h" #include "asm/elf.h" #include "elf_boot.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "libopenbios/ipchecksum.h" #include "loadfs.h" #include "boot.h"
Modified: trunk/openbios-devel/arch/sparc64/entry.S ============================================================================== --- trunk/openbios-devel/arch/sparc64/entry.S Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/sparc64/entry.S Sun Mar 14 17:09:44 2010 (r693) @@ -13,7 +13,7 @@ #include "lsu.h" #define NO_QEMU_PROTOS #define NO_OPENBIOS_PROTOS -#include "openbios/fw_cfg.h" +#include "arch/common/fw_cfg.h"
#define PROM_ADDR 0x1fff0000000 #define CFG_ADDR 0x1fe02000510
Modified: trunk/openbios-devel/arch/sparc64/fcodeload.c ============================================================================== --- trunk/openbios-devel/arch/sparc64/fcodeload.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/sparc64/fcodeload.c Sun Mar 14 17:09:44 2010 (r693) @@ -5,7 +5,7 @@ #include "openbios/config.h" #include "kernel/kernel.h" #include "libopenbios/bindings.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "loadfs.h" #include "boot.h" #define printf printk
Modified: trunk/openbios-devel/arch/sparc64/forthload.c ============================================================================== --- trunk/openbios-devel/arch/sparc64/forthload.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/sparc64/forthload.c Sun Mar 14 17:09:44 2010 (r693) @@ -9,7 +9,7 @@ #include "openbios/config.h" #include "kernel/kernel.h" #include "libopenbios/bindings.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "loadfs.h" #include "boot.h" #define printk printk
Modified: trunk/openbios-devel/arch/sparc64/lib.c ============================================================================== --- trunk/openbios-devel/arch/sparc64/lib.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/sparc64/lib.c Sun Mar 14 17:09:44 2010 (r693) @@ -11,7 +11,7 @@ #include "libc/vsprintf.h" #include "libopenbios/bindings.h" #include "spitfire.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "boot.h"
#include "ofmem_sparc64.h"
Modified: trunk/openbios-devel/arch/sparc64/linux_load.c ============================================================================== --- trunk/openbios-devel/arch/sparc64/linux_load.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/sparc64/linux_load.c Sun Mar 14 17:09:44 2010 (r693) @@ -11,7 +11,7 @@ #include "openbios/config.h" #include "kernel/kernel.h" #include "libopenbios/bindings.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "context.h" #include "loadfs.h" #include "boot.h"
Modified: trunk/openbios-devel/arch/sparc64/multiboot.c ============================================================================== --- trunk/openbios-devel/arch/sparc64/multiboot.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/sparc64/multiboot.c Sun Mar 14 17:09:44 2010 (r693) @@ -2,7 +2,7 @@
#include "openbios/config.h" #include "asm/io.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "multiboot.h"
#define printf printk
Modified: trunk/openbios-devel/arch/sparc64/openbios.c ============================================================================== --- trunk/openbios-devel/arch/sparc64/openbios.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/sparc64/openbios.c Sun Mar 14 17:09:44 2010 (r693) @@ -11,14 +11,14 @@ #include "drivers/drivers.h" #include "dict.h" #include "openbios/nvram.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "openbios.h" #include "drivers/pci.h" #include "asm/pci.h" #include "boot.h" #include "../../drivers/timer.h" // XXX #define NO_QEMU_PROTOS -#include "openbios/fw_cfg.h" +#include "arch/common/fw_cfg.h" #include "video_subr.h" #include "libopenbios/ofmem.h"
Modified: trunk/openbios-devel/arch/sparc64/plainboot.c ============================================================================== --- trunk/openbios-devel/arch/sparc64/plainboot.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/sparc64/plainboot.c Sun Mar 14 17:09:44 2010 (r693) @@ -7,7 +7,7 @@ */
#include "openbios/config.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "multiboot.h"
#define FIXED_DICTSTART 0xfffe0000
Modified: trunk/openbios-devel/arch/sparc64/sys_info.c ============================================================================== --- trunk/openbios-devel/arch/sparc64/sys_info.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/sparc64/sys_info.c Sun Mar 14 17:09:44 2010 (r693) @@ -1,7 +1,7 @@ #include "openbios/config.h" #include "kernel/kernel.h" #include "elf_boot.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "context.h" #include "boot.h"
Modified: trunk/openbios-devel/arch/x86/boot.c ============================================================================== --- trunk/openbios-devel/arch/x86/boot.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/x86/boot.c Sun Mar 14 17:09:44 2010 (r693) @@ -12,7 +12,7 @@ #include "libopenbios/elfload.h" #include "openbios/nvram.h" #include "libc/diskio.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "boot.h"
struct sys_info sys_info;
Modified: trunk/openbios-devel/arch/x86/builtin.c ============================================================================== --- trunk/openbios-devel/arch/x86/builtin.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/x86/builtin.c Sun Mar 14 17:09:44 2010 (r693) @@ -7,7 +7,7 @@ */
#include "openbios/config.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h"
/* * wrap an array around the hex'ed dictionary file
Modified: trunk/openbios-devel/arch/x86/context.c ============================================================================== --- trunk/openbios-devel/arch/x86/context.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/x86/context.c Sun Mar 14 17:09:44 2010 (r693) @@ -10,7 +10,7 @@ #include "kernel/kernel.h" #include "segment.h" #include "context.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "boot.h"
#define MAIN_STACK_SIZE 16384
Modified: trunk/openbios-devel/arch/x86/elfload.c ============================================================================== --- trunk/openbios-devel/arch/x86/elfload.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/x86/elfload.c Sun Mar 14 17:09:44 2010 (r693) @@ -8,7 +8,7 @@ #include "openbios/elf.h" #include "asm/elf.h" #include "elf_boot.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "libopenbios/ipchecksum.h" #include "loadfs.h" #include "boot.h"
Modified: trunk/openbios-devel/arch/x86/forthload.c ============================================================================== --- trunk/openbios-devel/arch/x86/forthload.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/x86/forthload.c Sun Mar 14 17:09:44 2010 (r693) @@ -9,7 +9,7 @@ #include "openbios/config.h" #include "kernel/kernel.h" #include "libopenbios/bindings.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "loadfs.h" #include "boot.h" #define printk printk
Modified: trunk/openbios-devel/arch/x86/linux_load.c ============================================================================== --- trunk/openbios-devel/arch/x86/linux_load.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/x86/linux_load.c Sun Mar 14 17:09:44 2010 (r693) @@ -11,7 +11,7 @@ #include "openbios/config.h" #include "kernel/kernel.h" #include "libopenbios/bindings.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "context.h" #include "segment.h" #include "loadfs.h"
Modified: trunk/openbios-devel/arch/x86/multiboot.c ============================================================================== --- trunk/openbios-devel/arch/x86/multiboot.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/x86/multiboot.c Sun Mar 14 17:09:44 2010 (r693) @@ -2,7 +2,7 @@
#include "openbios/config.h" #include "asm/io.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "multiboot.h"
#ifdef CONFIG_DEBUG_BOOT
Modified: trunk/openbios-devel/arch/x86/openbios.c ============================================================================== --- trunk/openbios-devel/arch/x86/openbios.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/x86/openbios.c Sun Mar 14 17:09:44 2010 (r693) @@ -14,11 +14,12 @@ #include "kernel/stack.h" #include "drivers/drivers.h" #include "drivers/pci.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "openbios.h" #include "relocate.h"
void boot(void); +void collect_sys_info(struct sys_info *info);
static unsigned char intdict[256 * 1024];
Modified: trunk/openbios-devel/arch/x86/plainboot.c ============================================================================== --- trunk/openbios-devel/arch/x86/plainboot.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/x86/plainboot.c Sun Mar 14 17:09:44 2010 (r693) @@ -7,7 +7,7 @@ */
#include "openbios/config.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "multiboot.h"
#define FIXED_DICTSTART 0xfffe0000
Modified: trunk/openbios-devel/arch/x86/segment.c ============================================================================== --- trunk/openbios-devel/arch/x86/segment.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/x86/segment.c Sun Mar 14 17:09:44 2010 (r693) @@ -5,7 +5,7 @@
#include "openbios/config.h" #include "kernel/kernel.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "relocate.h" #include "segment.h"
Modified: trunk/openbios-devel/arch/x86/sys_info.c ============================================================================== --- trunk/openbios-devel/arch/x86/sys_info.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/arch/x86/sys_info.c Sun Mar 14 17:09:44 2010 (r693) @@ -1,6 +1,6 @@ #include "openbios/config.h" #include "kernel/kernel.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "context.h"
#ifdef CONFIG_DEBUG_BOOT
Modified: trunk/openbios-devel/drivers/fw_cfg.c ============================================================================== --- trunk/openbios-devel/drivers/fw_cfg.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/drivers/fw_cfg.c Sun Mar 14 17:09:44 2010 (r693) @@ -3,7 +3,7 @@ #include "libc/byteorder.h" #include "libopenbios/ofmem.h" #define NO_QEMU_PROTOS -#include "openbios/fw_cfg.h" +#include "arch/common/fw_cfg.h"
#if !defined(CONFIG_SPARC64) static volatile uint16_t *fw_cfg_cmd;
Modified: trunk/openbios-devel/drivers/obio.c ============================================================================== --- trunk/openbios-devel/drivers/obio.c Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/drivers/obio.c Sun Mar 14 17:09:44 2010 (r693) @@ -21,7 +21,7 @@ #include "libopenbios/ofmem.h" #include "obio.h" #define NO_QEMU_PROTOS -#include "openbios/fw_cfg.h" +#include "arch/common/fw_cfg.h" #include "escc.h"
#define UUID_FMT "%02x%02x%02x%02x-%02x%02x-%02x%02x-%02x%02x-%02x%02x%02x%02x%02x%02x"
Copied: trunk/openbios-devel/include/arch/common/fw_cfg.h (from r692, trunk/openbios-devel/include/openbios/fw_cfg.h) ============================================================================== --- /dev/null 00:00:00 1970 (empty, because file is newly added) +++ trunk/openbios-devel/include/arch/common/fw_cfg.h Sun Mar 14 17:09:44 2010 (r693, copy of r692, trunk/openbios-devel/include/openbios/fw_cfg.h) @@ -0,0 +1,84 @@ +#ifndef FW_CFG_H +#define FW_CFG_H + +#define FW_CFG_SIGNATURE 0x00 +#define FW_CFG_ID 0x01 +#define FW_CFG_UUID 0x02 +#define FW_CFG_RAM_SIZE 0x03 +#define FW_CFG_NOGRAPHIC 0x04 +#define FW_CFG_NB_CPUS 0x05 +#define FW_CFG_MACHINE_ID 0x06 +#define FW_CFG_KERNEL_ADDR 0x07 +#define FW_CFG_KERNEL_SIZE 0x08 +#define FW_CFG_KERNEL_CMDLINE 0x09 +#define FW_CFG_INITRD_ADDR 0x0a +#define FW_CFG_INITRD_SIZE 0x0b +#define FW_CFG_BOOT_DEVICE 0x0c +#define FW_CFG_NUMA 0x0d +#define FW_CFG_BOOT_MENU 0x0e +#define FW_CFG_MAX_CPUS 0x0f +#define FW_CFG_KERNEL_ENTRY 0x10 +#define FW_CFG_KERNEL_DATA 0x11 +#define FW_CFG_INITRD_DATA 0x12 +#define FW_CFG_CMDLINE_ADDR 0x13 +#define FW_CFG_CMDLINE_SIZE 0x14 +#define FW_CFG_CMDLINE_DATA 0x15 +#define FW_CFG_SETUP_ADDR 0x16 +#define FW_CFG_SETUP_SIZE 0x17 +#define FW_CFG_SETUP_DATA 0x18 +#define FW_CFG_FILE_DIR 0x19 + +#define FW_CFG_FILE_FIRST 0x20 +#define FW_CFG_FILE_SLOTS 0x10 +#define FW_CFG_MAX_ENTRY (FW_CFG_FILE_FIRST+FW_CFG_FILE_SLOTS) + +#define FW_CFG_WRITE_CHANNEL 0x4000 +#define FW_CFG_ARCH_LOCAL 0x8000 +#define FW_CFG_ENTRY_MASK ~(FW_CFG_WRITE_CHANNEL | FW_CFG_ARCH_LOCAL) + +#define FW_CFG_PPC_WIDTH (FW_CFG_ARCH_LOCAL + 0x00) +#define FW_CFG_PPC_HEIGHT (FW_CFG_ARCH_LOCAL + 0x01) +#define FW_CFG_PPC_DEPTH (FW_CFG_ARCH_LOCAL + 0x02) +#define FW_CFG_PPC_TBFREQ (FW_CFG_ARCH_LOCAL + 0x03) +#define FW_CFG_PPC_CPUFREQ (FW_CFG_ARCH_LOCAL + 0x04) + +#define FW_CFG_INVALID 0xffff + +#ifndef NO_QEMU_PROTOS +typedef struct FWCfgFile { + uint32_t size; /* file size */ + uint16_t select; /* write this to 0x510 to read it */ + uint16_t reserved; + char name[56]; +} FWCfgFile; + +typedef struct FWCfgFiles { + uint32_t count; + FWCfgFile f[]; +} FWCfgFiles; + +typedef void (*FWCfgCallback)(void *opaque, uint8_t *data); + +typedef struct _FWCfgState FWCfgState; +int fw_cfg_add_bytes(FWCfgState *s, uint16_t key, uint8_t *data, uint32_t len); +int fw_cfg_add_i16(FWCfgState *s, uint16_t key, uint16_t value); +int fw_cfg_add_i32(FWCfgState *s, uint16_t key, uint32_t value); +int fw_cfg_add_i64(FWCfgState *s, uint16_t key, uint64_t value); +int fw_cfg_add_callback(FWCfgState *s, uint16_t key, FWCfgCallback callback, + void *callback_opaque, uint8_t *data, size_t len); +int fw_cfg_add_file(FWCfgState *s, const char *dir, const char *filename, + uint8_t *data, uint32_t len); +FWCfgState *fw_cfg_init(uint32_t ctl_port, uint32_t data_port, + target_phys_addr_t crl_addr, target_phys_addr_t data_addr); + +#endif /* NO_QEMU_PROTOS */ + +#ifndef NO_OPENBIOS_PROTOS +void fw_cfg_read(uint16_t cmd, char *buf, unsigned int nbytes); +uint64_t fw_cfg_read_i64(uint16_t cmd); +uint32_t fw_cfg_read_i32(uint16_t cmd); +uint16_t fw_cfg_read_i16(uint16_t cmd); +void fw_cfg_init(void); +#endif /* NO_OPENBIOS_PROTOS */ + +#endif
Modified: trunk/openbios-devel/include/arch/ppc/io.h ============================================================================== --- trunk/openbios-devel/include/arch/ppc/io.h Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/include/arch/ppc/io.h Sun Mar 14 17:09:44 2010 (r693) @@ -4,7 +4,7 @@ #include "asm/types.h"
#define NO_QEMU_PROTOS -#include "openbios/fw_cfg.h" +#include "arch/common/fw_cfg.h"
extern unsigned long virt_offset;
Modified: trunk/openbios-devel/include/arch/sparc64/io.h ============================================================================== --- trunk/openbios-devel/include/arch/sparc64/io.h Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/include/arch/sparc64/io.h Sun Mar 14 17:09:44 2010 (r693) @@ -4,7 +4,7 @@ #include "asm/types.h"
#define NO_QEMU_PROTOS -#include "openbios/fw_cfg.h" +#include "arch/common/fw_cfg.h"
extern unsigned long va_shift; // Set in entry.S // Defined in ldscript
Copied and modified: trunk/openbios-devel/include/libopenbios/sys_info.h (from r692, trunk/openbios-devel/include/sys_info.h) ============================================================================== --- trunk/openbios-devel/include/sys_info.h Sun Mar 14 16:19:41 2010 (r692, copy source) +++ trunk/openbios-devel/include/libopenbios/sys_info.h Sun Mar 14 17:09:44 2010 (r693) @@ -22,7 +22,6 @@ unsigned long *dict_end; };
-void collect_sys_info(struct sys_info *info); void collect_elfboot_info(struct sys_info *info); void collect_linuxbios_info(struct sys_info *info);
Modified: trunk/openbios-devel/libopenbios/build.xml ============================================================================== --- trunk/openbios-devel/libopenbios/build.xml Sun Mar 14 16:19:41 2010 (r692) +++ trunk/openbios-devel/libopenbios/build.xml Sun Mar 14 17:09:44 2010 (r693) @@ -4,15 +4,15 @@ <object source="bindings.c"/> <object source="client.c"/> <object source="console_common.c"/> - <object source="elfnote.c" condition="X86"/> - <object source="elfnote.c" condition="AMD64"/> - <object source="elfnote.c" condition="SPARC32"/> - <object source="elfnote.c" condition="SPARC64"/> - <object source="elfload.c" condition="PPC"/> + <object source="elf_info.c" condition="X86"/> + <object source="elf_info.c" condition="AMD64"/> + <object source="elf_info.c" condition="SPARC32"/> + <object source="elf_info.c" condition="SPARC64"/> + <object source="elf_info.c" condition="PPC"/> <object source="font_8x8.c" condition="FONT_8X8"/> <object source="font_8x16.c" condition="FONT_8X16"/> <object source="ipchecksum.c"/> - <object source="linuxbios.c" condition="LINUXBIOS"/> + <object source="linuxbios_info.c" condition="LINUXBIOS"/> <object source="ofmem_common.c" condition="OFMEM"/> </library>
Copied and modified: trunk/openbios-devel/libopenbios/elf_info.c (from r692, trunk/openbios-devel/libopenbios/elfnote.c) ============================================================================== --- trunk/openbios-devel/libopenbios/elfnote.c Sun Mar 14 16:19:41 2010 (r692, copy source) +++ trunk/openbios-devel/libopenbios/elf_info.c Sun Mar 14 17:09:44 2010 (r693) @@ -1,7 +1,7 @@ /* Support for ELF Boot Proposal as a boot image */ #include "openbios/config.h" #include "elf_boot.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h" #include "asm/io.h" #include "libopenbios/ipchecksum.h" #include "openbios-version.h"
Copied and modified: trunk/openbios-devel/libopenbios/linuxbios_info.c (from r692, trunk/openbios-devel/libopenbios/linuxbios.c) ============================================================================== --- trunk/openbios-devel/libopenbios/linuxbios.c Sun Mar 14 16:19:41 2010 (r692, copy source) +++ trunk/openbios-devel/libopenbios/linuxbios_info.c Sun Mar 14 17:09:44 2010 (r693) @@ -6,7 +6,7 @@ #include "asm/io.h" #include "linuxbios.h" #include "libopenbios/ipchecksum.h" -#include "sys_info.h" +#include "libopenbios/sys_info.h"
#ifdef CONFIG_DEBUG_BOOT #define debug printk
On 3/14/10, repository service svn@openbios.org wrote:
Author: mcayland Date: Sun Mar 14 17:09:44 2010 New Revision: 693 URL: http://tracker.coreboot.org/trac/openbios/changeset/693
PPC build is broken:
LINK openbios-qemu.elf libopenbios.a(elf_info.o): In function `collect_elfboot_info': /src/openbios-devel/obj-ppc/../libopenbios/elf_info.c:108: undefined reference to `virt_offset' /src/openbios-devel/obj-ppc/../libopenbios/elf_info.c:109: undefined reference to `virt_offset' /src/openbios-devel/obj-ppc/../libopenbios/elf_info.c:111: undefined reference to `virt_offset'
I'm not sure this patch is the reason, but it matches virt_offset.
Blue Swirl wrote:
PPC build is broken:
LINK openbios-qemu.elf libopenbios.a(elf_info.o): In function `collect_elfboot_info': /src/openbios-devel/obj-ppc/../libopenbios/elf_info.c:108: undefined reference to `virt_offset' /src/openbios-devel/obj-ppc/../libopenbios/elf_info.c:109: undefined reference to `virt_offset' /src/openbios-devel/obj-ppc/../libopenbios/elf_info.c:111: undefined reference to `virt_offset'
I'm not sure this patch is the reason, but it matches virt_offset.
Yeah, I just noticed this. I'm not quite sure why it's happening because elf_info.c #includes asm/io.h which contains the definition for virt_offset...
One of the reasons I've been splitting everything across multiple commits today is to make it easier to bisect in the event that I manage to accidentally break anything ;)
ATB,
Mark.