370511 |
04-Sep-2021 |
git2svn |
pxeboot: improve and simplify rx handling
This pushes the bulk of the rx servicing into a single loop that's only slightly convoluted, and it addresses a problem with rx handling in the process. If we hit a tx interrupt while we're processing, we'd previously drop the frame on the floor completely and ultimately timeout, increasing boot time on particularly busy hosts as we keep having to backoff and resend.
After this patch, we don't seem to hit timeouts at all on zoo anymore though loading a 27M kernel is still relatively slow (~1m20s).
Sponsored By: National Bureau of Economic Research Sponsored by: Klara, Inc.
(cherry picked from commit 3daa8e165c661c1b45e759f4997f447384c15446)
Git Hash: c0674b71720bb333cbc2da823e2f67412dc00e78 Git Author: kevans@FreeBSD.org |
367457 |
07-Nov-2020 |
dim |
MFC r344855 (by jhb):
Drop "All rights reserved" from my copyright statements.
Reviewed by: rgrimes Differential Revision: https://reviews.freebsd.org/D19485 |
357496 |
04-Feb-2020 |
tsoome |
MFC r357442:
loader: bc_add can not use any other probes than ah=0x4b
CD boot is broken for some systems since bioscd and biosdisk merge. The issue is that we can not use anything else than int 13 ah=0x4b to query cd information.
The patch does restore the same probe as was originally used in bioscd.c. Additionally extra buffer padding is used to avoid memory corruption caused by some systems.
PR: 234031 Reported by: ultramage and others |
356572 |
09-Jan-2020 |
tsoome |
MFC r356570: loader: bioscd probe can get sector size 0
With buggy BIOS, it may happen we get sector size reported 0 for cd, and then the default 512 is used, which is quite wrong.
PR: 238749 |
346482 |
21-Apr-2019 |
kevans |
MFC r341101, r341231, r341276, r341329, r341433, r341780, r342054-r342055, r342721, r342742, r342840, r343008, r343225
r341101: powerpcspe: Don't crash the loader on ubldr with SPE instructions.
-msoft-float seems to be insufficient for disabling the SPE on powerpcspe. Force it off with -mno-spe as well. This prevents a crash in ubldr on powerpcspe.
r341231: loader: command_bcache() should print unsigned values
All bcache counters are unsigned.
r341276: When handling CMD_CRIT error set command_errmsg to NULL after we dump it out, so that it does not result in error message printed twice.
OK load doodoo can't find 'doodoo' can't find 'doodoo' OK
r341329: loader.efi: fix EFI getchar() for multiple consoles
This fix is ported from illumos (issue #9970), the analysis and initial implementation was done by John Levon.
See also: https://www.illumos.org/issues/9970
Currently, efi_cons_getchar() will wait for a key. While this seems to make sense, the implementation of getchar() in common/console.c will loop across getchar() for all consoles without doing ischar() first.
This means that if we've configured multiple consoles, we can't input into the serial, as getchar() will be sat waiting for input only from efi_console.c
This patch does implement a bit more generic key buffer to support translation of input keys, and we use generic efi_readkey() to reduce duplication from calls from getchar() and poll().
r341433: Move inclusion of src.opts.mk later.
src.opts.mk includes bsd.own.mk. This in turn defines CTFCONVERT_CMD depending on the MK_CTF value. We then set MK_CTF to no, which has no real effect. The solution is to set all the MK_foo values before including src.opts.mk.
This should stop the cdboot binary from exploding in size for releases built WITH_CTF=yes in src.conf.
r341780: powerpc/ubldr: Teach powerpc's ubldr to boot 64-bit kernels
This is just a copy of powerpc/ofw's ppc64_elf_freebsd.c modified to fit ubldr's boot format.
r342054: Print an error message in efi_main.c if we can't allocate memory for the heap
With the default Qemu parameters, only 128MB RAM gets given to a VM. This causes the loader to be unable to allocate the 64MB it needs for the heap. This change makes the cause of the error more obvious.
r342055: Cast error message in efi_main.c to CHAR16* to avoid build error
r342721: loader.efi: update memmap command to recognize new attributes
Also move memory type to string translation to libefi for later use.
r342742: loader.efi: efi variable rework and lsefi command added
This update does add diag and debug capabilities to interpret the efi variables, configuration and protocols (lsefi).
The side effect is that we add/update bunch of related headers.
r342840: Create MK_LOADER_VERBOSE and connect it to ELF_VERBOSE in the loader code.
r343008: Add Dell Chromebook to the list of devices with E820 extmem quirk enabled
Just like for Acer C270 chromebook the E820 extmem workaround is required for FreeBSD to boot on Dell chromebook.
r343225: Unbreak mip64 build after r328437
Add exit and getchar functions to beri/boot2 code. They are required by panic_action functin introduced in r328437
PR: 18498, 204916 |
346476 |
21-Apr-2019 |
kevans |
MFC r341253, r341328, r342619, r342626, r342707, r342785, r342865
r341253: The libstand's panic() appends its own '\n' to the message, so that users of the API don't need to supply one.
r341328: loader: create separate lists for fd, cd and hd, merge bioscd with biosdisk
Create unified block IO implementation in BIOS version, like it is done in UEFI side. Implement fd, disk and cd device lists, this will split floppy devices from disks and will allow us to have consistent, predictable device naming (modulo BIOS issues).
r342619: loader: create bio_alloc and bio_free for bios bounce buffer
We do have 16KB buffer space defined in pxe.c, move it to bio.c and implement bio_alloc()/bio_free() interface to make it possible to use this space for other BIOS calls (notably, from biosdisk.c).
r342626: Add Copyright.
r342707: i386_parsedev() needs to support fd devices
r342785: With buggy int13 ah=15, we can mis-identify the floppy devices.
We have no option than trust INT13 ah=08 return code during the init phase.
r342865: biospci_write_config args were backwards
biospci_write_config args swapped length and value to write. Some hardware coped just fine, while other hardware had issues.
PR: 155441, 234460 |
346475 |
21-Apr-2019 |
kevans |
MFC r339658, r339959, r340047, r340049, r340215
r339658: loader: biosdisk interface should be able to cope with 4k sectors
The 4kn support in current bios specific biosdisk.c is broken, as the code is only implementing the support for the 512B sector size.
This work is building the support for custom size sectors, we still do assume the requested data to be multiple of 512B blocks and we only do address the biosdisk.c interface here.
For reference, see also: https://www.illumos.org/issues/8303 https://www.illumos.org/rb/r/547
As the GELI is moved above biosdisk "layer", the GELI should just work
r339959: loader: issue edd probe before legacy ah=08 and detect no media
while probing for drives, use int13 extended info before standard one and provide workaround for case we are not getting needed information in case of floppy drive.
In case of INT13 errors, there are (at least) 3 error codes appearing in case of missin media - 20h, 31h and 80h. Flag the no media and do not print an error.
r340047: loader: do not probe floppy devices for zfs
The subject is telling it all.
r340049: loader: biosdisk should check if the media is present
The bd_print/bd_open/bd_strategy need to make sure the device does have media, before getting into performing IO operations. Some systems can hung if the device without a media is accessed.
r340215: loader: always set media size from partition.
The disk access is validated by using partition table definitions, therefore we have no need for if statements, just set the disk size.
Of course the partition table itself may be incorrect/inconsistent, but if so, we are in trouble anyhow. |
346474 |
21-Apr-2019 |
kevans |
MFC i386 stand cleanup: r337353-r337354, r337356, r337872, r337878, r337881, r337890-r337891, r338188
r337353: loader: cstyle cleanup for biosdisk.c
Also switch u_int to uint32_t. Also replace "write" by "dowrite". No functional changes intended.
r337354: loader: 337353 did miss to rename 2 write instances
2 write instances got somehow missed.
r337356: loader: bd_open() should cleanup from disk_open() error
Since bd_open() does early increment for reference counter and bcache allocation, it also should undo those in case of the error.
Also remove unused variables rdev, g_err.
r337872: libi386: remove BD_SUPPORT_FRAGS
BD_SUPPORT_FRAGS is preprocessor knob to allow partial reads in bioscd/biosdisk level. However, we already have support for partial reads in bcache, and there is no need to have duplication via preprocessor controls.
Note that bioscd/biosdisk interface is assumed to perform IO in 512B blocks, so the only translation we have to do is 512 <-> native block size.
r337878: libi386: remove bd_read() and bd_write() wrappers
Those wroappers are nice, but do not really add much value.
r337881: libi386: use BD_RD and BR_WR constants
Use BD_RD and BD_WR instead of 0 and 1.
r337890: libi386: small style updates in biosdisk
Use break instead of return in for loop, as done earlier. Insert and remove some blank lines. No functional changes intended.
r337891: libi386: bd_io_workaround() is to be called for reads only
bd_io() can perform either reads or writes, we only need bd_io_workaround() for reads.
r338188: loader: bios loader should allow to chain load a file
The current chain command does accept only device, allow also a file to be used, such as /boot/pmbr or /boot/mbr (or stored third party MBR/VBR block).
Also fix file descriptor leak. |
346473 |
21-Apr-2019 |
kevans |
MFC r337271, r337317: stand: i386: sector calculation fixes
r337271: Some drives report a geometry that is inconsisetent with the total number of sectors reported through the BIOS. Cylinders * heads * sectors may not necessarily be equal to the total number of sectors reported through int13h function 48h.
An example of this is when a Mediasonic HD3-U2B PATA to USB enclosure with a 80 GB disk is attached. Loader hangs at line 506 of stand/i386/libi386/biosdisk.c while attempting to read sectors beyond the end of the disk, sector 156906855. I discovered that the Mediasonic enclosure was reporting the disk with 9767 cylinders, 255 heads, 63 sectors/track. That's 156906855 sectors. However camcontrol and Windows 10 both report report the disk having 156301488 sectors, not the calculated value. At line 280 biosdisk.c sets the sectors to the higher of either bd->bd_sectors or the total calculated at line 276 (156906855) instead of the lower and correct value of 156301488 reported by int 13h 48h.
This was tested on all three of my Mediasonic HD3-U2B PATA to USB enclosures.
Instead of using the higher of bd_sectors (returned by int13h) or the calculated value, this patch uses the lower and safer of the values.
r337317: In r337271, we limited the sector number to the lower of calculated number and CHS based number. However, on some systems, BIOS would report 0 in CHS fields, making the system to think there is 0 sectors.
Add a check before comparing the calculated total with bd_sectors. |
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) |
344378 |
20-Feb-2019 |
kevans |
MFC r336244, r336246-r336247: Standardize boot arg parsing
r336244: Create helper functions for parsing boot args.
boot_parse_arg to parse a single arg boot_parse_cmdline to parse a command line string boot_parse_args to parse all the args in a vector boot_howto_to_env Convert howto bits to env vars boot_env_to_howto Return howto mask mased on what's set in the environment.
All these routines return an int that's the bitmask of the args translated to RB_* flags. As a special case, the 'S' flag sets the comconsole_speed env var. Any arg that looks like a=b will set the env key 'a' to value 'b'. If =b is omitted, 'a' is set to '1'. This should help us reduce the number of redundant copies of these routines in the tree. It should also give a more uniform experience between platforms.
Also, invent a new flag RB_PROBE that's set when 'P' is parsed. On x86 + BIOS, this means 'probe for the keyboard, and if it's not there set both RB_MULTIPLE and RB_SERIAL (which means show the output on both video and serial consoles, but make serial primary). Others it may be some similar concept of probing, but it's loader dependent what, exactly, it means.
These routines are suitable for /boot/loader and/or the kernel, though they may not be suitable for the tightly hand-rolled-for-space environments like boot2.
r336246: Eliminate boot loader copies of boot arg parsing.
Eliminate 4 of the copies of the arg parsing in /boot/laoder by using boot_parse_cmdline.
r336247: Transition to boot_env_to_howto and boot_howto_to_env in the boot loader. |
344377 |
20-Feb-2019 |
kevans |
MFC r336084-r336085, r336118: Move zfs impl into libsa
r336084: Move ZFS files into libsa
Move the libzfs stuff into libsa. There's no need for it to be a separate library. The separate library adds to the issues of build ordering that we see from time to time. Move the filesystem support into libsa, like all the other filesystem support rather than making zfs the odd-duck out.
Discussed with: allanjude@
r336085: Stop using ../zfs/libzfs.h but instead use libzfs.h.
While ../zfs/libzfs.h mostly works, there are a few situations where it does not. Eliminate the problem by using plain libzfs.h, like we do for ufs support. This fixes the weird cases, and is easier to understand. It also follows the general style convetion of avoiding ../ in #includes.
r336118: Remove dirs that git svn should have removed but didn't. |
344295 |
19-Feb-2019 |
kevans |
MFC r335245-r335248, r335254, r335276, r335298, r335398, r335868, r335883
r335245: Correct logic error in biosdisk.c:bd_realstrategy()
The wrong condition is used when evaluating the return of disk_ioctl() This results in reaching the 'We should not get here' branch in most casts
r335246: biosdisk.c remove redundant variable
`rdev` and `disk` serve the same purpose, read the partition table without the `d_offset` or `d_slice` set, so the read is relative to the start of the disk. Reuse the already initialized `disk` instead of making another copy later.
r335247: biosdisk.c: add missing \n to error message
r335248: biosdisk.c: fix type in debug printf
r335254: Avoid reading past the end of the disk in zfsboot.c and biosdisk.c
The GELI boot code rounds reads up to 4k, since the encrypted sectors are 4k, and must be decrypted as a unit. With oddball sized disks (almost always virtual), this can lead to reading past the end of the disk.
r335276: gptboot, zfsboot, gptzfsboot: Enable the video and serial consoles early
Normally the serial console is not enabled until /boot.config is read and we know how the serial console should be configured. Initialize the consoles early in 'dual' mode (serial & keyboard) with a default serial rate of 115200. Then serial is re-initialized once the disk is decrypted and the /boot.config file can be read.
This allows the GELIBoot passphrase to be provided via the serial console.
r335298: stand/common/disk.c: Update debug printf
This was missed in r330809 because it is compiled out by default
r335398: Revert r335276
This was causing issues for people booting. I will likely bring this back as an optional feature, similar to boot0sio, like gptboot-serial or something.
r335868: stand/common/disk.c: Read partition table relative to the start of the disk
If a disk is of an oddball size, like the 200mb + 512b used in rootgen.sh, when disk_open() is called on a GELI encrypted partition, attempts to read the partition table fail, as they pass through the decryption process which turns the already plaintext data into jibberish.
When reading the partition table, always pass a slice and partition setting of -1, and an offset of 0. Setting the slice to -1 prevents a false positive when checking the slice against the cache of GELI encrypted slices.
r335883: stand/common/disk.c: dev->d_offset still needs to be set to 0
With r335868, I thought this was no longer necessary. I was wrong. |
338078 |
20-Aug-2018 |
kevans |
MFC r337524: libi386: Fix typo in pxe.h
PR: 207337 |
335755 |
28-Jun-2018 |
kevans |
MFC r334882, r334884-r334885: loader(8) boot flag <-> environment fixes
r334882: stand: Consolidate checking for boot flags driven by environment vars
e.g. boot_mute, boot_single, boot_verbose, and friends; we checked for these in multiple places, consolidate into common/ and allow a setting of "NO" for any of these to turn them off. This allows systems with multiple loader.conf(5) or loader.conf(5) overlay systems to easily turn off variables in later processed files by setting it to NO.
Reported by: Nick Wolff @ iXsystems Reviewed by: imp
r334884: stand: Fix build after r334882
Not sure how this was not caught in Universe.
r334885: stand: One more trivial consolidation (setting environment from howto) |
334935 |
10-Jun-2018 |
ian |
MFC r334656, r334665, r334695
r334656: Add vsnprintf() to libsa. Alpha-sort the printf prototypes in stand.h.
r334665: Make the v*printf() functions in libsa return int instead of void. This makes them compatible with the C standard signatures, avoiding spurious mismatch errors in the places where the oddball requirements of standalone code end up putting two declarations of the same function in play.
r334695: Remove comments and assertions that are no longer valid after r330809.
r330809 replaced duplication of devdesc struct fields with an embedded copy of the devdesc struct, to avoid fragility. That means all the scattered comments indicating that structs must match are no longer valid. Likewise asserts that attempted to mitigate some of the old fragility.
Reviewed by: imp@ |
332154 |
06-Apr-2018 |
kevans |
MFC r330806-r330815, r330837, r330864, r330883
pc98 changes associated with the named commits are also included in this commit, despite not having been made with the original commits due to its removal in head.
r330806: Minor cosmetic changes.
Make sure { on the same line as struct for all struct *devdesc. Move some type definitions to next to the dv_type define, since that's what sets the d_type.
r330807: We can't use d_opendata for blkio storage.
open_disk uses d_opendata for it's own purpse. We can't store blkio there. Fortunately, blkio is stored elsewhere and we never actually retrieve blkio from d_opendata. Eliminate it as a source of confusion. Eliminate all stores of d_opendata in efi since this layer doesn't own that field.
r330808: Make struct libi386_devdesc match the struct devdesc better
Move data to top and call it d_opendata.
r330809: Use the actual struct devdesc at the start of all *_devdesc structs
The current system is fragile and requires very careful layout of all *_devdesc structures. It also makes it hard to change the base devdesc. Take a page from CAM and put the 'header' in all the derived classes and adjust the code to match.
For OFW, move the iHandle h_handle out of a slot conflicting with d_opendata. Due to quirks in the alignment rules, this worked. However changing the code to use d_opendata storage now that it's a pointer is hard, so just have a separate field for it.
All other cleanups were to make the *_devdesc structures match where they'd taken some liberties that were none-the-less compatible enough to work.
r330810: Remove d_type from devdesc. It's not needed as we can fetch it from d_dev->dv_type when we need it.
r330811: GC unused routines.
Sponsored by: Netflix
r330812: Use the one-line-per-file pattern here, and sort the file names.
Sponsored by: Netflix
r330813: Move the env convenience routines out of boot1.c.
These routines are more generally useful. Even though boot1 is on its way out, it's better to make these common during the transition than copy them.
r330814: Star BootCurrent entry when booting.
Sponsored by: Netflix
r330815: Print the load and device path as well as BootCurrent and BootOrder
Sponsored by: Netflix
r330837: biosdisk.c should not set d_opendata.
Same as 330807, d_opendata is owned by open_disk and we should not set it.
M stand/i386/libi386/biosdisk.c
r330864: Prefer uintXX_t to u_intXX_t
A foolish consistency is the hobgoblin of little minds, adored by little statesmen and philosophers and divines. With consistency a great soul has simply nothing to do. -- Ralph Waldo Emerson
r330883: Fix typo that misteriously passes compilation. |
332056 |
05-Apr-2018 |
kevans |
MFC r331718: stand: Add workaround for HP BIOS issues
hrs@ and kuriyama@ have found that on some HP BIOS, a system will fail to boot immediately after installation with the claim that it can't work out which disk they are booting from.
They tracked it down to a buffer overrun, and found that it could be alleviated by doing a dummy read before-hand. |
331615 |
27-Mar-2018 |
kevans |
MFC r331475: loader consoles: Implement SGR 24, 25
Mostly for completeness sake- implement 24 (no underline) and 25 (no blink) |
331539 |
26-Mar-2018 |
kevans |
MFC r331416, r331440: Loader consoles: Implement SGR 22, reste intensity
r331416: Loader consoles: Implement SGR 22, reset intensity
r331440: Match broken style of vidconsole.c
This particular function uses a broken mix of indentation styles. Match it for the newly added SGR 22 bits. |
329183 |
12-Feb-2018 |
kevans |
MFC Loader Fixes Final: r327612,r327703,r327704,r327878,r327879,r327881, r328007,r328029,r328030,r328031,r328061,r328156,r328169,r328288,r328289, r328290,r328291,r328292,r328411,r328536,r328603,r328614,r328642,r328769, r328779,r328780,r328781,r328782,r328783,r328806,r328808,r328826,r328835, r328911,r328986,r328987,r328990,r328999,r329000,r329019,r329050,r329054, r329060
r327612: Invent new #defines for the biospci_{read,write}_config function
r327703: Define __dmadat after #include'ing ufsread.c.
r327704: Fix printf missing format variables warnings.
r327878: Add GUID for UEFI boot manager variables.
r327879: Report the boot order and where we are in that boot order.
r327881: Allow this file to be included
r328007: Fix booting on some arm64 systems after r327879 by fixing the call to utf8_to_ucs2
r328029: When returning an error and freeing allocated memory from ucs2_to_utf8, NULL the return pointer.
r328030: Check the return value from utf8_to_ucs2 instead of whether or not uv is NULL.
r328031: Need to free uv after we're done using it.
r328061: utf8_to_ucs2() should check for malloc failure
r328156: stand: Move sections around to fix stand/ build with ld.lld on armv7
r328169: Remove extra copy of bootinfo.c. It's a bit rotted copy of the one in efi/loader.
r328288: Fix some resource leaks.
r328289: Don't leak memory when displaying help.
r328290: On malloc failure, be sure to close the include file that triggered it.
r328291: getenv does not return tainted data in the boot loader. Attempt to clue Coverity into that fact.
r328292: There's no tainted data here, tag it as such to avoid false positives.
r328411: loader.efi: add missing EFI GUIDs
r328536: loader: support for mixed-endianness ELF/loader and POWER8
r328603: Add missing non-POWERPC case to give the scr value something non-zero.
r328614: Move libstand.3 to libsa.3. Update libsa.3 to include functions
r328642: Break out the interpreters (simple and forth) w/o ifdefs.
r328769: Centralize several variables.
r328779: Retire pnp.4th and the code needed only for 4th words used here.
r328780: These 4th words were an attempt to allow integration into the boot loader scripts. However, that path won't be taken after all it seems.
r328781: Remove pcibios forth support.
r328782: Now that we no longer conditionally compile some files outside of ficl
r328783: Invent new LDR_INTERP for the loader interpreter to use.
r328806: We need more heap space to properly load newer powerpc kernels.
r328808: Implement strcoll as strcmp.
r328826: Make cross-endian loader changes apply only to powerpc
r328835: Fix regression introduced in r328806, preventing boot on many platforms.
r328911: Ignore relocation tables for non-memory-resident sections.
r328986: Fix relative location of USB sources after recent move.
r328987: A more definitions to kernel emulation shim in order to build stand/usb.
r328990: Move the stand/usb test loader into its own directory.
r328999: Fix indentation to FreeBSD standard for interp files
r329000: Move simple interpreter 'perform' into interp.c and call it
r329019: Move to tabs for indentation and to 8-space notches, per style(9).
r329050: Fix build of userboot.so
r329054: Set script.lang in the environment to either 'forth' or 'simple' to reflect what scripting language was compiled into the loader.
r329060: loader: fix endianness conversion
PR: 225323 |
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 |
329146 |
12-Feb-2018 |
kevans |
MFC r326038,r326069,r326072: More stand simplification and fixes
r326038: Move some more common stuff up to Makefile.inc.
r326069: Fix gptzfsboot for cases with GELI.
r326072: Unbreak riscv build in universe. |
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. |
329131 |
11-Feb-2018 |
kevans |
MFC Loader Fixes 2017q4p3: r324460,r324471
r324460: Rather than laying whack-a-mole with including the path to stand.h, always include it.
r324471: Fix typos: `stand alon{e,g}` should be spelled like `standalone` |
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 |
329114 |
11-Feb-2018 |
kevans |
MFC Loader Fixes 2017q3: r320547,r320553,r321621,r321844,r321969,r321991, r322037,r322038,r322039,r322040,r322056,r322074,r322542,r322592,r322593, r322896,r322923,r323671,r322930,r322931,r322932,r322933,r322934,r322935, r322936,r322937,r322938,r322939,r322941,r323062,r323063,r323064,r323065, r323100,r323131,r323174,r323258,r323261,r323272,r323367,r323379,r323389, r323407,r323428,r323436,r323494,r323496,r323497,r323541,r323554,r323589, r323707,r323867,r323885,r323886,r323895,r323896,r323897,r323905,r323906, r323907,r323908,r323909,r323952,r323991,r324099,r324558,r326445,r326609, r326610
This batch includes a special kludge to fix powerpc loader build; <stdlib.h> was included after <stand.h> there, causing problems with DEBUG_MALLOC bits. Include <stdlib.h> a little bit earlier to fix the build with the intention of removing this when eventually libsa silently replaces stdlib.h with stand.h.
r320547: Link EFI/uboot loaders with -znotext
r320553: Integer underflow in efipart_realstrategy when I/O starts after end of disk
r321621: Always set the receive mask in loader.efi.
r321844: Clean up style in print_state(..) and pager_printf(..)
r321969: Fix the return types for printf and putchar to match their libc
r321991: Revert r321969
r322037: Add stpcpy and stpncpy to libstand
r322038: Add definitions and utilities for EFI drivers
r322039: Move EFI ZFS functions to libefi
r322040: Add EFI utility functions to libefi
r322056: Move EFI fmtdev functionality to libefi
r322074: libefi/time.c cstyle cleanup
r322542: loader.efi: repace XXX with real comments in trap.c
r322592: Remove unused defines.
r322593: Define proposed GUID for FreeBSD boot loader variables.
r322896: Make spinconsole platform independent and hook it up into EFI loader
r322923: Hide length of geli passphrase during boot.
r323671: Fix language used in the r322923.
r322930: Move efi_main into efi/loader
r322931: Cleanup efi_main return type
r322932: Use the loader.efi conventions for the various EFI tables.
r322933: No need for MK_ZFS around these: they are by their nature only active when MK_ZFS is true.
r322934: _STAND is sometimes defined on the command line. Make the define here match.
r322935: Fix warnings due to type mismatch.
r322936: Remove useless 'static' for an enum definition.
r322937: Forward declare struct dsk to avoid warnings when building libi386.
r322938: Link in libefi for boot1
r322939: Use efi_devpath_str for debug path info.
r322941: Eliminate redunant device path matching.
r323062: Make efichar.c routines available to libefi.
r323063: boot1.efi: print more info about where boot1.efi is loaded from
r323064: Exit rather than panic for most errors.
r323065: Save where we're booted from
r323100: libstand: nfs_readlink() should return proper return code
r323131: Revert r322941: Eliminate redundant device matching functions
r323174: Fix loader bug causing too many pages allocation when bootloader is U-Boot
r323258: ucs2len
r323261: Fix armv6 build
r323272: Be consistent and do return (1);
r323367: Mark init_chroot and init_script variables as deprecated.
r323379: It's been pointed out that init_script at least is useful w/o
r323389: loader.efi: chain loader should provide proper device handle
r323407: boot1 generate-fat: generate all templates at once
r323428: r323389 breaks the kernel build when WITHOUT_ZFS is defined in src.conf
r323436: boot1: remove BOOT1_MAXSIZE default value
r323494: loader should support large_dnode
r323496: libstand: tftp_open() can leak pkt on error
r323497: libefi: efipart_open should check the status from disk_open
r323541: libefi: efipart_realstrategy rsize pointer may be NULL
r323554: Increase EFI boot file size frok 128k to 384k
r323589: loader: biosmem.c cstyle cleanup
r323707: loader: biosmem allocate heap just below 4GB
r323867: libefi: devicename.c cleanups
r323885: libefi: efi_devpath_match() should return bool
r323886: libefi: efipart.c should use calloc()
r323895: libefi: efi_devpath_match local len should be unsigned
r323896: r323885 did miss efilib.h update
r323897: efilib.h: typo in structure member description
r323905: libefi: pdinfo_t pd_unit and pd_open should be unsigned
r323906: libefi: efipart_strategy() should return ENXIO when there is no media
r323907: libefi: efipart.c cstyle fix for efipart_print_common()
r323908: libefi: efipart_hdinfo_add_filepath should check strtol result
r323909: libefi: define EISA PNP constants
r323952: After the r317886 support for TFTP and NFS can be enable simultaneously.
r323991: libefi: efipart_floppy() will should not pass acpi pointer if the HID test fails
r324099: Compile loader as Little-Endian on PPC64/POWER8
r324558: Define prototype for exit and ensure references
r326445: Fix random() and srandom() prototypes to match the standard.
r326609: Make putenv and getenv match the userland definition
r326610: Fix random() prototype to match the system.
PR: 219000 221001 222215 Relnotes: yes ("The length of the geli passphrase is hidden during boot") |
329100 |
10-Feb-2018 |
kevans |
MFC Loader Fixes 2017q2: r316437,r316577,r316578,r316585,r316590,r316612, r316625,r316628,r316654,r316682,r316704,r316771,r317092,r317097,r317099, r317652,r317785,r317886,r317887,r318142,r318320,r318356,r318678,r318754, r318982,r318986,r318987,r318988,r318989,r318990,r318991,r318992,r318993, r318994,r318999,r319083,r319084,r319085,r320011,r320234,r320288,r320304, r320467,r320482
r316437: Small cleanup to make i386/loader match efi/loader boot environment code
r316577: loader: part.c cstyle cleanup
r316578: loader: want mechanism to avoid RA with bcache
r316585: loader: zfs reader should check all labels
r316590: libstand/dosfs: cache FAT32 in 128 Kb blocks to save loader memory
r316612: In r298230 the value of HEAP_MIN was changed from 3MB to 64MB. Correct a comment.
r316625: Do not use -msoft-float with intention of disabling FP on aarch64
r316628: Silence GCC warning by initializing the local variable.
r316654: loader: r316585 did miss userboot update
r316682: loader: r316585 did miss sparc/ofw
r316704: loader.efi: only fetch zfs pool guid for the actual boot device
r316771: loader: Avoid possible overflow via environment variable
r317092: loader: zfs reader vdev_probe should check for minimum device size
r317097: loader: F_READ/F_WRITE should be checked against masked flag
r317099: loader: uboot disk ioctl should call disk_ioctl
r317652: loader.efi: ResetSystem does not use data with EFI_SUCCESS
r317785: zfsboot: drvsize() may be unusable on some systems
r317886: distinguish NFS versus TFTP boot by rootpath
r317887: loader: network read rework
r318142: libstand: NULL pointer dereference in rarp
r318320: loader: add ip layer code into libstand
r318356: libstand: increase nfs max read size to 16k
r318678: Replacing iterating over rootpath by strsep(3).
r318754: Pass -N directly to ld via -Wl rather than passing it to the compiler driver.
r318982: Pass a "FREEBSD" user-class in PXE dhcp request
r318986: add a comment on vendor index 19 and 20 to avoid confusion
r318987: Support URI scheme for root-path in netbooting
r318988: Always build tftpfs support along with nfs for pxeboot
r318989: Always issue the pxe request
r318990: Partially revert r314948
r318991: Document recent changes on pxeboot
r318992: Capitalize DHCP
r318993: Use the usual FreeBSD spelling for the DHCP user class
r318994: Catch with the change in the user class
r318999: Update the comments concerning net_parse_rootpath to reflect what it is now
r319083: Followup on the user-class changes
r319084: Small cleanup in dev_net.c
r319085: use the same option list for dhcp discovery and request
r320011: Add chain loader support for loader
r320234: Make structure padding explicit in EFI_MEMORY_DESCRIPTOR
r320288: Allow Clang's integrated assembler to assemble boot0
r320304: loader.efi: Disable smbios for arm
r320467: loader: chain load relocate data declaration is bad
r320482: As with arm64 mark the EFI PE header as allocated on arm.
PR: 218473 |
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 |
329070 |
09-Feb-2018 |
kevans |
MFC r327606: Handle misconfigured/nonexistent pcidev for comconsole instead of BTX panic.
[This is effectively a direct commit to stable/11 due to path restructuring in head. Diffs have simply been applied to previous location]
PR: 203319 |
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") |
328889 |
05-Feb-2018 |
kevans |
MFC r308434, 308827
MFC r308434: Loader paged/pageable data is not always paged. MFC r308827: lsdev device name section headers should be printed by dv_print callback. |
318019 |
09-May-2017 |
royger |
MFC r316754: loader/multiboot: fix multiboot loading
Sponsored by: Citrix Systems R&D |
313355 |
06-Feb-2017 |
tsoome |
MFC r309369,310850,310853:
libstand: dosfs cstyle cleanup for return keyword. dosfs support in libstand is broken since r298230
PR: 214423 Submitted by: Mikhail Kupchik Reported by: Mikhail Kupchik Approved by: imp (mentor) |
308722 |
16-Nov-2016 |
bapt |
MFC r308477:
make pxeboot consistent with common/dev_net.c
Always define boot.netif.server in kenv in pxeboot Add "boot.tftproot.server" to kenv when pxeboot uses tftpfs Change the code order when setting env for TFTP or NFS to be the same as common/dev_net.c
Reported by: tsoome |
307632 |
19-Oct-2016 |
bapt |
MFC: 304677, 304680, 305125, 305770, 305769
r304677: Add tftpfs support for the EFI loader
Allow netbooting on efi without having to setup any NFS server by rebuilding the loader with LOADER_TFTP_SUPPORT like for the i386 pxeloader
r305125: Netboot: allow both tftpfs and nfs in both pxeboot and loader.efi
Add a new 'netproto' variable which can be set for now to NET_TFTP or NET_NFS (default to NET_NONE)
From the dhcp options if one sets the root-path option to: "ip:path", the loader will consider it is booting over NFS (meaning same behaviour as the default current behaviour)
if the dhcp option "tftp server address" is set (option 150) the loader will consider it is booting over tftpfs, it will then consider the root-path options with 2 possible case 1. "path" then the IP of the tftp server will be the one passed by the option 150, and the files will be retrieved under "path" on the tftp server 2. "ip:path" then the IP of the tftp server will be the one passed in the option "overwritting the IP from the option 150.
We could not "abuse" the rootpath option in the form or tftp://ip:path because this is already used for other purpose by iPXE preventing any chainload from iPXE to the FreeBSD loader.
Given at each open(), the loader loops over all available filesystems and keep the "best" error, we needed to prevent tftpfs to fallback on nfs and vice versa. the tftpfs and nfs implementation in libstand now return EINVAL early if 'netproto' for that purpose.
Relnotes: yes Sponsored by: Gandi.net |
305457 |
06-Sep-2016 |
avg |
MFC r303738: report sector size and number of sectors in lsdev output for bios disks |
305232 |
01-Sep-2016 |
gjb |
MFC r304966 (peter): The read-ahead code from r298230 made it likely the boot code would read beyond the end of disk. r298900 added code to prevent this. Some BIOSes cause significant delays if asked to read past end-of-disk.
We never trusted the BIOS to accurately report the sectorsize of disks before and this set of changes. Unfortuately they interact badly with the infamous >2TB wraparound bugs. We have a number of relatively-recent machines in the FreeBSD.org cluster where the BIOS reports 3TB disks as 1TB.
With pre-r298900 they work just fine. After r298900 they stop working if the boot environment attempts to access anything outside the first 1TB on the disk. 'ZFS: I/O error, all block copies unavailable' etc. It affects both UFS and ZFS if they try to boot from large volumes.
This change replaces the blind trust of the BIOS end-of-disk reporting with a read-ahead clip to prevent reads crossing the of end-of-disk boundary. Since 2^32 (2TB) size reporting truncation is not uncommon, the clipping is done on 2TB aliases of the reported end-of-disk. ie: a 3TB disk reported as 1TB has readahead clipped at 1TB, 3TB, 5TB, ... as one of them is likely to be the real end-of-disk.
This should make the loader on these broken machines behave the same as traditional pre-r298900 loader behavior, without disabling read-ahead.
PR: 212139 Sponsored by: The FreeBSD Foundation |
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 |
300257 |
20-May-2016 |
allanjude |
Fixup the geliboot sector rounding code
Replace all rounding with the round{up,down}2 macros a missing set of braces caused the previous code to be incorrect
replace alloca() with malloc() because alloca() can return an allocation that is actually invalid, causing boot to fail
Reviewed by: emaste, ed Thanks To: peter Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D6213
|
300117 |
18-May-2016 |
imp |
Fix several instances where the boot loader ignored pager_output return value when it could return 1 (indicating we should stop). Fix a few instances of pager_open() / pager_close() not being called. Actually use these routines for the environment variable printing code I just committed.
|
298900 |
01-May-2016 |
allanjude |
bcache read ahead may attempt to read past end of disk
The new bcache code does not know the size of the disk, and therefore may attempt to read past the end of the disk while trying to fill its read-ahead cache.
This is usually not an issue, it fails gracefully on all of my machines, but some BIOSes seem to retry the reads for up to 30 seconds each, resulting in a long stall during boot
Submitted by: Toomas Soome <tsoome@me.com> Reviewed by: jhb, np Differential Revision: https://reviews.freebsd.org/D6109
|
298826 |
30-Apr-2016 |
pfg |
sys/boot: spelling fixes in comments.
No functional change.
|
298230 |
18-Apr-2016 |
allanjude |
A new implementation of the loader block cache
The block cache implementation in loader has proven to be almost useless, and in worst case even slowing down the disk reads due to insufficient cache size and extra memory copy. Also the current cache implementation does not cache reads from CDs, or work with zfs built on top of multiple disks. Instead of an LRU, this code uses a simple hash (O(1) read from cache), and instead of a single global cache, a separate cache per block device. The cache also implements limited read-ahead to increase performance. To simplify read ahead management, the read ahead will not wrap over bcache end, so in worst case, single block physical read will be performed to fill the last block in bcache.
Booting from a virtual CD over IPMI: 0ms latency, before: 27 second, after: 7 seconds 60ms latency, before: over 12 minutes, after: under 5 minutes.
Submitted by: Toomas Soome <tsoome@me.com> Reviewed by: delphij (previous version), emaste (previous version) Relnotes: yes Differential Revision: https://reviews.freebsd.org/D4713
|
297954 |
14-Apr-2016 |
imp |
Deprecate using hints.acpi.0.rsdp to communicate the RSDP to the system. This uses the hints mechnanism. This mostly works today because when there's no static hints (the default), this value can be fetched from the hint. When there is a static hints file, the hint passed from the boot loader to the kernel is ignored, but for the BIOS case we're able to find it anyway. However, with UEFI, the fallback doesn't work, so we get a panic instead.
Switch to acpi.rsdp and use TUNABLE_ULONG_FETCH instead. Continue to generate the old values to allow for transitions. In addition, fall back to the old method if the new method isn't present.
Add comments about all this.
Differential Revision: https://reviews.freebsd.org/D5866
|
297629 |
06-Apr-2016 |
allanjude |
Fix GELIBoot support for GELI sector size is > 512
Add support for 4k sector GELI encrypted partitions to the bootloader This is the default created by the installer
Because the IV is different for each sector, and the XTS tweak carries forward you can not decrypt a partial sector if the starting offset is not 0
Make boot2 and the loader read in 4k aligned chunks
Reviewed by: ed, oshogbo Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D5820
|
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
|
297151 |
21-Mar-2016 |
ian |
If the dhcp server provided an interface-mtu option, transcribe the value to the boot.netif.mtu env var, which will be picked up by pre-existing code in nfs_mountroot() and used to configure the interface accordingly.
This should bring the same functionality when the bootp/dhcp work is done by loader(8) as r297150 does for the in-kernel BOOTP case.
|
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
|
293724 |
12-Jan-2016 |
smh |
Enable warnings in EFI boot code
Set WARNS if not set for EFI boot code and fix the issues highlighted by setting it.
Most components are set to WARNS level 6 with few being left at lower levels due to the amount of changes needed to fix at higher levels.
Error types fixed: * Missing / invalid casts * Missing inner structs * Unused vars * Missing static for internal only funcs * Missing prototypes * Alignment changes * Use of uninitialised vars * Unknown pragma (intrinsic) * Missing types etc due to missing includes * printf formatting types
Reviewed by: emaste (in part) MFC after: 2 weeks X-MFC-With: r293268 Sponsored by: Multiplay Differential Revision: https://reviews.freebsd.org/D4839
|
292486 |
20-Dec-2015 |
ngie |
Add missing smbios.h #include to mute a -Wimplicit-function-declaration warning after r279222
Reported by: Jenkins Sponsored by: EMC / Isilon Storage Division
|
292345 |
16-Dec-2015 |
bapt |
Use human readable representation of ip for the pxeboot.ip kenv While here use colon as a separator for pxeboot.hwaddr kenv
Sponsored by: Gandi.net
|
292344 |
16-Dec-2015 |
bapt |
pxeboot: make the tftp loader use the option root-path directive
pxeboot in tftp loader mode (when built with LOADER_TFTP_SUPPORT) now prefix all the path to open with the path obtained via the option 'root-path' directive.
This allows to be able to use the traditional content /boot out of box. Meaning it now works pretty much like all other loaders. It simplifies hosting hosting multiple version of FreeBSD on a tftp server.
As a consequence, pxeboot does not look anymore for a pxeboot.4th (which was never provided)
Note: that pxeboot in tftp loader mode is not built by default.
Reviewed by: rpokala Relnotes: yes Sponsored by: Gandi.net Differential Revision: https://reviews.freebsd.org/D4590
|
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
|
281138 |
06-Apr-2015 |
rpaulo |
SMBIOS support for EFI.
MFC after: 1 week
|
280954 |
01-Apr-2015 |
royger |
multiboot: fix error codes
Return EINVAL instead of EFTYPE if we have a multiboot kernel loaded but failed to load the modules. This makes it clear that the kernel/module should be handled by the multiboot handler but something went wrong.
Sponsored by: Citrix Systems R&D
|
280953 |
01-Apr-2015 |
royger |
multiboot: zero mod list array
Zero the list of modules array before using it, or else we might pass uninitialized data in unused fields of the struct that will make Xen choke. Also add a check to make sure malloc succeeds.
Sponsored by: Citrix Systems R&D
|
280031 |
15-Mar-2015 |
dim |
Upgrade our copy of clang, llvm and lldb to 3.6.0 release.
Please note that from 3.5.0 onwards, clang/llvm/lldb require C++11 support to build; see UPDATING for more information.
Release notes for llvm and clang can be found here: <http://llvm.org/releases/3.6.0/docs/ReleaseNotes.html> <http://llvm.org/releases/3.6.0/tools/clang/docs/ReleaseNotes.html>
Thanks to Ed Maste for the lldb part of this upgrade.
Exp-run: antoine
|
279222 |
23-Feb-2015 |
grembo |
Improve memory detection in biosmem.c
- Add a quirk to allow ignoring e820 extended memory detection. - Improve memory detection through e801. - Add bootloader command "biosmem".
See differential revision for more details.
Reviewed by: jhb, adrian Approved by: adrian Differential Revision: https://reviews.freebsd.org/D1741
|
277957 |
31-Jan-2015 |
grembo |
Fix order of functions in smbios.c (corrects r277949), since this corrects a build error I committed this directly, sorry.
|
277949 |
30-Jan-2015 |
grembo |
New function smbios_match to detect BIOS versions during boot
Motivation is to introduce BIOS specific quirks early in the boot process. smbios_match can be called before malloc is avaible, that's why parts of smbios_detect have been moved into a separate function smbios_probe that will be called by smbios_detect as well as smbios_match.
Reviewed by: jhb Approved by: jhb Differential Revision: https://reviews.freebsd.org/D1679
|
277418 |
20-Jan-2015 |
royger |
loader: fix the size of MODINFOMD_MODULEP
The data in MODINFOMD_MODULEP is packed by the loader as a 4 byte type, but the amd64 kernel expects a vm_paddr_t, which is of size 8 bytes. Fix this by saving it as 8 bytes in the loader and retrieving it using the proper type in the kernel.
Sponsored by: Citrix Systems R&D
|
277215 |
15-Jan-2015 |
royger |
loader: implement multiboot support for Xen Dom0
Implement a subset of the multiboot specification in order to boot Xen and a FreeBSD Dom0 from the FreeBSD bootloader. This multiboot implementation is tailored to boot Xen and FreeBSD Dom0, and it will most surely fail to boot any other multiboot compilant kernel.
In order to detect and boot the Xen microkernel, two new file formats are added to the bootloader, multiboot and multiboot_obj. Multiboot support must be tested before regular ELF support, since Xen is a multiboot kernel that also uses ELF. After a multiboot kernel is detected, all the other loaded kernels/modules are parsed by the multiboot_obj format.
The layout of the loaded objects in memory is the following; first the Xen kernel is loaded as a 32bit ELF into memory (Xen will switch to long mode by itself), after that the FreeBSD kernel is loaded as a RAW file (Xen will parse and load it using it's internal ELF loader), and finally the metadata and the modules are loaded using the native FreeBSD way. After everything is loaded we jump into Xen's entry point using a small trampoline. The order of the multiboot modules passed to Xen is the following, the first module is the RAW FreeBSD kernel, and the second module is the metadata and the FreeBSD modules.
Since Xen will relocate the memory position of the second multiboot module (the one that contains the metadata and native FreeBSD modules), we need to stash the original modulep address inside of the metadata itself in order to recalculate its position once booted. This also means the metadata must come before the loaded modules, so after loading the FreeBSD kernel a portion of memory is reserved in order to place the metadata before booting.
In order to tell the loader to boot Xen and then the FreeBSD kernel the following has to be added to the /boot/loader.conf file:
xen_cmdline="dom0_mem=1024M dom0_max_vcpus=2 dom0pvh=1 console=com1,vga" xen_kernel="/boot/xen"
The first argument contains the command line that will be passed to the Xen kernel, while the second argument is the path to the Xen kernel itself. This can also be done manually from the loader command line, by for example typing the following set of commands:
OK unload OK load /boot/xen dom0_mem=1024M dom0_max_vcpus=2 dom0pvh=1 console=com1,vga OK load kernel OK load zfs OK load if_tap OK load ... OK boot
Sponsored by: Citrix Systems R&D Reviewed by: jhb Differential Revision: https://reviews.freebsd.org/D517
For the Forth bits: Submitted by: Julien Grall <julien.grall AT citrix.com>
|
276074 |
22-Dec-2014 |
imp |
Make this compile when TERM_EMU is not defined.
|
271475 |
12-Sep-2014 |
ambrisko |
Add support for serial and null console to UEFI boot loader.
|
271406 |
10-Sep-2014 |
imp |
Add support for calling pcibios routines from the bootloader. Implement the following routines: pcibios-device-count count the number of instances of a devid pcibios-read-config read pci config space pcibios-write-config write pci config space pcibios-find-devclass find the nth device with a given devclass pcibios-find-device find the nth device with a given devid pcibios-locator convert bus device function ti pcibios locator These commands are thin wrappers over their PCI BIOS 2.1 counterparts. More informaiton, such as it is, can be found in the standard.
Export a nunmber of pcibios.X variables into the environment to report what the PCI IDENTIFY command returned.
Also implmenet a new command line primitive (pci-device-count), but don't include it by default just yet, since it depends on the recently added words and any errors here can render a system unbootable.
This is intended to allow the boot loader to do special things based on the hardware it finds. This could be have special settings that are optimized for the specific cards, or even loading special drivers. It goes without saying that writing to pci config space should not be done without a just cause and a sound mind.
Sponsored by: Netflix
|
269154 |
27-Jul-2014 |
marcel |
1. Suppress output for the TFTP-based PXE loader, but leave it in place for the NFS-based PXE loader. Information like rootpath or rootip aren't that useful for TFTP and the gateway IP is typically already printed by the firmware. 2. Only set boot.nfsroot.* environment variables for NFS. This makes it possible for the OS to work either way by checking for the presence or absence of environment variables. 3. Set boot.netif.server when using TFTP so that the OS can fetch files as well. A typical use case for this is network-based installations with the installation process implemented on top of FreeBSD. 4. The pxelinux loader has a set of alternative names it tries for configuration files. Make it easier to do something similar in Forth by providing the IP address as a 32-bit hex number in the pxeboot.ip variable and the MAC address with dashes in the pxeboot.hwaddr environment variable.
Obtained from: Juniper Networks, Inc.
|
269153 |
27-Jul-2014 |
marcel |
Give loaders more control over the Forth initialization process. In particular, allow loaders to define the name of the RC script the interpreter needs to use. Use this new-found control to have the PXE loader (when compiled with TFTP support and not NFS support) read from ${bootfile}.4th, where ${bootfile} is the name of the file fetched by the PXE firmware.
The normal startup process involves reading the following files: 1. /boot/boot.4th 2. /boot/loader.rc or alternatively /boot/boot.conf
When these come from a FreeBSD-defined file system, this is all good. But when we boot over the network, subdirectories and fixed file names are often painful to administrators and there's really no way for them to change the behaviour of the loader.
Obtained from: Juniper Networks, Inc.
|
269017 |
23-Jul-2014 |
royger |
don't set CR4 PSE bit on amd64
Setting PSE together with PAE or in long mode just makes the PSE bit completely ignored, so don't set it.
Sponsored by: Citrix Systems R&D Reviewed by: kib
|
268974 |
22-Jul-2014 |
sbruno |
Supress clang warning for FreeBSD printf %b and %D formats
MFC after: 2 weeks
|
263005 |
11-Mar-2014 |
royger |
howto_names: unify declaration
Approved by: gibbs Sponsored by: Citrix Systems R&D
boot/i386/efi/bootinfo.c: boot/i386/libi386/bootinfo.c: boot/ia64/common/bootinfo.c: boot/powerpc/ofw/metadata.c: boot/powerpc/ps3/metadata.c: boot/sparc64/loader/metadata.c: boot/uboot/common/metadata.c: boot/userboot/userboot/bootinfo.c: i386/xen/xen_machdep.c: - Include sys/boot.h - Remove custom definition of howto_names.
sys/boot.h: - Define howto_names.
x86/xen/pv.c: - Include sys/boot.h
|
260949 |
20-Jan-2014 |
mav |
Make comconsole options set before its activation to be remembered.
MFC after: 2 weeks Sponsored by: iXsystems, Inc.
|
256940 |
22-Oct-2013 |
jkim |
Allow users to set UUID in network byte order regardless of SMBIOS version. Define BOOT_NETWORK_ENDIAN_UUID in make.conf(5) to enable this feature.
|
254733 |
23-Aug-2013 |
jkim |
Set the hint for physical address of RSDP in hexadecimal as before r223262.
|
245848 |
23-Jan-2013 |
jhb |
Always update the hw.uart.console hint anytime a change is made to the comconsole setup. Previously the hint would be set when if you set a custom port, but it would not be updated if you later set a custom speed.
Also, leave the hw.uart.console hint mutable so it can be overridden or unset by the user if needed.
Reviewed by: kib (earlier version) MFC after: 1 week
|
245424 |
14-Jan-2013 |
sbruno |
Quiesce some clang warnings while we're here doing stuff.
Submitted by: Hiren Panchasara <hiren.panchasara@gmail.com> Obtained from: Yahoo! Inc
|
241809 |
21-Oct-2012 |
ae |
Add the flags parameter to the disk_open() function and DISK_F_NOCACHE flag, that disables the caching of partition tables metadata. Use this flag for floppies in the libi386/biosdisk driver.
|
241300 |
06-Oct-2012 |
avg |
i386 comconsole: don't loop forever if hardware doesn't respond
- clear capability flags when hw timeouts - retire comc_started status variable and directly use c_flags to see if comconsole is selected for use
Reviewed by: jhb Tested by: Uffe Jakobsen <uffe@uffe.org>, Olivier Cochard-Labbe <olivier@cochard.me> MFC after: 26 days
|
241053 |
29-Sep-2012 |
ae |
Almost each time when loader opens a file, this leads to calling disk_open(). Very often this is called several times for one file. This leads to reading partition table metadata for each call. To reduce the number of disk I/O we have a simple block cache, but it is very dumb and more than half of I/O operations related to reading metadata, misses this cache.
Introduce new cache layer to resolve this problem. It is independent and doesn't need initialization like bcache, and will work by default for all loaders which use the new DISK API. A successful disk_open() call to each new disk or partition produces new entry in the cache. Even more, when disk was already open, now opening of any nested partitions does not require reading top level partition table. So, if without this cache, partition table metadata was read around 20-50 times during boot, now it reads only once. This affects the booting from GPT and MBR from the UFS.
|
240421 |
12-Sep-2012 |
mav |
Make pxe device in lsdev really include device name, looking like this: pxe0: 192.168.3.1:/storage/nfsroot/amd64 , instead of confusing and less useful: 192.168.3.1:pxeboot
|
239243 |
13-Aug-2012 |
dim |
After r239066, reinitialize v86.ctl and v86.addr for int 13 EDD probing in sys/boot/i386/libi386/biosdisk.c. Otherwise, when DISK_DEBUG is enabled, the DEBUG() macros will clobber those fields, and cause the probing to always fail mysteriously when debugging is enabled.
|
239211 |
12-Aug-2012 |
ae |
Add another debug message.
|
239066 |
05-Aug-2012 |
ae |
Add offset field to the i386_devdesc structure to be compatible with disk_devdesc structure. Update biosdisk driver to the new disk API.
|
236213 |
29-May-2012 |
kevlo |
Make sure that each va_start has one and only one matching va_end, especially in error cases.
|
235329 |
12-May-2012 |
avg |
zfsboot/zfsloader: support accessing filesystems within a pool
In zfs loader zfs device name format now is "zfs:pool/fs", fully qualified file path is "zfs:pool/fs:/path/to/file" loader allows accessing files from various pools and filesystems as well as changing currdev to a different pool/filesystem.
zfsboot accepts kernel/loader name in a format pool:fs:path/to/file or, as before, pool:path/to/file; in the latter case a default filesystem is used (pool root or bootfs). zfsboot passes guids of the selected pool and dataset to zfsloader to be used as its defaults.
zfs support should be architecture independent and is provided in a separate library, but architectures wishing to use this zfs support still have to provide some glue code and their devdesc should be compatible with zfs_devdesc. arch_zfs_probe method is used to discover all disk devices that may be part of ZFS pool(s).
libi386 unconditionally includes zfs support, but some zfs-specific functions are stubbed out as weak symbols. The strong definitions are provided in libzfsboot. This change mean that the size of i386_devspec becomes larger to match zfs_devspec.
Backward-compatibility shims are provided for recently added sparc64 zfs boot support. Currently that architecture still works the old way and does not support the new features.
TODO: - clear up pool root filesystem vs pool bootfs filesystem distinction - update sparc64 support - set vfs.root.mountfrom based on currdev (for zfs)
Mid-future TODO: - loader sub-menu for selecting alternative boot environment
Distant future TODO: - support accessing snapshots, using a snapshot as readonly root
Reviewed by: marius (sparc64), Gavin Mu <gavin.mu@gmail.com> (sparc64) Tested by: Florian Wagner <florian@wagner-flo.net> (x86), marius (sparc64) No objections: fs@, hackers@ MFC after: 1 month
|
235155 |
09-May-2012 |
avg |
i386 boot: consolidate MAXBDDEV definition
MFC after: 1 month
|
232309 |
29-Feb-2012 |
jkim |
Fix a long standing bug. The caller expects a non-zero value for success. Luckily keyboard probing was turned off by default from the first revision.
Submitted by: Alexander Sack (asack at niksun dot com) MFC after: 3 days
|
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
|
230325 |
19-Jan-2012 |
sbruno |
Wrap changes from svn r212126 inside LOADER_NFS_SUPPORT such that using LOADER_TFTP_SUPPORT excludes this code. Fixes compilation of pxeldr with -DLOADER_TFTP_SUPPORT
Applicable to stable/9 and stable/8 now.
This appears to not be needed on stable/7 as r212126 has not been MFC'd.
Obtained from: Yahoo! Inc. MFC after: 2 weeks
|
229435 |
03-Jan-2012 |
kib |
Add special loader environment variables 'comconsole_port' and 'comconsole_pcidev'. The former allows to set the base address of the serial console i/o port. The later takes the string of the format 'bus:device:function:[bar]' as a value and uses the serial port attached as PCI device at the specified location for console.
Both variants pass 'hw.uart.console' variable to the uart driver to properly hand-over the kernel console.
Change allows to use ISA serial ports other than COM1 for the loader/kernel console without loader recompilation. Also, you can use PCI-attached port as the console, e.g. Intel AMT serial pseudo-port on some motherboards based on Q67 chipset.
Reviewed by: jhb MFC after: 2 weeks
|
228782 |
21-Dec-2011 |
ed |
Make the RTC checking for QEMU even more aggressive.
At work, where we use use KVM+QEMU, we notice that pxeboot is pratically impossible because of network timeouts. This is due to the fact that the RTC code makes aggressive jumps.
Two RTC reads does not seem to be sufficient. Change the code to check for 8 identical RTC values.
Sponsored by: Kumina bv
|
227389 |
09-Nov-2011 |
jhb |
Revert some debugging printfs that crept into 223695.
|
226748 |
25-Oct-2011 |
jhb |
- Add a new header for the x86 boot code that defines various structures and constants related to the BIOS Enhanced Disk Drive Specification. - Use this header instead of magic numbers and various duplicate structure definitions for doing I/O. - Use an actual structure for the request to fetch drive parameters in drvsize() rather than a gross hack of a char array with some magic size. While here, change drvsize() to only pass the 1.1 version of the structure and not request device path information. If we want device path information you have to set the length of the device path information as an input (along with probably checking the actual EDD version to see which size one should use as the device path information is variable-length). This fixes data smashing problems from passing an EDD 3 structure to BIOSes supporting EDD 4.
Reviewed by: avg Tested by: Dennis Koegel dk neveragain.de 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.
|
223695 |
30-Jun-2011 |
dfr |
Add a version of the FreeBSD bootloader which can run in userland, packaged as a shared library. This is intended to be used by BHyVe to load FreeBSD kernels into new virtual machines.
|
223262 |
18-Jun-2011 |
benl |
Fix clang warnings.
Approved by: philip (mentor)
|
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.
|
215245 |
13-Nov-2010 |
nyan |
Remove unused includes.
|
215016 |
08-Nov-2010 |
jhb |
Remove support for autoloading ACPI from the loader. Leave in the code to detect ACPI and export info such as the location of the RSDP via hints as that is still useful.
|
212805 |
17-Sep-2010 |
pjd |
Before VirtualBox is fixed, mark with #ifdef what has to be done to make it possible to boot from ZFS RAIDZ for example from within VirtualBox. The problem with VirtualBox is that its BIOS reports only one disk present. If we choose to ignore this report, we can find all the disks available. We can't have this work-around to be turned on by default, because some broken BIOSes report true when it comes to number of disks, but present the same disk multiple times.
|
212126 |
02-Sep-2010 |
rmacklem |
Modify pxe.c to use the version of nfs_getrootfh() that returns the file handle's size and was recently committed to lib/libstand/nfs.c. This allows pxeboot to use NFSv3 and work correcty for non-FreeBSD as well as FreeBSD NFS servers. If built with OLD_NFSV2 defined, the old code that predated this patch will be used.
Tested by: danny at cs.huji.ac.il
|
211677 |
23-Aug-2010 |
imp |
MF tbemd: Minor tweaks, prefer MACHINE_CPUARCH generally to MACHINE_ARCH
|
200631 |
17-Dec-2009 |
nyan |
Fix debug messages of bd_io().
MFC after: 1 week
|
200357 |
10-Dec-2009 |
jhb |
Don't warn about an RSDP with a corrupt checksum. The kernel does a better job about warning about these things later and this message can be confusing.
Submitted by: infofarmer MFC after: 1 week
|
200219 |
07-Dec-2009 |
jhb |
Improve the algorithm the loader uses to choose a memory range for its heap when using a range above 1MB.
Previously the loader would always use the last 3MB in the first memory range above 1MB for the heap. However, this memory range is also where the kernel and any modules are loaded. If this memory range is "small", then using the high 3MB for the heap may not leave enough room for the kernel and modules.
Now the loader will use any range below 4GB for the heap, and the logic to choose the "high" heap region has moved into biosmem.c. It sets two variables that the loader can use for a high heap if it desires. When a high heap is enabled (BZIP2, FireWire, GPT, or ZFS), then the following memory ranges are preferred for the heap in order from best to worst: - The largest memory region in the SMAP with a start address greater than 1MB. The memory region must be at least 3MB in length. This leaves the region starting at 1MB purely for use by the kernel and modules. - The last 3MB of the memory region starting at 1MB if it is at least 3MB in size. This matches the current behavior except that the current loader would break horribly if the first region was not at least 3MB in size. - The memory range from the end of the loader up to the 640k window. This is the range the loader uses when none of the high-heap-requesting options are enabled.
Tested by: hrs MFC after: 1 week
|
200216 |
07-Dec-2009 |
jhb |
Various small whitespace and style fixes.
|
199857 |
27-Nov-2009 |
sobomax |
Whitespace-only: another instance of identation with spaces.
|
199856 |
27-Nov-2009 |
sobomax |
Whitespace on: use tabs for identation consistently.
|
199855 |
27-Nov-2009 |
sobomax |
Add new loader console type: "spinconsole". This console selects the video console which doesn't take any input from keyboard and hides all output replacing it with ``spinning'' character (useful for embedded products and custom installations).
Sponsored by: Sippy Software, Inc.
|
199806 |
25-Nov-2009 |
trasz |
Be nice, don't use the f-word.
|
197082 |
10-Sep-2009 |
emaste |
If the pxe client is told to use / as the root path, honour that rather of trying to mount /pxeroot instead.
PR: i386/106493 Submitted by: Andrey Russev MFC after: 1 month
|
195045 |
26-Jun-2009 |
rpaulo |
On special systems where the MBR and the GPT are in sync (up to the 4th slicei, Apple EFI hardware), the bootloader will fail to recognize the GPT if it finds anything else but the EFI partition. Change the check to continue detecting the GPT by looking at the EFI partition on the MBR but stopping successfuly after finding it.
PR: kern/134590 Submitted by: Christoph Langguth <christoph at rosenkeller.org> Reviewed by: jhb MFC after: 2 weeks Approved by: re (kib)
|
193720 |
08-Jun-2009 |
jhb |
Instead of packing the individual fields in the PnP structures, pack the entire structures. This trims some warnings.
Verified by: md5(1) MFC after: 1 week
|
193719 |
08-Jun-2009 |
jhb |
Don't attempt to free the GPT partition list for a disk with an empty GPT.
Submitted by: Yuri Pankov yuri.pankov of gmail MFC after: 3 days
|
193530 |
05-Jun-2009 |
jkim |
Import ACPICA 20090521.
|
193229 |
01-Jun-2009 |
jhb |
Add a missing parameter when displaying GPT partitions with an unknown UUID.
Submitted by: Pawel Worach pawel.worach | gmail MFC after: 1 week
|
191111 |
15-Apr-2009 |
jkim |
A simple rewrite of biossmap.c:
- Do not iterate int 15h, function e820h twice. Instead, we use STAILQ to store each return buffer and copy all at once. - Export optional extended attributes defined in ACPI 3.0 as separate metadata. Currently, there are only two bits defined in the specification. For example, if the descriptor has extended attributes and it is not enabled, it has to be ignored by OS. We may implement it in the kernel later if it is necessary and proven correct in reality. - Check return buffer size strictly as suggested in ACPI 3.0.
Reviewed by: jhb
|
191061 |
14-Apr-2009 |
jhb |
Use a disk address instead of an int to hold the starting offset of an open partition. This fixes access to partitions whose starting offset is >= 2 TB.
Submitted by: "James R. Van Artsdalen" james jrv.org MFC after: 3 days
|
190814 |
07-Apr-2009 |
jkim |
Rewrite SMBIOS for loader:
- First three fields of system UUID may be little-endian as described in SMBIOS Specification v2.6. For now, we keep the network byte order for backward compatibility (and consistency with popular dmidecode tool) if SMBIOS table revision is less than 2.6. However, little-endian format can be forced by defining BOOT_LITTLE_ENDIAN_UUID from make.conf(5) if it is necessary. - Replace overly ambitious optimizations with more readable code. - Update comments to SMBIOS Specification v2.6 and clean up style(9) bugs.
|
190813 |
07-Apr-2009 |
jkim |
Increase sprintf(3) buffer size, which I forgot from the previous commit.
|
190599 |
31-Mar-2009 |
jkim |
Probe size of installed memory modules from loader and display it as 'real memory' instead of Maxmem if the value is available. Note amd64 displayed physmem as 'usable memory' since machdep.c r1.640 to unconfuse users. Now it is consistent across amd64 and i386 again. While I am here, clean up smbios.c a bit and update copyright date.
Reviewed by: jhb
|
189749 |
12-Mar-2009 |
jhb |
The recent change to use memory > 1MB for the heap by default broke CD booting because the CD driver did not use bounce buffers to ensure request buffers sent to the BIOS were always in the first 1MB. Copy over the bounce buffer logic from the BIOS disk driver (minus the 64k boundary code for floppies) to fix this.
Reported by: kensmith
|
189588 |
09-Mar-2009 |
jhb |
- Make it possible to disable GPT support by setting LOADER_NO_GPT_SUPPORT in make.conf or src.conf. - When GPT is enabled (which it is by default), use memory above 1 MB and leave the memory from the end of the bss to the end of the 640k window purely for the stack. The loader has grown and now it is much more common for the heap and stack to grow into each other when both are located in the 640k window.
PR: kern/129526 MFC after: 1 week
|
187101 |
12-Jan-2009 |
jkim |
Allow VIA Nano processors to boot FreeBSD/amd64.
PR: amd64/130303 MFC after: 1 week
|
185095 |
19-Nov-2008 |
dfr |
If we free the GPT partition list in bd_open_gpt() because of an error, don't try to free it again in bd_closedisk(). While I'm here, fix a DEBUG print.
|
185029 |
17-Nov-2008 |
pjd |
Update ZFS from version 6 to 13 and bring some FreeBSD-specific changes.
This bring huge amount of changes, I'll enumerate only user-visible changes:
- Delegated Administration
Allows regular users to perform ZFS operations, like file system creation, snapshot creation, etc.
- L2ARC
Level 2 cache for ZFS - allows to use additional disks for cache. Huge performance improvements mostly for random read of mostly static content.
- slog
Allow to use additional disks for ZFS Intent Log to speed up operations like fsync(2).
- vfs.zfs.super_owner
Allows regular users to perform privileged operations on files stored on ZFS file systems owned by him. Very careful with this one.
- chflags(2)
Not all the flags are supported. This still needs work.
- ZFSBoot
Support to boot off of ZFS pool. Not finished, AFAIK.
Submitted by: dfr
- Snapshot properties
- New failure modes
Before if write requested failed, system paniced. Now one can select from one of three failure modes: - panic - panic on write error - wait - wait for disk to reappear - continue - serve read requests if possible, block write requests
- Refquota, refreservation properties
Just quota and reservation properties, but don't count space consumed by children file systems, clones and snapshots.
- Sparse volumes
ZVOLs that don't reserve space in the pool.
- External attributes
Compatible with extattr(2).
- NFSv4-ACLs
Not sure about the status, might not be complete yet.
Submitted by: trasz
- Creation-time properties
- Regression tests for zpool(8) command.
Obtained from: OpenSolaris
|
183667 |
07-Oct-2008 |
jhb |
Use CPUID to see if the current CPU supports long mode when attemping to boot an amd64 kernel. If not, then fail the boot request with an error message. Otherwise, the boot attempt will fail with a BTX fault when trying to read the EFER MSR.
MFC after: 3 days
|
181282 |
04-Aug-2008 |
cperciva |
Dereferencing uninitialized pointers considered harmful. Prior to this commit, calling i386_parsedev(..., X, ...) where X is "ad", "bge", or any other disk or network device name without a unit number, would result in dereferencing whatever happened to be on the stack where the variable "cp" is stored.
Found by: LLVM/Clang Static Checker
|
179825 |
16-Jun-2008 |
olli |
Implement a workaround for a long-standing problem in libi386's time(), caused by a qemu bug. The bug might be present in other BIOSes, too.
qemu either does not simulate the AT RTC correctly or has a broken BIOS 1A/02 implementation, and will return an incorrect value if the RTC is read while it is being updated.
The effect is worsened by the fact that qemu's INT 15/86 function ("wait" a.k.a. usleep) is non-implmeneted or broken and returns immediately, causing beastie.4th to spin in a tight loop calling the "read RTC" function millions of times, triggering the problem quickly.
Therefore, we keep reading the BIOS value until we get the same result twice. This change fixes beastie.4th's countdown under qemu.
Approved by: des (mentor)
|
179631 |
07-Jun-2008 |
jhb |
Workaround a bug in the BIOS of Dell R900 machines. Specifically, each entry in the SMAP is a 20 byte structure and they are queried from the BIOS via sucessive BIOS calls. Due to an apparent bug in the R900's BIOS, for some SMAP requests the BIOS overflows the 20 byte buffer trashing a few bytes of memory immediately after the SMAP structure. As a workaround, add 8 bytes of padding after the SMAP structure used in the loader for SMAP queries.
PR: i386/122668 Submitted by: Mike Hibler mike flux.utah.edu, silby MFC after: 3 days
|
176646 |
28-Feb-2008 |
jhb |
Tweak the verbose disk printing a bit: - Consolidate the code to humanize the size of a disk partition into a single function based on the code for GPT partitions and use it for GPT partitions, BSD slices, and BSD partitions. - Teach the humanize code to use KB for small partitions (e.g. GPT boot partitions now show up as 64KB rather than 0MB). - Pad a few partition type names out so that things line up in the common case.
MFC after: 1 week
|
173575 |
12-Nov-2007 |
bz |
Though we are currently not interested in the EDD3 flag, Enhanced Disk Drive Specification Ver 3.0 defines that the version of extension in AH would be 30h. Correct the check for that to be >=30h instead of >3h. MFC after: 2 months
|
173118 |
28-Oct-2007 |
jhb |
- Add constants for the different memory types in the SMAP table. - Use the SMAP types and constants from <machine/pc/bios.h> in the boot code rather than duplicating it.
|
172974 |
25-Oct-2007 |
jhb |
Break out of the I/O retry loop as soon as an I/O operation succeeds rather than always retrying operations three times.
Submitted by: nyan
|
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)
|
172927 |
24-Oct-2007 |
jhb |
Rework the read/write support in the bios disk driver some to cut down on duplicated code and support 64-bit LBAs for GPT. - The code to manage an EDD or C/H/S I/O request are now in their own routines. The EDD routine now handles a full 64-bit LBA instead of truncating LBAs to the lower 32-bits. (MBRs and BSD labels only have 32-bit LBAs anyway, so the only LBAs ever passed down were 32-bit). - All of the bounce buffer and retry logic duplicated in bd_read() and bd_write() are merged into a single bd_io() routine that takes an extra direction argument. bd_read() and bd_write() are now simple wrappers around bd_io(). - If a disk supports EDD then always use it rather than only using it if the cylinder is > 1023. Other parts of the boot code already do something similar to this. Also, GPT just uses LBAs, so for a GPT disk it's probably best to ignore C/H/S completely. Always using EDD when it is supported by a disk is an easy way to accomplish this.
MFC after: 1 week
|
172922 |
24-Oct-2007 |
jhb |
Reindent the read/write code of bd_realstrategy() so it is more readable.
MFC after: 1 week
|
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
|
172591 |
12-Oct-2007 |
ps |
Do not attempt to make an NFS rpc call if using tftp
PR: kern/91720 Submitted by: Ruben Kerkhof
|
169842 |
21-May-2007 |
jkim |
Use lower cases for UUID string to conform RFC4122 and ISO/IEC-9834-8:2005.
|
167814 |
22-Mar-2007 |
jkim |
Catch up with ACPI-CA 20070320 import.
|
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
|
163897 |
02-Nov-2006 |
marcel |
Extend struct devdesc with a unit field, called d_unit. Promote the device (kind) specific unit field to the common field. This change allows a future version of libefi to work without requiring anything more than what is defined in struct devdesc and as such makes it possible to compile said version of libefi for different platforms without requiring that those platforms have identical derivatives of struct devdesc.
|
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)
|
163708 |
26-Oct-2006 |
ru |
Adopt comments borrowed from aout_freebsd.c.
|
162814 |
29-Sep-2006 |
ru |
Fix most of the WARNS=2 warnings.
|
162813 |
29-Sep-2006 |
jhb |
Oops, add return values for the smap command function. We must have the warnings set weird or something because gcc didn't warn about this at all.
Submitted by: ru
|
162743 |
28-Sep-2006 |
jhb |
Add an 'smap' command that dumps out the BIOS SMAP.
MFC after: 1 week
|
159096 |
31-May-2006 |
iedowse |
Increment the disk block offset after writing, not before. This fixes filesystem corruption when nextboot.conf is located after cylinder 1023. The bug appears to have been introduced at the time bd_read was copied to create bd_write.
PR: bin/98005 Reported by: yar MFC after: 1 week
|
158023 |
25-Apr-2006 |
jhb |
Use PTOV() to convert physical addresses to appropriate virtual addresses in the loader when searching for the ACPI RSDP. (The loader runs in a flat mode with va 0 == pa 0xa000.)
|
157668 |
11-Apr-2006 |
jhb |
Drop the gateA20() function in the loader as it is unused. All the other boot loaders that load the loader already handle A20. In fact, they are required to do so in order to setup the environment that btxldr expects.
|
156712 |
14-Mar-2006 |
jkim |
Export SMBIOS serial numbers by default. To turn it off, use 'BOOT_HIDE_SERIAL_NUMBERS' knob.
Suggested by: ceri
|
156558 |
10-Mar-2006 |
jkim |
Micro-optimize invalid UUID check.
|
156519 |
09-Mar-2006 |
jkim |
- Implement serial numbers, UUID, and asset tag (turned off by default). Use 'BOOT_SENSITIVE_INFO=YES' variable to turn them on. - Use 'uint*_t' instead of 'u_int*_t', correct compilation warnings, and update copyright while I am here.
|
153589 |
21-Dec-2005 |
sobomax |
For the cases when loading bzip2-compressed kernels enabled use last 3MB of physical memory for heap instead of range between 1MB and 4MB. This makes this feature working with PAE and amd64 kernels, which are loaded at 2MB. Teach i386_copyin() to avoid using range allocated by heap in such case, so that it won't trash heap in the low memory conditions.
This should make loading bzip2-compressed kernels/modules/mfs images generally useable, so that re@ team is welcome to evaluate merits of using this feature in the installation CDs.
Valuable suggestions by: jhb
|
153535 |
19-Dec-2005 |
sobomax |
Long-long time ago, when the trees were large and memory expensive amount of memory directly available to loader(8) and friends was limited to 640K on i386. Those times have passed long time ago and now loader(8) can directly access up to 4GB of RAM at least theoretically. At the same time, there are several places where it's assumed that malloc() will only allocate memory within first megabyte.
Remove that assumption by allocating appropriate bounce buffers for BIOS calls on stack where necessary.
This allows using memory above first megabyte for heap if necessary.
|
151452 |
18-Oct-2005 |
jkim |
Export processor socket information. New environment variables are:
smbios.socket.enabled: number of enabled sockets smbios.socket.populated: number of populated sockets
|
150470 |
22-Sep-2005 |
ru |
Cause all flags passed by boot2 to set the respective loader(8) boot_* variable. The end effect is that all flags from boot2 are now passed to the kernel.
|
150469 |
22-Sep-2005 |
ru |
Add loader(8) variables for RB_DFLTROOT, RB_MUTE, and RB_PAUSE: "boot_dfltroot", "boot_mute", and "boot_pause" respectively.
|
149213 |
18-Aug-2005 |
iedowse |
Add a "comconsole_speed" loader variable that can be used to change the serial console speed (i386 and amd64 only). If the previous stage boot loader requested a serial console (RB_SERIAL or RB_MULTIPLE) then the default speed is determined from the current serial port speed. Otherwise it is set to 9600 or the value of BOOT_COMCONSOLE_SPEED at compile time.
This makes it possible to set the serial port speed once in /boot.config and the setting will propagate to boot2, loader and the kernel serial console.
|
148450 |
27-Jul-2005 |
jkim |
Simplify SMBIOS loader variables and drop `hint.smbios.0.enabled'.
They are not real hints.
Reported by: des Pointed out by: peter Approved by: anholt (mentor)
|
148006 |
14-Jul-2005 |
jkim |
Scan static SMBIOS structures and export the following environment variables to loader:
hint.smbios.0.enabled "YES" when SMBIOS is detected
hint.smbios.0.bios.vendor BIOS vendor hint.smbios.0.bios.version BIOS version hint.smbios.0.bios.reldate BIOS release date
hint.smbios.0.system.maker System manufacturer hint.smbios.0.system.product System product name hint.smbios.0.system.version System version number
hint.smbios.0.planar.maker Base board manufacturer hint.smbios.0.planar.product Base board product name hint.smbios.0.planar.version Base board version number
hint.smbios.0.chassis.maker Enclosure manufacturer hint.smbios.0.chassis.version Enclosure version
These strings can be used to detect hardware quirks and to set appropriate flags. For example, Compaq R3000 series and some HP laptops require
hint.atkbd.0.flags="0x9"
to boot. See amd64/67745 for more detail.
Note: Please do not abuse this feature to resolve general problem when it can be fixed programmatically. This must be used as a last resort.
PR: kern/81449 Approved by: anholt (mentor)
|
146698 |
27-May-2005 |
jhb |
- Add support to the loader for multiple consoles. - Teach the i386 and pc98 loaders to honor multiple console requests from their respective boot2 binaries so that the same console(s) are used in both boot2 and the loader. - Since the kernel doesn't support multiple consoles, whichever console is listed first is treated as the "primary" console and is passed to the kernel in the boot_howto flags.
PR: kern/66425 Submitted by: Gavin Atkinson gavin at ury dot york dot ac dot uk MFC after: 1 week
|
146697 |
27-May-2005 |
jhb |
Fix a warning by adding a missing 'const'.
MFC after: 1 week
|
146448 |
20-May-2005 |
charnier |
Remove unused variables. Remove prototype for function that does not exist.
|
145209 |
17-Apr-2005 |
wollman |
Pass the hostname we got from DHCP to the kernel so that machines can share a read-only NFS root.
|
145158 |
16-Apr-2005 |
njl |
Extend a local buffer to prevent an overflow of the XSDT address.
Submitted by: Joerg Sonnenberger Obtained from: DragonflyBSD MFC after: 1 day
|
144837 |
09-Apr-2005 |
stefanf |
Fix 'implicit int' instance.
|
143476 |
12-Mar-2005 |
kan |
Allow kernels loaded by pxeboot, which was compiled with LOADER_TFTP_SUPPORT, to stll be able to mount NFS root as prescribed by DCHP configuration. Since pxeboot is using TFTP to get to the files, pxeboot can not rely on NFS to provide it a root directory hande as a side effect. pxeboot has to make RPC mount call itself.
|
138249 |
01-Dec-2004 |
scottl |
Remove the last vestiges of the userconfig option. None of this actually did anything, so this commit should be considered a NO-OP.
|
137419 |
08-Nov-2004 |
peter |
Remove a pre-tier-1 kernel compatability helper. This means a 6.x loader won't boot a pre-5.1 development amd64 kernel. That's no big loss though.
|
136910 |
24-Oct-2004 |
ru |
For variables that are only checked with defined(), don't provide any fake value.
|
136779 |
22-Oct-2004 |
simokawa |
- Add FireWire subclass and OHCI interface. - Add some PCI BIOS function calls. (find_devclass, read_config, write_config)
|
135538 |
21-Sep-2004 |
wes |
Trap invalid sector size 0 in disk probe, refusing to add such a device to the list. This prevents crashes on /0 errors in 'lsdev' et al.
Reviewed-by: jhb@ MT5 after: RE approval
|
134459 |
29-Aug-2004 |
iedowse |
Add the loader side of support for preloading ELF relocatable object format modules, which are currently only used on the amd64 platform. This initial implementation just parses enough of the module to allow it to extract dependencies and load all the bits into the right place in memory, so the kernel must still do the full relocation and linking. The details of the loaded sections are passed to the kernel by supplying a copy of the ELF section header table as module metadata with the MODINFOMD_SHDR tag.
|
130603 |
16-Jun-2004 |
phk |
Unspam sys/boot, the dev_t commit should not have touched these.
Spotted by: peter
|
130585 |
16-Jun-2004 |
phk |
Do the dreaded s/dev_t/struct cdev */ Bump __FreeBSD_version accordingly.
|
130579 |
16-Jun-2004 |
phk |
Premptively fix GCC3.4 issue: add break; after empty default: clauses.
PR: 65493 Submitted by: Pawel Worach <sajd@telia.com>
|
129702 |
25-May-2004 |
njl |
Use the correct location of the EBDA for searching for the RSDP. The EBDA is the 1 KB area addressed by the 16 bit pointer at 0x40E.
Pointed out by: robert.moore AT intel.com
|
129240 |
14-May-2004 |
ru |
Back out last revision that unnecessarily changed valid assembler line comments and damaged the CVS history.
Prompted by: bde, jhb
|
129195 |
14-May-2004 |
jdp |
Fix a potential stack buffer overflow on systems whose ACPI OEMID fills its field (6 characters). In that case the OEMID is not null-terminated, and the sprintf that was used would copy up to the next null byte, which could be pretty far away.
|
128716 |
28-Apr-2004 |
ru |
After talking to Bruce Evans and reading more standards specs, switch to using C99-style comments everywhere in preprocessed assembler. The reason is that lines starting with the regexp '^[[:space:]]#' are treated as preprocessing directives, and while it seems to work now with GCC, it's not necessarily has to work. Use C99 comments `//' for the trailing comments to save whitespace.
|
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.
|
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
|
124818 |
21-Jan-2004 |
jhb |
If a transfer to or from a floppy disk crosses a 64k boundary, we have to use a bounce buffer for the actual transfer to avoid crossing a 64k boundary. To do this, we malloc a buffer twice as big as we need and then find an aligned block within that buffer to do the transfer. The check to see which part of the block we use used the wrong variable for part of the condition meaning that in certain edge cases we would ask the BIOS to cross a 64k boundary. The BIOS request would then fail resulting in file transfers that just magically fail in the middle without any apparent reason. Specifically, my tests for the splitfs boot floppies managed to trigger this edge case.
MFC after: 1 week X-MFC-info: along with fixes to libstand filesystems
|
120118 |
16-Sep-2003 |
bde |
Don't repeat selected defines from ns16550.h or sioreg.h. Just include ns16550.h. The missing installation of ns16550.h was fixed long ago and the misplaced defines in sioreg.h were fixed recently.
|
119482 |
25-Aug-2003 |
obrien |
Use __FBSDID(). Also some minor copyright style cleanups.
|
118607 |
07-Aug-2003 |
jhb |
Consistently use the BSD u_int and u_short instead of the SYSV uint and ushort. In most of these files, there was a mixture of both styles and this change just makes them self-consistent.
Requested by: bde (kern_ktrace.c)
|
118604 |
07-Aug-2003 |
njl |
Null terminate the OEM hint. This rids my laptop of the smiley face that would follow the 6 valid chars of the table entry.
|
117529 |
13-Jul-2003 |
njl |
Add include file so this builds with new acpica
Reported by: Kevin Oberman <oberman@es.net>
|
117160 |
02-Jul-2003 |
ru |
Revert non-style part of the recent two deltas that dealt with using as(1) to compile plain assembler source files; bsd.lib.mk has been fixed (in revision 1.147).
|
116451 |
16-Jun-2003 |
iedowse |
When looking for the ':' separator in the root path, don't go past the terminating '\0'. Since the initialisation of rootpath in libstand/bootp.c may copy junk into the rest of the buffer, it was possible for the code to find a ':' after the '\0' and do the wrong thing.
Reviewed by: ps MFC after: 1 week
|
115964 |
07-Jun-2003 |
obrien |
Add ${AFLAGS} to 'as' invocation.
|
115670 |
02-Jun-2003 |
obrien |
Don't use a C compiler to assemble a pure asm file.
|
115091 |
17-May-2003 |
peter |
Fix a bug in the AMD64 trampoline. I misunderstood the implicit 32->64 bit zero extend. This changes a movl to an orq.
Approved by: re (amd64 bits)
|
114933 |
12-May-2003 |
peter |
Revert leftover AMD64 disable-acpi-module stuff.
|
114920 |
11-May-2003 |
peter |
For amd64 kernels, repeat the 1GB mapping over the entire address space instead of just at 0GB and 1GB marks. This gives more flexibility for the choice of KERNBASE.
Approved by: re (amd64 stuff)
|
114385 |
01-May-2003 |
peter |
Argh. This was broken by the last-minute elf32/elf64/"elf kernel" changes.
|
114380 |
01-May-2003 |
peter |
Nuke; repocopied to elf32_freebsd.c where it lives on.
|
114379 |
01-May-2003 |
peter |
Enable the i386 loader to load and run an amd64 kernel. If this puts things over floppy size limits, I can exclude it for release builds or something like that. Most of the changes are to get the load_elf.c file into a seperate elf32_ or elf64_ namespace so that you can have two ELF loaders present at once. Note that for 64 bit kernels, it actually starts up the kernel already in 64 bit mode with paging enabled. This is really easy because we have a known minimum feature set.
Of note is that for amd64, we have to pass in the bios int 15 0xe821 memory map because once in long mode, you absolutely cannot make VM86 calls. amd64 does not use 'struct bootinfo' at all. It is a pure loader metadata startup, just like sparc64 and powerpc. Much of the infrastructure to support this was adapted from sparc64.
|
114339 |
30-Apr-2003 |
peter |
ACPI will always be present on AMD64 - it will never be an autodetect module.
|
114246 |
29-Apr-2003 |
njl |
Support functions for the new ACPI import. * AcpiOsDerivePciId(): finds a bus number, given the slot/func and the acpi parse tree. * AcpiOsPredefinedOverride(): use the sysctl hw.acpi.os_name to override the value for _OS.
Ideas from: takawata, jhb Reviewed by: takawata, marcel Tested on: i386, ia64
|
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.
|
109559 |
20-Jan-2003 |
phk |
Use NEXTDOSPART instead of MAX_SLICES.
|
106385 |
03-Nov-2002 |
phk |
Correctly recognize both bogus and genuine BSD disklabels.
Don't expect me to participate in a discussion which is which.
Sponsored by: DARPA & NAI Labs.
|
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.
|
103870 |
23-Sep-2002 |
alfred |
use __packed.
|
102960 |
05-Sep-2002 |
iwasaki |
Parse hint.acpi.0.disabled correctly. Now that hint.acpi.0.disabled="0" won't disable acpi as expected.
Pointed-out by: bde
|
102612 |
30-Aug-2002 |
iwasaki |
s/hint.acpi.0.disable/hint.acpi.0.disabled/
Fix device hints entry for disabling acpi(4). This also should fix the arbitration with apm(4) when both drivers are enabled.
Note that your /boot/device.hints needs to be updated if you want to stop auto-loading acpi.ko or disable acpi(4).
|
102588 |
29-Aug-2002 |
peter |
Actually remove the stale a.out kld support. This is the stuff that was never updated for the metadata infrastructure.
|
102556 |
29-Aug-2002 |
peter |
Initiate deorbit burn of i386 a.out kld "support" in loader. Note that this was quite broken, it never was updated for metadata support. The a.out kld file support was never really used, as it wasn't necessary. You could always load elf kld's, even in an a.out kernel.
|
101558 |
09-Aug-2002 |
obrien |
Restore autoloading of ACPI module.
Document the approved ways of disabling it. Submitted by: Daniel O'Connor <doconnor@gsoft.com.au>
|
101556 |
09-Aug-2002 |
obrien |
Don't auto load ACPI -- it causes trouble with my laptop and is TOTALLY undocumented how to control its loading and queries to freebsd-current go unanswered.
|
99682 |
09-Jul-2002 |
iwasaki |
Resolve conflicts arising from the ACPI CA 20020611 import.
|
99170 |
30-Jun-2002 |
iwasaki |
Fix a build problem for the ACPI CA 20020404 import. Add definition of COMPILER_DEPENDENT_INT64 and also fix definition of COMPILER_DEPENDENT_UINT64.
Pointed-out by: Michael Nottebrock <michaelnottebrock@gmx.net>
|
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>
|
98472 |
20-Jun-2002 |
peter |
Add boot_serial and boot_multicons variables to set RB_SERIAL and RB_MULTIPLE since this seems to be the easiest way to add these flags for non-forth loaders etc.
|
96843 |
18-May-2002 |
phk |
Fix one of the va_arg() with less than int sized type probelms.
|
96654 |
15-May-2002 |
jhay |
DEV_BSIZE lives in sys/param.h and not in machine/param.h anymore.
|
96513 |
13-May-2002 |
ru |
Removed now unused INTERNALSTATICLIB. INTERNALLIB now implies NOPIC and NOPROFILE. Removed gratuitous NOMAN.
|
96455 |
12-May-2002 |
obrien |
Back out last commit. I expect our bsd.*.mk gods to remove the need for defining so many extra things in addition to INTERNALLIB. We don't like repetitive C code and we shouldn't for make code either.
|
96415 |
11-May-2002 |
obrien |
NOPIC, NOPROFILE, NOMAN, and INTERNALSTATICLIB are redundant when using INTERNALLIB now.
|
96306 |
10-May-2002 |
obrien |
-ffreestanding is the word for /sys.
|
88874 |
04-Jan-2002 |
jhb |
Don't turn on RB_CDROM if the rootdev is a BIOS cd device for now as this breaks when cdboot is used with an MFS root.
|
87633 |
11-Dec-2001 |
jhb |
Add support for writing to BIOS disks.
PR: kern/32389 Submitted by: Jonathan Mini <mini@haikugeek.com> Sponsored by: ClickArray, Inc.
|
87620 |
10-Dec-2001 |
guido |
Add new boot flag to i386 boot: -p. This flag adds a pausing utility. When ran with -p, during the kernel probing phase, the kernel will pause after each line of output. This pausing can be ended with the '.' key, and is automatically suspended when entering ddb.
This flag comes in handy at systems without a serial port that either hang during booting or reser. Reviewed by: (partly by jlemon) MFC after: 1 week
|
87599 |
10-Dec-2001 |
obrien |
Update to C99, s/__FUNCTION__/__func__/, also don't use ANSI string concatenation.
|
86091 |
05-Nov-2001 |
jhb |
Add a device driver for the BIOS device for CD-ROM's booted via El Torito no emulation mode. Unlike other BIOS devices, this device uses 2048 byte sectors. Also, the bioscd driver does not have to worry about slices or partitions.
|
85376 |
23-Oct-2001 |
jlemon |
Set RB_MULTIPLE (multiple console support) if the kernel is booted with the -D flag.
|
84461 |
04-Oct-2001 |
jhb |
Whitespace fixes.
|
84371 |
02-Oct-2001 |
yokota |
Fix the ANSI color escape sequence \E[m.
- Corretly map the ansi color number to a PC BIOS color. - Handle multiple arguments to the escape sequence.
|
84354 |
02-Oct-2001 |
yokota |
Fix the local macro: isvisible().
- The space char (0x20) IS a visible char :-)
|
84277 |
01-Oct-2001 |
yokota |
Fix the function CD(): "Clear to the end of the screen".
- When the video BIOS is called to clear the region (x, y)-(79, 24) (by scrolling), the slashed region in Fig.1 is cleared. CD() is supposed to clear the region shown in Fig.2. x x +-------+ +-------+ | | | | y| ////| y| ////| | ////| |///////| | ////| |///////| +-------+ +-------+ Fig.1 Fig.2
- Don't move the cursor during this operation.
|
84276 |
01-Oct-2001 |
yokota |
This is white-space only change. No functional difference.
- Be consistent about placing spaces around keywords and operators; don't mix statements like "if(A==B)" and "if (X == Y)", "return(0)" and "return (-1)", "P=10" and "Q = 0", etc.
- Consitently indent lines. It's not good to indent by 8 columns in one part of the file, and by 4 columns in the other part.
|
83321 |
11-Sep-2001 |
peter |
Implement the long-awaited module->file cache database. A userland tool (kldxref(8)) keeps a cache of what modules and versions are inside what .ko files. I have tested this on both Alpha and i386.
Submitted by: bp
|
82531 |
30-Aug-2001 |
msmith |
Teach the loader how to find the system ACPI information, and autoload the ACPI module if the system apperars to be ACPI compliant.
This is an initial cut; the load should really be done by Forth support code, and we should check both the BIOS build date and a blacklist.
|
80203 |
23-Jul-2001 |
kris |
s/adress/address/
Inspired by: OpenBSD MFC After: 1 week
|
74265 |
14-Mar-2001 |
ps |
Don't set the gateway address if the netmask is zero or we're on the same network. PXE does not do netmask calculations, so if the gateway is set it will use it.
Submitted by: peter & FreeBSD cluster ACLs
|
72640 |
18-Feb-2001 |
asmodai |
Preceed/preceeding are not english words. Use precede or preceding.
|
68362 |
05-Nov-2000 |
ps |
Honor the ip address given in the root-path dhcp option.
PR: 21743 Submitted by: Brian Candler <B.Candler@pobox.com>
|
68264 |
02-Nov-2000 |
jhb |
The Number of Fixed Disks at memory location 0x475 is only 1 byte, not a 2 byte word. This fixes machines that probe 30-odd hard drives during boot in the loader.
Submitted by: Helpful folks at Tyan via ps
|
66133 |
20-Sep-2000 |
archie |
Add support for the "nullconsole" console type, for systems with neither a video console nor a serial port. Use it if the RB_MUTE flag is set.
Submitted by: Doug Ambrisko <ambrisko@whistle.com> Reviewed by: jhb
|
65498 |
05-Sep-2000 |
msmith |
Export the salient configuration items in a non-pxe-specific namespace to allow commonality between varying platforms. This is a step towards parsing the diskless configuration information with MI code inside the kernel.
Export the interface hardware address to the kernel, so that it is possible to determine the boot interface with certainty.
Export the NFS filehandle for the root mount to the kernel, so that the kernel does not need to perform a mount RPC call.
|
64527 |
11-Aug-2000 |
ps |
Add support to send the string 'PXEClient' as the Vendor class identifier to the DHCP server. Now you can check for this string in your dhcp configuration to decide whether you will hand out a lease to the client or not.
|
64522 |
11-Aug-2000 |
ps |
Pass along the interesting variables we were given from DHCP so we can utilize them in the kernel and with kenv.
|
64187 |
03-Aug-2000 |
jhb |
Cleanup warnings. Most of these are signed/unsigned warnings, as well as some added const's.
|
64186 |
03-Aug-2000 |
jhb |
Fix several BDECFLAGS warnings. Also, actually use the 'verbose' parameter for lsdev when printing out slice information. Now, you only get the sizes and LBA's of slices if you use 'lsdev -v'.
|
61823 |
19-Jun-2000 |
jhb |
- Add some more details to the 'lsdev' output for FAT file systems. - Add in support for the EDD (Enhanced Disk Drive) BIOS extensions to use LBA mode for accessing drives past cylinder 1024. This should allow us to load a kernel from anywhere on a newer drive up to 2 TB. Part of this came from the PR below.
PR: i386/13847 Submitted by: Tor Egge <Tor.Egge@fast.no>
|
61659 |
14-Jun-2000 |
ps |
Delay calling the device cleanup routines until the absolute last moment. We were cleaning up after PXE too early and the module dependancy code would not be able to load any files if it needed too.
|
59855 |
01-May-2000 |
ps |
Wrap the failure warnings around PXE_DEBUG in the cleanup routine. It does not matter if they fail, so dont print anything about it unless we are debugging.
|
59854 |
01-May-2000 |
bp |
Update loader logic to distinguish modules vs. files. Add support for module metadata. The old way of dependancy handling will be supported for a while.
Reviewed by: peter
|
59768 |
29-Apr-2000 |
ps |
Fall back to /pxeroot as the location of the NFS exported directory if we are not given one by dhcp. Remove extra includes while I am here.
Reminded by: jlemon
|
59767 |
29-Apr-2000 |
jlemon |
Teach the loader about the ext2fs filesystem, extended partitions, and the new readdir function.
|
59686 |
27-Apr-2000 |
ps |
Make PXE do a dhcp request to find out where its files are. The DHCP server is no longer required to also act as the NFS/TFTP server.
|
59673 |
27-Apr-2000 |
ps |
Don't report errors when we UDP_WRITE fails with a status of 1.
|
59644 |
26-Apr-2000 |
ps |
Bring support in for Intel Wired for Management 1.1 (PXE 0.99 and below). This did not work previously because interrupts were disabled when PXE calls were being made, and they must be enabled. This should also allow us to be compliant with all newer PXE rom's from Intel.
For PXE 0.99, this has been tested using the Intel N440BX motherboard and I am confident it will work on the Intel L440GX motherboard.
Lots of help/information from: jhb, peter
I would like to thank Michael Johnston <michael.johnston@intel.com>, Mike Henry <mike.henry@intel.com>, and all the other PXE developers at Intel for their help, and information in helping solve this problem.
|
59473 |
21-Apr-2000 |
ps |
Move the building of the PXE module into libi386.
|
59456 |
21-Apr-2000 |
ps |
Make the loader a little smarter about when it is and is not allowed to call PXE.
|
59455 |
21-Apr-2000 |
ps |
Don't call the PXE cleanup routine if PXE is not enabled. This should fix the "Invalid partition table" error people were seeing.
|
59408 |
20-Apr-2000 |
ps |
Add a cleanup function. This is needed for PXE where you should shutdown the UNDI and unload the stack.
|
59390 |
19-Apr-2000 |
ps |
Use !PXE api over PXENV+ api. Magic trampoline by: peter (at 4am and after a good whipping at airhockey) Do a better job of returning and detecting errors.
|
59100 |
08-Apr-2000 |
jkh |
Nuke duplicate struct declaration from somebody's paste-o
|
59087 |
08-Apr-2000 |
ps |
Make PXE use the UDP API. This allows for both TFTP and NFS support. You may specify TFTP or NFS via compile time options in the loader, but not both at this time.
Also, remove a warning about not knowing how to boot from network devices. We can obviously do that now.
|
58999 |
04-Apr-2000 |
ps |
Add a missing PXE API call and structure.
|
58993 |
04-Apr-2000 |
ps |
Add all the PXE related structures from the 2.1 PXE spec from Intel. Fix exsisting code to match the spec.
|
58713 |
28-Mar-2000 |
jhb |
Mega i386 loader commit. - Don't hard code 0x10000 as the entry point for the loader. Instead add src/sys/boot/i386/Makefile.inc which defines a make variable with the entry point for the loader. Move the loader's entry point up to 0x20000, which makes PXE happy. - Don't try to use cpp to parse btxldr for the optional BTXLDR_VERBOSE, instead use m4 to achieve this. Also, add a BTXLDR_VERBOSE knob in the btxldr Makefile to turn this option on. - Redo parts of cdldr's Makefile so that it now builds and installs cdboot instead of having i386/loader/Makefile do that. Also, add in some more variables to make the pxeldr Makefile almost identical and thus to ease maintainability. - Teach cdldr about the a.out format. Cdldr now parsers the a.out header of the loader binary and relocates it based on that. The entry point of the loader no longer has to be hardcoded into cdldr. Also, the boot info table from mkisofs is no longer required to get a useful cdboot. - Update the lsdev function for BIOS disks to parse other file systems (such as DOS FAT) that we currently support. This is still buggy as it assumes that a floppy with a DOS boot sector actually has a MBR and parses it as such. I'll be fixing this in the future. - The biggie: Add in support for booting off of PXE-enabled network adapters. Currently, we use the TFTP API provided by the PXE BIOS. Eventually we will switch to using the low-level NIC driver thus allowing both TFTP and NFS to be used, but for now it's just TFTP.
Submitted by: ps, alfred Testing by: Benno Rice <benno@netizen.com.au>
|
58098 |
15-Mar-2000 |
jhb |
Remove some extra spammage that made it into this commit. This will be revisited later with a better fix, or at least one that compiles. :)
Approved by: dcs
|
58081 |
15-Mar-2000 |
dcs |
Pass an unit number to bcache_strategy, so it can flush the cache when necessary. Pass an absolute block number too, instead of receiving a relative one in realstrategy(), as bcache_strategy() requires this.
The fix is sligthly different from the one in the PR.
PR: 17098 Submitted by: John Hood <jhood@sitaranetworks.com>
|
55211 |
29-Dec-1999 |
msmith |
Substantially revamp the way that we determine the amount of memory available for our use. Use the same search order for BIOS memory size functions as the kernel will later use.
Allow the loader to use all of the detected physical memory (this will greatly help people trying to load enormous memory disk images).
More correctly handle running out of memory when loading an object.
Use the end of base memory for the top of the heap, rather than blindly hoping that there is 384k left.
Add copyrights to a couple of files I forgot.
|
54294 |
08-Dec-1999 |
phk |
Remove BAD144 support, it has already been disabled for some time.
|
52395 |
19-Oct-1999 |
dcs |
Make the "machine" target a prequisite to all source files.
Hinted-at by: bde
|
50477 |
28-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
48952 |
21-Jul-1999 |
msmith |
Walk around the end of all the silly guessing of device types and unit numbers that we have been doing in the past, and read /etc/fstab off the proposed root filesystem to determine the actual device name and vfs type for the root filesystem. These are then exported to the kernel via the environment variable vfs.root.mountfrom.
|
48083 |
21-Jun-1999 |
rnordier |
Fill in bi_bios_geom[] in the bootinfo structure passed to the kernel. This should resolve the problem raised in PR 12315, and incidentally makes it easier to determine what geometry the BIOS is actually using (by way of boot -v and dmesg).
|
47727 |
04-Jun-1999 |
ghelmer |
Modify the boot loader to recognize the -C flag and pass the RB_CDROM flag to the kernel to mount a CDROM as the root filesystem. Alternatively, the boot_cdrom env var can be set.
As Mike Smith noted, "-C is the "wrong" way to do this", but this is an acceptable stopgap in lieu of a better way.
PR: bin/11884 Reviewed by: msmith@freebsd.org
|
44861 |
18-Mar-1999 |
dcs |
Avoid copying m_args if none exists. (Perhaps this is a better solution, Doug?)
|
44572 |
08-Mar-1999 |
dcs |
Add MODINFO_ARGS, parameters passed to a module at load time.
VS: ----------------------------------------------------------------------
|
43205 |
25-Jan-1999 |
rnordier |
Fix a couple of further bugs: missing argument to sprintf() and "==" used for "=".
|
43137 |
24-Jan-1999 |
msmith |
Bleh. Missing 'unit =' doesn't help legacy num_ide_disks code.
PR: bin/9651 Submitted by: "Daniel C. Sobral" <dcs@newsguy.com>
|
43114 |
24-Jan-1999 |
msmith |
biosdisk.c Implement a new variable 'root_disk_unit' which supersedes 'num_ide_disks' and makes it possible to explicitly set the root device unit number regardless of type considerations.
bootinfo.c If we can't calculate a dev_t for the root disk, complain and don't proceed to boot with an invalid boot device.
|
43068 |
22-Jan-1999 |
rnordier |
Fix read error not being detected.
|
42488 |
10-Jan-1999 |
steve |
Remove redundant line of code.
PR: 9364 Submitted by: Daniel C. Sobral <dcs@newsguy.com>
|
42480 |
10-Jan-1999 |
rnordier |
Use etc/make.conf settings for serial port and speed.
Submitted by: rvb Reviewed by: bde
|
42419 |
09-Jan-1999 |
msmith |
Extend bd_print() so that it displays slices and partitions on disks.
|
42291 |
04-Jan-1999 |
peter |
Fix a potential sign extension bug on 8-bit chars. Outputting a backspace isn't supposed to be destructive.. It isn't on most terminals, nor on the standard bios output (vs. TERM_EMU mode)
|
42207 |
31-Dec-1998 |
abial |
Add back ability to make beeps when using new TERM_EMU.
Submitted by: W Gerald Hicks <wghicks@bellsouth.net>
|
42002 |
22-Dec-1998 |
abial |
Add simple terminal emulator, compatible with cons25. Currently supported capabilities are: AF, AB, cm, ho, me, cd. The code is hidden behind -DTERM_EMU - should it cause any problems, you can remove this define to get back the old behaviour.
You'll find some examples how to use it in src/share/examples/bootforth.
Reviewed by: jkh
|
41285 |
22-Nov-1998 |
rnordier |
Drop use of BIOS int 0x14 services in favor of direct port I/O.
Feedback and testing: Adrian Filipi-Martin <adrian@ubergeeks.com>
|
41139 |
13-Nov-1998 |
msmith |
Add a new variable $num_ide_disks which is used to offset the unit number for SCSI disks when converting from BIOS unit numbers to da unit numbers.
Prompted by Kevin Street <street@iname.com>
|
40834 |
02-Nov-1998 |
msmith |
Implement a simple LRU block cache. By default this is initialised to 16k, and will bypass transfers for more than 8k. Blocks are invalidated after 2 seconds, so removable media should not confuse the cache.
The 8k threshold is a compromise; all UFS transfers performed by libstand are 8k or less, so large file reads thrash the cache. However many filesystem metadata operations are also performed using 8k blocks, so using a lower threshold gives poor performance.
Those of you with an eye for cache algorithms are welcome to tell me how badly this one sucks; you can start with the 'bcachestats' command which will print the contents of the cache and access statistics.
|
40775 |
31-Oct-1998 |
msmith |
- Add a new command 'lsdev' to list devices which might be likely to host filesystems. - New 'help' command and data in the help.* files (not yet installed), provides topic and subtopic help, indexes, etc. - Don't crash if the user tries to set an invalid console. Be helpful instead. - Expand tabs (badly) on the i386 video console. - Some minor cosmetic changes.
|
40753 |
30-Oct-1998 |
luoqi |
Fix an uninitialized variable in the `dangerously dedicated disk' case.
|
40705 |
28-Oct-1998 |
msmith |
Simplify the "is a character ready" test, so that we don't return a false negative for keypresses with zero ascii values. This is in line with the comconsole test, rather than being more ambitious.
Submitted by: rnordier
|
40619 |
23-Oct-1998 |
msmith |
Remove a debugging copy of offsetof() that snuck in.
|
40617 |
23-Oct-1998 |
msmith |
PnP enumerator using the PCI BIOS. This is needlessly complex due to the lack of a simple "enumerate all PCI devices" function.
|
40601 |
22-Oct-1998 |
msmith |
PnP BIOS enumerator; mostly useful for hunting PnP devices that are supported by the system BIOS rather than supporting ISA PnP.
|
40599 |
22-Oct-1998 |
msmith |
Add biospnp.c
|
40554 |
21-Oct-1998 |
msmith |
Don't depend on being part of the kernel tree. If we are, use the kernel's <machine> includes rather than the system's.
|
40393 |
15-Oct-1998 |
peter |
Get the last used address via a more conservative method, don't depend on the module chain being in increasing address order.
|
40338 |
14-Oct-1998 |
peter |
Try and get the sys/* and machine/* includes via relative paths. This saves having to do a 'make includes' after touching any header file for the boot code.
|
40336 |
14-Oct-1998 |
peter |
Align to sizeof(long) rather than sizeof(int32_t). It needs to be long because this code is shared with the alpha. I hope the alpha can read 32 bit ints at 32 bit alignment (vs. 64 bit alignment).
|
40216 |
11-Oct-1998 |
peter |
Fix a warning that's been bugging me for ages.
|
40212 |
11-Oct-1998 |
peter |
Only call vidc_init() once (unless forced). Cosmetic change to the init-time character eater (like, make it increment the index counter - if there's a problem, it would sit there in an infinite loop instead of only running 10 times).
|
40211 |
11-Oct-1998 |
peter |
Fix comconsole mode. The int 0x14 read and status commands were reversed. Also, make sure we set %dx each time around otherwise the commands suddenly start trying to work on things like com92 instead of com1. Make sure comc_init() is only run once. Cosmetic change to init-time character eater.
|
40210 |
11-Oct-1998 |
peter |
Warn that one of the DEBUG statements has a v86 recursion bug.
|
40209 |
11-Oct-1998 |
peter |
Fix comment to match code
|
40146 |
09-Oct-1998 |
peter |
Attempt to at least align MODINFO_* blocks. IMHO, decoding this stuff should be MD code since one day we'll have to recover pages from deleted preload data. MI code can't be expected to know how to deal with pmap internals, assuming it gets done via pmap that is. :-)
|
40145 |
09-Oct-1998 |
peter |
Turn symbol table info passing back on, although it's probably not particularly useful in this form. KLD can deal with it much better. setenv kernelname moved earlier.
|
40144 |
09-Oct-1998 |
peter |
Remove kernelname setenv, the common code does it. Use the metadata for symtab pointers, mainly to keep it common with elf_freebsd.c.
|
40107 |
09-Oct-1998 |
msmith |
Remove some debugging code. Do a much better job of DWIM with partial device specifications. Fix the module metadata build process, which was completely broken. Use a larger read buffer when copying large objects in; this improves performance marginally and will avoid flushning any small caches we might choose to implement.
|
40034 |
07-Oct-1998 |
peter |
Fix that pesky boot aguments parsing bug. (I think :-)
|
40032 |
07-Oct-1998 |
msmith |
Request the flags back when checking for keyboard status. Submitted by: rnordier
|
40016 |
07-Oct-1998 |
msmith |
- Drain the keyboard buffer when initialising. - Be pedantic about the return from int 16 fn 01.
|
39989 |
06-Oct-1998 |
msmith |
bootinfo.c Strip any device name information from the kernel name before passing it in.
biosdisk.c Be more strict about matching device names to slice entries. Only allow unsliced syntax on unsliced disks.
|
39960 |
04-Oct-1998 |
msmith |
Don't include ELF symbol information yet - it causes the ELF DDB to explode.
|
39943 |
04-Oct-1998 |
msmith |
biosdisk.c Allocate space for, and copy, NDOSPART slice entries from the MBR, not just one. Add some extra debugging while we're at it.
elf_freebsd.c Initialise the symbol table start/end pointers in case we don't have them.
|
39919 |
03-Oct-1998 |
rnordier |
bootinfo bi_vesa no longer exists.
|
39902 |
02-Oct-1998 |
msmith |
Consolidate the bootinfo-loading code, greatly simplifying the _exec functions.
|
39896 |
02-Oct-1998 |
msmith |
aout_freebsd.c Use bd_getdev() to work out a dev_t for the root device. Allow $rootdev to override $currdev as the root device.
biosdisk.c Save the slice table and disklabel when opening a disk. Add bd_getdev(), which attempts to return a dev_t corresponding to a given device. Cases which it still doesn't get right: - The inevitable da-when-wd-also-exists - Disks with no slice table (the slice number is not set correctly) The first is difficult to get right, the second will be fixed in an upcoming commit.
comconsole.c vidconsole.c getchar() should return an 8-bit value; some BIOSsen pack extra information in %eax.
libi386.h Remove some stale prototypes, add new ones.
|
39887 |
02-Oct-1998 |
peter |
First shot at loading elf symbols. Things are a bit strange because of the ..umm.. "wierd" way binutils lays out the file. The section headers are nearly at the end of the file and this is a problem when loading from a .gz file which can't seek backwards (or has a limited reverse seek, ~2K from memory).
This is intended to be compatable with the ddb/db_elf.c code and the alpha/libalpha/elf_freebsd.c layout. I've studied these (which are NetBSD derived) but did it a bit differently. Naturally the process is similar since it's supposed to end up with the same result.
|
39850 |
30-Sep-1998 |
peter |
Stop libi386.a from being installed..
|
39833 |
30-Sep-1998 |
peter |
i386 ELF loader startup backend. On an ELF kernel booted with the 3-stage bootblocks, the kernel shows up as the primary module:
[3:24am]~-100# kldstat Id Refs Address Size Name 1 1 0xf0100000 ff00000 /kernel ^^^^ oops.. :-)
Based heavily on aout_freebsd.c. Hmm.. There's so much in common that these could probably be combined and just check the metadata to see which format it is.
|
39832 |
30-Sep-1998 |
peter |
Save booted kernel name. Cosmetic cleanups.
|
39831 |
30-Sep-1998 |
peter |
Fix typos.. The vector for "int 0x12" (get base mem) is not written in hex as "0x1a". :-) Fix a comment about the extended memory checks, that's int 0x15.
|
39756 |
29-Sep-1998 |
peter |
The bootinfo struct was getting clobbered or not passed through correctly. Presumably VTOP doesn't work for static objects. The easiest way to get it working was to reserve some space after the environment strings and copy the bootinfo struct there. Also, set RB_BOOTINFO, it's needed.
I got the code to load and run an unmolested kernel OK for the first time with this system a few minutes ago - at last!. I did have to stop it looking at the floppy though as BTX was trapping a mode 14 fault when it look for /boot/boot.conf when no disk was in the drive. (I'm booting from a scsi disk (bios disk 0x80)).
Now to teach it about ELF and modules :-)
|
39733 |
28-Sep-1998 |
peter |
Only bcopy the correct amount of data from the buffer in case it is ever in an overrun situation.
|
39731 |
28-Sep-1998 |
peter |
Reactivate the a.out kernel loader code.
|
39730 |
28-Sep-1998 |
peter |
Missing return value that was kinda important.
|
39729 |
28-Sep-1998 |
peter |
Argh, I don't believe how much time I wasted looking for this... Bytes of extended memory = (extkb * 1024), not (extkb + 1024)
|
39724 |
28-Sep-1998 |
peter |
MBR magic is 0x55aa not 0xffaa.
|
39723 |
28-Sep-1998 |
peter |
Precedence bug (?) causing probe problems.
|
39673 |
26-Sep-1998 |
dfr |
* Add old UFS compatibility code to alpha/boot1. * Fix a raft of warnings, printf and otherwise. * Allocate the correct amount in mod_searchmodule to prevent an overflow. * Fix the makefiles so they work outside my home directory (oops).
|
39662 |
26-Sep-1998 |
msmith |
The BIOS can't perform a floppy operation where the destination crosses a physical 64k boundary. Allocate a bounce buffer for such a transaction.
|
39473 |
19-Sep-1998 |
msmith |
- Improve debugging code. - Make the "what do we do with a drunken disklabel" if-then-else-regardless tangle easier to read. - Don't count on the v86 structure being preserved between loop iterations, as it may be trampled eg. by the DEBUG call.
|
39449 |
18-Sep-1998 |
msmith |
Synch with development version. Compiles and opens but doesn't work yet.
|
39447 |
18-Sep-1998 |
msmith |
We lost all the files in crt/, so define the BIOS sector size here instead.
|
39441 |
17-Sep-1998 |
msmith |
Initial integration of the i386 bootloader and BTX.
- Discard large amounts of BIOS-related code in favour of the more compact BTX vm86 interface. - Build the loader module as ELF, although the resulting object is a.out, make gensetdefs 32/64-bit sensitive and use a single copy of it. - Throw away installboot, as it's no longer required. - Use direct bcopy operations in the i386_copy module, as BTX maps the first 16M of memory. Check operations against the detected size of actual memory.
|
39178 |
14-Sep-1998 |
msmith |
Resynch with working sources before BTX integration.
- Use format-independant module allocator. - Conditionalise ISA PnP support. - Simplify PnP enumerator interface. - Improve module/object searching. - Add missing depend/install targets in BTX makefiles. - Pass the kernel environment and module data in extended bootinfo fields. - Add a pointer to the end of the kernel + modules in bootinfo. - Fix parsing of old-style kernel arguments.
|
38764 |
03-Sep-1998 |
msmith |
Bootstrap updates.
- Move some startup code from MD to MI sections - Add a 'copyout' and some copyout-related functions. These will be obsoleted when BTX is available for the 386 and the kernel load area becomes directly addressable. - Add the ability load an arbitrary file as a module, associating and arbitrary type string with it. This can be used eg. for loading splash-screen images etc. - Add KLD module dependancy infrastructure. We know how to look for dependancies inside KLD modules, how to resolve these dependancies and what to do if things go wrong. Only works for a.out at the moment, due to lack of an MI ELF loader. Attach KLD module information to loaded modules as metadata, but don't pass it to the kernel (it can find it itself). - Load a.out KLD modules on a page boundary. Only pad the a.out BSS for the kernel, as it may want to throw symbols away. (We might want to do this for KLD modules too.) - Allow commands to be hidden from the '?' display, to avoid cluttering it with things like 'echo'. Add 'echo'. - Bring the 'prompt' command into line with the parser syntax. - Fix the verbose 'ls'; it was using an uninitialised stack variable. - Add a '-v' flag to 'lsmod' to have it display module metadata as well (not terribly useful for the average user) - Support a 'module searchpath' for required modules. - The bootstrap file on i386 is now called 'loader' to permit the /boot directory to use that name. - Discard the old i386 pread() function, as it's replaced by arch_readin()
|
38712 |
31-Aug-1998 |
msmith |
Bootloader update.
- Implement a new copyin/readin interface for loading modules. This allows the module loaders to become MI, reducing code duplication. - Simplify the search for an image activator for the loaded kernel. - Use the common module management code for all module metadata. - Add an 'unload' command that throws everything away. - Move the a.out module loader to MI code, add support for a.out kld modules.
Submitted by: Alpha changes fixed by Doug Rabson <dfr@freebsd.org>
|
38466 |
21-Aug-1998 |
msmith |
This commit was generated by cvs2svn to compensate for changes in r38465, which included commits to RCS files with non-trunk default branches.
|
38465 |
21-Aug-1998 |
msmith |
This is the new unified bootstrap, sometimes known previously as the 'three-stage' bootstrap. There are a number of caveats with the code in its current state: - The i386 bootstrap only supports booting from a floppy. - The kernel and kld do not yet know how to deal with the extended information and module summary passed in. - PnP-based autodetection and demand loading of modules is not implemented. - i386 ELF kernel loading is not ready yet. - The i386 bootstrap is loaded via an ugly blockmap.
On the alpha, both net- and disk-booting (SRM console machines only) is supported. No blockmaps are used by this code.
Obtained from: Parts from the NetBSD/i386 standalone bootstrap.
|