o Move the prototype of mem_valid() from ofw_machdep.h to md_var.h.
This avoids that mem.c has to include ofw_machdep.h, including all OFW related headers. o Provide a stub for OF_decode_addr(), which is used by low-level console drivers to obtain a tag and handle given a OFW phandle. This is different from sparc64, where a fake bus tag needs to be created explicitly.
This commit is contained in:
parent
1be7511444
commit
949313b738
@ -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)
|
||||
{
|
||||
|
@ -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);
|
||||
|
||||
|
@ -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_ */
|
||||
|
@ -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>
|
||||
|
@ -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)
|
||||
{
|
||||
|
Loading…
x
Reference in New Issue
Block a user