| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
PR: 210706
Submitted by: David Binderman <dcb314@hotmail.com>
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
| |
loader.efi: strip trailing whitespace
MFC: r293244 (remainder missing in r294275)
Introduce and use new EFI_ERROR_CODE macro for EFI errors
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
|
|
|
|
|
|
|
| |
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@)
|
|
|
|
|
|
|
| |
Fix EFI multi device boot support
Approved by: re (marius)
Sponsored by: Multiplay
|
|
|
|
|
|
|
| |
Process /boot/config and /boot.config during EFI boot
Approved by: re (marius)
Sponsored by: Multiplay
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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 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:
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:
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 (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
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
| |
Remove hidden "Not ufs" printfs from boot code
Sponsored by: Multiplay
|
|
|
|
|
|
| |
style(9) fixes for EFI boot
Sponsored by: Multiplay
|
|
|
|
|
|
| |
boot1 EFI: reset the screen and select the best mode.
Sponsored by: Multiplay
|
|
|
|
|
|
| |
Fix _MSC_EXTENSIONS checks
Sponsored by: Multiplay
|
|
|
|
| |
Submitted by: smh
|
|
|
|
|
|
|
| |
This is based on the vidconsole implementation.
Submitted by: Toomas Soome <tsoome@me.com>
Relnotes: Yes
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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)
|
| |
|
| |
|
| |
|
|
|
|
| |
It's not x86 specific.
|
| |
|
|
|
|
|
| |
The flags -mno-aes -mno-avx only exist for clang, not [base] gcc, so
add them only to the clang CFLAGS.
|
|
|
|
| |
Direct commit to stable/10 as ia64 support does not exist in HEAD.
|
| |
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
| |
Restore smbios support lost in r293297
|
| |
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
| |
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).
|
|
|
|
|
| |
In HEAD this was done to support UEFI on arm64. Merging to stable/10 to
facilitate the merging of later UEFI changes.
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
This adds the GUIDs for DXE, HOB, Memory Type Information and Debug
Image Info.
|
|
|
|
|
|
|
|
|
| |
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
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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>
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
| |
Approved by: re (gjb, kib)
|
|
|
|
|
|
|
|
|
| |
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
|