Age | Commit message (Collapse) | Author |
|
|
|
as self_reloc.c only handles the former.
ok deraadt@ kettenis@
|
|
O_RDONLY rather using 0
ok beck
|
|
|
|
arm64 efid_io().
ok kettenis@
|
|
BS->AllocatePages() and BS->FreePages() as in all the other
efid_io() versions.
Don't leak the pages on success.
Bump boot version to 3.59.
ok yasuoka@
|
|
|
|
the expansion 'func(params)'.
Allows upcoming removal of eficall.h.
|
|
prodded by jsg@
|
|
'__attribute((ms_abi))', removing the need for the EFI_CALL
abstraction.
Nuke the amd64 EFI_CALL dance from all copies of eficall.h,
remove eficall.S from the build.
ok kettenis@ yasuoka@
|
|
media length check to allow EFI GPT partitions to be smaller that
the entire disk.
Consistently use GPTSECTOR instead of randomly tossing in some
literal '1's.
ok kettenis@
|
|
64 entries. Instead of writing beyond the array that we use to construct
a BIOS compatible memory map, check that we don't overflow the array and
print a message if we do. Bump the size of the array from 64 to 128
entries.
Issue reported and debugged by David N. Arnold.
Further input from yasuoka@
ok deraadt@ (earlier version) and yasuaka@
|
|
efid_io() simpler. Also fixes the problem on some machines when boot
from CD-ROM. It happened because the previous version passed
unaligned pointers to the functions even if it is restricted by the
IoAlign property of the media. idea from kettenis, work with asou
ok kettenis
|
|
|
|
ok kettenis
|
|
At a minimum, amd64/i386 should now boot from 4TB GPT formatted disks.
More daddr32_t terminations with extreme prejudice to follow.
Tested by various, in snaps for a few days.
ok deraadt@
|
|
Note that the first 16MB of the block are currently unused since
we link our kernels at physical address 0x01000000. Therefore
32MB is no longer enough to load a kernel that is now larger than
16MB.
Fixes the "entry point at 0x10010000" hang that people have reported
on some machines.
ok patrick@, naddy@, deraadt@
|
|
at the beginning of the loop. We need to use cr3 at the start of each
iteration for the top level page directory.
From and ok sf@
|
|
on the HP EliteBook 830 G6 we added a workaround which tries to re-map
the pages where we want to place to kernel read-write. On some machines
though this workaround causes a regression. Fix those by changing a few
things: Only set the writeable bit if it isn't set yet. Un-protect
write-protected page directories. Skip lower levels if large-page is
set, since the next level is already a page. Don't do anything at all
if paging is disabled.
From Christian Ehrhardt
ok bluhm@ tobhe@
|
|
from mortimer
|
|
|
|
and alternatively XOR'd against TSC. now always run both sequences, and
also support rdseed as a third procedure.
ok kettenis naddy
|
|
|
|
|
|
find a media device path node. Fixes booting OpenBSD on some older U-Boot
versions that are in wide circulation such as 2017.09 and 2017.11.
ok patrick@
|
|
Also enable ffs2 for floppy, so that its kernel kan access ffs2. ok deraadt@
|
|
the area where the boot loader copies the kernel. Its EfiLoaderCode
is write protected, so the boot loader hangs in memmove(). As we
may use this memory after calling EFI ExitBootServices(), change
the protection bit to writeable in the page table.
OK deraadt@ mlarkin@ patrick@
|
|
ok deraadt@
|
|
inspect the memory layout that the firmware has created. It is
especially useful for UEFI debugging.
OK deraadt@ kettenis@
|
|
dereferenced. But there is no boot disk when EFI bootloader has
been received via TFPT. Fake a disk info that never maches a real
disk. Fixes a hang in run_loadfile() during HP Elitebook UEFI boot.
OK patrick@
|
|
section, which has grown a fair bit with the introduction of retguard.
Mortimer discovered the repeated 512-byte sequence as retguard keys, and
this resolves the issue. (Chacha does not fit on the media, so 1.5K early
drop RC4 is hopefully sufficient in our KARL link universe)
Version crank the bootblocks. sysupgrade -s will install new bootblocks.
ok djm mortimer
|
|
in reality the depth was always -1 which made the compare function
a No-Op. Properly check the device path depth value and look for
the Messaging type instead to find the correct NIC. This check
never worked before and was uncovered by the last change.
Regression noticed by bluhm@
|
|
of the EFI PXE protocol. This also brings us in line with
the GRUB2 implementation.
Tested by naddy@ to behave the same
Tested by sven falempin on his Pine64
|
|
|
|
so the file cannot be re-executed upon the next boot. This provides a
stronger one-shot-upgrade model than the upgrade script's rm /bsd.upgrade.
Now various forms of upgrade failure will reboot into /bsd, which is probably
more recoverable. Performing fchmod -x depends on (1) use of MI boot.c
(not alpha/macppc/sparc64/sgi/octeon) and (2) "can write blocks" functionality
in the IO layer. Most architectures have this support now.
Two diagnostics "fchmod a-x %s: failed" and "/bsd.upgrade is not u+x" will
remain in the tree while refinements happen for some of the laggard
architectures.
based upon a discussion florian
tested in snapshots for more than a week without any complaints
|
|
|
|
allocation service to allocate a block of memory below 16MB such that there
is no risk of overwriting it when the bootloader moves the kernel in place.
It removes the 128k limit that was previously there.
Based on an earlier diff by patrick@
ok mlarkin@
|
|
Separate out files used by both BIOS and EFI boot modes. These files
had many #ifdef EFIBOOT code paths that make it difficult to move forward
with changes needed to support random base VA linked kernels.
ok deraadt@
|
|
random data into the buffer that we feed the kernel.
ok deraadt@, mlarkin@
|
|
When reading a file from a non-TFTP device, clear the bootmac variable
to prevent the kernel from going into netboot mode.
This allows loading a kernel from a disk device after having booted
efiboot from PXE.
style tweak and ok kettenis@
|
|
memcpy() correct behaviour. This also brings the bcopy() macro into line.
|
|
|
|
|
|
have the serial io protocol. Fallback to direct inb/outb hardware access
in this case using code derived from arch/amd64/stand/libsa/bioscons.c
ok kettenis@
|
|
|
|
ok patrick@, naddy@
|
|
BOOTIA32.EFI works but BOOTX64.EFI unfortunately doesn't work yet.
ok patrick@
|
|
This fixes the problem that which prevents typing the passpharase for
softraid on boot. It happened at least with some external keyboards
on ThinkPad X2{6,8}0. diff from Frank Groeneveld
ok tb
|
|
|
|
Historically, the softraid crypto support in the boot loaders has only
given one attempt to provide the correct passphrase. There were a
few reasons for this, including the fact that pkcs5_pbkdf2() allows an
empty passphrase and that returning EPERM allowed for another attempt.
With the event of KARL and the need for bsd.booted with hibernate resumption,
this becomes much more of an issue - if you get the passphrase wrong you
fail to resume. There are also other situations like using /etc/boot.conf
to switch serial console, but an incorrect passphrase results in the config
not being read. Also, bcrypt_pbkdf() does not permit empty passphrases.
This reworks the softraid crypto support in the boot loaders so that it
loops requesting a valid passphrase until one is provided, or an empty
passphrase is entered (at which point it will abort).
ok mortimer@ tb@
|