History log of /openbsd-current/sys/arch/amd64/stand/libsa/dev_i386.c
Revision (<<< Hide revision tags) (Show revision tags >>>) Date Author Comments
# 1.23 10-May-2019 mlarkin

Disentangle #ifdef EFIBOOT.

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@


# 1.22 25-Apr-2019 naddy

Add a check to tftp_open() that we are actually opening a TFTP device.

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@


Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.21 25-Nov-2017 patrick

Implement network boot support in efiboot(8). This changes efiboot(8)
to recognize if it has been booted via PXE. The new TFTP file system
layer will then use the matching PXE base code protocol handle to load
the files. Since this uses the PXE base code protocol for abstraction
instead of the raw Simple Network protocol this will at this point not
work on u-boot based machines as needed on ARM.

Feedback and ok tom@
Also tested by afresh1@


Revision tags: OPENBSD_6_2_BASE
# 1.20 31-May-2017 yasuoka

Add serial console support for efiboot.


Revision tags: OPENBSD_6_1_BASE
# 1.19 01-Mar-2017 patrick

Don't try to access the com(4) hardware to set up the console speed
on efiboot(8), as it can crash the EFI application.

ok tom@


# 1.18 11-Sep-2016 jsing

Switch amd64 to libsa MI softraid.


# 1.17 11-Sep-2016 jsing

Rename softraid boot files, which are currently in an MD location. This
will allow us to bring in a MI softraid.{c,h} in lib/libsa.


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.16 18-Sep-2015 miod

Remove support for building the boot blocks with DEBUGFLAGS=-D_TEST, which is
supposed to create a userland binary in order to test non-boot related
functionality. This feature has been bitrotting in a non-compiling state
for years, and causes a too-many-ifdefs disease now that there are intrusive
EFI changes.

No functional change.


Revision tags: OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.15 13-Jul-2014 jasper

move putchar() into libsa

"sure" miod@


# 1.14 12-Jul-2014 jasper

move getchar() into libsa where applicable

ok miod@


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE
# 1.13 30-Oct-2012 jsing

Apply a bunch of style(9) and whitespace fixes to i386/amd64 libsa, making
the code actually diffable. No binary change.


# 1.12 27-Oct-2012 jsing

Move the code for softraid boot into separate files, leaving only minimal
hooks that are called from the normal code path. This allows softraid boot
support to be completely enabled or disabled at compile time. For boot(8)
all softraid boot support is now enabled by default, including support for
booting from crypto volumes. Disable softraid boot support for fdboot,
which further shrinks the binary.


# 1.11 08-Oct-2012 jsing

If we have booted from a disk that is a member of a bootable softraid
volume, always select the srX device unless the 'a' partition of the disk
is FFS.


Revision tags: OPENBSD_5_2_BASE
# 1.10 19-Mar-2012 jsing

Only change the default boot device to a bootable softraid volume, if we
are able to handle the given discipline. At this stage amd64 boot(8) is
limited to RAID 1. This makes life easier for users who are booting from
a softraid crypto volume, but are loading a kernel from hd0a:/bsd.

Tested by jrick@devio.us - thanks!


Revision tags: OPENBSD_5_1_BASE
# 1.9 11-Jan-2012 jsing

Teach OpenBSD/amd64 boot(8) how to access softraid(8) volumes. This
allows a kernel to be loaded from a softraid RAID 1 volume. Furthermore,
if you boot from a disk that is a member of a bootable softraid volume
then it will default to booting from the softraid volume (sr[0-9]a:/bsd).

Discussed with deraadt@


Revision tags: OPENBSD_5_0_BASE
# 1.8 26-Jun-2011 tedu

kill mcd dead. ok krw matthew millert thib


# 1.7 26-Jun-2011 tedu

remove remnants of scd device, discovered by Frederic Perrin


Revision tags: OPENBSD_4_9_BASE
# 1.6 06-Dec-2010 jasper

- properly remove NENTS now after fixing the fallout.

ok deraadt@


# 1.5 06-Dec-2010 jasper

- partially revert previous NENTS removal for arches which got busted.


# 1.4 06-Dec-2010 jasper

- drop NENTS(), which was yet another copy of nitems().
no binary change


ok deraadt@


Revision tags: OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE
# 1.3 27-Jun-2007 mk

wt(4) was removed a while ago, so don't support booting off it anoymore.

i386/amd64 was ok tom
zaurus ok drahn


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE
# 1.2 21-Aug-2004 tom

Enter cdboot, a CD-specific second-stage bootrap. Based on the i386
cdboot that Toby and I put together at the hackathon.

"go for it" deraadt@


Revision tags: OPENBSD_3_5_BASE SMP_SYNC_A SMP_SYNC_B
# 1.1 03-Feb-2004 mickey

das boot; das cloned das from das i386


# 1.22 25-Apr-2019 naddy

