soc/intel/{alderlake, common}: Rename the pre_mem_ft structure
The patch renames identifiers (macros, function and structure names) in the basecode/debug/debug_feature.c to generic names so that they can be used to control the features which may have to be controlled either during pre and post memory. Currently, the naming of identifiers indicate that it meant to control the features which can be controlled during only pre-memory phase. TEST=Build code for Gimble Signed-off-by: Sridhar Siricilla <sridhar.siricilla@intel.com> Change-Id: I53ceb25454027ab8a5c59400402beb6cc42884c9 Reviewed-on: https://review.coreboot.org/c/coreboot/+/65139 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
This commit is contained in:
parent
b404fa474f
commit
044817762b
|
@ -136,7 +136,7 @@ void mainboard_romstage_entry(void)
|
|||
cse_init(HECI1_BASE_ADDRESS);
|
||||
|
||||
if (CONFIG(SOC_INTEL_COMMON_BASECODE_DEBUG_FEATURE))
|
||||
pre_mem_debug_init();
|
||||
dbg_feature_cntrl_init();
|
||||
|
||||
s3wake = pmc_fill_power_state(ps) == ACPI_S3;
|
||||
|
||||
|
|
|
@ -5,32 +5,33 @@
|
|||
#include <spi_flash.h>
|
||||
|
||||
#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
|
||||
#define DEBUG_FEATURE_CTRL_OFFSET SI_DESC_OEM_SECTION_OFFSET
|
||||
#define DEBUG_FEATURE_CTRL_SZ 64
|
||||
#define SI_DESC_REGION_SZ 4096
|
||||
|
||||
struct pre_mem_ft {
|
||||
struct debug_feature_cntrl {
|
||||
uint8_t cse_fw_update_disable; /* Byte location: 0xF00 */
|
||||
uint8_t reserved[63];
|
||||
};
|
||||
|
||||
static struct pre_mem_ft pre_mem_debug;
|
||||
static struct debug_feature_cntrl dbg_feature_cntrl;
|
||||
|
||||
_Static_assert(sizeof(struct pre_mem_ft) % 64 == 0 && sizeof(struct pre_mem_ft) <= 256,
|
||||
"sizeof(struct pre_mem_ft) must be a multiple of 64 bytes and up to 256 bytes");
|
||||
_Static_assert(sizeof(struct debug_feature_cntrl) % 64 == 0
|
||||
&& sizeof(struct debug_feature_cntrl) <= 256,
|
||||
"sizeof(struct debug_feature_cntrl) must be a multiple of 64 bytes and up to 256 bytes");
|
||||
|
||||
bool is_debug_cse_fw_update_disable(void)
|
||||
{
|
||||
printk(BIOS_DEBUG, "rt_debug: pre_mem_debug.cse_fw_update_disable=%d\n",
|
||||
pre_mem_debug.cse_fw_update_disable);
|
||||
printk(BIOS_DEBUG, "rt_debug: dbg_feature_cntrl.cse_fw_update_disable=%d\n",
|
||||
dbg_feature_cntrl.cse_fw_update_disable);
|
||||
|
||||
return pre_mem_debug.cse_fw_update_disable == 1;
|
||||
return dbg_feature_cntrl.cse_fw_update_disable == 1;
|
||||
}
|
||||
|
||||
enum cb_err pre_mem_debug_init(void)
|
||||
enum cb_err dbg_feature_cntrl_init(void)
|
||||
{
|
||||
if (spi_flash_read(boot_device_spi_flash(), PRE_MEM_FEATURE_CTRL_OFFSET,
|
||||
PRE_MEM_FEATURE_CTRL_SZ, &pre_mem_debug)) {
|
||||
if (spi_flash_read(boot_device_spi_flash(), DEBUG_FEATURE_CTRL_OFFSET,
|
||||
DEBUG_FEATURE_CTRL_SZ, &dbg_feature_cntrl)) {
|
||||
printk(BIOS_ERR, "Failed to read Descriptor Region from SPI Flash\n");
|
||||
return CB_ERR;
|
||||
}
|
||||
|
|
|
@ -10,8 +10,8 @@ bool is_debug_cse_fw_update_disable(void);
|
|||
|
||||
/*
|
||||
* Reads OEM Section area in the Descriptor Region and
|
||||
* populates pre_mem_debug structure.
|
||||
* populates debug_feature_cntrl structure.
|
||||
*/
|
||||
enum cb_err pre_mem_debug_init(void);
|
||||
enum cb_err dbg_feature_cntrl_init(void);
|
||||
|
||||
#endif
|
||||
|
|
Loading…
Reference in New Issue