Attention is currently required from: Felix Singer, Edward O'Callaghan, Angel Pons.
Hello Felix Singer, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/71622
to look at the new patch set (#5).
Change subject: dmi.c: Pass is_laptop by ref into dmi
......................................................................
dmi.c: Pass is_laptop by ref into dmi
Prefix the remaining global cases with `g_` to avoid shadowing
issues and for easy greping.
Change-Id: I3d5ad6c0623269492d775a99a947fd6fe26c5f91
Signed-off-by: Edward O'Callaghan <quasisec(a)google.com>
---
M board_enable.c
M dmi.c
M include/programmer.h
M internal.c
4 files changed, 44 insertions(+), 31 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/22/71622/5
--
To view, visit https://review.coreboot.org/c/flashrom/+/71622
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: I3d5ad6c0623269492d775a99a947fd6fe26c5f91
Gerrit-Change-Number: 71622
Gerrit-PatchSet: 5
Gerrit-Owner: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-CC: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Attention: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-MessageType: newpatchset
Edward O'Callaghan has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/73570 )
Change subject: pcidev: remove pcidev_getdevfn() function
......................................................................
Patch Set 4:
(1 comment)
Patchset:
PS4:
Hmm, the intention of `pcidev_getdevfn()` was to try and constrain `pacc` usage in the one place.
--
To view, visit https://review.coreboot.org/c/flashrom/+/73570
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Id2983420080f75ae6992edfb032bf5c83b29c803
Gerrit-Change-Number: 73570
Gerrit-PatchSet: 4
Gerrit-Owner: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Comment-Date: Fri, 10 Mar 2023 23:44:40 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment
Thomas Heijligen has submitted this change. ( https://review.coreboot.org/c/flashrom/+/73293 )
(
3 is the latest approved patch-set.
No files were changed between the latest approved patch-set and the submitted one.
)Change subject: libpci: drop support for pciutils < 2.2.0
......................................................................
libpci: drop support for pciutils < 2.2.0
This version was released in september 2005 and had a breaking api
change. Drop it so that we don't need to maintain the old codepath any
longer. Beside that, we have already a second codepath which is using
the new `pci_get_dev` variant exclusively.
Change-Id: If943db350b561a005d8292a53d9255223db3d571
Signed-off-by: Thomas Heijligen <thomas.heijligen(a)secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/73293
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Anastasia Klimchuk <aklm(a)chromium.org>
Reviewed-by: Angel Pons <th3fanbus(a)gmail.com>
---
M Makefile
D Makefile.d/pci_old_get_dev_test.c
M include/platform/pci.h
M meson.build
M pcidev.c
5 files changed, 35 insertions(+), 40 deletions(-)
Approvals:
build bot (Jenkins): Verified
Angel Pons: Looks good to me, but someone else must approve
Anastasia Klimchuk: Looks good to me, approved
diff --git a/Makefile b/Makefile
index 6038faf..0e16942 100644
--- a/Makefile
+++ b/Makefile
@@ -251,7 +251,6 @@
HAS_LIBUSB1 := $(call find_dependency, libusb-1.0)
HAS_LIBPCI := $(call find_dependency, libpci)
-HAS_PCI_OLD_GET_DEV := $(call c_compile_test, Makefile.d/pci_old_get_dev_test.c, $(CONFIG_LIBPCI_CFLAGS))
HAS_FT232H := $(call c_compile_test, Makefile.d/ft232h_test.c, $(CONFIG_LIBFTDI1_CFLAGS))
HAS_UTSNAME := $(call c_compile_test, Makefile.d/utsname_test.c)
HAS_CLOCK_GETTIME := $(call c_compile_test, Makefile.d/clock_gettime_test.c)
@@ -981,7 +980,6 @@
@if [ $(ENDIAN) = unknown ]; then echo Aborting.; exit 1; fi
@echo Dependency libpci found: $(HAS_LIBPCI) $(CONFIG_LIBPCI_VERSION)
@if [ $(HAS_LIBPCI) = yes ]; then \
- echo " Checking for old \"pci_get_dev()\": $(HAS_PCI_OLD_GET_DEV)";\
echo " CFLAGS: $(CONFIG_LIBPCI_CFLAGS)"; \
echo " LDFLAGS: $(CONFIG_LIBPCI_LDFLAGS)"; \
fi
diff --git a/Makefile.d/pci_old_get_dev_test.c b/Makefile.d/pci_old_get_dev_test.c
deleted file mode 100644
index 3223651..0000000
--- a/Makefile.d/pci_old_get_dev_test.c
+++ /dev/null
@@ -1,17 +0,0 @@
-/* Avoid a failing test due to libpci header symbol shadowing breakage */
-#define index shadow_workaround_index
-#if !defined __NetBSD__
-#include <pci/pci.h>
-#else
-#include <pciutils/pci.h>
-#endif
-struct pci_access *pacc;
-struct pci_dev *dev = {0};
-int main(int argc, char **argv)
-{
- (void) argc;
- (void) argv;
- pacc = pci_alloc();
- dev = pci_get_dev(pacc, dev->bus, dev->dev, 1);
- return 0;
-}
diff --git a/include/platform/pci.h b/include/platform/pci.h
index a0324f8..4ac108f 100644
--- a/include/platform/pci.h
+++ b/include/platform/pci.h
@@ -1,19 +1,23 @@
/*
- * This is a wrapper for libpci.
- * ...
+ * This file is part of the flashrom project.
+ *
+ * Copyright (C) 2022 secunet Security Networks AG
+ * (written by Thomas Heijligen <thomas.heijligen(a)secunet.com)
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
*/
-
#ifndef __PLATFORM_PCI_H__
#define __PLATFORM_PCI_H__
-/*
- * An old libpci version seems to use the variable name "index" which triggers
- * shadowing warnings on systems which have the index() function in a default
- * #include or as builtin.
- */
-#define index shadow_workaround_index
-
/* Some NetBSDs are using an other include path for pci.h
* e.g. NetBSD 9.0 on sparc64 pciutils-3.7.0nb2.
* Other NetBSD platforms and versions uses the default path under pci/pci.h
@@ -24,6 +28,4 @@
#include <pci/pci.h>
#endif
-#undef index
-
#endif /* __PLATFORM_PCI_H__ */
diff --git a/meson.build b/meson.build
index 2ecb5fa..5c38749 100644
--- a/meson.build
+++ b/meson.build
@@ -126,7 +126,8 @@
group_internal = get_option('programmer').contains('group_internal')
group_external = get_option('programmer').contains('group_external')
-libpci = dependency('libpci', required : group_pci, static : (host_machine.system() == 'openbsd' ? true : false)) # On openbsd a static version of libpci is needed to get also -libz
+libpci = dependency('libpci', required : group_pci, version : '>=2.2.0',
+ static : (host_machine.system() == 'openbsd' ? true : false)) # On openbsd a static version of libpci is needed to get also -libz
libusb1 = dependency('libusb-1.0', required : group_usb)
libftdi1 = dependency('libftdi1', required : group_ftdi)
libjaylink = dependency('libjaylink', required : group_jlink)
diff --git a/pcidev.c b/pcidev.c
index 0b35944..696510e 100644
--- a/pcidev.c
+++ b/pcidev.c
@@ -192,15 +192,7 @@
struct pci_dev *pcidev_getdevfn(struct pci_dev *dev, const int func)
{
-#if !defined(OLD_PCI_GET_DEV)
struct pci_dev *const new = pci_get_dev(pacc, dev->domain, dev->bus, dev->dev, func);
-#else
- /* pciutils/libpci before version 2.2 is too old to support
- * PCI domains. Such old machines usually don't have domains
- * besides domain 0, so this is not a problem.
- */
- struct pci_dev *const new = pci_get_dev(pacc, dev->bus, dev->dev, func);
-#endif
if (new)
pci_fill_info(new, PCI_FILL_IDENT);
return new;
--
To view, visit https://review.coreboot.org/c/flashrom/+/73293
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: If943db350b561a005d8292a53d9255223db3d571
Gerrit-Change-Number: 73293
Gerrit-PatchSet: 5
Gerrit-Owner: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Thomas Heijligen has submitted this change. ( https://review.coreboot.org/c/flashrom/+/73292 )
Change subject: include/pci.h: Use __has_include() macro to test pci.h path
......................................................................
include/pci.h: Use __has_include() macro to test pci.h path
Some NetBSDs have the pci.h under pciutils/ instead of pci/. But we
can't say for sure which variants uses which include path. Just test
them with the __has_include() compiler macro.
https://gcc.gnu.org/onlinedocs/cpp/_005f_005fhas_005finclude.html
Change-Id: Ib20de6bffede910b89937f554b4d56f4799f0762
Signed-off-by: Thomas Heijligen <thomas.heijligen(a)secunet.com>
Reviewed-on: https://review.coreboot.org/c/flashrom/+/73292
Reviewed-by: Edward O'Callaghan <quasisec(a)chromium.org>
Reviewed-by: Anastasia Klimchuk <aklm(a)chromium.org>
Tested-by: build bot (Jenkins) <no-reply(a)coreboot.org>
Reviewed-by: Angel Pons <th3fanbus(a)gmail.com>
---
M include/platform/pci.h
1 file changed, 27 insertions(+), 3 deletions(-)
Approvals:
build bot (Jenkins): Verified
Angel Pons: Looks good to me, approved
Edward O'Callaghan: Looks good to me, approved
Anastasia Klimchuk: Looks good to me, approved
diff --git a/include/platform/pci.h b/include/platform/pci.h
index 93bc163..a0324f8 100644
--- a/include/platform/pci.h
+++ b/include/platform/pci.h
@@ -14,12 +14,16 @@
*/
#define index shadow_workaround_index
-#if defined (__NetBSD__)
-#include <pci.h>
+/* Some NetBSDs are using an other include path for pci.h
+ * e.g. NetBSD 9.0 on sparc64 pciutils-3.7.0nb2.
+ * Other NetBSD platforms and versions uses the default path under pci/pci.h
+ */
+#if __has_include(<pciutils/pci.h>)
+#include <pciutils/pci.h>
#else
#include <pci/pci.h>
#endif
#undef index
-#endif /* __PLATFORM_PCI_H__ */
\ No newline at end of file
+#endif /* __PLATFORM_PCI_H__ */
--
To view, visit https://review.coreboot.org/c/flashrom/+/73292
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Ib20de6bffede910b89937f554b4d56f4799f0762
Gerrit-Change-Number: 73292
Gerrit-PatchSet: 3
Gerrit-Owner: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Edward O'Callaghan <quasisec(a)chromium.org>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-MessageType: merged
Attention is currently required from: Felix Singer, Thomas Heijligen, Anastasia Klimchuk.
Aarya has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/73642 )
Change subject: MAINTAINERS: Add Aarya Chaumal for erasure_layout
......................................................................
Patch Set 2:
(2 comments)
File MAINTAINERS:
https://review.coreboot.org/c/flashrom/+/73642/comment/c5866945_3cf4935c
PS1, Line 106: ERASE SELECTION
> my suggestion: […]
Done
https://review.coreboot.org/c/flashrom/+/73642/comment/5872ffc1_37b62aeb
PS1, Line 106: ERASE
> Ah and also this needs to go in abc order, so this should go after BUILD SYSTEM
Done
--
To view, visit https://review.coreboot.org/c/flashrom/+/73642
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Id0188add883336f2fb494e4169a668e8b502682f
Gerrit-Change-Number: 73642
Gerrit-PatchSet: 2
Gerrit-Owner: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Comment-Date: Fri, 10 Mar 2023 10:38:07 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-MessageType: comment
Attention is currently required from: Felix Singer, Thomas Heijligen, Aarya.
Hello Felix Singer, build bot (Jenkins), Thomas Heijligen, Angel Pons, Anastasia Klimchuk,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/flashrom/+/73642
to look at the new patch set (#2).
Change subject: MAINTAINERS: Add Aarya Chaumal for erasure_layout
......................................................................
MAINTAINERS: Add Aarya Chaumal for erasure_layout
Change-Id: Id0188add883336f2fb494e4169a668e8b502682f
Signed-off-by: Aarya Chaumal <aarya.chaumal(a)gmail.com>
---
M MAINTAINERS
1 file changed, 16 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/flashrom refs/changes/42/73642/2
--
To view, visit https://review.coreboot.org/c/flashrom/+/73642
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Id0188add883336f2fb494e4169a668e8b502682f
Gerrit-Change-Number: 73642
Gerrit-PatchSet: 2
Gerrit-Owner: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-MessageType: newpatchset
Attention is currently required from: Felix Singer, Thomas Heijligen, Aarya.
Anastasia Klimchuk has posted comments on this change. ( https://review.coreboot.org/c/flashrom/+/73642 )
Change subject: MAINTAINERS: Add Aarya Chaumal for erasure_layout
......................................................................
Patch Set 1:
(1 comment)
File MAINTAINERS:
https://review.coreboot.org/c/flashrom/+/73642/comment/ce1549ab_93dcd723
PS1, Line 106: ERASE
Ah and also this needs to go in abc order, so this should go after BUILD SYSTEM
--
To view, visit https://review.coreboot.org/c/flashrom/+/73642
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: flashrom
Gerrit-Branch: master
Gerrit-Change-Id: Id0188add883336f2fb494e4169a668e8b502682f
Gerrit-Change-Number: 73642
Gerrit-PatchSet: 1
Gerrit-Owner: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Reviewer: Anastasia Klimchuk <aklm(a)chromium.org>
Gerrit-Reviewer: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Reviewer: Thomas Heijligen <src(a)posteo.de>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Attention: Felix Singer <felixsinger(a)posteo.net>
Gerrit-Attention: Thomas Heijligen <src(a)posteo.de>
Gerrit-Attention: Aarya <aarya.chaumal(a)gmail.com>
Gerrit-Comment-Date: Fri, 10 Mar 2023 08:59:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Gerrit-MessageType: comment