Add a check to tftp_open() that we are actually opening a TFTP device.

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@


Revision tags: OPENBSD_6_3_BASE OPENBSD_6_4_BASE OPENBSD_6_5_BASE
# 1.21 25-Nov-2017 patrick

Implement network boot support in efiboot(8). This changes efiboot(8)
to recognize if it has been booted via PXE. The new TFTP file system
layer will then use the matching PXE base code protocol handle to load
the files. Since this uses the PXE base code protocol for abstraction
instead of the raw Simple Network protocol this will at this point not
work on u-boot based machines as needed on ARM.

Feedback and ok tom@
Also tested by afresh1@


Revision tags: OPENBSD_6_2_BASE
# 1.20 31-May-2017 yasuoka

Add serial console support for efiboot.


Revision tags: OPENBSD_6_1_BASE
# 1.19 01-Mar-2017 patrick

Don't try to access the com(4) hardware to set up the console speed
on efiboot(8), as it can crash the EFI application.

ok tom@


# 1.18 11-Sep-2016 jsing

Switch amd64 to libsa MI softraid.


# 1.17 11-Sep-2016 jsing

Rename softraid boot files, which are currently in an MD location. This
will allow us to bring in a MI softraid.{c,h} in lib/libsa.


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.16 18-Sep-2015 miod

Remove support for building the boot blocks with DEBUGFLAGS=-D_TEST, which is
supposed to create a userland binary in order to test non-boot related
functionality. This feature has been bitrotting in a non-compiling state
for years, and causes a too-many-ifdefs disease now that there are intrusive
EFI changes.

No functional change.


Revision tags: OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.15 13-Jul-2014 jasper

move putchar() into libsa

"sure" miod@


# 1.14 12-Jul-2014 jasper

move getchar() into libsa where applicable

ok miod@


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE
# 1.13 30-Oct-2012 jsing

Apply a bunch of style(9) and whitespace fixes to i386/amd64 libsa, making
the code actually diffable. No binary change.


# 1.12 27-Oct-2012 jsing

Move the code for softraid boot into separate files, leaving only minimal
hooks that are called from the normal code path. This allows softraid boot
support to be completely enabled or disabled at compile time. For boot(8)
all softraid boot support is now enabled by default, including support for
booting from crypto volumes. Disable softraid boot support for fdboot,
which further shrinks the binary.


# 1.11 08-Oct-2012 jsing

If we have booted from a disk that is a member of a bootable softraid
volume, always select the srX device unless the 'a' partition of the disk
is FFS.


Revision tags: OPENBSD_5_2_BASE
# 1.10 19-Mar-2012 jsing

Only change the default boot device to a bootable softraid volume, if we
are able to handle the given discipline. At this stage amd64 boot(8) is
limited to RAID 1. This makes life easier for users who are booting from
a softraid crypto volume, but are loading a kernel from hd0a:/bsd.

Tested by jrick@devio.us - thanks!


Revision tags: OPENBSD_5_1_BASE
# 1.9 11-Jan-2012 jsing

Teach OpenBSD/amd64 boot(8) how to access softraid(8) volumes. This
allows a kernel to be loaded from a softraid RAID 1 volume. Furthermore,
if you boot from a disk that is a member of a bootable softraid volume
then it will default to booting from the softraid volume (sr[0-9]a:/bsd).

Discussed with deraadt@


Revision tags: OPENBSD_5_0_BASE
# 1.8 26-Jun-2011 tedu

kill mcd dead. ok krw matthew millert thib


# 1.7 26-Jun-2011 tedu

remove remnants of scd device, discovered by Frederic Perrin


Revision tags: OPENBSD_4_9_BASE
# 1.6 06-Dec-2010 jasper

- properly remove NENTS now after fixing the fallout.

ok deraadt@


# 1.5 06-Dec-2010 jasper

- partially revert previous NENTS removal for arches which got busted.


# 1.4 06-Dec-2010 jasper

- drop NENTS(), which was yet another copy of nitems().
no binary change


ok deraadt@


Revision tags: OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE
# 1.3 27-Jun-2007 mk

wt(4) was removed a while ago, so don't support booting off it anoymore.

i386/amd64 was ok tom
zaurus ok drahn


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE
# 1.2 21-Aug-2004 tom

Enter cdboot, a CD-specific second-stage bootrap. Based on the i386
cdboot that Toby and I put together at the hackathon.

"go for it" deraadt@


Revision tags: OPENBSD_3_5_BASE SMP_SYNC_A SMP_SYNC_B
# 1.1 03-Feb-2004 mickey

das boot; das cloned das from das i386


# 1.21 25-Nov-2017 patrick

Implement network boot support in efiboot(8). This changes efiboot(8)
to recognize if it has been booted via PXE. The new TFTP file system
layer will then use the matching PXE base code protocol handle to load
the files. Since this uses the PXE base code protocol for abstraction
instead of the raw Simple Network protocol this will at this point not
work on u-boot based machines as needed on ARM.

