fw_config: Convert fw_config to a 64-bit field

We all knew this was coming, 32 bits is never enough. Doing this early
so that it doesn't affect too much code yet. Take care of every usage of
fw_config throughout the codebase so the conversion is all done at once.

BUG=b:169668368
TEST=Hacked up this code to OR 0x1_000_0000 with CBI-sourced FW_CONFIG
and verify the console print contained that bit.

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: I6f2065d347eafa0ef7b346caeabdc3b626402092
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45939
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
This commit is contained in:
Tim Wawrzynczak
2020-10-01 15:41:31 -06:00
parent eafe7989ac
commit 24b4af668b
11 changed files with 60 additions and 46 deletions

View File

@@ -2,6 +2,7 @@
/* sconfig, coreboot device tree compiler */
/* SPDX-License-Identifier: GPL-2.0-only */
#include <stdint.h>
#include "sconfig.h"
int yylex();
@@ -16,7 +17,7 @@ static struct fw_config_field *cur_field;
struct device *dev;
struct chip_instance *chip_instance;
char *string;
int number;
uint64_t number;
}
%token CHIP DEVICE REGISTER ALIAS REFERENCE ASSOCIATION BOOL STATUS MANDATORY BUS RESOURCE END EQUALS HEX STRING PCI PNP I2C APIC CPU_CLUSTER CPU DOMAIN IRQ DRQ SLOT_DESC IO NUMBER SUBSYSTEMID INHERIT IOAPIC_IRQ IOAPIC PCIINT GENERIC SPI USB MMIO LPC ESPI FW_CONFIG_TABLE FW_CONFIG_FIELD FW_CONFIG_OPTION FW_CONFIG_PROBE
@@ -116,7 +117,7 @@ fw_config_field: FW_CONFIG_FIELD STRING {
/* option <value> */
fw_config_option: FW_CONFIG_OPTION STRING NUMBER /* == field value */
{ add_fw_config_option(cur_field, $<string>2, strtoul($<string>3, NULL, 0)); };
{ add_fw_config_option(cur_field, $<string>2, strtoull($<string>3, NULL, 0)); };
/* probe <field> <option> */
fw_config_probe: FW_CONFIG_PROBE STRING /* == field */ STRING /* == option */