aboutsummaryrefslogtreecommitdiff
path: root/util/sconfig/sconfig.y
diff options
context:
space:
mode:
authorTim Wawrzynczak <twawrzynczak@chromium.org>2020-10-01 15:41:31 -0600
committerTim Wawrzynczak <twawrzynczak@chromium.org>2020-10-30 15:24:52 +0000
commit24b4af668b3f3995a5844560ce1885d30d8d8bfd (patch)
treea3dfb0a1e8b4d3b02c0b94b7d39e55e56c0e4961 /util/sconfig/sconfig.y
parenteafe7989ace4e5d0b4214b6b30467438da3965ff (diff)
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>
Diffstat (limited to 'util/sconfig/sconfig.y')
-rwxr-xr-xutil/sconfig/sconfig.y5
1 files changed, 3 insertions, 2 deletions
diff --git a/util/sconfig/sconfig.y b/util/sconfig/sconfig.y
index cf71b02f3e..84dfe248fd 100755
--- a/util/sconfig/sconfig.y
+++ b/util/sconfig/sconfig.y
@@ -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 */