Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F135352446
D4518.id11134.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
D4518.id11134.diff
View Options
Index: sys/dev/ofw/ofw_bus_subr.c
===================================================================
--- sys/dev/ofw/ofw_bus_subr.c
+++ sys/dev/ofw/ofw_bus_subr.c
@@ -341,6 +341,7 @@
uint8_t *uiregs = regs;
uint8_t *uiimapmsk = imapmsk;
uint8_t *mptr;
+ pcell_t paddrsz;
pcell_t pintrsz;
int i, rsz, tsz;
@@ -360,16 +361,21 @@
while (i > 0) {
bcopy(mptr + physsz + intrsz, &parent, sizeof(parent));
if (OF_searchencprop(OF_node_from_xref(parent),
+ "#address-cells", &paddrsz, sizeof(paddrsz)) == -1)
+ paddrsz = 0; /* default */
+ paddrsz *= sizeof(pcell_t);
+
+ if (OF_searchencprop(OF_node_from_xref(parent),
"#interrupt-cells", &pintrsz, sizeof(pintrsz)) == -1)
pintrsz = 1; /* default */
pintrsz *= sizeof(pcell_t);
/* Compute the map stride size. */
- tsz = physsz + intrsz + sizeof(phandle_t) + pintrsz;
+ tsz = physsz + intrsz + sizeof(phandle_t) + paddrsz + pintrsz;
KASSERT(i >= tsz, ("ofw_bus_search_intrmap: truncated map"));
if (bcmp(ref, mptr, physsz + intrsz) == 0) {
- bcopy(mptr + physsz + intrsz + sizeof(parent),
+ bcopy(mptr + physsz + intrsz + sizeof(parent) + paddrsz,
result, MIN(rintrsz, pintrsz));
if (iparent != NULL)
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Nov 10, 1:04 AM (9 h, 28 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
25089639
Default Alt Text
D4518.id11134.diff (1 KB)
Attached To
Mode
D4518: Handle interrupt-maps with a parent unit address
Attached
Detach File
Event Timeline
Log In to Comment