Changeset View
Changeset View
Standalone View
Standalone View
head/sys/arm64/acpica/acpi_iort.c
Show First 20 Lines • Show All 228 Lines • ▼ Show 20 Lines | map_entry = ACPI_ADD_PTR(ACPI_IORT_ID_MAPPING, node_entry, | ||||
node_entry->MappingOffset); | node_entry->MappingOffset); | ||||
node->nentries = node_entry->MappingCount; | node->nentries = node_entry->MappingCount; | ||||
node->usecount = 0; | node->usecount = 0; | ||||
mapping = malloc(sizeof(*mapping) * node->nentries, M_DEVBUF, | mapping = malloc(sizeof(*mapping) * node->nentries, M_DEVBUF, | ||||
M_WAITOK | M_ZERO); | M_WAITOK | M_ZERO); | ||||
node->entries.mappings = mapping; | node->entries.mappings = mapping; | ||||
for (i = 0; i < node->nentries; i++, mapping++, map_entry++) { | for (i = 0; i < node->nentries; i++, mapping++, map_entry++) { | ||||
mapping->base = map_entry->InputBase; | mapping->base = map_entry->InputBase; | ||||
mapping->end = map_entry->InputBase + map_entry->IdCount - 1; | /* | ||||
* IdCount means "The number of IDs in the range minus one" (ARM DEN 0049D). | |||||
* We use <= for comparison against this field, so don't add one here. | |||||
*/ | |||||
mapping->end = map_entry->InputBase + map_entry->IdCount; | |||||
mapping->outbase = map_entry->OutputBase; | mapping->outbase = map_entry->OutputBase; | ||||
mapping->out_node_offset = map_entry->OutputReference; | mapping->out_node_offset = map_entry->OutputReference; | ||||
mapping->flags = map_entry->Flags; | mapping->flags = map_entry->Flags; | ||||
mapping->out_node = NULL; | mapping->out_node = NULL; | ||||
} | } | ||||
} | } | ||||
/* | /* | ||||
▲ Show 20 Lines • Show All 340 Lines • Show Last 20 Lines |