diff options
author | simokawa <simokawa@FreeBSD.org> | 2004-10-28 12:18:22 +0000 |
---|---|---|
committer | simokawa <simokawa@FreeBSD.org> | 2004-10-28 12:18:22 +0000 |
commit | 8f7bf32c3425ea16db5bcd8d80ec43127389066c (patch) | |
tree | d7e774c044a977e14a2bc94af91a49deae22520b /sys/dev/dcons/dcons_os.c | |
parent | 59e7ed6ecd2c8b5f4220994a045ee1f4fcbe0e7f (diff) | |
download | FreeBSD-src-8f7bf32c3425ea16db5bcd8d80ec43127389066c.zip FreeBSD-src-8f7bf32c3425ea16db5bcd8d80ec43127389066c.tar.gz |
Use dcons buffer passed by loader on amd64.
Diffstat (limited to 'sys/dev/dcons/dcons_os.c')
-rw-r--r-- | sys/dev/dcons/dcons_os.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/sys/dev/dcons/dcons_os.c b/sys/dev/dcons/dcons_os.c index 498bf98..3bdbb69 100644 --- a/sys/dev/dcons/dcons_os.c +++ b/sys/dev/dcons/dcons_os.c @@ -488,7 +488,7 @@ dcons_cnputc(DEV dev, int c) static int dcons_drv_init(int stage) { -#ifdef __i386__ +#if defined(__i386__) || defined(__amd64__) quad_t addr, size; #endif @@ -503,9 +503,10 @@ dcons_drv_init(int stage) dg.buf = NULL; dg.size = DCONS_BUF_SIZE; -#ifdef __i386__ +#if defined(__i386__) || defined(__amd64__) if (getenv_quad("dcons.addr", &addr) > 0 && getenv_quad("dcons.size", &size) > 0) { +#ifdef __i386__ vm_paddr_t pa; /* * Allow read/write access to dcons buffer. @@ -513,6 +514,7 @@ dcons_drv_init(int stage) for (pa = trunc_page(addr); pa < addr + size; pa += PAGE_SIZE) *vtopte(KERNBASE + pa) |= PG_RW; invltlb(); +#endif /* XXX P to V */ dg.buf = (struct dcons_buf *)(vm_offset_t)(KERNBASE + addr); dg.size = size; |