diff options
author | Karthikeyan Ramasubramanian <kramasub@google.com> | 2024-08-16 14:36:29 -0600 |
---|---|---|
committer | Felix Held <felix-coreboot@felixheld.de> | 2024-08-22 13:53:18 +0000 |
commit | 6bdc3becfd99880474b849ec32dc23dddf3cbf11 (patch) | |
tree | 959c4ce70e397e11563ce33035a8fcae4d558140 /util/sconfig/main.c | |
parent | f5b9e9aed11b3c4909aba8159c2b66e7ecd67a66 (diff) |
util/sconfig: Probe device when fw_config is unprovisioned
When fw_config is unprovisioned (eg. in the factory), devices that do
not have any probe list are enabled by default and those that have probe
list are disabled. On mainboards that support multiple types of boot
critical devices (eg. storage) through probing fw_config, all of
them are disabled when fw_config is unprovisioned. Hence the devices do
not boot to OS. Add sconfig fw_config rule `probe unprovisioned` to
enable such devices when fw_config is unprovisioned.
BUG=None
TEST=Build Brox firmware and boot to OS when fw_config is unprovisioned.
Change-Id: I178f821e077912776d654971924d67203a7c43df
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/83983
Reviewed-by: Jon Murphy <jpmurphy@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eric Lai <ericllai@google.com>
Reviewed-by: Ren Kuo <ren.kuo@quanta.corp-partner.google.com>
Diffstat (limited to 'util/sconfig/main.c')
-rw-r--r-- | util/sconfig/main.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/util/sconfig/main.c b/util/sconfig/main.c index acab06aace..c06e67ecac 100644 --- a/util/sconfig/main.c +++ b/util/sconfig/main.c @@ -581,6 +581,11 @@ void add_fw_config_probe(struct bus *bus, const char *field, const char *option) append_fw_config_probe_to_dev(bus->dev, probe); } +void probe_unprovisioned_fw_config(struct bus *bus) +{ + bus->dev->enable_on_unprovisioned_fw_config = true; +} + static uint64_t compute_fw_config_mask(const struct fw_config_field_bits *bits) { uint64_t mask = 0; @@ -1260,6 +1265,8 @@ static void pass1(FILE *fil, FILE *head, struct device *ptr, struct device *next fprintf(fil, "\t.sibling = NULL,\n"); if (ptr->probe) fprintf(fil, "\t.probe_list = %s_probe_list,\n", ptr->name); + fprintf(fil, "\t.enable_on_unprovisioned_fw_config = %d,\n", + ptr->enable_on_unprovisioned_fw_config); fprintf(fil, "#if !DEVTREE_EARLY\n"); fprintf(fil, "\t.chip_ops = &%s_ops,\n", chip_ins->chip->name_underscore); @@ -1783,6 +1790,8 @@ static void update_device(struct device *base_dev, struct device *override_dev) * to allow an override to remove a probe from the base device. */ base_dev->probe = override_dev->probe; + base_dev->enable_on_unprovisioned_fw_config = + override_dev->enable_on_unprovisioned_fw_config; /* Copy SMBIOS slot information from base device */ base_dev->smbios_slot_type = override_dev->smbios_slot_type; |