Skip to content

Commit

Permalink
flashrom: Applying upstreamed RaptorPoint PCH support patch proposed …
Browse files Browse the repository at this point in the history
…upstream fails to build on 1.4.0

2024-08-09 15:08:07+00:00 MAKE flashrom
tail /home/user/heads/build/x86/log/flashrom.log
-----
ichspi.c:2152:2: note: previously used here
  case CHIPSET_METEOR_LAKE:
  ^~~~
/home/user/heads/crossgcc/x86/bin/x86_64-linux-musl-gcc -fdebug-prefix-map=/home/user/heads=heads -gno-record-gcc-switches -D__MUSL__ --sysroot  /home/user/heads/install/x86 -isystem /home/user/heads/install/x86/include -L/home/user/heads/install/x86/lib  -MMD -Os -I/home/user/heads/install/x86/include/pci -Iinclude -I/home/user/heads/install/x86//include -D'HAVE_GETOPT_H=1'   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_DELAY_MINIMUM_SLEEP_US=100000' -D'CONFIG_INTERNAL=1' -D'CONFIG_INTERNAL_DMI=1' -D'__FLASHROM_HAVE_OUTB__=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION="1.4.0 (git:v0.2.0-2284-g88513e3f06)"'  -o hwaccess_x86_io.o -c hwaccess_x86_io.c
ichspi.c: In function 'init_ich_default':
ichspi.c:2381:48: error: expected ';' before ')' token
       ich_gen == CHIPSET_C740_SERIES_EMMITSBURG)) {
                                                ^
                                                ;
ichspi.c:2381:48: error: expected statement before ')' token
ichspi.c:2381:49: error: expected statement before ')' token
       ich_gen == CHIPSET_C740_SERIES_EMMITSBURG)) {
                                                 ^
ichspi.c:2504:1: error: expected declaration or statement at end of input
 }
 ^
/home/user/heads/crossgcc/x86/bin/x86_64-linux-musl-gcc -fdebug-prefix-map=/home/user/heads=heads -gno-record-gcc-switches -D__MUSL__ --sysroot  /home/user/heads/install/x86 -isystem /home/user/heads/install/x86/include -L/home/user/heads/install/x86/lib  -MMD -Os -I/home/user/heads/install/x86/include/pci -Iinclude -I/home/user/heads/install/x86//include -D'HAVE_GETOPT_H=1'   -D'IS_WINDOWS=0' -D'__FLASHROM_LITTLE_ENDIAN__=1' -D'CONFIG_DEFAULT_PROGRAMMER_NAME=NULL' -D'CONFIG_DEFAULT_PROGRAMMER_ARGS=""' -D'CONFIG_DELAY_MINIMUM_SLEEP_US=100000' -D'CONFIG_INTERNAL=1' -D'CONFIG_INTERNAL_DMI=1' -D'__FLASHROM_HAVE_OUTB__=1' -D'HAVE_UTSNAME=1' -D'HAVE_CLOCK_GETTIME=1' -D'FLASHROM_VERSION="1.4.0 (git:v0.2.0-2284-g88513e3f06)"'  -o hwaccess_physmap.o -c hwaccess_physmap.c
make[1]: *** [Makefile:1050: ichspi.o] Error 1

Signed-off-by: Thierry Laurion <insurgo@riseup.net>
  • Loading branch information
tlaurion committed Aug 9, 2024
1 parent 88513e3 commit e8aaaab
Showing 1 changed file with 61 additions and 59 deletions.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
From 24b8fcfccef31fbb95bc1dd308180f57d5cdb64c Mon Sep 17 00:00:00 2001
From 91be4b39e6c32463b506097f916352f6795800cd Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Micha=C5=82=20=C5=BBygowski?= <michal.zygowski@3mdeb.com>
Date: Mon, 19 Jun 2023 09:36:52 +0200
Subject: [PATCH] Add RaptorPoint PCH support
Subject: [PATCH] ichspi: Add RaptorPoint PCH support
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit
Expand All @@ -11,40 +11,40 @@ Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
---
chipset_enable.c | 20 ++++++++++++++++++-
ich_descriptors.c | 9 +++++++++
ichspi.c | 8 +++++++-
ichspi.c | 7 +++++++
include/programmer.h | 1 +
.../ich_descriptors_tool.c | 2 ++
5 files changed, 38 insertions(+), 2 deletions(-)
5 files changed, 38 insertions(+), 1 deletion(-)

