Commit 18a44a7ff1075ce5157ac07cde573aca6b5e9973
Exists in
smarc-l5.0.0_1.0.0-ga
and in
5 other branches
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull more x86 fixes from Peter Anvin: "Additional x86 fixes. Three of these patches are pure documentation, two are pretty trivial; the remaining one fixes boot problems on some non-BIOS machines." * 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: x86: Make sure we can boot in the case the BDA contains pure garbage x86, efi: Mark disable_runtime as __initdata x86, doc: Fix incorrect comment about 64-bit code segment descriptors doc, kernel-parameters: Document 'console=hvc<n>' doc, xen: Mention 'earlyprintk=xen' in the documentation. ACPI: Overriding ACPI tables via initrd only works with an initrd and on X86
Showing 5 changed files Side-by-side Diff
Documentation/kernel-parameters.txt
... | ... | @@ -564,6 +564,8 @@ |
564 | 564 | UART at the specified I/O port or MMIO address, |
565 | 565 | switching to the matching ttyS device later. The |
566 | 566 | options are the same as for ttyS, above. |
567 | + hvc<n> Use the hypervisor console device <n>. This is for | |
568 | + both Xen and PowerPC hypervisors. | |
567 | 569 | |
568 | 570 | If the device connected to the port is not a TTY but a braille |
569 | 571 | device, prepend "brl," before the device type, for instance |
... | ... | @@ -757,6 +759,7 @@ |
757 | 759 | |
758 | 760 | earlyprintk= [X86,SH,BLACKFIN] |
759 | 761 | earlyprintk=vga |
762 | + earlyprintk=xen | |
760 | 763 | earlyprintk=serial[,ttySn[,baudrate]] |
761 | 764 | earlyprintk=ttySn[,baudrate] |
762 | 765 | earlyprintk=dbgp[debugController#] |
... | ... | @@ -773,6 +776,8 @@ |
773 | 776 | |
774 | 777 | The VGA output is eventually overwritten by the real |
775 | 778 | console. |
779 | + | |
780 | + The xen output can only be used by Xen PV guests. | |
776 | 781 | |
777 | 782 | ekgdboc= [X86,KGDB] Allow early kernel console debugging |
778 | 783 | ekgdboc=kbd |
arch/x86/kernel/head.c
... | ... | @@ -5,8 +5,6 @@ |
5 | 5 | #include <asm/setup.h> |
6 | 6 | #include <asm/bios_ebda.h> |
7 | 7 | |
8 | -#define BIOS_LOWMEM_KILOBYTES 0x413 | |
9 | - | |
10 | 8 | /* |
11 | 9 | * The BIOS places the EBDA/XBDA at the top of conventional |
12 | 10 | * memory, and usually decreases the reported amount of |
13 | 11 | |
14 | 12 | |
... | ... | @@ -16,17 +14,30 @@ |
16 | 14 | * chipset: reserve a page before VGA to prevent PCI prefetch |
17 | 15 | * into it (errata #56). Usually the page is reserved anyways, |
18 | 16 | * unless you have no PS/2 mouse plugged in. |
17 | + * | |
18 | + * This functions is deliberately very conservative. Losing | |
19 | + * memory in the bottom megabyte is rarely a problem, as long | |
20 | + * as we have enough memory to install the trampoline. Using | |
21 | + * memory that is in use by the BIOS or by some DMA device | |
22 | + * the BIOS didn't shut down *is* a big problem. | |
19 | 23 | */ |
24 | + | |
25 | +#define BIOS_LOWMEM_KILOBYTES 0x413 | |
26 | +#define LOWMEM_CAP 0x9f000U /* Absolute maximum */ | |
27 | +#define INSANE_CUTOFF 0x20000U /* Less than this = insane */ | |
28 | + | |
20 | 29 | void __init reserve_ebda_region(void) |
21 | 30 | { |
22 | 31 | unsigned int lowmem, ebda_addr; |
23 | 32 | |
24 | - /* To determine the position of the EBDA and the */ | |
25 | - /* end of conventional memory, we need to look at */ | |
26 | - /* the BIOS data area. In a paravirtual environment */ | |
27 | - /* that area is absent. We'll just have to assume */ | |
28 | - /* that the paravirt case can handle memory setup */ | |
29 | - /* correctly, without our help. */ | |
33 | + /* | |
34 | + * To determine the position of the EBDA and the | |
35 | + * end of conventional memory, we need to look at | |
36 | + * the BIOS data area. In a paravirtual environment | |
37 | + * that area is absent. We'll just have to assume | |
38 | + * that the paravirt case can handle memory setup | |
39 | + * correctly, without our help. | |
40 | + */ | |
30 | 41 | if (paravirt_enabled()) |
31 | 42 | return; |
32 | 43 | |
33 | 44 | |
34 | 45 | |
... | ... | @@ -37,19 +48,23 @@ |
37 | 48 | /* start of EBDA area */ |
38 | 49 | ebda_addr = get_bios_ebda(); |
39 | 50 | |
40 | - /* Fixup: bios puts an EBDA in the top 64K segment */ | |
41 | - /* of conventional memory, but does not adjust lowmem. */ | |
42 | - if ((lowmem - ebda_addr) <= 0x10000) | |
43 | - lowmem = ebda_addr; | |
51 | + /* | |
52 | + * Note: some old Dells seem to need 4k EBDA without | |
53 | + * reporting so, so just consider the memory above 0x9f000 | |
54 | + * to be off limits (bugzilla 2990). | |
55 | + */ | |
44 | 56 | |
45 | - /* Fixup: bios does not report an EBDA at all. */ | |
46 | - /* Some old Dells seem to need 4k anyhow (bugzilla 2990) */ | |
47 | - if ((ebda_addr == 0) && (lowmem >= 0x9f000)) | |
48 | - lowmem = 0x9f000; | |
57 | + /* If the EBDA address is below 128K, assume it is bogus */ | |
58 | + if (ebda_addr < INSANE_CUTOFF) | |
59 | + ebda_addr = LOWMEM_CAP; | |
49 | 60 | |
50 | - /* Paranoia: should never happen, but... */ | |
51 | - if ((lowmem == 0) || (lowmem >= 0x100000)) | |
52 | - lowmem = 0x9f000; | |
61 | + /* If lowmem is less than 128K, assume it is bogus */ | |
62 | + if (lowmem < INSANE_CUTOFF) | |
63 | + lowmem = LOWMEM_CAP; | |
64 | + | |
65 | + /* Use the lower of the lowmem and EBDA markers as the cutoff */ | |
66 | + lowmem = min(lowmem, ebda_addr); | |
67 | + lowmem = min(lowmem, LOWMEM_CAP); /* Absolute cap */ | |
53 | 68 | |
54 | 69 | /* reserve all memory between lowmem and the 1MB mark */ |
55 | 70 | memblock_reserve(lowmem, 0x100000 - lowmem); |
arch/x86/kernel/head_64.S
... | ... | @@ -48,7 +48,7 @@ |
48 | 48 | .globl startup_64 |
49 | 49 | startup_64: |
50 | 50 | /* |
51 | - * At this point the CPU runs in 64bit mode CS.L = 1 CS.D = 1, | |
51 | + * At this point the CPU runs in 64bit mode CS.L = 1 CS.D = 0, | |
52 | 52 | * and someone has loaded an identity mapped page table |
53 | 53 | * for us. These identity mapped page tables map all of the |
54 | 54 | * kernel pages and possibly all of memory. |
... | ... | @@ -159,7 +159,7 @@ |
159 | 159 | jmp 1f |
160 | 160 | ENTRY(secondary_startup_64) |
161 | 161 | /* |
162 | - * At this point the CPU runs in 64bit mode CS.L = 1 CS.D = 1, | |
162 | + * At this point the CPU runs in 64bit mode CS.L = 1 CS.D = 0, | |
163 | 163 | * and someone has loaded a mapped page table. |
164 | 164 | * |
165 | 165 | * %rsi holds a physical pointer to real_mode_data. |
arch/x86/platform/efi/efi.c
drivers/acpi/Kconfig
... | ... | @@ -266,7 +266,8 @@ |
266 | 266 | default ACPI_CUSTOM_DSDT_FILE != "" |
267 | 267 | |
268 | 268 | config ACPI_INITRD_TABLE_OVERRIDE |
269 | - bool "ACPI tables can be passed via uncompressed cpio in initrd" | |
269 | + bool "ACPI tables override via initrd" | |
270 | + depends on BLK_DEV_INITRD && X86 | |
270 | 271 | default n |
271 | 272 | help |
272 | 273 | This option provides functionality to override arbitrary ACPI tables |