summaryrefslogtreecommitdiffstats
path: root/sys/boot/efi
Commit message (Collapse)AuthorAgeFilesLines
* MFC r311933:dim2017-01-251-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | Use proper prototypes in struct boot_module_t With clang 4.0.0, we are getting the following warnings about struct boot_module_t in efi's boot_module.h: In file included from sys/boot/efi/boot1/ufs_module.c:41: sys/boot/efi/boot1/boot_module.h:67:14: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes] void (*init)(); ^ void sys/boot/efi/boot1/boot_module.h:92:16: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes] void (*status)(); ^ void sys/boot/efi/boot1/boot_module.h:95:24: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes] dev_info_t *(*devices)(); ^ void 3 errors generated. Fix this by adding 'void' to the parameter lists. No functional change. Reviewed by: emaste, imp, smh Differential Revision: https://reviews.freebsd.org/D9144
* MFC r311932:dim2017-01-251-0/+1
| | | | | | | | | | | | | | | | | Make EFI_RESERVED_SERVICE a proper prototype With clang 4.0.0, the EFI API header causes the following warning: In file included from sys/boot/efi/loader/bootinfo.c:43: In file included from sys/boot/efi/loader/../include/efi.h:52: sys/boot/efi/include/efiapi.h:534:32: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes] (EFIAPI *EFI_RESERVED_SERVICE) ( ^ Add VOID to make it into a real prototype. Reviewed by: imp, emaste, tsoome Differential Revision: https://reviews.freebsd.org/D9132
* MFC 304018: Add defines needed to export SMBIOS serial numbersjhb2016-08-191-0/+12
| | | | | | | | Some defines needed for exporting serial numbers from the SMBIOS were missed during integration of SMBIOS support in the EFI boot loader (r281138). This is needed for getting the hostid set from the system hardware UUID. PR: 206031
* MFC r297871: boot1.efifat: provide a fallback startup.nshemaste2016-07-251-0/+2
| | | | | | | | | In case the firmware falls through to executing startup.sh, populate it with the name of our boot loader. In normal operation this should not be necessary but may allow the system to boot if it would otherwise just remain at a shell prompt. Sponsored by: The FreeBSD Foundation
* MFC r302335: boot1.efi: fix assignment / comparison expressionemaste2016-07-251-1/+1
| | | | | PR: 210706 Submitted by: David Binderman <dcb314@hotmail.com>
* MFC r296769: boot/efi: Prefer nm to objdumpemaste2016-04-112-6/+6
| | | | | | | | | Both objdump and nm are equally capable of reporting undefined symbols. This gets us a step closer to building without binutils as we have an nm implementation from ELF Tool Chain. Sponsored by: The FreeBSD Foundation
* MFC: r292563marius2016-04-043-7/+7
| | | | | | | | loader.efi: strip trailing whitespace MFC: r293244 (remainder missing in r294275) Introduce and use new EFI_ERROR_CODE macro for EFI errors
* MFC: r287299 [1]marius2016-02-223-23/+1227
| | | | | | | | | | | | | | | | | | | Add a gop command to help diagnose VT efifb problems. The gop command has the following sub-commands: list - list all possible modes (paged) get - return the current mode set <mode> - set the current mode to <mode> MFC: r287317, r287422, r287475, r287489, r287538 [2] Add support for the UGA draw protocol. This includes adding a command called 'uga' to show whether UGA is implemented by the firmware and what the settings are. It also includes filling the efi_fb structure from the UGA information when GOP isn't implemented by the firmware. PR: 207313 [1], 202730 [2] Approved by: re (gjb)
* Merge from current r294767,294769,295408imp2016-02-112-15/+186
| | | | | | | | r294767: Parse command line arguments in loader.fi r294769: Allow newlines to be treated as whitespace when parsing args r295408: Implement -P command line option in for EFI booting. Approved by: re@ (gjb@)
* MFC r295320, r295356 (Partial)smh2016-02-115-181/+517
| | | | | | | Fix EFI multi device boot support Approved by: re (marius) Sponsored by: Multiplay
* MFC r294768:smh2016-02-111-1/+37
| | | | | | | Process /boot/config and /boot.config during EFI boot Approved by: re (marius) Sponsored by: Multiplay
* Fix ia64 build failures in EFI platformsmh2016-02-112-0/+10
| | | | | | | | | | | | | | | | | | The MFC of the recent EFI work to stable/10 caused build breakage under ia64. It was not apparent that there was EFI code outside the EFI tree as this is not the case in HEAD, however in stable/10 there is for ia64. This change does the following: * Re-enables libefi for ia64 under gcc. * Adds the ignore for unsupported pragma's when building libefi for ia64. * Adds the missing parameter to efi_handle_lookup in the ia64 loader. This is a direct commit as ia64 is no longer supported after 10.x Approved by: re (marius) Sponsored by: Multiplay
* Catch the EFI loader up to the latest ZFS Boot Environment Menu featuresallanjude2016-02-101-0/+33
| | | | | | | | | | | | | | | 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.
* MFC boot loader path and RBX constant deduplicationemaste2016-02-091-6/+5
| | | | | | | | | | | | | | | | | | | | | | | | 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)
* Fix clean target for sys/boot/efismh2016-01-301-0/+2
| | | | | | | | | | | Fix clean target breakage of sys/boot/efi introduced by r294981 specifically the MFC of r294029 without the related change introduced by r281114. This is direct commit to stable/10 as head uses src.opts.mk. Approved by: re (glebius) Sponsored by: Multiplay
* MFC r294068, r294265smh2016-01-2810-8/+377
| | | | | | | | | | | MFC r294068: Add EFI ZFS boot support MFC r294265: Fix broken DPRINTF and wire up EFI_DEBUG so -DEFI_DEBUG to make works. Relnotes: Yes Sponsored by: Multiplay
* MFC r281060, r294060, r294291, r294493, r294284:smh2016-01-287-214/+584
| | | | | | | | | | | | | | | | | | | MFC r281060: Remove an unnecessary space in a printf call MFC r294060: Modularise EFI boot loader MFC r294291 (by andrew): Reset the filesystem cache MFC r294493: Fix EFI UFS caching MFC r294284 (by emaste): boot1: correct typo in error message Sponsored by: Multiplay
* MFC r281169, r293724, r293796, r294029, r294041, r294058smh2016-01-2830-97/+109
| | | | | | | | | | | | | | | | | | | | | | 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
* MFC r293460:smh2016-01-252-260/+15
| | | | | | | | | Switch EFT boot1 to use libstand This includes a change to the Makefile comment to correct it due to the lack of arm and i386 support in 10.x. Sponsored by: Multiplay
* MFC r293422 (partial):smh2016-01-251-14/+20
| | | | | | | | | | Update generated EFI boot image templates. This is a partial MFC as stable/10 only has EFI boot support for amd64, and there are no plans to change this, so the other platform images aren't included. Sponsored by: Multiplay
* MFC r293461:smh2016-01-251-1/+0
| | | | | | Remove hidden "Not ufs" printfs from boot code Sponsored by: Multiplay
* MFC r293274:smh2016-01-252-4/+3
| | | | | | style(9) fixes for EFI boot Sponsored by: Multiplay
* MFC r281059 (by rpaulo):smh2016-01-251-1/+22
| | | | | | boot1 EFI: reset the screen and select the best mode. Sponsored by: Multiplay
* MFC r293268:smh2016-01-253-8/+8
| | | | | | Fix _MSC_EXTENSIONS checks Sponsored by: Multiplay
* MFC r293245: loader.efi style(9) cleanupemaste2016-01-201-35/+29
| | | | Submitted by: smh
* MFC r293233: loader.efi: add terminal emulation supportemaste2016-01-203-19/+405
| | | | | | | This is based on the vidconsole implementation. Submitted by: Toomas Soome <tsoome@me.com> Relnotes: Yes
* MFC r292584:ian2016-01-191-2/+25
| | | | | | | | | | | | | | Set env vars from values on the efi loader command line. Examine each cmdline arg and if it contains an '=' convert it to ascii and pass it to putenv(). This allows var=value settings to come in on the command line. This will allow overriding dhcp server-provided data in loader(8), as discussed in PR 202098 PR: 202098 Relnotes: Yes (this goes together with r294343)
* MFC r281058: Remove whitespace.emaste2016-01-181-13/+12
|
* MFC r293244: Introduce and use new EFI_ERROR_CODE macro for EFI errorsemaste2016-01-184-9/+9
|
* MFC r293165: loader.efi: support non-contiguous console modesemaste2016-01-181-2/+3
|
* MFC r281117: Move boot1.efi to the global CLEANFILES listemaste2016-01-181-2/+2
| | | | It's not x86 specific.
* MFC r287930: Various small cleanups to EFI loader Makefiles.emaste2016-01-182-7/+6
|
* MFC r286967 by imp: use -mno-aes and -mno-avx flags only with Clangemaste2016-01-111-1/+2
| | | | | The flags -mno-aes -mno-avx only exist for clang, not [base] gcc, so add them only to the clang CFLAGS.
* Move -msoft-float compiler flag into x86/i386 cases to fix ia64emaste2016-01-111-1/+3
| | | | Direct commit to stable/10 as ia64 support does not exist in HEAD.
* MFC r281027: Clean up more x86 only options in the efi code.emaste2016-01-112-4/+15
|
* 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
* 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 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 r280047: build x86-specific files in amd64 loader.efiemaste2015-12-211-4/+0
| | | | | | | 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-161-20/+32
| | | | | 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 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 279950:jhb2015-04-091-1/+1
| | | | | | 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-091-1/+1
| | | | | | | | | | | | | | | | | | | | | 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 r272105: Remove duplicated header contentemaste2014-09-301-119/+0
| | | | Approved by: re (gjb, kib)
* MFC r271762: Switch to text mode in UEFI bootemaste2014-09-222-0/+263
| | | | | | | | | The loader previously failed to display on MacBooks and other systems where the UEFI firmware remained in graphics mode. Submitted by: Rafael Espindola Approved by: re
OpenPOWER on IntegriCloud