diff options
Diffstat (limited to 'src/soc/amd/common/fsp')
-rw-r--r-- | src/soc/amd/common/fsp/Makefile.inc | 1 | ||||
-rw-r--r-- | src/soc/amd/common/fsp/fsp_graphics.c | 19 |
2 files changed, 20 insertions, 0 deletions
diff --git a/src/soc/amd/common/fsp/Makefile.inc b/src/soc/amd/common/fsp/Makefile.inc index f26fe8f884..14f1f8510b 100644 --- a/src/soc/amd/common/fsp/Makefile.inc +++ b/src/soc/amd/common/fsp/Makefile.inc @@ -3,6 +3,7 @@ ifeq ($(CONFIG_PLATFORM_USES_FSP2_0),y) romstage-y += fsp_memmap.c romstage-y += fsp_reset.c romstage-y += fsp_validate.c +ramstage-y += fsp_graphics.c ramstage-y += fsp_memmap.c ramstage-y += fsp_report_resources.c ramstage-y += fsp_reset.c diff --git a/src/soc/amd/common/fsp/fsp_graphics.c b/src/soc/amd/common/fsp/fsp_graphics.c new file mode 100644 index 0000000000..4847e3c253 --- /dev/null +++ b/src/soc/amd/common/fsp/fsp_graphics.c @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0-or-later */ + +#include <amdblocks/graphics.h> +#include <console/console.h> +#include <device/device.h> +#include <device/pci.h> +#include <device/resource.h> +#include <fsp/graphics.h> + +void fsp_graphics_init(struct device *const dev) +{ + struct resource *res = probe_resource(dev, PCI_BASE_ADDRESS_0); + + if (res && res->base) + fsp_report_framebuffer_info(res->base, LB_FB_ORIENTATION_NORMAL); + else + printk(BIOS_ERR, "%s: Unable to find resource for %s\n", + __func__, dev_path(dev)); +} |