Don't obtain the HCDP address directly from the bootinfo structure.
Use a function to keep the details at arms length from uart(4).
This commit is contained in:
parent
94f5c9cfc0
commit
f5929532f1
@ -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;
|
||||
|
||||
|
@ -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)
|
||||
{
|
||||
|
@ -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);
|
||||
|
Loading…
x
Reference in New Issue
Block a user