Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F108441898
D44914.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
D44914.diff
View Options
diff --git a/sys/arm64/arm64/gic_v3.c b/sys/arm64/arm64/gic_v3.c
--- a/sys/arm64/arm64/gic_v3.c
+++ b/sys/arm64/arm64/gic_v3.c
@@ -494,6 +494,10 @@
case GICV3_IVAR_REDIST:
*result = (uintptr_t)&sc->gic_redists.pcpu[PCPU_GET(cpuid)];
return (0);
+ case GICV3_IVAR_SUPPORT_LPIS:
+ *result =
+ (gic_d_read(sc, 4, GICD_TYPER) & GICD_TYPER_LPIS) != 0;
+ return (0);
case GIC_IVAR_HW_REV:
KASSERT(
GICR_PIDR2_ARCH(sc->gic_pidr2) == GICR_PIDR2_ARCH_GICv3 ||
diff --git a/sys/arm64/arm64/gic_v3_var.h b/sys/arm64/arm64/gic_v3_var.h
--- a/sys/arm64/arm64/gic_v3_var.h
+++ b/sys/arm64/arm64/gic_v3_var.h
@@ -102,9 +102,11 @@
#define GICV3_IVAR_NIRQS 1000
/* 1001 was GICV3_IVAR_REDIST_VADDR */
#define GICV3_IVAR_REDIST 1002
+#define GICV3_IVAR_SUPPORT_LPIS 1003
__BUS_ACCESSOR(gicv3, nirqs, GICV3, NIRQS, u_int);
__BUS_ACCESSOR(gicv3, redist, GICV3, REDIST, void *);
+__BUS_ACCESSOR(gicv3, support_lpis, GICV3, SUPPORT_LPIS, bool);
/* Device methods */
int gic_v3_attach(device_t dev);
diff --git a/sys/arm64/arm64/gicv3_its.c b/sys/arm64/arm64/gicv3_its.c
--- a/sys/arm64/arm64/gicv3_its.c
+++ b/sys/arm64/arm64/gicv3_its.c
@@ -2208,6 +2208,9 @@
if (!ofw_bus_is_compatible(dev, "arm,gic-v3-its"))
return (ENXIO);
+ if (!gicv3_get_support_lpis(dev))
+ return (ENXIO);
+
device_set_desc(dev, "ARM GIC Interrupt Translation Service");
return (BUS_PROBE_DEFAULT);
}
@@ -2277,6 +2280,9 @@
if (gic_get_hw_rev(dev) < 3)
return (EINVAL);
+ if (!gicv3_get_support_lpis(dev))
+ return (ENXIO);
+
device_set_desc(dev, "ARM GIC Interrupt Translation Service");
return (BUS_PROBE_DEFAULT);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Sat, Jan 25, 7:29 PM (15 h, 12 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
16161130
Default Alt Text
D44914.diff (1 KB)
Attached To
Mode
D44914: arm64/gicv3: Check if the hardware supports LPIs
Attached
Detach File
Event Timeline
Log In to Comment