Sridhar Siricilla has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/63734 )
Change subject: soc/intel/common: Fix accessing Descriptor Region access ......................................................................
soc/intel/common: Fix accessing Descriptor Region access
The patch fixes the buggy code which tries to access the Descriptor Region.
TEST=Build and verify no errors seen while accessing the Descriptor Region.
Signed-off-by: Sridhar Siricilla sridhar.siricilla@intel.com Change-Id: Ib144cc0845b7527e5a3032529b0802f961944b87 --- M src/soc/intel/common/basecode/debug/debug_feature.c 1 file changed, 3 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/63734/1
diff --git a/src/soc/intel/common/basecode/debug/debug_feature.c b/src/soc/intel/common/basecode/debug/debug_feature.c index 5cdbaf7..ed6974e 100644 --- a/src/soc/intel/common/basecode/debug/debug_feature.c +++ b/src/soc/intel/common/basecode/debug/debug_feature.c @@ -6,6 +6,7 @@ #include <console/console.h> #include <fmap.h>
+#define CONFIG_SI_DESC_REGION "SI_DESC" #define SI_DESC_OEM_SECTION_OFFSET 0xF00 #define PRE_MEM_FEATURE_CTRL_OFFSET SI_DESC_OEM_SECTION_OFFSET #define PRE_MEM_FEATURE_CTRL_SZ 64 @@ -23,15 +24,9 @@ uint8_t pre_mem_debug_init(void) { struct region_device desc_rdev; - const struct region_device *boot_device = boot_device_ro();
- if (!boot_device) { - printk(BIOS_ERR, "Failed to get RW boot device\n"); - return 1; - } - - if (rdev_chain(&desc_rdev, boot_device, 0, SI_DESC_REGION_SZ)) { - printk(BIOS_ERR, "Failed to get description region device\n"); + if (fmap_locate_area_as_rdev_rw(CONFIG_SI_DESC_REGION, &desc_rdev) < 0) { + printk(BIOS_ERR, "Failed to locate %s in the FMAP\n", CONFIG_SI_DESC_REGION); return 1; }