summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--sys/powerpc/aim/ofw_machdep.c18
-rw-r--r--sys/powerpc/include/md_var.h1
-rw-r--r--sys/powerpc/include/ofw_machdep.h2
-rw-r--r--sys/powerpc/powerpc/mem.c1
-rw-r--r--sys/powerpc/powerpc/ofw_machdep.c18
5 files changed, 38 insertions, 2 deletions
diff --git a/sys/powerpc/aim/ofw_machdep.c b/sys/powerpc/aim/ofw_machdep.c
index 8e98cac..d868eec 100644
--- a/sys/powerpc/aim/ofw_machdep.c
+++ b/sys/powerpc/aim/ofw_machdep.c
@@ -51,6 +51,8 @@ __FBSDID("$FreeBSD$");
#include <vm/vm_param.h>
#include <vm/vm_page.h>
+#include <machine/bus.h>
+#include <machine/md_var.h>
#include <machine/powerpc.h>
#include <machine/ofw_machdep.h>
#include <powerpc/ofw/ofw_pci.h>
@@ -284,6 +286,22 @@ OF_getetheraddr(device_t dev, u_char *addr)
OF_getprop(node, "local-mac-address", addr, ETHER_ADDR_LEN);
}
+/*
+ * Return the physical address and the bus space to use for a node
+ * referenced by its package handle and the index of the register bank
+ * to decode. Intended to be used by console drivers in early boot only.
+ * Works by mapping the address of the node's bank given in the address
+ * space of its parent upward in the device tree at each bridge along the
+ * path.
+ */
+int
+OF_decode_addr(phandle_t node, int bank, bus_space_tag_t *tag,
+ bus_space_handle_t *handle)
+{
+
+ return (ENXIO);
+}
+
int
mem_valid(vm_offset_t addr, int len)
{
diff --git a/sys/powerpc/include/md_var.h b/sys/powerpc/include/md_var.h
index 9e98647..fa868c1 100644
--- a/sys/powerpc/include/md_var.h
+++ b/sys/powerpc/include/md_var.h
@@ -52,6 +52,7 @@ struct pcicfg;
void busdma_swi(void);
int is_physical_memory(vm_offset_t addr);
+int mem_valid(vm_offset_t addr, int len);
void decr_init(void);
diff --git a/sys/powerpc/include/ofw_machdep.h b/sys/powerpc/include/ofw_machdep.h
index 7f3aa0e..a4b601e 100644
--- a/sys/powerpc/include/ofw_machdep.h
+++ b/sys/powerpc/include/ofw_machdep.h
@@ -30,7 +30,7 @@
#include <sys/bus.h>
+int OF_decode_addr(phandle_t, int, bus_space_tag_t *, bus_space_handle_t *);
void OF_getetheraddr(device_t dev, u_char *addr);
-int mem_valid(vm_offset_t addr, int len);
#endif /* _MACHINE_OFW_MACHDEP_H_ */
diff --git a/sys/powerpc/powerpc/mem.c b/sys/powerpc/powerpc/mem.c
index c7f30205..340fa82 100644
--- a/sys/powerpc/powerpc/mem.c
+++ b/sys/powerpc/powerpc/mem.c
@@ -59,7 +59,6 @@ __FBSDID("$FreeBSD$");
#include <sys/uio.h>
#include <machine/md_var.h>
-#include <machine/ofw_machdep.h>
#include <machine/vmparam.h>
#include <vm/vm.h>
diff --git a/sys/powerpc/powerpc/ofw_machdep.c b/sys/powerpc/powerpc/ofw_machdep.c
index 8e98cac..d868eec 100644
--- a/sys/powerpc/powerpc/ofw_machdep.c
+++ b/sys/powerpc/powerpc/ofw_machdep.c
@@ -51,6 +51,8 @@ __FBSDID("$FreeBSD$");
#include <vm/vm_param.h>
#include <vm/vm_page.h>
+#include <machine/bus.h>
+#include <machine/md_var.h>
#include <machine/powerpc.h>
#include <machine/ofw_machdep.h>
#include <powerpc/ofw/ofw_pci.h>
@@ -284,6 +286,22 @@ OF_getetheraddr(device_t dev, u_char *addr)
OF_getprop(node, "local-mac-address", addr, ETHER_ADDR_LEN);
}
+/*
+ * Return the physical address and the bus space to use for a node
+ * referenced by its package handle and the index of the register bank
+ * to decode. Intended to be used by console drivers in early boot only.
+ * Works by mapping the address of the node's bank given in the address
+ * space of its parent upward in the device tree at each bridge along the
+ * path.
+ */
+int
+OF_decode_addr(phandle_t node, int bank, bus_space_tag_t *tag,
+ bus_space_handle_t *handle)
+{
+
+ return (ENXIO);
+}
+
int
mem_valid(vm_offset_t addr, int len)
{
OpenPOWER on IntegriCloud