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 @@ -144,7 +144,7 @@ int rid); static uint32_t acpi_isa_get_logicalid(device_t dev); static int acpi_isa_get_compatid(device_t dev, uint32_t *cids, int count); -static ssize_t acpi_bus_get_prop(device_t bus, device_t child, const char *propname, +static ssize_t acpi_bus_get_prop(device_t bus, device_t child, const char *propname, void *propvalue, size_t size, device_property_type_t type); static int acpi_device_id_probe(device_t bus, device_t dev, char **ids, char **match); static ACPI_STATUS acpi_device_eval_obj(device_t bus, device_t dev, @@ -1972,6 +1972,23 @@ MIN(size, obj->Buffer.Length)); return (obj->Buffer.Length); + case ACPI_TYPE_PACKAGE: + /* XXX-BZ handle this case better! */ + if (propvalue != NULL && size >= sizeof(ACPI_OBJECT *)) { + *((ACPI_OBJECT **) propvalue) = + __DECONST(ACPI_OBJECT *, obj); + } + return (sizeof(ACPI_OBJECT *)); + + case ACPI_TYPE_LOCAL_REFERENCE: + if (propvalue != NULL && size >= sizeof(ACPI_HANDLE)) { + ACPI_HANDLE h; + + h = acpi_GetReference(NULL, + __DECONST(ACPI_OBJECT *, obj)); + memcpy(propvalue, h, sizeof(ACPI_HANDLE)); + } + return (sizeof(ACPI_HANDLE)); default: return (0); }