| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
| |
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
|
|
|
|
|
| |
In HEAD this was done to support UEFI on arm64. Merging to stable/10 to
facilitate the merging of later UEFI changes.
|
| |
|
| |
|
|
|
|
|
| |
bit-fields. Unify the PTE defines accordingly and update all
uses.
|
| |
|
|
|
|
|
|
|
|
|
| |
binutils 2.15. The linker now creates a .rela.dyn section for
dynamic relocations, while our script created a .rela section.
Likewise, we copied the .rela section to the EFI image, but not
the .rela.dyn section. The fix is to rename .rela to .rela.dyn
in the linker script so that all relocations end up in the same
section again. This we copy into the EFI image.
|
| |
|
|
|
|
| |
Tested by: marcel
|
|
|
|
|
|
|
|
|
|
|
|
| |
EFI file system. When booting from a CD and there's already an EFI
system partition on the disk, setting the current device to unit 0
will select the harddisk. This invariably breaks installing FreeBSD
when other operating systems have been installed before.
We obviously want to do the same when we're booting over the network.
Maybe later.
Based on a patch (from memory) from: arun
|
| |
|
|
|
|
|
| |
the address of the image base of the loader. Given cr.iip, we can
use the symbol table to figure out what function caused the trap.
|
| |
|
| |
|
|
|
|
| |
exists.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
NULL is passed. The address of the HCDP table can be found by
iterating over the configuration tables in the EFI system table.
To avoid more duplication, a function can be called with the GUID
of interest. The function will do the scanning. Use the function
in all places where we iterate over the configuration tables in
an attempt to find a specific one.
Bump the loader version number as the result of this.
Approved by: re (blanket)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
accept load options (=command line options).
The call graph changes from *entry*->efi_main->efi_init, where
efi_main is the EFI equivalent of main to *entry*->efi_main->main,
where main is what you'd expect. efi_main now is what efi_init was.
The prototype of main follows that of C. The first argument is argc
and the second is argv. There is no third argument.
Allocation of heap pages is now handled by the EFI library and it
now deallocates the pages when main() returns or when exit() is
called. This allows us to safely return to the boot manager (or
EFI shell) without leaks. EFI applications are responsible to free
all memory themselves.
Handling of the load options is a bit tricky. There are either no
load options, load options in ASCII or load options in Unicode.
The EFI library will translate the ASCII options to Unicode options
as to simplify user code. Since the load options are passed as a
single string (if present) and main() accepts argc and argv, the
startup code also has to split the string into words and build the
argv vector. Here the trickiness starts. When the loader is started
from the EFI shell, argv[0] will automaticly load the program name.
In all other cases (ie through the boot manager), this is not the
case. Unfortunately, there's no trivial way to check. Hence, a
set of conditions is checked to determine if we need to fill in
argv[0] ourselves or not. This checking is not perfect. There are
known cases where it fails to do the right thing. The logic works
for most expected cases, though. This includes the case where no
options are given.
Approved by: re (blanket)
|
|
|
|
|
|
|
| |
o Recognize the HCDP configuration table.
o Dump the GUID of tables we don't recognize.
Approved by: re (carte blanche)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
a boot option. When the timer expires the machine is rebooted.
Disable the watchdog timer for 2 reasons:
o We're an interactive program. We cannot guarantee that we've
booted the kernel in the time available to us. There have been
situations where netbooting the right kernel took 2 tries and
more time than given. Not to speak of the normal behaviour to
have the loader sitting at the prompt while the user is off
doing other things (such as figuring out what to type next ;-)
o We may not boot a kernel at all. We may exit as the result of
the user typing quit (assuming it took less than 5 minutes to
type it :-). It is documented that loaders should have disabled
the watchdog timer if they return to the boot manager. Not doing
so would cause a reboot while in the boot manager. This appears
to be harmless, besides of course the actual reboot.
Approved by: re (weisse karte)
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Previous kernels unwantingly depended on this mapping, but as
of version 1.123 of src/sys/ia64/ia64/machdep.c this dependency
has been removed. Consequently, one has to update the kernel
before updating the loader. The documented/recommended upgrade
will suffice in this case.
Due to a visible (from the kernels point of view) change in
behaviour, bump the loader version number from 0.3 to 1.0.
Approved by: re (carte blanc)
|
|
|
|
|
|
|
|
|
| |
o Show the contents of the AP wakeup descriptor when dumping SAL
information.
o Increase S/N ratio when listing the itr and dtr. Only show valid
mappings and give the total number of TRs.
Approved by: re (blanket)
|
|
|
|
|
| |
box that I have. We have no EFI disk drivers yet anyway (maybe that is the
problem).
|
| |
|
|
|
|
|
| |
(also resort some CFLAGS such that the more "important" value are first so
they are easier to see)
|
|
|
|
| |
resulting binary will be damaged and no longer work.
|
| |
|
| |
|
| |
|
|
|
|
| |
fact that the 'ia64-make' wrapper explicitly set it.
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
detects and uses the gas section merge support. As a result, a whole bunch
of new sections arrive, including .rodata.str1.8, which was not included
in our custom ldscript.ia64. The result was a loader binary that EFI
rejected.
While here, collect the loader shell commands linker set and include it
in the data area rather than having its own section.
/boot/loader.efi was the last holdout for having a 100% self built ia64
system.
|
|
|
|
| |
or may have the wrong header files.
|
|
|
|
|
| |
in both the condition and for the install. We expect to find
the help file in ${.OBJDIR}.
|
|
|
|
|
|
|
|
|
| |
register r8. We continue to write the bootinfo block at the same
hardwired address, because the kernel still expects it there.
It is expected that future kernels use register r8 to get to the
bootinfo block and don't depend on the hardwired address anymore.
Bump the loader version once again due to the interface change.
|
|
|
|
|
|
|
|
| |
only care if it's network or not at this time. If we're loaded from
the network, we set currdev (=loaddev) so that the kernel is loaded
from the network as well. In all other cases we initialize to disk.
This makes netbooting more convenient and can easily be enhanced to
do more elaborate checking.
|
|
|
|
|
|
|
| |
Most significantly (from an interfacing point of view) is the
support for the FPSWA pointer passing. Even though that was added
4 months ago, it's probably not a bad idea to bump the version
number to reflect this.
|
|
|
|
|
| |
o Add -j .dynstr to objcopy. This makes .efi binaries work
when built with a 3.x based toolchain.
|
| |
|
| |
|
|
|
|
| |
of minor problems and remove some debugging code.
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|