flag set, which we so far had expected to be there. This is allowed by
the IORT spec. In that case simply make use of the first mapping if
there is a single one.
With feedback from and ok kettenis@
-/* $OpenBSD: acpiiort.c,v 1.8 2022/08/31 23:31:35 patrick Exp $ */
+/* $OpenBSD: acpiiort.c,v 1.9 2022/09/07 18:25:08 patrick Exp $ */
/*
* Copyright (c) 2021 Patrick Wildt <patrick@blueri.se>
*
}
}
+ /*
+ * The IORT spec allows NCs to use implementation-defined IDs, whose
+ * interpretation is up to the device driver. For now simply take the
+ * mapping if there's a single one. This might change in the future.
+ */
+ if (i >= node->number_of_mappings && node->number_of_mappings == 1) {
+ i = 0;
+ rid = map[i].output_base;
+ }
+
/* No mapping found? Even weirder. */
if (i >= node->number_of_mappings)
return dmat;