331928 |
03-Apr-2018 |
eugen |
MFC r331630: Fix instructions in the zfsboot manual page.
zfsloader(8) fails to probe a slice containing ZFS pool if its second sector contains traces of BSD label (DISKMAGIC == 0x82564557). Fix manual page to show working example erasing such traces.
_M . M sys/boot/i386/zfsboot/zfsboot.8 |
319025 |
28-May-2017 |
ngie |
MFC r309412,r316109,r316132:
r309412 (by imp):
dd is currently a bootstrap tool. It really doesn't have any business being a bootstrap tool. However, for reproducible build output, FreeBSD added dd status=none because it was otherwise difficult to suppress the status information, but retain any errors that might happen. There's no real reason that dd has to be a build tool, other than we use status=none unconditional. Remove dd from a bootstrap tool entirely by only using status=none when available. This may also help efforts to build the system on non-FreeBSD hosts as well.
r316109:
Don't hardcode input files for stage 1/2 bootloaders; use .ALLSRC instead
This is a better pattern to follow when creating the bootloaders and doing the relevant space checks to make sure that the sizes aren't exceeded (and thus, copy-pasting is a bit less error prone).
r316132:
Parameterize out 7680 (15 * 512) as BOOT2SIZE, similar to sys/boot/i386/zfsboot/...
This is being done to make it easier to change in the future--this action might be needed sooner rather than later because of gcc 6.3.0 bailing, stating that there is negative free space left (deficit) in the boot2 bootloader. |
308915 |
21-Nov-2016 |
avg |
MFC r308089: zfsbootcfg: a simple tool to set next boot (one time) options for zfsboot
There is a branch-specific change in sbin/zfsbootcfg/Makefile because of LIBADD vs LDADD/DPADD. |
307203 |
13-Oct-2016 |
sephe |
MFC 305588
pxeboot: Add nfs.read_size tunable.
Increase this tunable improves kernel loading speed.
Submitted by: Jun Su <junsu microsoft com> Reviewed by: rpokala, wblock (previous version) Obtained from: DragonFlyBSD Sponsored by: Microsoft Differential Revision: https://reviews.freebsd.org/D7756 |
306378 |
27-Sep-2016 |
pluknet |
MFC r274925: misc mdoc fixes. |
305615 |
08-Sep-2016 |
pfg |
MFC r303891, r303892: sys: replace comma with semicolon when pertinent.
Uses of commas instead of a semicolons can easily go undetected. The comma can serve as a statement separator but this shouldn't be abused when statements are meant to be standalone. |
305458 |
06-Sep-2016 |
avg |
MFC r303738: report sector size and number of sectors in lsdev output for bios disks |
301056 |
31-May-2016 |
ian |
MFC r297147, r297148, r297149, r297150, r297151:
Make both the loader and kernel use the interface-mtu option if the dhcp server provides it. Made up of these (semi-)related changes...
[kernel...] If the dhcp server provides an interface-mtu option, parse the value and set that mtu on the interface.
[libstand...]
Garbage collect the bswap routines from libstand, use sys/endian.h.
If the dhcp server delivers an interface-mtu option, parse it and store the value in a new global intf_mtu for use by the application.
[loader...]
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.
PR: 187094 |
300464 |
23-May-2016 |
ngie |
MFC r299659:
Remove unused const variable |
300460 |
23-May-2016 |
ngie |
MFC r299655:
Add missing prototype for getchar(..) |
295835 |
20-Feb-2016 |
smh |
MFC r272785:
Null terminate boot config buffer
PR: 207070 Approved by: re (gjb) Sponsored by: Multiplay |
295475 |
10-Feb-2016 |
allanjude |
Catch the EFI loader up to the latest ZFS Boot Environment Menu features
MFC: r294072 Move init_zfs_bootenv to sys/boot/zfs/zfs.c instead of having a copy in each loader
MFC: r294073 Connect the ZFS boot environment menu to the UEFI loader
MFC: r295357 Do not set vfs.root.mountfrom unnecessarily when initializing ZFS BE menu
Approved by: re (marius) Relnotes: yes Sponsored by: ScaleEngine Inc. |
295453 |
09-Feb-2016 |
emaste |
MFC boot loader path and RBX constant deduplication
r294765 (imp)
Move all the separate copies of the same strings into paths.h. There's nothing machine specific about these.
r294765 (imp)
RBX_ defines are in rbx.h, move it there.
r294847 (imp)
Remove static from these two. They slipped through the cracks.
r294925 (imp)
Fix mistake when transitioning to the new defines with ZFS loader. I hate adding yet another define, but it is the lessor of the evil choices available. Kill another evil by removing PATH_BOOT3 and replacing it with PATH_LOADER or PATH_LOADER_ZFS as appropriate.
Approved by: re (gjb) |
294981 |
28-Jan-2016 |
smh |
MFC r281169, r293724, r293796, r294029, r294041, r294058
MFC r281169 (by andrew): Make global variabled only used in this file static
MFC r294058: Make common boot file_loadraw name parameter const
MFC r294041: Remove unused reg param from fdt_fixup_memory
MFC r293724: Enable warnings in EFI boot code
MFC r293796: Fix typo in libefi.c
MFC r294029: Only build EFI components on supported compilers
Sponsored by: Multiplay |
294852 |
26-Jan-2016 |
jkim |
MFC: r256940
Allow users to set UUID in network byte order regardless of SMBIOS version. |
294480 |
21-Jan-2016 |
jhb |
MFC 292682: Fix remaining direct tests of the carry flag in the v86 %eflags via a magic number to use V86_CY() instead. These should have been fixed as part of the cleanup in r226746 but were missed.
The md5 sums of the object files were unchanged, so there should be no functional change.
PR: 205424 Submitted by: Alexander Kuleshov <kuleshovmail@gmail.com> |
294417 |
20-Jan-2016 |
royger |
MFC r277215, r277291, r277418, r280953 and r280954:
loader: implement multiboot support for Xen Dom0
Note that only the subset of the multiboot specification needed in order to boot a Xen Dom0 is implemented.
Sponsored by: Citrix Systems R&D |
293802 |
13-Jan-2016 |
allanjude |
MFC: r293001 Introduce the ZFS Boot Environments menu to the loader menu
MFC: r293414 Add ZFS Boot Environments menu to userboot
MFC: r293454 Only call init_zfs_bootenv when the system is booted with ZFS
MFC: r293612 Fix calling init_zfs_bootenv to early, resulting in empty ZFS BE menu
Relnotes: yes Sponsored by: ScaleEngine Inc. |
293298 |
07-Jan-2016 |
emaste |
MFC r281000: Move i386/efi files to new home in efi/loader/arch/i386
This was not (and still is not) connected to the build, but the EFI loader is in the process of being built for other than amd64 so these files ought to live in their eventual MD location. |
293294 |
07-Jan-2016 |
dteske |
MFC r286368: Remove guards around overwriting loader.rc and menu.rc
There have been .local version of each for user modifications for some time This allows users to receive future updates to these files
PR: 183765 Differential Revision: https://reviews.freebsd.org/D3176 Submitted by: Bertram Scharpf, Nikolai Lifanov (patch) Reviewed by: dteske, loos, eadler Approved by: bapt (mentor) Relnotes: yes Sponsored by: ScaleEngine Inc. |
289358 |
15-Oct-2015 |
cperciva |
MFC 289031: Teach gptldr to handle >64k boot2. |
285726 |
20-Jul-2015 |
allanjude |
MFC: r277949: New function smbios_match to detect BIOS versions during boot
MFC: r277957: Fix order of functions in smbios.c (corrects r277949)
MFC: r281138: SMBIOS support for EFI
r281138 makes changes to the new unified EFI loader (r280950), which has not been merged to stable/10 (and likely won't be). These changes were manually applied to the amd64 EFI loader (sys/boot/amd64/efi). The changes to sys/boot/amd64/efi are a direct commit.
Reviewed by: stas Approved by: re (gjb), marcel Sponsored by: ScaleEngine Inc. Differential Revision: https://reviews.freebsd.org/D3129 |
283927 |
02-Jun-2015 |
jhb |
MFC 281887: Reassign copyright statements on several files from Advanced Computing Technologies LLC to Hudson River Trading LLC. |
281843 |
22-Apr-2015 |
dteske |
MFC revisions 277693,278335,280382-280385,280923-280926,280931, 280933-280939,280974-280976,281002,281009,281081,281176-281180, 281271,281275,281616 (described in-breif below): r277693: Font fix (des) r278335: Revert that r280382: Whitespace, comments, and copyright update r280383: Prevent inadvertent bootlock condition r280384: Increase max passowrd length from 16 to 255 chars r280385: Add missing variable hints to loader.conf(5) defaults r280923: Whitespace r280924: Comments r280925: Optimize bootmsg to use fg/bg/me from screen.4th r280926: Whitespace and cleanup r280931: Comments r280933: Move beastie to logo-*.4th; brands to brand-*.4th r280934: Add remainder of supported ANSI escape sequences r280935: Securely overwrite (zero) user input after password checks r280936: Use equals for ASCII double frames r280937: Solve dreaded "dictionary full" issue r280938: Add "GELI Passphrase:" prompt to boot loader r280939: Revert that (premature commit) r280974: Use fg/b/me from screen.4th instead of literals r280975: Eliminate literal escape sequences from *.4th r280976: Use ^[[m mode-ending versus ^[[37m r281002: Install newly added brand-*.4th and logo-*.4th files (jkim) r281009: Revert .PATH changes to fix mips build (jkim) r281081: Make sure forth manpages are only installed once (bapt) r281176: Back to previous mode-endings based on feedback r281177: Back to previous mode-endings based on feedback r281178: Back to previous mode-endings based on feedback r281179: Back to previous mode-endings based on feedback r281180: Eliminate literal escape sequences from *.rc r281271: Fix a bootlock condition if loader_version is set NB: Commit message of r281271 has a typo, s/_logo/_version/ r281275: Re-do proper mode-endings r281616: Add "GELI Passphrase:" prompt to boot loader
Relnotes: Added "GELI Passphrase:" prompt to boot loader |
281289 |
09-Apr-2015 |
dim |
MFC r280980:
Ensure the cross assembler, linker and objcopy are used for the build32 stage, just like for the regular world stage.
Reviewed by: rodrigc, imp, bapt, emaste Differential Revision: https://reviews.freebsd.org/D2187 |
279796 |
08-Mar-2015 |
dim |
MFC r279598:
When compiling boot2 with gcc on i386 and pc98, only use the custom flag -mno-align-long-strings when compiling with base gcc. This is checked by comparing the version number against 4.2.1, which is not exactly right, but good enough. (There is no other way to check whether we are using the non-standard gcc in base, as far as I know.)
Reported by: rodrigc |
277946 |
30-Jan-2015 |
jhb |
MFC 274398,274537: Move NFS and TFTP filesystems before the synthetic filesystems (bzip, gzip, and split). |
276486 |
31-Dec-2014 |
ngie |
MFC r264400,r265836:
r264400:
NO_MAN= has been deprecated in favor of MAN= for some time, go ahead and finish the job. ncurses is now the only Makefile in the tree that uses it since it wasn't a simple mechanical change, and will be addressed in a future commit.
r265836:
Remove last two NO_MAN= in the tree. In both of these cases, MAN= is what is needed. |
274041 |
03-Nov-2014 |
nyan |
MFC: r268475 (by imp)
Make SERIAL support optional again. Enable it for i386 because a huge percentage of machines has a 16550. Disable it for pc98 since only a tiny fraction of them have one. |
272696 |
07-Oct-2014 |
avg |
MFC r271609: add gptzfsboot.8, zfsboot.8 and zfsloader.8 manual pages |
271880 |
19-Sep-2014 |
emaste |
MFC r271475 by ambrisko:
Add support for serial and null console to UEFI boot loader.
Approved by: re |
271135 |
04-Sep-2014 |
emaste |
MFC UEFI loader
This MFC consists of the following SVN revisions: 258741 261568 261603 261668 263115 263117 263968 264078 264087 264088 264092 264095 264115 264132 264208 264261 264262 264263 264319 265028 265057 268974
Detailed commit messages:
r258741: Note that libstand is 32-bit on amd64 and powerpc64
r261568: Build libstand as a 64-bit library on amd64
The 32-bit bootloaders now link against libstand.a in sys/boot/libstand32, so there is no need to force /usr/lib/libstand.a to be 32-bit.
r261603: Don't force efi to a 32-bit build on amd64
r261668: Build libstand as a 64-bit library on ppc64
The 32-bit bootloaders now link against libstand.a in sys/boot/libstand32, so there is no need to force /usr/lib/libstand.a to be 32-bit.
This is equivalent to r261568 for amd64.
r263115: Add amd64 EFI headers
r263117: Connect 64-bit boot ficl to the build
It is not yet used, but this will ensure it doesn't get broken.
r263968: Use EFI types for EFI values (silences warnings).
EFI UINTN is actually a 64-bit type on 64-bit processors.
r264078: Put each source file on a separate line
This will simplify rebasing the amd64 UEFI patch set.
r264087: Build boot/ficl as 64-bit library on amd64
The 32-bit bootloaders on amd64 now use the 32-bit version in ficl32, as is done with libstand32. The native 64-bit ficl will be used by the upcoming UEFI loader.
r264088: Merge efilib changes from projects/uefi
r247216: Add the ability for a device to have an "alias" handle.
r247379: Fix network device registration.
r247380: Adjust our load device when we boot from CD under UEFI.
The process for booting from a CD under UEFI involves adding a FAT filesystem containing your loader code as an El Torito boot image. When UEFI detects this, it provides a block IO instance that points at the FAT filesystem as a child of the device that represents the CD itself. The problem being that the CD device is flagged as a "raw device" while the boot image is flagged as a "logical partition". The existing EFI partition code only looks for logical partitions and so the CD filesystem was rendered invisible.
To fix this, check the type of each block IO device. If it's found to be a CD, and thus an El Torito boot image, look up its parent device and add that instead so that the loader will then load the kernel from the CD filesystem. This is done by using the handle for the boot filesystem as an alias.
Something similar to this will be required for booting from other media as well as the loader will live in the EFI system partition, not on the partition containing the kernel.
r247381: Remove a scatalogical debug printf that crept in.
r264092: Add -fPIC for amd64
r264095: Support UEFI booting on amd64 via loader.efi
This is largely the work from the projects/uefi branch, with some additional refinements. This is derived from (and replaces) the original i386 efi implementation; i386 support will be restored later.
Specific revisions of note from projects/uefi:
r247380:
Adjust our load device when we boot from CD under UEFI.
The process for booting from a CD under UEFI involves adding a FAT filesystem containing your loader code as an El Torito boot image. When UEFI detects this, it provides a block IO instance that points at the FAT filesystem as a child of the device that represents the CD itself. The problem being that the CD device is flagged as a "raw device" while the boot image is flagged as a "logical partition". The existing EFI partition code only looks for logical partitions and so the CD filesystem was rendered invisible.
To fix this, check the type of each block IO device. If it's found to be a CD, and thus an El Torito boot image, look up its parent device and add that instead so that the loader will then load the kernel from the CD filesystem. This is done by using the handle for the boot filesystem as an alias.
Something similar to this will be required for booting from other media as well as the loader will live in the EFI system partition, not on the partition containing the kernel.
r246231:
Add necessary code to hand off from loader to an amd64 kernel.
r246335:
Grab the EFI memory map and store it as module metadata on the kernel.
This is the same approach used to provide the BIOS SMAP to the kernel.
r246336:
Pass the ACPI table metadata via hints so the kernel ACPI code can find them.
r246608:
Rework copy routines to ensure we always use memory allocated via EFI.
The previous code assumed it could copy wherever it liked. This is not the case. The approach taken by this code is pretty ham-fisted in that it simply allocates a large (32MB) buffer area and stages into that, then copies the whole area into place when it's time to execute. A more elegant solution could be used but this works for now.
r247214:
Fix a number of problems preventing proper handover to the kernel.
There were two issues at play here. Firstly, there was nothing preventing UEFI from placing the loader code above 1GB in RAM. This meant that when we switched in the page tables the kernel expects to be running on, we are suddenly unmapped and things no longer work. We solve this by making our trampoline code not dependent on being at any given position and simply copying it to a "safe" location before calling it.
Secondly, UEFI could allocate our stack wherever it wants. As it happened on my PC, that was right where I was copying the kernel to. This did not cause happiness. The solution to this was to also switch to a temporary stack in a safe location before performing the final copy of the loaded kernel.
r246231:
Add necessary code to hand off from loader to an amd64 kernel.
r246335:
Grab the EFI memory map and store it as module metadata on the kernel.
This is the same approach used to provide the BIOS SMAP to the kernel.
r246336:
Pass the ACPI table metadata via hints so the kernel ACPI code can find them.
r246608:
Rework copy routines to ensure we always use memory allocated via EFI.
The previous code assumed it could copy wherever it liked. This is not the case. The approach taken by this code is pretty ham-fisted in that it simply allocates a large (32MB) buffer area and stages into that, then copies the whole area into place when it's time to execute. A more elegant solution could be used but this works for now.
r247214:
Fix a number of problems preventing proper handover to the kernel.
There were two issues at play here. Firstly, there was nothing preventing UEFI from placing the loader code above 1GB in RAM. This meant that when we switched in the page tables the kernel expects to be running on, we are suddenly unmapped and things no longer work. We solve this by making our trampoline code not dependent on being at any given position and simply copying it to a "safe" location before calling it.
Secondly, UEFI could allocate our stack wherever it wants. As it happened on my PC, that was right where I was copying the kernel to. This did not cause happiness. The solution to this was to also switch to a temporary stack in a safe location before performing the final copy of the loaded kernel.
r247216:
Use the UEFI Graphics Output Protocol to get the parameters of the framebuffer.
r264115: Fix printf format mismatches
r264132: Connect sys/boot/amd64 to the build
r264208: Do not build the amd64 UEFI loader with GCC
The UEFI loader causes buildworld to fail when building with (in-tree) GCC, due to a typedef redefinition. As it happens the in-tree GCC cannot successfully build the UEFI loader anyhow, as it does not support __attribute__((ms_abi)). Thus, just avoid trying to build it with GCC, rather than disconnecting it from the build until the underlying issue is fixed.
r264261: Correct a variable's type for 64-bit Ficl
FICL_INT is long.
r264262: Fix printf args for 64-bit archs
r264263: Add explicit casts to quiet warnings in libefi
r264319: Fix EFI loader object tree creation on 9.x build hosts
Previously ${COMPILER_TYPE} was checked in sys/boot/amd64, and the efi subdirectory was skipped altogether for gcc (since GCC does not support a required attribute). However, during the early buildworld stages ${COMPILER_TYPE} is the existing system compiler (i.e., gcc on 9.x build hosts), not the compiler that will eventually be used. This caused "make obj" to skip the efi subdirectory. In later build stages ${COMPILER_TYPE} is "clang", and then the efi loader would attempt to build in the source directory.
r265028 (dteske): Disable the beastie menu for EFI console ...
which doesn't support ANSI codes (so things like `at-xy', `clear', and other commands don't work making it impossible to generate a living menu).
r265057 (nwhitehorn): Turn off various fancy instruction sets...
as well as deduplicate some options. This makes the EFI loader build work with CPUTYPE=native in make.conf on my Core i5.
r268974 (sbruno): Supress clang warning for FreeBSD printf %b and %D formats
Relnotes: Yes Sponsored by: The FreeBSD Foundation |
271132 |
04-Sep-2014 |
emaste |
MFC r263005 by royger: howto_names: unify declaration |
271130 |
04-Sep-2014 |
emaste |
r261567: Build a 32-bit libstand under sys/boot/
A 32-bit libstand is needed on 64-bit platforms for use by various bootloaders. Previously only the 32-bit version was built, installed as /usr/lib/libstand.a.
A new 64-bit libstand consumer will arrive in the near future, so move the bootloader-specific 32-bit version to sys/boot/libstand32/.
Explicitly link against this version in the 32-bit loaders.
r261614: Build a 32-bit libstand under sys/boot/ for ppc64
This change is equivalent to r261567 for i386/amd64.
Relnotes: Yes Sponsored by: The FreeBSD Foundation |
264816 |
23-Apr-2014 |
brueffer |
MFC: r264482
Re-indent break statement. |
262704 |
03-Mar-2014 |
dteske |
MFC r258270:
Add a try-include word (which acts the same as "include") and use it to conditionally include (but ignore failures) /boot/loader.rc.local and /boot/menu.rc.local -- to make customizing the menu easier.
Reviewed by: alfred Discussed on: -hackers |
262701 |
03-Mar-2014 |
dteske |
MFC r257650:
Defer loading of kernel and modules if the beastie menu is enabled. Add a kernel selection menu to the beastie menu. List of kernels is taken from `kernels' in loader.conf(5) as a space (or comma) separated list of names to display (up to 9). If not set, default value is "kernel kernel.old". Does not validate that kernels exist because the next enhancement will be to allow selection of the root device.
Discussed on: -current |
262192 |
18-Feb-2014 |
jhb |
MFC 261517,261520: Convert the license on files where I am the sole copyright holder to 2 clause BSD licenses. |
261720 |
10-Feb-2014 |
wblock |
MFC r261522:
Describe the use of a freebsd-boot GPT partition, brought up by Scot Hetzel <swhetzel@gmail.com> on the -doc mailing list.
Also modify the Author section to be clear that I wrote the man page, not gptboot. |
261573 |
07-Feb-2014 |
mav |
MFC r260949: Make comconsole options set before its activation to be remembered. |
261455 |
04-Feb-2014 |
eadler |
MFC r258779,r258780,r258787,r258822:
Fix undefined behavior: (1 << 31) is not defined as 1 is an int and this shifts into the sign bit. Instead use (1U << 31) which gets the expected result.
Similar to the (1 << 31) case it is not defined to do (2 << 30).
This fix is not ideal as it assumes a 32 bit int, but does fix the issue for most cases.
A similar change was made in OpenBSD. |
260497 |
09-Jan-2014 |
dim |
MFC r260334:
Split the last gcc-specific flags off into CFLAGS.gcc. This also removes the need to use -Qunused-arguments for clang throughout the tree.
MFC r260369:
Apply band-aid for 32-bit compat libs failures after r260334: put back -Qunused-arguments for clang for now, until I can figure out a way to make it unneeded in all scenarios. Sorry about the breakage. |
260291 |
04-Jan-2014 |
dim |
MFC r260095:
For sys/boot/i386 and sys/boot/pc98, separate flags to be passed directly to the linker (LD_FLAGS) from flags passed indirectly, via the compiler driver (LDFLAGS).
This is because several Makefiles under sys/boot/i386 and sys/boot/pc98 use ${LD} directly to link, and the normal LDFLAGS value should not be used in these cases. |
260096 |
30-Dec-2013 |
dim |
MFC r257532 (by adrian):
Fix this build for clang.
MFC r259730:
To avoid having to explicitly test COMPILER_TYPE for setting clang-specific or gcc-specific flags, introduce the following new variables for use in Makefiles:
CFLAGS.clang CFLAGS.gcc CXXFLAGS.clang CXXFLAGS.gcc
In bsd.sys.mk, these get appended to the regular CFLAGS or CXXFLAGS for the right compiler.
MFC r259913:
For libstand and sys/boot, split off gcc-only flags into CFLAGS.gcc.
MFC r259927:
Fix pc98 build, by also forcing COMPILER_TYPE in sys/boot/pc98/boot2's Makefile.
Pointy hat to: dim |
259073 |
07-Dec-2013 |
peter |
Hoist all the mergeinfo up to the root in preparation for enforcing merges to the root only. All MFC's were rerecorded to the root.
Going forward, if an MFC includes mergeinfo, it will need to be made to the root and committed from the root. Merges with --ignore-ancestry or diff | patch can go anywhere.
The mergeinfo in HEAD is in a bad state from years of neglect and manual tampering and this was branched into 10.x. This confuses the coalescing code and prevents it from doing its job.
Approved by: re (gjb, implicit) |
256562 |
15-Oct-2013 |
jhb |
MFC 256293: Sanitize the %eflags returned by BIOS routines. Some BIOS routines enter protected mode and may leave protected-mode-specific flags like PSL_NT set when they return to real mode. This can cause a fault when BTX re-enters protected mode after the BIOS mode returns.
Approved by: re (gjb) |
256281 |
10-Oct-2013 |
gjb |
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
Approved by: re (implicit) Sponsored by: The FreeBSD Foundation
|
255944 |
29-Sep-2013 |
bdrewery |
Use MK_SSP=no after including bsd.own.mk to disable SSP instead of user-knob WITH[OUT]_SSP to avoid hitting an error if user has WITH_SSP in their make.conf. Ports now use this knob.
make[7]: "/usr/src/share/mk/bsd.own.mk" line 466: WITH_SSP and WITHOUT_SSP can't both be set.
This is similar to previous cleanup done in r188895
Approved by: bapt Reviewed by: jlh (earlier version) Approved by: re (marius) MFC after: 1 week
|
254733 |
23-Aug-2013 |
jkim |
Set the hint for physical address of RSDP in hexadecimal as before r223262.
|
252586 |
03-Jul-2013 |
wblock |
Add descriptions to the FILES list, fix some mdoc complaints, move the "neither" entry out of the table in BOOTING.
Submitted by: joeld Reviewed by: joeld MFC after: 1 week
|
252492 |
01-Jul-2013 |
wblock |
Add a new gptboot(8) man page. Factor out the redundant information in gpart(8) and boot(8), adding references to gptboot(8) in both.
Reviewed by: jhb, ae, pjd, Paul Schenkeveld <bsdcan@psconsult.nl>, david_a_bright@dell.com (portions), gjb MFC after: 1 week
|
249846 |
24-Apr-2013 |
dim |
When rebooting (exiting) from the BTX loader, make sure to restore the GDT from the correct segment, otherwise a triple fault would be caused. In some virtual environments (VMware, VirtualBox, etc) this could lead to a unhandled error or hang in the guest emulation software.
Thanks to avg and jhb for a few hints in the right direction.
Noticed by: Jeremy Chadwick <jdc@koitsu.org> (and many others) MFC after: 1 week
|
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
|
245765 |
22-Jan-2013 |
benno |
Fix linking of loader.efi.
gcc handles -symbolic by passing -Bsymbolic through to ld. clang ignores -symbolic and thus invokes ld without -Bsymbolic which leads to some symbols not being properly linked in loader.efi. Fix this by using -Wl,-Bsymbolic which passes -Bsymbolic to ld in both the gcc and clang cases.
Approved by: rpaulo
|
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
|
244332 |
17-Dec-2012 |
rpaulo |
amd64 only has rela sections.
|
243977 |
07-Dec-2012 |
rpaulo |
Make this work for 64 bit binaries.
|
243875 |
05-Dec-2012 |
rpaulo |
Remove dead code that clang refuses to compile.
|
243025 |
14-Nov-2012 |
avg |
boot: use packed attribute for edd_params* structures and their substructures
The sole purpose of this change is to make sure that sizeof produces "canonical" sizes for these structures. This is to avoid triggering bugs in the BIOSes that properly handle only the canonical values of input length provided to INT 13h AH=48h. The canonical sizes are: 30 for v2, 66 for v3, etc. Buggy BIOS code probably looks like: if (input_length > 30) { /* > v2 */ assume that input length is 66 /* assume v3 or later */ }
This should fix boot problems at least on Supermicro X8DT6 and possibly on P410i Smart Array Controller (as found in e.g. HP DL360 G7).
Reported by: gnn, np, rstone Debugged by: rstone Discussed with: ae, np, rstone MFC after: 4 days
|
242804 |
08-Nov-2012 |
dim |
Shrink boot2 by 8 bytes, by eliminating some unneeded instructions in sio.S. This is not particularly needed for head right now, but it is intended to merge to stable/9, to fix boot2 build with clang there.
Reviewed by: avg MFC after: 3 days
|
242688 |
07-Nov-2012 |
dteske |
Hook in new files menusets.4th and manual.
Approved by: adrian (co-mentor) (implicit)
|
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.
|
241785 |
20-Oct-2012 |
avg |
boot: use -march=i386 for both i386 and amd64 builds
.. so that consistent compilation algorithms are used for both architectures as in practice the binaries are expected to be interchangeable (for time being). Previously i386 used default setting which were equivalent to -march=i486 -mtune=generic. The only difference is using smaller but slower "leave" instructions.
Discussed with: jhb, dim MFC after: 29 days
|
241301 |
06-Oct-2012 |
avg |
add detection of serial console presence to btx and boot2-like blocks
Note that this commit slightly increases size of boot blocks.
Reviewed by: jhb Tested by: Olivier Cochard-Labbe <olivier@cochard.me> MFC after: 26 days
|
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
|
241294 |
06-Oct-2012 |
avg |
zfsboot: simplify probe_drive() a little bit
The first discovered pool, whether it covers the whole boot disk or not, is going to be first in zfs_pools list. So there is no need at all for spapp parameter.
This commit also fixes a bug where NULL would be assigned to NULL pointer when probe_drive was called with the spapp parameter of NULL.
MFC after: 21 days
|
241293 |
06-Oct-2012 |
avg |
zfs boot: export boot/primary pool and vdev guid all the way to kenv
This is work in progress to for znextboot and it also provides some convenient infrastructure.
MFC after: 20 days
|
241288 |
06-Oct-2012 |
avg |
zfsboot: use the same zfs dataset naming format as loader
Also, pool name alone now names a root dataset of the pool regardless of bootfs property value.
MFC after: 15 days
|
241284 |
06-Oct-2012 |
avg |
zfs boot: add lszfs command to i386 loader
... to list child datasets of a specified dataset. Dataset name should be provided in poolname/dsname format.
MFC after: 17 days
|
241068 |
30-Sep-2012 |
ae |
Reduce the number of attempts to detect proper kld format for the amd64 loader.
|
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.
|
241047 |
29-Sep-2012 |
ae |
Disable splitfs support, since we aren't support floppies for a long time. This slightly reduces an overhead, when loader tries to open file that doesn't exist.
|
240637 |
18-Sep-2012 |
avg |
loader/i386: replace ugly inb/outb re-implementations with cpufunc.h
Use of __builtin_constant_p in a function that is only called via a pointer is a good example of how out-of-date it was.
Suggested by: bde MFC after: 1 week
|
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
|
240341 |
11-Sep-2012 |
avg |
a bit of trailing whitespace cleanup
MFC after: 1 week
|
240335 |
11-Sep-2012 |
ae |
Slightly reduce an overhead for the open() call in the zfsloader. libstand(3) tries to detect file system in the predefined order, but zfsloader usually is used for the booting from ZFS, and there is no need to try detect several file system types for each open() call.
|
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.
|
239068 |
05-Aug-2012 |
ae |
Teach the ZFS use new partitions API when probing. Note: now ZFS does probe only for partitions with type "freebsd-zfs" and "freebsd".
|
239067 |
05-Aug-2012 |
ae |
Remove unneeded flag.
|
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.
|
239060 |
05-Aug-2012 |
ae |
When GPT signature is invalid in the primary GPT header, then try to read backup GPT header.
Submitted by: hrs (previous version)
|
236405 |
01-Jun-2012 |
jhb |
Remove unnecessary initializations. The BSS of boot2 is in fact zero'd when boot2 begins execution by the _start() routine in btxcsu.S.
MFC after: 1 week
|
236213 |
29-May-2012 |
kevlo |
Make sure that each va_start has one and only one matching va_end, especially in error cases.
|
235988 |
25-May-2012 |
gleb |
Use 32-bit ufs_ino_t instead of ino_t to keep boot2 small and prevent unnecessary 64-bit math on 32-bit machines.
Sponsored by: Google Summer of Code 2011
|
235537 |
17-May-2012 |
gber |
Import work done under project/nand (@235533) into head.
The NAND Flash environment consists of several distinct components: - NAND framework (drivers harness for NAND controllers and NAND chips) - NAND simulator (NANDsim) - NAND file system (NAND FS) - Companion tools and utilities - Documentation (manual pages)
This work is still experimental. Please use with caution.
Obtained from: Semihalf Supported by: FreeBSD Foundation, Juniper Networks
|
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
|
235281 |
11-May-2012 |
dim |
Fix sys/boot/i386/cdboot/cdboot.S compilation with clang after r235219. This file uses .code16 directives, which are not yet supported by clang's integrated assembler.
MFC after: 1 month
|
235219 |
10-May-2012 |
avg |
cdboot, pxeldr: make use of bootargs.h instead of redefining flag constants
Reviewed by: jhb MFC after: 1 month
|
235158 |
09-May-2012 |
avg |
r235154 followup: add stddef.h for offsetof
MFC after: 1 month
|
235156 |
09-May-2012 |
avg |
i386 zfsloader: rename LIBZFS to LIBZFSBOOT
... to avoid name clash with the other libzfs
MFC after: 1 month
|
235155 |
09-May-2012 |
avg |
i386 boot: consolidate MAXBDDEV definition
MFC after: 1 month
|
235154 |
09-May-2012 |
avg |
btxldr: future-proof argument passing from boot1/2-ish to loader
Place the arguments at a fixed offset of 0x800 withing the argument area (of size 0x1000). Allow variable size extended arguments first of which should be a size of the extended arguments (including the size parameter).
Consolidate all related definitions in a new i386/common/bootargs.h header.
Many thanks to jhb and bde for their guidance and reviews.
Reviewed by: jhb, bde Approved by: jhb MFC after: 1 month
|
235153 |
09-May-2012 |
avg |
sys/boot: add common CTASSERT definition
|
234493 |
20-Apr-2012 |
marcel |
Build a 32-bit EFI loader on amd64. This to match the rest of the code that is used to construct a loader (e.g. libstand, ficl, etc).
There is such a thing as a 64-bit EFI application, but it's not as standard as 32-bit is. Let's make the 32-bit functional (as in we can load and actualy boot a kernel) before solving the 64-bit loader problem.
|
234339 |
16-Apr-2012 |
avg |
zfsboot: honor -q if it's present in boot.config
Before r228267 the option was honored but the original content of boot.config was not preserved. I tried to fix that but missed the idea. Now the proper way of doing things is taken from i386/boo2. Also, a comment is added to explain this a little bit unobvious behavior.
Inspired by: jhb MFC after: 5 days
|
232754 |
09-Mar-2012 |
jkim |
Make boot2 build with Clang again.
Submitted by: dim (bsd.sys.mk) Reviewed by: dim, jhb
|
232623 |
06-Mar-2012 |
jhb |
Add a note to clarify why we create a relocated copy of boot1 in lower memory.
|
232570 |
05-Mar-2012 |
jhb |
Fix boot2 to handle boot config files that only contain a custom path to a loader or kernel. Specifically, kname cannot be pointed at cmd[] since it's value is change to be an empty string after the initial call to parse, and cmd[]'s value can be changed (thus losing a prior setting for kname) due to user input at the boot prompt. While here, ensure that that initial boot config file text is nul-terminated, that ops is initialized to zero, and that kname is always initialized to a valid string.
Tested by: Domagoj Smolcic rank1seeker of gmail MFC after: 1 week
|
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
|
228738 |
20-Dec-2011 |
jhb |
Allow boot0cfg to force a PXE boot via boot0 on the next boot. - Fix boot0 to check for PXE when using the pre-set setting for the preferred slice. - Update boot0cfg to use slice 6 to select PXE. Accept a 'pxe' argument instead of a number for the 's' option as a way to select PXE as well.
Submitted by: Andrew Boyer aboyer averesystems MFC after: 2 weeks
|
228267 |
04-Dec-2011 |
avg |
zfsboot: print boot.config contents before parsing it
as parsing can be a destructive operation
MFC after: 2 weeks
|
227726 |
19-Nov-2011 |
miwi |
- Whitespaces fixed only
Approved by: rwatson (mentor)
|
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.
|
226506 |
18-Oct-2011 |
des |
Look for /boot/config in addition to /boot.config, with the former taking precedence over the latter if it exists.
MFC after: 3 weeks
|
225530 |
13-Sep-2011 |
avg |
gpt/zfs boot blocks: reduce optimizing CFLAGS to -O1
gpt and zfs boot blocks are not nearly as size-constrained as boot2 from which they inherited their current optimization and anti-optimization options. As such the current options do not provide any benefit, but make debugging of the code much harder. Also, it has been demonstrated that combination of -mrtd and -fno-unit-at-a-time may result in mis-compilation of the boot code with the current base gcc.
Additionally, intermediate assembly file filtering is removed for zfsboot.
The new boot blocks are all compile- and boot- tested using qemu. gptzfsboot is tested with real hardware.
Reported by: Peter Jeremy <peterjeremy@acm.org> [miscompilation] Discussed with: bde, jhb Tested by: Sebastian Chmielewski <chmielsster@gmail.com> [gptzfsboot] Approved by: re (kib) MFC after: 3 weeks
|
224131 |
17-Jul-2011 |
dim |
When building some of the boot loaders with clang, and DEBUG_FLAGS or CFLAGS having '-g' in it, clang outputs several assembly directives that are too new for our version of binutils.
Therefore, assemble the resulting .s files with clang instead. A more general solution can be implemented when a GNU as-compatible driver for clang's integrated assembler appears.
Reported by: dougb
|
223758 |
04-Jul-2011 |
attilio |
With retirement of cpumask_t and usage of cpuset_t for representing a mask of CPUs, pc_other_cpus and pc_cpumask become highly inefficient.
Remove them and replace their usage with custom pc_cpuid magic (as, atm, pc_cpumask can be easilly represented by (1 << pc_cpuid) and pc_other_cpus by (all_cpus & ~(1 << pc_cpuid))).
This change is not targeted for MFC because of struct pcpu members removal and dependency by cpumask_t retirement.
MD review by: marcel, marius, alc Tested by: pluknet MD testing by: marcel, marius, gonzo, andreast
|
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.
|
223611 |
27-Jun-2011 |
jhb |
Revert the entry point label to 'start' to unbreak the build.
Pointy hat to: jhb
|
223597 |
27-Jun-2011 |
jhb |
- Remove the fake BPB from zfsldr. zfsldr doesn't support booting from floppies, so it will not be used as the start of an emulated floppy image on a bootable CD which is what the fake BPB was used for. - Only check that EDD packet mode is available once at the start of zfsldr rather than for each disk sector now that we read data in one sector at a time. As a result, collapse the remaining bits of read up into nread and rename nread to read. - Restore a return at the end of putstr that I removed in the previous revision.
Tested by: Henri Hennebert (earlier version) MFC after: 1 week
|
223477 |
23-Jun-2011 |
jhb |
The recent change to increase the zfsboot size to 64k made a few BIOSes unhappy (probably they don't handle crossing the 64k boundary, etc.). Fix this by changing zfsldr to use a loop reading from the disk one sector at a time. To avoid trashing the saved copy of the MBR which is used for disk I/O, read zfsboot2 at address 0x9000. This has the advantage that BTX no longer needs to be relocated as it is read into the correct location. However, the loop to relocate zfsboot2.bin can now cross a 64k boundary, so change it to use relative segments instead. (This will need further work if zfsboot2.bin ever exceeds 64k.)
While here, stop storing a relocated copy of zfsldr at 0x700. This was only used by the xread hack which has recently been removed (and even that use was dubious). Also, include the BIOS error code as hex when reporting read errors to aid in debugging.
Much thanks to Henri Hennebert for patiently testing various iterations of the patch as well as fixing the zfsboot2.bin relocation to use relative segments.
MFC after: 1 week
|
223262 |
18-Jun-2011 |
benl |
Fix clang warnings.
Approved by: philip (mentor)
|
223017 |
12-Jun-2011 |
dim |
Upgrade our copy of llvm/clang to r132879, from upstream's trunk.
|
222813 |
07-Jun-2011 |
attilio |
etire the cpumask_t type and replace it with cpuset_t usage.
This is intended to fix the bug where cpu mask objects are capped to 32. MAXCPU, then, can now arbitrarely bumped to whatever value. Anyway, as long as several structures in the kernel are statically allocated and sized as MAXCPU, it is suggested to keep it as low as possible for the time being.
Technical notes on this commit itself: - More functions to handle with cpuset_t objects are introduced. The most notable are cpusetobj_ffs() (which calculates a ffs(3) for a cpuset_t object), cpusetobj_strprint() (which prepares a string representing a cpuset_t object) and cpusetobj_strscan() (which creates a valid cpuset_t starting from a string representation). - pc_cpumask and pc_other_cpus are target to be removed soon. With the moving from cpumask_t to cpuset_t they are now inefficient and not really useful. Anyway, for the time being, please note that access to pcpu datas is protected by sched_pin() in order to avoid migrating the CPU while reading more than one (possible) word - Please note that size of cpuset_t objects may differ between kernel and userland. While this is not directly related to the patch itself, it is good to understand that concept and possibly use the patch as a reference on how to deal with cpuset_t objects in userland, when accessing kernland members. - KTR_CPUMASK is changed and now is represented through a string, to be set as the example reported in NOTES.
Please additively note that no MAXCPU is bumped in this patch, but private testing has been done until to MAXCPU=128 on a real 8x8x2(htt) machine (amd64).
Please note that the FreeBSD version is not yet bumped because of the upcoming pcpu changes. However, note that this patch is not targeted for MFC.
People to thank for the time spent on this patch: - sbruno, pluknet and Nicholas Esborn (nick AT desert DOT net) tested several revision of the patches and really helped in improving stability of this work. - marius fixed several bugs in the sparc64 implementation and reviewed patches related to ktr. - jeff and jhb discussed the basic approach followed. - kib and marcel made targeted review on some specific part of the patch. - marius, art, nwhitehorn and andreast reviewed MD specific part of the patch. - marius, andreast, gonzo, nwhitehorn and jceel tested MD specific implementations of the patch. - Other people have made contributions on other patches that have been already committed and have been listed separately.
Companies that should be mentioned for having participated at several degrees: - Yahoo! for having offered the machines used for testing on big count of CPUs. - The FreeBSD Foundation for having sponsored my devsummit attendance, which has been instrumental. - Sandvine for having offered offices and infrastructure during development.
(I really hope I didn't forget anyone, if it happened I apologize in advance).
|
222417 |
28-May-2011 |
julian |
New boot loader menus from Devin Teske. Discussed on hackers and recommended for inclusion into 9.0 at the devsummit. All support email to devin dteske at vicor dot ignoreme dot com .
Submitted by: dteske at vicor dot ignoreme dot com Reviewed by: me and many others
|
221506 |
05-May-2011 |
dim |
Fine-tune llvm optimization for sys/boot/i386/boot2, which shaves off some more bytes from the final boot2 image.
Submitted by: rdivacky
|
221348 |
02-May-2011 |
dim |
Clang r130700 can now compile sys/boot/i386/boot2 with room to spare.
|
221177 |
28-Apr-2011 |
jhb |
Due to space constraints, the UFS boot2 and boot1 use an evil hack where boot2 calls back into boot1 to perform disk reads. The ZFS MBR boot blocks do not have the same space constraints, so remove this hack for ZFS. While here, remove commented out code to support C/H/S addressing from zfsldr. The ZFS and GPT bootstraps always just use EDD LBA addressing.
MFC after: 2 weeks
|
220924 |
21-Apr-2011 |
ae |
Remove all object files during 'make clean'.
MFC after: 1 week
|
220392 |
06-Apr-2011 |
rdivacky |
Move getc() body before xgetc() so gcc does not emit a warning about function having no body.
Approved by: jhb
|
220389 |
06-Apr-2011 |
rdivacky |
Mark getc() as inline, this has no effect on gcc but helps clang.
Approved by: jhb
|
220337 |
04-Apr-2011 |
rdivacky |
Build boot2 with -mregparm=3, ie. pass upto 3 arguments via registers. This modifies CFLAGS and tweaks sio.S to use the new calling convention. The sio_init() and sio_putc() prototypes are modified so that other users of this code know the correct calling convention.
This makes the code smaller when compiled with clang.
Reviewed by: jhb Tested by: me and Freddie Cash <fjwcash gmail com>
|
219703 |
16-Mar-2011 |
ae |
The size of zfsboot2 grown up to 64 Kbytes in r219089. Increase NSECT up to 128 sectors too.
Reviewed by: jhb, pjd
|
219702 |
16-Mar-2011 |
ae |
Set control flags in putc(). This should fix zfsboot hangs in drvread().
PR: kern/153552 Reviewed by: jhb MFC after: 1 week
|
219483 |
11-Mar-2011 |
jhb |
Remove all object files during 'make clean'.
PR: kern/154888 Submitted by: arundel MFC after: 1 week
|
219452 |
10-Mar-2011 |
rdivacky |
Some more shrinking.
o bunch of variables are turned into uint8_t
o initial setting of namep[] in lookup() is removed as it's only overwritten a few lines down
o kname is explicitly initialized in main() as BSS in boot2 is not zeroed
o the setting and reading of "fmt" in load() is removed
o buf in printf() is made static to save space
Reviewed by: jhb Tested by: me and Fabian Keil <freebsd-listen fabiankeil de>
|
219186 |
02-Mar-2011 |
rdivacky |
This patch shrinks boot2 a little.
o It switches kname to be just a pointer instead of an array thus avoiding a couple of memcpy()s.
o It changes ioctl to unsigned from uint8_t.
o It changes the second keyhit limit to 3 seconds from 5 so that constant propagation can take place.
o It changes the ticks overflow computation as suggested by bde@.
o It removes bi_basemem/bi_extmem/bi_memsizes_valid setting from bootinfo as it is unused.
Reviewed by: jhb
|
219126 |
01-Mar-2011 |
brucec |
Remove duplicate "in".
Suggested by: Rob Farmer <rfarmer at predatorlabs.net> MFC after: 3 days
|
219096 |
28-Feb-2011 |
brucec |
Revert some of r177626. "in in" is valid in certain sentences.
PR: 121490 MFC after: 3 days
|
219089 |
27-Feb-2011 |
pjd |
Finally... Import the latest open-source ZFS version - (SPA) 28.
Few new things available from now on:
- Data deduplication. - Triple parity RAIDZ (RAIDZ3). - zfs diff. - zpool split. - Snapshot holds. - zpool import -F. Allows to rewind corrupted pool to earlier transaction group. - Possibility to import pool in read-only mode.
MFC after: 1 month
|
219079 |
27-Feb-2011 |
dim |
Clang's integrated assembler can now handle sys/boot/i386/boot2/sio.S. It used to choke on the notation "inb (%dx),%al" for "inb %dx,%al"; GNU as accepts both forms. Which notation is more 'correct' is an open question. :)
|
218926 |
21-Feb-2011 |
dim |
In sys/boot/i386/boot2/boot2.c, change the type of the 'opts' variable from uint16_t back to uint32_t. The actual option bitmasks (RB_* and RBX_*) assume at least a 32 bit variable.
Submitted by: rdivacky
|
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.
|
218822 |
18-Feb-2011 |
dim |
Merge binutils 2.17.50 to head. This brings a number of improvements to x86 CPU support, better support for powerpc64, some new directives, and many other things. Bump __FreeBSD_version, and add a note to UPDATING.
Thanks to the many people that have helped to test this.
Obtained from: projects/binutils-2.17
|
218745 |
16-Feb-2011 |
imp |
Remove reading of symbols from a.out loaded files. Since we are tight on space for clang and a.out support is only needed for /boot/loader, they are excess bytes that serve no useful purpose other than to support really old kernels (FreeBSD < 3.2 or so). Prefer clang support over support for these old kernels and remove this code. We gain about 100 bytes of space this way.
Reviewed by: rdivacky@
|
218713 |
15-Feb-2011 |
dim |
Apply a few small optimizations to boot2's code, to make it shrink a little further. This gets us further on the way to be able to build it successfully with clang. Using in-tree gcc, this shrinks boot2.bin with 60 bytes, the in-tree clang shaves off 72 bytes, and ToT clang 84 bytes.
Submitted by: rdivacky Reviewed by: imp
|
217033 |
05-Jan-2011 |
dim |
On i386 and amd64, consistently use the following options whenever we want to avoid using any "advanced" CPU features:
-mno-mmx -mno-3dnow -mno-sse -mno-sse2 -mno-sse3 -msoft-float
|
217028 |
05-Jan-2011 |
dim |
Remove superfluous -mno-(mmx|3dnow|sse|sse2|sse3) flags in Makefiles under sys/boot/{i386,pc98}, since these are already added via sys/boot/{i386,pc98}/Makefile.inc.
Submitted by: arundel
|
215285 |
14-Nov-2010 |
brucec |
Fix the jump location.
|
215284 |
14-Nov-2010 |
brucec |
When rebooting the machine jump to 0xf000:fff0 instead of 0xffff:0x0. This is the same change that was made in rev 1.33 of boot/i386/btx/btx/btx.S
PR: i386/91871 Submitted by: Bjorn Konig <bkoenig at cs.tu-berlin.de> MFC after: 1 week
|
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.
|
214210 |
22-Oct-2010 |
rdivacky |
Avoid using memcpy() for copying 32bit chunks. This shrinks the resulting code a little.
Approved by: rpaulo (mentor) Reviewed by: jhb
|
213568 |
08-Oct-2010 |
pho |
Ensure that a make from sys/boot does not pick up include files from /usr/include.
Discussed with: kib
|
213136 |
24-Sep-2010 |
pjd |
- Split code shared by almost any boot loader into separate files and clean up most layering violations:
sys/boot/i386/common/rbx.h:
RBX_* defines OPT_SET() OPT_CHECK()
sys/boot/common/util.[ch]:
memcpy() memset() memcmp() bcpy() bzero() bcmp() strcmp() strncmp() [new] strcpy() strcat() strchr() strlen() printf()
sys/boot/i386/common/cons.[ch]:
ioctrl putc() xputc() putchar() getc() xgetc() keyhit() [now takes number of seconds as an argument] getstr()
sys/boot/i386/common/drv.[ch]:
struct dsk drvread() drvwrite() [new] drvsize() [new]
sys/boot/common/crc32.[ch] [new]
sys/boot/common/gpt.[ch] [new]
- Teach gptboot and gptzfsboot about new files. I haven't touched the rest, but there is still a lot of code duplication to be removed.
- Implement full GPT support. Currently we just read primary header and partition table and don't care about checksums, etc. After this change we verify checksums of primary header and primary partition table and if there is a problem we fall back to backup header and backup partition table.
- Clean up most messages to use prefix of boot program, so in case of an error we know where the error comes from, eg.:
gptboot: unable to read primary GPT header
- If we can't boot, print boot prompt only once and not every five seconds.
- Honour newly added GPT attributes:
bootme - this is bootable partition bootonce - try to boot from this partition only once bootfailed - we failed to boot from this partition
- Change boot order of gptboot to the following:
1. Try to boot from all the partitions that have both 'bootme' and 'bootonce' attributes one by one. 2. Try to boot from all the partitions that have only 'bootme' attribute one by one. 3. If there are no partitions with 'bootme' attribute, boot from the first UFS partition.
- The 'bootonce' functionality is implemented in the following way:
1. Walk through all the partitions and when 'bootonce' attribute is found without 'bootme' attribute, remove 'bootonce' attribute and set 'bootfailed' attribute. 'bootonce' attribute alone means that we tried to boot from this partition, but boot failed after leaving gptboot and machine was restarted. 2. Find partition with both 'bootme' and 'bootonce' attributes. 3. Remove 'bootme' attribute. 4. Try to execute /boot/loader or /boot/kernel/kernel from that partition. If succeeded we stop here. 5. If execution failed, remove 'bootonce' and set 'bootfailed'. 6. Go to 2.
If whole boot succeeded there is new /etc/rc.d/gptboot script coming that will log all partitions that we failed to boot from (the ones with 'bootfailed' attribute) and will remove this attribute. It will also find partition with 'bootonce' attribute - this is the partition we booted from successfully. The script will log success and remove the attribute.
All the GPT updates we do here goes to both primary and backup GPT if they are valid. We don't touch headers or partition tables when checksum doesn't match.
Reviewed by: arch (Message-ID: <20100917234542.GE1902@garage.freebsd.pl>) Obtained from: Wheel Systems Sp. z o.o. http://www.wheelsystems.com MFC after: 2 weeks
|
212979 |
21-Sep-2010 |
dim |
When building world with clang, for gnu/lib/libobjc, sys/boot/i386/boot2 and sys/boot/pc98/boot2, do not simply assign 'gcc' to CC, since compile flags are sometimes passed via this variable, for example during the build32 stage on amd64. This caused the 32-bit libobjc build on amd64 to fail.
Instead, only replace the first instance of clang (if any, including optional path) with gcc, and leave the arguments alone.
Approved-by: rpaulo (mentor)
|
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
|
212066 |
31-Aug-2010 |
delphij |
For consistency, change all 'i386' and MACHINE_ARCH to x86.
Reviewed by: jhb MFC after: 1 week
|
212060 |
31-Aug-2010 |
dim |
Use a more robust way to substitute gcc for clang, when compiling gnu/lib/libobjc and sys/boot/i386/boot2, so it also works when using absolute paths and/or options, as in CC="/absolute/path/clang -foo".
Approved by: rpaulo (mentor)
|
211677 |
23-Aug-2010 |
imp |
MF tbemd: Minor tweaks, prefer MACHINE_CPUARCH generally to MACHINE_ARCH
|
211571 |
21-Aug-2010 |
rpaulo |
Make sure the boot2 stage is compiled with gcc, as clang has no problems compiling it, but it just gets too big at the moment, even with -Os. This is not applicable to gptboot, though.
Submitted by: Dimitry Andric <dimitry at andric.com>
|
210387 |
22-Jul-2010 |
rpaulo |
Correctly setup LDADD with regards to libstand. The submitter points out that "on amd64, libstand.a is compiled for i386, but is still installed under ${WORLDTMP}/usr/lib instead of ${WORLDTMP}/usr/lib32. Even if it would be installed there, ld on amd64 is set up incorrectly with a ${TOOLS_PREFIX}/usr/lib/i386 default path, so it wouldn't link. The reason it does link under gcc is that gcc passes -L${WORLDTMP}/usr/lib twice, even for -m32 builds, which is also incorrect, but accidentally works in this case."
Submitted by: Dimitry Andric <dimitry at andric.com>
|
209162 |
14-Jun-2010 |
rdivacky |
Pass the -N flag to linked via -Wl.
Approved by: ed (mentor)
|
208789 |
03-Jun-2010 |
ed |
Use -Wl,-N instead of the undocumented -N option for GCC.
GCC forwards the -N flag directly to ld. This flag is not documented and not supported by (for example) Clang. Just use -Wl,-N.
Submitted by: Pawel Worach
|
208388 |
21-May-2010 |
jhb |
- Set 'dmadat' earlier so that we properly setup the heap if we fail to locate a high memory area for the heap using the SMAP. - Read the number of hard drive devices from the BIOS instead of hardcoding a limit of 128. Some BIOSes duplicate disk devices once you get beyond the maximum drive number.
MFC after: 1 month
|
206378 |
07-Apr-2010 |
rpaulo |
Add a copyright.
|
206376 |
07-Apr-2010 |
rpaulo |
EFI boot loader for FreeBSD/i386.
Doesn't boot a kernel yet, but it can read an ELF file from the EFI FAT partition.
|
205662 |
26-Mar-2010 |
delphij |
Our boot loader is capable of booting both i386 and amd64 kernels so call it "x86" instead of "i386".
Suggested by: jhb in response to Alexander Best's loader proposal MFC after: 1 month
|
200872 |
22-Dec-2009 |
jhb |
Don't build zfsboot, gptzfsboot, and zfsloader if WITHOUT_ZFS is enabled.
MFC after: 1 week
|
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
|
200310 |
09-Dec-2009 |
jhb |
Fix a confusing typo in the EDD packet structure used in gptboot and gptzfsboot. I got the segment and offset fields reversed in the structure, but I also succeeded in crossing the assignments so the actual EDD packet ended up correct.
MFC after: 1 week
|
200309 |
09-Dec-2009 |
jhb |
- Port bios_getmem() from libi386 to {gpt,}zfsboot() and use it to safely allocate a heap region above 1MB. This enables {gpt,}zfsboot() to allocate much larger buffers than before. - Use a larger buffer (1MB instead of 128K) for temporary ZFS buffers. This allows more reliable reading of compressed files in a raidz/raidz2 pool.
Submitted by: Matt Reimer mattjreimer of gmail 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.
|
199714 |
23-Nov-2009 |
rnoland |
Create a seperate ZFS enabled loader.
This adds zfsloader which will be called by zfsboot/gptzfsboot code rather than the tradional loader. This eliminates the need to set the LOADER_ZFS_SUPPORT variable in order to get a ZFS enabled loader.
Note however, that you must reinstall your bootcode (zfsboot/gptzfsboot) in order for the boot process to use the new loader.
New installations will no longer be required to build a ZFS enabled loader for a working ZFS boot system. Installing zfsboot/gptzfsboot is sufficient for acknowledging the use of CDDL code and therefore the ZFS enabled loader.
Based on a previous patch from jhb@
Reviewed by: jhb@ MFC after: 2 weeks
|
199579 |
20-Nov-2009 |
jhb |
Always use 64-bit LBAs for disk addresses in zfsboot and gptzfsboot to fully support booting from large volumes.
Tested by: Emil Smolenski ambsd of raisa.eu.org Submitted by: Matt Reimer mattjreimer of gmail (most of the C bits) MFC after: 1 week
|
198420 |
23-Oct-2009 |
rnoland |
Correct some issues with zfs boot.
- Teach it to read gang blocks. (essentially untested) If you see "ZFS: gang block detected!", please let me know, so we can either remove the printf if it works, or fix it if it doesn't.
- If multiple partitions exist on a disk, probe them all. We also need to reset dsk->start to 0 to read the right sector here.
- With GPT, we can have 128 partitions.
- If the bootfs property has ever been set on a pool it seems that it never goes away. zpool won't allow you to add to the pool with the bootfs property set. However, if you clear the property back to default we end up getting 0 for the object number and read a bogus block pointer and fail to boot.
- Fix some error printfs. The printf in the loader is only capable of c,s and u formats.
- Teach printf how to display %llu
Reviewed by: dfr, jhb MFC after: 2 weeks
|
198079 |
14-Oct-2009 |
jhb |
Use zfs_read() instead of xfsread() to read /boot.config. xfsread() fails short read requests, so the result was that a /boot.config smaller than 512 bytes was ignored. boot2 uses fsread() instead of xfsread() to read /boot.config already, so this makes zfsboot more like boot2.
Submitted by: Johny Mattsson johny-freebsd of earthmagic org Reviewed by: dfr MFC after: 3 days
|
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
|
196326 |
17-Aug-2009 |
jhay |
Fix parse() so that the partition to boot (load /boot/loader) from can be set. The syntax as printed in main() is used: 0:ad(0p3)/boot/loader
Reviewed by: jhb Approved by: re (kib)
|
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
|
192194 |
16-May-2009 |
dfr |
Add support for booting from raidz1 and raidz2 pools.
|
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
|
189500 |
07-Mar-2009 |
marcel |
Revert the part of change 107879 that employs the unused bytes after the disklabel in the 2nd sector for boot code. Even with both UFS1 and UFS2 supported, there's enough bytes left that we don't have to nibble from the disklabel. Thus, the entire 2nd sector is now reserved for the disklabel, which makes the bootcode compatible again with disklabels that have more than 8 partitions -- such as those created and supported by gpart.
i386: 135 bytes available amd64: 151 bytes available
Ok'd by: jhb
|
189017 |
24-Feb-2009 |
jhb |
Fix some more issues with the real mode BTX.
The old BTX passed the general purpose registers from the 32-bit client to the routines called via virtual 86 mode. The new BTX did the same thing. However, it turns out that some instructions behave differently in virtual 86 mode and real mode (even though this is under-documented). For example, the LEAVE instruction will cause an exception in real mode if any of the upper 16-bits of %ebp are non-zero after it executes. In virtual 8086 mode the upper 16-bits are simply ignored. This could cause faults in hardware interrupt handlers that inherited an %ebp larger than 0xffff from the 32-bit client (loader, boot2, etc.) while running in real mode.
To fix, when executing hardware interrupt handlers provide an explicit clean state where all the general purpose and segment registers are zero upon entry to the interrupt handler. While here, I attempted to simplify the control flow in the 'intusr' code that sets up the various stack frames and exits protected mode to invoke the requested routine via real mode.
A huge thanks to Tor Egge (tegge@) for debugging this issue.
Submitted by: tegge Reviewed by: tegge Tested by: bz MFC after: 1 week
|
188895 |
21-Feb-2009 |
ru |
Fix build when WITH_SSP is set explicitly.
Submitted by: Jeremie Le Hen
|
187917 |
30-Jan-2009 |
gabor |
- Remove superfluous comment
PR: docs/129400 Submitted by: Gavin Atkinson <gavin@freebsd.org>
|
187101 |
12-Jan-2009 |
jkim |
Allow VIA Nano processors to boot FreeBSD/amd64.
PR: amd64/130303 MFC after: 1 week
|
186598 |
30-Dec-2008 |
luigi |
A number of small changes to make the 'save choice to disk' safer, and re-enable it as default.
In particular:
+ re-enable the 'update' flag in the Makefile (of course!);
+ commit Warner's patch "orb $NOUPDATE,_FLAGS(%bp)" to avoid writing to disk in case of a timeout/default choice;
+ fix an off-by-one count in the partition scan code that would print the wrong name for unknown partitions;
+ unconditionally change the boot prompt to 'Boot:' instead of 'Default:' to make room for the extra code/checks/messages. Some of the changes listed below are also made to save space;
+ rearrange and fix comments for known partition types. Right now we explicitly recognise *BSD, Linux, FAT16 (type 6, used on many USB keys), NTFS (type 7), FAT32 (type 11). Depending on other options we also recognise Extended (type 5), FAT12 (type 1) and FAT16 < 32MB (type 4).
+ Add an entry "F6 PXE" when the code is built with -DPXE (which is a default now). Technically, F6 boots through INT18, so the prompt 'PXE' is a bit misleading. Unfortunately the name INT18 is too long and does not fit in - we could use ROM perhaps. The reason I picked 'PXE' is that on many (I believe) new systems INT18 calls PXE.
Apart from the choice of the name for PXE/ROM/INT18, this should close pending issues on the 1-sector boot0 code and we should be able to move the code to RELENG_7 when it reopens.
No boot0cfg changes are necessary.
MFC after: 3 weeks
|
186243 |
17-Dec-2008 |
dfr |
Use full 64bit arithmetic when converting file offsets to block numbers - fixes booting on filesystems with inode numbers with values above 4194304.
Submitted by: ps
|
185781 |
09-Dec-2008 |
sobomax |
Remove now unused label.
Submitted by: Christoph Mallon MFC after: 4 weeks (along with r185779 and r185780)
|
185780 |
09-Dec-2008 |
sobomax |
Optimiza assembly in the previous r185779, to save whooping 16 bytes.
Submitted by: Christoph Mallon MFC after: 4 weeks (including r185779)
|
185779 |
08-Dec-2008 |
sobomax |
Respect RBX_MUTE flag from boot[012].
MFC after: 4 weeks
|
185776 |
08-Dec-2008 |
sobomax |
Fix typo in the comment %is -> %si.
|
185579 |
03-Dec-2008 |
luigi |
Another, hopefully final set of changes to boot0 and boot0cfg.
boot0.S changes:
+ import a patch from Christoph Mallon to rearrange the various print functions and save another couple of bytes;
+ implement the suggestion in PR 70531 to enable booting from any valid partition because even the extended partitions that were previously in our kill list may contain a valid boot loader. This simplifies the code and saves some bytes;
+ followwing up PR 127764, implement conditional code to preserve the 'Volume ID' which might be used by other OS (NT, XP, Vista) and is located at offset 0x1b8. This requires a relocation of the parameter block within the boot sector -- there is no other possible workaround. To address this, boot0cfg has been updated to handle both versions of the boot code;
+ slightly rearrange the strings printed in the menus to make the code buildable with all options. Given the tight memory budget, this means that with certain options we need to shrink or remove certain labels.
and especially:
make -DVOLUME_LABEL -DPXE the default options.
This means that the newly built boot0 block will preserve the Volume ID, and has the (hidden) option F6 to boot from INT18/PXE. I think the extra functionality is well worth the change.
The most visible difference here is that the 'Default: ' string now becomes 'Boot: ' (it can be reverted to the old value but then we need to nuke 1/2 partition name or entries to make up for the extra room).
boot0cfg changes:
+ modify the code to recognise the new boot0 structure (with the relocated options block to make room for the Volume id).
+ add two options, '-i xxxx-xxxx' to set the volume ID, -e c to modify the character printed in case of bad input
PR: 127764 70531 Submitted by: Christoph Mallon (portions) MFC after: 4 weeks
|
185562 |
02-Dec-2008 |
luigi |
This commits brings in a lot of documentation and some enhancement of the boot0.S code, with a number of compile-time selectable options, the most interesting one being the ability to select PXE booting.
The code is completely compatible with the previous one, and with the boot0cfg program. Even the actual code is largely unmodified, with only minor rearrangements or fixes to make room for the new features.
The behaviour of the standard build differs from the previous version in the following, minor things:
+ 'noupdate' is the default, which means the code does not write back the selection to disk. You can enable the feature at runtime with boot0cfg, or changing the flags in the Makefile.
+ a drive number of 0x00 (floppy, or USB in floppy emulation) is now accepted as valid. Previously, it was overridden with 0x80, meaning that the partition table coming from the media was used to access sectors on a possibly different media. You can revert to the previous mode building with -DCHECK_DRIVE, and you can always use the 'setdrv' option in boot0cfg
+ certain FAT or NTFS partitions are listed as WIN instead of DOS.
+ the 'bel' character on a bad selection is replaced by a '#' to make it clear that the system is not hang even if the machine does not have a speaker. This can be reverted back at compile time, or at runtime with an upcoming boot0cfg option.
Additional features are available as compile time options, and may be become the default if deemed useful. In particular:
+ INT18/PXE boot (make -DPXE) This option enables booting through INT 18h (which on certain BIOSes can be hooked to PXE) by pressing F6. There is unfortunately no room to print the additional menu option. Also, to make room for the code, the 'Default: ' string is changed to 'Boot: '
+ print current drive number (make -DTEST) Prints a line indicating the current drive number. This is useful to figure out what is going on for machines/bioses which remap drives in sometimes surprising ways.
+ disable numeric keys in console mode (make -DONLY_F_KEYS) Not really a significant option, but it is needed to make room for the -DTEST mode.
+ disable floppy support (make -DCHECK_DRIVE) Revert to the old behaviour of only accepting 0x80 and above as valid drive numbers.
MFC after: 6 weeks
|
185346 |
26-Nov-2008 |
luigi |
Fix a typo in previous commit: must call "putn" to print a crlf, instead of "puts" which prints whatever is at %si, followed by a CRLF.
It was not noticed during tests because at that point %si points to a partition entry whose first byte is 0x80, which is both a terminator for the string and a non printable character.
Submitted by: Christoph Mallon
|
185339 |
26-Nov-2008 |
luigi |
Pass the pointer to the selected partition in %si to the next stage boot code. The bug was introduced in rev.1.13, and went unnoticed because FreeBSD's boot1 does not use it, but other systems might.
(I have been struggling for almost a full day trying to figure out why a syslinux'ed partition would not boot when started with the FreeBSD /boot/boot0, only to realize that the bug was ours!)
The space for the two extra bytes (push %si and pop %si) is reclaimed by removing an extra CRLF that is printed before booting.
The bug is not a major one but if there is time it might be a good thing to merge it into the upcoming releases.
|
185175 |
22-Nov-2008 |
dfr |
Fix amd64 build and re-enable gptzfsboot.
|
185151 |
21-Nov-2008 |
des |
Disconnect gptzfsboot from the build until dfr@ gets his act together.
|
185096 |
19-Nov-2008 |
dfr |
Add a GPT-aware variant of zfsboot which should be used in a similar manner to gptboot, i.e. installed in a freebsd-boot partition using /sbin/gpart or /sbin/gpt.
Tweak the /boot/loader ZFS support so that it can find ZFS pools that are contained in GPT partitions.
|
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.
|
185045 |
18-Nov-2008 |
ache |
Fix building without ZFS (can't find library)
|
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
|
181436 |
08-Aug-2008 |
jhb |
- Initialize the vm86 structure to a known-good state. Specifically, always set the %eflags used during a BIOS call via BTX to 0x202. Previously the flags field was uninitialized garbage, and thus it was "random" if interrupts were enabled or not during BIOS calls. - Use constants from <machine/psl.h> for fields in %eflags.
MFC after: 3 days
|
181433 |
08-Aug-2008 |
jhb |
Fix the hangs reported with the real mode BTX: - I had errantly assumed that all user requests should run with interrupts enabled. User requests for software interrupts, however, need to disable interrupts (and tracing) just like hardware interrupts. - Disable alignment checking when emulating a hardware interrupt as well (based on the description of the real mode operation of the 'INT' instruction in the IA-32 manuals). - Use constants for fields in %eflags.
Tested by: bz 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
|
180208 |
03-Jul-2008 |
peter |
Set magic fbsd:nokeywords property that allows files to bypass keyword expansion. (file-specific replacement for CVSROOT/exclude)
|
180145 |
01-Jul-2008 |
nyan |
Fix off-by-one error.
MFC after: 1 week
|
180012 |
25-Jun-2008 |
ru |
Enable GCC stack protection (aka Propolice) for userland: - It is opt-out for now so as to give it maximum testing, but it may be turned opt-in for stable branches depending on the consensus. You can turn it off with WITHOUT_SSP. - WITHOUT_SSP was previously used to disable the build of GNU libssp. It is harmless to steal the knob as SSP symbols have been provided by libc for a long time, GNU libssp should not have been much used. - SSP is disabled in a few corners such as system bootstrap programs (sys/boot), process bootstrap code (rtld, csu) and SSP symbols themselves. - It should be safe to use -fstack-protector-all to build world, however libc will be automatically downgraded to -fstack-protector because it breaks rtld otherwise. - This option is unavailable on ia64.
Enable GCC stack protection (aka Propolice) for kernel: - It is opt-out for now so as to give it maximum testing. - Do not compile your kernel with -fstack-protector-all, it won't work.
Submitted by: Jeremie Le Hen <jeremie@le-hen.org>
|
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
|
178037 |
09-Apr-2008 |
jhb |
Revert the previous change and let PROBE_KEYBOARD function identical to -P in boot2/gptboot.
|
177626 |
26-Mar-2008 |
brueffer |
Fix some "in in" typos in comments.
PR: 121490 Submitted by: Anatoly Borodin <anatoly.borodin@gmail.com> Approved by: rwatson (mentor), jkoshy MFC after: 3 days
|
177039 |
10-Mar-2008 |
jhb |
Change the BTX kernel to drop all the way out to real mode to invoke BIOS routines (V86 requests from the client and hardware interrupt handlers): - Install trampoline real mode interrupt handlers at IDT vectors 0x20-0x2f to handle hardware interrupts by invoking the appropriate vector (0x8-0xf or 0x70-0x78). This allows the 8259As to use vectors 0x20-0x2f in real mode as well as protected mode will ensuring that the master 8259A doesn't share IDT space with CPU exceptions in protected mode. - Since we don't need to reserve space for page tables and a page directory anymore since dropping paging support, move the TSS and protected mode IDT up by 16k. Grow the ring 1 link stack by 16k as a result. - Repurpose the ring 1 link stack to be used as a real mode stack when invoking real mode routines either via a V86 request or a hardware interrupts. This simplifies a few things as we avoid disturbing the original user stack. - Add some more block comments to explain how the code interacts with the V86 structure as this wasn't immediately obvious from the prior comments (e.g. that we explicitly copy the seg regs for real mode out of the V86 struct onto the stack to be popped off when going into real mode, etc.). Also, document some of the stack frames we create going to real mode and back. - Remove all of the virtual 86 related code including having to simulate various instructions and BIOS calls on a trap from virtual 86 mode. - Explicitly panic if a user client attempts to perform a V86 CALL request that isn't a far call. - Bump version to 1.2.
Assuming this works ok this should fix some of the long standing issues with USB booting as well as etherboot.
MFC after: 2 weeks Submitted by: kib (some parts from his original real mode patch)
|
176882 |
06-Mar-2008 |
jhb |
In the PROBE_KEYBOARD case, always enable multiple consoles and set the serial console as the primary console if the keyboard probe fails.
MFC after: 1 week
|
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
|
176644 |
28-Feb-2008 |
jhb |
Rev 1.72 fixed a bug where if /boot.config changed the console its contents weren't displayed on the new console. However, the config string has been altered as part of being parsed so we only display the first option. Fix this by saving a copy of /boot.config before parsing it and displaying the saved copy after parsing.
MFC after: 1 week PR: i386/103972 Submitted by: Alexandre Belloni alexandre.belloni of netasq.com
|
176631 |
27-Feb-2008 |
jhb |
Retire the support for using paging in BTX. It hasn't been used since before 4.0.
Submitted by: kib
|
173957 |
26-Nov-2007 |
jhb |
Add a note to indicate that these files do borrow in part from mbr.s and boot1.S
Requested by: rnordier
|
173697 |
17-Nov-2007 |
jhb |
Add a trailing \0 to the read error string so that read errors don't print out two error messages.
MFC after: 3 days
|
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.
|
173040 |
26-Oct-2007 |
jhb |
Use the smaller cgbase() macro in ufsread.c if UFS_SMALL_CGBASE is defined. This lets each boot program choose which version of cgbase() it wants to use rather than forcing ufsread.c to have that knowledge.
MFC after: 1 week Discussed with: imp
|
173026 |
26-Oct-2007 |
jhb |
Add . to the include path so that we follow the 'machine' symlink we create during depend on amd64.
Reported by: rwatson
|
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
|
170101 |
29-May-2007 |
simokawa |
MFp4: add FireWire/dcons support in loader for i386/amd64.
It is disabled by default. You need to put LOADER_FIREWIRE_SUPPORT=yes in /etc/make.conf and rebuild loader to enable it. (cd /sys/boot/i386 && make clean && make && make install)
You can find a short introduction of dcons at http://wiki.freebsd.org/DebugWithDcons
|
169842 |
21-May-2007 |
jkim |
Use lower cases for UUID string to conform RFC4122 and ISO/IEC-9834-8:2005.
|
169732 |
19-May-2007 |
kan |
Tweak inlining parameters a little. Add warning to tell us if function we declared as inline can not be inlined.
|
167914 |
26-Mar-2007 |
thomas |
Fix setting of serial port speed. A junk value was passed in AX when bioscom is called to set up serial port parameters because COMSPEED was treated as an address instead of an immediate value, causing serial port parameters to never be set.
PR: i386/110828 Reviewed by: jhb MFC after: 2 weeks
|
167814 |
22-Mar-2007 |
jkim |
Catch up with ACPI-CA 20070320 import.
|
166926 |
23-Feb-2007 |
remko |
Fix the cdboot twiddle display. I created and tested this with a custom FreeSBIE cd-image.
PR: i386/96452 Submitted by: Yuichiro Goto <y7goto at gmail dot com> MFC after: 3 days Approved by: imp (mentor)
|
164948 |
06-Dec-2006 |
jhb |
Ignore any breakpoint instructions (int 3) we encounter in vm86 mode rather than treating them as a fatal exception and halting. At least one storage BIOS (some newer mpt(4) parts) have a breakpoint instruction in their disk read routine.
MFC after: 3 days
|
164335 |
16-Nov-2006 |
ru |
Remove an unused variable.
|
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.
|
163893 |
02-Nov-2006 |
marcel |
Don't unconditionally compile-in the bcache code. It's only used on i386/amd64 and pc98. Remove useless calls to bcache_init() from the ia64 and sparc64 loaders, as well as from the OFW common code.
|
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.
|
163707 |
26-Oct-2006 |
ru |
Restore support for -c and -d that were treacherously murdered in rev. 1.58. (This only costs us four bytes.)
Prodded by: bde MFC after: 3 days
|
163706 |
26-Oct-2006 |
ru |
Back out rev. 1.71 as it breaks directly loading (i386) kernels.
OK'ed by: jhb PR: i386/96430, i386/104709 MFC after: 3 days
|
163070 |
07-Oct-2006 |
pav |
- Update URL of Intel documentation
Submitted by: Rob <spamrefuse@yahoo.com> on freebsd-doc MFC after: 3 days
|
163032 |
05-Oct-2006 |
jhb |
- Fix a couple of improper uses of leal in the previous space saving commits. For some reason I thought the scale factor was a shift count rather than the multiplicand (that is, I thought leal (%eax,%edx,4) was going to generate %eax + %edx << 4 rather than %eax + %edx * 4). What I need is to multiply by 16 to convert a real-mode (seg, offset) tuple into a flat address. However, the max multiplicand for scaled/index addressing on i386 is 8, so go back to using a shl and an add. - Convert two more inter-register mov instructions where we don't need to preserve the source register to xchg instructions to keep our space savings.
Tested by: Ian FREISLICH if at hetzner.co.za MFC after: 1 week
|
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
|
162745 |
28-Sep-2006 |
jhb |
Tweak the code to handle intercepting BIOS calls to int 0x15 to shave another 16 bytes off of BTX (and thus boot2): - Compare against the value of %eax that is saved on the stack instead of loading it into %eax (which requires saving the current %eax on the stack). - Use %ch to examine the keyboard flag state in the BIOS to see if Ctrl-Alt-Del is pressed instead of %al so we don't have to save %eax on the stack anymore.
MFC after: 1 week
|
162744 |
28-Sep-2006 |
jhb |
Optimize the int 15/87 handler for space to shave another 16 bytes off of BTX (and thus boot2): - Don't bother saving %eax, %ebx, or %ecx as it is not necessary. - Use a more compact sequence to load the base value out of a GDT entry by loading the contiguous low 24 bits into the upper 24 bits of %eax, loading the high 8 bits into %al, and using a ror to rotate the bits (2 mov's and a ror) rather than loading the pieces in smaller chunks (3 mov's and a shl). - Use movzwl + leal instead of movl + movw + shll + addl. - Use 'xchgl %eax,%foo' rather than 'movl %eax,%foo' for cases where it's ok to trash %eax. xchgl %eax, foo is a 1-byte opcode whereas the mov is a 2-byte opcode. - Use movzwl rather than xorl + movw.
MFC after: 1 week
|
162743 |
28-Sep-2006 |
jhb |
Add an 'smap' command that dumps out the BIOS SMAP.
MFC after: 1 week
|
162737 |
28-Sep-2006 |
jhb |
A couple of simple tweaks that trim BTX by 6 bytes. Since BTX is 16-byte aligned within boot2 however, this actually trims boot2 by 16 bytes.
|
162717 |
28-Sep-2006 |
ru |
Add -march=i386 to fix amd64 build by generating the same code as i386 would do.
|
162710 |
27-Sep-2006 |
jhb |
Emulate moving cr0, cr2, cr3, or cr4 into any i386 general register rather than just emulating mov cr0, eax. This fixes some Compaq/HP BIOS with DMA (as the BIOS tried to read cr3 so it could translate addresses if paging was enabled).
MFC after: 1 week
|
162046 |
05-Sep-2006 |
ru |
- Include <sys/reboot.h> to get the RB_* defines.
- Make the PROBE_KEYBOARD option better resemble the -P option in boot2, i.e., if keyboard isn't present then boot with both RB_SERIAL and RB_MULTIPLE set.
Reviewed by: jhb
|
160964 |
04-Aug-2006 |
yar |
Commit the results of the typo hunt by Darren Pilgrim. This change affects documentation and comments only, no real code involved.
PR: misc/101245 Submitted by: Darren Pilgrim <darren pilgrim bitfreak org> Tested by: md5(1) 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
|
158265 |
03-May-2006 |
jhb |
Restore the pre-5.x behavior of only beeping if the user makes a bad selection and not always beeping on startup. The two bytes for the extra 'jmp' instruction were obtained by removing recognition of BSD/OS partitions.
Requested by: many Tested by: subset of many Head nod: imp, keramida MFC after: 2 weeks
|
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.)
|
157669 |
11-Apr-2006 |
sobomax |
Merge in timeout into A20-enable routine from cdboot/boot1.
MFC after: 1 day
|
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.
|
157667 |
11-Apr-2006 |
jhb |
Minor whitespace tweak.
|
157664 |
11-Apr-2006 |
jhb |
Tweak comment.
|
157663 |
11-Apr-2006 |
jhb |
Use the proper condition to determine that we matched an filename. Otherwise, we could match on a filename that had the wrong last character (such as /boot/loaded instead of /boot/loader).
PR: kern/95625 Submitted by: Oliver Fromme <olli@secnetix.de> MFC after: 1 month
|
157652 |
11-Apr-2006 |
sobomax |
When enabling A20 put upper limit on amount of time we wait for the keyboard controller to get ready (65K x ISA access time, visually around 1 second). If we have wait more than that amount it's likely that the hardware is a legacy-free one and simply doesn't have keyboard controller and doesn't require enabling A20 at all.
This makes cdboot working for MacBook Pro with Boot Camp.
MFC after: 1 day
|
156813 |
17-Mar-2006 |
ru |
Reimplementation of world/kernel build options. For details, see:
http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html
The src.conf(5) manpage is to follow in a few days.
Brought to you by: imp, jhb, kris, phk, ru (all bugs are mine)
|
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
|
153536 |
19-Dec-2005 |
sobomax |
If LOADER_BZIP2_SUPPORT is defined allocate heap in the 1MB-4MB range to provide enough room for decompression (up to 2.5MB is necessary). This should be safe to do since we load i386 kernels after 8MB mark now, so that 16MB is the minimum amount of RAM necessary to even boot FreeBSD.
This makes bzip2-support practically useable.
|
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.
|
151999 |
03-Nov-2005 |
ru |
Consistently use OPT_* macros to test/set boot options.
|
151874 |
30-Oct-2005 |
scottl |
Add back some bits.
|
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
|
151382 |
16-Oct-2005 |
sobomax |
Re-implement rev.1.76 with respect to the code size.
|
151381 |
16-Oct-2005 |
sobomax |
Backout previous commit - for some reason it overflows space constrains on amd64. Better version will follow.
|
151367 |
16-Oct-2005 |
sobomax |
Add new option `q', which makes second stage loader quiet unless autoboot is disabled or fails.
MFC after: 1 week
|
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.
|
150464 |
22-Sep-2005 |
ru |
- RBX_MASK wasn't updated when RB_PAUSE was changed from 0x40000 to 0x100000 in rev. 1.67.
- NOPT wasn't updated (decremented) in previous revision.
|
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.
|
149212 |
18-Aug-2005 |
iedowse |
Add the ability to specify the boot2 serial console speed in /boot.config or on the "boot:" prompt line via a "-S<speed>" flag, e.g. "-h -S19200". This adds about 50 bytes to the size of boot2 and required a few other small changes to limit the size impact. This changes only affects boot2; there are further loader changes to follow.
|
148767 |
06-Aug-2005 |
ssouhlal |
The kernel is usually at /boot/kernel/kernel nowadays.
PR: i386/81756 Submitted by: trasz <trasz@buziaczek.pl>
|
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)
|
148046 |
15-Jul-2005 |
ache |
Add -mno-sse3 for prescott/nocona
|
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)
|
146874 |
01-Jun-2005 |
obrien |
Temperarly disable building in the bzip2 support by default so we can fit on the i386 floppies. Sigh, I hate floppies.
|
146840 |
31-May-2005 |
obrien |
Put bzip2 support on equal footing with gzip support. Enable bzip2 support by default, set LOADER_NO_BZIP2_SUPPORT to disable it.
Pointy hat to: sobomax
|
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
|
146696 |
27-May-2005 |
jhb |
Print out the commands from /boot.config after parsing them so that they output is sent to the correct console(s).
PR: kern/66425 Submitted by: Gavin Atkinson gavin at ury dot york dot ac dot uk MFC after: 1 week
|
146448 |
20-May-2005 |
charnier |
Remove unused variables. Remove prototype for function that does not exist.
|
145515 |
25-Apr-2005 |
ru |
Allow BOOT_BOOT0_COMCONSOLE_SPEED to be derived from BOOT_COMCONSOLE_SPEED at compile time.
|
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.
|
143661 |
15-Mar-2005 |
obrien |
Ensure GCC does not use FP registers in integer code. I think all we really need is -fno-sse2. I really don't like cluttering up the compiler invocation, but this bigger hammer will fix reported problems for now.
|
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.
|
141540 |
08-Feb-2005 |
des |
Remove type 0x4 (FAT12 <32MB) to make room for type 0x7 (NTFS).
|
139948 |
09-Jan-2005 |
peadar |
Only update the boot sector when there is a valid drive number provided. (After squeezing a few more bytes out of boot0)
Discussed With: jhb, julian PR: 66248 Submitted By: Hans Petter Selasky MFC After: 1 week
|
139123 |
21-Dec-2004 |
ru |
NOFORTH -> NO_FORTH
|
139112 |
21-Dec-2004 |
ru |
NOSHARED -> NO_SHARED
|
139103 |
21-Dec-2004 |
ru |
Start the dreaded NOFOO -> NO_FOO conversion.
OK'ed by: core
|
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.
|
138186 |
29-Nov-2004 |
ru |
Pick up loader.rc from its old home.
|
138183 |
29-Nov-2004 |
scottl |
Disable the beastie menu. It offends some and annoys everyone else, and I'm frankly tired of the controversy. When people ask me why FreeBSD isn't user- friendly, I'll tell them that I tried. RIP.
|
138048 |
24-Nov-2004 |
jhb |
- If the COMSPEED is set to 0, then don't try to initialize the serial port and assume that the BIOS has set it up for us. This allows folks with a serial-aware BIOS to set the BIOS to speeds above 9600 and allow boot0 to just use the existing settings. - Purge some gratuitous cpp comments as per style(9).
Submitted by: Danny Braniss danny at cs dot huji dot ac dot il (1) MFC after: 1 month
|
138046 |
24-Nov-2004 |
jhb |
Fix comments for serial I/O function prototypes that were broken in the assembler to cpp(1) comment conversions. This allows btx to compile again when BTX_SERIAL is defined.
Reported by: Danny Braniss danny at cs dot huji dot ac dot il MFC after: 1 month
|
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.
|
137298 |
06-Nov-2004 |
keramida |
Clean up the comments, rewording, adding missing punctuation and other minor nits.
Approved by: jhb
|
136910 |
24-Oct-2004 |
ru |
For variables that are only checked with defined(), don't provide any fake value.
|
136780 |
22-Oct-2004 |
simokawa |
Respect RB_MULTIPLE flag.
|
136779 |
22-Oct-2004 |
simokawa |
- Add FireWire subclass and OHCI interface. - Add some PCI BIOS function calls. (find_devclass, read_config, write_config)
|
135967 |
30-Sep-2004 |
ru |
Document boot_cdrom, boot_multicons, and boot_serial. Reduce diffs between help.common and loader(8). Mention that boot_userconfig is currently a no-op.
|
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
|
135410 |
18-Sep-2004 |
jhb |
A long, long time ago in a CVS branch far away (specifically, HEAD prior to 4.0 and RELENG_3), the BTX mini-kernel used paging rather than flat mode and clients were limited to a virtual address space of 16 megabytes. Because of this limitation, boot2 silently masked all physical addresses in any binaries it loaded so that they were always loaded into the first 16 Meg. Since BTX no longer has this limitation (and hasn't for a long time), remove the masking from boot2. This allows boot2 to load kernels larger than about 12 to 14 meg (12 for non-PAE, 14 for PAE).
Submitted by: Sergey Lyubka devnull at uptsoft dot com MFC after: 1 month
|
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.
|
134431 |
28-Aug-2004 |
yar |
Don't be too smart, just try packet mode of INT13 first. This way of operation is more robust than the "AI" used before.
Add flags to mbr accessible from make.conf as BOOT_MBR_FLAGS. Only one flag is defined now, "allow using packet mode", which is 0x80 in accord with the rest of i386 boot code. The "packet" flag is on by default.
PR: i386/70241 Submitted by: Valentin Nechayev <netch <@> netch.kiev.ua> (inital version) Discussed with: jhb (by Valentin Nechayev) Tested on: bochs (with EDD turned on or off by patching the BIOS), PCs
|
134430 |
28-Aug-2004 |
yar |
Try packet mode of INT13 on a hard disk first if not prohibited by the flag, fall back to the old INT13/AH=02 function if that fails. This way of operation is less likely to fail with modern BIOSes and large disks of strange geometries.
PR: i386/70241 Submitted by: Valentin Nechayev <netch <@> netch.kiev.ua> (inital version) Discussed with: jhb (by Valentin Nechayev) Tested on: bochs (with EDD turned on or off by patching the BIOS), PCs
|
134382 |
27-Aug-2004 |
yar |
B1FLAGS -> BOOT_BOOT1_FLAGS, which is consistent with naming of other boot-related make vars.
|
134357 |
27-Aug-2004 |
obrien |
In conjunction with having boot0cfg(8) default boot0 to packet mode.
Submitted by: Tor.Egge@cvsup.no.freebsd.org
|
133154 |
05-Aug-2004 |
kan |
Move boot2 BSS zeroing into btx startup code out of boot1. boot1 does not have clear idea on boot2 BSS size and leaves portion of it not zeroed out. btxcsu.s is in much better position for this job.
Obtained from: DragonflyBSD (with minor adjustments)
|
132870 |
30-Jul-2004 |
kan |
Compile boot2 with -fno-unit-at-a-time. GCCs aggressive optimization breaks boot in spectacular ways otherwise.
|
132864 |
30-Jul-2004 |
kan |
Clean up local memcpy implementation to take void * parameters.
|
132764 |
28-Jul-2004 |
kan |
Define our own memcpy here instead of relying on GCC to provide one.
|
130943 |
22-Jun-2004 |
jhb |
Update the copyright to use a 3 clause BSD license rather than one that is less clear about allowing redistribution of modified copies.
Requested by: Tom Cosgrove tom dot cosgrove at arches-consulting dot com
|
130942 |
22-Jun-2004 |
jhb |
Remove a bogus increment of %di when scanning the list of loader paths. %di will already point to the character after the nul char when the 'repnz scasb' terminates.
Submitted by: Tom Cosgrove tom dot cosgrove at arches-consulting dot com
|
130632 |
17-Jun-2004 |
phk |
Save a couple of bytes for the SIO case.
|
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>
|
130343 |
11-Jun-2004 |
phk |
Merge boot0 and boot0sio so they behave the same.
|
129993 |
02-Jun-2004 |
phk |
Some embedded platforms have no keyboard controller. Give up waiting for it to react after a timeout.
|
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
|
129239 |
14-May-2004 |
ru |
Partly 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.
|
128741 |
29-Apr-2004 |
ru |
Convert block comments into C-style that is understood by cpp(1). Keep line comments in assembler style. A few lines that match the '^[[:space:]]+#' regexp still need to be fixed, somehow.
OK'ed by: bde, jhb
|
128725 |
28-Apr-2004 |
ru |
Thanks to David's patches, we can now simplify these makefiles further, and just use PROG directly (without FILES).
Suggested by: bde
|
128724 |
28-Apr-2004 |
ru |
Properly merge boot0sio.s and boot0.s into boot0.S.
|
128723 |
28-Apr-2004 |
ru |
Switch to using C99 comments in assembler preprocessed with cpp(1).
|
128722 |
28-Apr-2004 |
ru |
- Properly merge boot0sio.s and boot0.s into boot0.S. boot0sio.s was repo-copied to boot0.S.
- Rename boot0ext.s to boot0ext.S, to stay consistent with other preprocessed asm files around here, and for better portability.
Repocopied by: joe
|
128718 |
28-Apr-2004 |
ru |
Temporary precaution measure until repocopy requests are processed: don't forget to clean generated .s sources.
|
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.
|
128709 |
28-Apr-2004 |
ru |
Use C (and CPP) style comments for assembler-with-cpp sources, for lines that start with a comment.
|
128708 |
28-Apr-2004 |
ru |
Use C (and CPP) style comments for assembler-with-cpp sources, for lines that start with a comment.
|
128707 |
28-Apr-2004 |
ru |
- Use C (and CPP) style comments for assembler-with-cpp sources, for lines that start with a comment. - Preserve as(1) style comments for the rest.
|
128694 |
27-Apr-2004 |
ru |
Removed now redundant CLEANFILES assignments.
Not read enough of my patch by: obrien ;)
|
128691 |
27-Apr-2004 |
phk |
Change from '#' to "//" comment character to allow CPP preprocessing.
Merge boot0.s and boot0sio.s into boot0_512.s controlled by "#ifdef SIO".
Add Makefile magic to generate boot0.s and boot0sio.s from boot0_512.s.
The compile boot0 and boot0sio have unchanged MD5 checksums.
|
128651 |
25-Apr-2004 |
obrien |
Use a more compact syntax for passing the "binary" options to 'ld'.
|
128649 |
25-Apr-2004 |
obrien |
Simplify the building of our i386 'binary' boot components by directly producing them using 'ld' options rather than post-processing with 'objcopy'.
Idea by: Ryan Sommers <ryans@gamersimpact.com>
|
128471 |
20-Apr-2004 |
obrien |
Fix a last second typo in 'vi' that caused a problem.
|
128451 |
20-Apr-2004 |
obrien |
White space style cleanup.
|
128441 |
19-Apr-2004 |
obrien |
MFp4: merge version #5 of the 2-sector boot0 from the "jhb boot" branch.
|
127458 |
26-Mar-2004 |
obrien |
Bring back jhb's two sector (1024 bytes) 'boot0' [rev 1.22] as 'boot0ext'.
|
126958 |
14-Mar-2004 |
bde |
Fixed misspellings of 0 as NULL.
|
126891 |
12-Mar-2004 |
trhodes |
These are changes to allow to use the Intel C/C++ compiler (lang/icc) to build the kernel. It doesn't affect the operation if gcc.
Most of the changes are just adding __INTEL_COMPILER to #ifdef's, as icc v8 may define __GNUC__ some parts may look strange but are necessary.
Additional changes: - in_cksum.[ch]: * use a generic C version instead of the assembly version in the !gcc case (ASM code breaks with the optimizations icc does) -> no bad checksums with an icc compiled kernel Help from: andre, grehan, das Stolen from: alpha version via ppc version The entire checksum code should IMHO be replaced with the DragonFly version (because it isn't guaranteed future revisions of gcc will include similar optimizations) as in: ---snip--- Revision Changes Path 1.12 +1 -0 src/sys/conf/files.i386 1.4 +142 -558 src/sys/i386/i386/in_cksum.c 1.5 +33 -69 src/sys/i386/include/in_cksum.h 1.5 +2 -0 src/sys/netinet/igmp.c 1.6 +0 -1 src/sys/netinet/in.h 1.6 +2 -0 src/sys/netinet/ip_icmp.c
1.4 +3 -4 src/contrib/ipfilter/ip_compat.h 1.3 +1 -2 src/sbin/natd/icmp.c 1.4 +0 -1 src/sbin/natd/natd.c 1.48 +1 -0 src/sys/conf/files 1.2 +0 -1 src/sys/conf/files.amd64 1.13 +0 -1 src/sys/conf/files.i386 1.5 +0 -1 src/sys/conf/files.pc98 1.7 +1 -1 src/sys/contrib/ipfilter/netinet/fil.c 1.10 +2 -3 src/sys/contrib/ipfilter/netinet/ip_compat.h 1.10 +1 -1 src/sys/contrib/ipfilter/netinet/ip_fil.c 1.7 +1 -1 src/sys/dev/netif/txp/if_txp.c 1.7 +1 -1 src/sys/net/ip_mroute/ip_mroute.c 1.7 +1 -2 src/sys/net/ipfw/ip_fw2.c 1.6 +1 -2 src/sys/netinet/igmp.c 1.4 +158 -116 src/sys/netinet/in_cksum.c 1.6 +1 -1 src/sys/netinet/ip_gre.c 1.7 +1 -2 src/sys/netinet/ip_icmp.c 1.10 +1 -1 src/sys/netinet/ip_input.c 1.10 +1 -2 src/sys/netinet/ip_output.c 1.13 +1 -2 src/sys/netinet/tcp_input.c 1.9 +1 -2 src/sys/netinet/tcp_output.c 1.10 +1 -1 src/sys/netinet/tcp_subr.c 1.10 +1 -1 src/sys/netinet/tcp_syncache.c 1.9 +1 -2 src/sys/netinet/udp_usrreq.c
1.5 +1 -2 src/sys/netinet6/ipsec.c 1.5 +1 -2 src/sys/netproto/ipsec/ipsec.c 1.5 +1 -1 src/sys/netproto/ipsec/ipsec_input.c 1.4 +1 -2 src/sys/netproto/ipsec/ipsec_output.c
and finally remove sys/i386/i386 in_cksum.c sys/i386/include in_cksum.h ---snip--- - endian.h: * DTRT in C++ mode - quad.h: * we don't use gcc v1 anymore, remove support for it Suggested by: bde (long ago) - assym.h: * avoid zero-length arrays (remove dependency on a gcc specific feature) This change changes the contents of the object file, but as it's only used to generate some values for a header, and the generator knows how to handle this, there's no impact in the gcc case. Explained by: bde Submitted by: Marius Strobl <marius@alchemy.franken.de> - aicasm.c: * minor change to teach it about the way icc spells "-nostdinc" Not approved by: gibbs (no reply to my mail) - bump __FreeBSD_version (lang/icc needs to know about the changes)
Incarnations of this patch survive gcc compiles since a loooong time, I use it on my desktop. An icc compiled kernel works since Nov. 2003 (exceptions: snd_* if used as modules), it survives a build of the entire ports collection with icc.
Parts of this commit contains suggestions or submissions from Marius Strobl <marius@alchemy.franken.de>.
Reviewed by: -arch Submitted by: netchild
|
126312 |
27-Feb-2004 |
ru |
For some reason crt0.o needs to be linked first for pxeboot(8) to work. This is odd because loader(8) doesn't suffer from this problem. Perhaps pxeboot bootstrap can be fixed to handle this better. Anyway, PXE booting should work again.
|
125932 |
17-Feb-2004 |
ru |
Re-add sio.S, and properly deal with assembler files.
Repocopied by: joe
|
125901 |
16-Feb-2004 |
obrien |
Fix the AMD64 build: this file shouldn't exist.
|
125753 |
12-Feb-2004 |
ru |
Fixed the fatal bug introduced in previous commit: don't strip kgzldr.o -- kgzipping with such a loader produces bad images.
|
125751 |
12-Feb-2004 |
ru |
Clean CLEANFILES.
|
125722 |
11-Feb-2004 |
ru |
kzip(8) is long dead.
|
125693 |
11-Feb-2004 |
ru |
Get rid of unnecessary use of m4(1) by using cpp(1) instead. (John tells me there were problems when trying this before, but it appears to be safe these day.)
OK'ed by: jhb Repocopied by: joe
|
125621 |
09-Feb-2004 |
ru |
- Factor out -nostdlib to an upper level Makefile.inc.
- Now that bsd.prog.mk deals with programs linked with -nostdlib better, and has a notion of an "internal" program, use PROG where possible. This has a good impact on the contents of .depend files and causes programs to be linked with cc(1).
XXX: boot2 couldn't be converted as it's actually two programs.
Tested on: i386, amd64
|
125581 |
07-Feb-2004 |
ru |
Argh, unbreak "make depend" for AMD64.
Reported by: kris
|
125566 |
07-Feb-2004 |
ru |
- Removed -elf which is not a valid gcc(1) option anymore. - Removed -ffreestanding; it's enforced by ../Makefile.inc.
|
125564 |
07-Feb-2004 |
ru |
Generate .depend file.
|
125556 |
07-Feb-2004 |
ru |
Untangle building of AMD64 boot code.
Tested on: amd64 (sledge)
|
125537 |
06-Feb-2004 |
ru |
First round of cleanups to sys/boot/ makefiles:
- do not use PROG for what's not a real C program, - use sys.mk transformation rules where possible, - only create the "machine" symlink on AMD64, - removed MAINTAINER lines in individual makefiles, - added the LIBSTAND defitinion to <bsd.libnames.mk>, - somewhat better contents in .depend files.
Tested on: i386, amd64 Prodded by: bde
|
125517 |
06-Feb-2004 |
ru |
Inherit BINDIR from a parent Makefile.inc.
|
125516 |
06-Feb-2004 |
ru |
Only include ../Makefile.inc once in loader/Makefile.
|
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
|
124445 |
12-Jan-2004 |
jhb |
- Use constant for shift when converting file length in bytes to a sector count. - Fix the twiddle output so that it actually spins. - Save %cx around BIOS calls to read in sectors from the disc as at least one BIOS trashes %cx when called to read off of a USB CD-ROM drive.
Submitted by: Martin Nilsson <martin@gneto.com> MFC after: 1 week
|
124179 |
06-Jan-2004 |
obrien |
Allow one to specify the com port settings for boot0sio.
|
123476 |
11-Dec-2003 |
jhb |
- Change the lookup() function to report success or failure using the carry flag rather than explicitly halting if a lookup failed. - Add a loop around the call to lookup() to traverse an array of nul-terminated strings for possible paths to the boot loader. A double nul character denotes the end of the list. - Add a new message to say that the boot failed if all of the path lookups for a boot loader file failed. - Add '/boot/loader' as a second boot path. If you build an ISO using risky options to mkisofs such as -U then the loader will be called '/boot/loader' rather than '/BOOT/LOADER;0'. This allows cdboot to work with such risky ISO images. - Bump version to 1.2 to denote added functionality.
The basic idea as well as some of the code were provided by the submitter, but I added some extra code to use a loop rather than hard-code just 2 possible paths.
PR: misc/43543 Submitted by: kientzle MFC after: 1 week
|
123470 |
11-Dec-2003 |
jhb |
Properly fix a typo that the previous revision made even worse.
|
123336 |
09-Dec-2003 |
obrien |
Sync these two files.
|
123302 |
08-Dec-2003 |
obrien |
Hook boot0sio to the build. Use 'boot0cfg -b /boot/boot0sio' to use.
|
123301 |
08-Dec-2003 |
bms |
Add a serial console capable version of the FreeBSD boot manager. This has been lying around my tree(s) for the past year or so. It could do with TLC.
Requested by: obrien Sponsored by: Weyland-Yutani Corporation
|
122942 |
21-Nov-2003 |
dcs |
With the beastie menu a problem was introduced in which selecting a different kernel to boot with kernel="NAME" would load the kernel and loader.conf-selected modules from /boot/NAME, but it would not change module_path. So, for instance, the automatically loaded acpi.ko would come from /boot/kernel/acpi.ko, *always*.
Mind you, this happened for unassisted boot. If you interrupted, typed "unload" and then "boot NAME", it would Do The Right Thing.
The source of the problem is the double initialization with beastie's loader.rc. One would happen inside "start", and would load the kernel. The next one would happen later in the loader.rc script, resetting module_path.
Because module_path is set to the Right Value by the functions in support.4th that actually load the kernel, when beastie.4th proceeded to boot module_path would remain wrong, as the kernel was already loaded.
This can be corrected by removing either initialization, and also by changing the command used by beastie.4th from "boot" to "boot-conf", which makes sure you use the right kernel and modules.
I chose to remove the second initialization, since this let you interrupt (or confirm) boot before beastie even comes up. I avoid also doing the boot-conf change because that would simply cause the kernel and modules to be loaded twice (in fact, that was my original patch, until, in writing this very commit message, I saw the error of my ways).
This commit changes the semantics of module loading when using the beastie menu. Now it does what one would expect it to, but not what it was actually doing, so something may break for unusual setups depending on broken behavior. As our japanese friends so nicely put it, shikata ga nakatta. :-)
Approved by: re (scottl)
|
122923 |
20-Nov-2003 |
jhb |
Update the size of the OS string table that wasn't updated in the previous commit that removed the UNIX entry.
Submitted by: Rudolf Cejka <cejkar@fit.vutbr.cz> Approved by: re (rwatson)
|
122806 |
16-Nov-2003 |
phk |
When rebooting the machine jump to 0xf000:0xfff0 instead of 0xffff:0x0.
While we end up the same place, we end up with two different CS register values after the jump and 0xf000 is compatible with the hardware reset value.
This makes a difference if the BIOS does a near jump before a far jump.
Detective work and patch by: Adrian Steinmann <ast@marabu.ch>
|
122749 |
15-Nov-2003 |
bde |
Changed the RB_PAUSE flag from 0x40000 to 0x100000 and marked the old value as reserved for internal use in boot blocks, because RB_PAUSE broke binary compatibility by usurping the RB_DUAL flag. Probably no one except me has boot blocks for which this matters, since most boot blocks based on biosboot including pc98's boot2 can't boot elf kernels, and /boot/loader doesn't properly pass flags set by the previous stage.
reboot.h: Also mark the historical RB_PROBEKBD flag (0x80000) as reserved for internal use in boot blocks.
boot2.c: Added comments to inhibit usurping of other flags.
Approved by: guido, imp MFC after: 1 week
|
122463 |
11-Nov-2003 |
bde |
Include <sys/reboot.h> the definition of RB_BOOTINFO. The previous commit broke the world because it depended on namespace pollution that was only in my version of <machine/bootinfo.h>. The include was removed in rev.1.63 after the last reference to it went away in rev.1.61.
|
122433 |
10-Nov-2003 |
bde |
Fixed loss of setting of the RB_BOOTINFO flag in rev.1.43. Fixed wrong comment about this flag in rev.1.61. It is not historical like the comment said; it is the flag that says that most of what is laboriously put in the bootinfo struct is actually there. Newer kernels were bootable by even the broken boot2 without losing anything except the symbol table, but older kernels need at least the memory sizes.
Restoring the "|" with RB_BOOTINFO that was lost in rev.1.43 costs 5 bytes. The fix can be done in only 4 bytes by fixing some code that was removed in rev.1.61 (put RB_BOOTINFO back in in the initial value of "opts" and fix RBX_MASK to not clobber it.)
|
122177 |
06-Nov-2003 |
jhb |
Fix an incorrect quote character in an M4 test conditon. Basically, one of the verbose print statements that BTXLDR_VERBOSE enables wasn't properly enabled.
|
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.
|
119714 |
03-Sep-2003 |
phk |
Add BOOT_PXELDR_ALWAYS_SERIAL option which forces serial console.
|
119482 |
25-Aug-2003 |
obrien |
Use __FBSDID(). Also some minor copyright style cleanups.
|
119253 |
22-Aug-2003 |
imp |
Many newer CF do not handle having the entire track read from them at boot time. Instead, read it a sector at a time. While this sounds like a significant slowdown, I've not been able to measure any signficant difference.
Submitted by: luigi Reviewed by: jhb, sam (both a while ago) MFC After: 3 days
|
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).
|
117075 |
30-Jun-2003 |
ru |
Switch to using bsd.prog.mk; this gives us back the standard .s.o transformation rule.
|
117052 |
30-Jun-2003 |
ru |
Revision 1.13, besides its useful part, replaced bsd.prog.mk by bsd.lib.mk and thus broke the build since AFLAGS were not taken into considered anymore, as bsd.lib.mk currently has wrong .s.o rule that uses cc(1) instead of as(1).
Revision 1.14 reverted to using as(1), and revision 1.15 brought AFLAGS back to the business, but revision 1.14 also broke "make clean".
To fix this, but not break anything that was fixed in revisions 1.13-1.15, we revert mostly to revision 1.13 except for switching back to using bsd.prog.mk. This gives us back the default .s.o rule from sys.mk that uses as(1), and fixes "make clean" by restoring the full contents of OBJS.
Also fixed LDFLAGS.
|
116864 |
26-Jun-2003 |
peter |
Build on amd64. Yes, I know this isn't particularly nice.
|
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.
|
115941 |
07-Jun-2003 |
obrien |
Don't use a C compiler to assemble a pure asm file.
|
115899 |
06-Jun-2003 |
kuriyama |
Tweak make values and targets not to build kgzldr.o at installation stage.
Reviewed by: bde
|
115670 |
02-Jun-2003 |
obrien |
Don't use a C compiler to assemble a pure asm file.
|
115638 |
01-Jun-2003 |
obrien |
Accpet '1'..'5' in place of F1..F5 for serial console users.
Reviewed by: Bruce M Simpson <bms@spc.org>
|
115423 |
31-May-2003 |
scottl |
Enable the new bootloader for i386 only. The new loader.rc is will only be installed if an old one does not exist, i.e. only during install, not during upgrades.
Approved by: re
|
115410 |
30-May-2003 |
scottl |
Add a new bootloader menu. Pull in screen.4th and frames.4th from the examples directory to support it. This is installed only on i386 for now. It will be enabled in a later commit.
Approved by: re
|
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.
|
111490 |
25-Feb-2003 |
ru |
Fixed CLEANFILES.
Submitted by: cron
|
109886 |
26-Jan-2003 |
phk |
Build a file "boot" which consists of boot1 and boot2 concatenated.
There is little if any reason to treat the two components separately and it will simplify disklabel(8) and libdisk if we didn't.
|
109559 |
20-Jan-2003 |
phk |
Use NEXTDOSPART instead of MAX_SLICES.
|
109498 |
18-Jan-2003 |
obrien |
Simplify the Makefile by just using our standard PROG variable.
|
109235 |
14-Jan-2003 |
imp |
Save 4 more bytes by not initializing opts to 0. This moves it from the data section to the bss section givig us initialization for free.
Noticed by: bde
|
109197 |
13-Jan-2003 |
imp |
Fix interactive booting: o Revision 1.38 introduced the -n flag. It conflicted with the RB_BOOTINFO flag, so was in effect always on. Change the -n flag to be bit 0x1c instead of 0x1f. This also had the consequence that a mal-formed /boot.config would render the system unbootable because the user was unable to enter anything at all on the command line. o Remove the initialization of opt to be RB_BOOTINFO since we filter that bit out and do not otherwise use it.
Reviewed by: jhb MFC after: 3 days
|
108476 |
31-Dec-2002 |
obrien |
RIP liloldr. It is not complete (the LILO root= specification isn't passed to our loader for instance), it has not been touched in over 2 years. Linux has moved on to GRUB, so this is OBE now. If someone creeps up to work on it, it could become a port.
|
108149 |
21-Dec-2002 |
obrien |
-mno-align-long-strings can make things smaller, so lets use it in hopes that it does here.
|
108119 |
20-Dec-2002 |
imp |
Put back the casts to unsigned. While no strictly necessary for its current uses, the name strcmp has strong connotations that shouldn't lightly be discarded. This doesn't cost us anything.
Submitted by: bde
|
108100 |
19-Dec-2002 |
jake |
Renamed the loader's zipfs to gzipfs. zipfs.c was repo-copied to gzipfs.c.
|
108016 |
18-Dec-2002 |
imp |
I didn't intend to delete this rm from the Makefile. It snuck in at the last second before the commit.
# likely we can remove this hack now that gcc generates better aligned code # in the align to word case.
Noticed by: bde
|
108005 |
17-Dec-2002 |
imp |
Reduce diffs with Peter's expanded diffs: 1) Put back the keyboard printing printf, at the cost of 58 bytes. 2) Minor tweak to getstr at no apparent cost.
|
108000 |
17-Dec-2002 |
imp |
Make both UFS1 and UFS2 fit on the same boot blocks. These are a subset of Peter's patchs that are believed to be safe.
Makefile tweaks: o -fomit-frame-pointer o Change default to building both UFS1 and UFS2 bootblocks.
Lots of boot2 tweaks: o lookup is only ever called with kname, so use it directly. o inline memsize o getstr are only ever called with cmd, so hardware that. o tweaks to the parsing code to test after the conversion rather than before since we tested after anyways. o eliminate support for %x in printf. o eliminate a few bytes in printfs. o Tweak the boot banner. o eliminate support for wd and " " devices (I might add wd back to keep bde happy). o eliminate support for a few arguments.
This takes us from -162 bytes free to 67 bytes free.
I've tested this only on a few systems, so be careful when updating to this change.
Submitted by: peter, imp, ian
|
107889 |
15-Dec-2002 |
obrien |
Remove unneeded casts. Add others to make WARNS=5 happy.
|
107879 |
14-Dec-2002 |
phk |
Employ the unused bytes after the disklabel in the second sector. This makes it possible to make UFS1_ONLY and UFS2_ONLY versions which fit inside the traditional 16 sectors.
Remove assorted now unneeded hackery.
UFS1_AND_UFS2 still needs another 150 bytes to work, and that is probably not within our reach, ever.
|
107878 |
14-Dec-2002 |
phk |
Remove unnecessary call to fsread().
|
107875 |
14-Dec-2002 |
phk |
Always use the smaller GCC builtin memcpy
|
107874 |
14-Dec-2002 |
phk |
Remove unused variable.
|
107869 |
14-Dec-2002 |
phk |
Don't fill in the table with the BIOS idea about disk-geometry, we don't use it. This saves a surprising number of bytes.
|
107788 |
12-Dec-2002 |
ru |
Uniformly refer to a file system as "file system".
Approved by: re
|
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.
|
104683 |
08-Oct-2002 |
jhb |
Revert MEM_USR back to 0xa000 for BTX clients. Instead, adjust boot2 to run at 0xc000 by changing its virtual start address from 0x1000 to 0x2000.
Tested by: phk
|
104680 |
08-Oct-2002 |
phk |
Now that ufsread.c doesn't do 64bit divide remainder operations, don't bother with libkern.
Sponsored by: DARPA & NAI Labs.
|
104679 |
08-Oct-2002 |
phk |
Save a couple of bytes by not returning ints nobody care about.
Sponsored by: DARPA & NAI labs
|
104673 |
08-Oct-2002 |
green |
Reinstate rev 1.36 with an important line that got missed. Note this also improves the "random undocumented offsets into various memory spaces" a little bit.
|
104671 |
08-Oct-2002 |
phk |
Remove unused TYPE_WD and TYPE_WFD.
|
104670 |
08-Oct-2002 |
phk |
Correctly calculate dmadat: We need to take the address of _end, it's contents is irrelevant and likely to be zero;
This doesn't change the resultant value, but it does save a couple of bytes because &_end is constant.
|
104668 |
08-Oct-2002 |
phk |
Unbreak boot2 by backing out rev 1.36 to Makefile, which does not work as advertised:
bang# pwd /bang/src/sys/boot/i386/boot2 bang# make clean >& /dev/null bang# cvs -q update -r 1.35 Makefile >& /dev/null bang# make >& /dev/null bang# cat /usr/obj/`pwd`/boot2.h #define XREADORG 0x725 bang# cvs -q update -r 1.36 Makefile > & /dev/null bang# make clean > & /dev/null bang# make > & /dev/null bang# cat /usr/obj/`pwd`/boot2.h #define XREADORG 0x25 bang#
|
104666 |
08-Oct-2002 |
phk |
Save four bytes by shortening a string two chars.
Sponsored by: DARPA & NAI Labs.
|
104636 |
07-Oct-2002 |
green |
Correct a bug in adding 0x700 to a number.
|
104635 |
07-Oct-2002 |
phk |
Conditionalize the number of sectors loaded by boot1.s on UFS1/UFS12.
Conditionalize the "XX bytes left" checks reference on UFS1/UFS12.
Conditionally build the necessary 64bit math for boot2 if UFS12.
Sponsored by: DARPA & NAI Labs.
|
104632 |
07-Oct-2002 |
phk |
Change the comment character from # to // in boot1.s and run it through CPP so we can conditionalized things.
Sponsored by: DARPA & NAI Labs
|
104629 |
07-Oct-2002 |
phk |
Correctly adjust for moved start address.
It seems that the existence of a "depend" target in src/sys/boot is not to be taken as an indication that it actually does what one would expect, at least it clearly threw my testing off.
Apologies to: jhb
|
104620 |
07-Oct-2002 |
phk |
Correctly compensate for both offset and unoffset on-disk BSD disklabels.
Sponsored by: DARPA & NAI Labs.
|
104618 |
07-Oct-2002 |
phk |
Move MEM_USR a page upwards to make space for larger UFS1 boot2.
Load 4 sectors more than we used to. This is harmless overhead for the UFS1_ONLY case, but sufficient for boot2(UFS1+2).
Sponsored by: DARPA & NAI Labs
|
104612 |
07-Oct-2002 |
phk |
Move the definition of UFS1_ONLY into the Makefiles where it belongs.
Sponsored by: DARPA & NAI Labs.
|
104315 |
01-Oct-2002 |
iwasaki |
Don't call INT 12H anymore in boot program. Many recent machine have a broken INT 12H (Get base memory size) implementation and boot program stops if INT 12H is called.
This commit should solve the problem at very first step of FreeBSD installation occurred on newer some machines.
Reviewed by: bde, jhb MFC after: 1 week
|
104272 |
01-Oct-2002 |
phk |
Split MBR and PC98 on-disk sliceformats out from disklabel.h, step 1:
Peter had repocopied sys/disklabel.h to sys/diskpc98.h and sys/diskmbr.h.
These two new copies are still intact copies of disklabel.h and therefore protected by #ifndef _SYS_DISKLABEL_H_ so #including them in programs which already include <sys.disklabel.h> is currently a no-op.
This commit adds a number of such #includes.
Once I have verified that I have fixed all the places which need fixing, I will commit the updated versions of the three #include files.
Sponsored by: DARPA & NAI Labs.
|
104234 |
30-Sep-2002 |
peter |
Use as's --defsym switch to compensate for the loss of the M4 substitution of SIOPRT which broke kgzldr and therefore make release.
Pointed out by: murray
|
103870 |
23-Sep-2002 |
alfred |
use __packed.
|
103436 |
17-Sep-2002 |
peter |
Initiate deorbit burn for the i386-only a.out related support. Moves are under way to move the remnants of the a.out toolchain to ports. As the comment in src/Makefile said, this stuff is deprecated and one should not expect this to remain beyond 4.0-REL. It has already lasted WAY beyond that.
Notable exceptions: gcc - I have not touched the a.out generation stuff there. ldd/ldconfig - still have some code to interface with a.out rtld. old as/ld/etc - I have not removed these yet, pending their move to ports. some includes - necessary for ldd/ldconfig for now.
Tested on: i386 (extensively), alpha
|
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
|
102807 |
01-Sep-2002 |
kan |
Restore Rev. 1.40 (remove "Keyboard yes/no" printf). GCC 3.2 overflows boot2 by 12 bytes, this patch brings it back within the boundaries, with 12 bytes available for future bloat.
Approved by: obrien
|
102623 |
30-Aug-2002 |
jhb |
Revert previous untested revision. The i386 loader consists of three parts: At the front is btxldr, in the middle is BTX itself (our mini-kernel), and then the 'client' (loader.bin) which is the actual loader itself. boot2 just executes a raw ELF or a.out binary with the only setup provided being that a bootinfo structure is passed on the stack. Now, since loader.bin is a BTX client, the loader needs to be able to locate a BTX kernel for the client to execute in the context. Thus, just like pxelder, btxldr uses the a.out header on the loader binary to find the BTX kernel stored in the loader and set it up. It does _not_ just reuse the BTX kernel that boot2 invoked it with. This is because it can't assume that it will _have_ a "spare" BTX kernel lying around. For example, when cdboot loads the loader there isn't an existing BTX kernel. In fact, cdboot will only work with an a.out loader as well since it also "borrows" the BTX kernel in the loader binary (which it finds by parsing the a.out header) just as pxeldr does. The only difference between cdboot and pxeldr is where they get /boot/loader from.
If we wanted to make /boot/loader be an actual ELF binary we would need to change the following utilites to handle that (and they all have to be able to handle locating the BTX kernel inside of an ELF binary somehow): - btxldr - pxeldr - cdboot
If we didn't want to require a flag day but make the transition smooth then we need to be able to support both a.out and ELF versions of /boot/loader which isn't exactly trivial since all three of these utilities are written in assembly.
Pointy-hat to: peter
|
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).
|
102591 |
29-Aug-2002 |
peter |
Try #2 at having /boot/loader default to ELF. Have pxeldr build its own a.out version of loader.bin rather than depend on ../loader/loader being a.out.
|
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.
|
101602 |
09-Aug-2002 |
iwasaki |
Add help about hint.acpi.0.disable.
|
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.
|
100872 |
29-Jul-2002 |
ru |
Drop support for COPY, -c has been the default mode of install(1) for a long time now.
Approved by: bde
|
99976 |
14-Jul-2002 |
charnier |
The .Nm bootloader
|
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.
|
97867 |
05-Jun-2002 |
phk |
Add explicit dependency on ufsread.c
|
97860 |
05-Jun-2002 |
phk |
Preparation for UFS2 commit:
Factor the ufs reading code out of the i386/boot2 loader so it can be reused by for instance sparc64.
Sponsored by: DARPA and NAI Labs.
|
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.
|
96533 |
13-May-2002 |
ru |
Align CLEANFILES with revision 1.25 changes.
|
96532 |
13-May-2002 |
ru |
Fixed CLEANFILES after bsd.lib.mk sweep.
|
96513 |
13-May-2002 |
ru |
Removed now unused INTERNALSTATICLIB. INTERNALLIB now implies NOPIC and NOPROFILE. Removed gratuitous NOMAN.
|
96512 |
13-May-2002 |
ru |
Major cleanup of bsd.lib.mk.
Get rid of the INTERNALSTATICLIB knob and just use plain INTERNALLIB. INTERNALLIB now means to build static library only and don't install anything. Added a NOINSTALLLIB knob for libpam/modules. To not build any library at all, just do not set LIB.
|
96460 |
12-May-2002 |
bde |
Saved 176 bytes by compiling with -fno-guess-branch-probability. The default of -fguess-branch-probablility causes time optimizations (?) like rewriting `if (foo) x++;' as `if (!foo) goto forth; back: ; ...; forth: x++; goto back;". This is pessimizes space especially well on i386's because one short branch gets converted to 2 long ones.
Removed -fno-align-foo since it is implied by -Os. Previous commit messages seem to have overstated the new alignment bugs in gcc. The only case that affects boot2 is that -fno-align-functions (or equivalently -falign-functions=1) actually gives -falign-functions=2. This is caused by FUNCTION_BOUNDARY being 2 (bytes) instead of 1. The default case where the optimization level is 1 and no alignment options are given is more broken. All alignments are minimal, modulo the bug in FUNCTION_BOUNDARY. This is caused by toplev.c setting defaults too early.
Some hacks in previous commits ar not needed now, but may as well be kept until gcc is fixed. The previous on in the Makefile saved 96 bytes of text due to the wrong FUNCTION_BOUNDARY and 32 bytes of data due to unrelated bloat in the alignment of large objects. There aren't even any options to control alignment of data.
|
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.
|
96426 |
11-May-2002 |
peter |
Save about 60 bytes by #define memcpy __builtin_memcpy and removing the function we provided. Restore the Keyboard: yes/no printf for the probe diagnostics. We end up with 40 bytes free.
|
96425 |
11-May-2002 |
peter |
Reconnect boot2. I'm sure I'll regret this though. :-)
|
96424 |
11-May-2002 |
peter |
Use a crowbar and duct-tape to make boot2 fit again. This gets it down to 4 bytes free. I removed a printf (the Keyboard yes/no) since it is of marginal value and sed'ed the generated asm output to remove the unwanted aligns. There's probably a better way to gain a few extra bytes than losing the printf. Shortening strings is probably a better option but this should get us over the hurdle.
|
96415 |
11-May-2002 |
obrien |
NOPIC, NOPROFILE, NOMAN, and INTERNALSTATICLIB are redundant when using INTERNALLIB now.
|
96327 |
10-May-2002 |
jhb |
- Axe -mpreferred-stack-boundary=2 as -Os turns this on by default. - Axe -fdata-sections as turning it on or off makes no difference. If it did make a difference it would serve to bloat boot2 even further with extra padding. - Axe -fforce-addr. This gets us 32 bytes so we are down to only being 64-bytes over.
We still can't compile this with gcc 3.1. The problem seems to be that the -fno-align-foo options don't actually work. Comparing the new and old output it turns out that gcc is 4-byte padding all the functions and labels and what not despite the passed in arguments thus adding the unfortunate bloat to boot2.
|
96309 |
10-May-2002 |
obrien |
Don't be redundant.
|
96306 |
10-May-2002 |
obrien |
-ffreestanding is the word for /sys.
|
96305 |
10-May-2002 |
obrien |
Turn off boot2 -- it gained over 96 bytes dieting on the in-tree Gcc 3.1.
|
94956 |
17-Apr-2002 |
ru |
Install files via FILES, there's no reason to compare them before installing.
|
94952 |
17-Apr-2002 |
ru |
Really unbreak it this time (clean and install were still broken).
|
94510 |
12-Apr-2002 |
ru |
Unbreak this as well. At the extra bonus of fixing the contents of the .depend file.
Not really my day.
|
94411 |
11-Apr-2002 |
pb |
Code cleanup, no functional change. Patch adapted from PR.
PR: i386/36015 Submitted by: thomas@cuivre.fr.eu.org MFC after: 1 week
|
93352 |
28-Mar-2002 |
obrien |
Needs a.out support built into the loader.
|
93044 |
23-Mar-2002 |
pb |
Add option -n to i386 boot2 to disallow boot interruption by keypress.
PR: i386/36016 Submitted by: Thomas Quinot <thomas@cuivre.fr.eu.org> Reviewed by: rnordier MFC after: 1 week
|
92494 |
17-Mar-2002 |
sobomax |
Add splitfs vfs layer into libstand, which allows loading big kernels and modules split across several physical medias. Following is how it works:
The splitfs code, when asked to open "foo" looks for a file "foo.split" which is a text file containing a list of filenames and media names, e.g.
foo.aa "Kernel floppy 1" foo.ab "Kernel floppy 2" foo.ac "Kernel and modules floppy"
For each file segment, the process is:
- try to open the file - prompt "Insert the disk labelled <whatever> and press any key..." - try to open the file - return error if file could not be located
RE team is free to use this feature in the upcoming 5.0-DP1.
Reviewed by: msmith, dcs
|
92225 |
13-Mar-2002 |
ru |
Implement -m and -p loader(8) "boot" command options in boot2. (This is more useful for 4.x where boot blocks can still load kernels, modulo the PR kern/17422.)
|
89481 |
17-Jan-2002 |
iedowse |
Oops, the previous revision (1.35) broke booting from floppies because the buffers we use could end up spanning a 64k boundary. Unfortunately it causes too much bloat (228 -> 72 bytes free) to just reinstate the old malloc() function.
Instead, define a structure that contains all 4 buffers which must not cross 64k boundaries. We allocate a 64k-aligned instance in main() using the magic that was in the old boot2 malloc() function. This brings the free space down to 168 bytes, but that is still better than it was before revision 1.35 (136 bytes).
Reported by: Mike Brancato <funnyguy@digitalsmackdown.net> Pointy-hat to: iedowse
|
89368 |
14-Jan-2002 |
iedowse |
Make the i386 boot2 fully blocksize-agnostic, as has already been done with boot1 on the alpha. We use 4k buffers regardless of the actual filesystem block size.
Remove the simple malloc() implementation, as it is no longer used.
|
89240 |
10-Jan-2002 |
jhb |
Unrevert revision 1.12. Revision 1.14 backed this out saying it was backing out the 1024 sector boot0, but revision 1.12 had nothing to do with that. Instead, it documented various compile time options for boot0 and allowed them to be overridden via make.conf or options on the make command line.
|
89154 |
09-Jan-2002 |
iedowse |
Increase BSIZEMAX from 8k to 16k, so that we can reliably boot from filesystems with 16k blocks.
|
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.
|
87636 |
11-Dec-2001 |
jhb |
- Add 'fwrite' and 'fseek' words for writing to and seeking on files. - Change the 'fopen' keyword to accept a mode parameter. Note that this will break existing 4th scripts that use fopen. Thus, the loader version has been bumped and loader.4th has been changed to check for a sufficient version on i386 and alpha. Be sure that you either do a full world build or install or full build and install of sys/boot after this since loader.old won't work with the new 4th files and vice versa.
PR: kern/32389 Submitted by: Jonathan Mini <mini@haikugeek.com> Sponsored by: ClickArray, Inc.
|
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.
|
86164 |
07-Nov-2001 |
jhb |
Remove a few more debugging bits and turn on twiddle output while reading from the CD. This turns off the dual console output to COM1.
|
86094 |
05-Nov-2001 |
jhb |
- If we are booted via cdboot, use bc_add() to instantiate the cd0 device from the loader. - Cleanup extract_currdev() some and add support for setting the currdev to cd0 when booted via cdboot.
|
86093 |
05-Nov-2001 |
jhb |
Hook up the bioscd driver and the cd9660 filesystem.
|
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.
|
86001 |
04-Nov-2001 |
jhb |
Trim all the extra debugging output including hexdumps, debug messages, etc. The only bit of debugging left is performing dual output to both the screen and COM1. Also, the twiddle is still disabled since it seems to do weird things to the serial dump. cdboot now has 880 bytes to spare.
|
86000 |
04-Nov-2001 |
jhb |
Axe the old cdldr.
|
85999 |
04-Nov-2001 |
jhb |
Use the new cdboot instead of cdldr.
|
85998 |
04-Nov-2001 |
jhb |
This is a new CD bootstrap utility designed to replace cdldr. According to the El Torito standard for CD booting, a CD may boot in "No emulation" mode without using a floppy image. In this mode, the BIOS loads a program off of the CD into memory and creates a BIOS device using 2048 byte sectors for the CD. According to the standard, this program can be up to 0xFFFF virtual (512-byte) sectors long. The old cdldr depended on this by having the BIOS load the entire loader and the small cdldr stub as one binary similar to pxeboot so that cdldr didn't have to read the CD to find the loader. However, the NT no emulation loader just uses 1 disk sector (4 virtual sectors), so it seems that at least some BIOS writers just did enough to get NT to boot by only loading 1 sector and ignoring the sector count. Thus, while cdldr should have worked in theory, it doesn't in practice. This replacment fits entirely in 1 sector and includes simple ISO 9660 support. It looks for /boot/loader on the CD and loads it up using the BIOS. This allows us to not have to depend on the limited size of floppy images but use a full GENERIC kernel for CD-ROM installs in the future, among other things.
This version of cdboot is a bit bloated as it includes some useful debugging routines that people can pull to use in other x86 assembly modules. Even with all the debugging cruft, we still have 272 bytes to spare.
|
85995 |
03-Nov-2001 |
jhb |
Whoops, missed these bits in the previous commit.
|
85994 |
03-Nov-2001 |
jhb |
Add support for sending messages to the serial console which is helpful when debugging boot problems. It is not on by default but is enabled via the BTX_SERIAL variable. The port and speed can be set via the same variables used by boot2 and the loader.
|
85993 |
03-Nov-2001 |
jhb |
Add support for outputting multiple lines when dumping memory during the register dump. Change the default to bump 2 lines of output (32 bytes) instead of 1 line (16 byte).
|
85990 |
03-Nov-2001 |
jhb |
Add support for trace traps by returning from them just as for breakpoint traps rather than halting. Ideally, we should avoid printing the 'BTX halted' message for debug register dumps.
|
85989 |
03-Nov-2001 |
jhb |
Output a newline at the end of a dump so that there are blank lines between dumps when using breakpoints or tracing.
|
85805 |
01-Nov-2001 |
peter |
Fix the ILLEGAL fdisk table that is there for supporting "dangerously dedicated" mode. This was specifying that there are 256 (illegal!) heads on the disk. If bioses store that in a byte, and it gets truncated to 0, then that almost certainly causes the infamous divide-by-zero nightmare.
This is also most likely the reason why the Thinkpad T20/A20 series were locking up when FreeBSD was installed. This is also the most likely reason why a boot1 being present causes an IA64 box to lock up at boot. (removing the "part4" stuff from boot1.s fixes the IA64 boxes and would most likely have fixed the T20/A20 and some TP600E series thinkpads)
|
85376 |
23-Oct-2001 |
jlemon |
Set RB_MULTIPLE (multiple console support) if the kernel is booted with the -D flag.
|
85374 |
23-Oct-2001 |
jlemon |
Allow the RBX_DUAL flag to appear in bootinfo.
|
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.
|
83616 |
18-Sep-2001 |
sobomax |
Add support for loading bzip2-compressed kernels and modules. This support is turned off by default and could be enabled by defining LOADER_BZIP2_SUPPORT make variable. Also make gzip support optional (turned on by default) - it could be turned off via LOADER_NO_GZIP_SUPPORT make variable.
Please note, that due to limit on the amount of memory available to the loader(8), it is possible to load modules/kernels compressed with the smallest block size supported by the bzip2 - 100k (`-1' bzip2(1) option), however even in this mode bzip2(1) usually provides better compression ratio than gzip(1) in its best compression mode.
MFC after: 1 month
|
83368 |
12-Sep-2001 |
ru |
Create backup copies using install(1).
|
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
|
82542 |
30-Aug-2001 |
msmith |
Mention that the ACPI module load can be disabled by unsetting $acpi_load
|
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.
|
82133 |
22-Aug-2001 |
peter |
OK, now I am scared of pxeldr. It had /boot/loader appended onto the end of it and decoded the headers.
Submitted by: jhb
|
82128 |
22-Aug-2001 |
peter |
Generate an ELF /boot/loader instead of fake a.out. The fake a.out wrapper did not work with old a.out-only bootblocks anyway. :-(
|
81367 |
09-Aug-2001 |
mp |
Allow for text section alignment to properly align the "end" symbol at the actual end of the section. The new gas (binutils) puts in additional padding which was misaligning the concatenated btx loader.
Reported by: Oliver Hartmann <ohartman@klima.physik.uni-mainz.de>, Harti Brandt <brandt@fokus.gmd.de> Tested by: Oliver Hartmann <ohartman@klima.physik.uni-mainz.de>, David Wolfskill <dhw@whistle.com>, ps Reviewed by: jhb MFC after: 1 day
|
81363 |
09-Aug-2001 |
jhb |
Trim trailing whitespace.
|
80751 |
31-Jul-2001 |
jhb |
Add in a hack to support IBM "El Torito" CD-ROM booting BIOS's which expect the first sector of the emulated floppy to contain a valid MS-DOS BPB that it can modify. Since boot1 is the first sector of boot.flp, this resulted in the BIOS overwriting part of boot1: specifically the function used to read in sectors from the disk.
Submitted by: Mark Peek <mark@whistle.com> Submitted by: Doug Ambrisko <ambrisko@ambrisko.com> PR: i386/26382 Obtained from: NetBSD, OpenBSD (the example BPB) MFC after: 1 month
|
80203 |
23-Jul-2001 |
kris |
s/adress/address/
Inspired by: OpenBSD MFC After: 1 week
|
80084 |
21-Jul-2001 |
rnordier |
Unset MAINTAINER.
|
78522 |
21-Jun-2001 |
peter |
Remove -DNEW_LINKERSET, it is not used here anymore. This is now native.
|
77273 |
27-May-2001 |
rnordier |
Fix reboot buglet when BOOT_BTX_NOHANG is defined.
Submitted by: Umesh Krishnaswamy <umesh@juniper.net>
|
76224 |
02-May-2001 |
obrien |
* include/elf.h has been repo copied to include/elf-hints.h, and it no longer includes machine/elf.h. * consumers of elf.h now use the minimalist elf header possible.
This change is motivated by Binutils 2.11.0 and too much clashing over our base elf headers and the Binutils elf headers.
|
74850 |
27-Mar-2001 |
ru |
MAN[1-9] -> MAN.
|
74592 |
21-Mar-2001 |
jhb |
Always disable paging when exiting back to real mode after receiving a fatal trap. Also, reload the GDT register to point to BTX's GDT before playing around with the segment registers to return to real mode. This is helpful if the kernel causes a fatal exception before it has setup its own IDT and fault handlers. For example, if one happens to break mtx_init(). Without these changes BTX would recursively page fault (if paging was not disabled) or triple fault and reset the CPU (without the GDT reload) instead of providing a potentially useful register dump.
Reviewed by: rnordier
|
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.
|
72091 |
06-Feb-2001 |
asmodai |
Fix typo: seperate -> separate.
Seperate does not exist in the english language.
|
70177 |
19-Dec-2000 |
rnordier |
Fix column alignment (whitespace-only change).
|
69985 |
13-Dec-2000 |
rnordier |
Strip the .comment and .note sections when stripping. There's no point in retaining this info, particularly under BTX.
|
69921 |
12-Dec-2000 |
rnordier |
Add a magic number, for easier identification of boot0. At present, this is used only by libdisk.
|
69395 |
30-Nov-2000 |
jhb |
Set the proper bit in the howto flags for a serial console rather than setting the index of the bit. (0xc vs. 0x1000)
|
69391 |
30-Nov-2000 |
ps |
Add support for probing the keyboard from pxeboot which will behave exactly the same as passing -P to boot2.
Submitted by: jhb
|
69027 |
22-Nov-2000 |
ru |
mdoc(7) police: do not split author names in the AUTHORS section.
|
68854 |
17-Nov-2000 |
ru |
mdoc(7) police: use certified section headers wherever possible.
|
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>
|
68314 |
04-Nov-2000 |
rnordier |
Support a.out: avoid (%dx) in in/out instructions, and use an m4 macro to supply underscores for externals.
|
68310 |
04-Nov-2000 |
ps |
MF4: Add LOADER_TFTP_SUPPORT make.conf flag.
|
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
|
68136 |
01-Nov-2000 |
mph |
"it's" --> "its" (possessive).
Correct a malformed sentence.
|
66556 |
02-Oct-2000 |
rnordier |
Go back to occupying just a single sector, reverting r1.17 - r1.20. Taking over the sector following the MBR causes problems on some machines, and the actual gains are fairly small in terms of how the space is presently used.
Since we need a number of further features (eg. handling extended partitions) that can't be readily accommodated in the basic boot0 design anyway, rather choose to implement the additional stuff separately and concentrate on compatibility rather than features here.
|
66555 |
02-Oct-2000 |
rnordier |
Set MAINTAINER.
|
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
|
65685 |
10-Sep-2000 |
dcs |
Bump up version as a result of the recent changes to kernel path, and boot-conf&boot semantic changes.
Also, make it 1.0.
Reminded by: peter (even though he doesn't know it)
|
65640 |
09-Sep-2000 |
rnordier |
Correct BSD/OS slice type.
PR: 21099 Submitted by: Alan Clegg <abc@bsdi.com>
|
65598 |
08-Sep-2000 |
imp |
Look for libstand in the built tree rather than in /usr/lib. This likely could be done better, but the tree is broken and I wanted to get a fix into the tree.
Reviewed by: msmith
|
65499 |
05-Sep-2000 |
msmith |
Fix a bug which prevents parsing this Makefile without having a previously-built loader binary elsewhere.
|
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.
|
65063 |
24-Aug-2000 |
jhb |
Add a new compile-time tweak to BTX. If you set the make(1) variable BOOT_BTX_NOHANG, then BTX will be compiled with the appropriate flags so that it reboots after a fault instead of hanging forever.
Requested by: ps Approved by: rnordier
|
64550 |
11-Aug-2000 |
peter |
Add -mpreferred-stack-boundary=2 to CFLAGS for i386. This and libstand reduces /boot/loader from 163840 bytes to 155648 and pxeboot from 165888 bytes to 157696 bytes.
|
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.
|
64385 |
08-Aug-2000 |
rnordier |
Typo/spelling fixes.
|
64260 |
04-Aug-2000 |
jhb |
Argh! Fix a brainfart of mine. In the old boot0, we relocated ourself to 0x600 via a 'rep movsw'. Once that was done, %cx was zero, so we could simply use 'movb' to update the lower byte of %cx in preparation for zeroing out the fake partition entry used to boot to other drives via F5. Well, in the new boot0, we don't actually relocate ourselves, instead it is easier to create the fake partition entry first and then just use it to get the BIOS to load all of boot0 into memory at 0x600. However, since we aren't doing the relocate code anymore, we don't know that %cx == 0 when we hit the 'movb' to setup %cx for clearning the fake partition entry. Thus, if %ch != 0 when the BIOS started boot0, then it would end up zeroing a lot more memory than just 8 words. The solution is to do a word move of $8 into %cx.
Debugging help from: David Wolfskill <dhw@whistle.com>
|
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'.
|
63328 |
17-Jul-2000 |
jhb |
Oops. Remove some debugging code used to display a hexdump of the sector we just loaded from the disk. The code to call it was commented out, and it easily fit into the extra sector, but remove it anyway as it is unneeded.
|
63321 |
17-Jul-2000 |
jlemon |
Unbreak the build -- no manual page for this yet.
|
63315 |
17-Jul-2000 |
jlemon |
Hook up liloldr
|
63314 |
17-Jul-2000 |
jlemon |
This is `liloboot', which creates a file which can be treated like a Linux kernel image, and is designed to be dropped into a Linux system and booted via LILO. Once booted, the user is greeted by the FreeBSD loader. This still isn't quite complete, as the the root= specification from LILO isn't currently passed to the loader yet.
|
63032 |
12-Jul-2000 |
jhb |
The new and improved boot0, v1.1. This version adds the following: - Autodetection and support of the BIOS EDD extensions to work around the 1024 cylinder limit on all but really ancient BIOS's. - To work around some BIOS's which break when EDD is used with older drives, we only attempt to use EDD if the cylinder is > 1023. - Since this new code required more space than we had left, expand boot0 to 2 sectors (1024 bytes) in length. - Add support for boot0 being multiple sectors using predefined constants. If boot0 needs to be extended in the future, all that is required is bumping the NUM_SECTORS constant. - Now that we have more room to work with, add a few more fs type descriptions while making others more verbose.
|
62787 |
07-Jul-2000 |
jhb |
Remove commented out NOMAN variable.
|
62665 |
06-Jul-2000 |
jhb |
- Inline all the functions that are only called once. This results in a savings of 68 bytes in boot2. - Also add a comment warning that you can't remove the empty exit() function.
|
62660 |
06-Jul-2000 |
jhb |
Doh. The disklabel is not 0x200 bytes of zeros, but it is 0x200 bytes long.
|
62658 |
06-Jul-2000 |
jhb |
Clarify the comments in here a bit. The first sector of boot2 is not just zeros, it is actually the disklabel itself. boot2.ldr is simply a placeholder in the boot2 binary.
|
62657 |
06-Jul-2000 |
jhb |
Emulate the WBINVD instruction when it is called by the BIOS.
|
62242 |
29-Jun-2000 |
jhb |
Change the fault message to say 'BTX halted' isntead of 'System halted' to avoid confusion.
Submitted by: George Scott <George.Scott@its.monash.edu.au>
|
62229 |
29-Jun-2000 |
jhb |
Rework the detecting of the rdmsr and wrmsr instructions in the v86 monitor so that the codepath is cleaner and easier to maintain in the future.
|
62176 |
27-Jun-2000 |
jhb |
- Don't blindly assume that there are 8 hard drives installed. Instead, use the BIOS Equipment List to determine how many hard drives are installed and if the drive number we received in %dl is valid. - Don't bother to disable interrupts when setting up the stack. The 8086 and beyond implicitly disable interrupts after an instruction that sets %ss (for example, a pop or a mov) so that you can safely set %ss and %sp in two consecutive instructions. An exception to this is the lss instruction, which can set both registers simultaneously and thus doesn't need this hack. - Add support for EDD BIOS extensions to support booting off of hard drives of nearly arbitrary length.
|
62146 |
26-Jun-2000 |
jhb |
Comment this.
|
62138 |
26-Jun-2000 |
jhb |
Add in support for EDD to support large disks via LBA. This uses a method similar to that of the loader to avoid potentially breaking older drives in that we only use EDD if the desired cylinder is > 1023.
|
61836 |
19-Jun-2000 |
jhb |
Comment this bad boy. Hopefully the next person that comes along won't have to spend a few hours reading the code to figure all this out.
|
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>
|
61743 |
17-Jun-2000 |
jhb |
Add support for emulating the RDMSR and WRMSR instructions into BTX. In theory, this should allow the K7V Athlon motherboard to boot ok with boot virus protection enabled. However, I have no hardware to test this. It shouldn't break anything though. :)
Prodded by: Kelly Yancey <kbyanc@posi.net>
|
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.
|
61627 |
13-Jun-2000 |
ru |
Treat \t and \n inside /boot.config as whitespaces.
PR: 19215
|
61377 |
07-Jun-2000 |
dcs |
Bump loader version due to copyin, copyout, setenv&cia.
|
60846 |
24-May-2000 |
jhb |
Convert the short stub of real-mode code into 16-bit assembly.
|
60823 |
23-May-2000 |
jhb |
Grrr, fix a silly 'movl' -> 'movw' typo in both pxeldr and cdldr. Also, remove unnecessary cruft from the Makefiles for both.
|
60822 |
23-May-2000 |
jhb |
Clean up some more 16-bit code and get rid of more m4 macros.
|
60821 |
23-May-2000 |
jhb |
Clean up all of the 16-bit assembly code in the x86 bootstrap to work with the new binutils. Now that we have a decent assembler, all the old m4 macros are no longer needed. Instead, straight assembly can be used since as(1) now understands 16-bit addressing, branches, etc. Also, several bugs have been fixed in as(1), allowing boot0.s to be further cleaned up.
|
60703 |
19-May-2000 |
dcs |
This file got repo-copied to common/.
|
60702 |
19-May-2000 |
dcs |
Move man page directives to common/Makefile.inc.
|
60684 |
18-May-2000 |
dcs |
Make corrections to allow for Alpha.
|
60277 |
09-May-2000 |
dwhite |
Remove metion of the 'magic options.' Apparently PXE doesn't require the special options on 0.99c (it mumbles something about 'PXE server not found' but works anyway), and it won't work at all with PXE 2.0.
|
60046 |
05-May-2000 |
jhb |
Switch to using the .code16 as(1) directive and using 16-bit assembly code instead of using 32-bit code and having to just "know" that it's really 16-bit instructions when things run. This also allows the code to use fewer macros and more actual assembly statements, which eases maintenance. Unfortunately, due to as(1) brokenness, we still use m4 macros for all 16-bit addresses, and all short jumps (i.e., 8-bit relative addresses in the jump instruction) must be wrapped in .code32 directives to avoid useless bloat by as(1). This also fixes a few problems that were preventing boot0 from compiling with the latest and greatest version of as(1).
|
60023 |
05-May-2000 |
ps |
Remove the static heap. It is unknown why it was needed in the beginning, but it no longer is required. This has been tested with many different revisions of the PXE rom from Intel.
|
60006 |
04-May-2000 |
dcs |
Make documentation on recently added heap? command reflect reality.
|
60005 |
04-May-2000 |
dcs |
Add "heap?" to loader's man page.
|
60003 |
04-May-2000 |
dcs |
Further improve ordering.
|
60002 |
04-May-2000 |
dcs |
Sort entries in FreeBSD-specific FICL commands.
|
59887 |
02-May-2000 |
dwhite |
Add man page for pxeboot.
Reviewed By: asmodai
|
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.
|
59659 |
26-Apr-2000 |
jhb |
Now that we are compiling PXE into libi386, we don't need ../libi386 in .PATH anymore.
|
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.
|
59634 |
26-Apr-2000 |
jhb |
Don't disable interrupts when calling a vm86 mode interrupt or routine from user mode. Don't disable interrupts when returning from vm86 mode to user mode either. Now, we only disable interrupts before calling a hardware interrupt handler, which is the only time we _should_ be disabling interrupts.
Because of this, err, feature, any routine that one called in vm86 mode had to re-enable interrupts by setting the interrupt flag or interrupts would remain disabled even after the routine returned. For example, I have a simple debugging routine that uses a vm86 mode function to dump any arbitrary memory word that I use to read the BIOS timer or any other memory location. This function does 1 load instruction from memory and then returns. Since it didn't re-enable interrupts, the first time I called it to read the BIOS timer, it disabled interrupts. This also affected the PXE bootstrap as it needs interrupts enabled while it is processing. This patch fixes both of those situations so that those functions do not worry about having to enable interrupts. Hardware interrupt handlers worked fine with the old code because they always enable interrupts as part of their routine.
If you have any problems with the loader after this commit, please let me know. I'd like to MFC it in a week or two since PXE support needs it.
Noticed by: ps, Michael Johnston <michael.johnston@intel.com>
|
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.
|
59150 |
11-Apr-2000 |
jhb |
Add a missing dependency: boot2 depends on the BTX kernel.
|
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>
|
57254 |
16-Feb-2000 |
jhb |
This patch to BTX fixes several small things:
1) Fix a bug in the int15 function 87 emulation where we only copied half of what the BIOS asked for. This caused the Mylex RAID adapter to go haywire and start trashing memory when you tried to boot from it. 2) Don't use interrupt 19 to reboot. Instead, set the reboot flag to a warm boot and jump to the BIOS's reboot handler. int 19 doesn't clear memory or restore the interrupt vector table, and thus really isn't safe. For example, when booting off of PXE, the PXE BIOS eats up a chunk of memory for its internal data and structures. Since we rebooted via int 19, using the 'reboot' command in the loader resulted in that memory not being reclaimed by the BIOS. Thus, after a few PXE boots, the system was out of lower memory. 3) Catch any int 19 calls made by a BTX client or a user pressing Ctrl-Alt-Delete and shutdown BTX and reboot the machine cleanly. This fixes Ctrl-Alt-Delete in the loader and in boot2 instead of presenting the user with a BTX fault.
Approved by: jkh Found by: 1) by msmith
|
57090 |
09-Feb-2000 |
ru |
Support the new ata(4) syntax, while providing backward compatibility for wd(4).
Reviewed by: jkh, msmith, sos Approved by: jkh
|
56992 |
04-Feb-2000 |
luigi |
Add a NOFORTH variable so we can build a smaller loader without Forth support, for use with PicoBSD
Approved-By: jordan
|
56903 |
30-Jan-2000 |
jhb |
Fix bogon in previous commit. Re-enable Forth in the loader.
Noticed by: dcs Approved by: jkh
|
56752 |
28-Jan-2000 |
jhb |
Allow for cdldr to be built in ${.OBJDIR}/../cdldr/cdldr instead of only looking for it in ${.CURDIR}/../cdldr/cdldr. This fixes world.
|
56693 |
27-Jan-2000 |
jhb |
Add the new cdldr CD bootstrap loader. This patch includes the following:
- Fix btxldr to preserve a NULL bootinfo pointer when it copies the kernel arguments. - Add the cdldr bootstrap program. This program is tacked onto the beginning of the standard 3rd stage boot loader (/boot/loader) to form the CD boot loader (/boot/cdboot). When a CD is booted, the cdboot file is copied into memory instead and executed. The cdldr stub emulates the environment normally provided by boot2 and then starts the loader. This booting method does not emulate a floppy drive, but boots directly off of the CD. This should fix the problems some BIOS's have with emulating a 2.88 MB floppy image. - Add support to the loader to recognize that it has been booted by cdldr instead of boot2 and use a simpler method of extracting the BIOS boot device.
|
56691 |
27-Jan-2000 |
jhb |
Fix brokenness introduced with the PAGING conditional variable. The value of %cr0 wasn't reloaded into %eax before being modified to turn protected mode off if PAGING was not defined. The result was that the processor did not exit protected mode, so when it tried to jump to segment 0x0 in the next instruction to clear the prefetch cache like one should when leaving protected mode, it actually tried to jump to a null selector, causing a GPF.
|
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.
|
53637 |
23-Nov-1999 |
dcs |
Add machine-specific include path to ficl's sysdep.h. Wishes I had gone to bed earlier.
Pointed by: peter
|
53174 |
15-Nov-1999 |
obrien |
Add -fdata-sections, which is a new GCC 2.95 optimization. Remove -fschedule-insns as it wasn't such a big win with 2.95 after all.
Add the *BIG* win "-mpreferred-stack-boundary=2" optimiztion submitted by Dima. GCC 2.95 ensures the stack frame is always properly [opitimally] aligned by surrounding every function call by code simular to "addl $-12, %esp" / "addl $12, %esp". Here we need the reduction in space, with speed not an issue.
|
53159 |
14-Nov-1999 |
obrien |
Return this file to its pre-spammed version. Thanks to some new compiler optimizations, we can go from 3 bytes free with the spammed version, to 279 bytes free with the full version.
|
53135 |
14-Nov-1999 |
obrien |
Enter complier upgrade mode again. We need to cut 169 bytes from this: Remove some printf() calls, reduce size of buffers, and abbreviate some strings.
Hopefully the boot people will fix this spamage after the cut over to Gcc 2.95.2 as the system compiler.
|
53134 |
13-Nov-1999 |
obrien |
Turn on the -fforce-addr and -fschedule-insns optimizations. Adding either one gives us an additional 32 bytes of additional space available when using EGCS 1.1.2. With GCC 2.95.2 -fforce-addr gives us 12 more bytes, and adding -fschedule-insns gives us an additional 4 bytes.
|
52545 |
27-Oct-1999 |
jhb |
If PAGING is defined then actually turn it on when entering protected mode.
|
52395 |
19-Oct-1999 |
dcs |
Make the "machine" target a prequisite to all source files.
Hinted-at by: bde
|
52173 |
12-Oct-1999 |
jhb |
aThis patch updates the BTX to emulate the BIOS function "Copy Extended Memory" called as function 0x87 of interrupt 0x15. Since the Mylex RAID adapter's BIOS used this function to access memory (actually PCI bus space) beyond 16 MB, this patch also allows BTX to address all 4 Gig of possible address space on i386+. Since the loader does not have room for 4 MB of page tables, this was done by turning off paging.
Paging was turned off via a compile time setting which defaults to off. To enable paging, simply define the make variable PAGING.
rnordier might want to clean this up later.
Submitted by: W. Gerald Hicks <wghicks@bellsouth.net>, Bosko Milekic <bmilekic@ares.dsuper.net> Reviewed by: msmith Required by: Mylex RAID adapter's BIOS
|
52148 |
12-Oct-1999 |
brian |
Blank out the twiddly thing when outputting the ``BTX loader'' message.
|
50822 |
03-Sep-1999 |
julian |
Remove accidental cut&paste garbage in a comment.
|
50820 |
03-Sep-1999 |
julian |
Comment the boot manager. So I don't have to work it all out again :-)
Reviewed by: rnordier@freebsd.org
|
50477 |
28-Aug-1999 |
peter |
$Id$ -> $FreeBSD$
|
49191 |
28-Jul-1999 |
nik |
Fix some typos.
PR: docs/11955 Submitted by: Christian Weisgerber <naddy@mips.rhein-neckar.de>
|
49060 |
24-Jul-1999 |
rnordier |
Recognise NetBSD slices.
Submitted by : Lars Koeller <lkoeller@cc.fh-lippe.de> PR : 12772
|
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.
|
48919 |
20-Jul-1999 |
rnordier |
Reintroduce LBA (cyl > 1023) support in the bootblocks, enabled by means of a build option.
|
48913 |
19-Jul-1999 |
rnordier |
Activate kgzldr.
|
48912 |
19-Jul-1999 |
rnordier |
Use M4FLAGS for m4.
|
48908 |
19-Jul-1999 |
rnordier |
This commit was generated by cvs2svn to compensate for changes in r48907, which included commits to RCS files with non-trunk default branches.
|
48351 |
29-Jun-1999 |
peter |
Reconcile all the loader newvers.sh's into one common one.
|
48135 |
23-Jun-1999 |
ru |
-mdoc fix.
|
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).
|
48037 |
19-Jun-1999 |
rnordier |
Provide for enabling/disabling each slice individually.
|
48034 |
19-Jun-1999 |
rnordier |
Fix use of e_phoff in place of e_phnum.
|
48033 |
19-Jun-1999 |
rnordier |
Correct and clarify some comments.
|
48010 |
18-Jun-1999 |
rnordier |
Change active flag handling; sanity check passed drive number; pass partition pointer to bootstrap; optimise away 10 bytes; cosmetics.
|
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
|
47473 |
24-May-1999 |
rnordier |
Activate mbr.
|
47472 |
24-May-1999 |
rnordier |
This commit was generated by cvs2svn to compensate for changes in r47471, which included commits to RCS files with non-trunk default branches.
|
47395 |
22-May-1999 |
rnordier |
Fix a reference to the mysterious Mike Smisth.
|
47312 |
18-May-1999 |
rnordier |
Drop some non-existent commented-out targets.
|
47011 |
11-May-1999 |
jb |
Found the needle in the haystack!
Use colons instead of semi-colons in the default init_path to behave like UNIX instead of DOS.
Suggested by: bde Reminded by: des (with no hint as to *which* man page).
|
46354 |
03-May-1999 |
jkoshy |
Correct typos.
PR: docs/11445 Submitted by: Kazuo Horikawa <horikawa@jp.freebsd.org>
|
46074 |
25-Apr-1999 |
dcs |
Make man page reflect reality on parsing rules. Now I know Jordan never read this man page... :-)
|
46009 |
24-Apr-1999 |
dcs |
Move loader.conf.5, while it is still in it's first revision.
|
46005 |
24-Apr-1999 |
dcs |
Add loader.4th man page (worst man page I ever wrote -- reviews are welcomed). Correct a nasty bug in loader.4th before anyone notices, add a couple of features.
|
45881 |
20-Apr-1999 |
des |
Make the location of init(8) tunable at boot time.
|
45759 |
18-Apr-1999 |
dcs |
Installs a default loader.rc if none exists. Document loader.conf.
|
45335 |
05-Apr-1999 |
rnordier |
Fix damage introduced in previous commit.
|
45334 |
05-Apr-1999 |
rnordier |
Optimize better for space. Thanks to: jdp
|
45309 |
04-Apr-1999 |
obrien |
Remove the string ">>> FreeBSD/i386 BOOT". I need to reduce the size of boot2 by 16 bytes. I expect this to be temperary until the boot2 authors can do the proper fix.
|
45175 |
31-Mar-1999 |
joerg |
Make <DEL> an alternative rubout character for command input; many serial terminals use this as their default rubout key.
|
44861 |
18-Mar-1999 |
dcs |
Avoid copying m_args if none exists. (Perhaps this is a better solution, Doug?)
|
44840 |
17-Mar-1999 |
dcs |
Version bump: kvm & dictionary size.
|
44780 |
15-Mar-1999 |
dcs |
The man page, version 0.1.
|
44622 |
10-Mar-1999 |
dcs |
Install new loader.rc stuff.
|
44572 |
08-Mar-1999 |
dcs |
Add MODINFO_ARGS, parameters passed to a module at load time.
VS: ----------------------------------------------------------------------
|
44357 |
01-Mar-1999 |
rnordier |
Save option, rather than slice, selected. This permits unattended booting from other than drive 0, as the F5 keypress is saved and "replayed."
Requested (some time ago) by: archie
|
44296 |
26-Feb-1999 |
rnordier |
Implement "setdrv" option
|
44274 |
25-Feb-1999 |
rnordier |
Emulate a V86 "movl %cr0,%eax" instruction.
Feedback and testing: Kurt Hopfensperger <kjhmdjd@ix.netcom.com>
|
44243 |
24-Feb-1999 |
msmith |
Don't try protecting page 0; it seems that BIOS writers now feel it's appropriate to check for Windows95 by polling for state in low memory, with fatal results.
Submitted by: rnordier@freebsd.org
|
43759 |
08-Feb-1999 |
dcs |
Bumb up loader's version.
Reviewed by: Michael Smith <msmith@freebsd.org>
|
43374 |
29-Jan-1999 |
rnordier |
Check size of partition before using it.
|
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>
|
43115 |
24-Jan-1999 |
msmith |
Document root_disk_unit
|
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.
|
43113 |
24-Jan-1999 |
msmith |
Fill in the bi_bios_dev field in the bootinfo struct; the loader doesn't guess this value well in anything other than the simplest of situations.
|
43068 |
22-Jan-1999 |
rnordier |
Fix read error not being detected.
|
43059 |
22-Jan-1999 |
rnordier |
Push version numbers up to 1.00. This is just intended to reflect that the BTX code can be regarded as stable: there are no associated code changes.
Suggested by: obrien
|
42807 |
18-Jan-1999 |
msmith |
Transition from using Perl to using awk for our text-manipulation needs. This removes the dependancy on Perl for the generation of the loader, allowing the world to be built on a perl-free system.
Submitted by: Joe Abley <jabley@clear.co.nz>
|
42638 |
13-Jan-1999 |
rnordier |
In the event of a disk error, boot2 is expecting an error code to be returned: give it one
|
42519 |
11-Jan-1999 |
rnordier |
Drop boot.help support.
|
42510 |
11-Jan-1999 |
msmith |
Preserve the previous loader as loader.old.
Note no matching commit for the Alpha, as the alpha boot0 stage does not have the ability to prompt for user input.
PR: kern/9406 Submitted by: "Daniel C. Sobral" <dcs@newsguy.com>
|
42493 |
10-Jan-1999 |
msmith |
Disable kzipping the loader; it seems to be breaking the aout-to-elf build
|
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
|
42478 |
10-Jan-1999 |
peter |
Damn, I thought I had committed this already, but it seems not.
Move the relocated boot1 and arg transfer space from 0x600/0x800 to 0x700/0x900. In theory this should make no difference, apart from the fact that Buslogic controllers happen to use a few bytes at 0x600 for some sort of scratch space for it's int 0x13 hook (!!!), causing the machine to crash badly when the boot2 code makes it's callbacks into boot1 for disk IO.
Submitted by: Robert Nordier <rnordier@freebsd.org>
|
42446 |
09-Jan-1999 |
msmith |
Explicitly look for kzip in /usr/bin, again this is a stopgap, to avoid making kzip a build tool.
|
42420 |
09-Jan-1999 |
msmith |
kzip the loader, this shrinks it to about 60% of its original size. Note that this is a stopgap with dependancies on the a.out tools.
|
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)
|
42274 |
04-Jan-1999 |
msmith |
Restore dependancy to build loader.help here
|
42268 |
03-Jan-1999 |
msmith |
Reenable generation of the loader.help file
|
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
|
41838 |
16-Dec-1998 |
msmith |
Disable build/install of boot.help until we sort out how to construct it in the makeworld environment.
|
41822 |
15-Dec-1998 |
msmith |
Reformat help to improve subtopic display appearance, other minor cleaning. The 'help' command in the loader should now be usable and hopefully informative.
|
41821 |
15-Dec-1998 |
msmith |
Build the composite help file from the generic and architecture-specific help files, sorting topics and subtopics to allow maximum flexibility.
|
41587 |
07-Dec-1998 |
ache |
unlocalize date Submitted by: Cejka Rudolf <cejkar@dcse.fee.vutbr.cz>
|
41540 |
05-Dec-1998 |
rnordier |
Revise some comments and labels.
|
41412 |
29-Nov-1998 |
rnordier |
Drop EDD support detection, though retain configurable use of disk packet interface. Add booteasy-style F5 support. Add no-update option. Implement various space optimizations and consistency fixes.
|
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>
|
41107 |
12-Nov-1998 |
jkh |
bootforth seems to be working well enough for me and others to turn on by default. If it causes trouble, it's very easy to switch off again.
|
41085 |
11-Nov-1998 |
rnordier |
Revise error messages.
|
41013 |
08-Nov-1998 |
rnordier |
Prevent boot.config being parsed more than once.
|
41010 |
08-Nov-1998 |
rnordier |
Drop the familiar 'text=xxxx data=xxxx bss=xxxx ...' display while loading. This eliminates noise when loading boot/loader; and when loading a kernel, they generally flash by too fast to be intelligible anyway.
|
41008 |
08-Nov-1998 |
rnordier |
boot1: Eliminate EDD detection and optional use of disk packet interface. Do some general consistency fixes and space optimizations. Use of some freed-up space to defend against possible BIOS misfeatures.
boot2: Revise disk read interface to provide for boot1 changes. Free up space for this.
|
40940 |
05-Nov-1998 |
rnordier |
Make use of BIOS int 0x13 extensions configurable, and disabled by default.
|
40884 |
04-Nov-1998 |
msmith |
Turn off -g accidentally left in from testing.
|
40879 |
04-Nov-1998 |
jkh |
Respect ${.OBJDIR} properly when looking for libficl.a
|
40877 |
04-Nov-1998 |
msmith |
Add required parts for BootForth building (currently disabled and untested). Only suitable for i386 at the moment, as we are missing setjmp/longjmp on the Alpha.
|
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.
|
40833 |
02-Nov-1998 |
rnordier |
Revise a few comments.
|
40807 |
01-Nov-1998 |
rnordier |
Ignore, rather than emulate, an i386 'hlt' instruction (though for most practical purposes, this should be indistinguishable from a more strictly correct approach).
Feedback and testing: msmith
|
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.
|
40745 |
30-Oct-1998 |
msmith |
Make the BTX loader much more quiet about what it's doing. This removes most of the "what the (*^&%(*^ was that?" stuff that normally flies by.
|
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
|
40675 |
27-Oct-1998 |
rnordier |
Avoid interruptions while talking to keyboard controller.
|
40674 |
27-Oct-1998 |
rnordier |
biosboot compatibility fix: change behavior of backspace in getstr(). Noticed by: abial
Optimize away a few bytes to make space for the above.
|
40620 |
23-Oct-1998 |
msmith |
Clean the ${BASE}.sym file as well.
|
40619 |
23-Oct-1998 |
msmith |
Remove a debugging copy of offsetof() that snuck in.
|
40618 |
23-Oct-1998 |
msmith |
Enable the PCI BIOS PnP enumerator.
|
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.
|
40600 |
22-Oct-1998 |
msmith |
Add a dependancy on the BTX crt0 object Add the biospnp handler to the pnp handler array Drop some old debugging code
|
40599 |
22-Oct-1998 |
msmith |
Add biospnp.c
|
40598 |
22-Oct-1998 |
msmith |
Pop the return address off the stack before making a V86_CALLF call; this allows us to implement what look like C function calls from user space "directly" to v86 mode code. (Used for calling the PnP BIOS)
|
40556 |
21-Oct-1998 |
msmith |
Bye-bye setdefs.
|
40555 |
21-Oct-1998 |
msmith |
- Enable PnP and ISA PnP code. - Use the ISA PnP enumerator. - Use the new linker set code, throw out the gensetdefs stuff. - Produce an intermediate loader image that has symbols stripped, to aid - in debugging. - Supply ISA port access functions required for ISA PnP
|
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.
|
40541 |
20-Oct-1998 |
rnordier |
Make serial port, data format, and bps configurable.
|
40524 |
19-Oct-1998 |
rnordier |
Make configurable (a) whether to use int 0x13 extensions; (b) timeout value. Ignore failure to update mbr sector. Disable interrupts while using extended registers. Default to F1 not F2.
|
40493 |
17-Oct-1998 |
rnordier |
Set BINMODE to 444.
|
40477 |
17-Oct-1998 |
rnordier |
Fix some glitches in the input routine: Don't display a \b if not acting on it. Don't process binary zero chars (which result from pressing function keys, etc. on the PC).
|
40476 |
17-Oct-1998 |
rnordier |
Having probed the keyboard, turn off the -P flag.
|
40474 |
17-Oct-1998 |
rnordier |
Treat all options as toggles (ie. -c -c is the same no -c). Since the boot.config settings are persistent, this seems to provide a useful override capability, and should break only on broken boot.config's.
Output a cosmetic newline if booting with no input.
|
40472 |
17-Oct-1998 |
rnordier |
biosboot compatibility fix: If we have a boot.config command, display it.
|
40471 |
17-Oct-1998 |
rnordier |
biosboot compatibility fix: Read boot.help before parsing boot.config. We were parsing boot.config first, which could result in boot.help being read from a different location (or not found), which would probably just cause surprise, without being useful.
|
40416 |
15-Oct-1998 |
rnordier |
Fix path to sio.s
|
40404 |
15-Oct-1998 |
rnordier |
Add serial, dual, and probe-keyboard support.
|
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.
|
40358 |
14-Oct-1998 |
rnordier |
Activate boot2.
|
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).
|
40330 |
14-Oct-1998 |
rnordier |
Fix btx include path.
|
40326 |
14-Oct-1998 |
rnordier |
Include <bsd.prog.mk>. Add install target (to /boot for now).
|
40325 |
13-Oct-1998 |
rnordier |
Fix flow of control after directory listing; enable EDD support; cosmetics.
|
40323 |
13-Oct-1998 |
rnordier |
Make v86.ctl default more explicit; simplify read error-handling; twiddle.
|
40320 |
13-Oct-1998 |
rnordier |
Adjust NDEV value. Optimize reading of system time.
|
40314 |
13-Oct-1998 |
rnordier |
Change to a 15-sector boot2. Refine slice-handling.
|
40308 |
13-Oct-1998 |
rnordier |
Don't use an absolute path to objcopy. Noticed by: Scott Mace <smace@intt.org>
|
40307 |
13-Oct-1998 |
rnordier |
Improve drive recognition and handling.
|
40270 |
12-Oct-1998 |
rnordier |
This commit was generated by cvs2svn to compensate for changes in r40269, which included commits to RCS files with non-trunk default branches.
|
40269 |
12-Oct-1998 |
rnordier |
New boot blocks: support for /boot/loader; a.out & ELF; cyl > 1023; multiple 0xa5 slices; etc.
|
40245 |
12-Oct-1998 |
rnordier |
Drop .MAKEFLAGS: hack.
|
40244 |
12-Oct-1998 |
rnordier |
Do without head and tail: they're pretty unnecessary here anyway.
|
40243 |
12-Oct-1998 |
rnordier |
Use rather than for linking. This allows the new rather than stale version of libstand.a to be found.
After this change, the new boot code is apparently building correctly in a make world.
|
40218 |
11-Oct-1998 |
rnordier |
Override for ELF.
|
40217 |
11-Oct-1998 |
rnordier |
Override for ELF. Override .s.o suffix rule.
|
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
|
40182 |
10-Oct-1998 |
rnordier |
Fix a typo. Output another newline before invoking bootstrap.
|
40149 |
09-Oct-1998 |
rnordier |
Turn off the new /sys/boot stuff (except boot0) unless OBJFORMAT is elf. (The BTX client must be ELF, though it is packaged as a.out for compatibility.)
|
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.
|
40124 |
09-Oct-1998 |
rnordier |
Get this building as a.out or ELF.
With thanks to: jdp
|
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
|
40017 |
07-Oct-1998 |
msmith |
Enable the DOS filesystem. NOTE: you will have to rebuild libstand in order to be able to build again.
|
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.
|
39988 |
06-Oct-1998 |
rnordier |
Fix for "get base memory" bug found and mostly fixed by Mike.
|
39987 |
06-Oct-1998 |
msmith |
The BIOS memory size is only a word. Some BIOSsen have garbage in the other 16 bits we were reading here, causing loss of arguments.
|
39986 |
06-Oct-1998 |
msmith |
Build boot0 as well.
|
39980 |
05-Oct-1998 |
rnordier |
Install in /boot.
|
39974 |
05-Oct-1998 |
rnordier |
This commit was generated by cvs2svn to compensate for changes in r39973, which included commits to RCS files with non-trunk default branches.
|
39962 |
04-Oct-1998 |
rnordier |
Adjust setting of argument pointer for BTX 0.87.
|
39961 |
04-Oct-1998 |
rnordier |
Allocate space for storing of arguments at the end of conventional memory.
|
39960 |
04-Oct-1998 |
msmith |
Don't include ELF symbol information yet - it causes the ELF DDB to explode.
|
39944 |
04-Oct-1998 |
msmith |
Improve the handling of the initial bootdev value from the previous loader. Remove some unused code.
|
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.
|
39931 |
03-Oct-1998 |
rnordier |
Missing newline in heap command display. Noticed by: jkh
|
39930 |
03-Oct-1998 |
rnordier |
For system calls, reboot without prompting; for exceptions, display message and await reset.
|
39921 |
03-Oct-1998 |
rnordier |
Map all BTX system pages readable at ring 3. This resolves the firmware problem first raised in connection with PR 8105, although unrelated.
|
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.
|
39901 |
02-Oct-1998 |
msmith |
Fix an egregious precedence bug.
|
39897 |
02-Oct-1998 |
msmith |
Set $currdev according to our best guess at the BIOS device that the previous bootstrap loaded us from.
|
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.
|
39895 |
02-Oct-1998 |
msmith |
Mark exit() as __attribute__((__noreturn__))
|
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.
|
39857 |
01-Oct-1998 |
jkh |
Override STRIP so installation doesn't try to strip the loader.
|
39851 |
30-Sep-1998 |
peter |
Make 'make install' do something that might be useful.
|
39850 |
30-Sep-1998 |
peter |
Stop libi386.a from being installed..
|
39834 |
30-Sep-1998 |
peter |
Turn on i386-elf
|
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)
|
39725 |
28-Sep-1998 |
peter |
The comconsole mode is accessed as 'comconsole' not 'com'.
|
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).
|
39664 |
26-Sep-1998 |
msmith |
Recover the arguments passed in from the previous load stage, use them to set the default console. Print malloc stats from the new libstand allocator.
|
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.
|
39646 |
25-Sep-1998 |
peter |
Make these compile when there is an obj dir.
|
39474 |
19-Sep-1998 |
msmith |
Make libstand movable.
This completes the basic work required to make the loader work with BTX. We now have a third-stage bootstrap shared by the i386 and Alpha.
|
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.
|
39450 |
18-Sep-1998 |
msmith |
Enable the biosdisk driver, duplicate -lstand as it both calls and is called by the i386 platform library.
|
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.
|
39274 |
15-Sep-1998 |
rnordier |
Add exec syscall.
|
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.
|
39165 |
14-Sep-1998 |
rnordier |
Add BTX startup/interface code.
|
39125 |
13-Sep-1998 |
rnordier |
Enable client entry point support.
|
39091 |
12-Sep-1998 |
rnordier |
Add btxldr, a BTX loader for ELF clients.
|
39089 |
12-Sep-1998 |
rnordier |
This commit was generated by cvs2svn to compensate for changes in r39088, which included commits to RCS files with non-trunk default branches.
|
39088 |
12-Sep-1998 |
rnordier |
BTX (aka the boot extender) is an i386 kernel that hosts 32-bit bootstrap programs, and provides page-level protection, hardware interrupt reflection, a virtual-8086 mode interface to BIOS, etc.
|
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.
|