summaryrefslogtreecommitdiffstats
path: root/sys/boot/i386/gptboot/gptboot.c
Commit message (Collapse)AuthorAgeFilesLines
* Consistently use OPT_* macros to test/set boot options.ru2005-11-031-6/+12
|
* Re-implement rev.1.76 with respect to the code size.sobomax2005-10-161-15/+22
|
* Backout previous commit - for some reason it overflows space constrains onsobomax2005-10-161-32/+24
| | | | amd64. Better version will follow.
* Add new option `q', which makes second stage loader quiet unless autobootsobomax2005-10-161-24/+32
| | | | | | is disabled or fails. MFC after: 1 week
* - RBX_MASK wasn't updated when RB_PAUSE was changed from 0x40000ru2005-09-221-2/+2
| | | | | | to 0x100000 in rev. 1.67. - NOPT wasn't updated (decremented) in previous revision.
* Add the ability to specify the boot2 serial console speed iniedowse2005-08-181-14/+27
| | | | | | | | /boot.config or on the "boot:" prompt line via a "-S<speed>" flag, e.g. "-h -S19200". This adds about 50 bytes to the size of boot2 and required a few other small changes to limit the size impact. This changes only affects boot2; there are further loader changes to follow.
* The kernel is usually at /boot/kernel/kernel nowadays.ssouhlal2005-08-061-1/+1
| | | | | PR: i386/81756 Submitted by: trasz <trasz@buziaczek.pl>
* Print out the commands from /boot.config after parsing them so that theyjhb2005-05-271-1/+1
| | | | | | | | output is sent to the correct console(s). PR: kern/66425 Submitted by: Gavin Atkinson gavin at ury dot york dot ac dot uk MFC after: 1 week
* A long, long time ago in a CVS branch far away (specifically, HEAD priorjhb2004-09-181-3/+3
| | | | | | | | | | | | | to 4.0 and RELENG_3), the BTX mini-kernel used paging rather than flat mode and clients were limited to a virtual address space of 16 megabytes. Because of this limitation, boot2 silently masked all physical addresses in any binaries it loaded so that they were always loaded into the first 16 Meg. Since BTX no longer has this limitation (and hasn't for a long time), remove the masking from boot2. This allows boot2 to load kernels larger than about 12 to 14 meg (12 for non-PAE, 14 for PAE). Submitted by: Sergey Lyubka devnull at uptsoft dot com MFC after: 1 month
* Clean up local memcpy implementation to take void * parameters.kan2004-07-301-3/+6
|
* Define our own memcpy here instead of relying on GCC to provide one.kan2004-07-281-4/+0
|
* These are changes to allow to use the Intel C/C++ compiler (lang/icc)trhodes2004-03-121-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | to build the kernel. It doesn't affect the operation if gcc. Most of the changes are just adding __INTEL_COMPILER to #ifdef's, as icc v8 may define __GNUC__ some parts may look strange but are necessary. Additional changes: - in_cksum.[ch]: * use a generic C version instead of the assembly version in the !gcc case (ASM code breaks with the optimizations icc does) -> no bad checksums with an icc compiled kernel Help from: andre, grehan, das Stolen from: alpha version via ppc version The entire checksum code should IMHO be replaced with the DragonFly version (because it isn't guaranteed future revisions of gcc will include similar optimizations) as in: ---snip--- Revision Changes Path 1.12 +1 -0 src/sys/conf/files.i386 1.4 +142 -558 src/sys/i386/i386/in_cksum.c 1.5 +33 -69 src/sys/i386/include/in_cksum.h 1.5 +2 -0 src/sys/netinet/igmp.c 1.6 +0 -1 src/sys/netinet/in.h 1.6 +2 -0 src/sys/netinet/ip_icmp.c 1.4 +3 -4 src/contrib/ipfilter/ip_compat.h 1.3 +1 -2 src/sbin/natd/icmp.c 1.4 +0 -1 src/sbin/natd/natd.c 1.48 +1 -0 src/sys/conf/files 1.2 +0 -1 src/sys/conf/files.amd64 1.13 +0 -1 src/sys/conf/files.i386 1.5 +0 -1 src/sys/conf/files.pc98 1.7 +1 -1 src/sys/contrib/ipfilter/netinet/fil.c 1.10 +2 -3 src/sys/contrib/ipfilter/netinet/ip_compat.h 1.10 +1 -1 src/sys/contrib/ipfilter/netinet/ip_fil.c 1.7 +1 -1 src/sys/dev/netif/txp/if_txp.c 1.7 +1 -1 src/sys/net/ip_mroute/ip_mroute.c 1.7 +1 -2 src/sys/net/ipfw/ip_fw2.c 1.6 +1 -2 src/sys/netinet/igmp.c 1.4 +158 -116 src/sys/netinet/in_cksum.c 1.6 +1 -1 src/sys/netinet/ip_gre.c 1.7 +1 -2 src/sys/netinet/ip_icmp.c 1.10 +1 -1 src/sys/netinet/ip_input.c 1.10 +1 -2 src/sys/netinet/ip_output.c 1.13 +1 -2 src/sys/netinet/tcp_input.c 1.9 +1 -2 src/sys/netinet/tcp_output.c 1.10 +1 -1 src/sys/netinet/tcp_subr.c 1.10 +1 -1 src/sys/netinet/tcp_syncache.c 1.9 +1 -2 src/sys/netinet/udp_usrreq.c 1.5 +1 -2 src/sys/netinet6/ipsec.c 1.5 +1 -2 src/sys/netproto/ipsec/ipsec.c 1.5 +1 -1 src/sys/netproto/ipsec/ipsec_input.c 1.4 +1 -2 src/sys/netproto/ipsec/ipsec_output.c and finally remove sys/i386/i386 in_cksum.c sys/i386/include in_cksum.h ---snip--- - endian.h: * DTRT in C++ mode - quad.h: * we don't use gcc v1 anymore, remove support for it Suggested by: bde (long ago) - assym.h: * avoid zero-length arrays (remove dependency on a gcc specific feature) This change changes the contents of the object file, but as it's only used to generate some values for a header, and the generator knows how to handle this, there's no impact in the gcc case. Explained by: bde Submitted by: Marius Strobl <marius@alchemy.franken.de> - aicasm.c: * minor change to teach it about the way icc spells "-nostdinc" Not approved by: gibbs (no reply to my mail) - bump __FreeBSD_version (lang/icc needs to know about the changes) Incarnations of this patch survive gcc compiles since a loooong time, I use it on my desktop. An icc compiled kernel works since Nov. 2003 (exceptions: snd_* if used as modules), it survives a build of the entire ports collection with icc. Parts of this commit contains suggestions or submissions from Marius Strobl <marius@alchemy.franken.de>. Reviewed by: -arch Submitted by: netchild
* Changed the RB_PAUSE flag from 0x40000 to 0x100000 and marked the oldbde2003-11-151-2/+13
| | | | | | | | | | | | | | | | | | 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
* Include <sys/reboot.h> the definition of RB_BOOTINFO. The previousbde2003-11-111-0/+2
| | | | | | 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.
* Fixed loss of setting of the RB_BOOTINFO flag in rev.1.43. Fixed wrongbde2003-11-101-2/+2
| | | | | | | | | | | | | 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.)
* Use __FBSDID().obrien2003-08-251-4/+3
| | | | Also some minor copyright style cleanups.
* Libdisk does not need to include <sys/diskslice.h> any more.phk2003-04-041-2/+0
| | | | | | | | | 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.
* Save 4 more bytes by not initializing opts to 0. This moves it fromimp2003-01-141-1/+1
| | | | | | the data section to the bss section givig us initialization for free. Noticed by: bde
* Fix interactive booting:imp2003-01-131-2/+4
| | | | | | | | | | | | | 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
* Put back the casts to unsigned. While no strictly necessary for itsimp2002-12-201-1/+1
| | | | | | | current uses, the name strcmp has strong connotations that shouldn't lightly be discarded. This doesn't cost us anything. Submitted by: bde
* Reduce diffs with Peter's expanded diffs:imp2002-12-171-4/+4
| | | | | 1) Put back the keyboard printing printf, at the cost of 58 bytes. 2) Minor tweak to getstr at no apparent cost.
* Make both UFS1 and UFS2 fit on the same boot blocks. These are aimp2002-12-171-66/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Remove unneeded casts. Add others to make WARNS=5 happy.obrien2002-12-151-6/+6
|
* Remove unnecessary call to fsread().phk2002-12-141-1/+0
|
* Always use the smaller GCC builtin memcpyphk2002-12-141-10/+0
|
* Remove unused variable.phk2002-12-141-1/+1
|
* Don't fill in the table with the BIOS idea about disk-geometry, we don'tphk2002-12-141-15/+0
| | | | use it. This saves a surprising number of bytes.
* Save a couple of bytes by not returning ints nobody care about.phk2002-10-081-6/+6
| | | | Sponsored by: DARPA & NAI labs
* Remove unused TYPE_WD and TYPE_WFD.phk2002-10-081-2/+0
|
* Correctly calculate dmadat: We need to take the address of _end, it'sphk2002-10-081-1/+1
| | | | | | | contents is irrelevant and likely to be zero; This doesn't change the resultant value, but it does save a couple of bytes because &_end is constant.
* Save four bytes by shortening a string two chars.phk2002-10-081-2/+1
| | | | Sponsored by: DARPA & NAI Labs.
* Conditionalize the number of sectors loaded by boot1.s on UFS1/UFS12.phk2002-10-071-1/+5
| | | | | | | | Conditionalize the "XX bytes left" checks reference on UFS1/UFS12. Conditionally build the necessary 64bit math for boot2 if UFS12. Sponsored by: DARPA & NAI Labs.
* Correctly compensate for both offset and unoffset on-disk BSD disklabels.phk2002-10-071-1/+2
| | | | Sponsored by: DARPA & NAI Labs.
* Don't call INT 12H anymore in boot program.iwasaki2002-10-011-1/+1
| | | | | | | | | | | Many recent machine have a broken INT 12H (Get base memory size) implementation and boot program stops if INT 12H is called. This commit should solve the problem at very first step of FreeBSD installation occurred on newer some machines. Reviewed by: bde, jhb MFC after: 1 week
* Split MBR and PC98 on-disk sliceformats out from disklabel.h, step 1:phk2002-10-011-0/+1
| | | | | | | | | | | | | | | | Peter had repocopied sys/disklabel.h to sys/diskpc98.h and sys/diskmbr.h. These two new copies are still intact copies of disklabel.h and therefore protected by #ifndef _SYS_DISKLABEL_H_ so #including them in programs which already include <sys.disklabel.h> is currently a no-op. This commit adds a number of such #includes. Once I have verified that I have fixed all the places which need fixing, I will commit the updated versions of the three #include files. Sponsored by: DARPA & NAI Labs.
* Restore Rev. 1.40 (remove "Keyboard yes/no" printf).kan2002-09-011-1/+1
| | | | | | | GCC 3.2 overflows boot2 by 12 bytes, this patch brings it back within the boundaries, with 12 bytes available for future bloat. Approved by: obrien
* This commit adds basic support for the UFS2 filesystem. The UFS2mckusick2002-06-211-45/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | filesystem expands the inode to 256 bytes to make space for 64-bit block pointers. It also adds a file-creation time field, an ability to use jumbo blocks per inode to allow extent like pointer density, and space for extended attributes (up to twice the filesystem block size worth of attributes, e.g., on a 16K filesystem, there is space for 32K of attributes). UFS2 fully supports and runs existing UFS1 filesystems. New filesystems built using newfs can be built in either UFS1 or UFS2 format using the -O option. In this commit UFS1 is the default format, so if you want to build UFS2 format filesystems, you must specify -O 2. This default will be changed to UFS2 when UFS2 proves itself to be stable. In this commit the boot code for reading UFS2 filesystems is not compiled (see /sys/boot/common/ufsread.c) as there is insufficient space in the boot block. Once the size of the boot block is increased, this code can be defined. Things to note: the definition of SBSIZE has changed to SBLOCKSIZE. The header file <ufs/ufs/dinode.h> must be included before <ufs/ffs/fs.h> so as to get the definitions of ufs2_daddr_t and ufs_lbn_t. Still TODO: Verify that the first level bootstraps work for all the architectures. Convert the utility ffsinfo to understand UFS2 and test growfs. Add support for the extended attribute storage. Update soft updates to ensure integrity of extended attribute storage. Switch the current extended attribute interfaces to use the extended attribute storage. Add the extent like functionality (framework is there, but is currently never used). Sponsored by: DARPA & NAI Labs. Reviewed by: Poul-Henning Kamp <phk@freebsd.org>
* Preparation for UFS2 commit:phk2002-06-051-161/+3
| | | | | | | Factor the ufs reading code out of the i386/boot2 loader so it can be reused by for instance sparc64. Sponsored by: DARPA and NAI Labs.
* Save about 60 bytes by #define memcpy __builtin_memcpy and removingpeter2002-05-111-13/+3
| | | | | the function we provided. Restore the Keyboard: yes/no printf for the probe diagnostics. We end up with 40 bytes free.
* Use a crowbar and duct-tape to make boot2 fit again. This gets it downpeter2002-05-111-1/+1
| | | | | | | | to 4 bytes free. I removed a printf (the Keyboard yes/no) since it is of marginal value and sed'ed the generated asm output to remove the unwanted aligns. There's probably a better way to gain a few extra bytes than losing the printf. Shortening strings is probably a better option but this should get us over the hurdle.
* Code cleanup, no functional change.pb2002-04-111-19/+33
| | | | | | | | Patch adapted from PR. PR: i386/36015 Submitted by: thomas@cuivre.fr.eu.org MFC after: 1 week
* Add option -n to i386 boot2 to disallow boot interruption by keypress.pb2002-03-231-2/+8
| | | | | | | PR: i386/36016 Submitted by: Thomas Quinot <thomas@cuivre.fr.eu.org> Reviewed by: rnordier MFC after: 1 week
* Implement -m and -p loader(8) "boot" command options in boot2.ru2002-03-131-3/+7
| | | | | (This is more useful for 4.x where boot blocks can still load kernels, modulo the PR kern/17422.)
* Oops, the previous revision (1.35) broke booting from floppiesiedowse2002-01-171-6/+18
| | | | | | | | | | | | | | | because the buffers we use could end up spanning a 64k boundary. Unfortunately it causes too much bloat (228 -> 72 bytes free) to just reinstate the old malloc() function. Instead, define a structure that contains all 4 buffers which must not cross 64k boundaries. We allocate a 64k-aligned instance in main() using the magic that was in the old boot2 malloc() function. This brings the free space down to 168 bytes, but that is still better than it was before revision 1.35 (136 bytes). Reported by: Mike Brancato <funnyguy@digitalsmackdown.net> Pointy-hat to: iedowse
* Make the i386 boot2 fully blocksize-agnostic, as has already beeniedowse2002-01-141-48/+46
| | | | | | | done with boot1 on the alpha. We use 4k buffers regardless of the actual filesystem block size. Remove the simple malloc() implementation, as it is no longer used.
* Increase BSIZEMAX from 8k to 16k, so that we can reliably boot fromiedowse2002-01-091-1/+1
| | | | filesystems with 16k blocks.
* Allow the RBX_DUAL flag to appear in bootinfo.jlemon2001-10-231-1/+1
|
* Add in a hack to support IBM "El Torito" CD-ROM booting BIOS's which expectjhb2001-07-311-1/+2
| | | | | | | | | | | | | the first sector of the emulated floppy to contain a valid MS-DOS BPB that it can modify. Since boot1 is the first sector of boot.flp, this resulted in the BIOS overwriting part of boot1: specifically the function used to read in sectors from the disk. Submitted by: Mark Peek <mark@whistle.com> Submitted by: Doug Ambrisko <ambrisko@ambrisko.com> PR: i386/26382 Obtained from: NetBSD, OpenBSD (the example BPB) MFC after: 1 month
* * include/elf.h has been repo copied to include/elf-hints.h, and it noobrien2001-05-021-1/+1
| | | | | | | | longer includes machine/elf.h. * consumers of elf.h now use the minimalist elf header possible. This change is motivated by Binutils 2.11.0 and too much clashing over our base elf headers and the Binutils elf headers.
* - Inline all the functions that are only called once. This results in ajhb2000-07-061-114/+107
| | | | | | savings of 68 bytes in boot2. - Also add a comment warning that you can't remove the empty exit() function.
OpenPOWER on IntegriCloud