summaryrefslogtreecommitdiffstats
path: root/sys/boot
Commit message (Collapse)AuthorAgeFilesLines
* GPT style partitioning for loader(8) with U-Boot support library (tested onraj2009-05-053-27/+243
| | | | | | ARM). Submitted by: Piotr Ziecik kosmo ! semihalf dot com
* A simple rewrite of biossmap.c:jkim2009-04-151-44/+87
| | | | | | | | | | | | | - 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
* Fix masking of TTE bits; the TD_*_MASK macros need shifting via themarius2009-04-141-5/+7
| | | | | | corresponding TD_*_SHIFT. MFC after: 3 days
* Use a disk address instead of an int to hold the starting offset of anjhb2009-04-141-1/+1
| | | | | | | | 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
* Fix whitespace.marius2009-04-131-3/+3
|
* Rewrite SMBIOS for loader:jkim2009-04-072-152/+206
| | | | | | | | | | | - 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.
* Increase sprintf(3) buffer size, which I forgot from the previous commit.jkim2009-04-071-1/+1
|
* Add an entry for the uath(4) module.weongyo2009-04-071-0/+1
|
* Probe size of installed memory modules from loader and display itjkim2009-03-311-6/+52
| | | | | | | | | 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
* Oops, fix the previous change.nyan2009-03-201-3/+3
|
* MFi386: r189749nyan2009-03-201-33/+69
| | | | | Teach the BIOS CD driver to use bounce buffers when the destination address is > 1 MB.
* Merge the missing changes from i386.nyan2009-03-201-12/+49
| | | | Teach the loader about the FAT partitions.
* MFi386: the part of r179825 to reduce diffs against i386.nyan2009-03-201-10/+21
|
* Remove the uscanner(4) driver, this follows the removal of the kernel scannerthompsa2009-03-191-1/+0
| | | | | | | driver in Linux 2.6. uscanner was just a simple wrapper around a fifo and contained no logic, the default interface is now libusb (supported by sane). Reviewed by: HPS
* Reduce diffs against i386.nyan2009-03-193-11/+14
|
* Use the common PC98_MID_* defines instead of a magic number.nyan2009-03-191-4/+4
|
* Chase the k8temp->amdtemp rename in NOTES and loader.conf.dchagin2009-03-161-1/+1
| | | | Approved by: kib (mentor)
* The recent change to use memory > 1MB for the heap by default broke CDjhb2009-03-123-47/+81
| | | | | | | | | 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
* - Make it possible to disable GPT support by setting LOADER_NO_GPT_SUPPORTjhb2009-03-095-3/+40
| | | | | | | | | | | | 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
* Revert the part of change 107879 that employs the unused bytes aftermarcel2009-03-072-5/+5
| | | | | | | | | | | | | | 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
* Fix some more issues with the real mode BTX.jhb2009-02-241-35/+60
| | | | | | | | | | | | | | | | | | | | | | | | | 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
* Fix build when WITH_SSP is set explicitly.ru2009-02-218-13/+8
| | | | Submitted by: Jeremie Le Hen
* Enable building of ficl on MIPS. It compiles, but needs more testing.imp2009-02-191-4/+0
|
* Add basic mips support. This has been compile tested only.imp2009-02-192-0/+533
|
* Add a helper function for loading geli keys from the loader.thompsa2009-02-162-1/+50
|
* - Use the generally more appropriate PROM base rather than themarius2009-02-101-4/+4
| | | | | | | | | kernel one as the non-faulting flush address in the loader so we can can change KERNBASE and VM_MIN_KERNEL_ADDRESS if we ever want to without needing to worry about using a compatible loader. - Correctly check for LOADER_DEBUG. - Add a missing const for page_sizes[].
* - Remove superfluous commentgabor2009-01-301-2/+0
| | | | | PR: docs/129400 Submitted by: Gavin Atkinson <gavin@freebsd.org>
* Add an entry for the urtw(4) module.weongyo2009-01-231-0/+1
|
* remove a file which is, as far as I can tell, totally unused.luigi2009-01-131-101/+0
|
* comment out some debugging messages that slipped in by mistake.luigi2009-01-131-4/+3
| | | | MFC after: 3 days
* Allow VIA Nano processors to boot FreeBSD/amd64.jkim2009-01-121-2/+3
| | | | | PR: amd64/130303 MFC after: 1 week
* This patch introduces a number of simplifications to the Forthluigi2009-01-053-511/+315
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | functions used in the bootloader. The goal is to make the code more readable and smaller (especially because we have size issues in the loader's environment). High level description of the changes: + define some string manipulation functions to improve readability; + create functions to manipulate module descriptors, removing some duplicated code; + rename the error codes to ESOMETHING; + consistently use set_environment_variable (which evaluates $variables) when interpreting variable=value assignments; I have tested the code, but there might be code paths that I have not traversed so please let me know of any issues. Details of this change: --- loader.4th --- + add some module operators, to remove duplicated code while parsing module-related commands: set-module-flag enable-module disable-module toggle-module show-module --- pnp.4th --- + move here the definition related to the pnp devices list, e.g. STAILQ_* , pnpident, pnpinfo --- support.4th --- + rename error codes to capital e.g. ENOMEM EFREE ... and do obvious changes related to the renaming; + remove unused structures (those relevant to pnp are moved to pnp.4th) + various string functions - strlen removed (it is an internal function) - strchr, defined as the C function - strtype -- type a string to output - strref -- assign a reference to the string on the stack - unquote -- remove quotes from a string + remove reset_line_buffer + move up the 'set_environment_variable' function (which now uses the interpreter, so $variables are evaluated). Use the function in various places + add a 'test_file function' for debugging purposes MFC after: 4 weeks
* A number of small changes to make the 'save choice to disk' safer,luigi2008-12-302-28/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* MFH @ 186335sam2008-12-207-24/+21
|\
| * Use full 64bit arithmetic when converting file offsets to block numbers - fixesdfr2008-12-173-11/+6
| | | | | | | | | | | | booting on filesystems with inode numbers with values above 4194304. Submitted by: ps
| * Improve style(9) in PowerPC U-Boot support lib.raj2008-12-173-12/+14
| |
| * Disconnect the efi from pc98. It's not needed.nyan2008-12-141-1/+1
| |
* | add delays around 16-bit enable/disable a la the driver; w/o thissam2008-12-191-0/+2
| | | | | | | | operation on my ixp435 Cambria board is unreliable
* | merge WIP multi-board support; tested on Avila and Cambria, stillsam2008-12-134-75/+154
|/ | | | needs Proghorn testing
* Fix a leak introduced in r185902. We should free the devspec ifps2008-12-111-0/+1
| | | | we've successfully found a zfs pool.
* Avoid a double free in devopen by not freeing the device structureps2008-12-111-1/+0
| | | | | in zfs_dev_open. This stops a panic in the loader when trying to read from a zfs device and no zfs devices exist.
* Don't get confused if we encounter a device which is part of a raidz or raidz2dfr2008-12-101-2/+4
| | | | | | | pool while probing for vdevs. PR: 129539 Submitted by: Paul Wootton (paul at fletchermoorland dot co dot uk)
* Remove now unused label.sobomax2008-12-091-1/+1
| | | | | | Submitted by: Christoph Mallon MFC after: 4 weeks (along with r185779 and r185780)
* Optimiza assembly in the previous r185779, to save whooping 16 bytes.sobomax2008-12-081-9/+5
| | | | | | Submitted by: Christoph Mallon MFC after: 4 weeks (including r185779)
* Respect RBX_MUTE flag from boot[012].sobomax2008-12-081-1/+18
| | | | MFC after: 4 weeks
* Fix typo in the comment %is -> %si.sobomax2008-12-081-1/+1
|
* PROBLEM: putting in a loader config file a line of the formluigi2008-12-071-26/+19
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | loader_conf_files="foo bar baz" should cause loading the files listed, and then resume with the remaining config files (from previous values of the variable). Unfortunately, sometimes the line was ignored -- actually even modifying the line in /boot/default/loader.conf sometimes doesn't work. ANALYSIS: After much investigation, turned out to be a bug in the logic. The existing code detected a new assignment by looking at the address of the the variable containing the string. This only worked by pure chance, i.e. if the new string is longer than the previous value then the memory allocator may return a different address to store the string hence triggering the detection. SOLUTION: This commit contains a minimal change to fix the problem, without altering too much the existing structure of the code. However, as a step towards improving the quality and reliability of this code, I have introduced a handful of one-line functions (strget, strset, strfree, string= ) that could be used in dozens of places in the existing code. HOWEVER: There is a much bigger problem here. Even though I am no Forth expert (as most fellow src committers) I can tell that much of the forth code (in support.4th at least) is in severe need of a review/refactoring: + pieces of code are replicated multiple times instead of writing functions (see e.g. set_module_*); + a lot of stale code (e.g. "structure" definitions for preloaded_files, kernel_module, pnp stuff) which is not used or at least belongs elsewhere. The code bload is extremely bad as the loader runs with very small memory constraints, and we already hit the limit once (see http://svn.freebsd.org/viewvc/base?view=revision&revision=185132 Reducing the footprint of the forth files is critical. + two different styles of coding, one using pure stack functions (maybe beautiful but surely highly unreadable), one using high level mechanisms to give names to arguments and local variables (which leads to readable code). Note that this code is used by default by all FreeBSD installations, so the fragility and the code bloat are extremely damaging. I will try to work fixing the three items above, but if others have time, please have a look at these issues. MFC after: 4 weeks
* Correct include path for i386 specific includes. This allows zfsps2008-12-061-1/+1
| | | | to boot on systems where the loader is built on amd64 systems.
* - correct variable namedanger2008-12-061-1/+1
| | | | | | PR: docs/129448 Submitted by: Kenyon Ralph <kralph@gmail.com> MFC after: Revision 1.91 is merged
* Another, hopefully final set of changes to boot0 and boot0cfg.luigi2008-12-032-61/+71
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
OpenPOWER on IntegriCloud