Werner Zeh has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36025 )
Change subject: mc_apl2: Enable UART for GDB debugging
......................................................................
mc_apl2: Enable UART for GDB debugging
Change-Id: Idd4504d8f11aa78196d6d87d0fa13338b708f53e
Signed-off-by: Werner Zeh <werner.zeh(a)siemens.com>
---
M src/mainboard/siemens/mc_apl1/romstage.c
1 file changed, 54 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/25/36025/1
diff --git a/src/mainboard/siemens/mc_apl1/romstage.c b/src/mainboard/siemens/mc_apl1/romstage.c
index 1483636..bd21dd1 100644
--- a/src/mainboard/siemens/mc_apl1/romstage.c
+++ b/src/mainboard/siemens/mc_apl1/romstage.c
@@ -127,3 +127,57 @@
memupd->FspmConfig.MrcDataSaving = 0x0;
memupd->FspmConfig.MrcFastBoot = 0x1;
}
+#if CONFIG(GDB_STUB)
+#include <device/device.h>
+#include <device/pci.h>
+#include <arch/io.h>
+#include <soc/romstage.h>
+
+/*
+ * We need a way to hook in right after the romstage has been finished
+ * to enable the UART on CUPER. This must happen for sure before ramstage
+ * starts and the code is mainboard dependent. Due to FSP 2.0 there are no
+ * other mainboard-hooks for romstage beside the ones for DRAM parameter setup
+ * and this one. So use this hook now for the needed code.
+ * This is noting to release, just for internal usage.
+ */
+#define FPGA_PCI_BUS 1
+#define FPGA_TEMP_BAR0 0xf7000000
+#if CONFIG(BOARD_SIEMENS_MC_APL2)
+#define CUPER_ROOT_DEV (PCI_DEV(0, 0x13, 0x01))
+#endif
+#define CUPER_PCI_DEV (PCI_DEV(FPGA_PCI_BUS, 0, 0))
+void mainboard_save_dimm_info(void)
+{
+ uint32_t reg;
+
+ if (CONFIG(BOARD_SIEMENS_MC_APL2)) {
+ /* First set up root port bridge to get access to the FPGA. */
+ /* Set secondary bus temporary. */
+ pci_write_config32(CUPER_ROOT_DEV, PCI_PRIMARY_BUS,
+ FPGA_PCI_BUS << 16 | FPGA_PCI_BUS << 8);
+ /* Define an address window to forward to the secondary bus. */
+ pci_write_config32(CUPER_ROOT_DEV, PCI_MEMORY_BASE,
+ (FPGA_TEMP_BAR0 | (FPGA_TEMP_BAR0 >> 16)));
+ /* Enable memory mapped transfers */
+ pci_write_config32(CUPER_ROOT_DEV, PCI_COMMAND,
+ PCI_COMMAND_MEMORY);
+ /* Now the FPGA is visible on bus 1, dev 0, function 0. */
+ pci_write_config32(CUPER_PCI_DEV, PCI_BASE_ADDRESS_0,
+ FPGA_TEMP_BAR0);
+ pci_write_config32(CUPER_PCI_DEV, PCI_COMMAND,
+ PCI_COMMAND_MEMORY);
+ /* Now we can reach MMIO mapped registers in CUPER */
+ reg = read32((void *)(FPGA_TEMP_BAR0 + 0xbc));
+ reg |= (1 << 10);
+ write32((void *)(FPGA_TEMP_BAR0 + 0xbc), reg);
+ /* Now delete all the changes made in config space so that
+ * the PCI enumerator can do its work. */
+ pci_write_config32(CUPER_PCI_DEV, PCI_BASE_ADDRESS_0, 0);
+ pci_write_config32(CUPER_PCI_DEV, PCI_COMMAND, 0);
+ pci_write_config32(CUPER_ROOT_DEV, PCI_PRIMARY_BUS, 0x0);
+ pci_write_config32(CUPER_ROOT_DEV, PCI_MEMORY_BASE, 0);
+ pci_write_config32(CUPER_ROOT_DEV, PCI_COMMAND, 0);
+ }
+}
+#endif
--
To view, visit https://review.coreboot.org/c/coreboot/+/36025
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Idd4504d8f11aa78196d6d87d0fa13338b708f53e
Gerrit-Change-Number: 36025
Gerrit-PatchSet: 1
Gerrit-Owner: Werner Zeh <werner.zeh(a)siemens.com>
Gerrit-Reviewer: Werner Zeh <werner.zeh(a)siemens.com>
Gerrit-MessageType: newchange
Werner Zeh has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/36021 )
Change subject: x86 gdb: Extend GDB stub with a version information
......................................................................
x86 gdb: Extend GDB stub with a version information
Add GDB command "w" to get the current version of the implemented GDB
stub in coreboot.
NOT FOR MERGE!!!
Change-Id: Ia9951ee4800e8bbf2e40a7b94de1cf3ef4c2dccd
Signed-off-by: Werner Zeh <werner.zeh(a)siemens.com>
---
M src/arch/x86/exception.c
1 file changed, 6 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/21/36021/1
diff --git a/src/arch/x86/exception.c b/src/arch/x86/exception.c
index 646e962..b1689cc 100644
--- a/src/arch/x86/exception.c
+++ b/src/arch/x86/exception.c
@@ -30,6 +30,8 @@
* At least NUM_REGBYTES*2 are needed for register packets
*/
#define BUFMAX 400
+/* Add a version string. */
+#define GDB_STUB_EXTENSION_VERSION "1.0"
enum regnames {
EAX = 0, ECX, EDX, EBX, ESP, EBP, ESI, EDI,
PC /* also known as eip */,
@@ -837,6 +839,10 @@
} else
memcpy(out_buffer, "E07", 4);
break;
+ case 'w':
+ memcpy(out_buffer, GDB_STUB_EXTENSION_VERSION,
+ sizeof(GDB_STUB_EXTENSION_VERSION));
+ break;
case 'z': /* z0AAAA,LLLL remove memory breakpoint */
/* z1AAAA,LLLL remove hardware breakpoint */
/* z2AAAA,LLLL remove write watchpoint */
--
To view, visit https://review.coreboot.org/c/coreboot/+/36021
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ia9951ee4800e8bbf2e40a7b94de1cf3ef4c2dccd
Gerrit-Change-Number: 36021
Gerrit-PatchSet: 1
Gerrit-Owner: Werner Zeh <werner.zeh(a)siemens.com>
Gerrit-MessageType: newchange
Patrick Rudolph has posted comments on this change. ( https://review.coreboot.org/c/coreboot/+/11791 )
Change subject: mainboard/lenovo/t410: Add new port
......................................................................
Patch Set 26:
(1 comment)
https://review.coreboot.org/c/coreboot/+/11791/25/src/mainboard/lenovo/t410…
File src/mainboard/lenovo/t410/vboot-rwa.fmd:
https://review.coreboot.org/c/coreboot/+/11791/25/src/mainboard/lenovo/t410…
PS25, Line 20: 0x11f000
> remove the size on this one, to be certain that the COREBOOT region is always align to the top of th […]
Done
--
To view, visit https://review.coreboot.org/c/coreboot/+/11791
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Id9d872e643dd242e925bfb46d18076e6ad100995
Gerrit-Change-Number: 11791
Gerrit-PatchSet: 26
Gerrit-Owner: Nicolas Reinecke <nr(a)das-labor.org>
Gerrit-Reviewer: Alexander Couzens <lynxis(a)fe80.eu>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Nicolas Reinecke <nr(a)das-labor.org>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Eloy Degen
Gerrit-CC: Matt Parnell <mparnell(a)gmail.com>
Gerrit-CC: Okashi Odayakana <okashi(a)okashi.me>
Gerrit-CC: Peter Lemenkov <lemenkov(a)gmail.com>
Gerrit-Comment-Date: Mon, 14 Oct 2019 09:06:54 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-MessageType: comment
Patrick Rudolph has uploaded a new patch set (#26) to the change originally created by Nicolas Reinecke. ( https://review.coreboot.org/c/coreboot/+/11791 )
Change subject: mainboard/lenovo/t410: Add new port
......................................................................
mainboard/lenovo/t410: Add new port
The port is based on the x201 / t410s.
2537-vg5 / i5, no discrete gpu
Tested and working:
* Native raminit
* Native gfxinit
* Booting Seabios 1.12.1
* Booting from EHCI
* Running GNU/Linux 5.0.0
* No errors in dmesg
* EHCI debug on the devices left side, bottom-right
* Keyboard
* Fn keys (Mute, Volume, Mic)
* Touchpad
* TPM
* Wifi
* Sound
* USB
* Ethernet
* S3 resume
* VBOOT
Testing in progress.
Untested:
* VGA
* Displayport
* Docking station
Bugs:
* AC adapter can't be read from ACPI
* TPM not working with VBOOT and C_ENV BB
Details for flashing externally:
1. Disconnect all power
2. Connect the external flasher
3. Connect the power cord (This fixes internal power control)
4. Remove the power cord
Change-Id: Id9d872e643dd242e925bfb46d18076e6ad100995
Signed-off-by: Nicolas Reinecke <nr(a)das-labor.org>
Signed-off-by: Patrick Rudolph <patrick.rudolph(a)9elements.com>
---
M Documentation/mainboard/index.md
A Documentation/mainboard/lenovo/t410.md
A Documentation/mainboard/lenovo/t410_chip_location.jpg
A src/mainboard/lenovo/t410/Kconfig
A src/mainboard/lenovo/t410/Kconfig.name
A src/mainboard/lenovo/t410/Makefile.inc
A src/mainboard/lenovo/t410/acpi/dock.asl
A src/mainboard/lenovo/t410/acpi/ec.asl
A src/mainboard/lenovo/t410/acpi/gpe.asl
A src/mainboard/lenovo/t410/acpi/platform.asl
A src/mainboard/lenovo/t410/acpi/superio.asl
A src/mainboard/lenovo/t410/acpi_tables.c
A src/mainboard/lenovo/t410/board_info.txt
A src/mainboard/lenovo/t410/cmos.default
A src/mainboard/lenovo/t410/cmos.layout
A src/mainboard/lenovo/t410/data.vbt
A src/mainboard/lenovo/t410/devicetree.cb
A src/mainboard/lenovo/t410/dock.c
A src/mainboard/lenovo/t410/dock.h
A src/mainboard/lenovo/t410/dsdt.asl
A src/mainboard/lenovo/t410/early_init.c
A src/mainboard/lenovo/t410/gma-mainboard.ads
A src/mainboard/lenovo/t410/gpio.c
A src/mainboard/lenovo/t410/hda_verb.c
A src/mainboard/lenovo/t410/mainboard.c
A src/mainboard/lenovo/t410/romstage.c
A src/mainboard/lenovo/t410/smihandler.c
A src/mainboard/lenovo/t410/thermal.h
A src/mainboard/lenovo/t410/vboot-rwa.fmd
M src/southbridge/intel/common/Makefile.inc
30 files changed, 1,484 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/91/11791/26
--
To view, visit https://review.coreboot.org/c/coreboot/+/11791
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Id9d872e643dd242e925bfb46d18076e6ad100995
Gerrit-Change-Number: 11791
Gerrit-PatchSet: 26
Gerrit-Owner: Nicolas Reinecke <nr(a)das-labor.org>
Gerrit-Reviewer: Alexander Couzens <lynxis(a)fe80.eu>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Martin Roth <martinroth(a)google.com>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Nicolas Reinecke <nr(a)das-labor.org>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-Reviewer: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-Reviewer: Patrick Rudolph <siro(a)das-labor.org>
Gerrit-Reviewer: Paul Menzel <paulepanter(a)users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Eloy Degen
Gerrit-CC: Matt Parnell <mparnell(a)gmail.com>
Gerrit-CC: Okashi Odayakana <okashi(a)okashi.me>
Gerrit-CC: Peter Lemenkov <lemenkov(a)gmail.com>
Gerrit-MessageType: newpatchset