summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorMartin Roth <martinroth@chromium.org>2020-01-21 09:28:40 -0700
committerPatrick Georgi <pgeorgi@google.com>2020-03-25 10:48:21 +0000
commita616a4be366c6af1f8ccfbfd1f16a4572c7e6c91 (patch)
tree1b890c4afbb9047482c19db93dd3ddadd2f76c65 /src/include
parent4cc2cacd333de4d77809f1212e879e61ff8e1616 (diff)
src/device: Add option to look at revision in option roms
AMD's Family 17h SOCs have the same vendor and device IDs for their graphics blocks, but need different video BIOSes. The only difference is the revision number. Add a Kconfig option that allows us to add the revision number of the graphics device to the PCI option rom saved in CBFS. Because searching CBFS takes a non-trivial amount of time, only enable the option if it's needed. If it's not used, or if nothing matches, the check will fall through and search for an option rom with no version. BUG=b:145817712 TEST=With surrounding patches, loads dali vbios Change-Id: Icb610a2abe7fcd0f4dc3716382b9853551240a7a Signed-off-by: Martin Roth <martinroth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/2013181 Reviewed-by: Martin Roth <martinroth@google.com> Tested-by: Martin Roth <martinroth@google.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/39792 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/cbfs.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/include/cbfs.h b/src/include/cbfs.h
index 823368644b..feb73a1310 100644
--- a/src/include/cbfs.h
+++ b/src/include/cbfs.h
@@ -24,6 +24,8 @@
/* Return mapping of option ROM found in boot device. NULL on error. */
void *cbfs_boot_map_optionrom(uint16_t vendor, uint16_t device);
+/* Return mapping of option ROM with revision number. Returns NULL on error. */
+void *cbfs_boot_map_optionrom_revision(uint16_t vendor, uint16_t device, uint8_t rev);
/* Locate file by name and optional type. Return 0 on success. < 0 on error. */
int cbfs_boot_locate(struct cbfsf *fh, const char *name, uint32_t *type);
/* Map file into memory leaking the mapping. Only should be used when