diff options
author | Tom Cosgrove <tom@cvs.openbsd.org> | 2007-07-27 17:48:02 +0000 |
---|---|---|
committer | Tom Cosgrove <tom@cvs.openbsd.org> | 2007-07-27 17:48:02 +0000 |
commit | 1fb587ee8bee3d7edfc065af8ee2796fc2d9962c (patch) | |
tree | 873a6e33902128d5942be68fd4673e67acc3e4fe /sys/arch/amd64/stand/libsa/exec_i386.c | |
parent | 30515f6f19fa739a4b0f706aa4baa76c87996f5d (diff) |
As on i386:
We don't want to pass the PXE MAC address to the kernel when booting
from a local disk, since the MAC address causes the kernel to look for
root on NFS. Do this by remembering (not adding to boot arguments) the
MAC address when opening the PXE device, and clearing this if we happen
to load a file off a non-network disk.
"works as advertised for me" todd@;
"stop sitting on this/no objections" deraadt@;
amd64 code mainly written by patch(1).
Diffstat (limited to 'sys/arch/amd64/stand/libsa/exec_i386.c')
-rw-r--r-- | sys/arch/amd64/stand/libsa/exec_i386.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/sys/arch/amd64/stand/libsa/exec_i386.c b/sys/arch/amd64/stand/libsa/exec_i386.c index f5559048a01..d05fb66b3db 100644 --- a/sys/arch/amd64/stand/libsa/exec_i386.c +++ b/sys/arch/amd64/stand/libsa/exec_i386.c @@ -1,4 +1,4 @@ -/* $OpenBSD: exec_i386.c,v 1.4 2004/03/21 21:37:41 tom Exp $ */ +/* $OpenBSD: exec_i386.c,v 1.5 2007/07/27 17:48:01 tom Exp $ */ /* * Copyright (c) 1997-1998 Michael Shalayeff @@ -40,6 +40,8 @@ typedef void (*startfuncp)(int, int, int, int, int, int, int, int) __attribute__ ((noreturn)); +char *bootmac = NULL; + void run_loadfile(u_long *marks, int howto) { @@ -60,6 +62,9 @@ run_loadfile(u_long *marks, int howto) cd.conspeed = com_speed; addbootarg(BOOTARG_CONSDEV, sizeof(cd), &cd); + if (bootmac != NULL) + addbootarg(BOOTARG_BOOTMAC, sizeof(bios_bootmac_t), bootmac); + /* Pass memory map to the kernel */ mem_pass(); |