360838 |
09-May-2020 |
dim |
MFC r358643:
Link stand/i386 components using a linker script
LLD 10.0.0 changed the behavior of the -Ttext option, so that using -Ttext=0x0 now causes linking of the loaders to fail with:
ld: error: output file too large: 18446744073707016908 bytes
I reported this in https://bugs.llvm.org/show_bug.cgi?id=44715, and initially reverted the upstream change in r357259 to work around it.
However, after some discussion with Fangrui Song in the upstream ticket, I think we can classify this as an unfortunate interaction between using -Ttext=0 in combination with --no-rosegment. (We added the latter in r332090, because btxld does not correctly handle input with more than 2 PT_LOAD segments.)
Fangrui suggested to use a linker script instead, and Warner was already attempting this in r305353, but had to revert it due to "crypto-using boot problems" (not sure what those were :).
This review updates the stand/i386/boot.ldscript to handle more sections, inserts some symbols like _edata and such that we use in libsa, and also discards any .interp section.
It uses ORG which is defined on the linker command line using --defsym ORG=value to set the start of all the sections.
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D23952 |
357354 |
31-Jan-2020 |
dim |
MFC r357232:
Merge r357231 from the clang1000-import branch:
Work around assembler error from clang 10.0.0 in gptboot:
stand/i386/gptboot/gptldr.S:141:3: error: value of 36878 is too large for field of 2 bytes. jmp MEM_JMP # Start BTX ^
Use the same construct as in stand/i386/boot2/boot1.S, which ensures the jump distance does not become too large. |
347705 |
16-May-2019 |
ian |
MFC r346968, r346973
r346968: Update the manpage text to show the output generated by the first-stage bootloader these days (x86 instead of i386).
r346973: Add a paragraph that mentions gptboot having an interactive mode, and direct the user to the boot(8) manpage, which provides the details on that. |
344399 |
21-Feb-2019 |
kevans |
MFC GELI Loader Improvements: r336252, r336254, r336256, r336354, r336532-r336534, r336537, r336626, r337326, r337349, r341071, r341160, r341420, r341473, r341651, r342793
Note that this MFC contains some seemingly unrelated zfsloader bits -- this was needed in order to pull in some later fixes for GELI hand-off w/ ZFS bits included.
r336252: Extend loader(8) geli support to all architectures and all disk-like devices.
This moves the bulk of the geli support from lib386/biosdisk.c into a new geli/gelidev.c which implements a devsw-type device whose dv_strategy() function handles geli decryption. Support for all arches comes from moving the taste-and-attach code to the devopen() function in libsa.
After opening any DEVT_DISK device, devopen() calls the new function geli_probe_and_attach(), which will "attach" the geli code to the open_file struct by creating a geli_devdesc instance to replace the disk_devdesc instance in the open_file. That routes all IO for the device through the geli code.
A new public geli_add_key() function is added, to allow arch/vendor-specific code to add keys obtained from custom hardware or other sources.
With these changes, geli support will be compiled into all variations of loader(8) on all arches because the default is WITH_LOADER_GELI.
r336254: Use if rather than case for a simple boolean. gcc thinks blks is undefined sometimes with the case, but enc is always 0 or 1, so and if / else is better anyway.
r336256: Fix glitched indentation (and rewrap as needed due to deeper indent). No functional changes.
r336354: zfsboot: fix build with WITHOUT_LOADER_GELI
r336532: Collapse zfsloader functionality back down into loader.
We no longer really need a separate zfsloader. It was useful when we were first supporting ZFS and had limited ability to properly boot off of ZFS without the special boot loader. Now that the boot loader has matured, go the way loader.efi pioneered and just build one binary. Change the name of the loader to load in the secondary boot blocks to be just /boot/loader. Provide a symbolic link from zfsloader to loader so people who have not upgraded their boot blocks are not affected. This has the happy benefit of making coexistence easier as well (fewer binaries in the matrix).
r336533: Eliminate zfsloader man page.
Remove all cross references to zfsloader.8 and /boot/zfsloader. Move ZFS specific info into loader.8.
r336534: NM and OBJCOPY are already defined for all builds. There's no need to conditionally define them here.
r336537: Mention zfsloader being folded into loader in UPDATING.
r336626: Older zfs boot blocks don't support symlinks. install the link to zfsloader as a hard link. While newer ones do, the whole point of the link was to transition to the new world order smoothly. A hard link is less flexible, but it works and will result in fewer bumps. Adjust UPDATING entry to match.
r337326: loader: biosdisk.c has leftover geli header.
A small cleanup, remove unneeded #include.
r337349: zfsboot: Fix startup crash
On a FreeNAS mini XL, with geli encrypted drives the loader crashed in geli_read().
When we iterate over the list of disks and allocate the zfsdsk structures we don’t zero out the gdev pointer. In one case that resulted in geli_read() (called on the bogus pointer) dividing by zero.
Use calloc() to ensure the zfsdsk structure is always zeroed, so the pointer is initialised to NULL. As a side benefit it gets rid of one #ifdef LOADER_GELI_SUPPORT.
r341071: Restore the ability to override the disk unit/partition at the boot: prompt in gptboot.
When arch-independent geli support was added, a new static 'gdsk' struct was added, but there was still a static 'dsk' struct, and when you typed in an alternate disk/partition, the string was parsed into that struct, which was then never used for anything. Now the string gets parsed into gdsk.dsk, the struct that's actually used.
r341160: Add comments describing the bootargs handoff between loader(8) and gptboot or zfsboot, when loader(8) is the BTX loader. No functional changes.
r341420: Eliminate duplicated code and struct member definitions in the handoff of args data between gptboot/zfsboot and loader(8).
Despite what seems like a lot of changes here, there are no actual changes in behavior, or in the data layout in the structures involved. This is just eliminating identical code pasted into multiple locations.
In detail, the changes are...
- Move struct zfs_boot_args definition from libsa/zfs/libzfs.h to i386/common/bootargs.h because it is specific to x86 booting and the handoff between zfsboot and loader, and has no relation to the zfs library code in general.
- The geli_boot_args and zfs_boot_args structs both contain an identical set of member variables containing geli information. Extract this out to a new geli_boot_data struct, and embed it in the arg-passing structs.
- Provide new routines geli_import_boot_data() and geli_export_boot_data() that can be shared between gptboot, zfsboot, and loader instead of pasting identical code into several different .c files.
- Remove some checks for a NULL pointer that can never be true because the pointer being tested was set using pointer math (kargs + 1) and that can never result in NULL in this code.
r341473: Fix args cross-threading between gptboot(8) and loader(8) with zfs support.
When loader(8) is built with zfs support enabled, it assumes that any extarg data present is a zfs_boot_args struct, but if the first-stage loader was gptboot(8) the extarg data is actually a geli_boot_args struct. Luckily, zfsboot(8) and gptzfsboot(8) have always passed KARGS_FLAGS_ZFS along with KARGS_FLAGS_EXTARG, so we can use KARGS_FLAGS_ZFS to decide whether the extarg data is a zfs_boot_args struct.
To avoid similar problems in the future, gptboot(8) now passes a new KARGS_FLAGS_GELI to indicate that extarg data is geli_boot_args. In loader(8), if the neither KARGS_FLAGS_ZFS nor KARGS_FLAGS_GELI is set but extarg data is present (which will be the case for gptboot compiled before this change), we now check for the known size of the geli_boot_args struct passed by the older versions of gptboot as a way of confirming what type of extarg data is present.
In a semi-related tidying up, since loader's main() has already decided what type of extarg data is present and set the global 'zargs' var accordingly, don't repeat the check in extract_currdev, just check whether zargs is NULL or not.
r341651: Don't reference zfs-specific variables if LOADER_ZFS_SUPPORT is undefined because the variables will be undefined too.
r342793: MK_ZFS -> {MK_ZFS|MK_LOADER_ZFS}, this is so we can diable userland / kernel ZFS but keep the boot-loaders when using ZoL port.
Relnotes: yes (GELI support extended) Relnotes: yes (zfsloader has been collapsed into loader and may be removed after boot blocks have been updated) |
344373 |
20-Feb-2019 |
kevans |
MFC r335321, r335336: stand: move libgeliboot into libsa
r335321: stand: move libgeliboot into libsa.
Reduce by 1 the number of crazy libraries we need in stand by moving geli into libsa (where architecturally it belonged all along). This just moves things around without any code changes.
r335336: Remove now-empty geli directory |
337816 |
14-Aug-2018 |
kevans |
MFC r337520: Fix WITHOUT_LOADER_GELI (gptboot) and isoboot in general
gptboot was broken when r316078 added the LOADER_GELI_SUPPORT #ifdef to not pass geliargs via __exec. KARGS_FLAGS_EXTARG must not be used if we're not going to pass an additional argument to __exec.
PR: 228151 |
334572 |
03-Jun-2018 |
dim |
MFC r334432:
Fix build of stand with base gcc
* Make autoboot() a static function in stand/common/boot.c, so it does not shadow local variables in gptboot.c and zfsboot.c. * Remove -Winline from the Makefiles for gptboot, gptzfsboot and zfsboot, as gcc will always fail to inline some functions, and there is nothing we can do about it. * For gcc <= 4.2.1, silence -Wuninitialized for isoboot, as it produces a false positive warning. * Remove deprecated and unnecessary -mcpu=i386 flag from stand/defs.mk, as there is already a -march=i386 flag further in the file.
Reviewed by: imp Differential Revision: https://reviews.freebsd.org/D15628 |
332954 |
24-Apr-2018 |
benno |
MFC r332083:
Various style(9) fixes.
Sponsored by: iXsystems, Inc. |
332953 |
24-Apr-2018 |
benno |
MFC r332082
Use consistent whitespace.
Sponsored by: iXsystems, Inc. |
329175 |
12-Feb-2018 |
kevans |
MFC Loader Fixes 2017q4p7: r324844,r326089,r326926,r326440,r326484,r326494, r326588,r326708,r326784,r326914,r327390,r328446,r326090,r326143,r326144, r326182,r326384,r326421,r326440,r326441,r326442,r326443,r326444,r326445, r326446,r326447,r326448,r326484,r326485,r326486,r326487,r326488,r326490, r326491,r326492,r326493,r326494,r326495,r326504,r326507,r326509,r326584, r326585,r326586,r326587,r326588,r326589,r326590,r326591,r326592,r326593, r326594,r326600,r326616,r326671,r326707,r326708,r326709,r326710,r326711, r326712,r326714,r326720,r326768,r326772,r326784,r326792,r326812,r326854, r326855,r326856,r326858,r326886,r326887,r326914,r326926,r326927,r326960, r326961,r326962,r326963,r327351,r327453,r327390,r327523,r327524,r326489, r327880,r328437,r328438,r328439,r328441,r328446,r328448,r328449,r328612, r328613,r328615
While here, undo our libfdt hack of not including <stdlib.h> if we're compiling _STANDALONE.
r324844: When building standalone, don't define errno. Let the definition from stand.h override. This is similar to what we do in the kernel.
r326089: loader.efi: efipart does not recognize partitionless disks
r326090: net_parse_rootpath() has no parameters
r326143: Fix theoretical integer overflow issues. If the product here is
r326144: Mark the func pointer as __dead2. It looks up loader_main, which
r326182: Modify all FreeBSD bootloaders on PowerPC AIM (Book-S) systems
r326384: Use const pointers to avoid casting away constness.
r326421: loader.efi: efipart should exclude iPXE stub block protocol
r326440: Remove stale dependency on ufsread.c
r326441: Minor flags cleanup
r326442: Cleanup CFALGS usage here
r326443: We don't need both _STAND and _STANDALONE, use the latter.
r326444: Move geli to common DO32 stuff
r326445: Fix random() and srandom() prototypes to match the standard.
r326446: Undefine _STANDALONE since this is test code.
r326447: Tweaks to the beri boot loader so that it builds w/o warnings.
r326448: Fix all warnings related to geli and ZFS support on x86.
r326484: Const poison the propname.
r326485: Delcare md_load in libofw.h. Make all prototypes match for ofw
r326486: Include machine/md_var to pick up __syncicache prototype.
r326487: Cast mdp (a vm_offset_t) to void * to match prototype.
r326488: e_entry can be smaller than a pointer. Cast it to an intptr_t
r326490: Declare our strange brand of main().
r326491: Disconnet ps3 from the build. There's too many warnings to fix.
r326492: Cast void * pointer to char * so the arg matches the %s format.
r326493: Provide a md_load64 prototype.
r326494: Mark two things as unused (since they are only sometimes used)
r326495: Now it's safe to bump WARNS to 1.
r326504: Switch to proper MK_LOADER_GELI tests.
r326507: increase maximum size of zfsboot
r326509: loader.efi: add note about iPXE into the efipart.c
r326584: When building standalone, include stand.h rather than the kernel
r326585: Include ficl.h before anything else
r326586: No need to include the userland md5.h, the kernel one is just fine.
r326587: Use the kernel relative paths, rather than the userland relative paths
r326588: Need to include skein in the include path
r326589: Make sure we include the right path for skein.h
r326590: Prefer stdint.h to inttypes.h
r326591: This isn't NetBSD specific code. Include these for any kernel /
r326592: Don't inherit CFLAGS. This a specialized test program.
r326593: Stop building with the standard system headers.
r326594: Now that we offer a semi-sane standards-ish set of #include files, stop hacking includes with sed.
r326600: Since this is contrib code, create an upstreamable version of my
r326616: dhcp_try_rfc1048() is not used any more
r326671: Avoid setting -Wno-tentative-definition-incomplete-type with gcc.
r326707: Add partial support signal.h functioanlity. Pull in machine/signal.h
r326708: Remove _KERNEL hack now that errno.h does the right thing when built standalone.
r326709: Provide implementations for iscntrl, ispunct and isgraph.
r326710: Put the files we're copying over into a few variables and clean hings up.
r326711: Const poison a couple of interfaces.
r326712: Create interp class.
r326714: boot1.c needs EFI_ZFS_BOOT too, so add it globally.
r326720: This path belongs in ficl/Makefile, not the common defines for users
r326768: Fix a comment to be more accurate
r326772: Fix regression with lua import
r326784: Revert part of 362772. It was causing problems for includes
r326792: Attempt to unbreak buildworld
r326812: Revert r326792, r326784, r326772, r326712
r326854: libefi: make efichar.h more usable in stand code
r326855: Cargo cut a fix for the regressions r326585 caused.
r326856: Fix comments after bump in size.
r326858: Revert r326855: Cargo cut a fix for the regressions r326585 caused.
r326886: Panic in sbrk if setheap hasn't been called yet. This is preferable o a mysterious crash
r326887: Remove the 'mini libstand in libstand' that util.[ch] provided.
r326914: Move loader-only defines to loader.mk from defs.mk
r326926: Move loader help file definitions to being 100% inside of loader.mk.
r326927: libficl is only ever used in a loader (never a boot) program. Move it.
r326960: Simplify things a little. The RETURN macro isn't required.
r326961: Interact is always called with NULL. Simplify code a little
r326962: Hoist btx include stuff to i386/Makefile.inc
r326963: No need to use relative paths like this here.
r327351: Fix ubldr. uboot/lib uses defines for the loader.
r327453: Add a validbcd() routine that uses the bcd2bin_data[] array
r327390: Garbage-collect loader.ps3. It is currently disconnected from the build and kboot replaces.
r327523: Don't clobber system LDFLAGS for beri boot loaders.
r327524: Use 'extern uint8_t' instead of 'extern void' for external symbols.
r326489: Allow this file to be used in libsa without warning...
r327880: Move getsecs() prototype to stand.h from net.h so it can be used
r328437: Split panic routine
r328438: Implement abort() as a call to panic.
r328439: Provide abs form stdlib.h.
r328441: abort() should be marked __dead2 since it won't return.
r328446: Now that exit is __dead2, we need to tag ub_exit() as __dead2.
r328448: Make exit() never return until host_exit can be written.
r328449: Tag unreachable places as such. I left the while (1); in place
r328612: Move strtold wrapper from strtol.c to its own strtold.c.
r328613: Kill copies of strtol and strtoul.
r328615: Update stand.h for changes for strto*l
PR: 223969 |
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. |
329140 |
11-Feb-2018 |
kevans |
MFC Loader Fixes 2017q4p6: r324649,r324650,r324651,r324652,r324653,r324654, r324700,r324702,r324709,r324717,r324719,r324841,r324842,r324843,r324845, r324850,r324876,r324877,r324878,r324879,r324880,r324881,r324883,r324980, r324981,r324982,r324995,r325014,r325093,r325094,r325114,r325170,r325171, r325172,r325173,r325174,r325175,r325176,r325248,r325286,r325310,r325332, r325338,r325339,r325376,r325377,r325379,r325380,r325382,r325478,r325479, r325480,r325482,r325483,r325484,r325485,r325556,r325641,r325681,r325685, r325686,r325687,r325688,r325689,r325690,r325691,r325692,r325693,r325694, r325743,r325744,r325748,r325775,r325779,r325780
r324649: Move common/Makefile.inc to sys/boot/loader.mk.
r324650: tweak style
r324651: create defs.mk for common definitions
r324652: Move all the ficl common code into ficl.mk
r324653: LOADER_foo_SUPPORTED
r324654: Explicitly inlcude SYSDIR in the include path
r324700: loader: initialize dv_cleanup in md.c to eliminate clang warning
r324702: We need to include disk.o in libuboot.a when we're building with support for disk access.
r324709: Revert "Unify boot1 with loader" change r324646
r324717: libsa/ip.c: misplaced comment, ip_v is half char, not ip_p
r324719: libsa/ip: stop read loop on bad fragments
r324841: Use BOOTDIR more consistently in defs.mk rather than repeat sys/boot.
r324842: Introduce BOOTOBJ: The top level object directory for the boot tree
r324843: Stopgap fix to the mistmatch between LOADER_GELI_SUPPORT and LOADER_NO_GELI_SUPPORT.
r324845: Use BOOTOBJ and BOOTDIR to find geli includes and libraries.
r324850: Define LIBSA32 to LIBSA on i386 to fix build.
r324876: Move fdt and uboot defines into common uboot.mk.
r324877: End source directories with SRC rather than a hodgepodge of names
r324878: Make at91 boot loader compile again.
r324879: Prefer SRCTOP paths for bits we're grabbing from libc.
r324880: Use BOOTSRC here.
r324881: Use SYSDIR instead of ${.CURDIR}/../..<etc>/sys.
r324883: Use preferred defined paths, rather than relative paths in fdt.
r324980: Use BOOTDIR consistently.
r324981: Move BINDIR definition to defs.mk, and override where it isn't /boot
r324982: Remove sys/boot/arm/at91 and ixp425
r324995: loader.efi: Make framebuffer commands available for arm64
r325014: Add a 'place holder' arm struct efi_fb until a real one comes
r325093: Define new EFI variables
r325094: Cleanup non-arch Makefiles
r325114: Use defs.mk defins in most MD code
r325170: Use defs.mk values for userboot
r325171: Use defs.mk name and prefer bsd.init.mk
r325172: Remove the -nostdlib stuff I added. Instead, fix LDFLAGS to be honored correctly with the new Makefile.inc include order.
r325173: We don't need to build a special ficl for userboot.
r325174: Minor cleanup
r325175: For amd64, compile both zfs and zfs32 libraries.
r325176: Actually add zfs32/Makefile
r325248: loader ptblread() is broken with >512B sectors
r325286: efipart_strategy is using wrong offset with >512B sectors
r325310: zfs.c:vdev_read() needs to be careful about large sectors
r325332: loader: re-enable gzip support for x86
r325338: loader: fix BOOTSRC -> BOOTOBJ in a library path
r325339: This used to have bzip2 support too.
r325376: WIP: centralize machine links
r325377: mostly libsa
r325379: Revert "mostly libsa"
r325380: Revert "WIP: centralize machine links"
r325382: Cleanup stray libstand names to be libsa names.
r325478: Powerpc is a 32-bit boot loader.
r325479: Define LIBFICL32 to be libficl.a on i386 and libficl32.a on amd64.
r325480: Use DO32 for all the places that we need to flag we're building a 32-bit version of a library.
r325482: Move machine and other link creation to defs.mk
r325483: MACHINE can never be powerpc64, so cleanup code that thinks it can.
r325484: Prefer bsd.init.mk to src.opts.mk
r325485: Centralize all 32-bit builds on 64-bit platform stuff.
r325556: loader: set options before including bsd.init.mk
r325641: loader.efi: efi_devpath_is_prefix should return bool
r325681: boot1: avoid using NULL device path
r325685: libsa32 isn't needed for i386. It's already a 32-bit platform.
r325686: Simplify this if to a direct assignment.
r325687: Remove all the empty help files from the powerpc build.
r325688: FDT support doesn't make sense for ps3, remove it.
r325689: Remove LOADER_FDT_SUPPORT as a Makefile variable.
r325690: Remove LOADER_ZFS_SUPPORT as a Makefile variable
r325691: Remove useless PNP define here.
r325692: Replace LOADER_FIREWIRE_SUPPORT variable
r325693: Move LOADER_{NO,}_GELI_SUPPORT to MK_LOADER_GELI
r325694: Install the 4th files in sys/boot/forth instead of each loader
r325743: Make sure the proper loader.rc gets installed.
r325744: boot1: also check for NULL device
r325748: Use proper include file.
r325775: Add loader.conf to the list of files that are MD.
r325779: Add /boot/dts to the list of default modules.
r325780: Don't add /boot/dt*s* but /boot/dt*b*. Stupid think-o. |
329134 |
11-Feb-2018 |
kevans |
MFC Loader Fixes 2017q4p4: r324552,r324553,r324554,r324555,r324556
r324552: Kill the userboot copy of libstand.
r324553: Rename libstand.a to libsa.a and libstand32.a to libsa32.a
r324554: Move crc32.c, util.c and gpt.c over to libsa.
r324555: Honor CFLAGS modifications in Makefile.inc by using += here.
r324556: Move ufsread.c |
329129 |
11-Feb-2018 |
kevans |
MFC Loader Fixes 2017q4p1: r324321,r324359,r324360,r324388,r324449,r324450, r324451,r324452
r324321: This README file was quite relevant for FreeBSD 3 or 4. No more.
r324359: Add efi_devpath_is_prefix
r324360: Encapsulate ZFS preferences into efi_zfs_is_preferred
r324388: Unbreak building efiboot with MK_ZFS == no
r324449: Prefer ${LIBSTAND} to -lstand
r324450: Define SASRC and use it
r324451: Add missing -I${SASRC} in a couple of places so that stand.h doesn't accidentally come in via host pollution.
r324452: Define LIBSA* and use them instead of overloaded LIBSTAND |
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 |
329011 |
08-Feb-2018 |
kevans |
MFC r307322,r307323,r307324,r307326,r307327,r307338,r307879,r307908,r307911, r307942,r307950,r307951,r307954,r307955,r308125,r308195,r308476,r308534, r308535,r308776,r308843,r310236,r310726: Loader fixes, 2016q4
r307322: Remove /boot/boot.conf, deprecated for 16 years
r307323: Remove fetching of pInterp.
r307324: Create a new linker set, Xficl_compile_set which contains a list of functions to call to register new forth words.
r307326: In UEFI mode expose the SMBIOS anchor base address via kenv
r307327: Update i386 build of loader.efi (but leave it disabled) so that we at least build it now.
r307338: Create a pcibios-version environment FORTH word.
r307879: Preliminary support for EFI in boot loader.
r307908: Fix the build on both arm64 and when WITHOUT_FORTH is defined.
r307911: Add better comment...
r307942: Really make WITHOUT_FORTH (MK_FORTH==no) work.
r307950: Add it (Makefile.ficl) to the right place
r307951: Fix two backwards tests.
r307954: Back out the move to the loader script from -N.
r307955: LIBSTAND goes last, so put it last here too.
r308125: In loader.efi, instead of exiting directly, try to fallback.
r308195: efinet_dev_print should honor verbose option.
r308476: boot/forth spelling issue in forth word
r308534: The file_loadraw function grew an argument, update install function
r308535: Add support for LOADER_RC setting in the pkgfs manifes
r308776: loader: zfs toplevel vdev must have spa set.
r308843: loader: smbios version check is not correct
r310236: Renumber license clauses to avoid skipping #3
r310726: cdboot: add explict suffix to ambiguous or instruction
PR: 214375 |
329010 |
08-Feb-2018 |
kevans |
MFC r303555,r303556,r303936,r303962,r304317,r304532,r305026,r305107,r305132, r305178,r305353,r305814,r306159,r306380,r306504: Loader fixes, 2016q3
r303555: bcache should support reads shorter than sector size
r303556: Improve boot loader quote parsing
r303936: Add kernel environment variables under smbios.system
r303962: Add the missing space between .asciz directive and opening quote for some lines with #ifdef BTXLDR_VERBOSE/#endif
r304317: boot1.efi Free() should check for NULL to provide consistent behavior
r304532: Replace sprintf -> snprintf for command_errbuf provisioned from dynamic content.
r305026: Emulate efi_cons_poll when WaitForKey is not available
r305107: Create a hook 'post-initialize' for people that want to define something to read in .conf files after all other .conf files for the purpose of overriding.
r305132: Remove accidentally committed stray comment.
r305178: bd_int13probe() should check extended info if sector info is bad
r305353: Don't use -N to set the OMAGIC with data and text writeable and data not page aligned.
r305814: ufsread: Do not cast struct direct from void *
r306159: Consistently declare getsecs(void) with proper return type and void when no arguments are present.
r306380: loader command interpreter should reset command_errmsg
r306504: Fix a cluster of bugs in list EFI environment variables
PR: 204602, 211958, 211958 Relnotes: yes ("Improve boot loader quote parsing") |
328866 |
05-Feb-2018 |
kevans |
MFC r304321,304753,304754,306751,316077,316110: SHA512, skein, large block support for loader zfs
MFC r304321: Add SHA512, skein, large blocks support for loader zfs. MFC r304753: loader: zio_checksum_verify() must test spa for NULL pointer MFC r304754: r304321 broken bhyve zvol VM bhyveload hang 100% WCPU MFC r306751: Disable loop unrolling in skein for sys/boot MFC r316077: Unbreak compilation with gcc 4.2.1 MFC r316110: Use `-Wno-missing-declarations` with CWARNFLAGS for skein.c |
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 |
297283 |
26-Mar-2016 |
bdrewery |
Implement (ACFLAGS|CFLAGS|CXXFLAGS).SRC globally.
Sponsored by: EMC / Isilon Storage Division
|
297154 |
21-Mar-2016 |
bdrewery |
DIRDEPS_BUILD: Update dependencies.
Sponsored by: EMC / Isilon Storage Division
|
296963 |
16-Mar-2016 |
allanjude |
Implement GELI (AES-XTS and AES-CBC only) in gptboot and gptzfsboot
Allows booting from a GELI encrypted root file system, via UFS or ZFS
Reviewed by: gnn, smh (previous version), delphij (previous version) Relnotes: yes Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D4593
|
296706 |
11-Mar-2016 |
bdrewery |
Add more .NOMETA missed in r291320
Sponsored by: EMC / Isilon Storage Division
|
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
|
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
|
291563 |
01-Dec-2015 |
bdrewery |
META MODE: Update dependencies with 'the-lot' and add missing directories.
This is not properly respecting WITHOUT or ARCH dependencies in target/. Doing so requires a massive effort to rework targets/ to do so. A better approach will be to either include the SUBDIR Makefiles directly and map to DIRDEPS or just dynamically lookup the SUBDIR. These lose the benefit of having a userland/lib, userland/libexec, etc, though and results in a massive package. The current implementation of targets/ is very unmaintainable.
Currently rescue/rescue and sys/modules are still not connected.
Sponsored by: EMC / Isilon Storage Division
|
289031 |
08-Oct-2015 |
cperciva |
Change gptldr from relocating 0xfff1 bytes of boot2 to relocating 0x20000 bytes of boot2. Since we're in 16-bit mode, we can't copy all 128kB at once; instead we loop four times and copy 32 kB each time.
This change was made necessary by an upcoming increase in the size of the boot2 binary; should it increase further, the COPY_BLKS value can be adjusted without anyone needing to remember 8086 assembly language again.
Requested by: allanjude Tested by: allanjude MFC after: 1 week
|
280980 |
02-Apr-2015 |
dim |
Ensure the cross assembler, linker and objcopy are used for the build32 stage, just like for the regular world stage.
Reviewed by: rodrigc, imp, bapt, emaste MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D2187
|
272785 |
09-Oct-2014 |
marcel |
Properly NUL-terminate the on-stack buffer for reading /boot.config or /boot/config. In qemu, on a warm boot, the stack is not all zeroes and we parse beyond the file's contents.
Obtained from: Juniper Networks, Inc.
|
267293 |
09-Jun-2014 |
joel |
mdoc: fix AUTHORS section.
|
261567 |
06-Feb-2014 |
emaste |
Build a 32-bit libstand under sys/boot/
A 32-bit libstand is needed on 64-bit platforms for use by various bootloaders. Previously only the 32-bit version was built, installed as /usr/lib/libstand.a.
A new 64-bit libstand consumer will arrive in the near future, so move the bootloader-specific 32-bit version to sys/boot/libstand32/.
Explicitly link against this version in the 32-bit loaders.
Sponsored by: The FreeBSD Foundation
|
261522 |
05-Feb-2014 |
wblock |
Describe the use of a freebsd-boot GPT partition, brought up by Scot Hetzel <swhetzel@gmail.com> on the -doc mailing list.
Also modify the Author section to be clear that I wrote the man page, not gptboot.
MFC after: 3 days
|
260334 |
05-Jan-2014 |
dim |
Split the last gcc-specific flags off into CFLAGS.gcc. This also removes the need to use -Qunused-arguments for clang throughout the tree.
MFC after: 3 days
|
260095 |
30-Dec-2013 |
dim |
For sys/boot/i386 and sys/boot/pc98, separate flags to be passed directly to the linker (LD_FLAGS) from flags passed indirectly, via the compiler driver (LDFLAGS).
This is because several Makefiles under sys/boot/i386 and sys/boot/pc98 use ${LD} directly to link, and the normal LDFLAGS value should not be used in these cases.
MFC after: 3 days
|
252586 |
03-Jul-2013 |
wblock |
Add descriptions to the FILES list, fix some mdoc complaints, move the "neither" entry out of the table in BOOTING.
Submitted by: joeld Reviewed by: joeld MFC after: 1 week
|
252492 |
01-Jul-2013 |
wblock |
Add a new gptboot(8) man page. Factor out the redundant information in gpart(8) and boot(8), adding references to gptboot(8) in both.
Reviewed by: jhb, ae, pjd, Paul Schenkeveld <bsdcan@psconsult.nl>, david_a_bright@dell.com (portions), gjb MFC after: 1 week
|
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
|
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
|
232263 |
28-Feb-2012 |
dim |
Define several extra macros in bsd.sys.mk and sys/conf/kern.pre.mk, to get rid of testing explicitly for clang (using ${CC:T:Mclang}) in individual Makefiles.
Instead, use the following extra macros, for use with clang: - NO_WERROR.clang (disables -Werror) - NO_WCAST_ALIGN.clang (disables -Wcast-align) - NO_WFORMAT.clang (disables -Wformat and friends) - CLANG_NO_IAS (disables integrated assembler) - CLANG_OPT_SMALL (adds flags for extra small size optimizations)
As a side effect, this enables setting CC/CXX/CPP in src.conf instead of make.conf! For clang, use the following:
CC=clang CXX=clang++ CPP=clang-cpp
MFC after: 2 weeks
|
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
|
225530 |
13-Sep-2011 |
avg |
gpt/zfs boot blocks: reduce optimizing CFLAGS to -O1
gpt and zfs boot blocks are not nearly as size-constrained as boot2 from which they inherited their current optimization and anti-optimization options. As such the current options do not provide any benefit, but make debugging of the code much harder. Also, it has been demonstrated that combination of -mrtd and -fno-unit-at-a-time may result in mis-compilation of the boot code with the current base gcc.
Additionally, intermediate assembly file filtering is removed for zfsboot.
The new boot blocks are all compile- and boot- tested using qemu. gptzfsboot is tested with real hardware.
Reported by: Peter Jeremy <peterjeremy@acm.org> [miscompilation] Discussed with: bde, jhb Tested by: Sebastian Chmielewski <chmielsster@gmail.com> [gptzfsboot] Approved by: re (kib) MFC after: 3 weeks
|
219483 |
11-Mar-2011 |
jhb |
Remove all object files during 'make clean'.
PR: kern/154888 Submitted by: arundel MFC after: 1 week
|
219079 |
27-Feb-2011 |
dim |
Clang's integrated assembler can now handle sys/boot/i386/boot2/sio.S. It used to choke on the notation "inb (%dx),%al" for "inb %dx,%al"; GNU as accepts both forms. Which notation is more 'correct' is an open question. :)
|
218893 |
20-Feb-2011 |
dim |
Upgrade our copy of llvm/clang to r126079, from upstream's trunk.
This contains many improvements, primarily better C++ support, an integrated assembler for x86 and support for -pg.
|
217028 |
05-Jan-2011 |
dim |
Remove superfluous -mno-(mmx|3dnow|sse|sse2|sse3) flags in Makefiles under sys/boot/{i386,pc98}, since these are already added via sys/boot/{i386,pc98}/Makefile.inc.
Submitted by: arundel
|
213568 |
08-Oct-2010 |
pho |
Ensure that a make from sys/boot does not pick up include files from /usr/include.
Discussed with: kib
|
213136 |
24-Sep-2010 |
pjd |
- Split code shared by almost any boot loader into separate files and clean up most layering violations:
sys/boot/i386/common/rbx.h:
RBX_* defines OPT_SET() OPT_CHECK()
sys/boot/common/util.[ch]:
memcpy() memset() memcmp() bcpy() bzero() bcmp() strcmp() strncmp() [new] strcpy() strcat() strchr() strlen() printf()
sys/boot/i386/common/cons.[ch]:
ioctrl putc() xputc() putchar() getc() xgetc() keyhit() [now takes number of seconds as an argument] getstr()
sys/boot/i386/common/drv.[ch]:
struct dsk drvread() drvwrite() [new] drvsize() [new]
sys/boot/common/crc32.[ch] [new]
sys/boot/common/gpt.[ch] [new]
- Teach gptboot and gptzfsboot about new files. I haven't touched the rest, but there is still a lot of code duplication to be removed.
- Implement full GPT support. Currently we just read primary header and partition table and don't care about checksums, etc. After this change we verify checksums of primary header and primary partition table and if there is a problem we fall back to backup header and backup partition table.
- Clean up most messages to use prefix of boot program, so in case of an error we know where the error comes from, eg.:
gptboot: unable to read primary GPT header
- If we can't boot, print boot prompt only once and not every five seconds.
- Honour newly added GPT attributes:
bootme - this is bootable partition bootonce - try to boot from this partition only once bootfailed - we failed to boot from this partition
- Change boot order of gptboot to the following:
1. Try to boot from all the partitions that have both 'bootme' and 'bootonce' attributes one by one. 2. Try to boot from all the partitions that have only 'bootme' attribute one by one. 3. If there are no partitions with 'bootme' attribute, boot from the first UFS partition.
- The 'bootonce' functionality is implemented in the following way:
1. Walk through all the partitions and when 'bootonce' attribute is found without 'bootme' attribute, remove 'bootonce' attribute and set 'bootfailed' attribute. 'bootonce' attribute alone means that we tried to boot from this partition, but boot failed after leaving gptboot and machine was restarted. 2. Find partition with both 'bootme' and 'bootonce' attributes. 3. Remove 'bootme' attribute. 4. Try to execute /boot/loader or /boot/kernel/kernel from that partition. If succeeded we stop here. 5. If execution failed, remove 'bootonce' and set 'bootfailed'. 6. Go to 2.
If whole boot succeeded there is new /etc/rc.d/gptboot script coming that will log all partitions that we failed to boot from (the ones with 'bootfailed' attribute) and will remove this attribute. It will also find partition with 'bootonce' attribute - this is the partition we booted from successfully. The script will log success and remove the attribute.
All the GPT updates we do here goes to both primary and backup GPT if they are valid. We don't touch headers or partition tables when checksum doesn't match.
Reviewed by: arch (Message-ID: <20100917234542.GE1902@garage.freebsd.pl>) Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com MFC after: 2 weeks
|
211677 |
23-Aug-2010 |
imp |
MF tbemd: Minor tweaks, prefer MACHINE_CPUARCH generally to MACHINE_ARCH
|
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
|
200310 |
09-Dec-2009 |
jhb |
Fix a confusing typo in the EDD packet structure used in gptboot and gptzfsboot. I got the segment and offset fields reversed in the structure, but I also succeeded in crossing the assignments so the actual EDD packet ended up correct.
MFC after: 1 week
|
196326 |
17-Aug-2009 |
jhay |
Fix parse() so that the partition to boot (load /boot/loader) from can be set. The syntax as printed in main() is used: 0:ad(0p3)/boot/loader
Reviewed by: jhb Approved by: re (kib)
|
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
|
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
|
173957 |
26-Nov-2007 |
jhb |
Add a note to indicate that these files do borrow in part from mbr.s and boot1.S
Requested by: rnordier
|
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
|
173026 |
26-Oct-2007 |
jhb |
Add . to the include path so that we follow the 'machine' symlink we create during depend on amd64.
Reported by: rwatson
|
172940 |
24-Oct-2007 |
jhb |
First cut at support for booting a GPT labeled disk via the BIOS bootstrap on i386 and amd64 machines. The overall process is that /boot/pmbr lives in the PMBR (similar to /boot/mbr for MBR disks) and is responsible for locating and loading /boot/gptboot. /boot/gptboot is similar to /boot/boot except that it groks GPT rather than MBR + bsdlabel. Unlike /boot/boot, /boot/gptboot lives in its own dedicated GPT partition with a new "FreeBSD boot" type. This partition does not have a fixed size in that /boot/pmbr will load the entire partition into the lower 640k. However, it is limited in that it can only be 545k. That's still a lot better than the current 7.5k limit for boot2 on MBR. gptboot mostly acts just like boot2 in that it reads /boot.config and loads up /boot/loader. Some more details: - Include uuid_equal() and uuid_is_nil() in libstand. - Add a new 'boot' command to gpt(8) which makes a GPT disk bootable using /boot/pmbr and /boot/gptboot. Note that the disk must have some free space for the boot partition. - This required exposing the backend of the 'add' function as a gpt_add_part() function to the rest of gpt(8). 'boot' uses this to create a boot partition if needed. - Don't cripple cgbase() in the UFS boot code for /boot/gptboot so that it can handle a filesystem > 1.5 TB. - /boot/gptboot has a simple loader (gptldr) that doesn't do any I/O unlike boot1 since /boot/pmbr loads all of gptboot up front. The C portion of gptboot (gptboot.c) has been repocopied from boot2.c. The primary changes are to parse the GPT to find a root filesystem and to use 64-bit disk addresses. Currently gptboot assumes that the first UFS partition on the disk is the / filesystem, but this algorithm will likely be improved in the future. - Teach the biosdisk driver in /boot/loader to understand GPT tables. GPT partitions are identified as 'disk0pX:' (e.g. disk0p2:) which is similar to the /dev names the kernel uses (e.g. /dev/ad0p2). - Add a new "freebsd-boot" alias to g_part() for the new boot UUID.
MFC after: 1 month Discussed with: marcel (some things might still change, but am committing what I have so far)
|
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
|
169732 |
19-May-2007 |
kan |
Tweak inlining parameters a little. Add warning to tell us if function we declared as inline can not be inlined.
|
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>
|
148046 |
15-Jul-2005 |
ache |
Add -mno-sse3 for prescott/nocona
|
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
|
143661 |
15-Mar-2005 |
obrien |
Ensure GCC does not use FP registers in integer code. I think all we really need is -fno-sse2. I really don't like cluttering up the compiler invocation, but this bigger hammer will fix reported problems for now.
|
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
|
134382 |
27-Aug-2004 |
yar |
B1FLAGS -> BOOT_BOOT1_FLAGS, which is consistent with naming of other boot-related make vars.
|
132870 |
30-Jul-2004 |
kan |
Compile boot2 with -fno-unit-at-a-time. GCCs aggressive optimization breaks boot in spectacular ways otherwise.
|
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
|
125932 |
17-Feb-2004 |
ru |
Re-add sio.S, and properly deal with assembler files.
Repocopied by: joe
|
125621 |
09-Feb-2004 |
ru |
- Factor out -nostdlib to an upper level Makefile.inc.
- Now that bsd.prog.mk deals with programs linked with -nostdlib better, and has a notion of an "internal" program, use PROG where possible. This has a good impact on the contents of .depend files and causes programs to be linked with cc(1).
XXX: boot2 couldn't be converted as it's actually two programs.
Tested on: i386, amd64
|
125581 |
07-Feb-2004 |
ru |
Argh, unbreak "make depend" for AMD64.
Reported by: kris
|
125566 |
07-Feb-2004 |
ru |
- Removed -elf which is not a valid gcc(1) option anymore. - Removed -ffreestanding; it's enforced by ../Makefile.inc.
|
125564 |
07-Feb-2004 |
ru |
Generate .depend file.
|
125556 |
07-Feb-2004 |
ru |
Untangle building of AMD64 boot code.
Tested on: amd64 (sledge)
|
125537 |
06-Feb-2004 |
ru |
First round of cleanups to sys/boot/ makefiles:
- do not use PROG for what's not a real C program, - use sys.mk transformation rules where possible, - only create the "machine" symlink on AMD64, - removed MAINTAINER lines in individual makefiles, - added the LIBSTAND defitinion to <bsd.libnames.mk>, - somewhat better contents in .depend files.
Tested on: i386, amd64 Prodded by: bde
|
125517 |
06-Feb-2004 |
ru |
Inherit BINDIR from a parent Makefile.inc.
|
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.
|
116864 |
26-Jun-2003 |
peter |
Build on amd64. Yes, I know this isn't particularly nice.
|
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.
|
111490 |
25-Feb-2003 |
ru |
Fixed CLEANFILES.
Submitted by: cron
|
109886 |
26-Jan-2003 |
phk |
Build a file "boot" which consists of boot1 and boot2 concatenated.
There is little if any reason to treat the two components separately and it will simplify disklabel(8) and libdisk if we didn't.
|
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
|
108149 |
21-Dec-2002 |
obrien |
-mno-align-long-strings can make things smaller, so lets use it in hopes that it does here.
|
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
|
108016 |
18-Dec-2002 |
imp |
I didn't intend to delete this rm from the Makefile. It snuck in at 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
|
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.
|
107879 |
14-Dec-2002 |
phk |
Employ the unused bytes after the disklabel in the second sector. This makes it possible to make UFS1_ONLY and UFS2_ONLY versions which fit inside the traditional 16 sectors.
Remove assorted now unneeded hackery.
UFS1_AND_UFS2 still needs another 150 bytes to work, and that is probably not within our reach, ever.
|
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.
|
104683 |
08-Oct-2002 |
jhb |
Revert MEM_USR back to 0xa000 for BTX clients. Instead, adjust boot2 to run at 0xc000 by changing its virtual start address from 0x1000 to 0x2000.
Tested by: phk
|
104680 |
08-Oct-2002 |
phk |
Now that ufsread.c doesn't do 64bit divide remainder operations, don't bother with libkern.
Sponsored by: DARPA & NAI Labs.
|
104679 |
08-Oct-2002 |
phk |
Save a couple of bytes by not returning ints nobody care about.
Sponsored by: DARPA & NAI labs
|
104673 |
08-Oct-2002 |
green |
Reinstate rev 1.36 with an important line that got missed. Note this also improves the "random undocumented offsets into various memory spaces" a little bit.
|
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.
|
104668 |
08-Oct-2002 |
phk |
Unbreak boot2 by backing out rev 1.36 to Makefile, which does not work as advertised:
bang# pwd /bang/src/sys/boot/i386/boot2 bang# make clean >& /dev/null bang# cvs -q update -r 1.35 Makefile >& /dev/null bang# make >& /dev/null bang# cat /usr/obj/`pwd`/boot2.h #define XREADORG 0x725 bang# cvs -q update -r 1.36 Makefile > & /dev/null bang# make clean > & /dev/null bang# make > & /dev/null bang# cat /usr/obj/`pwd`/boot2.h #define XREADORG 0x25 bang#
|
104666 |
08-Oct-2002 |
phk |
Save four bytes by shortening a string two chars.
Sponsored by: DARPA & NAI Labs.
|
104636 |
07-Oct-2002 |
green |
Correct a bug in adding 0x700 to a number.
|
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.
|
104632 |
07-Oct-2002 |
phk |
Change the comment character from # to // in boot1.s and run it through CPP so we can conditionalized things.
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.
|
104612 |
07-Oct-2002 |
phk |
Move the definition of UFS1_ONLY into the Makefiles where it belongs.
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
|
100872 |
29-Jul-2002 |
ru |
Drop support for COPY, -c has been the default mode of install(1) for a long time now.
Approved by: bde
|
98556 |
21-Jun-2002 |
phk |
Revert the part of Kirks UFS2 commit which added divdi3.c and moddi3.c to libi386, this issue was resolved already in a cleaner way.
|
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>
|
97867 |
05-Jun-2002 |
phk |
Add explicit dependency on ufsread.c
|
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.
|
96533 |
13-May-2002 |
ru |
Align CLEANFILES with revision 1.25 changes.
|
96460 |
12-May-2002 |
bde |
Saved 176 bytes by compiling with -fno-guess-branch-probability. The default of -fguess-branch-probablility causes time optimizations (?) like rewriting `if (foo) x++;' as `if (!foo) goto forth; back: ; ...; forth: x++; goto back;". This is pessimizes space especially well on i386's because one short branch gets converted to 2 long ones.
Removed -fno-align-foo since it is implied by -Os. Previous commit messages seem to have overstated the new alignment bugs in gcc. The only case that affects boot2 is that -fno-align-functions (or equivalently -falign-functions=1) actually gives -falign-functions=2. This is caused by FUNCTION_BOUNDARY being 2 (bytes) instead of 1. The default case where the optimization level is 1 and no alignment options are given is more broken. All alignments are minimal, modulo the bug in FUNCTION_BOUNDARY. This is caused by toplev.c setting defaults too early.
Some hacks in previous commits ar not needed now, but may as well be kept until gcc is fixed. The previous on in the Makefile saved 96 bytes of text due to the wrong FUNCTION_BOUNDARY and 32 bytes of data due to unrelated bloat in the alignment of large objects. There aren't even any options to control alignment of data.
|
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.
|
96327 |
10-May-2002 |
jhb |
- Axe -mpreferred-stack-boundary=2 as -Os turns this on by default. - Axe -fdata-sections as turning it on or off makes no difference. If it did make a difference it would serve to bloat boot2 even further with extra padding. - Axe -fforce-addr. This gets us 32 bytes so we are down to only being 64-bytes over.
We still can't compile this with gcc 3.1. The problem seems to be that the -fno-align-foo options don't actually work. Comparing the new and old output it turns out that gcc is 4-byte padding all the functions and labels and what not despite the passed in arguments thus adding the unfortunate bloat to boot2.
|
96306 |
10-May-2002 |
obrien |
-ffreestanding is the word for /sys.
|
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
|
80084 |
21-Jul-2001 |
rnordier |
Unset MAINTAINER.
|
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.
|
66555 |
02-Oct-2000 |
rnordier |
Set MAINTAINER.
|
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.
|
62138 |
26-Jun-2000 |
jhb |
Add in support for EDD to support large disks via LBA. This uses a method similar to that of the loader to avoid potentially breaking older drives in that we only use EDD if the desired cylinder is > 1023.
|
61627 |
13-Jun-2000 |
ru |
Treat \t and \n inside /boot.config as whitespaces.
PR: 19215
|
60821 |
23-May-2000 |
jhb |
Clean up all of the 16-bit assembly code in the x86 bootstrap to work with the new binutils. Now that we have a decent assembler, all the old m4 macros are no longer needed. Instead, straight assembly can be used since as(1) now understands 16-bit addressing, branches, etc. Also, several bugs have been fixed in as(1), allowing boot0.s to be further cleaned up.
|
59150 |
11-Apr-2000 |
jhb |
Add a missing dependency: boot2 depends on the BTX kernel.
|
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
|
53174 |
15-Nov-1999 |
obrien |
Add -fdata-sections, which is a new GCC 2.95 optimization. Remove -fschedule-insns as it wasn't such a big win with 2.95 after all.
Add the *BIG* win "-mpreferred-stack-boundary=2" optimiztion submitted by Dima. GCC 2.95 ensures the stack frame is always properly [opitimally] aligned by surrounding every function call by code simular to "addl $-12, %esp" / "addl $12, %esp". Here we need the reduction in space, with speed not an issue.
|
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.
|
53134 |
13-Nov-1999 |
obrien |
Turn on the -fforce-addr and -fschedule-insns optimizations. Adding either one gives us an additional 32 bytes of additional space available when using EGCS 1.1.2. With GCC 2.95.2 -fforce-addr gives us 12 more bytes, and adding -fschedule-insns gives us an additional 4 bytes.
|
50477 |
28-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
48919 |
20-Jul-1999 |
rnordier |
Reintroduce LBA (cyl > 1023) support in the bootblocks, enabled by means of a build option.
|
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.
|
45334 |
05-Apr-1999 |
rnordier |
Optimize better for space. Thanks to: jdp
|
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.
|
42480 |
10-Jan-1999 |
rnordier |
Use etc/make.conf settings for serial port and speed.
Submitted by: rvb Reviewed by: bde
|
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.
|
40940 |
05-Nov-1998 |
rnordier |
Make use of BIOS int 0x13 extensions configurable, and disabled by default.
|
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.
|
40541 |
20-Oct-1998 |
rnordier |
Make serial port, data format, and bps configurable.
|
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.
|
40416 |
15-Oct-1998 |
rnordier |
Fix path to sio.s
|
40404 |
15-Oct-1998 |
rnordier |
Add serial, dual, and probe-keyboard support.
|
40330 |
14-Oct-1998 |
rnordier |
Fix btx include path.
|
40326 |
14-Oct-1998 |
rnordier |
Include <bsd.prog.mk>. Add install target (to /boot for now).
|
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.
|
40308 |
13-Oct-1998 |
rnordier |
Don't use an absolute path to objcopy. Noticed by: Scott Mace <smace@intt.org>
|
40307 |
13-Oct-1998 |
rnordier |
Improve drive recognition and handling.
|
40269 |
12-Oct-1998 |
rnordier |
New boot blocks: support for /boot/loader; a.out & ELF; cyl > 1023; multiple 0xa5 slices; etc.
|