summaryrefslogtreecommitdiffstats
path: root/sys/boot/i386
Commit message (Collapse)AuthorAgeFilesLines
* Fix setting of serial port speed. A junk value was passed in AX whenthomas2007-03-261-1/+1
| | | | | | | | | | bioscom is called to set up serial port parameters because COMSPEED was treated as an address instead of an immediate value, causing serial port parameters to never be set. PR: i386/110828 Reviewed by: jhb MFC after: 2 weeks
* Catch up with ACPI-CA 20070320 import.jkim2007-03-221-9/+11
|
* Fix the cdboot twiddle display.remko2007-02-231-1/+1
| | | | | | | | | I created and tested this with a custom FreeSBIE cd-image. PR: i386/96452 Submitted by: Yuichiro Goto <y7goto at gmail dot com> MFC after: 3 days Approved by: imp (mentor)
* Ignore any breakpoint instructions (int 3) we encounter in vm86 modejhb2006-12-061-0/+2
| | | | | | | | rather than treating them as a fatal exception and halting. At least one storage BIOS (some newer mpt(4) parts) have a breakpoint instruction in their disk read routine. MFC after: 3 days
* Remove an unused variable.ru2006-11-161-2/+1
|
* Revert the last change. Masking only 2 MSBs of the virtual addressru2006-11-023-7/+7
| | | | | | | | | | | | | to get the physical address doesn't work for all values of KVA_PAGES, while masking 8 MSBs works for all values of KVA_PAGES that are multiple of 4 for non-PAE and 8 for PAE. (This leaves us limited with 12MB for non-PAE kernels and 14MB for PAE kernels.) To get things right, we'd need to subtract the KERNBASE from the virtual address (but KERNBASE is not easy to figure out from here), or have physical addresses set properly in the ELF headers. Discussed with: jhb
* Extend struct devdesc with a unit field, called d_unit. Promote themarcel2006-11-026-31/+23
| | | | | | | | | device (kind) specific unit field to the common field. This change allows a future version of libefi to work without requiring anything more than what is defined in struct devdesc and as such makes it possible to compile said version of libefi for different platforms without requiring that those platforms have identical derivatives of struct devdesc.
* Don't unconditionally compile-in the bcache code. It's only used onmarcel2006-11-021-0/+3
| | | | | i386/amd64 and pc98. Remove useless calls to bcache_init() from the ia64 and sparc64 loaders, as well as from the OFW common code.
* Because the BTX mini-kernel now uses flat memory mode and clientsru2006-10-293-7/+7
| | | | | | | | | | | | | | | | are no longer limited to a virtual address space of 16 megabytes, only mask high two bits of a virtual address. This allows to load larger kernels (up to 1 gigabyte). Not masking addresses at all was a bad idea on machines with less than >3G of memory -- kernels are linked at 0xc0xxxxxx, and that would attempt to load a kernel at above 3G. By masking only two highest bits we stay within the safe limits while still allowing to boot larger kernels. (This is a safer reimplmentation of sys/boot/i386/boot2/boot.2.c rev. 1.71.) Prodded by: jhb Tested by: nyan (pc98)
* Adopt comments borrowed from aout_freebsd.c.ru2006-10-262-2/+2
|
* Restore support for -c and -d that were treacherously murdered inru2006-10-262-4/+8
| | | | | | | rev. 1.58. (This only costs us four bytes.) Prodded by: bde MFC after: 3 days
* Back out rev. 1.71 as it breaks directly loading (i386) kernels.ru2006-10-262-6/+6
| | | | | | OK'ed by: jhb PR: i386/96430, i386/104709 MFC after: 3 days
* - Update URL of Intel documentationpav2006-10-071-1/+1
| | | | | Submitted by: Rob <spamrefuse@yahoo.com> on freebsd-doc MFC after: 3 days
* - Fix a couple of improper uses of leal in the previous space savingjhb2006-10-051-5/+7
| | | | | | | | | | | | | | | commits. For some reason I thought the scale factor was a shift count rather than the multiplicand (that is, I thought leal (%eax,%edx,4) was going to generate %eax + %edx << 4 rather than %eax + %edx * 4). What I need is to multiply by 16 to convert a real-mode (seg, offset) tuple into a flat address. However, the max multiplicand for scaled/index addressing on i386 is 8, so go back to using a shl and an add. - Convert two more inter-register mov instructions where we don't need to preserve the source register to xchg instructions to keep our space savings. Tested by: Ian FREISLICH if at hetzner.co.za MFC after: 1 week
* Fix most of the WARNS=2 warnings.ru2006-09-294-6/+5
|
* Oops, add return values for the smap command function. We must have thejhb2006-09-291-1/+2
| | | | | | warnings set weird or something because gcc didn't warn about this at all. Submitted by: ru
* Tweak the code to handle intercepting BIOS calls to int 0x15 to shavejhb2006-09-281-17/+10
| | | | | | | | | | | | another 16 bytes off of BTX (and thus boot2): - Compare against the value of %eax that is saved on the stack instead of loading it into %eax (which requires saving the current %eax on the stack). - Use %ch to examine the keyboard flag state in the BIOS to see if Ctrl-Alt-Del is pressed instead of %al so we don't have to save %eax on the stack anymore. MFC after: 1 week
* Optimize the int 15/87 handler for space to shave another 16 bytes off ofjhb2006-09-281-31/+17
| | | | | | | | | | | | | | | | | BTX (and thus boot2): - Don't bother saving %eax, %ebx, or %ecx as it is not necessary. - Use a more compact sequence to load the base value out of a GDT entry by loading the contiguous low 24 bits into the upper 24 bits of %eax, loading the high 8 bits into %al, and using a ror to rotate the bits (2 mov's and a ror) rather than loading the pieces in smaller chunks (3 mov's and a shl). - Use movzwl + leal instead of movl + movw + shll + addl. - Use 'xchgl %eax,%foo' rather than 'movl %eax,%foo' for cases where it's ok to trash %eax. xchgl %eax, foo is a 1-byte opcode whereas the mov is a 2-byte opcode. - Use movzwl rather than xorl + movw. MFC after: 1 week
* Add an 'smap' command that dumps out the BIOS SMAP.jhb2006-09-282-0/+22
| | | | MFC after: 1 week
* A couple of simple tweaks that trim BTX by 6 bytes. Since BTX isjhb2006-09-281-3/+2
| | | | | 16-byte aligned within boot2 however, this actually trims boot2 by 16 bytes.
* Add -march=i386 to fix amd64 build by generating the same coderu2006-09-281-1/+1
| | | | as i386 would do.
* Emulate moving cr0, cr2, cr3, or cr4 into any i386 general registerjhb2006-09-271-7/+19
| | | | | | | | rather than just emulating mov cr0, eax. This fixes some Compaq/HP BIOS with DMA (as the BIOS tried to read cr3 so it could translate addresses if paging was enabled). MFC after: 1 week
* - Include <sys/reboot.h> to get the RB_* defines.ru2006-09-051-6/+4
| | | | | | | | - Make the PROBE_KEYBOARD option better resemble the -P option in boot2, i.e., if keyboard isn't present then boot with both RB_SERIAL and RB_MULTIPLE set. Reviewed by: jhb
* Commit the results of the typo hunt by Darren Pilgrim.yar2006-08-041-1/+1
| | | | | | | | | | This change affects documentation and comments only, no real code involved. PR: misc/101245 Submitted by: Darren Pilgrim <darren pilgrim bitfreak org> Tested by: md5(1) MFC after: 1 week
* Increment the disk block offset after writing, not before. Thisiedowse2006-05-311-3/+3
| | | | | | | | | | fixes filesystem corruption when nextboot.conf is located after cylinder 1023. The bug appears to have been introduced at the time bd_read was copied to create bd_write. PR: bin/98005 Reported by: yar MFC after: 1 week
* Restore the pre-5.x behavior of only beeping if the user makes a badjhb2006-05-031-5/+8
| | | | | | | | | | | selection and not always beeping on startup. The two bytes for the extra 'jmp' instruction were obtained by removing recognition of BSD/OS partitions. Requested by: many Tested by: subset of many Head nod: imp, keramida MFC after: 2 weeks
* Use PTOV() to convert physical addresses to appropriate virtual addressesjhb2006-04-251-2/+4
| | | | | in the loader when searching for the ACPI RSDP. (The loader runs in a flat mode with va 0 == pa 0xa000.)
* Merge in timeout into A20-enable routine from cdboot/boot1.sobomax2006-04-111-3/+10
| | | | MFC after: 1 day
* Drop the gateA20() function in the loader as it is unused. All the otherjhb2006-04-113-57/+1
| | | | | boot loaders that load the loader already handle A20. In fact, they are required to do so in order to setup the environment that btxldr expects.
* Minor whitespace tweak.jhb2006-04-111-2/+1
|
* Tweak comment.jhb2006-04-111-4/+4
|
* Use the proper condition to determine that we matched an filename.jhb2006-04-111-1/+1
| | | | | | | | | Otherwise, we could match on a filename that had the wrong last character (such as /boot/loaded instead of /boot/loader). PR: kern/95625 Submitted by: Oliver Fromme <olli@secnetix.de> MFC after: 1 month
* When enabling A20 put upper limit on amount of time we wait for the keyboardsobomax2006-04-111-3/+10
| | | | | | | | | | | controller to get ready (65K x ISA access time, visually around 1 second). If we have wait more than that amount it's likely that the hardware is a legacy-free one and simply doesn't have keyboard controller and doesn't require enabling A20 at all. This makes cdboot working for MacBook Pro with Boot Camp. MFC after: 1 day
* Reimplementation of world/kernel build options. For details, see:ru2006-03-171-1/+3
| | | | | | | | http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html The src.conf(5) manpage is to follow in a few days. Brought to you by: imp, jhb, kris, phk, ru (all bugs are mine)
* Export SMBIOS serial numbers by default. To turn it off, usejkim2006-03-142-8/+8
| | | | | | 'BOOT_HIDE_SERIAL_NUMBERS' knob. Suggested by: ceri
* Micro-optimize invalid UUID check.jkim2006-03-101-1/+3
|
* - Implement serial numbers, UUID, and asset tag (turned off by default).jkim2006-03-093-31/+80
| | | | | | Use 'BOOT_SENSITIVE_INFO=YES' variable to turn them on. - Use 'uint*_t' instead of 'u_int*_t', correct compilation warnings, and update copyright while I am here.
* For the cases when loading bzip2-compressed kernels enabled use lastsobomax2005-12-214-6/+10
| | | | | | | | | | | | | | 3MB of physical memory for heap instead of range between 1MB and 4MB. This makes this feature working with PAE and amd64 kernels, which are loaded at 2MB. Teach i386_copyin() to avoid using range allocated by heap in such case, so that it won't trash heap in the low memory conditions. This should make loading bzip2-compressed kernels/modules/mfs images generally useable, so that re@ team is welcome to evaluate merits of using this feature in the installation CDs. Valuable suggestions by: jhb
* If LOADER_BZIP2_SUPPORT is defined allocate heap in the 1MB-4MB range tosobomax2005-12-191-2/+13
| | | | | | | | provide enough room for decompression (up to 2.5MB is necessary). This should be safe to do since we load i386 kernels after 8MB mark now, so that 16MB is the minimum amount of RAM necessary to even boot FreeBSD. This makes bzip2-support practically useable.
* Long-long time ago, when the trees were large and memory expensive amount ofsobomax2005-12-195-41/+22
| | | | | | | | | | | | | memory directly available to loader(8) and friends was limited to 640K on i386. Those times have passed long time ago and now loader(8) can directly access up to 4GB of RAM at least theoretically. At the same time, there are several places where it's assumed that malloc() will only allocate memory within first megabyte. Remove that assumption by allocating appropriate bounce buffers for BIOS calls on stack where necessary. This allows using memory above first megabyte for heap if necessary.
* Consistently use OPT_* macros to test/set boot options.ru2005-11-032-12/+24
|
* Add back some bits.scottl2005-10-302-1/+18
|
* Export processor socket information. New environment variables are:jkim2005-10-181-0/+32
| | | | | smbios.socket.enabled: number of enabled sockets smbios.socket.populated: number of populated sockets
* Re-implement rev.1.76 with respect to the code size.sobomax2005-10-162-30/+44
|
* Backout previous commit - for some reason it overflows space constrains onsobomax2005-10-162-64/+48
| | | | amd64. Better version will follow.
* Add new option `q', which makes second stage loader quiet unless autobootsobomax2005-10-162-48/+64
| | | | | | is disabled or fails. MFC after: 1 week
* Cause all flags passed by boot2 to set the respective loader(8)ru2005-09-223-1/+12
| | | | | boot_* variable. The end effect is that all flags from boot2 are now passed to the kernel.
* Add loader(8) variables for RB_DFLTROOT, RB_MUTE, and RB_PAUSE:ru2005-09-221-2/+5
| | | | "boot_dfltroot", "boot_mute", and "boot_pause" respectively.
* - RBX_MASK wasn't updated when RB_PAUSE was changed from 0x40000ru2005-09-222-4/+4
| | | | | | to 0x100000 in rev. 1.67. - NOPT wasn't updated (decremented) in previous revision.
* Add a "comconsole_speed" loader variable that can be used to changeiedowse2005-08-181-9/+108
| | | | | | | | | | | | the serial console speed (i386 and amd64 only). If the previous stage boot loader requested a serial console (RB_SERIAL or RB_MULTIPLE) then the default speed is determined from the current serial port speed. Otherwise it is set to 9600 or the value of BOOT_COMCONSOLE_SPEED at compile time. This makes it possible to set the serial port speed once in /boot.config and the setting will propagate to boot2, loader and the kernel serial console.
OpenPOWER on IntegriCloud