summaryrefslogtreecommitdiffstats
path: root/sys/boot/pc98
diff options
context:
space:
mode:
authorjhb <jhb@FreeBSD.org>2011-10-25 19:45:12 +0000
committerjhb <jhb@FreeBSD.org>2011-10-25 19:45:12 +0000
commit465469fc74999a15659ae97644b7fcd86a664cd5 (patch)
tree9833dc925193f64e764ad4b4a8923355e787b17b /sys/boot/pc98
parent332e83efa6d41a05f6d3c987ba946b36dce78ab0 (diff)
downloadFreeBSD-src-465469fc74999a15659ae97644b7fcd86a664cd5.zip
FreeBSD-src-465469fc74999a15659ae97644b7fcd86a664cd5.tar.gz
Consolidate duplicate definitions of V86_CY() and V86_ZR() which check for
the carry and zero flags being set, respectively, in <btxv86.h> and use them throughout the x86 boot code.
Diffstat (limited to 'sys/boot/pc98')
-rw-r--r--sys/boot/pc98/boot2/boot2.c3
-rw-r--r--sys/boot/pc98/btx/lib/btxv86.h4
-rw-r--r--sys/boot/pc98/libpc98/bioscd.c3
-rw-r--r--sys/boot/pc98/libpc98/vidconsole.c1
-rw-r--r--sys/boot/pc98/loader/main.c1
5 files changed, 5 insertions, 7 deletions
diff --git a/sys/boot/pc98/boot2/boot2.c b/sys/boot/pc98/boot2/boot2.c
index bb72c9d..2ef4da6 100644
--- a/sys/boot/pc98/boot2/boot2.c
+++ b/sys/boot/pc98/boot2/boot2.c
@@ -26,7 +26,6 @@ __FBSDID("$FreeBSD$");
#include <machine/bootinfo.h>
#include <machine/cpufunc.h>
#include <machine/elf.h>
-#include <machine/psl.h>
#include <stdarg.h>
@@ -85,8 +84,6 @@ __FBSDID("$FreeBSD$");
#define ARGS 0x900
#define NOPT 14
#define NDEV 3
-#define V86_CY(x) ((x) & PSL_C)
-#define V86_ZR(x) ((x) & PSL_Z)
#define DRV_DISK 0xf0
#define DRV_UNIT 0x0f
diff --git a/sys/boot/pc98/btx/lib/btxv86.h b/sys/boot/pc98/btx/lib/btxv86.h
index 1152f8b..27f6b34 100644
--- a/sys/boot/pc98/btx/lib/btxv86.h
+++ b/sys/boot/pc98/btx/lib/btxv86.h
@@ -21,6 +21,7 @@
#define _BTXV86_H_
#include <sys/types.h>
+#include <machine/psl.h>
#define V86_ADDR 0x10000 /* Segment:offset address */
#define V86_CALLF 0x20000 /* Emulate far call */
@@ -57,6 +58,9 @@ extern u_int32_t __args;
#define VTOPSEG(va) (u_int16_t)(VTOP((caddr_t)va) >> 4)
#define VTOPOFF(va) (u_int16_t)(VTOP((caddr_t)va) & 0xf)
+#define V86_CY(x) ((x) & PSL_C)
+#define V86_ZR(x) ((x) & PSL_Z)
+
void __exit(int) __attribute__((__noreturn__));
void __exec(caddr_t, ...);
diff --git a/sys/boot/pc98/libpc98/bioscd.c b/sys/boot/pc98/libpc98/bioscd.c
index 3e1ba71..e3df391 100644
--- a/sys/boot/pc98/libpc98/bioscd.c
+++ b/sys/boot/pc98/libpc98/bioscd.c
@@ -42,7 +42,6 @@ __FBSDID("$FreeBSD$");
#include <sys/param.h>
#include <machine/bootinfo.h>
-#include <machine/psl.h>
#include <stdarg.h>
@@ -325,7 +324,7 @@ bc_read(int unit, daddr_t dblk, int blks, caddr_t dest)
v86.ebp = VTOPOFF(xp);
v86.es = VTOPSEG(xp);
v86int();
- result = (v86.efl & PSL_C);
+ result = V86_CY(v86.efl);
if (result == 0)
break;
}
diff --git a/sys/boot/pc98/libpc98/vidconsole.c b/sys/boot/pc98/libpc98/vidconsole.c
index 19fb981..7cf81e8 100644
--- a/sys/boot/pc98/libpc98/vidconsole.c
+++ b/sys/boot/pc98/libpc98/vidconsole.c
@@ -33,7 +33,6 @@ __FBSDID("$FreeBSD$");
#include <stand.h>
#include <bootstrap.h>
#include <btxv86.h>
-#include <machine/psl.h>
#include <machine/cpufunc.h>
#include "libi386.h"
diff --git a/sys/boot/pc98/loader/main.c b/sys/boot/pc98/loader/main.c
index 391c5e9..15b132f 100644
--- a/sys/boot/pc98/loader/main.c
+++ b/sys/boot/pc98/loader/main.c
@@ -35,7 +35,6 @@ __FBSDID("$FreeBSD$");
#include <stand.h>
#include <string.h>
#include <machine/bootinfo.h>
-#include <machine/psl.h>
#include <sys/param.h>
#include <sys/reboot.h>
OpenPOWER on IntegriCloud