Patrick Georgi submitted this change.

View Change

Approvals: build bot (Jenkins): Verified Arthur Heymans: Looks good to me, approved Angel Pons: Looks good to me, approved
mb/asus/p2b: Add option table support

Just do it already.

The two SCSI-specific options for p2b-{ls,ds} will be wired up in a
followup. They will be ignored by boards without the hardware.

Change-Id: Ia43d502219d7c23d21f49d651113e3d653c6e9f4
Signed-off-by: Keith Hui <buurin@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/41560
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
---
M src/mainboard/asus/p2b/Kconfig
A src/mainboard/asus/p2b/cmos.default
A src/mainboard/asus/p2b/cmos.layout
3 files changed, 81 insertions(+), 0 deletions(-)

diff --git a/src/mainboard/asus/p2b/Kconfig b/src/mainboard/asus/p2b/Kconfig
index 1d3d3b9..ab0a819 100644
--- a/src/mainboard/asus/p2b/Kconfig
+++ b/src/mainboard/asus/p2b/Kconfig
@@ -16,6 +16,7 @@
select SUPERIO_WINBOND_W83977TF
select HAVE_PIRQ_TABLE
select BOARD_ROMSIZE_KB_256
+ select HAVE_OPTION_TABLE
select SDRAMPWR_4DIMM if BOARD_ASUS_P2B_LS || BOARD_ASUS_P3B_F
select HAVE_ACPI_TABLES if BOARD_ASUS_P2B || BOARD_ASUS_P2B_LS
select BASE_ASUS_P2B_D if BOARD_ASUS_P2B_D || BOARD_ASUS_P2B_DS
diff --git a/src/mainboard/asus/p2b/cmos.default b/src/mainboard/asus/p2b/cmos.default
new file mode 100644
index 0000000..447726f
--- /dev/null
+++ b/src/mainboard/asus/p2b/cmos.default
@@ -0,0 +1,8 @@
+## SPDX-License-Identifier: GPL-2.0-only
+
+boot_option=Fallback
+debug_level=Debug
+nmi=Enable
+udma_enable=Enable
+scsi_lvd_term=Enable
+scsi_se_term=Enable
diff --git a/src/mainboard/asus/p2b/cmos.layout b/src/mainboard/asus/p2b/cmos.layout
new file mode 100644
index 0000000..37fe73d
--- /dev/null
+++ b/src/mainboard/asus/p2b/cmos.layout
@@ -0,0 +1,72 @@
+entries
+
+# -----------------------------------------------------------------
+0 120 r 0 reserved_memory
+#120 264 r 0 unused
+
+# -----------------------------------------------------------------
+# RTC_BOOT_BYTE (coreboot hardcoded)
+384 1 e 3 boot_option
+388 4 h 0 reboot_counter
+
+# -----------------------------------------------------------------
+# coreboot config options: console
+395 4 e 4 debug_level
+
+# -----------------------------------------------------------------
+# coreboot config options: southbridge
+
+# Non Maskable Interrupt(NMI) support, which is an interrupt that may
+# occur on a RAM or unrecoverable error.
+408 1 e 1 nmi
+
+#409 2 e 5 power_on_after_fail
+411 1 e 1 udma_enable
+
+# -----------------------------------------------------------------
+# p2b-[ld]s config options: onboard SCSI termination
+# Controls PIIX4 GPO22 (Ultra2-68) and GPO23 (SCSI-50)
+412 1 e 1 scsi_se_term
+413 1 e 2 scsi_lvd_term
+
+# -----------------------------------------------------------------
+# TODO: raminit config options
+#415 1 e 6 ram_timing
+#416 1 e 5 srp_timing
+#417 1 e 5 srcd_timing
+#418 1 e 5 cas_latency
+
+enumerations
+#ID value text
+
+# Generic on/off enum
+1 0 Disable
+1 1 Enable
+# Inverted on/off enum
+2 0 Enable
+2 1 Disable
+
+# boot_option
+3 0 Fallback
+3 1 Normal
+
+# debug_level
+4 0 Emergency
+4 1 Alert
+4 2 Critical
+4 3 Error
+4 4 Warning
+4 5 Notice
+4 6 Info
+4 7 Debug
+4 8 Spew
+
+#5 0 3
+#5 1 2
+
+#6 0 Auto
+#6 1 Manual
+
+checksums
+
+checksum 592 975 976

To view, visit change 41560. To unsubscribe, or for help writing mail filters, visit settings.

Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ia43d502219d7c23d21f49d651113e3d653c6e9f4
Gerrit-Change-Number: 41560
Gerrit-PatchSet: 10
Gerrit-Owner: Keith Hui <buurin@gmail.com>
Gerrit-Reviewer: Angel Pons <th3fanbus@gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur@aheymans.xyz>
Gerrit-Reviewer: Branden Waldner <scruffy99@gmail.com>
Gerrit-Reviewer: Patrick Georgi <pgeorgi@google.com>
Gerrit-Reviewer: Paul Menzel <paulepanter@users.sourceforge.net>
Gerrit-Reviewer: build bot (Jenkins) <no-reply@coreboot.org>
Gerrit-MessageType: merged