summaryrefslogtreecommitdiffstats
path: root/sys/boot
Commit message (Collapse)AuthorAgeFilesLines
* Add support for memory disk (md). The size of the memory diskmarcel2009-12-132-0/+156
| | | | | | is determined by MD_IMAGE_SIZE. A file system can be embedded into the loader with /sys/tools/embed_mfs.sh. Note that md.c is not included when MD_IMAGE_SIZE is not set.
* Cleanups the boot2 for pc98. There is no functional change.nyan2009-12-118-164/+18
| | | | | | | | | - Make setting machine type and getting geom conditional for future. - Remove unused RAWBOOT and CDBOOT supports. - Remove unneeded include. - Fix warnings. MFC after: 1 week
* Don't warn about an RSDP with a corrupt checksum. The kernel does a betterjhb2009-12-101-3/+1
| | | | | | | | job about warning about these things later and this message can be confusing. Submitted by: infofarmer MFC after: 1 week
* Fix a confusing typo in the EDD packet structure used in gptboot andjhb2009-12-092-6/+6
| | | | | | | | 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
* - Port bios_getmem() from libi386 to {gpt,}zfsboot() and use it tojhb2009-12-092-21/+112
| | | | | | | | | | 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
* MFi386: revision 200219nyan2009-12-082-8/+25
| | | | | | | Improve the algorithm the loader uses to choose a memory range for its heap when using a range above 1MB. MFC after: 1 week
* MFi386: Use real mode instead of v86 mode.nyan2009-12-081-410/+361
| | | | MFC after: 1 week
* MFi386: revision 200216nyan2009-12-082-3/+2
| | | | Various small whitespace and style fixes.
* Improve the algorithm the loader uses to choose a memory range for itsjhb2009-12-073-8/+49
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* Various small whitespace and style fixes.jhb2009-12-073-10/+11
|
* Remove spinconsole from pc98, some parts seem to be missed and it'ssobomax2009-11-271-2/+0
| | | | | | too late (early?) to figure out what exactly. Reported by: TAKAHASHI Yoshihiro
* Whitespace-only: another instance of identation with spaces.sobomax2009-11-271-1/+1
|
* Whitespace on: use tabs for identation consistently.sobomax2009-11-271-4/+4
|
* Add new loader console type: "spinconsole". This console selects thesobomax2009-11-276-20/+135
| | | | | | | | 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.
* Be nice, don't use the f-word.trasz2009-11-252-2/+2
|
* Create a seperate ZFS enabled loader.rnoland2009-11-235-15/+33
| | | | | | | | | | | | | | | | | | | 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
* Always use 64-bit LBAs for disk addresses in zfsboot and gptzfsboot tojhb2009-11-202-14/+14
| | | | | | | | 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
* Provide an effective (relocated) address when building modules metadata.raj2009-11-191-1/+3
| | | | | | | This lets modules loaded dynamically in loader(8) work for U-Boot-based platforms. MFC after: 1 week
* Introduce a new option (BOOT_PROMPT_123) that lets enter the boot promptattilio2009-11-122-0/+22
| | | | | | | | | | | | only when typing the sequence "123" (opposite to the standard 'push any button' approach). That results useful when using serial lines sending garbage and leading to unwilling boot prompt appearence. Obtained from: Sandvine Incorporated Reviewed by: emaste, jhb Sponsored by: Sandvine Incorporated MFC: 1 week
* - Remove trailing ";" after if statementantoine2009-11-111-6/+1
| | | | | | | - Remove #if 0 section that was never needed/used Reviewed by: raj@ MFC after: 1 month
* Close a file descriptor leak in an error case.brueffer2009-10-281-0/+1
| | | | | | PR: 138374 Submitted by: Patroklos Argyroudis <argp@census-labs.com> MFC after: 1 week
* Correct some issues with zfs boot.rnoland2009-10-233-23/+75
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* Use zfs_read() instead of xfsread() to read /boot.config. xfsread() failsjhb2009-10-141-1/+1
| | | | | | | | | | 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
* lindev(4) [1] is supposed to be a collection of linux-specific pseudobz2009-09-261-0/+1
| | | | | | | | | | | | | | | | | | | devices that we also support, just not by default (thus only LINT or module builds by default). While currently there is only "/dev/full" [2], we are planning to see more in the future. We may decide to change the module/dependency logic in the future should the list grow too long. This is not part of linux.ko as also non-linux binaries like kFreeBSD userland or ports can make use of this as well. Suggested by: rwatson [1] (name) Submitted by: ed [2] Discussed with: markm, ed, rwatson, kib (weeks ago) Reviewed by: rwatson, brueffer (prev. version) PR: kern/68961 MFC after: 6 weeks
* MFi386:nyan2009-09-131-1/+1
| | | | | | | Move the loader's entry point to 0x200000. This change is also needed for pc98. MFC after: 3 days
* If the pxe client is told to use / as the root path, honour that ratheremaste2009-09-101-1/+1
| | | | | | | | of trying to mount /pxeroot instead. PR: i386/106493 Submitted by: Andrey Russev MFC after: 1 month
* Fix parse() so that the partition to boot (load /boot/loader) from canjhay2009-08-171-8/+5
| | | | | | | be set. The syntax as printed in main() is used: 0:ad(0p3)/boot/loader Reviewed by: jhb Approved by: re (kib)
* Update epair(4) to the new netisr implementation and polishbz2009-07-261-0/+1
| | | | | | | | | | | | | | | | things a bit: - use dpcpu data to track the ifps with packets queued up, - per-cpu locking and driver flags - along with .nh_drainedcpu and NETISR_POLICY_CPU. - Put the mbufs in flight reference count, preventing interfaces from going away, under INVARIANTS as this is a general problem of the stack and should be solved in if.c/netisr but still good to verify the internal queuing logic. - Permit changing the MTU to virtually everythinkg like we do for loopback. Hook epair(4) up to the build. Approved by: re (kib)
* On special systems where the MBR and the GPT are in sync (up to the 4thrpaulo2009-06-261-1/+1
| | | | | | | | | | | | | 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)
* Bump PowerPC loader(8) version to reflect extensions it has recently grown.raj2009-06-221-0/+1
|
* Add cas(4), a driver for Sun Cassini/Cassini+ and National Semiconductormarius2009-06-151-0/+1
| | | | | | | | | | | | DP83065 Saturn Gigabit Ethernet controllers. These are the successors of the Sun GEM controllers and still have a similar but extended transmit logic. As such this driver is based on gem(4). Thanks to marcel@ for providing a Sun Quad GigaSwift Ethernet UTP (QGE) card which was vital for getting this driver to work on architectures not using Open Firmware. Approved by: re (kib) MFC after: 2 weeks
* Add alc(4), a driver for Atheros AR8131/AR8132 PCIe ethernetyongari2009-06-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | controller. These controllers are also known as L1C(AR8131) and L2C(AR8132) respectively. These controllers resembles the first generation controller L1 but usage of different descriptor format and new register mappings over L1 register space requires a new driver. There are a couple of registers I still don't understand but the driver seems to have no critical issues for performance and stability. Currently alc(4) supports the following hardware features. o MSI o TCP Segmentation offload o Hardware VLAN tag insertion/stripping o Tx/Rx interrupt moderation o Hardware statistics counters(dev.alc.%d.stats) o Jumbo frame o WOL AR8131/AR8132 also supports Tx checksum offloading but I disabled it due to stability issues. I'm not sure this comes from broken sample boards or hardware bugs. If you know your controller works without problems you can still enable it. The controller has a silicon bug for Rx checksum offloading, so the feature was not implemented. I'd like to say big thanks to Atheros. Atheros kindly sent sample boards to me and answered several questions I had. HW donated by: Atheros Communications, Inc.
* Instead of packing the individual fields in the PnP structures, pack thejhb2009-06-081-26/+26
| | | | | | | entire structures. This trims some warnings. Verified by: md5(1) MFC after: 1 week
* Don't attempt to free the GPT partition list for a disk with an empty GPT.jhb2009-06-081-2/+3
| | | | | Submitted by: Yuri Pankov yuri.pankov of gmail MFC after: 3 days
* Import ACPICA 20090521.jkim2009-06-053-3/+3
|
* Make GPT style partitiong endian-safe in U-Boot support library.raj2009-06-031-13/+28
| | | | | Submitted by: Piotr Ziecik Obtained from: Semihalf
* Add a missing parameter when displaying GPT partitions with an unknownjhb2009-06-011-0/+1
| | | | | | | UUID. Submitted by: Pawel Worach pawel.worach | gmail MFC after: 1 week
* sys/boot/common.crodrigc2009-06-011-2/+21
| | | | | | | | | | | | | | | | | | | | | ================= Extend the loader to parse the root file system mount options in /etc/fstab, and set a new loader variable vfs.root.mountfrom.options with these options. The root mount options must be a comma-delimited string, as specified in /etc/fstab. Only set the vfs.root.mountfrom.options variable if it has not been set in the environment. sys/kern/vfs_mount.c ==================== When mounting the root file system, pass the mount options specified in vfs.root.mountfrom.options, but filter out "rw" and "noro", since the initial mount of the root file system must be done as "ro". While we are here, try to add a few hints to the mountroot prompt to give users and idea what might of gone wrong during mounting of the root file system. Reviewed by: jhb (an earlier patch)
* Fix NETIF_DEBUG compilation.marcel2009-05-301-8/+2
|
* Some of the boot loader code only works on a ufs file system, but itdfr2009-05-282-8/+9
| | | | | | | uses the generic struct dirent, which happens to look identical to UFS's struct direct. If BSD ever changes dirent then this will be a problem. Submitted by: matthew dot fleming at isilon dot com
* Improve the accf_dns_load description.brueffer2009-05-171-1/+1
|
* Add support for booting from raidz1 and raidz2 pools.dfr2009-05-162-79/+166
|
* 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
|
OpenPOWER on IntegriCloud