Page Menu
Home
FreeBSD
Search
Configure Global Search
Log In
Files
F145626957
D36677.id110874.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
D36677.id110874.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
@@ -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);
}
File Metadata
Details
Attached
Mime Type
text/plain
Expires
Mon, Feb 23, 9:03 AM (2 h, 51 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
28954133
Default Alt Text
D36677.id110874.diff (1 KB)
Attached To
Mode
D36677: Add an ability to read PACKAGE and LOCAL_REFERENCE properties
Attached
Detach File
Event Timeline
Log In to Comment