Feedback and ok tom@
Also tested by afresh1@


Revision tags: OPENBSD_6_2_BASE
# 1.20 31-May-2017 yasuoka

Add serial console support for efiboot.


Revision tags: OPENBSD_6_1_BASE
# 1.19 01-Mar-2017 patrick

Don't try to access the com(4) hardware to set up the console speed
on efiboot(8), as it can crash the EFI application.

ok tom@


# 1.18 11-Sep-2016 jsing

Switch amd64 to libsa MI softraid.


# 1.17 11-Sep-2016 jsing

Rename softraid boot files, which are currently in an MD location. This
will allow us to bring in a MI softraid.{c,h} in lib/libsa.


Revision tags: OPENBSD_5_9_BASE OPENBSD_6_0_BASE
# 1.16 18-Sep-2015 miod

Remove support for building the boot blocks with DEBUGFLAGS=-D_TEST, which is
supposed to create a userland binary in order to test non-boot related
functionality. This feature has been bitrotting in a non-compiling state
for years, and causes a too-many-ifdefs disease now that there are intrusive
EFI changes.

No functional change.


Revision tags: OPENBSD_5_6_BASE OPENBSD_5_7_BASE OPENBSD_5_8_BASE
# 1.15 13-Jul-2014 jasper

move putchar() into libsa

"sure" miod@


# 1.14 12-Jul-2014 jasper

move getchar() into libsa where applicable

ok miod@


Revision tags: OPENBSD_5_3_BASE OPENBSD_5_4_BASE OPENBSD_5_5_BASE
# 1.13 30-Oct-2012 jsing

Apply a bunch of style(9) and whitespace fixes to i386/amd64 libsa, making
the code actually diffable. No binary change.


# 1.12 27-Oct-2012 jsing

Move the code for softraid boot into separate files, leaving only minimal
hooks that are called from the normal code path. This allows softraid boot
support to be completely enabled or disabled at compile time. For boot(8)
all softraid boot support is now enabled by default, including support for
booting from crypto volumes. Disable softraid boot support for fdboot,
which further shrinks the binary.


# 1.11 08-Oct-2012 jsing

If we have booted from a disk that is a member of a bootable softraid
volume, always select the srX device unless the 'a' partition of the disk
is FFS.


Revision tags: OPENBSD_5_2_BASE
# 1.10 19-Mar-2012 jsing

Only change the default boot device to a bootable softraid volume, if we
are able to handle the given discipline. At this stage amd64 boot(8) is
limited to RAID 1. This makes life easier for users who are booting from
a softraid crypto volume, but are loading a kernel from hd0a:/bsd.

Tested by jrick@devio.us - thanks!


Revision tags: OPENBSD_5_1_BASE
# 1.9 11-Jan-2012 jsing

Teach OpenBSD/amd64 boot(8) how to access softraid(8) volumes. This
allows a kernel to be loaded from a softraid RAID 1 volume. Furthermore,
if you boot from a disk that is a member of a bootable softraid volume
then it will default to booting from the softraid volume (sr[0-9]a:/bsd).

Discussed with deraadt@


Revision tags: OPENBSD_5_0_BASE
# 1.8 26-Jun-2011 tedu

kill mcd dead. ok krw matthew millert thib


# 1.7 26-Jun-2011 tedu

remove remnants of scd device, discovered by Frederic Perrin


Revision tags: OPENBSD_4_9_BASE
# 1.6 06-Dec-2010 jasper

- properly remove NENTS now after fixing the fallout.

ok deraadt@


# 1.5 06-Dec-2010 jasper

- partially revert previous NENTS removal for arches which got busted.


# 1.4 06-Dec-2010 jasper

- drop NENTS(), which was yet another copy of nitems().
no binary change


ok deraadt@


Revision tags: OPENBSD_4_2_BASE OPENBSD_4_3_BASE OPENBSD_4_4_BASE OPENBSD_4_5_BASE OPENBSD_4_6_BASE OPENBSD_4_7_BASE OPENBSD_4_8_BASE
# 1.3 27-Jun-2007 mk

wt(4) was removed a while ago, so don't support booting off it anoymore.

i386/amd64 was ok tom
zaurus ok drahn


Revision tags: OPENBSD_3_6_BASE OPENBSD_3_7_BASE OPENBSD_3_8_BASE OPENBSD_3_9_BASE OPENBSD_4_0_BASE OPENBSD_4_1_BASE
# 1.2 21-Aug-2004 tom

Enter cdboot, a CD-specific second-stage bootrap. Based on the i386
cdboot that Toby and I put together at the hackathon.

"go for it" deraadt@


Revision tags: OPENBSD_3_5_BASE SMP_SYNC_A SMP_SYNC_B
# 1.1 03-Feb-2004 mickey

das boot; das cloned das from das i386