Age | Commit message (Collapse) | Author |
|
file modified to use OpenFirmware routines:
``Make the freelist best fit code a tiny bit smarter to not use a block if
half or more would be wasted. Causes more effective re-use of blocks.''
Bump bootloader version in the unlikely case this misbehaves on some machines.
|
|
ok mglocker@
|
|
ok bluhm@ jca@
|
|
OK deraadt@ florian@ kn@
|
|
a stack protector (probably not even a -fstack-protector-strong) because
the bloat would render them unuseable. This also means the system
compiler can now take on any more it wants, and all the pieces which
can't use the stack protector are properly marked.
ok kettenis
|
|
All combos of no/CRYPTO softraid, old/new ofwboot, old/new kernel do boot.
OK stsp
|
|
ofwboot still passes an old/small .openbsd.bootdata size from before 6.7
when boothowto was added.
Report the exact size from now on such that a future diff can rectify
the corresponding check in autoconf.c:bootstrap().
All this was done to keep old/new bootloaders working with new/old kernels,
but 6.7 is long gone and we should all be running current code.
OK stsp
|
|
(get_long) and add missing {} in devsw[1] initialization.
Most from 2011 NetBSD commit by tsutui.
No functional change.
Build tested and ok kn@
|
|
|
|
|
|
error, i, p and poff. Fewer complaints from gcc -Wall.
The same was done to the NetBSD version in 2011 by tsutui.
Remove two more recent load_disklabel() comments implying that
search_label() checks MBR partitions. It doesn't and never has
despite the enticing names/types of the above unused variables.
No functional change.
|
|
|
|
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.
sparc64 ofwboot. Crank minor.
Tested on T4-2 guest domain with root on softraid.
|
|
ok deraadt@ miod@ krw@
|
|
is ELF" world. Eliminate use of them in amd64, arm64, armv7, i386,
macppc, mips64, and sparc64 code.
ok deraadt@ jca@ krw@
|
|
IEEE 1275 specification. This should fix booting on machines that would
fail with something like:
OF_map_phys(3fe44000,8192,fed58000,-1) failed
no space for symbol table
Program terminated
Based on a diff provided by Harald Gutch (hgutch@netbsd). Also see
NetBSD PR#56829.
There were (and still are) some questions about whether this diff breaks
the blade1.5k. However the failure in question might have been hardware
related and subsequent testing of the equivalent kernel diff (which
was just committed) was successful. So committing this in the hope it
sticks to ease testing.
ok miod@
|
|
Equivalent of sys/arch/arm64/stand/efiboot/softraid_arm64.c r1.4:
(commitid: Ka484R3swI5xSRWO) "Add softraid(4) RAID 1C boot support".
Tell the boot loader to decrypt 1C like C volumes and check the number of
disks in 1C like in 1C volumes -- no new code rquired.
Tested on T4-2 guest domains
"Looks reasonable" kettenis
OK stsp
NB: While kernel and boot loader support root on softraid on sparc64,
installboot(8) still needs a pending fix for installations on multi-chunk
softraid volumes. Until then, the usual installation process will fail on
1C volumes and requires manual fixup.
|
|
any attention for some time.
ok otto@ as part of larger diff
|
|
root on softraid on sparc64 currently requires explicitly passing the volume
name as part of the boot arguments, e.g.
boot-file=sr0
boot-file=sr0a:/bsd
or
{ok} boot my-devalias sr0:
(ofwboot always probes for softraid devices, assembles them but continues
to ignore such volumes unless specified.)
This is inconsistent with softraid support on other platforms and has
further drawbacks when it comes to sysupgrade logic.
Unless an explicit root disk was given, make ofwboot default to the softraid
volume on the boot device to make root on softraid work out of the box
without having to set variables or pass arguments in OpenBoot.
Eventually, ofwboot's disk discovery and softraid assembly machinery will be
fixed and boot-file won't be misused for softraid purposes anymore.
Remove the quirky softraid paragraph from boot_sparc64(8) now that it
is purely optional, expecting users from now on to either leave boot-file
empty or pass a kernel filename alone.
Tested on T4-2 guest domains with and without root on softraid.
Feedback claudio kettenis stsp
OK kettenis (previous diff)
OK stsp
|
|
With softraid, OBP's boot-file variable aka. bootline may contain the
sofraid volume name and kernel file name delimited by a double colon, e.g.
"sr0", "sr0a", "sr0:", "sr0a:", "sr0:/bsd" or "sr0a:/bsd".
ofwboot parses this string, may fill in optional partition number ("a")
and/or optional kernel file name ("/bsd") and always prints the fully
qualified string reconstructed from parts as "Booting <bootline>":
{0} ok boot my-devalias sr0
[...]
Boot device: /virtual-devices@100/channel-devices@200/disk@0 File and args: sr0
[...]
Booting sr0:a/bsd
[...]
{0} ok boot my-devalias sr0a:/bsd
[...]
Boot device: /virtual-devices@100/channel-devices@200/disk@0 File and args: sr0a:/bsd
[...]
Booting sr0:a/bsd
[...]
Swap partition and delimiter to fix the reconstructed string, making it
suitable for copy/paste:
Booting sr0a:/bsd
This has not been an issue since the reconstructed string is only printed
and not (re)used anywhere.
OK kettenis
|
|
writing to disk using the Open Firmware interfaces is buggy and causes
corruption of the disk. While it isn't entirely clear what versions
of Open Firmware are affected, but it seems to only affect IDE drives.
So if we detect an IDE drive, disable writing to it. This results in
a small lose of bootloader functionality (bsd.upgrade loop prevention
and flagging /etc/random.seed re-use) but that is better than losing
the ability to run OpenBSD at all.
Based on a diff by Ted Bullock (who did all the hard work of debugging
this and coming up with a viable fix).
ok deraadt@
|
|
"just do it" deraadt@
|
|
O_RDONLY rather using 0
ok beck
|
|
|
|
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@
|
|
Other platforms use libsa's ELFNAME(), e.g., elf64_exec() on amd64,
already to load the kernel's ELF section ".SUNW_ctf".
Adapt ofwboot accordingly to enable ddb(4) on sparc64 as well to utilise
CTF information for commands like "show struct".
Hints from mpi
OK kettenis mpi
|
|
(fchmod +T by bootcode, chmod 600 by /etc/rc). If the seed is reused, and
HWRNG isn't available, the kernel won't get RB_GOODSEED indication...
ok kettenis
|
|
operations where appropriate. Based on a diff from deraadt@
ok deraadt@
|
|
|
|
relax the fstat() check because the system will have left the file
in the right mode.
ok visa kettenis
|
|
sure that an old bootloader can boot a new kernel and a new bootloader
can still boot an old kernel some hackery is needed as old kernels check for
an exact size of the openbsd_bootdata struct.
tested (with softraid) by kn@
ok stsp@, deraadt@
|
|
can be called multiple times so nfsys needs to be initialized to 0 each time.
Note that the sparc64 bootblocks have no clue yet about ffs2 so this is not
the complete solution. ok kettenis@
|
|
From miod@
|
|
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
|
|
|
|
ok kettenis
|
|
OK kettenis@ deraadt@
|
|
build dependency which is required because of that. Add various include
files and some prototypes and change some code so that clang does not issue
warnings anymore.
OK kettenis@ deraadt@
|
|
|
|
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@
|
|
binding for the disk interface. For traditional SCSI is is simply a number;
i.e. the disk at target 0 is specified by @0. For SAS there are several
options but newer Oracle firmware no longer accepts the traditional SCSI
target specification. The best alternative is the PHY number and the disk
at PHY number 0 is specified by @p0. To determine which binding to use,
we look up the device_type of the parent. If that is "scsi-sas", use the
PHY number instead of the SCSI target.
Fixes booting from softraid on SPARC T3 and later.
ok claudio@, stsp@
|
|
handle open until a kernel has been loaded from the softraid volume.
This works around an apparent memory leak in the firmware on T5220
which fails to load an ldom guest kernel from softraid with a "Fast
Data Access MMU Miss" trap after many OF_open()/OF_close() calls.
This problem goes away when we call OF_open()/OF_close() just once
instead of for every block we want to read.
Crank ofwboot version to 1.10.
Make sure to keep working boot media around before upgrading!
Softraid boot of an T5220 ldom guest (CRYPTO), and a v240 (RAID 1),
have been tested and are known to work. Please report issues to bugs@.
ok kettenis@
|
|
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
|
|
|
|
Based on a diff from djm@
|
|
as discussed with jsing@ it's easier this way to ensure people have
bootblocks capable of loading the section
|
|
|
|
|
|
will allow us to bring in a MI softraid.{c,h} in lib/libsa.
|
|
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.
|