summaryrefslogtreecommitdiffstats
path: root/sys/pc98
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>2004-10-30 12:41:20 +0000
committernyan <nyan@FreeBSD.org>2004-10-30 12:41:20 +0000
commitae417ad6eff174e3deea727e7b5be16491f4cf7a (patch)
treeb017c285687f9e483c9c9a02df2246c8a1be362f /sys/pc98
parent073307841e72ac8e8f65000b448731f4ff24585a (diff)
downloadFreeBSD-src-ae417ad6eff174e3deea727e7b5be16491f4cf7a.zip
FreeBSD-src-ae417ad6eff174e3deea727e7b5be16491f4cf7a.tar.gz
MFi386: revision 1.599 (Preserve dcons(4) buffer passed by loader(8).)
Diffstat (limited to 'sys/pc98')
-rw-r--r--sys/pc98/i386/machdep.c18
-rw-r--r--sys/pc98/pc98/machdep.c18
2 files changed, 34 insertions, 2 deletions
diff --git a/sys/pc98/i386/machdep.c b/sys/pc98/i386/machdep.c
index 20cbd71..e13d506 100644
--- a/sys/pc98/i386/machdep.c
+++ b/sys/pc98/i386/machdep.c
@@ -1557,6 +1557,7 @@ getmemsize(int first)
char *cp;
struct bios_smap *smap;
#endif
+ quad_t dcons_addr, dcons_size;
#ifdef PC98
/* XXX - some of EPSON machines can't use PG_N */
@@ -1872,6 +1873,13 @@ physmap_done:
pte = CMAP1;
/*
+ * Get dcons buffer address
+ */
+ if (getenv_quad("dcons.addr", &dcons_addr) == 0 ||
+ getenv_quad("dcons.size", &dcons_size) == 0)
+ dcons_addr = 0;
+
+ /*
* physmap is in bytes, so when converting to page boundaries,
* round up the start address and round down the end address.
*/
@@ -1890,7 +1898,15 @@ physmap_done:
*/
if (pa >= KERNLOAD && pa < first)
continue;
-
+
+ /*
+ * block out dcons buffer
+ */
+ if (dcons_addr > 0
+ && pa >= trunc_page(dcons_addr)
+ && pa < dcons_addr + dcons_size)
+ continue;
+
page_bad = FALSE;
/*
diff --git a/sys/pc98/pc98/machdep.c b/sys/pc98/pc98/machdep.c
index 20cbd71..e13d506 100644
--- a/sys/pc98/pc98/machdep.c
+++ b/sys/pc98/pc98/machdep.c
@@ -1557,6 +1557,7 @@ getmemsize(int first)
char *cp;
struct bios_smap *smap;
#endif
+ quad_t dcons_addr, dcons_size;
#ifdef PC98
/* XXX - some of EPSON machines can't use PG_N */
@@ -1872,6 +1873,13 @@ physmap_done:
pte = CMAP1;
/*
+ * Get dcons buffer address
+ */
+ if (getenv_quad("dcons.addr", &dcons_addr) == 0 ||
+ getenv_quad("dcons.size", &dcons_size) == 0)
+ dcons_addr = 0;
+
+ /*
* physmap is in bytes, so when converting to page boundaries,
* round up the start address and round down the end address.
*/
@@ -1890,7 +1898,15 @@ physmap_done:
*/
if (pa >= KERNLOAD && pa < first)
continue;
-
+
+ /*
+ * block out dcons buffer
+ */
+ if (dcons_addr > 0
+ && pa >= trunc_page(dcons_addr)
+ && pa < dcons_addr + dcons_size)
+ continue;
+
page_bad = FALSE;
/*
OpenPOWER on IntegriCloud