diff --git a/chipset_enable.c b/chipset_enable.c
index d6103c13b..3a07d6093 100644
index facf29e500..6b1c1b5c99 100644
--- a/chipset_enable.c
+++ b/chipset_enable.c
@@ -607,6 +607,7 @@ static enum chipbustype enable_flash_ich_report_gcs(
@@ -606,6 +606,7 @@ static enum chipbustype enable_flash_ich_report_gcs(
case CHIPSET_400_SERIES_COMET_POINT:
case CHIPSET_500_SERIES_TIGER_POINT:
case CHIPSET_600_SERIES_ALDER_POINT:
+ case CHIPSET_700_SERIES_RAPTOR_POINT:
case CHIPSET_METEOR_LAKE:
case CHIPSET_PANTHER_LAKE:
case CHIPSET_ELKHART_LAKE:
case CHIPSET_APOLLO_LAKE:
@@ -714,6 +715,7 @@ static enum chipbustype enable_flash_ich_report_gcs(
break;
case CHIPSET_500_SERIES_TIGER_POINT:
case CHIPSET_600_SERIES_ALDER_POINT:
+ case CHIPSET_700_SERIES_RAPTOR_POINT:
case CHIPSET_C740_SERIES_EMMITSBURG:
case CHIPSET_METEOR_LAKE:
boot_straps = boot_straps_pch500;
break;
@@ -749,6 +751,7 @@ static enum chipbustype enable_flash_ich_report_gcs(
case CHIPSET_PANTHER_LAKE:
@@ -751,6 +753,7 @@ static enum chipbustype enable_flash_ich_report_gcs(
case CHIPSET_400_SERIES_COMET_POINT:
case CHIPSET_500_SERIES_TIGER_POINT:
case CHIPSET_600_SERIES_ALDER_POINT:
+ case CHIPSET_700_SERIES_RAPTOR_POINT:
case CHIPSET_METEOR_LAKE:
case CHIPSET_PANTHER_LAKE:
case CHIPSET_APOLLO_LAKE:
case CHIPSET_GEMINI_LAKE:
@@ -1009,6 +1012,11 @@ static int enable_flash_pch600(const struct programmer_cfg *cfg, struct pci_dev
@@ -1017,6 +1020,11 @@ static int enable_flash_pch600(const struct programmer_cfg *cfg, struct pci_dev
return enable_flash_pch100_or_c620(cfg, dev, name, 0x1f, 5, CHIPSET_600_SERIES_ALDER_POINT);
}

Expand All @@ -56,7 +56,7 @@ index d6103c13b..3a07d6093 100644
static int enable_flash_mtl(const struct programmer_cfg *cfg, struct pci_dev *const dev, const char *const name)
{
return enable_flash_pch100_or_c620(cfg, dev, name, 0x1f, 5, CHIPSET_METEOR_LAKE);
@@ -2175,9 +2183,19 @@ const struct penable chipset_enables[] = {
@@ -2190,9 +2198,19 @@ const struct penable chipset_enables[] = {
{0x8086, 0x7a83, B_S, NT, "Intel", "Q670", enable_flash_pch600},
{0x8086, 0x7a84, B_S, DEP, "Intel", "Z690", enable_flash_pch600},
{0x8086, 0x7a88, B_S, NT, "Intel", "W680", enable_flash_pch600},
Expand All @@ -75,155 +75,154 @@ index d6103c13b..3a07d6093 100644
+ {0x8086, 0x7a14, B_S, NT, "Intel", "C262", enable_flash_pch700},
+ {0x8086, 0x7a13, B_S, NT, "Intel", "C266", enable_flash_pch700},
{0x8086, 0x7e23, B_S, DEP, "Intel", "Meteor Lake-P/M", enable_flash_mtl},
#endif
{0},
{0x8086, 0xe323, B_S, DEP, "Intel", "Panther Lake-U/H 12Xe", enable_flash_ptl},
{0x8086, 0xe423, B_S, DEP, "Intel", "Panther Lake-H 4Xe", enable_flash_ptl},
diff --git a/ich_descriptors.c b/ich_descriptors.c
index b37ce6d51..416b610cc 100644
index eaf44b0693..c436fabd37 100644
--- a/ich_descriptors.c
+++ b/ich_descriptors.c
@@ -48,6 +48,7 @@ ssize_t ich_number_of_regions(const enum ich_chipset cs, const struct ich_desc_c
@@ -49,6 +49,7 @@ ssize_t ich_number_of_regions(const enum ich_chipset cs, const struct ich_desc_c
case CHIPSET_400_SERIES_COMET_POINT:
case CHIPSET_500_SERIES_TIGER_POINT:
case CHIPSET_600_SERIES_ALDER_POINT:
+ case CHIPSET_700_SERIES_RAPTOR_POINT:
case CHIPSET_METEOR_LAKE:
case CHIPSET_PANTHER_LAKE:
case CHIPSET_ELKHART_LAKE:
case CHIPSET_JASPER_LAKE:
@@ -77,6 +78,7 @@ ssize_t ich_number_of_masters(const enum ich_chipset cs, const struct ich_desc_c
case CHIPSET_C620_SERIES_LEWISBURG:
@@ -80,6 +81,7 @@ ssize_t ich_number_of_masters(const enum ich_chipset cs, const struct ich_desc_c
case CHIPSET_C740_SERIES_EMMITSBURG:
case CHIPSET_APOLLO_LAKE:
case CHIPSET_600_SERIES_ALDER_POINT:
+ case CHIPSET_700_SERIES_RAPTOR_POINT:
case CHIPSET_METEOR_LAKE:
case CHIPSET_PANTHER_LAKE:
case CHIPSET_GEMINI_LAKE:
case CHIPSET_JASPER_LAKE:
@@ -215,6 +217,7 @@ static const char *pprint_density(enum ich_chipset cs, const struct ich_descript
@@ -221,6 +223,7 @@ static const char *pprint_density(enum ich_chipset cs, const struct ich_descript
case CHIPSET_400_SERIES_COMET_POINT:
case CHIPSET_500_SERIES_TIGER_POINT:
case CHIPSET_600_SERIES_ALDER_POINT:
+ case CHIPSET_700_SERIES_RAPTOR_POINT:
case CHIPSET_METEOR_LAKE:
case CHIPSET_PANTHER_LAKE:
case CHIPSET_APOLLO_LAKE:
case CHIPSET_GEMINI_LAKE:
@@ -313,6 +316,7 @@ static const char *pprint_freq(enum ich_chipset cs, uint8_t value)
@@ -320,6 +323,7 @@ static const char *pprint_freq(enum ich_chipset cs, uint8_t value)
return freq_str[2][value];
case CHIPSET_500_SERIES_TIGER_POINT:
case CHIPSET_600_SERIES_ALDER_POINT:
+ case CHIPSET_700_SERIES_RAPTOR_POINT:
case CHIPSET_C740_SERIES_EMMITSBURG:
case CHIPSET_METEOR_LAKE:
return freq_str[3][value];
case CHIPSET_ELKHART_LAKE:
@@ -361,6 +365,7 @@ void prettyprint_ich_descriptor_component(enum ich_chipset cs, const struct ich_
case CHIPSET_PANTHER_LAKE:
@@ -371,6 +375,7 @@ void prettyprint_ich_descriptor_component(enum ich_chipset cs, const struct ich_
case CHIPSET_400_SERIES_COMET_POINT:
case CHIPSET_500_SERIES_TIGER_POINT:
case CHIPSET_600_SERIES_ALDER_POINT:
+ case CHIPSET_700_SERIES_RAPTOR_POINT:
case CHIPSET_METEOR_LAKE:
case CHIPSET_PANTHER_LAKE:
case CHIPSET_APOLLO_LAKE:
case CHIPSET_GEMINI_LAKE:
@@ -489,6 +494,7 @@ void prettyprint_ich_descriptor_master(const enum ich_chipset cs, const struct i
@@ -512,6 +517,7 @@ void prettyprint_ich_descriptor_master(const enum ich_chipset cs, const struct i
cs == CHIPSET_400_SERIES_COMET_POINT ||
cs == CHIPSET_500_SERIES_TIGER_POINT ||
cs == CHIPSET_600_SERIES_ALDER_POINT ||
+ cs == CHIPSET_700_SERIES_RAPTOR_POINT ||
cs == CHIPSET_JASPER_LAKE || cs == CHIPSET_METEOR_LAKE) {
const char *const master_names[] = {
"BIOS", "ME", "GbE", "unknown", "EC",
@@ -1087,6 +1093,7 @@ static enum ich_chipset guess_ich_chipset(const struct ich_desc_content *const c
cs == CHIPSET_C740_SERIES_EMMITSBURG ||
cs == CHIPSET_JASPER_LAKE ||
cs == CHIPSET_METEOR_LAKE ||
@@ -1115,6 +1121,7 @@ static enum ich_chipset guess_ich_chipset(const struct ich_desc_content *const c
case CHIPSET_400_SERIES_COMET_POINT:
case CHIPSET_500_SERIES_TIGER_POINT:
case CHIPSET_600_SERIES_ALDER_POINT:
+ case CHIPSET_700_SERIES_RAPTOR_POINT:
case CHIPSET_METEOR_LAKE:
case CHIPSET_PANTHER_LAKE:
case CHIPSET_GEMINI_LAKE:
case CHIPSET_JASPER_LAKE:
@@ -1246,6 +1253,7 @@ int getFCBA_component_density(enum ich_chipset cs, const struct ich_descriptors
@@ -1277,6 +1284,7 @@ int getFCBA_component_density(enum ich_chipset cs, const struct ich_descriptors
case CHIPSET_400_SERIES_COMET_POINT:
case CHIPSET_500_SERIES_TIGER_POINT:
case CHIPSET_600_SERIES_ALDER_POINT:
+ case CHIPSET_700_SERIES_RAPTOR_POINT:
case CHIPSET_METEOR_LAKE:
case CHIPSET_PANTHER_LAKE:
case CHIPSET_APOLLO_LAKE:
case CHIPSET_GEMINI_LAKE:
@@ -1291,6 +1299,7 @@ static uint32_t read_descriptor_reg(enum ich_chipset cs, uint8_t section, uint16
@@ -1324,6 +1332,7 @@ static uint32_t read_descriptor_reg(enum ich_chipset cs, uint8_t section, uint16
case CHIPSET_400_SERIES_COMET_POINT:
case CHIPSET_500_SERIES_TIGER_POINT:
case CHIPSET_600_SERIES_ALDER_POINT:
+ case CHIPSET_700_SERIES_RAPTOR_POINT:
case CHIPSET_METEOR_LAKE:
case CHIPSET_PANTHER_LAKE:
case CHIPSET_APOLLO_LAKE:
case CHIPSET_GEMINI_LAKE:
diff --git a/ichspi.c b/ichspi.c
index c94d9971f..f50654784 100644
index f74fb05c9e..9718600b91 100644
--- a/ichspi.c
+++ b/ichspi.c
@@ -1884,6 +1884,7 @@ static void init_chipset_properties(struct swseq_data *swseq, struct hwseq_data
@@ -2106,6 +2106,7 @@ static void init_chipset_properties(struct swseq_data *swseq, struct hwseq_data
case CHIPSET_400_SERIES_COMET_POINT:
case CHIPSET_500_SERIES_TIGER_POINT:
case CHIPSET_600_SERIES_ALDER_POINT:
+ case CHIPSET_700_SERIES_RAPTOR_POINT:
case CHIPSET_METEOR_LAKE:
case CHIPSET_APOLLO_LAKE:
case CHIPSET_GEMINI_LAKE:
@@ -1923,6 +1924,7 @@ static void init_chipset_properties(struct swseq_data *swseq, struct hwseq_data
case CHIPSET_JASPER_LAKE:
@@ -2147,6 +2148,8 @@ static void init_chipset_properties(struct swseq_data *swseq, struct hwseq_data
case CHIPSET_400_SERIES_COMET_POINT:
case CHIPSET_500_SERIES_TIGER_POINT:
case CHIPSET_600_SERIES_ALDER_POINT:
+ case CHIPSET_700_SERIES_RAPTOR_POINT:
case CHIPSET_METEOR_LAKE:
+ case CHIPSET_METEOR_LAKE:
case CHIPSET_APOLLO_LAKE:
case CHIPSET_GEMINI_LAKE:
@@ -1984,6 +1986,7 @@ static int init_ich_default(const struct programmer_cfg *cfg, void *spibar, enum
case CHIPSET_JASPER_LAKE:
@@ -2210,6 +2213,7 @@ static int init_ich_default(const struct programmer_cfg *cfg, void *spibar, enum
case CHIPSET_400_SERIES_COMET_POINT:
case CHIPSET_500_SERIES_TIGER_POINT:
case CHIPSET_600_SERIES_ALDER_POINT:
+ case CHIPSET_700_SERIES_RAPTOR_POINT:
case CHIPSET_METEOR_LAKE:
case CHIPSET_APOLLO_LAKE:
case CHIPSET_GEMINI_LAKE:
@@ -2064,6 +2067,7 @@ static int init_ich_default(const struct programmer_cfg *cfg, void *spibar, enum
case CHIPSET_JASPER_LAKE:
@@ -2291,6 +2295,7 @@ static int init_ich_default(const struct programmer_cfg *cfg, void *spibar, enum
case CHIPSET_400_SERIES_COMET_POINT:
case CHIPSET_500_SERIES_TIGER_POINT:
case CHIPSET_600_SERIES_ALDER_POINT:
+ case CHIPSET_700_SERIES_RAPTOR_POINT:
case CHIPSET_METEOR_LAKE:
case CHIPSET_APOLLO_LAKE:
case CHIPSET_GEMINI_LAKE:
@@ -2103,6 +2107,7 @@ static int init_ich_default(const struct programmer_cfg *cfg, void *spibar, enum
case CHIPSET_JASPER_LAKE:
@@ -2332,6 +2337,7 @@ static int init_ich_default(const struct programmer_cfg *cfg, void *spibar, enum
case CHIPSET_400_SERIES_COMET_POINT:
case CHIPSET_500_SERIES_TIGER_POINT:
case CHIPSET_600_SERIES_ALDER_POINT:
+ case CHIPSET_700_SERIES_RAPTOR_POINT:
case CHIPSET_METEOR_LAKE:
case CHIPSET_APOLLO_LAKE:
case CHIPSET_GEMINI_LAKE:
@@ -2140,7 +2145,8 @@ static int init_ich_default(const struct programmer_cfg *cfg, void *spibar, enum
ich_gen == CHIPSET_300_SERIES_CANNON_POINT ||
case CHIPSET_JASPER_LAKE:
@@ -2371,6 +2377,7 @@ static int init_ich_default(const struct programmer_cfg *cfg, void *spibar, enum
ich_gen == CHIPSET_400_SERIES_COMET_POINT ||
ich_gen == CHIPSET_500_SERIES_TIGER_POINT ||
- ich_gen == CHIPSET_600_SERIES_ALDER_POINT)) {
+ ich_gen == CHIPSET_600_SERIES_ALDER_POINT ||
ich_gen == CHIPSET_600_SERIES_ALDER_POINT ||
+ ich_gen == CHIPSET_700_SERIES_RAPTOR_POINT)) {
ich_gen == CHIPSET_C740_SERIES_EMMITSBURG)) {
msg_pdbg("Enabling hardware sequencing by default for 100+ series PCH.\n");
ich_spi_mode = ich_hwseq;
}
diff --git a/include/programmer.h b/include/programmer.h
index 1c5d82096..c64dbac7a 100644
index a90624b13c..0210038892 100644
--- a/include/programmer.h
+++ b/include/programmer.h
@@ -376,6 +376,7 @@ enum ich_chipset {
@@ -357,6 +357,7 @@ enum ich_chipset {
CHIPSET_400_SERIES_COMET_POINT,
CHIPSET_500_SERIES_TIGER_POINT,
CHIPSET_600_SERIES_ALDER_POINT,
+ CHIPSET_700_SERIES_RAPTOR_POINT,
CHIPSET_METEOR_LAKE,
CHIPSET_APOLLO_LAKE,
CHIPSET_GEMINI_LAKE,
CHIPSET_JASPER_LAKE,
diff --git a/util/ich_descriptors_tool/ich_descriptors_tool.c b/util/ich_descriptors_tool/ich_descriptors_tool.c
index a5a59ad29..44af49b6a 100644
index 09587f7528..d5289b9534 100644
--- a/util/ich_descriptors_tool/ich_descriptors_tool.c
+++ b/util/ich_descriptors_tool/ich_descriptors_tool.c
@@ -238,6 +238,8 @@ int main(int argc, char *argv[])
@@ -239,6 +239,8 @@ int main(int argc, char *argv[])
cs = CHIPSET_500_SERIES_TIGER_POINT;
else if (strcmp(csn, "600") == 0)
cs = CHIPSET_600_SERIES_ALDER_POINT;
Expand All @@ -232,3 +231,6 @@ index a5a59ad29..44af49b6a 100644
else if (strcmp(csn, "apollo") == 0)
cs = CHIPSET_APOLLO_LAKE;
else if (strcmp(csn, "gemini") == 0)
--
2.39.2

0 comments on commit e8aaaab

Please sign in to comment.