diff options
author | simokawa <simokawa@FreeBSD.org> | 2004-10-24 12:37:47 +0000 |
---|---|---|
committer | simokawa <simokawa@FreeBSD.org> | 2004-10-24 12:37:47 +0000 |
commit | 5c26c7535f18d820b47a9dd84deae70c2410f3d8 (patch) | |
tree | 4b5cd95c1aac09eb2733fa38f8a61c4e6f211fa3 /sys/i386 | |
parent | aa5b2d082d8c051038f9b15ba1a1520db4d49c1b (diff) | |
download | FreeBSD-src-5c26c7535f18d820b47a9dd84deae70c2410f3d8.zip FreeBSD-src-5c26c7535f18d820b47a9dd84deae70c2410f3d8.tar.gz |
Preserve dcons(4) buffer passed by loader(8).
Diffstat (limited to 'sys/i386')
-rw-r--r-- | sys/i386/i386/machdep.c | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/sys/i386/i386/machdep.c b/sys/i386/i386/machdep.c index ae4dc22..e17dba5 100644 --- a/sys/i386/i386/machdep.c +++ b/sys/i386/i386/machdep.c @@ -1533,6 +1533,7 @@ getmemsize(int first) pt_entry_t *pte; char *cp; struct bios_smap *smap; + quad_t dcons_addr, dcons_size; hasbrokenint12 = 0; TUNABLE_INT_FETCH("hw.hasbrokenint12", &hasbrokenint12); @@ -1817,6 +1818,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. */ @@ -1835,6 +1843,14 @@ 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; |