summaryrefslogtreecommitdiffstats
path: root/sys/boot/i386/boot2/boot2.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/boot/i386/boot2/boot2.c')
-rw-r--r--sys/boot/i386/boot2/boot2.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/boot/i386/boot2/boot2.c b/sys/boot/i386/boot2/boot2.c
index 753f0b1..58f2175 100644
--- a/sys/boot/i386/boot2/boot2.c
+++ b/sys/boot/i386/boot2/boot2.c
@@ -24,6 +24,7 @@ __FBSDID("$FreeBSD$");
#include <machine/bootinfo.h>
#include <machine/elf.h>
+#include <machine/psl.h>
#include <stdarg.h>
@@ -83,8 +84,8 @@ __FBSDID("$FreeBSD$");
#define NDEV 3
#define MEM_BASE 0x12
#define MEM_EXT 0x15
-#define V86_CY(x) ((x) & 1)
-#define V86_ZR(x) ((x) & 0x40)
+#define V86_CY(x) ((x) & PSL_C)
+#define V86_ZR(x) ((x) & PSL_Z)
#define DRV_HARD 0x80
#define DRV_MASK 0x7f
@@ -237,6 +238,7 @@ main(void)
dmadat = (void *)(roundup2(__base + (int32_t)&_end, 0x10000) - __base);
v86.ctl = V86_FLAGS;
+ v86.efl = PSL_RESERVED_DEFAULT | PSL_I;
dsk.drive = *(uint8_t *)PTOV(ARGS);
dsk.type = dsk.drive & DRV_HARD ? TYPE_AD : TYPE_FD;
dsk.unit = dsk.drive & DRV_MASK;
OpenPOWER on IntegriCloud