summaryrefslogtreecommitdiffstats
path: root/sys/alpha/mcbus/mcpcia.c
diff options
context:
space:
mode:
authordfr <dfr@FreeBSD.org>2002-03-26 19:46:40 +0000
committerdfr <dfr@FreeBSD.org>2002-03-26 19:46:40 +0000
commit3bf8ca061406455b3a57b3c60781a2a94cca5727 (patch)
tree45bc3c11741dfed14c3fc5cdfe77e68671060425 /sys/alpha/mcbus/mcpcia.c
parent5785423ddfbc734cbeb7a6c82965c7895469aeac (diff)
downloadFreeBSD-src-3bf8ca061406455b3a57b3c60781a2a94cca5727.zip
FreeBSD-src-3bf8ca061406455b3a57b3c60781a2a94cca5727.tar.gz
Initialise the AS4100 console at the same time as most of the other
platform types instead of deferring it until the mcpcia devices are probed. This allows the use of e.g. kgdb before the busses are probed.
Diffstat (limited to 'sys/alpha/mcbus/mcpcia.c')
-rw-r--r--sys/alpha/mcbus/mcpcia.c38
1 files changed, 34 insertions, 4 deletions
diff --git a/sys/alpha/mcbus/mcpcia.c b/sys/alpha/mcbus/mcpcia.c
index 70be7f1..615b32f 100644
--- a/sys/alpha/mcbus/mcpcia.c
+++ b/sys/alpha/mcbus/mcpcia.c
@@ -120,6 +120,40 @@ static void mcpcia_sgmap_map(void *, bus_addr_t, vm_offset_t);
static struct mcpcia_softc *mcpcia_root;
+/*
+ * Early console support requires us to partially probe the bus to
+ * find the ISA bus resources.
+ */
+void
+mcpcia_init(int gid, int mid)
+{
+ static struct swiz_space io_space;
+ static struct swiz_space mem_space;
+ u_int64_t sysbase;
+ vm_offset_t regs, io_base, smem_base;
+
+ sysbase = MCBUS_IOSPACE |
+ (((u_int64_t) gid) << MCBUS_GID_SHIFT) |
+ (((u_int64_t) mid) << MCBUS_MID_SHIFT);
+
+ if (EISA_PRESENT(REGVAL(sysbase
+ | MCPCIA_PCI_BRIDGE
+ | _MCPCIA_PCI_REV))) {
+ /*
+ * Define temporary spaces for bootstrap i/o.
+ */
+ regs = (vm_offset_t) KV(sysbase);
+ io_base = regs + MCPCIA_PCI_IOSPACE;
+ smem_base = regs + MCPCIA_PCI_SPARSE;
+
+ swiz_init_space(&io_space, io_base);
+ swiz_init_space(&mem_space, smem_base);
+
+ busspace_isa_io = (struct alpha_busspace *) &io_space;
+ busspace_isa_mem = (struct alpha_busspace *) &mem_space;
+ }
+}
+
static int
mcpcia_probe(device_t dev)
{
@@ -233,10 +267,6 @@ mcpcia_attach(device_t dev)
&sc->io_space;
busspace_isa_mem = (struct alpha_busspace *)
&sc->mem_space;
- printf("Attaching Real Console\n");
- mcpcia_enable_intr(sc, 16);
- dec_kn300_cons_init();
- promcndetach();
/*
* Enable EISA interrupts.
*/
OpenPOWER on IntegriCloud