Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F150117435
D55475.diff
No One
Temporary
Actions
View File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Flag For Later
Award Token
Size
3 KB
Referenced Files
None
Subscribers
None
D55475.diff
View Options
diff --git a/sys/dev/acpica/acpi.c b/sys/dev/acpica/acpi.c
--- a/sys/dev/acpica/acpi.c
+++ b/sys/dev/acpica/acpi.c
@@ -272,6 +272,9 @@
/* Local pools for managing system resources for ACPI child devices. */
static struct rman acpi_rman_io, acpi_rman_mem;
+#ifdef SYS_RES_FFH
+static struct rman acpi_rman_ffh;
+#endif
#define ACPI_MINIMUM_AWAKETIME 5
@@ -524,6 +527,12 @@
acpi_rman_mem.rm_descr = "ACPI I/O memory addresses";
if (rman_init(&acpi_rman_mem) != 0)
panic("acpi rman_init memory failed");
+#ifdef SYS_RES_FFH
+ acpi_rman_ffh.rm_type = RMAN_ARRAY;
+ acpi_rman_ffh.rm_descr = "ACPI FFixedHardware";
+ if (rman_init(&acpi_rman_ffh) != 0)
+ panic("acpi rman_init memory failed");
+#endif
resource_list_init(&sc->sysres_rl);
@@ -963,6 +972,9 @@
retval += resource_list_print_type(rl, "iomem", SYS_RES_MEMORY, "%#jx");
retval += resource_list_print_type(rl, "irq", SYS_RES_IRQ, "%jd");
retval += resource_list_print_type(rl, "drq", SYS_RES_DRQ, "%jd");
+#ifdef SYS_RES_FFH
+ retval += resource_list_print_type(rl, "ffh", SYS_RES_FFH, "%jd");
+#endif
if (device_get_flags(child))
retval += printf(" flags %#x", device_get_flags(child));
retval += bus_print_child_domain(bus, child);
@@ -1329,6 +1341,16 @@
else
return false;
}
+#ifdef SYS_RES_FFH
+ if (resource_long_value(name, unit, "ffh", &value) == 0) {
+ if (acpi_match_resource_hint(child, SYS_RES_FFH, value))
+
+ matches = true;
+ else
+ return false;
+ }
+#endif
+
return matches;
}
@@ -1447,6 +1469,10 @@
return (&acpi_rman_io);
case SYS_RES_MEMORY:
return (&acpi_rman_mem);
+#ifdef SYS_RES_FFH
+ case SYS_RES_FFH:
+ return (&acpi_rman_ffh);
+#endif
default:
return (NULL);
}
@@ -1823,6 +1849,12 @@
case ACPI_ADR_SPACE_SYSTEM_IO:
res_type = SYS_RES_IOPORT;
break;
+#ifdef SYS_RES_FFH
+ case ACPI_ADR_SPACE_FIXED_HARDWARE:
+ res_type = SYS_RES_FFH;
+ gas->BitWidth = 8;
+ break;
+#endif
default:
return (EOPNOTSUPP);
}
@@ -1836,7 +1868,7 @@
/* Validate the address after we're sure we support the space. */
if (gas->Address == 0 || gas->BitWidth == 0)
- return (EINVAL);
+ return (EINVAL);
bus_set_resource(dev, res_type, rid, gas->Address,
gas->BitWidth / 8);
diff --git a/sys/dev/acpica/acpivar.h b/sys/dev/acpica/acpivar.h
--- a/sys/dev/acpica/acpivar.h
+++ b/sys/dev/acpica/acpivar.h
@@ -630,6 +630,8 @@
int acpi_map_pxm_to_vm_domainid(int pxm);
bus_get_cpus_t acpi_get_cpus;
+uint64_t acpi_ffh_read(device_t dev, struct resource *res);
+void acpi_ffh_write(device_t dev, struct resource *res, uint64_t val);
#ifdef __aarch64__
/*
* ARM specific ACPI interfaces, relating to IORT table.
diff --git a/sys/kern/subr_bus.c b/sys/kern/subr_bus.c
--- a/sys/kern/subr_bus.c
+++ b/sys/kern/subr_bus.c
@@ -4455,6 +4455,9 @@
switch (type) {
case SYS_RES_IOPORT:
case SYS_RES_MEMORY:
+#ifdef SYS_RES_FFH
+ case SYS_RES_FFH:
+#endif
if ((rman_get_flags(r) & RF_UNMAPPED) == 0) {
error = BUS_MAP_RESOURCE(dev, child, r, NULL, &map);
if (error != 0)
@@ -4504,6 +4507,9 @@
switch (type) {
case SYS_RES_IOPORT:
case SYS_RES_MEMORY:
+#ifdef SYS_RES_FFH
+ case SYS_RES_FFH:
+#endif
if ((rman_get_flags(r) & RF_UNMAPPED) == 0) {
rman_get_mapping(r, &map);
BUS_UNMAP_RESOURCE(dev, child, r, &map);
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Mar 30, 12:53 PM (7 h, 16 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
30587460
Default Alt Text
D55475.diff (3 KB)
Attached To
Mode
D55475: acpi: Support Functional Fixed Hardware
Attached
Detach File
Event Timeline
Log In to Comment