summaryrefslogtreecommitdiffstats
path: root/sys/boot
Commit message (Collapse)AuthorAgeFilesLines
* zfsboot: print boot.config contents before parsing itavg2011-12-041-2/+2
| | | | | | as parsing can be a destructive operation MFC after: 2 weeks
* zfs boot: allow file vdevs to be used in testing (e.g. with zfsboottest)avg2011-12-041-0/+3
| | | | MFC after: 1 week
* Rename the linker emulation name for powerpc and powerc64. This is needed thatandreast2011-11-193-3/+3
| | | | | we can also use the upstream binutils linker where we have to have a unique name for the FreeBSD emulation.
* Initial version of cesa(4) driver for Marvell crypto engine and securityraj2011-11-192-0/+4
| | | | | | | | | | | accelerator. The following algorithms and schemes are supported: - 3DES, AES, DES - MD5, SHA1 Obtained from: Semihalf Written by: Piotr Ziecik
* - Add new loader_logo orbbw to default.confmiwi2011-11-191-1/+1
| | | | | | | PR: 162608 Submitted by: manolis Approved by: rwatson (mentor) MFC after: 3 Days
* - Whitespaces fixed onlymiwi2011-11-191-3/+3
| | | | Approved by: rwatson (mentor)
* Wire the kernel text RWX, rather than RX. We're not quite readymarcel2011-11-171-1/+1
| | | | | | for having kernel text non-writable, because we still need to apply relocations. On top of that, the PBVM page table has all pages marked as RWX, so it's an inconsistency to begin with.
* Add DTS for the Freescale P2020DS.raj2011-11-171-0/+754
| | | | Obtained from: Freescale
* Add DTS for the Freescale P1020RDB.marcel2011-11-141-0/+627
|
* Add DTS for the Freescale P3041DS.marcel2011-11-141-0/+753
|
* Revert some debugging printfs that crept into 223695.jhb2011-11-091-5/+1
|
* Remove the remnants of /stand/sysinstall.pluknet2011-11-031-1/+1
| | | | | | loader.8: Sync the default init_path list with kern/init_main.c. NOTES: Replace with /rescue/init in the INIT_PATH kernel option.
* Remove the long reprecated ``/stand/sysinstall'' from the init_path.pluknet2011-10-271-1/+1
| | | | | | | It can be put back using the INIT_PATH config option or init_path loader variable, if still needed (which I doubt). MFC after: 1 week
* - Add a new header for the x86 boot code that defines various structuresjhb2011-10-256-31/+128
| | | | | | | | | | | | | | | | | | | 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
* Consolidate duplicate definitions of V86_CY() and V86_ZR() which check forjhb2011-10-2515-37/+27
| | | | | the carry and zero flags being set, respectively, in <btxv86.h> and use them throughout the x86 boot code.
* With LOADER_MBR_SUPPORT defined and LOADER_GPT_SUPPORT undefined we wouldpjd2011-10-201-2/+3
| | | | | | | never call disk_openmbr(). Submitted by: avg MFC after: 3 days
* - Correctly read gang header from raidz.pjd2011-10-201-51/+51
| | | | | | | | | | - Decompress assembled gang block data if compressed. - Verify checksum of a gang header. - Verify checksum of assembled gang block data. - Verify checksum of uber block. Submitted by: avg MFC after: 3 days
* Fix missing return when LOADER_GPT_SUPPORT is defined, but LOADER_MBR_SUPPORTpjd2011-10-191-1/+1
| | | | | | is not. MFC after: 3 days
* Always pass data size for checksum verification function, as usingpjd2011-10-191-1/+1
| | | | | | | | | | physical block size declared in bp may not always be what we want. For example in case of gang block header physical block size declared in bp is much larger than SPA_GANGBLOCKSIZE (512 bytes) and checksum calculation failed. This bug could lead to accessing unallocated memory and resets/failures during boot. MFC after: 3 days
* Never pass NULL block pointer when reading. This is neither expected norpjd2011-10-191-1/+2
| | | | | | | | handled by lower layers like vdev_raidz, which uses bp for checksum verification. This bug could lead to NULL pointer reference and resets during boot. MFC after: 3 days
* Don't mark vdev as healthy too soon, so we won't try to use invalid vdevs.pjd2011-10-191-2/+1
| | | | MFC after: 3 days
* Look for /boot/config in addition to /boot.config, with the former takingdes2011-10-186-13/+24
| | | | | | precedence over the latter if it exists. MFC after: 3 weeks
* Support for booting XLP using FDT.jchandra2011-10-181-0/+67
| | | | | | | | - update xlp_machdep.c to read arguments from FDT if FDT support is compiled in. - define rmi_uart_bus_space, and use it as fdtbus_bs_tag - update conf files for FDT support - add default dts file xlp-basic.dts
* - change "is is" to "is" or "it is"eadler2011-10-161-1/+1
| | | | | | | | - change "the the" to "the" Approved by: lstewart Approved by: sahil (mentor) MFC after: 3 days
* Allow ixp425 boot2 to compile after r219452thompsa2011-10-041-1/+1
|
* zfstest: rename to zfsboottest and move to toolsavg2011-09-161-144/+0
| | | | | Approved by: re (kib) MFC after: 1 week
* gpt/zfs boot blocks: reduce optimizing CFLAGS to -O1avg2011-09-133-29/+4
| | | | | | | | | | | | | | | | | | | | | | 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
* zfstest: cleanup the code, improve functionality and diagnosticsavg2011-09-131-16/+40
| | | | | | | | | | | | The utility is not connected to the build, so it should be safe to update it. To do: move the utility to tools/. Some code is provided by Peter Jeremy <peterjeremy@acm.org> Tested by: Sebastian Chmielewski <chmielsster@gmail.com>, Peter Jeremy <peterjeremy@acm.org> (earlier versions) Approved by: re (kib) MFC after: 4 days
* Restore behavior of the autoboot_delay="-1" boot menu setting to thejh2011-09-022-6/+11
| | | | | | | | | pre-r222417 state. The behavior was essentially reversed in r222417 which can cause confusion. PR: 159775 Submitted by: Devin Teske Approved by: re (kib)
* Add kern.cam.boot_delay description (with reasonable default) tomarck2011-08-231-0/+2
| | | | | | | | | | | | default/loader.conf This should help people installing ${OS} to USB devices, where there are frequently cases where kernel tries to mount root before actual umass sensing is finished. Reviewed by: mav Approved by: re (kib) MFC after: 1 week
* Add support for the Blu-Ray drive found in the Sony Playstation 3 and fixnwhitehorn2011-08-148-35/+209
| | | | | | | some realted minor bugs in PS3 internal storage support. Submitted by: glevand <geoffrey.levand@mail.ru> Approved by: re (bz)
* Fix buffer overflow in sys/boot/common/util.c's printf(), when printingdim2011-08-081-1/+1
| | | | | | | | | large (>= 10^10) numbers. In theory, 20 characaters should be enough, but bump the buffer to 32 characters, so we have some room for the future. Reviewed by: pjd Approved by: re (kib)
* Document the tftp.blksize variable added in src/lib/libstand/tftp.c.rodrigc2011-07-251-0/+5
| | | | | Approved by: re (kib) Requested by: maxim
* Note that the "kernel" variable in loader.conf is the name of a directoryjhb2011-07-201-2/+5
| | | | | | | | | | containing a kernel under /boot and that it's default value is "kernel" not "/boot/kernel/kernel". PR: docs/158992 Reported by: Wayne Mitchell wayne.mitchell.iz at gmail Approved by: re (kib) MFC after: 1 week
* When building some of the boot loaders with clang, and DEBUG_FLAGS ordim2011-07-173-0/+7
| | | | | | | | | | | 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
* Add support for booting PS3s from disk. This is still a little hackish untilnwhitehorn2011-07-1614-23/+1092
| | | | | | | | | | | we can find a way to get the information from petitboot or to guess it, so the current algorithm is: 1. See if ps3disk3p1 (first GPT slice on OtherOS partition) exists, and if so try to boot it. 2. Otherwise, netboot. Submitted by: glevand <geoffrey.levand at mail dot ru >
* Since r219452 the alignment of __dmadat has changed, revealing that fsread()marius2011-07-111-31/+35
| | | | | | | | | | bogusly casts its contents around causing alignment faults on sparc64 and most likely also on at least powerpc. Fix this by copying the contents bytewise instead as partly already done here. Solving this the right way costs some space, i.e. 148 bytes with GCC and 16 bytes with clang on x86 there are still some bytes left there though, and an acceptable hack which tricks the compiler into only using a 2-byte alignment instead of the native one when accessing the contents turned out to even take up more space that.
* - For Cheetah- and Zeus-class CPUs don't flush all unlocked entries frommarius2011-07-021-25/+63
| | | | | | | | | | | | | | | | | | | the TLBs in order to get rid of the user mappings but instead traverse them an flush only the latter like we also do for the Spitfire-class. Also flushing the unlocked kernel entries can cause instant faults which when called from within cpu_switch() are handled with the scheduler lock held which in turn can cause timeouts on the acquisition of the lock by other CPUs. This was easily seen with a 16-core V890 but occasionally also happened with 2-way machines. While at it, move the SPARC64-V support code entirely to zeus.c. This causes a little bit of duplication but is less confusing than partially using Cheetah-class bits for these. - For SPARC64-V ensure that 4-Mbyte page entries are stored in the 1024- entry, 2-way set associative TLB. - In {d,i}tlb_get_data_sun4u() turn off the interrupts in order to ensure that ASI_{D,I}TLB_DATA_ACCESS_REG actually are read twice back-to-back. Tested by: Peter Jeremy (16-core US-IV), Michael Moll (2-way SPARC64-V)
* Fix r223695 to compile on architectures which don't use the MBR scheme; wrapmarius2011-07-012-6/+17
| | | | | the MBR support in the common part of the loader in #ifdef's and enable it only for userboot for now.
* Add a version of the FreeBSD bootloader which can run in userland, packageddfr2011-06-3032-4/+4633
| | | | | as a shared library. This is intended to be used by BHyVe to load FreeBSD kernels into new virtual machines.
* Revert the entry point label to 'start' to unbreak the build.jhb2011-06-272-3/+3
| | | | Pointy hat to: jhb
* - Remove the fake BPB from zfsldr. zfsldr doesn't support booting fromjhb2011-06-272-82/+31
| | | | | | | | | | | | | | 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
* As with EFI, OFW and U-Boot etc only compile FDT support on thosemarius2011-06-253-4/+8
| | | | architectures that actually use it.
* The recent change to increase the zfsboot size to 64k made a few BIOSesjhb2011-06-231-62/+63
| | | | | | | | | | | | | | | | | | | | | | 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
* Minimize backward seeks when trying to load ELF relocatable modules.kan2011-06-191-7/+30
| | | | | | Some of loader filesystems are very ill equipped to handle seeking backwards within the file. Namely, tftp requires trasfer to be restarted from the start of the file every time we go backwards.
* Fix clang warnings.benl2011-06-181-1/+1
| | | | Approved by: philip (mentor)
* Revert changes to this file in r222417. This unconditionally enabled thenwhitehorn2011-06-151-4/+1
| | | | | | | boot menu on all platforms, which breaks loader completely on at least powerpc for reasons that are not understood yet. Reviewed by: Devin Teske
* Upgrade our copy of llvm/clang to r132879, from upstream's trunk.dim2011-06-121-1/+1
|
* o Bump the EFI loader version to 3.1.marcel2011-06-073-3/+68
| | | | | o Add the about, pbvm and reboot commands. o Trim the banner (suppress maker and date).
* Add ia64_sync_icache() and use it to make the I-cache coherentmarcel2011-06-074-1/+55
| | | | | after loading the kernel's text segment. The kernel will do the same for loaded modules, so don't worry about that.
OpenPOWER on IntegriCloud