Felix Singer has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/46348 )
Change subject: libpayload: Store pacc pointer in lib_sysinfo ......................................................................
libpayload: Store pacc pointer in lib_sysinfo
Change-Id: I496c5a3d78c7fb5d7c9f119a0c9a0314d54e729f Signed-off-by: Felix Singer felix.singer@secunet.com --- M payloads/libpayload/arch/x86/sysinfo.c M payloads/libpayload/include/sysinfo.h 2 files changed, 7 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/48/46348/1
diff --git a/payloads/libpayload/arch/x86/sysinfo.c b/payloads/libpayload/arch/x86/sysinfo.c index ffa57bb..e38e641 100644 --- a/payloads/libpayload/arch/x86/sysinfo.c +++ b/payloads/libpayload/arch/x86/sysinfo.c @@ -78,5 +78,10 @@ lib_sysinfo.memrange[1].type = CB_MEM_RAM; }
+#if CONFIG(PCI) + lib_sysinfo.pacc = pci_alloc(); + pci_scan_bus(lib_sysinfo.pacc); +#endif + return ret; } diff --git a/payloads/libpayload/include/sysinfo.h b/payloads/libpayload/include/sysinfo.h index fe3d330..26e3287 100644 --- a/payloads/libpayload/include/sysinfo.h +++ b/payloads/libpayload/include/sysinfo.h @@ -130,6 +130,8 @@
/* Pointer to FMAP cache in CBMEM */ uintptr_t fmap_cache; + + struct pci_access *pacc; };
extern struct sysinfo_t lib_sysinfo;
Angel Pons has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46348 )
Change subject: libpayload: Store pacc pointer in lib_sysinfo ......................................................................
Patch Set 1: Code-Review+1
Paul Menzel has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46348 )
Change subject: libpayload: Store pacc pointer in lib_sysinfo ......................................................................
Patch Set 1:
(1 comment)
https://review.coreboot.org/c/coreboot/+/46348/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/46348/1//COMMIT_MSG@8 PS1, Line 8: Please elaborate on the why.
Felix Singer has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46348 )
Change subject: libpayload/arch/x86: Introduce pacc pointer in sysinfo_t struct ......................................................................
Set Ready For Review
Felix Singer has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46348 )
Change subject: libpayload/arch/x86: Introduce pacc pointer in sysinfo_t struct ......................................................................
Patch Set 6:
(1 comment)
https://review.coreboot.org/c/coreboot/+/46348/1//COMMIT_MSG Commit Message:
https://review.coreboot.org/c/coreboot/+/46348/1//COMMIT_MSG@8 PS1, Line 8:
Please elaborate on the why.
Done
Hello build bot (Jenkins), Nico Huber, Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/46348
to look at the new patch set (#7).
Change subject: libpayload/arch/x86: Introduce pacc pointer in sysinfo_t struct ......................................................................
libpayload/arch/x86: Introduce pacc pointer in sysinfo_t struct
Currently, the PCI bus gets scanned multiple times for various reasons (e.g. to read the device class). Therefore, and in preperation to CB:46416, introduce the pacc pointer in the sysinfo_t struct and scan the PCI bus while gathering system information.
Change-Id: I496c5a3d78c7fb5d7c9f119a0c9a0314d54e729f Signed-off-by: Felix Singer felix.singer@secunet.com --- M payloads/libpayload/arch/x86/sysinfo.c M payloads/libpayload/include/sysinfo.h 2 files changed, 7 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/48/46348/7
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46348 )
Change subject: libpayload/arch/x86: Introduce pacc pointer in sysinfo_t struct ......................................................................
Patch Set 7:
Hmm, you may have noticed during rebase already. `sysinfo` changed upstream in the meantime. We abandoned virtual pointers there. There is an asy ways to fix this: Don't use a pointer. We can have a plain `struct pci_access` in `sysinfo`. Should be guarded by CONFIG(PCI) though, to not waste space if it's unused.
Hello build bot (Jenkins), Nico Huber, Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/46348
to look at the new patch set (#8).
Change subject: libpayload/arch/x86: Introduce pacc pointer in sysinfo_t struct ......................................................................
libpayload/arch/x86: Introduce pacc pointer in sysinfo_t struct
Currently, the PCI bus gets scanned multiple times for various reasons (e.g. to read the device class). Therefore, and in preparation to CB:46416, introduce the pacc pointer in the sysinfo_t struct and scan the PCI bus while gathering system information.
Change-Id: I496c5a3d78c7fb5d7c9f119a0c9a0314d54e729f Signed-off-by: Felix Singer felix.singer@secunet.com --- M payloads/libpayload/arch/x86/sysinfo.c M payloads/libpayload/include/sysinfo.h 2 files changed, 7 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/48/46348/8
Hello build bot (Jenkins), Nico Huber, Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/46348
to look at the new patch set (#9).
Change subject: libpayload/arch/x86: Introduce pacc pointer in sysinfo_t struct ......................................................................
libpayload/arch/x86: Introduce pacc pointer in sysinfo_t struct
Currently, the PCI bus gets scanned multiple times for various reasons (e.g. to read the device class). Therefore, and in preparation to CB:46416, introduce the pacc pointer in the sysinfo_t struct and scan the PCI bus while gathering system information.
Change-Id: I496c5a3d78c7fb5d7c9f119a0c9a0314d54e729f Signed-off-by: Felix Singer felix.singer@secunet.com --- M payloads/libpayload/arch/x86/sysinfo.c M payloads/libpayload/include/sysinfo.h 2 files changed, 9 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/48/46348/9
Hello build bot (Jenkins), Nico Huber, Angel Pons,
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/46348
to look at the new patch set (#11).
Change subject: libpayload/arch/x86: Introduce pacc pointer in sysinfo_t struct ......................................................................
libpayload/arch/x86: Introduce pacc pointer in sysinfo_t struct
Currently, the PCI bus gets scanned multiple times for various reasons (e.g. to read the device class). Therefore, and in preparation to CB:46416, introduce the pacc pointer in the sysinfo_t struct and scan the PCI bus while gathering system information.
Change-Id: I496c5a3d78c7fb5d7c9f119a0c9a0314d54e729f Signed-off-by: Felix Singer felix.singer@secunet.com --- M payloads/libpayload/arch/x86/sysinfo.c M payloads/libpayload/include/sysinfo.h 2 files changed, 10 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/48/46348/11
Nico Huber has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/46348 )
Change subject: libpayload/arch/x86: Introduce pacc pointer in sysinfo_t struct ......................................................................
Patch Set 12: Code-Review+2
Nico Huber has submitted this change. ( https://review.coreboot.org/c/coreboot/+/46348 )
Change subject: libpayload/arch/x86: Introduce pacc pointer in sysinfo_t struct ......................................................................
libpayload/arch/x86: Introduce pacc pointer in sysinfo_t struct
Currently, the PCI bus gets scanned multiple times for various reasons (e.g. to read the device class). Therefore, and in preparation to CB:46416, introduce the pacc pointer in the sysinfo_t struct and scan the PCI bus while gathering system information.
Change-Id: I496c5a3d78c7fb5d7c9f119a0c9a0314d54e729f Signed-off-by: Felix Singer felix.singer@secunet.com Reviewed-on: https://review.coreboot.org/c/coreboot/+/46348 Tested-by: build bot (Jenkins) no-reply@coreboot.org Reviewed-by: Nico Huber nico.h@gmx.de --- M payloads/libpayload/arch/x86/sysinfo.c M payloads/libpayload/include/sysinfo.h 2 files changed, 10 insertions(+), 0 deletions(-)
Approvals: build bot (Jenkins): Verified Nico Huber: Looks good to me, approved
diff --git a/payloads/libpayload/arch/x86/sysinfo.c b/payloads/libpayload/arch/x86/sysinfo.c index ffa57bb..5dd6067 100644 --- a/payloads/libpayload/arch/x86/sysinfo.c +++ b/payloads/libpayload/arch/x86/sysinfo.c @@ -78,5 +78,10 @@ lib_sysinfo.memrange[1].type = CB_MEM_RAM; }
+#if CONFIG(LP_PCI) + pci_init(&lib_sysinfo.pacc); + pci_scan_bus(&lib_sysinfo.pacc); +#endif + return ret; } diff --git a/payloads/libpayload/include/sysinfo.h b/payloads/libpayload/include/sysinfo.h index fe3d330..a3f61e7 100644 --- a/payloads/libpayload/include/sysinfo.h +++ b/payloads/libpayload/include/sysinfo.h @@ -29,6 +29,7 @@ #ifndef _SYSINFO_H #define _SYSINFO_H
+#include <pci/pci.h> #include <stdint.h>
/* Maximum number of memory range definitions. */ @@ -130,6 +131,10 @@
/* Pointer to FMAP cache in CBMEM */ uintptr_t fmap_cache; + +#if CONFIG(LP_PCI) + struct pci_access pacc; +#endif };
extern struct sysinfo_t lib_sysinfo;