Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F156568433
D5258.id13369.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
4 KB
Referenced Files
None
Subscribers
None
D5258.id13369.diff
View Options
Index: head/sys/arm/arm/ofw_machdep.c
===================================================================
--- head/sys/arm/arm/ofw_machdep.c
+++ head/sys/arm/arm/ofw_machdep.c
@@ -38,7 +38,7 @@
int
OF_decode_addr(phandle_t dev, int regno, bus_space_tag_t *tag,
- bus_space_handle_t *handle)
+ bus_space_handle_t *handle, bus_size_t *sz)
{
bus_addr_t addr;
bus_size_t size;
@@ -66,6 +66,10 @@
*tag = fdtbus_bs_tag;
flags = 0;
#endif
+
+ if (sz != NULL)
+ *sz = size;
+
return (bus_space_map(*tag, addr, size, flags, handle));
}
Index: head/sys/arm64/arm64/ofw_machdep.c
===================================================================
--- head/sys/arm64/arm64/ofw_machdep.c
+++ head/sys/arm64/arm64/ofw_machdep.c
@@ -39,7 +39,7 @@
int
OF_decode_addr(phandle_t dev, int regno, bus_space_tag_t *tag,
- bus_space_handle_t *handle)
+ bus_space_handle_t *handle, bus_size_t *sz)
{
bus_addr_t addr;
bus_size_t size;
@@ -50,5 +50,9 @@
return (err);
*tag = &memmap_bus;
+
+ if (sz != NULL)
+ *sz = size;
+
return (bus_space_map(*tag, addr, size, 0, handle));
}
Index: head/sys/dev/ofw/openfirm.h
===================================================================
--- head/sys/dev/ofw/openfirm.h
+++ head/sys/dev/ofw/openfirm.h
@@ -176,7 +176,7 @@
*/
#ifndef __sparc64__
int OF_decode_addr(phandle_t dev, int regno, bus_space_tag_t *ptag,
- bus_space_handle_t *phandle);
+ bus_space_handle_t *phandle, bus_size_t *sz);
#endif
#endif /* _KERNEL */
Index: head/sys/dev/tsec/if_tsec_fdt.c
===================================================================
--- head/sys/dev/tsec/if_tsec_fdt.c
+++ head/sys/dev/tsec/if_tsec_fdt.c
@@ -167,7 +167,7 @@
}
phy = OF_node_from_xref(phy);
- OF_decode_addr(OF_parent(phy), 0, &sc->phy_bst, &sc->phy_bsh);
+ OF_decode_addr(OF_parent(phy), 0, &sc->phy_bst, &sc->phy_bsh, NULL);
OF_getencprop(phy, "reg", &sc->phyaddr, sizeof(sc->phyaddr));
/* Init timer */
Index: head/sys/dev/uart/uart_cpu_fdt.c
===================================================================
--- head/sys/dev/uart/uart_cpu_fdt.c
+++ head/sys/dev/uart/uart_cpu_fdt.c
@@ -212,5 +212,5 @@
di->stopbits = 1;
di->parity = UART_PARITY_NONE;
- return (OF_decode_addr(node, 0, &di->bas.bst, &di->bas.bsh));
+ return (OF_decode_addr(node, 0, &di->bas.bst, &di->bas.bsh, NULL));
}
Index: head/sys/dev/uart/uart_cpu_powerpc.c
===================================================================
--- head/sys/dev/uart/uart_cpu_powerpc.c
+++ head/sys/dev/uart/uart_cpu_powerpc.c
@@ -180,7 +180,7 @@
if (class == NULL)
return (ENXIO);
- error = OF_decode_addr(input, 0, &di->bas.bst, &di->bas.bsh);
+ error = OF_decode_addr(input, 0, &di->bas.bst, &di->bas.bsh, NULL);
if (error)
return (error);
Index: head/sys/dev/vt/hw/ofwfb/ofwfb.c
===================================================================
--- head/sys/dev/vt/hw/ofwfb/ofwfb.c
+++ head/sys/dev/vt/hw/ofwfb/ofwfb.c
@@ -480,7 +480,8 @@
return (CN_DEAD);
#if defined(__powerpc__)
- OF_decode_addr(node, fb_phys, &sc->sc_memt, &sc->fb.fb_vbase);
+ OF_decode_addr(node, fb_phys, &sc->sc_memt, &sc->fb.fb_vbase,
+ NULL);
sc->fb.fb_pbase = sc->fb.fb_vbase; /* 1:1 mapped */
#ifdef __powerpc64__
/* Real mode under a hypervisor probably doesn't cover FB */
Index: head/sys/mips/mips/ofw_machdep.c
===================================================================
--- head/sys/mips/mips/ofw_machdep.c
+++ head/sys/mips/mips/ofw_machdep.c
@@ -38,7 +38,7 @@
int
OF_decode_addr(phandle_t dev, int regno, bus_space_tag_t *tag,
- bus_space_handle_t *handle)
+ bus_space_handle_t *handle, bus_size_t *sz)
{
bus_addr_t addr;
bus_size_t size;
@@ -66,5 +66,9 @@
*tag = fdtbus_bs_tag;
flags = 0;
#endif
+
+ if (sz != NULL)
+ *sz = size;
+
return (bus_space_map(*tag, addr, size, flags, handle));
}
Index: head/sys/powerpc/ofw/ofw_machdep.c
===================================================================
--- head/sys/powerpc/ofw/ofw_machdep.c
+++ head/sys/powerpc/ofw/ofw_machdep.c
@@ -565,7 +565,7 @@
*/
int
OF_decode_addr(phandle_t dev, int regno, bus_space_tag_t *tag,
- bus_space_handle_t *handle)
+ bus_space_handle_t *handle, bus_size_t *sz)
{
bus_addr_t addr;
bus_size_t size;
@@ -585,6 +585,9 @@
BUS_SPACE_MAP_PREFETCHABLE: 0;
}
+ if (sz != NULL)
+ *sz = size;
+
return (bus_space_map(*tag, addr, size, flags, handle));
}
Index: head/sys/powerpc/ofw/ofw_syscons.c
===================================================================
--- head/sys/powerpc/ofw/ofw_syscons.c
+++ head/sys/powerpc/ofw/ofw_syscons.c
@@ -342,7 +342,7 @@
if (fb_phys == sc->sc_num_pciaddrs)
return (0);
- OF_decode_addr(node, fb_phys, &sc->sc_tag, &sc->sc_addr);
+ OF_decode_addr(node, fb_phys, &sc->sc_tag, &sc->sc_addr, NULL);
}
ofwfb_init(0, &sc->sc_va, 0);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Fri, May 15, 5:55 PM (3 h, 30 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
33092968
Default Alt Text
D5258.id13369.diff (4 KB)
Attached To
Mode
D5258: Add a size flag to OF_decode_addr
Attached
Detach File
Event Timeline
Log In to Comment