From: Aivils S. <ai...@us...> - 2004-04-23 07:37:04
|
Update of /cvsroot/linuxconsole/ruby/ruby-2.6/arch/i386/kernel In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv8321/ruby-2.6/arch/i386/kernel Modified Files: setup.c Log Message: sync to 2.6.5 Index: setup.c =================================================================== RCS file: /cvsroot/linuxconsole/ruby/ruby-2.6/arch/i386/kernel/setup.c,v retrieving revision 1.7 retrieving revision 1.8 diff -u -d -r1.7 -r1.8 --- setup.c 20 Feb 2004 06:52:18 -0000 1.7 +++ setup.c 23 Apr 2004 07:36:55 -0000 1.8 @@ -38,10 +38,10 @@ #include <linux/module.h> #include <linux/efi.h> #include <linux/init.h> +#include <linux/edd.h> #include <video/edid.h> #include <asm/e820.h> #include <asm/mpspec.h> -#include <asm/edd.h> #include <asm/setup.h> #include <asm/arch_hooks.h> #include <asm/sections.h> @@ -50,6 +50,11 @@ #include "setup_arch_pre.h" #include "mach_resources.h" +/* This value is set up by the early boot code to point to the value + immediately after the boot time page tables. It contains a *physical* + address, and must not be in the .bss segment! */ +unsigned long init_pg_tables_end __initdata = ~0UL; + int disable_pse __initdata = 0; static inline char * __init machine_specific_memory_setup(void); @@ -78,8 +83,8 @@ EXPORT_SYMBOL(acpi_disabled); #ifdef CONFIG_ACPI_BOOT -extern int __initdata acpi_ht; int __initdata acpi_force = 0; +extern acpi_interrupt_flags acpi_sci_flags; #endif int MCA_bus; @@ -115,7 +120,6 @@ extern void dmi_scan_machine(void); extern void generic_apic_probe(char *); extern int root_mountflags; -extern char _end[]; unsigned long saved_videomode; @@ -126,6 +130,8 @@ static char command_line[COMMAND_LINE_SIZE]; char saved_command_line[COMMAND_LINE_SIZE]; +unsigned char __initdata boot_params[PARAM_SIZE]; + static struct resource code_resource = { "Kernel code", 0x100000, 0 }; static struct resource data_resource = { "Kernel data", 0, 0 }; @@ -452,7 +458,7 @@ #endif /** * copy_edd() - Copy the BIOS EDD information - * from empty_zero_page into a safe place. + * from boot_params into a safe place. * */ static inline void copy_edd(void) @@ -481,12 +487,11 @@ static void __init parse_cmdline_early (char ** cmdline_p) { - char c = ' ', *to = command_line, *from = COMMAND_LINE; + char c = ' ', *to = command_line, *from = saved_command_line; int len = 0; int userdef = 0; /* Save unparsed command line copy for /proc/cmdline */ - memcpy(saved_command_line, COMMAND_LINE, COMMAND_LINE_SIZE); saved_command_line[COMMAND_LINE_SIZE-1] = '\0'; for (;;) { @@ -555,24 +560,41 @@ } } +#ifdef CONFIG_X86_SMP + /* + * If the BIOS enumerates physical processors before logical, + * maxcpus=N at enumeration-time can be used to disable HT. + */ + else if (!memcmp(from, "maxcpus=", 8)) { + extern unsigned int maxcpus; + + maxcpus = simple_strtoul(from + 8, NULL, 0); + } +#endif + #ifdef CONFIG_ACPI_BOOT /* "acpi=off" disables both ACPI table parsing and interpreter */ else if (!memcmp(from, "acpi=off", 8)) { - acpi_ht = 0; - acpi_disabled = 1; + disable_acpi(); } /* acpi=force to over-ride black-list */ else if (!memcmp(from, "acpi=force", 10)) { acpi_force = 1; - acpi_ht=1; + acpi_ht = 1; acpi_disabled = 0; } + /* acpi=strict disables out-of-spec workarounds */ + else if (!memcmp(from, "acpi=strict", 11)) { + acpi_strict = 1; + } + /* Limit ACPI just to boot-time to enable HT */ else if (!memcmp(from, "acpi=ht", 7)) { + if (!acpi_force) + disable_acpi(); acpi_ht = 1; - if (!acpi_force) acpi_disabled = 1; } /* "pci=noacpi" disables ACPI interrupt routing */ @@ -580,6 +602,18 @@ acpi_noirq_set(); } + else if (!memcmp(from, "acpi_sci=edge", 13)) + acpi_sci_flags.trigger = 1; + + else if (!memcmp(from, "acpi_sci=level", 14)) + acpi_sci_flags.trigger = 3; + + else if (!memcmp(from, "acpi_sci=high", 13)) + acpi_sci_flags.polarity = 1; + + else if (!memcmp(from, "acpi_sci=low", 12)) + acpi_sci_flags.polarity = 3; + #ifdef CONFIG_X86_LOCAL_APIC /* disable IO-APIC */ else if (!memcmp(from, "noapic", 6)) @@ -785,7 +819,7 @@ * partially used pages are not usable - thus * we are rounding upwards: */ - start_pfn = PFN_UP(__pa(_end)); + start_pfn = PFN_UP(init_pg_tables_end); find_max_pfn(); @@ -823,6 +857,13 @@ */ reserve_bootmem(0, PAGE_SIZE); + /* could be an AMD 768MPX chipset. Reserve a page before VGA to prevent + PCI prefetch into it (errata #56). Usually the page is reserved anyways, + unless you have no PS/2 mouse plugged in. */ + if (boot_cpu_data.x86_vendor == X86_VENDOR_AMD && + boot_cpu_data.x86 == 6) + reserve_bootmem(0xa0000 - 4096, 4096); + #ifdef CONFIG_SMP /* * But first pinch a few for the stack/trampoline stuff @@ -1097,7 +1138,7 @@ init_mm.start_code = (unsigned long) _text; init_mm.end_code = (unsigned long) _etext; init_mm.end_data = (unsigned long) _edata; - init_mm.brk = (unsigned long) _end; + init_mm.brk = init_pg_tables_end + PAGE_OFFSET; code_resource.start = virt_to_phys(_text); code_resource.end = virt_to_phys(_etext)-1; @@ -1118,6 +1159,19 @@ #endif paging_init(); +#ifdef CONFIG_EARLY_PRINTK + { + char *s = strstr(*cmdline_p, "earlyprintk="); + if (s) { + extern void setup_early_printk(char *); + + setup_early_printk(s); + printk("early console enabled\n"); + } + } +#endif + + dmi_scan_machine(); #ifdef CONFIG_X86_GENERICARCH |