Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37368 )
Change subject: arch/x86/car: Remove runtime stack alignment enforcing
......................................................................
arch/x86/car: Remove runtime stack alignment enforcing
This is now checked at buildtime.
Change-Id: Ice687b1a4de53de4799e90238c98cfef19a81136
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/cpu/intel/car/core2/cache_as_ram.S
M src/cpu/intel/car/non-evict/cache_as_ram.S
M src/cpu/intel/car/p3/cache_as_ram.S
M src/cpu/intel/car/p4-netburst/cache_as_ram.S
M src/cpu/qemu-x86/cache_as_ram_bootblock.S
M src/soc/intel/common/block/cpu/car/cache_as_ram.S
6 files changed, 0 insertions(+), 7 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/68/37368/1
diff --git a/src/cpu/intel/car/core2/cache_as_ram.S b/src/cpu/intel/car/core2/cache_as_ram.S
index 73618d9..be96633 100644
--- a/src/cpu/intel/car/core2/cache_as_ram.S
+++ b/src/cpu/intel/car/core2/cache_as_ram.S
@@ -173,7 +173,6 @@
/* Need to align stack to 16 bytes at call instruction. Account for
the pushes below. */
- andl $0xfffffff0, %esp
subl $4, %esp
/* push TSC and BIST to stack */
diff --git a/src/cpu/intel/car/non-evict/cache_as_ram.S b/src/cpu/intel/car/non-evict/cache_as_ram.S
index 5a668c4..6c78ddb 100644
--- a/src/cpu/intel/car/non-evict/cache_as_ram.S
+++ b/src/cpu/intel/car/non-evict/cache_as_ram.S
@@ -219,7 +219,6 @@
/* Need to align stack to 16 bytes at call instruction. Account for
the pushes below. */
- andl $0xfffffff0, %esp
subl $4, %esp
/* push TSC and BIST to stack */
diff --git a/src/cpu/intel/car/p3/cache_as_ram.S b/src/cpu/intel/car/p3/cache_as_ram.S
index 5262b18..8c3009a 100644
--- a/src/cpu/intel/car/p3/cache_as_ram.S
+++ b/src/cpu/intel/car/p3/cache_as_ram.S
@@ -161,7 +161,6 @@
/* Need to align stack to 16 bytes at call instruction. Account for
the pushes below. */
- andl $0xfffffff0, %esp
subl $4, %esp
/* push TSC and BIST to stack */
diff --git a/src/cpu/intel/car/p4-netburst/cache_as_ram.S b/src/cpu/intel/car/p4-netburst/cache_as_ram.S
index fdeb0af..8fd240d 100644
--- a/src/cpu/intel/car/p4-netburst/cache_as_ram.S
+++ b/src/cpu/intel/car/p4-netburst/cache_as_ram.S
@@ -372,7 +372,6 @@
/* Need to align stack to 16 bytes at call instruction. Account for
the pushes below. */
- andl $0xfffffff0, %esp
subl $4, %esp
/* push TSC and BIST to stack */
diff --git a/src/cpu/qemu-x86/cache_as_ram_bootblock.S b/src/cpu/qemu-x86/cache_as_ram_bootblock.S
index 1fa0018..c1fe52d 100644
--- a/src/cpu/qemu-x86/cache_as_ram_bootblock.S
+++ b/src/cpu/qemu-x86/cache_as_ram_bootblock.S
@@ -37,8 +37,6 @@
movl $_ecar_stack, %esp
/* Align the stack and keep aligned for call to bootblock_c_entry() */
- and $0xfffffff0, %esp
-
/* Restore the BIST result and timestamps. */
#if defined(__x86_64__)
movd %mm1, %rdi
diff --git a/src/soc/intel/common/block/cpu/car/cache_as_ram.S b/src/soc/intel/common/block/cpu/car/cache_as_ram.S
index 0992d85..5d7eafa 100644
--- a/src/soc/intel/common/block/cpu/car/cache_as_ram.S
+++ b/src/soc/intel/common/block/cpu/car/cache_as_ram.S
@@ -174,7 +174,6 @@
/* Need to align stack to 16 bytes at call instruction. Account for
the two pushes below. */
- andl $0xfffffff0, %esp
sub $8, %esp
/* push TSC value to stack */
--
To view, visit https://review.coreboot.org/c/coreboot/+/37368
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: Ice687b1a4de53de4799e90238c98cfef19a81136
Gerrit-Change-Number: 37368
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-MessageType: newchange
Arthur Heymans has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37367 )
Change subject: arch/x86/car.ld: Assert at buildtime that _ecar_stack is aligned
......................................................................
arch/x86/car.ld: Assert at buildtime that _ecar_stack is aligned
This can be used to avoid aligning the stack at runtime.
Change-Id: I3aa068d947b6b6110fd7d002522f28a13e725cf7
Signed-off-by: Arthur Heymans <arthur(a)aheymans.xyz>
---
M src/arch/x86/car.ld
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/67/37367/1
diff --git a/src/arch/x86/car.ld b/src/arch/x86/car.ld
index 483a908..2d1723e 100644
--- a/src/arch/x86/car.ld
+++ b/src/arch/x86/car.ld
@@ -124,3 +124,4 @@
#if !CONFIG(ROMCC_BOOTBLOCK)
_bogus3 = ASSERT(CONFIG_DCACHE_BSP_STACK_SIZE > 0x0, "BSP stack size not configured");
#endif
+_bogus4 = ASSERT(_ecar_stack == ((_ecar_stack + 0xf) & ~0xf), "_ecar_stack must be 16 aligned");
--
To view, visit https://review.coreboot.org/c/coreboot/+/37367
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I3aa068d947b6b6110fd7d002522f28a13e725cf7
Gerrit-Change-Number: 37367
Gerrit-PatchSet: 1
Gerrit-Owner: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-MessageType: newchange
Idwer Vollering has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/37968 )
Change subject: romcc: cleanup leftovers
......................................................................
romcc: cleanup leftovers
Change-Id: I5112e0ce66e3bcd8c1f020089278766d2f27edb8
Signed-off-by: Idwer Vollering <vidwer(a)gmail.com>
---
M .gitignore
M util/README.md
M util/abuild/abuild.1
M util/lint/check_lint_tests
M util/lint/lint-000-license-headers
M util/lint/lint-014-qualified-types
M util/lint/lint-extended-015-final-newlines
M util/lint/lint-stable-010-asm-syntax
8 files changed, 2 insertions(+), 31 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/68/37968/1
diff --git a/.gitignore b/.gitignore
index 0cc6ae2..86ddd19 100644
--- a/.gitignore
+++ b/.gitignore
@@ -115,7 +115,6 @@
util/nvramtool/nvramtool
util/optionlist/Options.wiki
util/pmh7tool/pmh7tool
-util/romcc/build
util/runfw/googlesnow
util/superiotool/superiotool
util/vgabios/testbios
diff --git a/util/README.md b/util/README.md
index 55bcaab..66438a9 100644
--- a/util/README.md
+++ b/util/README.md
@@ -86,8 +86,6 @@
* _sifive-gpt.py_ - Wraps the bootblock in a GPT partition for
SiFive's bootrom. `Python3`
* __rockchip__ - Generate Rockchip idblock bootloader. `Python2`
-* __romcc__ - Compile a C source file generating a binary that does not
-implicitly use RAM. `C`
* __sconfig__ - coreboot device tree compiler `Lex` `Yacc`
* __scripts__
* _config_ - Manipulate options in a .config file from the
diff --git a/util/abuild/abuild.1 b/util/abuild/abuild.1
index 2eee84b..ccdfff6 100644
--- a/util/abuild/abuild.1
+++ b/util/abuild/abuild.1
@@ -78,7 +78,6 @@
.B abuild
is covered by the GNU General Public License (GPL), version 2 or later.
.SH SEE ALSO
-.BR romcc (1),
.BR flashrom (1).
.SH COPYRIGHT
2004 Stefan Reinauer
diff --git a/util/lint/check_lint_tests b/util/lint/check_lint_tests
index 6b1860f..20d49a7 100755
--- a/util/lint/check_lint_tests
+++ b/util/lint/check_lint_tests
@@ -35,11 +35,6 @@
sed -i "s/for more details./for more details.\n \* You${SPACE}should${SPACE}have received a copy of the GNU General Public License\n \* along with this program; if not, write to the Free Software\n \* Foundation, Inc./" ${TESTFILE009}
git add ${TESTFILE009}
-#lint-stable-010-asm-syntax
-TESTFILE010=src/arch/x86/bootblock_romcc.S
-sed -i "1s/^/.att${UNDERSCORE}syntax noprefix\n/" ${TESTFILE010}
-git add ${TESTFILE010}
-
#lint-stable-012-executable-bit
TESTFILE012=src/lib/libgcc.c
chmod +x ${TESTFILE012}
diff --git a/util/lint/lint-000-license-headers b/util/lint/lint-000-license-headers
index 9b3553b..5adbc7c 100755
--- a/util/lint/lint-000-license-headers
+++ b/util/lint/lint-000-license-headers
@@ -24,8 +24,6 @@
^util/amdtools/example_input/|\
^util/cbfstool/lzma/|\
^util/kconfig/|\
-^util/romcc/tests|\
-^util/romcc/results|\
Kconfig|\
\<COPYING\>|\
\<LICENSE\>|\
diff --git a/util/lint/lint-014-qualified-types b/util/lint/lint-014-qualified-types
index 98679ea..976748f 100755
--- a/util/lint/lint-014-qualified-types
+++ b/util/lint/lint-014-qualified-types
@@ -17,7 +17,7 @@
LC_ALL=C export LC_ALL
INCLUDED_DIRS='^src/\|^util/\|payloads/libpayload\|payloads/coreinfo'
-EXCLUDED_DIRS='^src/vendorcode\|^util/romcc\|cbfstool/lzma\|cbfstool/lz4'
+EXCLUDED_DIRS='^src/vendorcode\|^util/cbfstool/lzma\|cbfstool/lz4'
INCLUDED_FILES='\.[ch]:'
# Use git grep if the code is in a git repo, otherwise use grep.
diff --git a/util/lint/lint-extended-015-final-newlines b/util/lint/lint-extended-015-final-newlines
index b5a503f..15462d6 100755
--- a/util/lint/lint-extended-015-final-newlines
+++ b/util/lint/lint-extended-015-final-newlines
@@ -18,7 +18,7 @@
PIDS=""
INCLUDED_DIRS_AND_FILES='util/* src/* payloads/* configs/* Makefile *.inc'
-EXCLUDED_DIRS='src/vendorcode/\|util/romcc/\|cbfstool/lzma/\|cbfstool/lz4/\|Documentation/\|build/\|3rdparty/\|\.git/\|coreboot-builds/\|util/nvidia/cbootimage/'
+EXCLUDED_DIRS='src/vendorcode/\|util/cbfstool/lzma/\|cbfstool/lz4/\|Documentation/\|build/\|3rdparty/\|\.git/\|coreboot-builds/\|util/nvidia/cbootimage/'
EXCLUDED_FILES='\.jpg$\|\.cksum$\|\.bin$\|\.vbt$\|\.hex$\|\.ico$\|\.o$\|\.bz2$\|\.xz$\|^.tmpconfig\|\.pyc$\|_shipped$\|sha256$\|\.png$\|\.patch$'
# Use git ls-files if the code is in a git repo, otherwise use find.
diff --git a/util/lint/lint-stable-010-asm-syntax b/util/lint/lint-stable-010-asm-syntax
index a102a77..e69de29 100755
--- a/util/lint/lint-stable-010-asm-syntax
+++ b/util/lint/lint-stable-010-asm-syntax
@@ -1,18 +0,0 @@
-#!/bin/sh
-# This file is part of the coreboot project.
-#
-# Copyright 2016 Google Inc.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; version 2 of the License.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# DESCR: Check that we use a single assembler syntax
-
-LC_ALL=C export LC_ALL
-git grep -n "\.\(att\|intel\)_syntax\>" | grep -v '\.patch:'
--
To view, visit https://review.coreboot.org/c/coreboot/+/37968
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I5112e0ce66e3bcd8c1f020089278766d2f27edb8
Gerrit-Change-Number: 37968
Gerrit-PatchSet: 1
Gerrit-Owner: Idwer Vollering <vidwer(a)gmail.com>
Gerrit-MessageType: newchange
Hello Nico Huber, Patrick Georgi,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/42548
to review the following change.
Change subject: Add qc_blobs repository
......................................................................
Add qc_blobs repository
This patch adds a separate blobs repository for Qualcomm blobs,
analogous to the existing AMD blobs. Qualcomm's binary licenses allow
files to be redistributed and used by anyone, but they explicitly
require the user to agree to the license terms when just *downloading*
the binary (even if they're not using them to build any firmware). Some
community members do not like to have to agree to licenses for files
they're not actually using, so we are keeping these files separate from
the main blobs repository and adding an extra Kconfig to make sure the
user is aware of and must explicitly agree to this before downloading
these files.
Signed-off-by: Julius Werner <jwerner(a)chromium.org>
Change-Id: I247746c1b633343064c9f32ef1556000475d6c4a
---
M .gitmodules
A 3rdparty/qc_blobs
M Makefile.inc
M src/Kconfig
M util/abuild/abuild
M util/release/build-release
6 files changed, 31 insertions(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/48/42548/1
diff --git a/.gitmodules b/.gitmodules
index 9545bb6..bc4a6eb 100644
--- a/.gitmodules
+++ b/.gitmodules
@@ -46,3 +46,8 @@
path = 3rdparty/cmocka
url = ../cmocka.git
update = none
+[submodule "3rdparty/qc_blobs"]
+ path = 3rdparty/qc_blobs
+ url = ../qc_blobs.git
+ update = none
+ ignore = dirty
diff --git a/3rdparty/qc_blobs b/3rdparty/qc_blobs
new file mode 160000
index 0000000..126fef6
--- /dev/null
+++ b/3rdparty/qc_blobs
@@ -0,0 +1 @@
+Subproject commit 126fef6b996237403039aa603945fc4caa75c8d6
diff --git a/Makefile.inc b/Makefile.inc
index 86335d9..605913a 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -195,6 +195,9 @@
ifeq ($(CONFIG_USE_AMD_BLOBS),y)
forgetthis:=$(if $(GIT),$(shell git submodule update --init --checkout 3rdparty/amd_blobs))
endif
+ifeq ($(CONFIG_USE_QC_BLOBS),y)
+forgetthis:=$(if $(GIT),$(shell git submodule update --init --checkout 3rdparty/qc_blobs))
+endif
endif
UPDATED_SUBMODULES:=1
COREBOOT_EXPORTS += UPDATED_SUBMODULES
diff --git a/src/Kconfig b/src/Kconfig
index 621a582..30ab68a 100644
--- a/src/Kconfig
+++ b/src/Kconfig
@@ -234,6 +234,26 @@
Note that for some products, omitting PSP, SMU images, or other items
may result in a nonbooting coreboot.rom.
+config USE_QC_BLOBS
+ bool "Allow QC blobs repository (selecting this agrees to the license)
+ depends on USE_BLOBS
+ help
+ This draws in the qc_blobs repository, which contains binary files
+ distributed by Qualcomm that are required to build firmware for
+ certain Qualcomm SoCs (including QcLib, QC-SEC, qtiseclib and QUP
+ firmware). If you say Y here you are implicitly agreeing to the
+ license agreements of all files in this repository (which you can
+ browse at https://review.coreboot.org/cgit/qc_blobs.git/tree/ ).
+
+ *******************************************************************
+ PLEASE MAKE SURE YOU READ ALL 'LICENSE' FILES IN ALL SUBDIRECTORIES
+ OF THIS REPOSITORY AND AGREE TO THEIR TERMS BEFORE SELECTING THIS!
+ *******************************************************************
+
+ Not selecting this option means certain Qualcomm SoCs and related
+ mainboards cannot be built and will be hidden from the "Mainboards"
+ section.
+
config COVERAGE
bool "Code coverage support"
depends on COMPILER_GCC
diff --git a/util/abuild/abuild b/util/abuild/abuild
index 022567d..55d441f 100755
--- a/util/abuild/abuild
+++ b/util/abuild/abuild
@@ -714,7 +714,7 @@
shift;;
-B|--blobs) shift
customizing="${customizing}, blobs"
- configoptions="${configoptions}CONFIG_USE_AMD_BLOBS=y\nCONFIG_ADD_FSP_BINARIES=y\n"
+ configoptions="${configoptions}CONFIG_USE_AMD_BLOBS=y\nCONFIG_USE_QC_BLOBS=y\nCONFIG_ADD_FSP_BINARIES=y\n"
;;
-A|--any-toolchain) shift
customizing="${customizing}, any-toolchain"
diff --git a/util/release/build-release b/util/release/build-release
index 7ca6001..ce8e600 100755
--- a/util/release/build-release
+++ b/util/release/build-release
@@ -72,6 +72,7 @@
exclude_paths+="3rdparty/fsp "
exclude_paths+="3rdparty/intel-microcode "
exclude_paths+="3rdparty/amd_blobs "
+exclude_paths+="3rdparty/qc_blobs "
for i in ${exclude_paths}; do
blobs_paths+="coreboot-${VERSION_NAME}/${i} "
exclude_opts+="--exclude=coreboot-${VERSION_NAME}/${i} "
--
To view, visit https://review.coreboot.org/c/coreboot/+/42548
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I247746c1b633343064c9f32ef1556000475d6c4a
Gerrit-Change-Number: 42548
Gerrit-PatchSet: 1
Gerrit-Owner: Julius Werner <jwerner(a)chromium.org>
Gerrit-Reviewer: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Patrick Georgi <pgeorgi(a)google.com>
Gerrit-MessageType: newchange
Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/30957
Change subject: superio/ite: Add and use it8528e
......................................................................
superio/ite: Add and use it8528e
* Add SuperIO ITE8528E
* Use ITE8528E to configure serial on wedge100s
TODO: Add support for accessing EC space.
Tested on wedge100s. The serial works without CONFIG_CONSOLE_SERIAL.
Change-Id: I72aa756e123d6f99d9ef4fe955c4b7f1be25d547
Signed-off-by: Patrick Rudolph <patrick.rudolph(a)9elements.com>
---
M src/mainboard/ocp/wedge100s/Kconfig
M src/mainboard/ocp/wedge100s/devicetree.cb
M src/superio/ite/Makefile.inc
A src/superio/ite/it8528e/Kconfig
A src/superio/ite/it8528e/Makefile.inc
A src/superio/ite/it8528e/chip.h
A src/superio/ite/it8528e/it8528e.h
A src/superio/ite/it8528e/superio.c
8 files changed, 226 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/57/30957/1
diff --git a/src/mainboard/ocp/wedge100s/Kconfig b/src/mainboard/ocp/wedge100s/Kconfig
index ce9c097..6224340 100644
--- a/src/mainboard/ocp/wedge100s/Kconfig
+++ b/src/mainboard/ocp/wedge100s/Kconfig
@@ -16,6 +16,7 @@
select MAINBOARD_HAS_LPC_TPM
select MAINBOARD_HAS_TPM1
select DRIVERS_UART_8250IO
+ select SUPERIO_ITE_IT8528E
config VBOOT
select VBOOT_VBNV_CMOS
diff --git a/src/mainboard/ocp/wedge100s/devicetree.cb b/src/mainboard/ocp/wedge100s/devicetree.cb
index 3d66d0d..fc6dccc 100644
--- a/src/mainboard/ocp/wedge100s/devicetree.cb
+++ b/src/mainboard/ocp/wedge100s/devicetree.cb
@@ -11,6 +11,58 @@
chip drivers/pc80/tpm
device pnp 0c31.0 on end
end
+ chip superio/ite/it8528e
+ # COM1, routed to COM-e header
+ device pnp 6e.1 on
+ io 0x60 = 0x3f8
+ irq 0x70 = 4
+ end
+ # COM2, routed to COM-e header
+ device pnp 6e.2 on
+ io 0x60 = 0x2f8
+ irq 0x70 = 3
+ end
+ device pnp 6e.4 off end
+ device pnp 6e.5 off end
+ device pnp 6e.6 off end
+ device pnp 6e.a off end
+ device pnp 6e.f off end
+ device pnp 6e.10 off
+ io 0x60 = 0x70
+ io 0x62 = 0x72
+ irq 0x70 = 8
+ end
+ device pnp 6e.11 off
+ io 0x60 = 0x620
+ io 0x62 = 0x660
+ irq 0x70 = 1
+ end
+ device pnp 6e.12 off
+ io 0x60 = 0x680
+ io 0x62 = 0x6c0
+ irq 0x70 = 1
+ end
+ device pnp 6e.13 off
+ io 0x60 = 0x300
+ irq 0x70 = 2
+ end
+ device pnp 6e.14 off end
+ device pnp 6e.17 off
+ io 0x60 = 0x6a0
+ io 0x62 = 0x6e0
+ irq 0x70 = 1
+ end
+ device pnp 6e.18 off
+ io 0x60 = 0x740
+ io 0x62 = 0x780
+ irq 0x70 = 1
+ end
+ device pnp 6e.19 off
+ io 0x60 = 0x7a0
+ io 0x62 = 0x7c0
+ irq 0x70 = 1
+ end
+ end #superio/ite/it8528e
end # LPC Bridge
device pci 1f.2 on end # SATA Controller
device pci 1f.3 on end # SMBus Controller
diff --git a/src/superio/ite/Makefile.inc b/src/superio/ite/Makefile.inc
index e73fd71..551abe9 100644
--- a/src/superio/ite/Makefile.inc
+++ b/src/superio/ite/Makefile.inc
@@ -20,6 +20,7 @@
## include generic ite environment controller driver
ramstage-$(CONFIG_SUPERIO_ITE_ENV_CTRL) += common/env_ctrl.c
+subdirs-y += it8528e
subdirs-y += it8623e
subdirs-y += it8671f
subdirs-y += it8712f
diff --git a/src/superio/ite/it8528e/Kconfig b/src/superio/ite/it8528e/Kconfig
new file mode 100644
index 0000000..3815c28
--- /dev/null
+++ b/src/superio/ite/it8528e/Kconfig
@@ -0,0 +1,18 @@
+##
+## This file is part of the coreboot project.
+##
+## Copyright (C) 2019 Patrick Rudolph <patrick.rudolph(a)9elements.com>
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; version 2 of the License.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+
+config SUPERIO_ITE_IT8528E
+ bool
+ select SUPERIO_ITE_COMMON_PRE_RAM
diff --git a/src/superio/ite/it8528e/Makefile.inc b/src/superio/ite/it8528e/Makefile.inc
new file mode 100644
index 0000000..def04e5
--- /dev/null
+++ b/src/superio/ite/it8528e/Makefile.inc
@@ -0,0 +1,17 @@
+##
+## This file is part of the coreboot project.
+##
+## Copyright (C) 2019 Patrick Rudolph <patrick.rudolph(a)9elements.com>
+##
+## This program is free software; you can redistribute it and/or modify
+## it under the terms of the GNU General Public License as published by
+## the Free Software Foundation; either version 2 of the License, or
+## (at your option) any later version.
+##
+## This program is distributed in the hope that it will be useful,
+## but WITHOUT ANY WARRANTY; without even the implied warranty of
+## MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+## GNU General Public License for more details.
+##
+
+ramstage-$(CONFIG_SUPERIO_ITE_IT8528E) += superio.c
diff --git a/src/superio/ite/it8528e/chip.h b/src/superio/ite/it8528e/chip.h
new file mode 100644
index 0000000..ef7e14f
--- /dev/null
+++ b/src/superio/ite/it8528e/chip.h
@@ -0,0 +1,26 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2019 Patrick Rudolph <patrick.rudolph(a)9elements.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef SUPERIO_ITE_IT8528E_CHIP_H
+#define SUPERIO_ITE_IT8528E_CHIP_H
+
+#include <superio/ite/common/env_ctrl_chip.h>
+
+struct superio_ite_it8528e_config {
+ // FIXME: Add support for EC
+};
+
+#endif /* SUPERIO_ITE_IT8528E_CHIP_H */
diff --git a/src/superio/ite/it8528e/it8528e.h b/src/superio/ite/it8528e/it8528e.h
new file mode 100644
index 0000000..7b19349
--- /dev/null
+++ b/src/superio/ite/it8528e/it8528e.h
@@ -0,0 +1,37 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2019 Patrick Rudolph <patrick.rudolph(a)9elements.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef SUPERIO_ITE_IT8528E_H
+#define SUPERIO_ITE_IT8528E_H
+
+#define IT8528E_SP1 0x01 /* Com1 */
+#define IT8528E_SP2 0x02 /* Com2 */
+#define IT8528E_SWUC 0x04 /* System Wake-Up */
+#define IT8528E_KBCM 0x05 /* PS/2 mouse */
+#define IT8528E_KBCK 0x06 /* PS/2 keyboard */
+#define IT8528E_IR 0x0a /* Consumer IR */
+#define IT8528E_SMFI 0x0f /* Shared Memory/Flash Interface */
+#define IT8528E_RTCT 0x10 /* RTC-like Timer */
+#define IT8528E_PMC1 0x11 /* Power Management Channel 1 */
+#define IT8528E_PMC2 0x12 /* Power Management Channel 2 */
+#define IT8528E_SSPI 0x13 /* Serial Periphial Interface */
+#define IT8528E_PECI 0x14 /* Platform EC Interface */
+#define IT8528E_PMC3 0x17 /* Power Management Channel 3 */
+#define IT8528E_PMC4 0x18 /* Power Management Channel 4 */
+#define IT8528E_PMC5 0x19 /* Power Management Channel 5 */
+
+
+#endif /* SUPERIO_ITE_IT8528E_H */
diff --git a/src/superio/ite/it8528e/superio.c b/src/superio/ite/it8528e/superio.c
new file mode 100644
index 0000000..ae2a8e9
--- /dev/null
+++ b/src/superio/ite/it8528e/superio.c
@@ -0,0 +1,74 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * Copyright (C) 2006 Uwe Hermann <uwe(a)hermann-uwe.de>
+ * Copyright (C) 2007 Philipp Degler <pdegler(a)rumms.uni-mannheim.de>
+ * Copyright (C) 2017 Gergely Kiss <mail.gery(a)gmail.com>
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <device/device.h>
+#include <device/pnp.h>
+#include <arch/io.h>
+#include <stdlib.h>
+#include <superio/conf_mode.h>
+
+#include "chip.h"
+#include "it8528e.h"
+
+static void it8528e_init(struct device *dev)
+{
+ // FIXME: Init EC
+}
+
+static struct device_operations ops = {
+ .read_resources = pnp_read_resources,
+ .set_resources = pnp_set_resources,
+ .enable_resources = pnp_enable_resources,
+ .enable = pnp_alt_enable,
+ .init = it8528e_init,
+ .ops_pnp_mode = &pnp_conf_mode_870155_aa,
+};
+
+static struct pnp_info pnp_dev_info[] = {
+ { NULL, IT8528E_SP1, PNP_IO0 | PNP_IRQ0, 0x0ff8, },
+ { NULL, IT8528E_SP2, PNP_IO0 | PNP_IRQ0, 0x0ff8, },
+ { NULL, IT8528E_SWUC, PNP_IO0 | PNP_IRQ0, 0xfff0, },
+ { NULL, IT8528E_KBCM, PNP_IRQ0, },
+ /* Documentation: Programm io0 = 0x60 and io1 = 0x64 */
+ { NULL, IT8528E_KBCK, PNP_IO0 | PNP_IO1 | PNP_IRQ0, 0x07ff, 0x07ff, },
+ { NULL, IT8528E_IR, PNP_IO0 | PNP_IRQ0, 0xfff8, },
+ { NULL, IT8528E_SMFI, PNP_IO0 | PNP_IRQ0, 0xfff0, },
+ /* Documentation: Programm io0 = 0x70 and io1 = 0x272 */
+ { NULL, IT8528E_RTCT, PNP_IO0 | PNP_IO1 | PNP_IO2 | PNP_IO3 | PNP_IRQ0,
+ 0xfffe, 0xfffe, 0xfffe, 0xfffe},
+ /* Documentation: Programm io0 = 0x62 and io1 = 0x66 */
+ { NULL, IT8528E_PMC1, PNP_IO0 | PNP_IO1 | PNP_IRQ0 , 0x07ff, 0x07ff },
+ { NULL, IT8528E_PMC2, PNP_IO0 | PNP_IO1 | PNP_IO2 | PNP_IRQ0 , 0x07fc,
+ 0x07fc, 0xfff0 },
+ /* Documentation is unclear if PMC3-5 have LPC I/O decoding support */
+ { NULL, IT8528E_PMC3, PNP_IO0 | PNP_IO1 | PNP_IRQ0 , 0x07ff, 0x07ff },
+ { NULL, IT8528E_PMC4, PNP_IO0 | PNP_IO1 | PNP_IRQ0 , 0x07ff, 0x07ff },
+ { NULL, IT8528E_PMC5, PNP_IO0 | PNP_IO1 | PNP_IRQ0 , 0x07ff, 0x07ff },
+ { NULL, IT8528E_SSPI, PNP_IO0 | PNP_IRQ0, 0xfff8 },
+ { NULL, IT8528E_PECI, PNP_IO0 , 0xfff8 },
+};
+
+static void enable_dev(struct device *dev)
+{
+ pnp_enable_devices(dev, &ops, ARRAY_SIZE(pnp_dev_info), pnp_dev_info);
+}
+
+struct chip_operations superio_ite_it8528e_ops = {
+ CHIP_NAME("ITE IT8528E Super I/O")
+ .enable_dev = enable_dev,
+};
--
To view, visit https://review.coreboot.org/c/coreboot/+/30957
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I72aa756e123d6f99d9ef4fe955c4b7f1be25d547
Gerrit-Change-Number: 30957
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-MessageType: newchange
Patrick Rudolph has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/38002 )
Change subject: drivers/ipmi: Add Supermicro OEM commands
......................................................................
drivers/ipmi: Add Supermicro OEM commands
Add a new driver for OEM commands an select if from x11-lga1151-series.
The driver communicates the BIOS version and date to the BMC using OEM
commands. The command should be supported on all X11 series, but might
work with older BMC, too.
Tested on X11SSH-TF:
The BIOS version strings are updated on boot and are visible in the
BMC web UI.
Change-Id: I51c22f83383affb70abb0efbcdc33ea925b5ff9f
Signed-off-by: Patrick Rudolph <patrick.rudolph(a)9elements.com>
---
M src/drivers/ipmi/Kconfig
M src/drivers/ipmi/Makefile.inc
M src/drivers/ipmi/ipmi_kcs_ops.c
A src/drivers/ipmi/ipmi_supermicro_oem.h
A src/drivers/ipmi/supermicro_oem.c
M src/mainboard/supermicro/x11-lga1151-series/Kconfig
6 files changed, 121 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/02/38002/1
diff --git a/src/drivers/ipmi/Kconfig b/src/drivers/ipmi/Kconfig
index 0f7152d..e098bc8 100644
--- a/src/drivers/ipmi/Kconfig
+++ b/src/drivers/ipmi/Kconfig
@@ -8,3 +8,14 @@
depends on IPMI_KCS
help
KCS status and command register IO port address spacing
+
+config DRIVER_SUPERMICRO_IPMI_OEM
+ bool "Supermicro IPMI OEM BMC support"
+ depends on IPMI_KCS
+ default n
+ help
+ Tested on X11SSH only. Different BMCs might have different OEM
+ commands.
+ The following features are implemented:
+ * Communicates the BIOS version to the BMC
+ * Communicates the BIOS date to the BMC
diff --git a/src/drivers/ipmi/Makefile.inc b/src/drivers/ipmi/Makefile.inc
index 9d5b3d4..9fccccf 100644
--- a/src/drivers/ipmi/Makefile.inc
+++ b/src/drivers/ipmi/Makefile.inc
@@ -1,3 +1,4 @@
ramstage-$(CONFIG_IPMI_KCS) += ipmi_kcs.c
ramstage-$(CONFIG_IPMI_KCS) += ipmi_kcs_ops.c
ramstage-$(CONFIG_IPMI_KCS) += ipmi_ops.c
+ramstage-$(CONFIG_DRIVER_SUPERMICRO_IPMI_OEM) += supermicro_oem.c
diff --git a/src/drivers/ipmi/ipmi_kcs_ops.c b/src/drivers/ipmi/ipmi_kcs_ops.c
index 5cb8995..ba8487f 100644
--- a/src/drivers/ipmi/ipmi_kcs_ops.c
+++ b/src/drivers/ipmi/ipmi_kcs_ops.c
@@ -34,6 +34,7 @@
#include <delay.h>
#include <timer.h>
#include "ipmi_kcs.h"
+#include "ipmi_supermicro_oem.h"
#include "chip.h"
/* 4 bit encoding */
@@ -170,6 +171,12 @@
/* Don't write tables if communication failed */
dev->enabled = 0;
}
+
+ if (!dev->enabled)
+ return;
+
+ if (CONFIG(DRIVER_SUPERMICRO_IPMI_OEM))
+ supermicro_ipmi_oem(dev->path.pnp.port);
}
#if CONFIG(HAVE_ACPI_TABLES)
diff --git a/src/drivers/ipmi/ipmi_supermicro_oem.h b/src/drivers/ipmi/ipmi_supermicro_oem.h
new file mode 100644
index 0000000..742b97d
--- /dev/null
+++ b/src/drivers/ipmi/ipmi_supermicro_oem.h
@@ -0,0 +1,20 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License as
+ * published by the Free Software Foundation; version 2 of
+ * the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#ifndef __IPMI_SUPERMICRO_OEM_H
+#define __IPMI_SUPERMICRO_OEM_H
+
+void supermicro_ipmi_oem(const uint16_t kcs_port);
+
+#endif /* __IPMI_SUPERMICRO_OEM_H */
diff --git a/src/drivers/ipmi/supermicro_oem.c b/src/drivers/ipmi/supermicro_oem.c
new file mode 100644
index 0000000..ea01fef
--- /dev/null
+++ b/src/drivers/ipmi/supermicro_oem.c
@@ -0,0 +1,81 @@
+/*
+ * This file is part of the coreboot project.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; version 2 of the License.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ */
+
+#include <types.h>
+
+#include <console/console.h>
+#include <drivers/ipmi/ipmi_kcs.h>
+#include <string.h>
+#include <build.h>
+#include "ipmi_supermicro_oem.h"
+
+#define IPMI_NETFN_OEM 0x30
+#define IPMI_LUN0_AC_SET_BIOS_VER 0x100
+#define IPMI_LUN0_AC_SET_BIOS_DATE 0x101
+#define IPMI_LUN0_SET_BIOS_STRING 0xac
+
+struct ipmi_oem_set_bios_str {
+ uint16_t ver;
+ char str[16]; // NULL terminated string
+} __packed;
+
+static void set_coreboot_ver(const uint16_t kcs_port)
+{
+ const char *coreboot_ver = COREBOOT_VERSION;
+ struct ipmi_oem_set_bios_str bios_ver;
+ struct ipmi_rsp rsp;
+ int ret;
+ size_t i;
+
+ /* Only 8 charactars are visible in UI. Cut of on first dash */
+ for (i = 0; i < 15; i++) {
+ if (coreboot_ver[i] == '-')
+ break;
+ bios_ver.str[i] = coreboot_ver[i];
+ }
+ bios_ver.str[i] = 0;
+ bios_ver.ver = IPMI_LUN0_AC_SET_BIOS_VER;
+
+ ret = ipmi_kcs_message(kcs_port, IPMI_NETFN_OEM, 0, IPMI_LUN0_SET_BIOS_STRING,
+ (const unsigned char *) &bios_ver, sizeof(bios_ver),
+ (unsigned char *) &rsp, sizeof(rsp));
+ if (ret < sizeof(rsp) || rsp.completion_code) {
+ printk(BIOS_ERR, "BMC_IPMI: %s command failed (ret=%d resp=0x%x)\n",
+ __func__, ret, rsp.completion_code);
+ }
+}
+
+static void set_coreboot_date(const uint16_t kcs_port)
+{
+ struct ipmi_oem_set_bios_str bios_ver;
+ struct ipmi_rsp rsp;
+ int ret;
+
+ strncpy(bios_ver.str, COREBOOT_DMI_DATE, 15);
+ bios_ver.str[15] = 0;
+ bios_ver.ver = IPMI_LUN0_AC_SET_BIOS_DATE;
+
+ ret = ipmi_kcs_message(kcs_port, IPMI_NETFN_OEM, 0, IPMI_LUN0_SET_BIOS_STRING,
+ (const unsigned char *) &bios_ver, sizeof(bios_ver),
+ (unsigned char *) &rsp, sizeof(rsp));
+ if (ret < sizeof(rsp) || rsp.completion_code) {
+ printk(BIOS_ERR, "BMC_IPMI: %s command failed (ret=%d resp=0x%x)\n",
+ __func__, ret, rsp.completion_code);
+ }
+}
+
+void supermicro_ipmi_oem(const uint16_t kcs_port)
+{
+ set_coreboot_ver(kcs_port);
+ set_coreboot_date(kcs_port);
+}
diff --git a/src/mainboard/supermicro/x11-lga1151-series/Kconfig b/src/mainboard/supermicro/x11-lga1151-series/Kconfig
index 5a99f7a..53ae398 100644
--- a/src/mainboard/supermicro/x11-lga1151-series/Kconfig
+++ b/src/mainboard/supermicro/x11-lga1151-series/Kconfig
@@ -12,6 +12,7 @@
select SUPERIO_ASPEED_AST2400
select GENERATE_SMBIOS_TABLES
select IPMI_KCS
+ select DRIVER_SUPERMICRO_IPMI_OEM
select MAINBOARD_NO_FSP_GOP
select SUPERIO_ASPEED_HAS_UART_DELAY_WORKAROUND
select NO_FADT_8042
--
To view, visit https://review.coreboot.org/c/coreboot/+/38002
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I51c22f83383affb70abb0efbcdc33ea925b5ff9f
Gerrit-Change-Number: 38002
Gerrit-PatchSet: 1
Gerrit-Owner: Patrick Rudolph <patrick.rudolph(a)9elements.com>
Gerrit-MessageType: newchange