coreboot-kgpe-d16/payloads/coreinfo
Kyösti Mälkki 1dc5ce31ce coreinfo: Skip unpopulated PCI functions
Per PCI specification, function 0 must be present,
so functions 1 to 7 can be skipped in this case.

For a device that is not multi-function, it may not
decode function number in the hardware at all. To
avoid registering such a device eight times, skip
scanning functions 1 to 7.

Without the latter fix, a single-function PCI bridge
may call pci_scan_bus() second time and secondary
side devices would get appended second time in the
array devices[]. At that point, quicksort() apparently
hits an infinite recursion loop.

Since pci_scan_bus() is called in part of the early
modules->init() sequence early in main(), the errors
here left coreinfo payload completely silent when
PCI module was built-in on affected system.

Terminal screen was cleared, though.

Change-Id: Ifc6622f050b98afb7196de0cc3a863c4cdfa6c94
Signed-off-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-on: https://review.coreboot.org/26990
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2018-06-14 07:59:05 +00:00
..
COPYING
Kconfig coreinfo: Add support to read timestamps 2016-07-20 22:09:32 +02:00
Makefile build system: don't run xcompile or git for %clean/%config targets 2017-01-24 23:22:56 +01:00
README payloads/coreinfo/README: Remove trailing whitespace 2018-04-27 09:09:45 +00:00
bootlog_module.c Rename __attribute__((packed)) --> __packed 2017-07-13 19:45:59 +00:00
cbfs_module.c Revert "cbfs/payload type: Fix build warning and whitespace in name" 2018-05-16 04:50:55 +00:00
coreboot_module.c payloads: change coreboot to lowercase 2017-06-07 12:08:55 +02:00
coreinfo.c coreinfo: Use regular `if` over `#if` for `IS_ENABLED` 2017-06-27 17:16:03 +00:00
coreinfo.h coreinfo: Move screen dimensions to header 2015-11-19 17:32:24 +01:00
cpuid.S tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
cpuinfo_module.c tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
multiboot_module.c tree: drop last paragraph of GPL copyright header 2015-10-31 21:37:39 +01:00
nvram_module.c coreinfo/nvram: Print correct line numbers 2016-03-11 18:44:04 +01:00
pci_module.c coreinfo: Skip unpopulated PCI functions 2018-06-14 07:59:05 +00:00
ramdump_module.c coreinfo: Pretty print RAM addresses 2016-03-15 18:23:30 +01:00
timestamps_module.c payloads/coreinfo: Free buffer before returning 2017-09-11 16:23:52 +00:00

README

This is a silly little program that demonstrates how cool libpayload is
and also serves a purpose.  It is fun and educational!

Requirements
------------

You should use the coreboot reference cross compiler. If you insist on using
your system compiler, some Linux distributions might require you to install
a package called gcc-multilib if you are on a 64bit system.

Build
-----

You need libpayload to build coreinfo. So, first, you need follow the README of
libpayload to build it but install libpayload into its own directory by doing
this:

 $ make DESTDIR=/path/to/libpayload/install install

Then you can build coreinfo now:

 $ cd coreinfo

 $ make menuconfig
 
 $ make