Changeset View
Changeset View
Standalone View
Standalone View
sys/dev/acpica/acpi.c
Show First 20 Lines • Show All 138 Lines • ▼ Show 20 Lines | |||||
static int acpi_adjust_resource(device_t bus, device_t child, int type, | static int acpi_adjust_resource(device_t bus, device_t child, int type, | ||||
struct resource *r, rman_res_t start, rman_res_t end); | struct resource *r, rman_res_t start, rman_res_t end); | ||||
static int acpi_release_resource(device_t bus, device_t child, int type, | static int acpi_release_resource(device_t bus, device_t child, int type, | ||||
int rid, struct resource *r); | int rid, struct resource *r); | ||||
static void acpi_delete_resource(device_t bus, device_t child, int type, | static void acpi_delete_resource(device_t bus, device_t child, int type, | ||||
int rid); | int rid); | ||||
static uint32_t acpi_isa_get_logicalid(device_t dev); | 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 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, | ||||
bz: Unneeded whitespace change probably being my fault from earlier edits. Can you re-adjust that… | |||||
void *propvalue, size_t size, device_property_type_t type); | 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 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, | static ACPI_STATUS acpi_device_eval_obj(device_t bus, device_t dev, | ||||
ACPI_STRING pathname, ACPI_OBJECT_LIST *parameters, | ACPI_STRING pathname, ACPI_OBJECT_LIST *parameters, | ||||
ACPI_BUFFER *ret); | ACPI_BUFFER *ret); | ||||
static ACPI_STATUS acpi_device_get_prop(device_t bus, device_t dev, | static ACPI_STATUS acpi_device_get_prop(device_t bus, device_t dev, | ||||
ACPI_STRING propname, const ACPI_OBJECT **value); | ACPI_STRING propname, const ACPI_OBJECT **value); | ||||
static ACPI_STATUS acpi_device_scan_cb(ACPI_HANDLE h, UINT32 level, | static ACPI_STATUS acpi_device_scan_cb(ACPI_HANDLE h, UINT32 level, | ||||
▲ Show 20 Lines • Show All 1,811 Lines • ▼ Show 20 Lines | case ACPI_TYPE_STRING: | ||||
return (obj->String.Length); | return (obj->String.Length); | ||||
case ACPI_TYPE_BUFFER: | case ACPI_TYPE_BUFFER: | ||||
if (propvalue != NULL && size > 0) | if (propvalue != NULL && size > 0) | ||||
memcpy(propvalue, obj->Buffer.Pointer, | memcpy(propvalue, obj->Buffer.Pointer, | ||||
MIN(size, obj->Buffer.Length)); | MIN(size, obj->Buffer.Length)); | ||||
return (obj->Buffer.Length); | return (obj->Buffer.Length); | ||||
case ACPI_TYPE_PACKAGE: | |||||
/* XXX-BZ handle this case better! */ | |||||
bzUnsubmitted Not Done Inline ActionsI still don't know how really; I'd be open to suggestions but otherwise it works for now. bz: I still don't know how really; I'd be open to suggestions but otherwise it works for now. | |||||
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: | default: | ||||
return (0); | return (0); | ||||
} | } | ||||
} | } | ||||
int | int | ||||
acpi_device_pwr_for_sleep(device_t bus, device_t dev, int *dstate) | acpi_device_pwr_for_sleep(device_t bus, device_t dev, int *dstate) | ||||
{ | { | ||||
▲ Show 20 Lines • Show All 2,654 Lines • Show Last 20 Lines |
Unneeded whitespace change probably being my fault from earlier edits. Can you re-adjust that please so it's out of the diff?