Attention is currently required from: Hung-Te Lin, Yidi Lin.
Hello Hung-Te Lin, Yu-Ping Wu, build bot (Jenkins),
I'd like you to reexamine a change. Please visit
https://review.coreboot.org/c/coreboot/+/85861?usp=email
to look at the new patch set (#7).
The following approvals got outdated and were removed:
Verified+1 by build bot (Jenkins)
Change subject: soc/mediatek/common/dp: Move common functions to dptx_hal_common.c
......................................................................
soc/mediatek/common/dp: Move common functions to dptx_hal_common.c
Move the functions that can be shared with MT8196 to dptx_hal_common.c.
BUG=b:382363408
TEST=emerge-geralt coreboot && emerge-cherry coreboot
TEST=verify FW screen on Navi
Change-Id: I9e151bc766c312eaf81b4220782775ef1c9d2297
Signed-off-by: Yidi Lin <yidilin(a)chromium.org>
---
M src/soc/mediatek/common/dp/dptx_hal.c
A src/soc/mediatek/common/dp/dptx_hal_common.c
M src/soc/mediatek/mt8188/Makefile.mk
M src/soc/mediatek/mt8195/Makefile.mk
4 files changed, 486 insertions(+), 504 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/61/85861/7
--
To view, visit https://review.coreboot.org/c/coreboot/+/85861?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I9e151bc766c312eaf81b4220782775ef1c9d2297
Gerrit-Change-Number: 85861
Gerrit-PatchSet: 7
Gerrit-Owner: Yidi Lin <yidilin(a)google.com>
Gerrit-Reviewer: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Reviewer: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Jarried Lin <jarried.lin(a)mediatek.com>
Gerrit-Attention: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Attention: Yidi Lin <yidilin(a)google.com>
Attention is currently required from: Hung-Te Lin, Yidi Lin.
Yu-Ping Wu has posted comments on this change by Yidi Lin. ( https://review.coreboot.org/c/coreboot/+/85861?usp=email )
Change subject: soc/mediatek/common/dp: Move common functions to dptx_hal_common.c
......................................................................
Patch Set 6:
(1 comment)
File src/soc/mediatek/common/dp/dptx_hal_common.c:
https://review.coreboot.org/c/coreboot/+/85861/comment/2fe9fdf6_57704241?us… :
PS3, Line 115: DP_CLRSETBITS(mtk_dp, REG_303C_DP_ENCODER0_P0 + 1, val, 0x7);
> Checked with MTK, `DP_TX_TOP_APB_WSTRB` only takes effect on previous SoCs. […]
Great! That makes a lot of sense.
--
To view, visit https://review.coreboot.org/c/coreboot/+/85861?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I9e151bc766c312eaf81b4220782775ef1c9d2297
Gerrit-Change-Number: 85861
Gerrit-PatchSet: 6
Gerrit-Owner: Yidi Lin <yidilin(a)google.com>
Gerrit-Reviewer: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Reviewer: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-CC: Jarried Lin <jarried.lin(a)mediatek.com>
Gerrit-Attention: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Attention: Yidi Lin <yidilin(a)google.com>
Gerrit-Comment-Date: Thu, 09 Jan 2025 07:34:11 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Yidi Lin <yidilin(a)google.com>
Comment-In-Reply-To: Yu-Ping Wu <yupingso(a)google.com>
Nicholas Chin has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/85913?usp=email )
Change subject: [WIP] Docs: Add information about various debugging methods
......................................................................
[WIP] Docs: Add information about various debugging methods
Add information about the different methods to debug coreboot, such as
the various consoles and the tools required to use them.
Signed-off-by: Nicholas Chin <nic.c3.14(a)gmail.com>
Change-Id: I0b407fc05678a944567479a6430b7d47175b4072
---
M 3rdparty/amd_blobs
M 3rdparty/fsp
A Documentation/debugging/cbmem.md
A Documentation/debugging/ehci.md
A Documentation/debugging/em100.md
A Documentation/debugging/flashconsole.md
A Documentation/debugging/gdb.md
A Documentation/debugging/index.md
A Documentation/debugging/ne2000.md
A Documentation/debugging/post_codes.md
A Documentation/debugging/serial.md
A Documentation/debugging/spkmodem.md
M Documentation/index.md
13 files changed, 163 insertions(+), 2 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/13/85913/1
diff --git a/3rdparty/amd_blobs b/3rdparty/amd_blobs
index 26c5729..6a1e145 160000
--- a/3rdparty/amd_blobs
+++ b/3rdparty/amd_blobs
@@ -1 +1 @@
-Subproject commit 26c572974bcf7255930b0e9a51da3144ed0104b5
+Subproject commit 6a1e1457afddf49e53bfa4f422e7fd42f9db6e49
diff --git a/3rdparty/fsp b/3rdparty/fsp
index 909cf43..3beceb0 160000
--- a/3rdparty/fsp
+++ b/3rdparty/fsp
@@ -1 +1 @@
-Subproject commit 909cf43ad6ccebb6adee482bc0a4f098c32c9a6d
+Subproject commit 3beceb01f90dbdbe7781c7fa43ecc928cd68d2f0
diff --git a/Documentation/debugging/cbmem.md b/Documentation/debugging/cbmem.md
new file mode 100644
index 0000000..c1a0bca
--- /dev/null
+++ b/Documentation/debugging/cbmem.md
@@ -0,0 +1,34 @@
+# CBMEM console
+As this can only be accessed once the system has reached the payload,
+this cannot be used to debug issues that cause coreboot to lock up or
+reboot in earlier stages.
+
+As cbmem is a core part of coreboot, this should be available on all
+boards coreboot supports.
+
+## Enabling
+
+## Viewing the console
+### Linux
+#### cbmem utility
+These require th
+To view all logs in cbmem:
+
+ sudo cbmem -c
+
+To view only the console log for the last boot:
+
+ sudo cbmem -1
+
+#### Linux driver
+If your kernel was built with the `GOOGLE_MEMCONSOLE_COREBOOT` config,
+then the console should be available under `/sys/firmware/log`
+
+### Payloads
+#### GRUB
+The GRUB2 payload provides a cbmem driver, which can be used to view the
+cbmem console:
+
+#### coreinfo
+The coreinfo secondary payload can be used to view the cbmem console, by
+pressing `F2` (Firmware), and then `C` (Bootlog)
diff --git a/Documentation/debugging/ehci.md b/Documentation/debugging/ehci.md
new file mode 100644
index 0000000..e92ef6e
--- /dev/null
+++ b/Documentation/debugging/ehci.md
@@ -0,0 +1,55 @@
+# EHCI debug console
+
+EHCI (USB 2.0) controllers may optionally implement a feature which
+provides a simpler, register based interface to communicate over USB,
+eliminating the need for a full USB stack that requires memory. Newer
+boards will not have this feature as EHCI controllers have largely been
+replaced with the xHCI (USB 3.0) controllers, which do not provide a
+similar interface.
+
+To use this as a coreboot console output you will need both a board with
+EHCI debug capability and an accessible debug port, as well as a
+supported debug device.
+
+## Supported chips with EHCI debug capability
+- ICH9
+- ICH10
+- ibex peak
+- bd82x6x
+- lynxpoint
+
+## Supported debug devices
+### USB to UART adapters
+- FTDI FT232H/2232H/4232H
+ - Must not be configured for a specific mode through an attached EEPROM
+- WCH CH347T
+ - Supports UART 1 in modes 0, 1, and 3
+
+### USB debug gadget
+On some single board computers, USB ports can be used as a gadget
+device, where the port acts as a USB device with functionality defined
+by software.
+- Raspberry Pi Zero
+- Beaglebone Black
+
+## Finding the EHCI debug port
+To determine if there is an EHCI debug capable USB controller in your
+system and locate the physical USB port the debug port is routed to, you
+can use the `util/find_usbdebug/find_usbdebug.sh` script. The script
+requires lspci and lsusb, which can included in the pciutils and
+usbutils packages.
+
+First, start the script with root privileges. It will report whether or not your
+board has an EHCI controller with debug capabilities, and will list the
+port(s) on the controller which are designated as the debug port. Then,
+insert a high speed (USB 2.0 device into any USB port and press `enter`. If the
+device was connected to the physical port which the debug port is routed
+to, the device will show up in the output of the script. Repeat the
+process of inserting the device into an untested port and pressing
+`enter` until either you find the debug port or you have exhausted all
+possible ports. If possible also check any unused USB 2.0 headers on
+your mainboard.
+
+If you are unlucky the debug port on the EHCI controller may not be
+physically routed to any available USB port or header, in which case you
+will need to resort to alternative debugging methods.
diff --git a/Documentation/debugging/em100.md b/Documentation/debugging/em100.md
new file mode 100644
index 0000000..427a73c
--- /dev/null
+++ b/Documentation/debugging/em100.md
@@ -0,0 +1,3 @@
+# Dediprog EM100 console
+
+I
diff --git a/Documentation/debugging/flashconsole.md b/Documentation/debugging/flashconsole.md
new file mode 100644
index 0000000..d2361a7
--- /dev/null
+++ b/Documentation/debugging/flashconsole.md
@@ -0,0 +1,13 @@
+# Flash console
+
+The SPI flash console offers a way
+
+## Usage
+
+## Known issues
+The SPI flash console has been known to cause issues later in the boot
+process (usually after romstage), and should be considered as a method
+of last resort to debug early boot issues.
+
+- On Haswell, the flash console causes coreboot to freeze during the
+ jump to postcar after romstage
diff --git a/Documentation/debugging/gdb.md b/Documentation/debugging/gdb.md
new file mode 100644
index 0000000..aa42f24
--- /dev/null
+++ b/Documentation/debugging/gdb.md
@@ -0,0 +1 @@
+# GDB Stub
diff --git a/Documentation/debugging/index.md b/Documentation/debugging/index.md
new file mode 100644
index 0000000..25ca7ad
--- /dev/null
+++ b/Documentation/debugging/index.md
@@ -0,0 +1,19 @@
+# Debugging
+
+This section describes various methods of debugging coreboot.
+
+## Debug Method Specific Documentation
+
+```{toctree}
+:maxdepth: 1
+
+Serial console <serial.md>
+EHCI Debug console <ehci.md>
+CBMEM console <cbmem.md>
+SPI flash console <flashconsole.md>
+NE2000 network console <ne2000.md>
+Spkmodem console <spkmodem.md>
+Dediprog EM100 console <em100.md>
+POST codes <post_codes.md>
+GDB <gdb_stub.md>
+```
diff --git a/Documentation/debugging/ne2000.md b/Documentation/debugging/ne2000.md
new file mode 100644
index 0000000..2bf0c5e
--- /dev/null
+++ b/Documentation/debugging/ne2000.md
@@ -0,0 +1 @@
+# NE2000 Network Console
diff --git a/Documentation/debugging/post_codes.md b/Documentation/debugging/post_codes.md
new file mode 100644
index 0000000..97ee032
--- /dev/null
+++ b/Documentation/debugging/post_codes.md
@@ -0,0 +1,7 @@
+# POST Codes
+
+POST codes provide a basic way to determine overall progress of the
+coreboot boot process, serving as "checkpoints" indicating a point in
+the code that coreboot has passed.
+
+Some boards may have integrated displays
diff --git a/Documentation/debugging/serial.md b/Documentation/debugging/serial.md
new file mode 100644
index 0000000..b119e04
--- /dev/null
+++ b/Documentation/debugging/serial.md
@@ -0,0 +1 @@
+# Serial console
diff --git a/Documentation/debugging/spkmodem.md b/Documentation/debugging/spkmodem.md
new file mode 100644
index 0000000..905506e
--- /dev/null
+++ b/Documentation/debugging/spkmodem.md
@@ -0,0 +1,26 @@
+# Spkmodem console
+Spkmodem uses tones played over the PC speaker in order to encode the
+console output, which can be received by another system and decoded.
+Note that it is extremely slow (about baud), and will make the boot
+process significantly slower.
+
+The protocol and decode utility originated from the GRUB2 project.
+
+## Availability
+As this uses the legacy 8254 Programmable Interval Timer, this is only
+supported on x86. Furthermore, the output pin on the chipset for the
+speaker needs to be connected to an audio output, such as a piezo beeper
+on the mainboard or routed to the audio codec. In the case that it is
+routed to the codec, initialization verbs may need to be sent to do
+things like unmute the speakers, route the beep signal to an output, and
+set the gain. These can be specified in the `pc_beep_verbs` array in a
+board's `hda_verb.c`. This also currently limits spkmodem functionality
+to ramstage if the beep signal goes to a codec which requires
+initialization, as the verbs are not run until ramstage.
+
+## Usage
+On the target board, enable CONFIG_SPKMODEM (Console > spkmodem (console
+on speaker) console output).
+
+## Protocol
+
diff --git a/Documentation/index.md b/Documentation/index.md
index 7ba88f3..8aaf9d5 100644
--- a/Documentation/index.md
+++ b/Documentation/index.md
@@ -233,6 +233,7 @@
Security <security/index.md>
SuperIO <superio/index.md>
Vendorcode <vendorcode/index.md>
+Debugging <debugging/index.md>
Utilities <util.md>
Software Bill of Materials <sbom/sbom.md>
Project infrastructure & services <infrastructure/index.md>
--
To view, visit https://review.coreboot.org/c/coreboot/+/85913?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I0b407fc05678a944567479a6430b7d47175b4072
Gerrit-Change-Number: 85913
Gerrit-PatchSet: 1
Gerrit-Owner: Nicholas Chin <nic.c3.14(a)gmail.com>
Attention is currently required from: Hung-Te Lin, Jarried Lin, Yidi Lin, Yu-Ping Wu.
ot_song fan has posted comments on this change by Jarried Lin. ( https://review.coreboot.org/c/coreboot/+/85841?usp=email )
Change subject: soc/mediatek/mt8196: Add clk_buf drivers
......................................................................
Patch Set 4:
(1 comment)
File src/soc/mediatek/mt8196/clkbuf_ctl.c:
https://review.coreboot.org/c/coreboot/+/85841/comment/3d72dd7b_44cc9635?us… :
PS1, Line 413: _Static_assert(ARRAY_SIZE(ox) == XO_NUMBER, "Wrong array size of ox");
> move to line 206
Done
--
To view, visit https://review.coreboot.org/c/coreboot/+/85841?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: Ie18bfbb2f3354ba3645799857061dc20de7f6d84
Gerrit-Change-Number: 85841
Gerrit-PatchSet: 4
Gerrit-Owner: Jarried Lin <jarried.lin(a)mediatek.com>
Gerrit-Reviewer: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Reviewer: Yidi Lin <yidilin(a)google.com>
Gerrit-Reviewer: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Reviewer: ot_song fan <ot_song.fan(a)mediatek.corp-partner.google.com>
Gerrit-Attention: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Attention: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Attention: Yidi Lin <yidilin(a)google.com>
Gerrit-Attention: Jarried Lin <jarried.lin(a)mediatek.com>
Gerrit-Comment-Date: Thu, 09 Jan 2025 07:01:42 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Yidi Lin <yidilin(a)google.com>
Attention is currently required from: Hung-Te Lin, Jarried Lin, Yidi Lin, Yu-Ping Wu.
ot_song fan has posted comments on this change by Jarried Lin. ( https://review.coreboot.org/c/coreboot/+/85842?usp=email )
Change subject: soc/mediatek/mt8196: Add srclken_rc drivers
......................................................................
Patch Set 4:
(4 comments)
Commit Message:
https://review.coreboot.org/c/coreboot/+/85842/comment/6b2d935a_c148a866?us… :
PS2, Line 9: use
> uses
Done
https://review.coreboot.org/c/coreboot/+/85842/comment/dfab42df_04f47844?us… :
PS2, Line 9: need
> needs
Done
https://review.coreboot.org/c/coreboot/+/85842/comment/054b8225_60a91939?us… :
PS2, Line 10: ,
> remove
Done
https://review.coreboot.org/c/coreboot/+/85842/comment/94c2d755_1a367857?us… :
PS2, Line 11: , and so on
> remove
Done
--
To view, visit https://review.coreboot.org/c/coreboot/+/85842?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: comment
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I40f8d2b12027955e6bd57b666e9f04c0116a0a93
Gerrit-Change-Number: 85842
Gerrit-PatchSet: 4
Gerrit-Owner: Jarried Lin <jarried.lin(a)mediatek.com>
Gerrit-Reviewer: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Reviewer: Yidi Lin <yidilin(a)google.com>
Gerrit-Reviewer: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Reviewer: ot_song fan <ot_song.fan(a)mediatek.corp-partner.google.com>
Gerrit-Attention: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Attention: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Attention: Yidi Lin <yidilin(a)google.com>
Gerrit-Attention: Jarried Lin <jarried.lin(a)mediatek.com>
Gerrit-Comment-Date: Thu, 09 Jan 2025 06:58:48 +0000
Gerrit-HasComments: Yes
Gerrit-Has-Labels: No
Comment-In-Reply-To: Yu-Ping Wu <yupingso(a)google.com>
Attention is currently required from: Hung-Te Lin, Jarried Lin, Yidi Lin, Yu-Ping Wu.
ot_song fan has uploaded a new patch set (#4) to the change originally created by Jarried Lin. ( https://review.coreboot.org/c/coreboot/+/85842?usp=email )
Change subject: soc/mediatek/mt8196: Add srclken_rc drivers
......................................................................
soc/mediatek/mt8196: Add srclken_rc drivers
MT8196 uses new RC mode with clk_buf driver, and needs srclken_rc to
send PMRC_EN. PMRC_EN will collect the requirements of all users,
such as MD, GPS, PCIE, NFC.
TEST=Build pass.
BUG=b:317009620
Signed-off-by: ot_song fan <ot_song.fan(a)mediatek.corp-partner.google.com>
Change-Id: I40f8d2b12027955e6bd57b666e9f04c0116a0a93
---
M src/soc/mediatek/mt8196/Makefile.mk
M src/soc/mediatek/mt8196/include/soc/addressmap.h
A src/soc/mediatek/mt8196/include/soc/srclken_rc.h
A src/soc/mediatek/mt8196/srclken_rc.c
4 files changed, 803 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/42/85842/4
--
To view, visit https://review.coreboot.org/c/coreboot/+/85842?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: newpatchset
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I40f8d2b12027955e6bd57b666e9f04c0116a0a93
Gerrit-Change-Number: 85842
Gerrit-PatchSet: 4
Gerrit-Owner: Jarried Lin <jarried.lin(a)mediatek.com>
Gerrit-Reviewer: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Reviewer: Yidi Lin <yidilin(a)google.com>
Gerrit-Reviewer: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Reviewer: build bot (Jenkins) <no-reply(a)coreboot.org>
Gerrit-Reviewer: ot_song fan <ot_song.fan(a)mediatek.corp-partner.google.com>
Gerrit-Attention: Hung-Te Lin <hungte(a)chromium.org>
Gerrit-Attention: Yu-Ping Wu <yupingso(a)google.com>
Gerrit-Attention: Yidi Lin <yidilin(a)google.com>
Gerrit-Attention: Jarried Lin <jarried.lin(a)mediatek.com>
Nicholas Chin has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/85912?usp=email )
Change subject: [WIP] Docs: Start adding mainboard porting guide
......................................................................
[WIP] Docs: Start adding mainboard porting guide
Add some initial information about porting mainboards to coreboot to
replace and extend the limited information from the guide in the old
wiki. It is not intended (nor would it be practical) to be a
step-by-step guide for any board, but rather a general collection of
common tasks when porting and where to look for determining the values
to set for board specific configurations. The techniques described are
generally applicable to ports being created by setting values based on
vendor firmware.
Change-Id: I4680becebd8733ea7a23085c1832e9eb914138b3
Signed-off-by: Nicholas Chin <nic.c3.14(a)gmail.com>
---
M Documentation/getting_started/index.md
A Documentation/getting_started/porting/index.md
A Documentation/getting_started/porting/intel.md
A Documentation/getting_started/porting/x86_mainboard_porting.md
4 files changed, 133 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/12/85912/1
diff --git a/Documentation/getting_started/index.md b/Documentation/getting_started/index.md
index 7180c96..20cac4e 100644
--- a/Documentation/getting_started/index.md
+++ b/Documentation/getting_started/index.md
@@ -7,6 +7,7 @@
Build System <build_system.md>
Submodules <submodules.md>
Kconfig <kconfig.md>
+Porting Mainboards <porting/index.md>
Writing Documentation <writing_documentation.md>
Setting up GPIOs <gpio.md>
Adding devices to a device tree <devicetree.md>
diff --git a/Documentation/getting_started/porting/index.md b/Documentation/getting_started/porting/index.md
new file mode 100644
index 0000000..73f731c
--- /dev/null
+++ b/Documentation/getting_started/porting/index.md
@@ -0,0 +1,59 @@
+# Porting coreboot to a new mainboard
+
+## General
+The first step in porting a board to coreboot is determining whether
+coreboot supports the main chips on your board. The most critical of
+these are the processor, chipset, and/or SoC. Refer to the [supported
+chips] page for a list of chips that coreboot supports. If one of these
+isn't supported, then support for that chip would need to be added first
+before a board based on it could be ported. Other chips that should be
+supported if possible include SuperIOs and Embedded Controllers (EC),
+but these are often less critical in terms of being able to boot.
+
+One method of porting a board is to find an existing board with coreboot
+support and using it as a template for the new port. This is a common
+method to "retrofit" coreboot onto a board that originally shipped with
+a proprietary firmware implementation from the vendor.
+
+### Adding a new vendor
+If the vendor of your board does not have any boards currently supported
+by coreboot, you will need to create a new directory in `src/mainboard`
+as well as Kconfig entries for it. If your vendor is "foo":
+
+- Create a `src/mainboard/foo` directory
+- Create `src/mainboard/foo/Kconfig`
+- Create `src/mainboard/foo/Kconfig.name`
+
+The `Kconfig` and `Kconfig.name` files can be copied from other vendors
+and edited to reflect the new vendor.
+
+### Adding a new mainboard
+A new directory in `src/mainboard/vendorname/` needs to be created for
+your board. If starting with a similar existing port, copy the directory
+for that board to the directory for your board's vendor. As with the
+vendor directory, the board directory will need a `Kconfig` and a
+`Kconfig.name` file. If starting from an existing port, edit mainboard
+related Kconfigs to reflect the board you are porting.
+
+### Board specific configuration
+Various settings in files such as hda_verb.c, Kconfig, devicetree.cb,
+gpio.c and more need to be set to reflect the hardware configuration of
+your board. If starting from an existing board, values
+
+### General Porting Hints
+- If you don't know what a configuration variable means, search for its
+ name in the code for your board's platform. That often will lead to a
+ register address, which can be looked up in the output of various
+ utilities to determine the value that the vendor firmware sets it to,
+ as well as the chip datasheet which will document what each bit means.
+- Don't be afraid to ask for help! There are many coreboot developers
+ who are willing to help on various [forums].
+
+## Architecture Specific Porting Information
+```{toctree}
+:maxdepth: 1
+
+Porting x86 systems <x86_mainboard_porting.md>
+```
+
+[forums]: ../../community/forums.md
diff --git a/Documentation/getting_started/porting/intel.md b/Documentation/getting_started/porting/intel.md
new file mode 100644
index 0000000..f07ff40
--- /dev/null
+++ b/Documentation/getting_started/porting/intel.md
@@ -0,0 +1,42 @@
+# Porting Intel x86 based mainboards
+
+## GPIO
+If you have access to the schematics of your board, you should refer to
+that to ensure the GPIO configurations are correct for the physical
+design of the board and intended usages of each GPIO pin.
+
+For platforms using an ICH7 through ICH10 southbridge or Ibex Peak (1st
+Gen Intel Core/Ironlake) through Lynx Point (4th Gen Intel Core/Haswell)
+PCH, a [utility] exists which can generate gpio.c based on the GPIO
+section in the `inteltool` output. Note that depending on the chipset,
+not all GPIOs will exist. Refer to the chipset datasheet to determine
+which ones exist.
+
+For platforms based on Skylake and newer, the `util/intelp2m` utility
+can be used to generate a GPIO config based on the current configuration
+set by the vendor firmware.
+
+## SPD Mapping
+For boards with slotted memory, the raminit code needs to know how each
+physical slot maps to an SMBUS address to access the SPD EEPROM on each
+memory module. If you have access to the schematics or boardview, the
+addresses of each slot can be determined from the pull-up/pull-down
+resistors on the SA0-SA2 pins. The mapping can also be determined
+experimentally by booting with one slot populated at a time, determining
+which SMBUS address is active, and checking memory controller registers
+to determine which channel/slot is populated.
+
+Many boards use the following mapping, and thus using this and seeing if
+the system boots is often a viable option:
+- Channel 0, slot 0: 0x50
+- Channel 0, slot 1: 0x51
+- Channel 1, slot 0: 0x52
+- Channel 1, slot 1: 0x53
+
+BTX boards often use a reversed mapping:
+- Channel 0, slot 0: 0x53
+- Channel 0, slot 1: 0x52
+- Channel 1, slot 0: 0x51
+- Channel 1, slot 1: 0x50
+
+[utility]: https://codeberg.org/Riku_V/gpio-scripts
diff --git a/Documentation/getting_started/porting/x86_mainboard_porting.md b/Documentation/getting_started/porting/x86_mainboard_porting.md
new file mode 100644
index 0000000..70c5d3c
--- /dev/null
+++ b/Documentation/getting_started/porting/x86_mainboard_porting.md
@@ -0,0 +1,31 @@
+# Porting x86 based boards to coreboot
+
+## HD Audio
+The configuration for HD Audio codecs is found in the `hda_verb.c` file
+for each board. This contains configs for the vendor IDs and pin widget
+configs.
+
+The name, vendor/device ID, and subsystem ID of each codec can be found
+in the files `/proc/asound/cardn/codec#m`
+
+The pin configs for each codec can be found in
+`/sys/class/sound/cardn/hwCnDm/init_pin_configs`. The meanings of the
+values in init_pin_configs can be found in the Intel High Definition
+Audio Specification, Rev. 1.0a, Section 7.3.3.31: Configuration Default.
+
+## SuperIO
+Useful utilities: superiotool
+
+## Devicetree
+Useful utilities:
+- inteltool
+- lspci
+
+## Vendor Specific Porting Information
+Refer to the appropriate page for vendor specific porting documentation
+
+```{toctree}
+:maxdepth: 1
+
+Porting Intel x86 Mainboards <intel.md>
+```
--
To view, visit https://review.coreboot.org/c/coreboot/+/85912?usp=email
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings?usp=email
Gerrit-MessageType: newchange
Gerrit-Project: coreboot
Gerrit-Branch: main
Gerrit-Change-Id: I4680becebd8733ea7a23085c1832e9eb914138b3
Gerrit-Change-Number: 85912
Gerrit-PatchSet: 1
Gerrit-Owner: Nicholas Chin <nic.c3.14(a)gmail.com>