diff options
author | marcel <marcel@FreeBSD.org> | 2004-12-08 05:46:54 +0000 |
---|---|---|
committer | marcel <marcel@FreeBSD.org> | 2004-12-08 05:46:54 +0000 |
commit | f005fa80bc6d148affdb486e6534c16566455f7d (patch) | |
tree | 954f155b95562af6f60e8d1d37a3510e25606a64 | |
parent | 2c929f635e2ee240aed007e68c7125eeb4f0426f (diff) | |
download | FreeBSD-src-f005fa80bc6d148affdb486e6534c16566455f7d.zip FreeBSD-src-f005fa80bc6d148affdb486e6534c16566455f7d.tar.gz |
Don't obtain the HCDP address directly from the bootinfo structure.
Use a function to keep the details at arms length from uart(4).
-rw-r--r-- | sys/dev/uart/uart_cpu_ia64.c | 8 | ||||
-rw-r--r-- | sys/ia64/ia64/machdep.c | 7 | ||||
-rw-r--r-- | sys/ia64/include/md_var.h | 1 |
3 files changed, 13 insertions, 3 deletions
diff --git a/sys/dev/uart/uart_cpu_ia64.c b/sys/dev/uart/uart_cpu_ia64.c index 6c3f380..74a9300 100644 --- a/sys/dev/uart/uart_cpu_ia64.c +++ b/sys/dev/uart/uart_cpu_ia64.c @@ -31,9 +31,9 @@ __FBSDID("$FreeBSD$"); #include <sys/systm.h> #include <sys/bus.h> -#include <machine/bootinfo.h> #include <machine/bus.h> #include <machine/dig64.h> +#include <machine/md_var.h> #include <machine/vmparam.h> #include <dev/uart/uart.h> @@ -60,13 +60,15 @@ uart_cpu_getdev(int devtype, struct uart_devinfo *di) struct dig64_hcdp_table *tbl; struct dig64_hcdp_entry *ent; bus_addr_t addr; + uint64_t hcdp; unsigned int i; /* * Use the DIG64 HCDP table if present. */ - if (bootinfo.bi_hcdp != 0) { - tbl = (void*)IA64_PHYS_TO_RR7(bootinfo.bi_hcdp); + hcdp = ia64_get_hcdp(); + if (hcdp != 0) { + tbl = (void*)IA64_PHYS_TO_RR7(hcdp); for (i = 0; i < tbl->entries; i++) { ent = tbl->entry + i; diff --git a/sys/ia64/ia64/machdep.c b/sys/ia64/ia64/machdep.c index 20ad3a1..608943d 100644 --- a/sys/ia64/ia64/machdep.c +++ b/sys/ia64/ia64/machdep.c @@ -777,6 +777,13 @@ ia64_init(void) /* NOTREACHED */ } +uint64_t +ia64_get_hcdp(void) +{ + + return (bootinfo.bi_hcdp); +} + void bzero(void *buf, size_t len) { diff --git a/sys/ia64/include/md_var.h b/sys/ia64/include/md_var.h index 04f3f5f..d1515fe 100644 --- a/sys/ia64/include/md_var.h +++ b/sys/ia64/include/md_var.h @@ -78,6 +78,7 @@ int do_ast(struct trapframe *); void ia32_trap(int, struct trapframe *); int ia64_count_cpus(void); void ia64_flush_dirty(struct thread *, struct _special *); +uint64_t ia64_get_hcdp(void); int ia64_highfp_drop(struct thread *); int ia64_highfp_save(struct thread *); void ia64_init(void); |