summaryrefslogtreecommitdiffstats
path: root/sys/boot
Commit message (Collapse)AuthorAgeFilesLines
...
* MFC r280808 by andrew: Reorder sys/boot/Makefile for the efi loader moveemaste2016-01-072-4/+4
| | | | | | | | As these will depend on ficl having been built, and are set via bsd.arch.inc.mk we need to place this after ficl. As Makefile.amd64 is now late enough we can add the i386 directory to this.
* MFC r281524 by andrew@: Use MACHINE in the efi loader when it is what we meanemaste2016-01-074-14/+16
| | | | | | | It may not be the same as MACHINE_CPUARCH, it just happened to be the case the architectures this code currently supports. Fixes build failure reported by Oliver Pinter.
* loader.efi: combine GetMemoryMap and ExitBootServices and retry on erroremaste2016-01-073-52/+56
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | MFC r292338: UEFI: combine GetMemoryMap and ExitBootServices and retry on error The EFI memory map may change before or during the first ExitBootServices call. In that case ExitBootServices returns an error, and GetMemoryMap and ExitBootServices must be retried. Glue together calls to GetMemoryMap(), ExitBootServices() and storage of (now up-to-date) MODINFOMD_EFI_MAP metadata within a single function. That new function - bi_add_efi_data_and_exit() - uses space previously allocated in bi_load_efi_data() to store the memory map (it will fail if that space is too short). It handles re-calling GetMemoryMap() once to update the map key if necessary. Finally, if ExitBootServices() is successful, it stores the memory map and its header as MODINFOMD_EFI_MAP metadata. ExitBootServices() calls are now done earlier, from within arch- independent bi_load() code. MFC r292442: loader.efi: show EFI error number, not full status value EFI return values set the high bit to indicate an error. The log messages changed here are printed only in the case of an error, so including the error bit is redundant. Also switch to decimal to match the error definitions (in sys/boot/efi/include/efierr.h). MFC r292515: loader.efi: refresh size in GetMemoryMap retry loop If ExitBootServices fails due to a changed efi_mapkey then GetMemoryMap must be called again. In this case it is also possible for the memory map to grow, so repeat the initial GetMemoryMap call to fetch the new size. Also roll bi_add_efi_data_and_exit into bi_load_efi_data as there's no need for it to be a separate function. PR: 202455 Relnotes: Yes Sponsored by: The FreeBSD Foundation
* MFC r281138: SMBIOS support for EFIemaste2016-01-072-1/+16
| | | | Restore smbios support lost in r293297
* Remove old amd64 EFI directoryemaste2016-01-0723-2699/+0
|
* MFC r288372: Use EFI page size constants instead of hardcoding 4096emaste2016-01-071-3/+3
|
* MFC r287934: Increase EFI staging size from 32MB to 48MBemaste2016-01-071-1/+1
| | | | | | | | | The EFI boot loader allocates a single chunk of contiguous memory to hold the kernel, modules, and any other loaded data. This memory block is relocated to the kernel's expected location during the transfer of control from the loader to the kernel. PR: 201679
* MFC r292576: boot1.efi: show EFI error number, not full status valueemaste2016-01-071-3/+6
| | | | | | | EFI return values set the high bit to indicate an error. The log messages changed here are printed only in the case of an error, so including the error bit is redundant. Also switch to decimal to match the error definitions (in sys/boot/efi/include/efierr.h).
* MFC r281000: Move i386/efi files to new home in efi/loader/arch/i386emaste2016-01-078-858/+0
| | | | | | 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.
* MFC r280950: Move the efi loaders to be under sys/boot/efiemaste2016-01-0724-0/+2698
| | | | | In HEAD this was done to support UEFI on arm64. Merging to stable/10 to facilitate the merging of later UEFI changes.
* MFC SVN revisions 292899,292996,292999-293000.dteske2016-01-071-10/+9
| | | | | | | r292899: Fix stack leak introduced by SVN r97201 r292996: Remove debugging messages added by SVN r187143 r292999: Fix a memory leak r293000: Remove supposition comment
* MFC r286368: Remove guards around overwriting loader.rc and menu.rcdteske2016-01-077-33/+11
| | | | | | | | | | | | | 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.
* MFC SVN revisions 280922,285875,285882.dteske2016-01-071-4/+11
| | | | | | r280922: Change contents of the exec variable in loader.conf (dteske/rpaulo) r285875: Use double newlines consistently (trasz/foundation) r285882: Use consistent spacing (trasz/foundation)
* MFC r280351: Stop calling x86_efi_copyin and x86_efi_getdev directlyemaste2016-01-041-13/+13
| | | | | | In HEAD this is to help port loader.efi to both 32 and 64-bit ARM where we can use this file with minimal changes. Merged to stable/10 to simplify MFCs of later EFI commits.
* MFC r279738, r281307: boot1.efi: add error reportingemaste2015-12-211-0/+7
| | | | Sponsored by: The FreeBSD Foundation
* MFC r276146: Use explicit --output-target to set EFI file formatemaste2015-12-212-2/+2
| | | | | | | | | According to objcopy(1) --target is for use where the input and output formats are the same ("no translation"). In practice it does detect the input format in any case, but be explicit that we're specifying the output format as we are translating from ELF to EFI PE format. Sponsored by: The FreeBSD Foundation
* MFC r280047: build x86-specific files in amd64 loader.efiemaste2015-12-212-5/+3
| | | | | | | This was originally done for the arm and arm64 loader.efi and is MFC'd here to ease future UEFI loader MFCs. Sponsored by: The FreeBSD Foundation
* MFC r278234: EFI: print more information about EFI Tables.emaste2015-12-162-21/+45
| | | | | This adds the GUIDs for DXE, HOB, Memory Type Information and Debug Image Info.
* MFC r274439: Add the FDT table GUID.emaste2015-12-161-0/+2
| | | | | | | | | This is used to pass the device tree blob from UEFI to the loader in a similar way to the ACPI tables. This will be used on arm64 but is not specific to the architecture. Sponsored by: The FreeBSD Foundation
* MFC r291012:smh2015-11-251-1/+9
| | | | | | Document loader(8) dumpdev option Sponsored by: Multiplay
* MFC r289896:ngie2015-11-151-4/+8
| | | | | | | | | | | | | | | | Make vers.c creation atomic by using a temporary file, then moving the temporary file to vers.c at the end of the script The previous logic wrote out to vers.c multiple times, so the file could be incorrectly interpreted as being completely written out after one of the echo calls with recursive make, when in reality it was only partially written. Also, in the event the build was interrupted when creating vers.c (small race window), it would have a leftover file that needed to be cleaned up before resuming the build. Sponsored by: EMC / Isilon Storage Division
* MFC 288372:jhb2015-11-051-3/+3
| | | | Use EFI page size constants instead of hardcoding 4096.
* MFC 287934:jhb2015-11-051-1/+1
| | | | | | | | | | | | | The EFI boot loader allocates a single chunk of contiguous memory to hold the kernel, modules, and any other loaded data. This memory block is relocated to the kernel's expected location during the transfer of control from the loader to the kernel. The GENERIC kernel on amd64 has recently grown such that a kernel + zfs.ko no longer fits in the default staging size. Bump the default size from 32MB to 48MB to provide more breathing room. PR: 201679
* MFC 278582:jhb2015-10-291-0/+1
| | | | | | | | | | | MFi386: 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.
* MFC r285881:trasz2015-10-181-0/+10
| | | | | | | | | Add md_root example to defaults/loader.conf. Note that this doesn't quite work yet - the preloaded image gets loaded twice for some reason. Sponsored by: The FreeBSD Foundation
* MFC r285870:trasz2015-10-181-3/+9
| | | | | | | Document md_root in loader(8). The md(4) manual page mentions it, but it's hard to find and easy to miss. Sponsored by: The FreeBSD Foundation
* MFC 289031: Teach gptldr to handle >64k boot2.cperciva2015-10-151-11/+28
|
* MFC r286773:hselasky2015-08-291-1/+2
| | | | | Improve the realtime properties of USB transfers for embedded systems like RPI-B and RPI-2.
* MFC r280451:mav2015-08-221-2/+0
| | | | | | | Remove from legacy ata(4) driver support for hardware, supported by newer and more functional drivers ahci(4), siis(4) and mvs(4). This removes about 3400 lines of code, unused since FreeBSD 9.0 release.
* MFC r285246: Avoid creating invalid UEFI device pathemaste2015-07-281-5/+18
| | | | | | | | | | | | | The UEFI loader on the 10.1 release install disk (disc1) modifies an existing EFI_DEVICE_PATH_PROTOCOL instance in an apparent attempt to truncate the device path. In doing so it creates an invalid device path. Perform the equivalent action without modification of structures allocated by firmware. PR: 197641 Submitted by: Chris Ruffin <chris.ruffin at intel.com>
* MFC: r277949:allanjude2015-07-206-51/+195
| | | | | | | | | | | | | | | | | | | 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
* MFC r285138:loos2015-07-081-3/+2
| | | | | | | | | | Install loader.rc with ARM u-boot loader (ubldr). loader.rc is the responsible to read and process loader.conf variables. This fix the issue of loader.conf being silently ignored. Approved by: re (gjb)
* MFC r284672 (antoine):dteske2015-06-231-1/+2
| | | | | | Install version.4th.8 again It was disconnected from installation in r281081, but was never removed from the tree or added to ObsoleteFiles.inc
* MFC r284025,284032: dnode_read: handle hole blocks in zfs boot codeavg2015-06-171-0/+4
| | | | PR: 199804
* MFC r283939: userboot: enable bzipfs supportavg2015-06-121-1/+2
|
* MFC r268254 (jmg):dteske2015-06-031-0/+1
| | | | | Add a hint that you can enable this by default if you want; necessary if you want the keyboard break to work early in boot.
* MFC 281887:jhb2015-06-021-1/+1
| | | | | Reassign copyright statements on several files from Advanced Computing Technologies LLC to Hudson River Trading LLC.
* MFC r283033, r283062, r283066, r283069:ian2015-05-254-28/+162
| | | | | | | | | | | Do not set preload_addr_relocate for ARM. Refactor net_getparams() to make it easier to get params from sources other than bootp and rarp. Add a routine to obtain netboot parameters from the U-Boot env vars Enable the NETIF_OPEN_CLOSE_ONCE option for ubldr.
* MFC r277962, r277988, r282661, r282727, r282731, r283013, r283035:ian2015-05-259-97/+347
| | | | | | | | | | | | | | | | | Add support for booting relocatable kernels on PowerPC. Add code to support loading relocatable kernels at offsets that are not zero. Move ubldr text section to the start of the output file, so that when you create a stripped .bin file from it the entry point is the first byte of the file. (Will allow "load $addr $file ; go $addr" in u-boot.) Create a relocatable instance of ubldr for ARM (ubldr.bin). Re-link ubldr when any of its libraries change. An ARM kernel can be loaded at any 2MB boundary, make ubldr aware of that.
* MFC r268838, r277644:ian2015-05-242-2/+108
| | | | | | | | | Add support for Toradex Apalis i.MX6 development board. Add support for imx6 audio transmitting, include drivers for: o Digital Audio Multiplexer (AUDMUX) o Smart Direct Memory Access Controller (SDMA) o Synchronous Serial Interface (SSI)
* MFC r280194:ian2015-05-242-11/+9
| | | | Fix fdt_platform_fixups() mem region handling.
* MFC r281011 (jkim):gjb2015-05-221-0/+1
| | | | | | Fix powerpc, powerpc64 build. Sponsored by: The FreeBSD Foundation
* MFC revisions 277693,278335,280382-280385,280923-280926,280931,dteske2015-04-2232-712/+1034
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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
* MFC 279950:jhb2015-04-092-1/+2
| | | | | | Enable bzipfs support in the EFI loader. - Add bzipfs to the list of supported filesystems in the EFI loader. - Increase the heap size allocated for the EFI loader from 2MB to 3MB.
* MFC 279949:jhb2015-04-093-2/+5
| | | | | | | | | | | | | | | | | | | | | The System V ABI for amd64 allows functions to use space in a 128 byte redzone below the stack pointer for scratch space and requires interrupt and signal frames to avoid overwriting it. However, EFI uses the Windows ABI which does not support this. As a result, interrupt handlers in EFI push their interrupt frames directly on top of the stack pointer. If the compiler used the red zone in a function in the EFI loader, then a device interrupt that occurred while that function was running could trash its local variables. In practice this happens fairly reliable when using gzipfs as an interrupt during decompression can trash the local variables in the inflate_table() function resulting in corrupted output or hangs. Fix this by disabling the redzone for amd64 EFI binaries. This requires building not only the loader but any libraries used by the loader without redzone support. Thanks to Jilles for pointing me at the redzone once I found the stack corruption.
* MFC 279929:jhb2015-04-092-2/+25
| | | | | | | | | | | | | | | | | | | Allow the EFI loader to work with large kernels and/or modules (for example, a large mfsroot). Note that for EFI the kernel and modules (as well as other metadata files such as splash screens or memory disk images) are loaded into a statically-sized staging area. When the EFI loader exits it copies this staging area down to the location the kernel expects to run at. - Add bounds checking to the copy routines to fail attempts to access memory outside of the staging area. Previously loading a combined kernel + modules larger than the staging size (32MB) would overflow the staging area trashing whatever memory was afterwards. Under Intel's OVMF firmware for qemu this resulted in fatal faults in the firmware itself. Now the attempt will fail with ENOMEM. - Allow the staging area size to be configured at compile time via an EFI_STAGING_SIZE variable in src.conf or on the command line. It accepts the size of the staging area in MB. The default size remains 32MB.
* MFC r280980:dim2015-04-097-12/+12
| | | | | | | | 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
* MFC r279275: Fix potential NULL dereference.mav2015-03-111-2/+1
| | | | Submitted by: Dmitry Luhtionov <dmitryluhtionov@gmail.com>
* MFC r279598:dim2015-03-082-2/+6
| | | | | | | | | | 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
* MFC r278915:loos2015-03-031-0/+4
| | | | | | | | Set the #address-cells and #size-cells properties on I2C controllers of Raspberry-pi. This fixes the issues on dtc(1) while compiling I2C addresses set with "reg" property.
OpenPOWER on IntegriCloud