#
332130 |
|
06-Apr-2018 |
kevans |
MFC r329726, r329737, r329740
r329726: Honor settings for including / excluding cd9660, ufs, ext2fs and msdos.
The Makefile gives the impression that ext2fs and msdos were excluded (they weren't) and that you could exclude cd9660 and ufs support (you couldn't). Allow those to be excluded.
We need to look, in the future, at trimming the number of supported filesystems, and this will make that easier.
r329737: Purely whitespace changes bringing this file closer to style(9).
Curiously, changing whitespace seems to cause the md5 of the .o files to differ these days hence the following testing strategy:
Tested by: objdump -d | md5 (both in-tree clang and lang/gcc6)
r329740: Further style(9) changes.
Tested by: objdump -d | md5 (both in-tree clang and lang/gcc6)
|
#
329145 |
|
12-Feb-2018 |
kevans |
MFC r325834,r325997,326502: Move sys/boot to stand/
This is effectively a direct commit to stable/11, due to differences between stable/11 and head. Changes to DTS in sys/boot/fdt/dts were often accompanied by kernel changes. Many of these were also risc-v updates that likely had many more dependencies to MFC.
Because of this, sys/boot/fdt/dts remains as-is while everything else in sys/boot relocates to stand/.
r325834: Move sys/boot to stand. Fix all references to new location
r325997: Remove empty directories.
r326502: Document the sys/boot -> stand move in hier.7 and the top-level README. |
#
329099 |
|
10-Feb-2018 |
kevans |
MFC Loader Fixes 2017q1: r311458,r312237,r312314,r312374,r312947,r313042, r313047,r313166,r313328,r313332,r313333,r313337,r313348,r313349,r313389, r313442,r313451,r313575,r313645,r313710,r314114,r314213,r314275,r314945, r314948,r315008,r315408,r315427,r315645,r315646,r315648,r315653,r315850, r316064,r316078,r316079,r316100,r316104,r316111,r316112,r316171,r316279, r316280,r316287,r316311,r316343,r316424,r316436
r311458: Use compiler driver to link BERI boot loaders
r312237: loader.efi: find_currdev() can leak memory
r312314: loader: move device path definitions to include/efidevp.h
r312374: loader: efi devpath api usage should be more aware of NULL pointers
r312947: Remove "-Xassembler -G0" from CFLAGS.
r313042: loader.efi environment related cleanups
r313047: loader: disk/part api needs to use uint64_t offsets
r313166: loader: libefi/env.c warnings in arm build
r313328: loader: Implement disk_ioctl() to support DIOCGSECTORSIZE and DIOCGMEDIASIZE.
r313332: loader: bcache read ahead block count should take account the large sectors
r313333: loader: Replace EFI part devices.
r313337: loader: 313329 missed ZFS guard in loader/main.c
r313348: loader: biosdisk fix for 2+TB disks
r313349: loader: disk io should not use alloca()
r313389: efipart is also using the '%S' printf format, add -Wno-format for it.
r313442: loader: possible NULL pointer dereference in efipart.c
r313451: loader: possible NULL pointer dereference in bcache.c
r313575: makefs: make the buffer functions look exactly like the kernel ones
r313645: loader: implement MEDIA_FILEPATH_DP support in efipart
r313710: loader: cstyle fixes and DIOCGMEDIASIZE should use uint64_t
r314114: Use LDFLAGS with CC instead of _LDFLAGS.
r314213: Remove control+r handling from geliboot's pwgets()
r314275: Remove unused macro from common/drv.c.
r314945: Some style(9) fixes. No functional changes.
r314948: Try to extract the RFC1048 data from PXE.
r315008: r314948 seems to be missing a variable or two that will break
r315408: loader: remove open_disk cache
r315427: loader: biosdisk should report IO error from INT13
r315645: loader: disk_cleanup was left in userboot_disk.c
r315646: loader: pxe.h constants have wrong values
r315648: libstand: verify value provided by nfs.read_size
r315653: loader: verify the value from dhcp.interface-mtu and use snprintf o set mtu
r315850: The original author abused Nd (one-line description, used by makewhatis)
r316064: Fix build with path names with 'align' or 'nop' in them.
r316078: gpt*boot: Save a bit more memory when LOADER_NO_GELI_SUPPORT is specified
r316079: Simply retire the sedification of the boot2.s file.
r316100: Remove -fno-guess-branch-probability and -fno-unit-at-a-time.
r316104: Use `NO_WCAST_ALIGN` instead of spelling it out as -Wno-cast-align in CFLAGS
r316111: loader: move bios getsecs into time.c
r316112: loader: ls command should display file types properly
r316171: xfsread inlined uses more space, so remove the inline tag.
r316279: loader: efipart should check disk size from partition table
r316280: loader: simplify efi_zfs_probe and avoid double probing for zfs.
r316287: Remove OLD_NFSV2 from loader and libstand
r316311: Add explicit_bzero() to libstand, and switch GELIBoot to using it
r316343: Implement boot-time encryption key passing (keybuf)
r316424: Fix sparc64 build broken by r316343 and r316076
r316436: Restore EFI boot environment functionality broken in r313333
PR: 216940 217298 217935 |
#
302408 |
|
08-Jul-2016 |
gjb |
Copy head@r302406 to stable/11 as part of the 11.0-RELEASE cycle. Prune svn:mergeinfo from the new branch, as nothing has been merged here.
Additional commits post-branch will follow.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation |
#
294925 |
|
27-Jan-2016 |
imp |
Fix mistake when transitioning to the new defines with ZFS loader. I hate adding yet another define, but it is the lessor of the evil choices available. Kill another evil by removing PATH_BOOT3 and replacing it with PATH_LOADER or PATH_LOADER_ZFS as appropriate.
PR: 206659
|
#
294766 |
|
26-Jan-2016 |
imp |
RBX_ defines are in rbx.h, move it there.
Differential Revision: https://reviews.freebsd.org/D5038
|
#
294765 |
|
26-Jan-2016 |
imp |
Move all the separate copies of the same strings into paths.h. There's nothing machine specific about these.
Differential Revision: https://reviews.freebsd.org/D5038
|
#
284878 |
|
26-Jun-2015 |
delphij |
Reduce warnings:
- Add prototype for boot2 main() - Don't make assignment within if statement, split it into two.
No functional or binary change -- verified with sha256(1).
MFC after: 2 weeks
|
#
275305 |
|
30-Nov-2014 |
rdivacky |
Unbreak the code for non-digits below '0' by casting the expression to unsigned int.
Pointed out by: bde
|
#
275237 |
|
29-Nov-2014 |
rdivacky |
Shrink boot2 a bit more by factoring out common pattern of printf();return(-1);
This shrinks it by 8bytes using clang35 and by 12bytes using clang34.
|
#
275191 |
|
27-Nov-2014 |
rdivacky |
Revert part of r275059. Comparing unsigned 8 bit value against -'0' is always false so the conditional block is optimized away.
|
#
275062 |
|
25-Nov-2014 |
rdivacky |
Fix style(9).
Suggested by: jkim
|
#
275061 |
|
25-Nov-2014 |
rdivacky |
Fix style(9).
Suggested by: jkim
|
#
275059 |
|
25-Nov-2014 |
rdivacky |
Shrink boot2 by a couple more bytes.
Reviewed by: jhb Tested by: me, dim
|
#
268475 |
|
10-Jul-2014 |
imp |
Make SERIAL support optional again. Enable it for i386 because a huge percentage of machines has a 16550. Disable it for pc98 since only a tiny fraction of them have one. These changes save 293 bytes when building with clang, but preserves the ability to build with serial if you really want. We now have 92 bytes free (412 with the in-tree gcc).
|
#
241301 |
|
06-Oct-2012 |
avg |
add detection of serial console presence to btx and boot2-like blocks
Note that this commit slightly increases size of boot blocks.
Reviewed by: jhb Tested by: Olivier Cochard-Labbe <olivier@cochard.me> MFC after: 26 days
|
#
236405 |
|
01-Jun-2012 |
jhb |
Remove unnecessary initializations. The BSS of boot2 is in fact zero'd when boot2 begins execution by the _start() routine in btxcsu.S.
MFC after: 1 week
|
#
235988 |
|
25-May-2012 |
gleb |
Use 32-bit ufs_ino_t instead of ino_t to keep boot2 small and prevent unnecessary 64-bit math on 32-bit machines.
Sponsored by: Google Summer of Code 2011
|
#
232754 |
|
09-Mar-2012 |
jkim |
Make boot2 build with Clang again.
Submitted by: dim (bsd.sys.mk) Reviewed by: dim, jhb
|
#
232570 |
|
05-Mar-2012 |
jhb |
Fix boot2 to handle boot config files that only contain a custom path to a loader or kernel. Specifically, kname cannot be pointed at cmd[] since it's value is change to be an empty string after the initial call to parse, and cmd[]'s value can be changed (thus losing a prior setting for kname) due to user input at the boot prompt. While here, ensure that that initial boot config file text is nul-terminated, that ops is initialized to zero, and that kname is always initialized to a valid string.
Tested by: Domagoj Smolcic rank1seeker of gmail MFC after: 1 week
|
#
226746 |
|
25-Oct-2011 |
jhb |
Consolidate duplicate definitions of V86_CY() and V86_ZR() which check for the carry and zero flags being set, respectively, in <btxv86.h> and use them throughout the x86 boot code.
|
#
226506 |
|
18-Oct-2011 |
des |
Look for /boot/config in addition to /boot.config, with the former taking precedence over the latter if it exists.
MFC after: 3 weeks
|
#
220392 |
|
06-Apr-2011 |
rdivacky |
Move getc() body before xgetc() so gcc does not emit a warning about function having no body.
Approved by: jhb
|
#
220389 |
|
06-Apr-2011 |
rdivacky |
Mark getc() as inline, this has no effect on gcc but helps clang.
Approved by: jhb
|
#
219452 |
|
10-Mar-2011 |
rdivacky |
Some more shrinking.
o bunch of variables are turned into uint8_t
o initial setting of namep[] in lookup() is removed as it's only overwritten a few lines down
o kname is explicitly initialized in main() as BSS in boot2 is not zeroed
o the setting and reading of "fmt" in load() is removed
o buf in printf() is made static to save space
Reviewed by: jhb Tested by: me and Fabian Keil <freebsd-listen fabiankeil de>
|
#
219186 |
|
02-Mar-2011 |
rdivacky |
This patch shrinks boot2 a little.
o It switches kname to be just a pointer instead of an array thus avoiding a couple of memcpy()s.
o It changes ioctl to unsigned from uint8_t.
o It changes the second keyhit limit to 3 seconds from 5 so that constant propagation can take place.
o It changes the ticks overflow computation as suggested by bde@.
o It removes bi_basemem/bi_extmem/bi_memsizes_valid setting from bootinfo as it is unused.
Reviewed by: jhb
|
#
218926 |
|
21-Feb-2011 |
dim |
In sys/boot/i386/boot2/boot2.c, change the type of the 'opts' variable from uint16_t back to uint32_t. The actual option bitmasks (RB_* and RBX_*) assume at least a 32 bit variable.
Submitted by: rdivacky
|
#
218745 |
|
16-Feb-2011 |
imp |
Remove reading of symbols from a.out loaded files. Since we are tight on space for clang and a.out support is only needed for /boot/loader, they are excess bytes that serve no useful purpose other than to support really old kernels (FreeBSD < 3.2 or so). Prefer clang support over support for these old kernels and remove this code. We gain about 100 bytes of space this way.
Reviewed by: rdivacky@
|
#
218713 |
|
15-Feb-2011 |
dim |
Apply a few small optimizations to boot2's code, to make it shrink a little further. This gets us further on the way to be able to build it successfully with clang. Using in-tree gcc, this shrinks boot2.bin with 60 bytes, the in-tree clang shaves off 72 bytes, and ToT clang 84 bytes.
Submitted by: rdivacky Reviewed by: imp
|
#
214210 |
|
22-Oct-2010 |
rdivacky |
Avoid using memcpy() for copying 32bit chunks. This shrinks the resulting code a little.
Approved by: rpaulo (mentor) Reviewed by: jhb
|
#
205662 |
|
26-Mar-2010 |
delphij |
Our boot loader is capable of booting both i386 and amd64 kernels so call it "x86" instead of "i386".
Suggested by: jhb in response to Alexander Best's loader proposal MFC after: 1 month
|
#
181436 |
|
08-Aug-2008 |
jhb |
- Initialize the vm86 structure to a known-good state. Specifically, always set the %eflags used during a BIOS call via BTX to 0x202. Previously the flags field was uninitialized garbage, and thus it was "random" if interrupts were enabled or not during BIOS calls. - Use constants from <machine/psl.h> for fields in %eflags.
MFC after: 3 days
|
#
180145 |
|
01-Jul-2008 |
nyan |
Fix off-by-one error.
MFC after: 1 week
|
#
176644 |
|
28-Feb-2008 |
jhb |
Rev 1.72 fixed a bug where if /boot.config changed the console its contents weren't displayed on the new console. However, the config string has been altered as part of being parsed so we only display the first option. Fix this by saving a copy of /boot.config before parsing it and displaying the saved copy after parsing.
MFC after: 1 week PR: i386/103972 Submitted by: Alexandre Belloni alexandre.belloni of netasq.com
|
#
173040 |
|
26-Oct-2007 |
jhb |
Use the smaller cgbase() macro in ufsread.c if UFS_SMALL_CGBASE is defined. This lets each boot program choose which version of cgbase() it wants to use rather than forcing ufsread.c to have that knowledge.
MFC after: 1 week Discussed with: imp
|
#
172921 |
|
24-Oct-2007 |
jhb |
Slightly cleanup the 'bootdev' concept on x86 by changing the various macros to treat the 'slice' field as a real part of the bootdev instead of as hack that spans two other fields (adaptor (sic) and controller) that are not used in any modern FreeBSD boot code.
MFC after: 1 week
|
#
163914 |
|
02-Nov-2006 |
ru |
Revert the last change. Masking only 2 MSBs of the virtual address 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
|
#
163765 |
|
29-Oct-2006 |
ru |
Because the BTX mini-kernel now uses flat memory mode and clients 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)
|
#
163707 |
|
26-Oct-2006 |
ru |
Restore support for -c and -d that were treacherously murdered in rev. 1.58. (This only costs us four bytes.)
Prodded by: bde MFC after: 3 days
|
#
163706 |
|
26-Oct-2006 |
ru |
Back out rev. 1.71 as it breaks directly loading (i386) kernels.
OK'ed by: jhb PR: i386/96430, i386/104709 MFC after: 3 days
|
#
151999 |
|
03-Nov-2005 |
ru |
Consistently use OPT_* macros to test/set boot options.
|
#
151382 |
|
16-Oct-2005 |
sobomax |
Re-implement rev.1.76 with respect to the code size.
|
#
151381 |
|
16-Oct-2005 |
sobomax |
Backout previous commit - for some reason it overflows space constrains on amd64. Better version will follow.
|
#
151367 |
|
16-Oct-2005 |
sobomax |
Add new option `q', which makes second stage loader quiet unless autoboot is disabled or fails.
MFC after: 1 week
|
#
150464 |
|
22-Sep-2005 |
ru |
- RBX_MASK wasn't updated when RB_PAUSE was changed from 0x40000 to 0x100000 in rev. 1.67.
- NOPT wasn't updated (decremented) in previous revision.
|
#
149212 |
|
18-Aug-2005 |
iedowse |
Add the ability to specify the boot2 serial console speed in /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.
|
#
148767 |
|
06-Aug-2005 |
ssouhlal |
The kernel is usually at /boot/kernel/kernel nowadays.
PR: i386/81756 Submitted by: trasz <trasz@buziaczek.pl>
|
#
146696 |
|
27-May-2005 |
jhb |
Print out the commands from /boot.config after parsing them so that they 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
|
#
135410 |
|
18-Sep-2004 |
jhb |
A long, long time ago in a CVS branch far away (specifically, HEAD prior 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
|
#
132864 |
|
30-Jul-2004 |
kan |
Clean up local memcpy implementation to take void * parameters.
|
#
132764 |
|
28-Jul-2004 |
kan |
Define our own memcpy here instead of relying on GCC to provide one.
|
#
126891 |
|
12-Mar-2004 |
trhodes |
These are changes to allow to use the Intel C/C++ compiler (lang/icc) 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
|
#
122749 |
|
15-Nov-2003 |
bde |
Changed the RB_PAUSE flag from 0x40000 to 0x100000 and marked the old 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
|
#
122463 |
|
11-Nov-2003 |
bde |
Include <sys/reboot.h> the definition of RB_BOOTINFO. The previous 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.
|
#
122433 |
|
10-Nov-2003 |
bde |
Fixed loss of setting of the RB_BOOTINFO flag in rev.1.43. Fixed wrong 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.)
|
#
119482 |
|
25-Aug-2003 |
obrien |
Use __FBSDID(). Also some minor copyright style cleanups.
|
#
113083 |
|
04-Apr-2003 |
phk |
Libdisk does not need to include <sys/diskslice.h> any more.
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.
|
#
109235 |
|
14-Jan-2003 |
imp |
Save 4 more bytes by not initializing opts to 0. This moves it from the data section to the bss section givig us initialization for free.
Noticed by: bde
|
#
109197 |
|
13-Jan-2003 |
imp |
Fix interactive booting: 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
|
#
108119 |
|
20-Dec-2002 |
imp |
Put back the casts to unsigned. While no strictly necessary for its current uses, the name strcmp has strong connotations that shouldn't lightly be discarded. This doesn't cost us anything.
Submitted by: bde
|
#
108005 |
|
17-Dec-2002 |
imp |
Reduce diffs with Peter's expanded diffs: 1) Put back the keyboard printing printf, at the cost of 58 bytes. 2) Minor tweak to getstr at no apparent cost.
|
#
108000 |
|
17-Dec-2002 |
imp |
Make both UFS1 and UFS2 fit on the same boot blocks. These are a 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
|
#
107889 |
|
15-Dec-2002 |
obrien |
Remove unneeded casts. Add others to make WARNS=5 happy.
|
#
107878 |
|
14-Dec-2002 |
phk |
Remove unnecessary call to fsread().
|
#
107875 |
|
14-Dec-2002 |
phk |
Always use the smaller GCC builtin memcpy
|
#
107874 |
|
14-Dec-2002 |
phk |
Remove unused variable.
|
#
107869 |
|
14-Dec-2002 |
phk |
Don't fill in the table with the BIOS idea about disk-geometry, we don't use it. This saves a surprising number of bytes.
|
#
104679 |
|
08-Oct-2002 |
phk |
Save a couple of bytes by not returning ints nobody care about.
Sponsored by: DARPA & NAI labs
|
#
104671 |
|
08-Oct-2002 |
phk |
Remove unused TYPE_WD and TYPE_WFD.
|
#
104670 |
|
08-Oct-2002 |
phk |
Correctly calculate dmadat: We need to take the address of _end, it's 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.
|
#
104666 |
|
08-Oct-2002 |
phk |
Save four bytes by shortening a string two chars.
Sponsored by: DARPA & NAI Labs.
|
#
104635 |
|
07-Oct-2002 |
phk |
Conditionalize the number of sectors loaded by boot1.s on UFS1/UFS12.
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.
|
#
104620 |
|
07-Oct-2002 |
phk |
Correctly compensate for both offset and unoffset on-disk BSD disklabels.
Sponsored by: DARPA & NAI Labs.
|
#
104315 |
|
01-Oct-2002 |
iwasaki |
Don't call INT 12H anymore in boot program. 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
|
#
104272 |
|
01-Oct-2002 |
phk |
Split MBR and PC98 on-disk sliceformats out from disklabel.h, step 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.
|
#
102807 |
|
01-Sep-2002 |
kan |
Restore Rev. 1.40 (remove "Keyboard yes/no" printf). 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
|
#
98542 |
|
21-Jun-2002 |
mckusick |
This commit adds basic support for the UFS2 filesystem. The UFS2 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>
|
#
97860 |
|
05-Jun-2002 |
phk |
Preparation for UFS2 commit:
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.
|
#
96426 |
|
11-May-2002 |
peter |
Save about 60 bytes by #define memcpy __builtin_memcpy and removing the function we provided. Restore the Keyboard: yes/no printf for the probe diagnostics. We end up with 40 bytes free.
|
#
96424 |
|
11-May-2002 |
peter |
Use a crowbar and duct-tape to make boot2 fit again. This gets it down 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.
|
#
94411 |
|
11-Apr-2002 |
pb |
Code cleanup, no functional change. Patch adapted from PR.
PR: i386/36015 Submitted by: thomas@cuivre.fr.eu.org MFC after: 1 week
|
#
93044 |
|
23-Mar-2002 |
pb |
Add option -n to i386 boot2 to disallow boot interruption by keypress.
PR: i386/36016 Submitted by: Thomas Quinot <thomas@cuivre.fr.eu.org> Reviewed by: rnordier MFC after: 1 week
|
#
92225 |
|
13-Mar-2002 |
ru |
Implement -m and -p loader(8) "boot" command options in boot2. (This is more useful for 4.x where boot blocks can still load kernels, modulo the PR kern/17422.)
|
#
89481 |
|
17-Jan-2002 |
iedowse |
Oops, the previous revision (1.35) broke booting from floppies 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
|
#
89368 |
|
14-Jan-2002 |
iedowse |
Make the i386 boot2 fully blocksize-agnostic, as has already been 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.
|
#
89154 |
|
09-Jan-2002 |
iedowse |
Increase BSIZEMAX from 8k to 16k, so that we can reliably boot from filesystems with 16k blocks.
|
#
85374 |
|
23-Oct-2001 |
jlemon |
Allow the RBX_DUAL flag to appear in bootinfo.
|
#
80751 |
|
31-Jul-2001 |
jhb |
Add in a hack to support IBM "El Torito" CD-ROM booting BIOS's which expect 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
|
#
76224 |
|
02-May-2001 |
obrien |
* include/elf.h has been repo copied to include/elf-hints.h, and it no 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.
|
#
62665 |
|
06-Jul-2000 |
jhb |
- Inline all the functions that are only called once. This results in a savings of 68 bytes in boot2. - Also add a comment warning that you can't remove the empty exit() function.
|
#
61627 |
|
13-Jun-2000 |
ru |
Treat \t and \n inside /boot.config as whitespaces.
PR: 19215
|
#
57090 |
|
09-Feb-2000 |
ru |
Support the new ata(4) syntax, while providing backward compatibility for wd(4).
Reviewed by: jkh, msmith, sos Approved by: jkh
|
#
53159 |
|
14-Nov-1999 |
obrien |
Return this file to its pre-spammed version. Thanks to some new compiler optimizations, we can go from 3 bytes free with the spammed version, to 279 bytes free with the full version.
|
#
53135 |
|
14-Nov-1999 |
obrien |
Enter complier upgrade mode again. We need to cut 169 bytes from this: Remove some printf() calls, reduce size of buffers, and abbreviate some strings.
Hopefully the boot people will fix this spamage after the cut over to Gcc 2.95.2 as the system compiler.
|
#
50477 |
|
28-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
#
48034 |
|
19-Jun-1999 |
rnordier |
Fix use of e_phoff in place of e_phnum.
|
#
45335 |
|
05-Apr-1999 |
rnordier |
Fix damage introduced in previous commit.
|
#
45309 |
|
04-Apr-1999 |
obrien |
Remove the string ">>> FreeBSD/i386 BOOT". I need to reduce the size of boot2 by 16 bytes. I expect this to be temperary until the boot2 authors can do the proper fix.
|
#
45175 |
|
31-Mar-1999 |
joerg |
Make <DEL> an alternative rubout character for command input; many serial terminals use this as their default rubout key.
|
#
43374 |
|
29-Jan-1999 |
rnordier |
Check size of partition before using it.
|
#
43113 |
|
24-Jan-1999 |
msmith |
Fill in the bi_bios_dev field in the bootinfo struct; the loader doesn't guess this value well in anything other than the simplest of situations.
|
#
42519 |
|
11-Jan-1999 |
rnordier |
Drop boot.help support.
|
#
42478 |
|
10-Jan-1999 |
peter |
Damn, I thought I had committed this already, but it seems not.
Move the relocated boot1 and arg transfer space from 0x600/0x800 to 0x700/0x900. In theory this should make no difference, apart from the fact that Buslogic controllers happen to use a few bytes at 0x600 for some sort of scratch space for it's int 0x13 hook (!!!), causing the machine to crash badly when the boot2 code makes it's callbacks into boot1 for disk IO.
Submitted by: Robert Nordier <rnordier@freebsd.org>
|
#
41013 |
|
08-Nov-1998 |
rnordier |
Prevent boot.config being parsed more than once.
|
#
41010 |
|
08-Nov-1998 |
rnordier |
Drop the familiar 'text=xxxx data=xxxx bss=xxxx ...' display while loading. This eliminates noise when loading boot/loader; and when loading a kernel, they generally flash by too fast to be intelligible anyway.
|
#
41008 |
|
08-Nov-1998 |
rnordier |
boot1: Eliminate EDD detection and optional use of disk packet interface. Do some general consistency fixes and space optimizations. Use of some freed-up space to defend against possible BIOS misfeatures.
boot2: Revise disk read interface to provide for boot1 changes. Free up space for this.
|
#
40674 |
|
27-Oct-1998 |
rnordier |
biosboot compatibility fix: change behavior of backspace in getstr(). Noticed by: abial
Optimize away a few bytes to make space for the above.
|
#
40477 |
|
17-Oct-1998 |
rnordier |
Fix some glitches in the input routine: Don't display a \b if not acting on it. Don't process binary zero chars (which result from pressing function keys, etc. on the PC).
|
#
40476 |
|
17-Oct-1998 |
rnordier |
Having probed the keyboard, turn off the -P flag.
|
#
40474 |
|
17-Oct-1998 |
rnordier |
Treat all options as toggles (ie. -c -c is the same no -c). Since the boot.config settings are persistent, this seems to provide a useful override capability, and should break only on broken boot.config's.
Output a cosmetic newline if booting with no input.
|
#
40472 |
|
17-Oct-1998 |
rnordier |
biosboot compatibility fix: If we have a boot.config command, display it.
|
#
40471 |
|
17-Oct-1998 |
rnordier |
biosboot compatibility fix: Read boot.help before parsing boot.config. We were parsing boot.config first, which could result in boot.help being read from a different location (or not found), which would probably just cause surprise, without being useful.
|
#
40404 |
|
15-Oct-1998 |
rnordier |
Add serial, dual, and probe-keyboard support.
|
#
40325 |
|
13-Oct-1998 |
rnordier |
Fix flow of control after directory listing; enable EDD support; cosmetics.
|
#
40323 |
|
13-Oct-1998 |
rnordier |
Make v86.ctl default more explicit; simplify read error-handling; twiddle.
|
#
40320 |
|
13-Oct-1998 |
rnordier |
Adjust NDEV value. Optimize reading of system time.
|
#
40314 |
|
13-Oct-1998 |
rnordier |
Change to a 15-sector boot2. Refine slice-handling.
|
#
40307 |
|
13-Oct-1998 |
rnordier |
Improve drive recognition and handling.
|
#
40270 |
|
12-Oct-1998 |
rnordier |
This commit was generated by cvs2svn to compensate for changes in r40269, which included commits to RCS files with non-trunk default branches.
|
#
40269 |
|
12-Oct-1998 |
rnordier |
New boot blocks: support for /boot/loader; a.out & ELF; cyl > 1023; multiple 0xa5 slices; etc.
|