From e180971560d5cebae57f51e7332f93e31038397e Mon Sep 17 00:00:00 2001 From: Subrata Banik Date: Mon, 5 May 2025 18:30:59 +0530 Subject: [PATCH] drivers/intel/fsp2_0: Move graphics info struct/GUID to FSP header This patch moves `struct hob_graphics_info` and `fsp_graphics_info_guid` into the FSP header file. This change allows other coreboot APIs to utilize this information for locating FSP graphics-related data to know the display resolutions and other useful information (required for coreboot native implementation of rendering splash screen). BUG=b:409718202 TEST=Able to build and boot google/fatcat. Change-Id: I445a4efa59769f25c93fc61ad1d15857716f5247 Signed-off-by: Subrata Banik Reviewed-on: https://review.coreboot.org/c/coreboot/+/87538 Reviewed-by: Nick Vaccaro Tested-by: build bot (Jenkins) --- src/drivers/intel/fsp2_0/graphics.c | 19 ------------------- .../intel/fsp2_0/include/fsp/graphics.h | 19 +++++++++++++++++++ 2 files changed, 19 insertions(+), 19 deletions(-) diff --git a/src/drivers/intel/fsp2_0/graphics.c b/src/drivers/intel/fsp2_0/graphics.c index b7466a55ab..08609b67c1 100644 --- a/src/drivers/intel/fsp2_0/graphics.c +++ b/src/drivers/intel/fsp2_0/graphics.c @@ -15,25 +15,6 @@ enum pixel_format { pixel_bitmask = 2, /* defined by _mask values */ }; -static const uint8_t fsp_graphics_info_guid[16] = { - 0xce, 0x2c, 0xf6, 0x39, 0x25, 0x68, 0x69, 0x46, - 0xbb, 0x56, 0x54, 0x1a, 0xba, 0x75, 0x3a, 0x07 -}; - -struct hob_graphics_info { - uint64_t framebuffer_base; - uint32_t framebuffer_size; - uint32_t version; - uint32_t horizontal_resolution; - uint32_t vertical_resolution; - uint32_t pixel_format; /* See enum pixel_format */ - uint32_t red_mask; - uint32_t green_mask; - uint32_t blue_mask; - uint32_t reserved_mask; - uint32_t pixels_per_scanline; -} __packed; - struct pixel { uint8_t pos; uint8_t size; diff --git a/src/drivers/intel/fsp2_0/include/fsp/graphics.h b/src/drivers/intel/fsp2_0/include/fsp/graphics.h index a5f781f87f..7348237f1b 100644 --- a/src/drivers/intel/fsp2_0/include/fsp/graphics.h +++ b/src/drivers/intel/fsp2_0/include/fsp/graphics.h @@ -5,6 +5,25 @@ #include +static const uint8_t fsp_graphics_info_guid[16] = { + 0xce, 0x2c, 0xf6, 0x39, 0x25, 0x68, 0x69, 0x46, + 0xbb, 0x56, 0x54, 0x1a, 0xba, 0x75, 0x3a, 0x07 +}; + +struct hob_graphics_info { + uint64_t framebuffer_base; + uint32_t framebuffer_size; + uint32_t version; + uint32_t horizontal_resolution; + uint32_t vertical_resolution; + uint32_t pixel_format; /* See enum pixel_format */ + uint32_t red_mask; + uint32_t green_mask; + uint32_t blue_mask; + uint32_t reserved_mask; + uint32_t pixels_per_scanline; +} __packed; + /* * Report the fsp_graphics_info_guid HOB to framebuffer info. *