Debian Codegraph @

src/soc/intel/pantherlake/cbfs_preload.c

raw symbols SCIP
1 /* SPDX-License-Identifier: GPL-2.0-only */
2
3 #include <bootstate.h>
4 #include <cbfs.h>
5 #include <fsp/api.h>
6 #include <intelblocks/cfg.h>
7 #include <program_loading.h>
8
9 static void preload_pre_fsps(void *unused)
10 {
11 preload_fsps();
12
13 struct soc_intel_common_config *config = chip_get_common_soc_structure();
14 /* If chipset lockdown is handled by FSP, CBFS pre-loading must be completed
15 before FSP-S finishes. In this case, it yields better results to preload the
16 payload before lockdown.*/
17 if (config->chipset_lockdown == CHIPSET_LOCKDOWN_FSP)
18 payload_preload();
19 }
20
21 BOOT_STATE_INIT_ENTRY(BS_PRE_DEVICE, BS_ON_ENTRY, preload_pre_fsps, NULL);
22
23 static void preload_post_fsps(void *unused)
24 {
25 struct soc_intel_common_config *config = chip_get_common_soc_structure();
26 /* If the chipset lockdown is handled by FSP, SPI DMA is locked, and we cannot
27 preload any other CBFS files. */
28 if (config->chipset_lockdown == CHIPSET_LOCKDOWN_FSP)
29 return;
30
31 cbfs_preload(CONFIG_CBFS_PREFIX "/dsdt.aml");
32 payload_preload();
33 }
34
35 BOOT_STATE_INIT_ENTRY(BS_DEV_ENUMERATE, BS_ON_ENTRY, preload_post_fsps, NULL);