summaryrefslogtreecommitdiffstats
path: root/arch/i386/boot
AgeCommit message (Collapse)Author
2007-08-02[x86 setup] EDD: add missing =m constraintH. Peter Anvin
Add a missing =m constraint to the EDD-probing code, that could have caused improper dead-code elimination. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2007-08-02[x86 setup] video setup: Fix VBE DDC readingAntonino A. Daplas
Add memory operand constraint and write-only modifier to the inline assembly to effect the writing of the EDID block to boot_params.edid_info. Without this, gcc would think the EDID query was dead code and would eliminate it. Signed-off-by: Antonino Daplas <adaplas@gmail.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2007-07-31Merge branch 'for-linus' of ↵Linus Torvalds
git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-x86setup * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/hpa/linux-2.6-x86setup: [x86 setup] EDD: Fix the computation of the MBR sector buffer [x86 setup] Newline after setup signature failure message x86 boot code comments typos
2007-07-31broken lilo check on make installGabriel C
On make install I get the this error: ... sh /work/crazy/linux-git/linux-2.6/arch/i386/boot/install.sh 2.6.22-g4eb6bf6b arch/i386/boot/bzImage System.map "/boot" /work/crazy/linux-git/linux-2.6/arch/i386/boot/install.sh: line 54: /etc/lilo/install: No such file or directory make[1]: *** [install] Error 127 ... I don't use and don't have lilo installed on this system. The attached patch fixes the problem for me. Signed-off-by: Gabriel Craciunescu <nix.or.die@googlemail.com> Acked-by: H. Peter Anvin <hpa@zytor.com> Cc: Sam Ravnborg <sam@ravnborg.org> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-31[x86 setup] EDD: Fix the computation of the MBR sector bufferH. Peter Anvin
Some BIOSes require that sector buffers not cross 64K boundaries. As a result, we compute a dynamic address on the setup heap. Unfortunately, this address computation was just totally wrong. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2007-07-31[x86 setup] Newline after setup signature failure messageH. Peter Anvin
End the "No setup signature found..." with a newline (the puts routine will automatically add a carriage return.) Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2007-07-31x86 boot code comments typosRandy Dunlap
Fix comments typos in new x86 boot code. Signed-off-by: Randy Dunlap <randy.dunlap@oracle.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2007-07-25[x86 setup] Make struct ist_info cross-architecture, and use in setup codeH. Peter Anvin
Make "struct ist_info" valid on both i386 and x86-64, and use the structure by name in the setup code. Additionally, "Intel SpeedStep IST" is redundant, refer to it as IST consistently. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2007-07-25[x86 setup] APM: BX should be zero when disconnectingH. Peter Anvin
For APM calls, BX contains the device index, which is zero for the system BIOS. Disconnect requres BX = 0. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2007-07-25[x86 setup] APM detection logic bug fixMikael Pettersson
Starting with kernel 2.6.23-rc1, the i386 APM driver fails on several of my machines with the message: apm: BIOS not found This happens because of a bug in the i386 boot code rewrite from assembler to C. The original assembly code had the following code in its APM BIOS presence test (boot/setup.S): andw $0x02, %cx # Is 32 bit supported? je done_apm_bios # No 32-bit, no (good) APM BIOS That is, the code bails out if bit 2 is zero. In the new C version, this is coded as (boot/apm.c): if (cx & 0x02) /* 32 bits supported? */ return -1; Here we see that the test has been accidentally inverted. The fix is to negate the test. I've verified that this allows the APM driver to work again on my affected machines. Signed-off-by: Mikael Pettersson <mikpe@it.uu.se> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2007-07-20xen: disable vdso "nosegneg" on native bootRoland McGrath
One of the nice ideas behind paravirt is that CONFIG_XEN=y can be included in a standard configuration and be no worse for native booting than as a Xen guest. The glibc feature that supports the vDSO "nosegneg" note is designed specifically to make this easy. You just have to flip one bit at boot time. This patch makes Xen flip the bit, so a CONFIG_XEN=y kernel on bare hardware does not make glibc use the less-optimized library builds. Signed-off-by: Roland McGrath <roland@redhat.com> Acked-by: Jeremy Fitzhardinge <jeremy@xensource.com> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-19Update .gitignore for arch/i386/bootMatthew Wilcox
With the new setup code, we generate a couple more files Signed-off-by: Matthew Wilcox <matthew@wil.cx> [ .. and do the same for x86-64 - Alexey ] Acked-by: Alexey Dobriyan <adobriyan@gmail.com> Acked-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-18[PATCH] x86: do not recompile boot for each buildSam Ravnborg
Keep the arch/i386/boot directory from being rebuilt every time. Signed-off-by: Sam Ravnborg <sam@ravnborg.org> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2007-07-18[x86 setup] Save/restore DS around invocations of INT 10hH. Peter Anvin
There exists at least one card, Trident TVGA8900CL (BIOS dated 1992/9/8) which clobbers DS when "scrolling in an SVGA text mode of more than 800x600 pixels." Although we are extremely unlikely to run into that situation, it is cheap insurance to save and restore DS, and it only adds a grand total of 50 bytes to the total output. Pointed out by Etienne Lorrain. Cc: Etienne Lorrain <etienne_lorrain@yahoo.fr> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2007-07-18[x86 setup] VGA: Clear the Protect bit before setting the vertical heightH. Peter Anvin
If the user has asked for the vertical height registers to be recomputed by setting bit 15 in the video mode number, we do so without clearing the Protect bit in the Vertical Retrace Register before setting the Overflow register. As a result, if the VGA BIOS had set the Protect bit, the write to the Overflow register will be dropped, and bits [9:8] of the vertical height will be left unchanged. This is a bug imported from the assembly version of this code. It was pointed out by Etienne Lorrain. Cc: Etienne Lorrain <etienne_lorrain@yahoo.fr> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2007-07-18[x86 setup] Fix assembly constraintsH. Peter Anvin
Fix incorrect assembly constraints. In particular, fix memory constraints used inside push..pop, which can cause invalid operation since gcc may generate %esp-relative references. Additionally: outl() should have "dN" not "dn". query_mca() shouldn't listen 16/32-bit registers in an 8-bit only context. has_eflag(): the "mask" is only used well after both the stack pointer and the output registers have been touched; this requires the output registers to be earlyclobbers (=&) and the input to exclude memory (so "ri", not "g"). Thanks to Etienne Lorrain and Chuck Ebbert for prompting this review. Cc: Etienne Lorrain <etienne_lorrain@yahoo.fr> Cc: Chuck Ebbert <cebbert@redhat.com> Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2007-07-18[x86 setup] build/tools.c: fix commentH. Peter Anvin
Correct a comment in arch/i386/boot/build/tools.c; we now build the kernel from only two components instead of three, since the boot sector has been integrated in the setup code. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
2007-07-18xen: suppress abs symbol warnings for unused reloc pointersJeremy Fitzhardinge
arch/i386/xen/xen-asm.S defines some small pieces of code which are used to implement a few paravirt_ops. They're designed so they can be used either in-place, or be inline patched into their callsites if there's enough space. Some of those operations need to make calls out (specifically, if you re-enable events [interrupts], and there's a pending event at that time). These calls need the call instruction to be relocated if the code is patched inline. In this case xen_foo_reloc is a section-relative symbol which points to xen_foo's required relocation. Other operations have no need of a relocation, and so their corresponding xen_bar_reloc is absolute 0. These are the cases which are triggering the warning. This patch adds those symbols to the list of safe abs symbols. Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Cc: Adrian Bunk <bunk@stusta.de>
2007-07-12Remove old i386 setup codeH. Peter Anvin
This removes the old i386 setup code. This is done as a separate patch to avoid breaking git bisect as some of the i386 code was also used by the old x86-64 code. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-12Use the new x86 setup code for i386H. Peter Anvin
This patch hooks the new x86 setup code into the Makefile machinery. It also adapts boot/tools/build.c to a two-file (as opposed to three-file) universe, and simplifies it substantially. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-12Linker script for the new x86 setup codeH. Peter Anvin
Linker script to define the layout of the new x86 setup code. Includes assert for size overflow and a misaligned setup header. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-12Assembly header and main routine for new x86 setup codeH. Peter Anvin
The assembly header and initialization code, and the main() routine. main.c also contains some miscellaneous very short routines. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-12Code for actual protected-mode entryH. Peter Anvin
This is the code which actually does the switch to protected mode, including all preparation. It is also responsible for invoking the boot loader hooks, if present. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-12Video mode probing support for the new x86 setup codeH. Peter Anvin
Video mode probing for the new x86 setup code. This code breaks down different drivers into modules. This code deliberately drops support for a lot of the vendor-specific mode probing present in the assembly version, since a lot of those probes have been found to be stale in current versions of those chips -- frequently, support for those modes have been dropped from recent video BIOSes due to space constraints, but the video BIOS signatures are still the same. However, additional drivers should be extremely straightforward to plug in, if desirable. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-12Voyager support for the new x86 setup codeH. Peter Anvin
Voyager support for the new x86 setup code. This implements the same functionality as the assembly version. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-12Memory probing support for the new x86 setup codeH. Peter Anvin
Probe memory (INT 15h: E820, E801, 88). Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-12MCA support for new x86 setup codeH. Peter Anvin
MCA probing support for the new x86 setup code. This implements the same functionality as the assembly version. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-12EDD probing code for the new x86 setup codeH. Peter Anvin
Probe EDD and MBR signatures, in order to make it easier to map physical hard drives to BIOS drives. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-12CPU features verification for the new x86 setup codeH. Peter Anvin
Verify that the CPU has enough features to run the kernel. This may entail enabling features on some CPUs. By doing this in the setup code we can be guaranteed to still be able to write to the console through the BIOS. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-12Version string for the new x86 setup codeH. Peter Anvin
Module which only includes the kernel version string. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-12Console-writing code for the new x86 setup codeH. Peter Anvin
This implements writing text to the console, including printf(). Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-12Command-line parsing code for the new x86 setup codeH. Peter Anvin
Simple command-line parser which allows us to access the kernel command line from the setup code. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-12APM probing codeH. Peter Anvin
APM probing code for the new x86 setup code. This implements the same functionality as the assembly version. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-12A20 handling codeH. Peter Anvin
A20 handling code for the new x86 setup code. This implements the same algorithms as the assembly version. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-12String-handling functions for the new x86 setup code.H. Peter Anvin
strcmp(), memcpy(), memset(), as well as routines to copy to and from other segments (as pointed to by fs and gs). Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-12Simple bitops for the new x86 setup code.H. Peter Anvin
A simple collection of bitops for the new x86 setup code. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-12Top header file for new x86 setup codeH. Peter Anvin
Top header file for the new x86 setup code. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-12Header file to produce 16-bit code with gccH. Peter Anvin
gcc for i386 can be used with the assembly prefix ".code16gcc" to generate 16-bit (real-mode) code. This header file provides the assembly prefix. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-07-12Define zero-page offset 0x1e4 as a scratch field, and use itH. Peter Anvin
The relocatable kernel code needs a scratch field for the decompressor to determine its own location. It was using a location inside struct screen_info; reserve a free location and document it as scratch instead. Signed-off-by: H. Peter Anvin <hpa@zytor.com> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-21i386: Fix wrong CPU error message in early boot pathChristian Volkmann
- boot/setup.S did not print "PANIC: CPU too old for this kernel" ( not visible, also the message did not match ) - I add "# missed before: set ds" => somebody should check if I am right with the way to set. => seems to be a generic error in setup.S not to set "ds" for error messages. AK: extracted patch out of other changes AK: also couldn't find any other case where ds is wrong Signed-off-by: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08Revert "fbdev: ignore VESA modes if framebuffer is disabled"Linus Torvalds
This reverts commit 464bdd33e9baad9806c7adbd8dfc37081a55f27e. Peter Anvin correctly points out that VESA modes have nothing to do with frame buffers per se - they are often just regular extended text modes. Disabling them just because we don't have frame buffer support is very wrong. Cc: H. Peter Anvin <hpa@zytor.com> Cc: Antonino A. Daplas <adaplas@gmail.com>, Cc: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-08fbdev: ignore VESA modes if framebuffer is disabledAntonino A. Daplas
If the option vga=<VESA graphics mode> is added to the boot parameter, it will activate graphics mode, but without any framebuffer support, the user is left with an unusable display. Change the behavior such that the user is instead prompted for another mode (ala vga=ask). NOTE: People can always use vbetool to set a graphics mode if this is really desired, but the number of people doing this approaches zero. Signed-off-by: Antonino Daplas <adaplas@pol.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-05-02[PATCH] i386: Verify important CPUID bits in real modeAndi Kleen
Check some CPUID bits that are needed for compiler generated early in boot. When the system is still in real mode before changing the VESA BIOS mode it is possible to still display an visible error message on the screen. Similar to x86-64. Includes cleanups from Eric Biederman Signed-off-by: Andi Kleen <ak@suse.de>
2007-05-02[PATCH] i386: Drop -traditional in arch/i386/bootAndi Kleen
Needed for followon patch Signed-off-by: Andi Kleen <ak@suse.de>
2007-05-02[PATCH] x86: deflate stack usage in lib/inflate.cJeremy Fitzhardinge
inflate_fixed and huft_build together use around 2.7k of stack. When using 4k stacks, I saw stack overflows from interrupts arriving while unpacking the root initrd: do_IRQ: stack overflow: 384 [<c0106b64>] show_trace_log_lvl+0x1a/0x30 [<c01075e6>] show_trace+0x12/0x14 [<c010763f>] dump_stack+0x16/0x18 [<c0107ca4>] do_IRQ+0x6d/0xd9 [<c010202b>] xen_evtchn_do_upcall+0x6e/0xa2 [<c0106781>] xen_hypervisor_callback+0x25/0x2c [<c010116c>] xen_restore_fl+0x27/0x29 [<c0330f63>] _spin_unlock_irqrestore+0x4a/0x50 [<c0117aab>] change_page_attr+0x577/0x584 [<c0117b45>] kernel_map_pages+0x8d/0xb4 [<c016a314>] cache_alloc_refill+0x53f/0x632 [<c016a6c2>] __kmalloc+0xc1/0x10d [<c0463d34>] malloc+0x10/0x12 [<c04641c1>] huft_build+0x2a7/0x5fa [<c04645a5>] inflate_fixed+0x91/0x136 [<c04657e2>] unpack_to_rootfs+0x5f2/0x8c1 [<c0465acf>] populate_rootfs+0x1e/0xe4 (This was under Xen, but there's no reason it couldn't happen on bare hardware.) This patch mallocs the local variables, thereby reducing the stack usage to sane levels. Also, up the heap size for the kernel decompressor to deal with the extra allocation. Signed-off-by: Jeremy Fitzhardinge <jeremy@xensource.com> Signed-off-by: Andi Kleen <ak@suse.de> Cc: Tim Yamin <plasmaroo@gentoo.org> Cc: Andi Kleen <ak@suse.de> Cc: Matt Mackall <mpm@selenic.com> Cc: Ivan Kokshaysky <ink@jurassic.park.msu.ru> Cc: Richard Henderson <rth@twiddle.net> Cc: Russell King <rmk@arm.linux.org.uk> Cc: Ian Molton <spyro@f2s.com>
2007-05-02[PATCH] x86: add command line length to boot protocolBernhard Walle
Because the command line is increased to 2048 characters after 2.6.21, it's not possible for boot loaders and userspace tools to determine the length of the command line the kernel can understand. The benefit of knowing the length is that users can be warned if the command line size is too long which prevents surprise if things don't work after bootup. This patch updates the boot protocol to contain a field called "cmdline_size" that contain the length of the command line (excluding the terminating zero). The patch also adds missing fields (of protocol version 2.05) to the x86_64 setup code. Signed-off-by: Bernhard Walle <bwalle@suse.de> Signed-off-by: Andi Kleen <ak@suse.de> Cc: Alon Bar-Lev <alon.barlev@gmail.com> Acked-by: H. Peter Anvin <hpa@zytor.com> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
2007-04-02[PATCH] x86: Don't probe for DDC on VBE1.2Zwane Mwaikambo
VBE1.2 doesn't support function 15h (DDC) resulting in a 'hang' whilst uncompressing kernel with some video cards. Make sure we check VBE version before fiddling around with DDC. http://bugzilla.kernel.org/show_bug.cgi?id=1458 Opened: 2003-10-30 09:12 Last update: 2007-02-13 22:03 Much thanks to Tobias Hain for help in testing and investigating the bug. Tested on; i386, Chips & Technologies 65548 VESA VBE 1.2 CONFIG_VIDEO_SELECT=Y CONFIG_FIRMWARE_EDID=Y Untested on x86_64. Signed-off-by: Zwane Mwaikambo <zwane@infradead.org> Signed-off-by: Andi Kleen <ak@suse.de>
2007-02-17Use ARRAY_SIZE() macro in i386 relocs.c fileRobert P. J. Day
Change the explicit code in the relocs.c file to use ARRAY_SIZE() and add a definition of ARRAY_SIZE() since this is a userspace program and wouldn't include kernel.h. Signed-off-by: Robert P. J. Day <rpjday@mindspring.com> Signed-off-by: Adrian Bunk <bunk@stusta.de>
2007-02-01[PATCH] __crc_... is intended to be absoluteAl Viro
i386 boot/compressed/relocs checks for absolute symbols and warns about unexpected ones. If you build with modversions, you get ~2500 warnings about __crc_<symbol>. These suckers are really absolute symbols - we do _not_ want to modify them on relocation. They are generated by genksyms - EXPORT_... generates a weak alias, then genksyms produces an ld script with __crc_<symbol> = <checksum> and it's fed to ld to produce the final object file. Their only use is to match kernel and module at modprobe time; they _must_ be absolute. boot/compressed/relocs has a whitelist of known absolute symbols, but it doesn't know about __crc_... stuff. As the result, we get shitloads of false positives on any ld(1) version. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
2007-01-02[PATCH] Fix insta-reboot with "i386: Relocatable kernel support"Segher Boessenkool
Commit 968de4f02621db35b8ae5239c8cfc6664fb872d8 ("i386: Relocatable kernel support") caused problems for people with old binutils versions that didn't mark ".text.*" sections automatically allocated. So we should use .section command to specifically mark .text.head section as AX (allocatable and executable) to solve the problem. This should be unnecessary with binutils 2.15 and later, which is already three years old, but it doesn't hurt supporting older toolchains where possible. Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com> Acked-by: Jean Delvare <khali@linux-fr.org> Cc: Eric W. Biederman <ebiederm@xmission.com> Cc: Andi Kleen <ak@suse.de> Signed-off-by: Linus Torvalds <torvalds@osdl.org>