summaryrefslogtreecommitdiff
path: root/sys/boot/i386
Commit message (Collapse)AuthorAgeFilesLines
* This commit was manufactured by cvs2svn to create branch 'RELENG_5_2'.cvs2svn2003-12-077-3069/+0
| | | | Notes: svn path=/releng/5.2/; revision=123193
* With the beastie menu a problem was introduced in which selecting aDaniel C. Sobral2003-11-211-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | different kernel to boot with kernel="NAME" would load the kernel and loader.conf-selected modules from /boot/NAME, but it would not change module_path. So, for instance, the automatically loaded acpi.ko would come from /boot/kernel/acpi.ko, *always*. Mind you, this happened for unassisted boot. If you interrupted, typed "unload" and then "boot NAME", it would Do The Right Thing. The source of the problem is the double initialization with beastie's loader.rc. One would happen inside "start", and would load the kernel. The next one would happen later in the loader.rc script, resetting module_path. Because module_path is set to the Right Value by the functions in support.4th that actually load the kernel, when beastie.4th proceeded to boot module_path would remain wrong, as the kernel was already loaded. This can be corrected by removing either initialization, and also by changing the command used by beastie.4th from "boot" to "boot-conf", which makes sure you use the right kernel and modules. I chose to remove the second initialization, since this let you interrupt (or confirm) boot before beastie even comes up. I avoid also doing the boot-conf change because that would simply cause the kernel and modules to be loaded twice (in fact, that was my original patch, until, in writing this very commit message, I saw the error of my ways). This commit changes the semantics of module loading when using the beastie menu. Now it does what one would expect it to, but not what it was actually doing, so something may break for unusual setups depending on broken behavior. As our japanese friends so nicely put it, shikata ga nakatta. :-) Approved by: re (scottl) Notes: svn path=/head/; revision=122942
* Update the size of the OS string table that wasn't updated in the previousJohn Baldwin2003-11-201-1/+1
| | | | | | | | | | commit that removed the UNIX entry. Submitted by: Rudolf Cejka <cejkar@fit.vutbr.cz> Approved by: re (rwatson) Notes: svn path=/head/; revision=122923
* When rebooting the machine jump to 0xf000:0xfff0 instead of 0xffff:0x0.Poul-Henning Kamp2003-11-162-2/+2
| | | | | | | | | | | | | While we end up the same place, we end up with two different CS register values after the jump and 0xf000 is compatible with the hardware reset value. This makes a difference if the BIOS does a near jump before a far jump. Detective work and patch by: Adrian Steinmann <ast@marabu.ch> Notes: svn path=/head/; revision=122806
* Changed the RB_PAUSE flag from 0x40000 to 0x100000 and marked the oldBruce Evans2003-11-152-4/+26
| | | | | | | | | | | | | | | | | | | | | value as reserved for internal use in boot blocks, because RB_PAUSE broke binary compatibility by usurping the RB_DUAL flag. Probably no one except me has boot blocks for which this matters, since most boot blocks based on biosboot including pc98's boot2 can't boot elf kernels, and /boot/loader doesn't properly pass flags set by the previous stage. reboot.h: Also mark the historical RB_PROBEKBD flag (0x80000) as reserved for internal use in boot blocks. boot2.c: Added comments to inhibit usurping of other flags. Approved by: guido, imp MFC after: 1 week Notes: svn path=/head/; revision=122749
* Include <sys/reboot.h> the definition of RB_BOOTINFO. The previousBruce Evans2003-11-112-0/+4
| | | | | | | | | commit broke the world because it depended on namespace pollution that was only in my version of <machine/bootinfo.h>. The include was removed in rev.1.63 after the last reference to it went away in rev.1.61. Notes: svn path=/head/; revision=122463
* Fixed loss of setting of the RB_BOOTINFO flag in rev.1.43. Fixed wrongBruce Evans2003-11-102-4/+4
| | | | | | | | | | | | | | | | comment about this flag in rev.1.61. It is not historical like the comment said; it is the flag that says that most of what is laboriously put in the bootinfo struct is actually there. Newer kernels were bootable by even the broken boot2 without losing anything except the symbol table, but older kernels need at least the memory sizes. Restoring the "|" with RB_BOOTINFO that was lost in rev.1.43 costs 5 bytes. The fix can be done in only 4 bytes by fixing some code that was removed in rev.1.61 (put RB_BOOTINFO back in in the initial value of "opts" and fix RBX_MASK to not clobber it.) Notes: svn path=/head/; revision=122433
* Fix an incorrect quote character in an M4 test conditon. Basically, oneJohn Baldwin2003-11-062-2/+2
| | | | | | | | of the verbose print statements that BTXLDR_VERBOSE enables wasn't properly enabled. Notes: svn path=/head/; revision=122177
* Don't repeat selected defines from ns16550.h or sioreg.h. JustBruce Evans2003-09-161-20/+1
| | | | | | | | include ns16550.h. The missing installation of ns16550.h was fixed long ago and the misplaced defines in sioreg.h were fixed recently. Notes: svn path=/head/; revision=120118
* Add BOOT_PXELDR_ALWAYS_SERIAL option which forces serial console.Poul-Henning Kamp2003-09-033-0/+15
| | | | Notes: svn path=/head/; revision=119714
* Use __FBSDID().David E. O'Brien2003-08-2528-73/+95
| | | | | | | Also some minor copyright style cleanups. Notes: svn path=/head/; revision=119482
* Many newer CF do not handle having the entire track read from them atWarner Losh2003-08-222-0/+8
| | | | | | | | | | | | | boot time. Instead, read it a sector at a time. While this sounds like a significant slowdown, I've not been able to measure any signficant difference. Submitted by: luigi Reviewed by: jhb, sam (both a while ago) MFC After: 3 days Notes: svn path=/head/; revision=119253
* Consistently use the BSD u_int and u_short instead of the SYSV uint andJohn Baldwin2003-08-071-1/+1
| | | | | | | | | | ushort. In most of these files, there was a mixture of both styles and this change just makes them self-consistent. Requested by: bde (kern_ktrace.c) Notes: svn path=/head/; revision=118607
* Null terminate the OEM hint. This rids my laptop of the smiley face thatNate Lawson2003-08-071-0/+1
| | | | | | | would follow the 6 valid chars of the table entry. Notes: svn path=/head/; revision=118604
* Add include file so this builds with new acpicaNate Lawson2003-07-131-0/+1
| | | | | | | Reported by: Kevin Oberman <oberman@es.net> Notes: svn path=/head/; revision=117529
* Revert non-style part of the recent two deltas that dealt withRuslan Ermilov2003-07-021-5/+1
| | | | | | | | using as(1) to compile plain assembler source files; bsd.lib.mk has been fixed (in revision 1.147). Notes: svn path=/head/; revision=117160
* Switch to using bsd.prog.mk; this gives us back the standardRuslan Ermilov2003-06-301-5/+2
| | | | | | | .s.o transformation rule. Notes: svn path=/head/; revision=117075
* Revision 1.13, besides its useful part, replaced bsd.prog.mk byRuslan Ermilov2003-06-301-10/+4
| | | | | | | | | | | | | | | | | | | | | bsd.lib.mk and thus broke the build since AFLAGS were not taken into considered anymore, as bsd.lib.mk currently has wrong .s.o rule that uses cc(1) instead of as(1). Revision 1.14 reverted to using as(1), and revision 1.15 brought AFLAGS back to the business, but revision 1.14 also broke "make clean". To fix this, but not break anything that was fixed in revisions 1.13-1.15, we revert mostly to revision 1.13 except for switching back to using bsd.prog.mk. This gives us back the default .s.o rule from sys.mk that uses as(1), and fixes "make clean" by restoring the full contents of OBJS. Also fixed LDFLAGS. Notes: svn path=/head/; revision=117052
* Build on amd64. Yes, I know this isn't particularly nice.Peter Wemm2003-06-266-2/+38
| | | | Notes: svn path=/head/; revision=116864
* When looking for the ':' separator in the root path, don't go pastIan Dowse2003-06-161-2/+2
| | | | | | | | | | | | | the terminating '\0'. Since the initialisation of rootpath in libstand/bootp.c may copy junk into the rest of the buffer, it was possible for the code to find a ':' after the '\0' and do the wrong thing. Reviewed by: ps MFC after: 1 week Notes: svn path=/head/; revision=116451
* Add ${AFLAGS} to 'as' invocation.David E. O'Brien2003-06-072-2/+2
| | | | Notes: svn path=/head/; revision=115964
* Don't use a C compiler to assemble a pure asm file.David E. O'Brien2003-06-071-1/+7
| | | | Notes: svn path=/head/; revision=115941
* Tweak make values and targets not to build kgzldr.o atJun Kuriyama2003-06-061-4/+8
| | | | | | | | | installation stage. Reviewed by: bde Notes: svn path=/head/; revision=115899
* Don't use a C compiler to assemble a pure asm file.David E. O'Brien2003-06-021-2/+5
| | | | Notes: svn path=/head/; revision=115670
* Accpet '1'..'5' in place of F1..F5 for serial console users.David E. O'Brien2003-06-011-3/+5
| | | | | | | Reviewed by: Bruce M Simpson <bms@spc.org> Notes: svn path=/head/; revision=115638
* Enable the new bootloader for i386 only. The new loader.rc is will onlyScott Long2003-05-312-1/+21
| | | | | | | | | | be installed if an old one does not exist, i.e. only during install, not during upgrades. Approved by: re Notes: svn path=/head/; revision=115423
* Add a new bootloader menu. Pull in screen.4th and frames.4th from theScott Long2003-05-301-0/+1
| | | | | | | | | | examples directory to support it. This is installed only on i386 for now. It will be enabled in a later commit. Approved by: re Notes: svn path=/head/; revision=115410
* Fix a bug in the AMD64 trampoline. I misunderstood the implicitPeter Wemm2003-05-171-1/+1
| | | | | | | | | 32->64 bit zero extend. This changes a movl to an orq. Approved by: re (amd64 bits) Notes: svn path=/head/; revision=115091
* Revert leftover AMD64 disable-acpi-module stuff.Peter Wemm2003-05-121-3/+0
| | | | Notes: svn path=/head/; revision=114933
* For amd64 kernels, repeat the 1GB mapping over the entire address spacePeter Wemm2003-05-111-12/+12
| | | | | | | | | | instead of just at 0GB and 1GB marks. This gives more flexibility for the choice of KERNBASE. Approved by: re (amd64 stuff) Notes: svn path=/head/; revision=114920
* Argh. This was broken by the last-minute elf32/elf64/"elf kernel" changes.Peter Wemm2003-05-012-3/+3
| | | | Notes: svn path=/head/; revision=114385
* Nuke; repocopied to elf32_freebsd.c where it lives on.Peter Wemm2003-05-011-88/+0
| | | | Notes: svn path=/head/; revision=114380
* Enable the i386 loader to load and run an amd64 kernel. If this putsPeter Wemm2003-05-0111-675/+469
| | | | | | | | | | | | | | | | | | things over floppy size limits, I can exclude it for release builds or something like that. Most of the changes are to get the load_elf.c file into a seperate elf32_ or elf64_ namespace so that you can have two ELF loaders present at once. Note that for 64 bit kernels, it actually starts up the kernel already in 64 bit mode with paging enabled. This is really easy because we have a known minimum feature set. Of note is that for amd64, we have to pass in the bios int 15 0xe821 memory map because once in long mode, you absolutely cannot make VM86 calls. amd64 does not use 'struct bootinfo' at all. It is a pure loader metadata startup, just like sparc64 and powerpc. Much of the infrastructure to support this was adapted from sparc64. Notes: svn path=/head/; revision=114379
* ACPI will always be present on AMD64 - it will never be an autodetectPeter Wemm2003-04-301-0/+3
| | | | | | | module. Notes: svn path=/head/; revision=114339
* Support functions for the new ACPI import.Nate Lawson2003-04-291-0/+1
| | | | | | | | | | | | | | * AcpiOsDerivePciId(): finds a bus number, given the slot/func and the acpi parse tree. * AcpiOsPredefinedOverride(): use the sysctl hw.acpi.os_name to override the value for _OS. Ideas from: takawata, jhb Reviewed by: takawata, marcel Tested on: i386, ia64 Notes: svn path=/head/; revision=114246
* Libdisk does not need to include <sys/diskslice.h> any more.Poul-Henning Kamp2003-04-047-9/+2
| | | | | | | | | | | | Move the remaining bits of <sys/diskslice.h> to <i386/include/bootinfo.h> Move i386/pc98 specific bits from <sys/reboot.h> to <i386/include/bootinfo.h> as well. Adjust includes in sys/boot accordingly. Notes: svn path=/head/; revision=113083
* Fixed CLEANFILES.Ruslan Ermilov2003-02-252-2/+2
| | | | | | | Submitted by: cron Notes: svn path=/head/; revision=111490
* Build a file "boot" which consists of boot1 and boot2 concatenated.Poul-Henning Kamp2003-01-262-2/+12
| | | | | | | | There is little if any reason to treat the two components separately and it will simplify disklabel(8) and libdisk if we didn't. Notes: svn path=/head/; revision=109886
* Use NEXTDOSPART instead of MAX_SLICES.Poul-Henning Kamp2003-01-201-3/+2
| | | | Notes: svn path=/head/; revision=109559
* Simplify the Makefile by just using our standard PROG variable.David E. O'Brien2003-01-181-9/+8
| | | | Notes: svn path=/head/; revision=109498
* Save 4 more bytes by not initializing opts to 0. This moves it fromWarner Losh2003-01-142-2/+2
| | | | | | | | | the data section to the bss section givig us initialization for free. Noticed by: bde Notes: svn path=/head/; revision=109235
* Fix interactive booting:Warner Losh2003-01-132-4/+8
| | | | | | | | | | | | | | | | o Revision 1.38 introduced the -n flag. It conflicted with the RB_BOOTINFO flag, so was in effect always on. Change the -n flag to be bit 0x1c instead of 0x1f. This also had the consequence that a mal-formed /boot.config would render the system unbootable because the user was unable to enter anything at all on the command line. o Remove the initialization of opt to be RB_BOOTINFO since we filter that bit out and do not otherwise use it. Reviewed by: jhb MFC after: 3 days Notes: svn path=/head/; revision=109197
* RIP liloldr.David E. O'Brien2002-12-314-364/+0
| | | | | | | | | | It is not complete (the LILO root= specification isn't passed to our loader for instance), it has not been touched in over 2 years. Linux has moved on to GRUB, so this is OBE now. If someone creeps up to work on it, it could become a port. Notes: svn path=/head/; revision=108476
* -mno-align-long-strings can make things smaller, so lets use it in hopesDavid E. O'Brien2002-12-212-0/+2
| | | | | | | that it does here. Notes: svn path=/head/; revision=108149
* Put back the casts to unsigned. While no strictly necessary for itsWarner Losh2002-12-202-2/+2
| | | | | | | | | | current uses, the name strcmp has strong connotations that shouldn't lightly be discarded. This doesn't cost us anything. Submitted by: bde Notes: svn path=/head/; revision=108119
* Renamed the loader's zipfs to gzipfs. zipfs.c was repo-copied to gzipfs.c.Jake Burkholder2002-12-191-1/+1
| | | | Notes: svn path=/head/; revision=108100
* I didn't intend to delete this rm from the Makefile. It snuck in atWarner Losh2002-12-182-0/+2
| | | | | | | | | | | | the last second before the commit. # likely we can remove this hack now that gcc generates better aligned code # in the align to word case. Noticed by: bde Notes: svn path=/head/; revision=108016
* Reduce diffs with Peter's expanded diffs:Warner Losh2002-12-172-8/+8
| | | | | | | | 1) Put back the keyboard printing printf, at the cost of 58 bytes. 2) Minor tweak to getstr at no apparent cost. Notes: svn path=/head/; revision=108005
* Make both UFS1 and UFS2 fit on the same boot blocks. These are aWarner Losh2002-12-174-142/+120
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | subset of Peter's patchs that are believed to be safe. Makefile tweaks: o -fomit-frame-pointer o Change default to building both UFS1 and UFS2 bootblocks. Lots of boot2 tweaks: o lookup is only ever called with kname, so use it directly. o inline memsize o getstr are only ever called with cmd, so hardware that. o tweaks to the parsing code to test after the conversion rather than before since we tested after anyways. o eliminate support for %x in printf. o eliminate a few bytes in printfs. o Tweak the boot banner. o eliminate support for wd and " " devices (I might add wd back to keep bde happy). o eliminate support for a few arguments. This takes us from -162 bytes free to 67 bytes free. I've tested this only on a few systems, so be careful when updating to this change. Submitted by: peter, imp, ian Notes: svn path=/head/; revision=108000
* Remove unneeded casts. Add others to make WARNS=5 happy.David E. O'Brien2002-12-152-12/+12
| | | | Notes: svn path=/head/; revision=107889