diff options
author | YASUOKA Masahiko <yasuoka@cvs.openbsd.org> | 2015-09-02 04:09:25 +0000 |
---|---|---|
committer | YASUOKA Masahiko <yasuoka@cvs.openbsd.org> | 2015-09-02 04:09:25 +0000 |
commit | 25c065e3fb0f3cf72fd4ccd77fbb5f3b9bf41e5d (patch) | |
tree | 9300d5f16470a49c31de5f3c54ae45f6c4b97b38 /sys/arch/i386/stand/libsa/cmd_i386.c | |
parent | 493c06b693cc5008b2512212aa374ee840d0a565 (diff) |
Bring the boot changes on amd64 to i386. alloca is deleted.
Also fix the boot from BIOS and bump the version.
input and ok deraadt
Diffstat (limited to 'sys/arch/i386/stand/libsa/cmd_i386.c')
-rw-r--r-- | sys/arch/i386/stand/libsa/cmd_i386.c | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/sys/arch/i386/stand/libsa/cmd_i386.c b/sys/arch/i386/stand/libsa/cmd_i386.c index 57f19d6d595..ab098a67b71 100644 --- a/sys/arch/i386/stand/libsa/cmd_i386.c +++ b/sys/arch/i386/stand/libsa/cmd_i386.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cmd_i386.c,v 1.33 2013/10/23 05:05:19 mlarkin Exp $ */ +/* $OpenBSD: cmd_i386.c,v 1.34 2015/09/02 04:09:24 yasuoka Exp $ */ /* * Copyright (c) 1997-1999 Michael Shalayeff @@ -38,6 +38,9 @@ #include "libsa.h" #include <cmd.h> +#ifdef EFIBOOT +#include "efiboot.h" +#endif extern const char version[]; @@ -55,6 +58,11 @@ const struct cmd_table cmd_machine[] = { { "comaddr", CMDT_CMD, Xcomaddr }, { "diskinfo", CMDT_CMD, Xdiskinfo }, { "memory", CMDT_CMD, Xmemory }, +#ifdef EFIBOOT + { "video", CMDT_CMD, Xvideo_efi }, + { "exit", CMDT_CMD, Xexit_efi }, + { "poweroff", CMDT_CMD, Xpoweroff_efi }, +#endif #ifdef DEBUG { "regs", CMDT_CMD, Xregs }, #endif @@ -82,9 +90,12 @@ Xregs(void) int Xboot(void) { +#ifdef EFIBOOT + printf("Not supported yet\n"); +#else #ifndef _TEST int dev, part, st; - bios_diskinfo_t *bd = NULL; + struct diskinfo *dip; char buf[DEV_BSIZE], *dest = (void *)BOOTBIOS_ADDR; if (cmd.argc != 2) { @@ -117,8 +128,8 @@ Xboot(void) printf("[%x]\n", dev); /* Read boot sector from device */ - bd = bios_dklookup(dev); - st = biosd_io(F_READ, bd, 0, 1, buf); + dip = dklookup(dev); + st = dip->diskio(F_READ, dip, 0, 1, buf); if (st) goto bad; @@ -140,6 +151,7 @@ Xboot(void) bad: printf("Invalid device!\n"); #endif +#endif return 0; } |