summaryrefslogtreecommitdiff
path: root/sys/arch/amd64/stand
AgeCommit message (Collapse)Author
2017-01-05Fix boot(8) crashing on some amd64 machines when booting from softraid crypto.Stefan Sperling
Allocate a 4k temp buffer on the heap instead of the stack. Problem was introduced in arch/amd64/stand/libsa/softraid_amd64.c r1.3. Reported by Andreas Bartelt on bugs@ ok krw@ kettenis@ yasuoka@
2016-12-30Fix EFI_CALL() to pass the arguments properly when number of arguments is 0.YASUOKA Masahiko
From pulse.purge at gmail.com
2016-12-24Make the boot programs support booting from softraid on 4K byte sectorYASUOKA Masahiko
disks. test gonzalo ok tom krw jsing
2016-12-24The unit of the parition offset in disklabel is number of sectors in theYASUOKA Masahiko
sector size, not in 512 byte blocks. tested by gonzalo.
2016-12-23Convert the sector number in the patition table to the sector numberYASUOKA Masahiko
in 512 byte blocks. This fixes efiboot to read disklabel on 4K sector size disk properly. tested by gonzalo@
2016-12-23The efi disk i/o to read sectors properly when the sector size is notYASUOKA Masahiko
512. The problem actually had happened on macbookair7,1. reported and tested by gonzalo@.
2016-11-06Do not create machine@ symlinks in obj as root during includes:, butTheo Buehler
defer their creation to later, so that they are owned by BUILDUSER. This eliminates the last root-owned files in obj/ from 'make build'. In addition, place a MACHINE == hppa test in hppa/stand/Makefile.inc to avoid creating bogus symlinks on all other archs. joint work with & ok natano, "let's try it" deraadt
2016-09-18Bump boot loader versions due to bcrypt pbkdf support.Joel Sing
2016-09-18Add bcrypt pbkdf support to the softraid crypto boot loader code.Joel Sing
Based on a diff from djm@
2016-09-18Fix a bug in the bounce buffer handling of BIOS disk I/O.Joel Sing
Currently, if a buffer crosses a 64KB boundary, a bounce buffer is allocated, however it is assumed that this new buffer does not cross the 64KB boundary. In the case of i386 fdboot, it just so happens that (due to the size of fdboot and heap allocations) UFS gets allocated a 4KB buffer that crosses a 64KB boundary, then biosd_io() allocates a bounce buffer, which also crosses a 64KB boundary. At this point the BIOS gets grumpy and refuses to read from the disk. Further clean up to come from tom@.
2016-09-13crank bootloader version after .SUNW_ctf changeJasper Lievisse Adriaanse
as discussed with jsing@ it's easier this way to ensure people have bootblocks capable of loading the section
2016-09-11Switch amd64 to libsa MI softraid.Joel Sing
2016-09-11Update header guards.Joel Sing
2016-09-11Rename softraid boot files, which are currently in an MD location. ThisJoel Sing
will allow us to bring in a MI softraid.{c,h} in lib/libsa.
2016-09-10Clean up some softraid crypto code - rename struct sr_crypto_kdf_pbkdf2 toJoel Sing
sr_crypto_pbkdf (since it is useable for more than just pkcs5_pbkdf2) and embed a struct sr_crypto_genkdf within it, rather than redeclaring the same fields. Rename SR_CRYPTOKDFT_PBKDF2 to SR_CRYPTOKDFT_PCKS5_PBKDF2 and add SR_CRYPTOKDFT_BCRYPT_PBKDF for upcoming changes.
2016-09-10Rename libsa pbkdf2.c to pkcs5_pbkdf2.c so that we match libutil.Joel Sing
2016-08-31Enable cd9660 in efiboot.YASUOKA Masahiko
2016-08-30Use MaxMode to terminate the mode iteration. Actually the old wayYASUOKA Masahiko
couldn't interate the ConsOut modes properly on qemu. input NONAKA Kimihiro
2016-07-30Prep for relro: make sure it's off for any non-PIE stand/ programPhilip Guenther
ok millert@ kettenis@
2016-07-04DEBUGLIBS has been broken since the gcc4 switch, so delete it. CFLAGSPhilip Guenther
contains -g by default anyway problem noted by Edgar Pettijohn (edgar (at) pettijohn-web.com) ok millert@ kettenis@ deraadt@
2016-06-10fix some typos in commentsJoshua Stein
from Tom Cosgrove
2016-05-28crank version numbers of those bootloaders that have been changed byStuart Henderson
the com_init fix. ok beck deraadt
2016-05-27Modify com_init to match the com driver initializaiton, and addBob Beck
a short delay so that baud rate changes on the console have a chance of working. Lots of help from theo on this one. Makes my serial console on my APU work for an unattended reboot instead of hanging when garbage is echoed to the tty. ok deraadt@
2016-05-15Give the 32-bit and 64-bit EFI boatloaders different names such that we canMark Kettenis
tell which one we're using. ok deraadt@, krw@
2016-05-11Move EFI header files to a location where they can be used on otherMark Kettenis
architectures besides amd64. ok deraadt@, krw@
2016-05-06Fix efiboot not to hang with a disk whose block size < 512.YASUOKA Masahiko
Report and diff from Vegar Linge Haaland ok krw
2016-05-01Shuffle gpt/mbr code around a bit to make it more like other searchesKenneth R Westerback
for the disklabel. Tweak a few comments to make it more clear what is happening. No intentional functional change. ok yasuoka@
2016-04-23Seems that the 32-bit Windows ABI does align 64-bit structure members onMark Kettenis
a 64-bit boundary (in constrast to the System V i386 ABI). Use an alignment attribute to force 64-bit alignment of the INT64 and UINT64 types. This makes the definitions of the EFI data structures match the expectations of the firmware. Fixes the issue where the 32-bit UEFI bootloader (BOOTIA32.EFI) would not detect a GPT leading to a failure to boot. Cluestick from John Troy. ok krw@, yasuoka@
2016-03-30some Xr adjustment to catch up with MLINKS removal;Jason McIntyre
2016-03-30for some time now mandoc has not required MLINKS to functionJason McIntyre
correctly - logically complete that now by removing MLINKS from base; authors need only to ensure there is an entry in NAME for any function/ util being added. MLINKS will still work, and remain for perl to ease upgrades; ok nicm (curses) bcook (ssl) ok schwarze, who provided a lot of feedback and assistance ok tb natano jung
2016-03-14Change a bunch of (<blah> *)0 to NULL.Kenneth R Westerback
ok beck@ deraadt@
2016-03-06Sync no-argument function declaration and definition by adding (void).Christian Weisgerber
ok kettenis@ mpi@
2016-02-19belatedly bump bootstrap version after mdrandom() changes; ok deraadt@Christian Weisgerber
2016-02-12Remove the "GenuineIntel" check from x86 mdrandom(). Checking theChristian Weisgerber
CPU features is enough, and this enables the use of RDRAND and the TSC fallback on CPUs from other vendors, notably AMD. Tested in snapshots for a month.
2016-02-04Some (buggy) UEFI implementations don't report the correct framebufferMark Kettenis
parameters unless SetMode() has been called, even if we don't actually change the mode. Other (equally buggy) UEFI implementations report an error if we call SetMode() but don't actually change the mode. Work around these issues by always calling SetMode() (like we did before rev 1.10), but don't report an error if the current mode is the same as the desired mode. ok yasuoka@
2016-01-19Correct the definitions of currently unused protocol guids so they willJonathan Gray
work as EFI_GUID initialisers. ok yasuoka@ krw@
2016-01-12naddy observed the TSC fallback code could encounter (high word) %edxTheo de Raadt
being 0; after multiply there is no perturbance to the from-disk entropy buffer. Further investigation showed perturbance was biased towards the lower bytes of a word. Compensate for this with a hocus pocus bit-spreading operation which applies a result byte by byte. discussion with kettenis, tb, mlarkin, naddy ok naddy
2016-01-10match up code and comments, add missing $OpenBSD$; ok jsing@ a while agoChristian Weisgerber
2016-01-06We want the first, not the last, OpenBSD partition in the MBR.Kenneth R Westerback
2016-01-06Bring efidev.c goodness into softraid.c by returning and displayingKenneth R Westerback
the same error messages on GPT processing failures. Add a message about failed GPT entry checksum error to both. This was inadvertantly deleted in the switch to one entry at a time processing. tweaks & ok yasuoka@ jsing@
2016-01-04Remove parameter name from gpt_chk_mbr() prototype and add prototypeKenneth R Westerback
for findopenbsd_gpt().
2016-01-03Don't need two 16K static buffers to checksum the GPT entries and find theKenneth R Westerback
OpenBSD partition. Just one 128-byte stack copy of a single entry. Problems with EFI installs involving many disks reported by and fix tested by Thomas Bohl. Stefan Kempf pointed finger of suspicion at the addition of the 2nd 16K static buffer for softraid GPT and suggested/reviewed several versions of the diff. Tweaked and ok jsing@
2015-12-24If the GPT header checksum check fails, do *not* say the OpenBSD partitionKenneth R Westerback
starts at sector 1. Instead return -1, as for all other failures during the header check.
2015-12-24Make all instances of gpt_chk_mbr() identical (bar static vsKenneth R Westerback
non-static) by passing disk size as 2nd parameter instead of the different structures holding the disk size info. The fifth copy of gpt_chk_mbr() in fdisk is a little specialer. No functional change.
2015-12-24Add prototype for gpt_chk_mbr() to i386_installboot.c. Add 'static' toKenneth R Westerback
declarations of gpt_chk_mbr() to match prototypes in efidev.c and softraid.c.
2015-12-24Argh. The other part the wrong diff was missing.Kenneth R Westerback
Use the size info in struct sr_boot_volume, and not the uninitialized info in the disklabel, when checking the GPT protective MBR. Now both GPT and MBR formatted softraid volumes actually boot. As a bonus add prototype for gpt_chk_mbr().
2015-12-23Ooops. Wrong version of the diff committed, with reversed check forKenneth R Westerback
MBR/GPT. Problem found the hard way by Glenn Faustino on tech@
2015-12-22Find OpenBSD disklabel on GPT partitioned softraid volumes. Now you canKenneth R Westerback
boot from such volumes to match being able to install to them. Problem spotted by jcs@, fix tested by rpe@, ok jsing@
2015-12-11comment typommcc
2015-12-02Add a padding in EFI_MEMORY_DESCRIPTOR to align fields properly on ia32.YASUOKA Masahiko