acpi_iort: fix mapping end calculation
According to the ARM Design Document "IO Remapping Table Platform" (DEN 0049D), the "Number of IDs" field of the ID mapping format means "The number of IDs in the range minus one". Submitted by: Greg V <greg@unrelenting.technology> Reviewed by: andrew Differential Revision: https://reviews.freebsd.org/D25179
This commit is contained in:
parent
c612709bce
commit
c078c3fd69
Notes:
svn2git
2020-12-20 02:59:44 +00:00
svn path=/head/; revision=364484
@ -234,7 +234,11 @@ iort_copy_data(struct iort_node *node, ACPI_IORT_NODE *node_entry)
|
||||
node->entries.mappings = mapping;
|
||||
for (i = 0; i < node->nentries; i++, mapping++, map_entry++) {
|
||||
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->out_node_offset = map_entry->OutputReference;
|
||||
mapping->flags = map_entry->Flags;
|
||||
|
Loading…
Reference in New Issue
Block a user