summaryrefslogtreecommitdiffstats
path: root/sys/boot/pc98/loader/main.c
diff options
context:
space:
mode:
authoravg <avg@FreeBSD.org>2012-05-11 09:46:17 +0000
committeravg <avg@FreeBSD.org>2012-05-11 09:46:17 +0000
commitebf7c38315d6fe686fa6989e6058de917733d2d2 (patch)
tree234a271ea6dfc261cad9fad14a175823bc62b986 /sys/boot/pc98/loader/main.c
parent9cc1a8ec50336e683ff9f6c42f1ffb762bcf85b9 (diff)
downloadFreeBSD-src-ebf7c38315d6fe686fa6989e6058de917733d2d2.zip
FreeBSD-src-ebf7c38315d6fe686fa6989e6058de917733d2d2.tar.gz
MFi386: improve argument passing via btxldr
use related definitions in i386 bootargs.h Reviewed by: nyan, jhb MFC after: 1 month
Diffstat (limited to 'sys/boot/pc98/loader/main.c')
-rw-r--r--sys/boot/pc98/loader/main.c18
1 files changed, 7 insertions, 11 deletions
diff --git a/sys/boot/pc98/loader/main.c b/sys/boot/pc98/loader/main.c
index 15b132f..27a8c97 100644
--- a/sys/boot/pc98/loader/main.c
+++ b/sys/boot/pc98/loader/main.c
@@ -33,29 +33,25 @@ __FBSDID("$FreeBSD$");
*/
#include <stand.h>
+#include <stddef.h>
#include <string.h>
#include <machine/bootinfo.h>
#include <sys/param.h>
#include <sys/reboot.h>
#include "bootstrap.h"
+#include "common/bootargs.h"
#include "libi386/libi386.h"
#include "libpc98/libpc98.h"
#include "btxv86.h"
-#define KARGS_FLAGS_CD 0x1
-#define KARGS_FLAGS_PXE 0x2
+CTASSERT(sizeof(struct bootargs) == BOOTARGS_SIZE);
+CTASSERT(offsetof(struct bootargs, bootinfo) == BA_BOOTINFO);
+CTASSERT(offsetof(struct bootargs, bootflags) == BA_BOOTFLAGS);
+CTASSERT(offsetof(struct bootinfo, bi_size) == BI_SIZE);
/* Arguments passed in from the boot1/boot2 loader */
-static struct
-{
- u_int32_t howto;
- u_int32_t bootdev;
- u_int32_t bootflags;
- u_int32_t pxeinfo;
- u_int32_t res2;
- u_int32_t bootinfo;
-} *kargs;
+static struct bootargs *kargs;
static u_int32_t initial_howto;
static u_int32_t initial_bootdev;
OpenPOWER on IntegriCloud