Preserve dcons(4) buffer passed by loader(8).
This commit is contained in:
parent
aa5b2d082d
commit
5c26c7535f
@ -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);
|
||||
@ -1816,6 +1817,13 @@ physmap_done:
|
||||
phys_avail[pa_indx] = physmap[0];
|
||||
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;
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user