Dear coreboot folks,
To get PCI bridge 0:15.2 enabled for the network device on the Asus F2A85-M PRO, I want to debug the PCIe General Purpose Ports lane configuration of the FCH.
I’d like to print some variables in
src/vendorcode/amd/agesa/f15tn/Proc/Fch/Pcie/GppPortInit.c
over the serial console. It looks like
#include <console/console.h>
and `printk(BIOS_DEBUG, …)` compiles, but the messages are not sent over serial console. Is that expected?
Do I need to use AGESA’s Integrated Debug Services (IDS) [1], and enable the console in `src/mainboard/asus/f2a85-m/OptionsIds.h`?
Kind regards,
Paul
[1]: https://www.coreboot.org/images/3/36/AGESA_Interface_Spec_for_Arch_2008_v3.0...
Paul, you are probably way ahead of this, but I found something pre-AGESA from 2003 that says:
"Unlike minicomputer systems, the IBM PC was not designed to use a serial console. This has two consequences.
Firstly, Power On Self-Test messages and Basic Input/Output System (BIOS) messages are sent to the screen and received from the keyboard. This makes it difficult to use the serial port to reconfigure the BIOS and impossible to see Power On Self-Test errors.
An increasing number of manufacturers of rackable *server* equipment are altering their BIOSs to optionally use the RS-232 port for BIOS configuration and test messages. If you are buying a machine specifically for use with serial console you should seek this feature. If you have an existing machine that definitely requires access to the BIOS from the serial port then there are hardware solutions such as PC Weasel 2000 http://www.realweasel.com/.
Secondly, the RS-232 port on the IBM PC is designed for connecting to a modem. Thus a null modem cable is needed when connecting the PC's serial port to a terminal."
https://tldp.org/HOWTO/Remote-Serial-Console-HOWTO/intro-why.html
Clay
On Thu, Oct 15, 2020 at 3:54 AM Paul Menzel pmenzel@molgen.mpg.de wrote:
Dear coreboot folks,
To get PCI bridge 0:15.2 enabled for the network device on the Asus F2A85-M PRO, I want to debug the PCIe General Purpose Ports lane configuration of the FCH.
I’d like to print some variables in
src/vendorcode/amd/agesa/f15tn/Proc/Fch/Pcie/GppPortInit.c
over the serial console. It looks like
#include <console/console.h>
and `printk(BIOS_DEBUG, …)` compiles, but the messages are not sent over serial console. Is that expected?
Do I need to use AGESA’s Integrated Debug Services (IDS) [1], and enable the console in `src/mainboard/asus/f2a85-m/OptionsIds.h`?
Kind regards,
Paul
[1]:
https://www.coreboot.org/images/3/36/AGESA_Interface_Spec_for_Arch_2008_v3.0... _______________________________________________ coreboot mailing list -- coreboot@coreboot.org To unsubscribe send an email to coreboot-leave@coreboot.org
Hi list,
On Thu, Oct 15, 2020 at 5:48 PM Clay Daniels clay.daniels.jr@gmail.com wrote:
Paul, you are probably way ahead of this, but I found something pre-AGESA from 2003 that says:
"Unlike minicomputer systems, the IBM PC was not designed to use a serial console. This has two consequences.
Firstly, Power On Self-Test messages and Basic Input/Output System (BIOS) messages are sent to the screen and received from the keyboard. This makes it difficult to use the serial port to reconfigure the BIOS and impossible to see Power On Self-Test errors.
An increasing number of manufacturers of rackable server equipment are altering their BIOSs to optionally use the RS-232 port for BIOS configuration and test messages. If you are buying a machine specifically for use with serial console you should seek this feature. If you have an existing machine that definitely requires access to the BIOS from the serial port then there are hardware solutions such as PC Weasel 2000.
Secondly, the RS-232 port on the IBM PC is designed for connecting to a modem. Thus a null modem cable is needed when connecting the PC's serial port to a terminal."
https://tldp.org/HOWTO/Remote-Serial-Console-HOWTO/intro-why.html
How does any of this apply to coreboot?
Clay
On Thu, Oct 15, 2020 at 3:54 AM Paul Menzel pmenzel@molgen.mpg.de wrote:
Dear coreboot folks,
To get PCI bridge 0:15.2 enabled for the network device on the Asus F2A85-M PRO, I want to debug the PCIe General Purpose Ports lane configuration of the FCH.
I’d like to print some variables in
src/vendorcode/amd/agesa/f15tn/Proc/Fch/Pcie/GppPortInit.c
over the serial console. It looks like
#include <console/console.h>
and `printk(BIOS_DEBUG, …)` compiles, but the messages are not sent over serial console. Is that expected?
Do I need to use AGESA’s Integrated Debug Services (IDS) [1], and enable the console in `src/mainboard/asus/f2a85-m/OptionsIds.h`?
I don't know if AGESA is compiled into a different stage, which would be called `libagesa`. I've just seen some mentions of this in the coreboot code. I suspect logging there might need to be handled differently (similar to how we handle logging in SMM, which is disabled by default).
I'd be surprised if any of the IDS stuff still builds fine. No one bothered to migrate the IDS controls in OptionsIds.h to Kconfig. Should you want to do so, please add various config files in configs/ to ensure the IDS code gets build-tested.
Kind regards,
Paul
coreboot mailing list -- coreboot@coreboot.org To unsubscribe send an email to coreboot-leave@coreboot.org
coreboot mailing list -- coreboot@coreboot.org To unsubscribe send an email to coreboot-leave@coreboot.org
Best regards, Angel
Hi Paul,
See inline repsonses.
On 15.10.2020 20:04, Angel Pons wrote:
Clay
On Thu, Oct 15, 2020 at 3:54 AM Paul Menzel pmenzel@molgen.mpg.de wrote:
Dear coreboot folks,
To get PCI bridge 0:15.2 enabled for the network device on the Asus F2A85-M PRO, I want to debug the PCIe General Purpose Ports lane configuration of the FCH.
I’d like to print some variables in
src/vendorcode/amd/agesa/f15tn/Proc/Fch/Pcie/GppPortInit.c
over the serial console. It looks like
#include <console/console.h>
and `printk(BIOS_DEBUG, …)` compiles, but the messages are not sent over serial console. Is that expected?
Do I need to use AGESA’s Integrated Debug Services (IDS) [1], and enable the console in `src/mainboard/asus/f2a85-m/OptionsIds.h`?
I got it once working for apu1 (agesa f14) but it took a lot to fix (printf formats, etc.). Yes it is compiled with IDS settings in the mainboard directory. I have to look if I have a branch with the code still.
I don't know if AGESA is compiled into a different stage, which would be called `libagesa`. I've just seen some mentions of this in the coreboot code. I suspect logging there might need to be handled differently (similar to how we handle logging in SMM, which is disabled by default).
I'd be surprised if any of the IDS stuff still builds fine. No one bothered to migrate the IDS controls in OptionsIds.h to Kconfig. Should you want to do so, please add various config files in configs/ to ensure the IDS code gets build-tested.
Angel,
The basic IDS which are required to build are fine, but if you enable something additional, well... probably you will need to fix few more things in vendorcode :) Yes, it is compiled as libagesa, but it doesn't make any difference, since it is linked to each stage IIRC. The macros AGESA is using to print debug info (IDS_HTD_CONSOLE) is linked to coreboot's printk so it ends up in the same console.
I don't think it is necessary to port IDS to Kconfig. i f you include config.h in the ids.h in the mainboard and bind the correct defines, it should work?
Best regards,
Hi Paul,
I think I got it... It is pretty easy to enable the serial output. Just define IDSOPT_TRACING_ENABLED to TRUE in src/mainbaord/MAINBAORDDIR/OptionsIds.h . It will link the coreboot's printk (debug level 7) to AGESA console. So if you enable serial port in coreboot's Kconfig it will work out-of-the-box. But expect fixing the vendorcode to get it compiled. In the end you should have full output from AGESA.
Best regards,
Michal Zygowski wrote:
I don't think it is necessary to port IDS to Kconfig.
I have an old branch where I started doing just that. I think I posted some patches but there was no traction. At that time I think it was still uncertain if we would ever receive any AGESA support from AMD, so there was some reluctance to change the AGESA source.
I think it would still make sense, but it's not a trivial exercise. :\
//Peter
Hi Paul,
On 15.10.2020 10:53, Paul Menzel wrote:
Dear coreboot folks,
To get PCI bridge 0:15.2 enabled for the network device on the Asus F2A85-M PRO, I want to debug the PCIe General Purpose Ports lane configuration of the FCH.
I’d like to print some variables in
src/vendorcode/amd/agesa/f15tn/Proc/Fch/Pcie/GppPortInit.c
over the serial console. It looks like
#include <console/console.h>
and `printk(BIOS_DEBUG, …)` compiles, but the messages are not sent over serial console. Is that expected?
Between InitReset and InitEnv (IIRC) redirection of serial port (and a few others) is disabled by default, this may be the reason why `printk()` doesn't work. If that is the case, building with `HUDSON_LEGACY_FREE` disabled may help.
Do I need to use AGESA’s Integrated Debug Services (IDS) [1], and enable the console in `src/mainboard/asus/f2a85-m/OptionsIds.h`?
Kind regards,
Paul
Best regards,