coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
graphics.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <console/console.h>
4 #include <device/pci_rom.h>
5 #include <soc/cpu.h>
6 #include <soc/soc_util.h>
7 
8 void map_oprom_vendev_rev(u32 *vendev, u8 *rev)
9 {
10  if (*vendev != PICASSO_VBIOS_VID_DID)
11  return;
12 
13  /* Check if the RV2 video bios needs to be used instead of the RV1/PCO one */
14  if (soc_is_raven2()) {
15  printk(BIOS_NOTICE, "Using RV2 VBIOS.\n");
16  *vendev = RAVEN2_VBIOS_VID_DID;
17  *rev = RAVEN2_VBIOS_REV;
18  } else {
19  printk(BIOS_NOTICE, "Using RV1/PCO VBIOS.\n");
20  *rev = PICASSO_VBIOS_REV;
21  }
22 }
bool soc_is_raven2(void)
Definition: soc_util.c:215
#define printk(level,...)
Definition: stdlib.h:16
#define BIOS_NOTICE
BIOS_NOTICE - Unexpected but relatively insignificant.
Definition: loglevel.h:100
void map_oprom_vendev_rev(u32 *vendev, u8 *rev)
Definition: graphics.c:8
#define RAVEN2_VBIOS_VID_DID
Definition: cpu.h:16
#define PICASSO_VBIOS_VID_DID
Definition: cpu.h:14
#define RAVEN2_VBIOS_REV
Definition: cpu.h:17
#define PICASSO_VBIOS_REV
Definition: cpu.h:15
uint32_t u32
Definition: stdint.h:51
uint8_t u8
Definition: stdint.h:45