x86 boot enhancements, linuxbios support
PATCH 1/1 x86 boot enhancements, linuxbios support
Linus please apply,
This patch is the first patch takes advantage of the earlier work in this series of patches to implement native LinuxBIOS support.
For now I just detect LinuxBIOS and get the memory size. More will come as the interface firms up. To the generic code is a 3 line code change. Two functions are made non-static, and a call is inserted to see what we can read from the LinuxBIOS table.
Eric
arch/i386/Config.help +16 -0
@@ -797,6 +797,22 @@ a work-around for a number of buggy BIOSes. Switch this option on if your computer crashes instead of powering off properly. +LinuxBIOS support +CONFIG_LINUXBIOS + LinuxBIOS is an alternative GPL'd firmware initially for x86 + compatible machines. LinuxBIOS attempts to be a simple and as fast + as possible, and is initially optimized for linux. The interface to + the OS is a table at the beginning of memory. Which should make the + inevitable firmware bugs easier to work around, as should the source + code :) A goal of this table is to provide enough information so + that any OS but especially linux does not need to have motherboard + specific knowledge. + + This first release only provides LinuxBIOS detection (by detecting + it's table) and memory size detection. + + For more information on LinuxBIOS see http://www.linuxbios.org + CONFIG_CMDLINE Generally it is best to pass command line parameters via the bootloader but there are times it is convinient not to do this.
arch/i386/config.in +1 -0
@@ -203,6 +203,7 @@ fi fi +bool 'LinuxBIOS support' CONFIG_LINUXBIOS endmenu mainmenu_option next_comment
arch/i386/defconfig +1 -0
@@ -119,6 +119,7 @@ CONFIG_BINFMT_MISC=y CONFIG_PM=y # CONFIG_APM is not set +# CONFIG_LINUXBIOS is not set # # Memory Technology Devices (MTD)
arch/i386/kernel/Makefile +1 -0
@@ -41,6 +41,7 @@ obj-$(CONFIG_SMP) += smp.o smpboot.o trampoline.o obj-$(CONFIG_X86_LOCAL_APIC) += mpparse.o apic.o nmi.o obj-$(CONFIG_X86_IO_APIC) += io_apic.o +obj-$(CONFIG_LINUXBIOS) += linuxbios.o ifdef CONFIG_VISWS obj-y += setup-visws.o obj-$(CONFIG_X86_VISWS_APIC) += visws_apic.o
arch/i386/kernel/linuxbios.c +103 -0
103 lines not on this page · raw message
arch/i386/kernel/linuxbios_tables.h +82 -0
82 lines not on this page · raw message
arch/i386/kernel/setup.c +6 -2
@@ -117,6 +117,7 @@#include <asm/mmu_context.h> #include <asm/boot.h> #include <asm/boot_param.h> +#include <asm/linuxbios.h> /* * Machine setup..
@@ -262,7 +263,7 @@ } } -static void __init add_memory_region (unsigned long long start, +void __init add_memory_region (unsigned long long start,unsigned long long size,int type) {int x = e820.nr_map;
@@ -280,7 +281,7 @@#define E820_DEBUG 1 -static void __init print_memory_map (char *who) +void __init print_memory_map (char *who) {int i;
@@ -751,6 +752,9 @@if (entry16) {read_entry16_params (params); } + +/* Attempt to get the LinuxBIOS parameters */ +read_linuxbios_params ();/* Read user specified params */ parse_mem_cmdline (cmdline_p);
include/asm-i386/e820.h +3 -0
@@ -36,6 +36,9 @@ };extern struct e820map e820; +extern void add_memory_region (unsigned long long start, +unsigned long long size,int type); +extern void print_memory_map (char *who);#endif /*!__ASSEMBLY__*/ #endif /*__E820_HEADER*/
include/asm-i386/linuxbios.h +10 -0
@@ -0,0 +1,10 @@ +#ifndef __ASMi386_LINUXBIOS_H +#define __ASMi386_LINUXBIOS_H + +#ifdef CONFIG_LINUXBIOS +void read_linuxbios_params (void ); +#else +#define read_linuxbios_params () +#endif /* CONFIG_LINUXBIOS */ + +#endif