dafcc7a26d
AMD's Family 17h SoCs share the same video device ID, but may need different video BIOSes. This adds the common code changes to check the vendor & device IDs along with the revision and select the correct video BIOS to use. Change-Id: I2978a5693c904ddb09d23715cb309c4a356e0370 Signed-off-by: Martin Roth <martinroth@chromium.org> Reviewed-on: https://chromium-review.googlesource.com/2040455 Reviewed-by: Raul E Rangel <rrangel@chromium.org> Reviewed-by: Matt Papageorge <matt.papageorge@amd.corp-partner.google.com> Reviewed-by: Justin Frodsham <justin.frodsham@amd.corp-partner.google.com> Signed-off-by: Felix Held <felix-coreboot@felixheld.de> Reviewed-on: https://review.coreboot.org/c/coreboot/+/39793 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Raul Rangel <rrangel@chromium.org>
52 lines
1.1 KiB
C
52 lines
1.1 KiB
C
#ifndef PCI_ROM_H
|
|
#define PCI_ROM_H
|
|
#include <endian.h>
|
|
#include <stddef.h>
|
|
#include <arch/acpi.h>
|
|
|
|
#define PCI_ROM_HDR 0xAA55
|
|
#define PCI_DATA_HDR ((uint32_t) (('R' << 24) | ('I' << 16) | ('C' << 8) | 'P'))
|
|
|
|
#define PCI_RAM_IMAGE_START 0xD0000
|
|
#define PCI_VGA_RAM_IMAGE_START 0xC0000
|
|
|
|
struct rom_header {
|
|
uint16_t signature;
|
|
uint8_t size;
|
|
uint8_t init[3];
|
|
uint8_t reserved[0x12];
|
|
uint16_t data;
|
|
};
|
|
|
|
struct pci_data {
|
|
uint32_t signature;
|
|
uint16_t vendor;
|
|
uint16_t device;
|
|
uint16_t reserved_1;
|
|
uint16_t dlen;
|
|
uint8_t drevision;
|
|
uint8_t class_lo;
|
|
uint16_t class_hi;
|
|
uint16_t ilen;
|
|
uint16_t irevision;
|
|
uint8_t type;
|
|
uint8_t indicator;
|
|
uint16_t reserved_2;
|
|
};
|
|
|
|
struct rom_header *pci_rom_probe(struct device *dev);
|
|
struct rom_header *pci_rom_load(struct device *dev,
|
|
struct rom_header *rom_header);
|
|
|
|
unsigned long
|
|
pci_rom_write_acpi_tables(struct device *device,
|
|
unsigned long current,
|
|
struct acpi_rsdp *rsdp);
|
|
|
|
void pci_rom_ssdt(struct device *device);
|
|
|
|
void map_oprom_vendev_rev(u32 *vendev, u8 *rev);
|
|
u32 map_oprom_vendev(u32 vendev);
|
|
|
|
int verified_boot_should_run_oprom(struct rom_header *rom_header);
|
|
#endif
|