summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/stand
AgeCommit message (Collapse)Author
2024-06-30we don't need the NOBYFOUR space-savings option anymore, that codepathTheo de Raadt
was replaced a while ago. ok tb
2024-06-04Bump versions of boot media now capable of un-hibernating from non-DEV_BSIZEKenneth R Westerback
sectored media. Bump to common version (3.67) to indicate new MI capability. Reminded by deraadt@
2024-06-04Enable hibernate/resume to nvme(4) disks with 4096 byte sectors.Kenneth R Westerback
testing by florian@ mglocker@ mlarkin@ ok deraadt@ mglocker@ mlarkin@
2024-04-25Add boot.conf(8) 'mach idle [secs]' to halt at idle passphrase promptsKlemens Nanni
Enable users to power down their machines if there was no input after N seconds during disk descryption. Motivation is to save battery and prevent pocket heaters when notebooks unhibernate (e.g. lid accidentially opened) and sit at "Passphrase: ". Only available on efi(4) systems as the timeout is saved as EFI variable; mostly because that's trivial to do, but also because we lack a better mechanism to configure that and persist such data without the root disk. Discussed with many, starting at h2k23 OK Tests gnezdo
2024-04-14with empty body loops, put final semicolon on a new line for readabilityJonathan Gray
ok bluhm@ jca@
2023-10-26make efi_getdisklabel_cd9660() handle a block size of 512 and simplifyJonathan Gray
ok yasuoka@
2023-09-06revert disabling warnings for zlib on clang >= 15Jonathan Gray
no longer needed with zlib 1.3 ok tb@
2023-07-22BOOTARG_UCODE for AMDJonathan Gray
ok deraadt@
2023-05-30spellingJonathan Gray
ok jmc@ guenther@ tb@
2023-04-27Remove efi32 and efi64. These are leftovers from a project that didn't goMark Kettenis
very far and the presence of these directories just confuse people and make them do more work than necessary. ok patrick@, kn@, mlarkin@
2023-04-25Do not attempt to write to read-only softraidKlemens Nanni
Bootloaders have no write support for softraid volumes, which manifests in, e.g. /bsd.upgrade not being stripped of its 'x' permission bit to prevent sysupgrade loops in case of upgrade failure. Set a no-write flag handled by libsa to bail out early in write calls. There should be no real behaviour change, writes just fail earlier now. amd64 EFI bits, other architectues to come. Crank minor. "seems sensible" jsing
2023-04-25Do not attempt to write to read-only softraidKlemens Nanni
Bootloaders have no write support for softraid volumes, which manifests in, e.g. /bsd.upgrade not being stripped of its 'x' permission bit to prevent sysupgrade loops in case of upgrade failure. Set a no-write flag handled by libsa to bail out early in write calls. There should be no real behaviour change, writes just fail earlier now. amd64 BIOS bits first, rest to come. Crank minor. "seems sensible" jsing
2023-04-17The bootblocks are 32-bit binaries which use the ENTRY() macros which nowTheo de Raadt
include endbr64 macros. That's not going to work, so use the simple method of -Dendbr64= to remove them from the instruction stream. ok kettenis guenther
2023-02-23Remove dangerous user-settable "addr" variable from MI boot loader, andMiod Vallat
only compile tty-related code (stty command, tty variable) on platforms where it makes sense for the boot loader to control it, rather than the PROM/firmware/whatever.
2023-01-02Let the EFI bootloader make a copy of the EFI System Resource Table (ESRT)Mark Kettenis
and pass it to the kernel. ok jca@, patrick@
2022-12-30Actually hide the clang-15 workaround behind the COMPILER_VERSION checkJeremie Courreges-Anglas
COMPILER_VERSION initially missed. I'm not sure why we still have those COMPILER_VERSION checks in sys/arch/i386 and sys/arch/amd64, when the base system doesn't ship gcc any more, but let's stay consistent.
2022-12-30Neuter zlib fatal warnings when building kernels and bootloaders with clang 15Jeremie Courreges-Anglas
Disable -Wdeprecated-non-prototype instead of patching zlib. Upstream plans to drop the pre-ANSI syntax soon. ok tb@ millert@
2022-12-27Ansify pxe_netif_close() and {,pxe}socktodesc()Jeremie Courreges-Anglas
To appease the clang 15 warning -Wdeprecated-non-prototype (turned on by -Wall). ok millert@
2022-12-08_C_LABEL() and _ASM_LABEL() are no longer useful in the "everythingPhilip Guenther
is ELF" world. Eliminate use of them in amd64, arm64, armv7, i386, macppc, mips64, and sparc64 code. ok deraadt@ jca@ krw@
2022-09-02Adopt a terser specification of an MBR partition table ofKenneth R Westerback
64 zeros, suggested by miod@ a while ago. ok mlarkin@
2022-09-01Stop setting d_bbsize and d_sbsize. Nobody has paidKenneth R Westerback
any attention for some time. ok otto@ as part of larger diff
2022-08-31Whitespace fixes.Kenneth R Westerback
2022-08-31Remove "force CHS" remnants. LBA uber alles.Kenneth R Westerback
Mildly sad noises from Nick. ok miod@ mlarkin@
2022-08-17Mention support for booting off RAID 1CKlemens Nanni
2022-08-15drop detection code for 386sx/386dx CPUsDaniel Dickman
OpenBSD/i386 doesn't actually support running on 386sx or 386dx CPUs so we don't need to test whether we're running on one of these CPUs anymore. The 486 (which was launched in 1989) added a few new features over the 386: - an alignment check flag in EFLAGS - 3 new userland instructions: bswap / cmpxchg / xadd - 3 new kernel mode instructions: invd / wbinvd / invlpg - new bits in CR0 (386 CPUs did not support ring0 write protection) - new bits in CR3 In this diff, we remove the code that checks for the alignment check flag as we've only supported Pentium (or newer) CPUs for some time. The rest of the diff is about updating comments related to pre-486 CPUs. 2 files under arch/amd64 are updated to keep them in sync with the arch/i386 updates. ok mlarkin@, jsg@; tweak from miod@
2022-08-12Crank amd64 boot loader version numbers for softraid(4) RAID 1C boot support.Stefan Sperling
2022-08-12add support for booting from RAID 1C softraid(4) volumes on amd64Stefan Sperling
Only boot-loader changes are needed. Both installboot(8) and the kernel already do what is required to make this work. ok kn@ Tested: biosboot on vmm: kn, stsp biosboot and efiboot on server hardware: stsp
2022-07-11Switch bootloaders to the extended BOOTARG_CONSDEV struct.Mark Kettenis
Make the EFI bootloader provide the extra parameters that are necessary for using the non-standard UART on the AMD Ryzen Embedded V1000 SoCs. ok anton@
2022-06-30As we now have two bios_consdev_t structures, make use of the old oneAnton Lindqvist
until the bootstrap populates the new structure. Found the hard way by Hrvoje Popovski. ok kettenis@
2022-06-27zap extraneous .PpJason McIntyre
2022-06-27Delete the ancient "hold Shift key to force CHS" code. Noone has neededTheo de Raadt
this in decades. ok sthen krw
2022-06-20When there are multiple GOPs, try to select first one from which weYASUOKA Masahiko
can get a handle of DevicePath protocol if any, otherwise select first one. This is expected to workaround the garbled screen problem when booting with efiboot happened on some machines. origin diff from Alexei K.
2022-05-24fdisk(8) no longer uses the partition table it finds inKenneth R Westerback
/usr/mdec/mbr. Make the partition table all zeros and see if any hidden uses fall out. ok deraadt@
2022-03-31man pages: add missing commas between subordinate and main clausesChristian Weisgerber
jmc@ dislikes a comma before "then" in a conditional, so leave those untouched. ok jmc@
2022-03-29off-by-one check didn't recognize partition 'a' section on specifiedTheo de Raadt
disk, and would fall through to the active partition selection from crystal kolipe, ok miod krw
2022-01-02convension -> conventionJonathan Gray
2021-11-14Make sure efiboot is built with RELA/REL relocations and not RELR,Philip Guenther
as self_reloc.c only handles the former. ok deraadt@ kettenis@
2021-10-24#define open O_* flags in libsa/stand.h, so that bootblocks can useTheo de Raadt
O_RDONLY rather using 0 ok beck
2021-07-08sys/lib/libz isn't configured for lazy optimizations to save space becauseTheo de Raadt
those options are incompatible with the kernel anymore. Set DYNAMIC_CRC_TABLE and BUILDFIXED for these bootblocks, to save space on the media ok tb mlarkin
2021-06-25Move unused eficall.h files to the Attic.Kenneth R Westerback
2021-06-10Sync efid_io() with the recent improvements kettenis@ made toKenneth R Westerback
arm64 efid_io(). ok kettenis@
2021-06-08Replace hand rolled memory allocation in efid_io() withKenneth R Westerback
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@
2021-06-07"intrisic" -> "intrinsic" in a couple of comments.Kenneth R Westerback
2021-06-07Replace all uses of 'EFI_CALL(func, params)' withKenneth R Westerback
the expansion 'func(params)'. Allows upcoming removal of eficall.h.
2021-06-05this file includes sys/param.h, so does not need to redefine PAGE_MASKTheo de Raadt
2021-06-04Remove now unused eficall.S.Kenneth R Westerback
prodded by jsg@
2021-06-04yasuoka@ pointed out that amd64 clang now understandsKenneth R Westerback
'__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@
2021-06-02Use the same logic in all copies of gpt_chk_mbr(), relaxing theKenneth R Westerback
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@
2021-05-23Some machines (e.g. some Intel Macs) have a EFI memory map with more thanMark 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@
2021-03-17Always use an allocated buffer for {Read,Write}Blocks() to makeYASUOKA Masahiko
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