Compare commits

...

150 Commits
kudu6 ... 4.16

Author SHA1 Message Date
Martin Roth
e3e965b13d Revert "util/cbfstool: Port elogtool to libflashrom"
This reverts commit d74b8d9c99.

This change breaks the 'make all' build of the cbfstool tools
from the util/cbfstool directory unless libflashrom-dev is
installed, complaining that flashrom is not installed.

Even with libflashrom-dev installed, it breaks building
elogtool with the public version of libflashrom-dev.

Signed-off-by: Martin Roth <martin@coreboot.org>
Change-Id: I572daa0c0f3998e20a8ed76df21228fdbb384baf
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62404
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: ron minnich <rminnich@gmail.com>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-02-26 01:24:17 +00:00
Jon Murphy
b4156412db mb/google/skyrim: Enable USB controllers in devicetree
BUG=b:214413631
TEST=builds

Signed-off-by: Jon Murphy <jpmurphy@google.com>
Change-Id: I9ca2c16d97e064b32400356e1de37f3f70155a07
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62152
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-02-26 00:39:02 +00:00
Jon Murphy
10ff9375ae mb/google/skyrim: Enable internal graphics
BUG=b:214416935
TEST=builds

Signed-off-by: Jon Murphy <jpmurphy@google.com>
Change-Id: Icc71b114bf9d8f70ae38a876eedc9d1c3c02169c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62151
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-02-26 00:19:36 +00:00
Jon Murphy
4b2e04a53b mb/google/skyrim: Enable console UART
BUG=b:214414501
TEST=builds

Signed-off-by: Jon Murphy <jpmurphy@google.com>
Change-Id: I053909ab73c1aa053f35a505b37571ff23adde89
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62147
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2022-02-26 00:18:40 +00:00
Jon Murphy
eab1827b66 mb/google/skyrim: Set up FW_CONFIG
BUG=b:214415048
TEST=builds
BRANCH=none

Signed-off-by: Jon Murphy <jpmurphy@google.com>
Change-Id: Ida8d226f84726f2eb03b07618907b0ce3928bec5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62146
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-02-26 00:18:09 +00:00
Jon Murphy
e3e1801a33 mb/google/skyrim: Enable eSPI SCI events
Enable ESPI SCI events

BUG=b:214416630
TEST=builds

Signed-off-by: Jon Murphy <jpmurphy@google.com>
Change-Id: If47ba561f140eb474cad30e24b0a7c85cdd76203
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62149
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-02-26 00:17:40 +00:00
Jon Murphy
2a7445a165 mb/google/skyrim: Add smihandler
BUG=b:214415408
TEST=builds
BRANCH=none

Signed-off-by: Jon Murphy <jpmurphy@google.com>
Change-Id: Icc52182294bb3402463a0a70a5c67779c60dfe32
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62045
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-02-26 00:17:25 +00:00
Jon Murphy
cbf0f98c61 mb/google/skyrim: Enable Chrome EC
BUG=b:214413613
TEST=builds
BRANCH=none

Signed-off-by: Jon Murphy <jpmurphy@google.com>
Change-Id: I15c7c482c4a5ddef22a221794b9ef03f9b7ffe05
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62046
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-02-26 00:17:10 +00:00
Jon Murphy
9e00571b49 mb/google/skyrim: Enable variants for Skyrim
BUG=b:214414033
TEST=builds
BRANCH=none

Signed-off-by: Jon Murphy <jpmurphy@google.com>
Change-Id: I034ab8a06842bee12060103b4a1bc4e3db69e42a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62145
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2022-02-26 00:16:39 +00:00
Jon Murphy
af025d6ee1 mb/google/skyrim: CONFIG_CHROMEOS
BUG=b:214415401
TEST=builds
BRANCH=none

Signed-off-by: Jon Murphy <jpmurphy@google.com>
Change-Id: I045f76c366a1a72814536a2be984b7ad5a438a5a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62043
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-02-26 00:16:17 +00:00
Jon Murphy
960fb2f4b8 mb/google/skyrim: Enable ACPI tables
Add GPIO initialization and ACPI generation for tables

BUG=b:214415303
TEST=builds
BRANCH=none

Signed-off-by: Jon Murphy <jpmurphy@google.com>
Change-Id: I8f9c7d3f2fdbd5d791032637dbf97c18864ee9e7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62044
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-02-26 00:15:58 +00:00
Subrata Banik
4de2c342fb soc/intel/fast_spi: Check SPI Cycle In-Progress prior start HW Seq
This fixes no practical problem, especially for coreboot where only
one process should access the SPI controller. It makes the code look
more spec compliant.

As per EDS, SPI controller sets the HSFSTS.bit5 (SCIP) when software
sets the Flash Cycle Go (FGO) bit in the Hardware Sequencing Flash
Control register.

Software must initiate the next SPI transaction when this bit is 0.

Add non-blocking mechanism with `5sec` timeout to report back error
if current SPI transaction is failing due to on-going SPI access.

BUG=b:215255210
TEST=Able to boot brya and verified SPI read/write is successful.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I4d35058244a73e77f6204c4d04d09bae9e5ac62c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61849
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
Reviewed-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
2022-02-26 00:15:28 +00:00
Raul E Rangel
737ad67d12 soc/amd/common/psp_verstage: Add missing post codes on S0i3 resume
We print these out in the normal flow, so lets add them for S0i3 resume
as well.

BUG=b:221231786
TEST=Perform suspend/resume cycle on guybrush and verify we get the new
POST codes.

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: Ia7d607453d58084868cfa50770fd0f370b2ea2bd
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62346
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rob Barnes <robbarnes@google.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2022-02-26 00:09:27 +00:00
Raul E Rangel
5e0ed5016c soc/amd/{common/psp_verstage,soc/picasso}: Remove workbuf shrinking
This feature was never used. Let's remove it to keep things simple.

BUG=221231786
TEST=Boot test guybrush and morphius and verify transfer buffer is
correctly passed.

Signed-off-by: Raul E Rangel <rrangel@chromium.org>
Change-Id: I93a284db919f82763dcd31cec76af4b773eb3f80
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62345
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rob Barnes <robbarnes@google.com>
2022-02-26 00:09:18 +00:00
Martin Roth
ea4ad0ddf9 Docs/releases: Final update for 4.16 release notes before the release
- Remove arrows from google mainboard as requested in the last review.
- Make Feb25 the release date.
- Cosmetic markdown changes - Rewrapping, updated for lines' lengths.
- Add plan to support Resource allocator V3 on the 4.18 branch.
- Add plan to deprecate LEGACY_SMP_INIT after 4.18 release

Signed-off-by: Martin Roth <martin@coreboot.org>
Change-Id: Id16925918511fd2277a54faeccfa56e96c6aaae5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62380
Reviewed-by: Felix Singer <felixsinger@posteo.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-02-25 21:18:39 +00:00
Zhuohao Lee
0b108a14c0 mb/google/brask: Update PCH power cycle related durations
The power rails discharge time of brask has been measured, the longest
discharge time of the power rails are smaller than 150ms so it is safe
to set the pwr_cyc_dur to 1 second. Since the brask is derived from the
brya, we could apply the same setting from the brya. The setting is
copied from commit dee834aa.

BUG=b:214454454
BRANCH=firmware-brya-14505.B
TEST=`test_that firmware_ECPowerButton` passed.

Change-Id: I5e5eebb79e99a52fc3e4128213c6986f20100b8d
Signed-off-by: Zhuohao Lee <zhuohao@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62286
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-02-25 20:46:19 +00:00
Zhuohao Lee
09f3b6cf21 mb, soc: change mainboard_memory_init_params prototype
The mainboard_memory_init_params takes the struct FSP_M_CONFIG as the
input which make the board has no chance to modify data in the
FSPM_UPD, for example, set FspmArchUpd.NvsBufferPtr = 0. After changing
the FSP_M_CONFIG to FSPM_UPD, the board can modify the value based on
its requirement.

BUG=b:200243989
BRANCH=firmware-brya-14505.B
TEST=build pass

Change-Id: Id552b1f4662f5300f19a3fa2c1f43084ba846706
Signed-off-by: Zhuohao Lee <zhuohao@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62293
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-02-25 20:45:49 +00:00
Sean Rhodes
9f091608b2 payloads/tianocore: Convert BMP at build time
Convert BMP to the correct format at build time, which removes the
requirement for any runtime checks.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I4f1e9c8df2ca7d66f362f9fa5688d6cb443c2581
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61918
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2022-02-25 20:45:02 +00:00
Sean Rhodes
4a9be9f321 payloads/tianocore: Pass SD_MMC_TIMEOUT build option
By default, edk2 allows 1000000μs for SD Card Readers and eMMC to
initialize which is excessive and causes a boot delay. This makes
the value configurable and uses a default of 1000μs which is sufficient
for the majority of readers. The value of 1000μs was hardcoded in
MrChromeBox's fork for around 2 years with no reported issues.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I873bcddf6f37a9eaae5c84991b3996d51fb460d3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61902
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2022-02-25 20:44:42 +00:00
Usha P
3ecee3cdd9 mb/intel/adlrvp: Add support for MAX98373 codec
- Add configurability using FW_CONFIG field in CBI, to enable/disable
I2S codec support for MAX98373 codecs
- AUDIO=ADL_MAX98373_ALC5682I_I2S: enable max98373 codec using expansion
board

Bug=None
Test=With CBI FW_CONFIG set to 0x100, check I2S audio output on
expansion card

Signed-off-by: Usha P <usha.p@intel.com>
Change-Id: I94dfe500b99a669e9b981cdf15e360f22f33d2ac
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61544
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kangheui Won <khwon@chromium.org>
Reviewed-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
2022-02-25 20:44:27 +00:00
Elyes Haouas
92c2ccda0c sb/intel/ibexpeak/early_pch.c: Use PCI_BASE_ADDRESS_0 macro
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: If74e1db623d65d639041d49caf0ca1b6c0e1f2ad
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62326
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-02-25 20:42:36 +00:00
Arthur Heymans
bd90a226a3 nb/intel/ironlake: Fix sending HECI messages
This code only worked when the payload (a packed struct) was 4 byte
aligned. With gcc11 this happens to not be the case.

Change-Id: I5bb4ca4b27f8554208b12da177c51091ea6a108f
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61938
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-02-25 20:41:54 +00:00
MAULIK V VAGHELA
d9c5b14f1e intelblocks/pcie: Correct mapping between LCAP port and coreboot index
coreboot uses port index which is 0 based for all PCIe root ports.
In case of PCIe remapping logic, coreboot reads LCAP register from PCIe
configuration space which contains port number (mostly 1 based). This
assumption might not be true for all the ports in coreboot.

TBT's LCAP registers are returning port index which are based on 2.
coreboot's PCIe remapping logic returns port index based on index 1.

This patch adds variable to pcie_rp_config to pass lcap_port_base to the
pcie remapping function, so coreboot can map any n-based LCAP encoding
to 0-based indexing scheme.

This patch updates correct lcap_port_base variable for all PCIe root
ports for all SOCs, so that function returns correct 0-based index from
LCAP port number.

BUG=b:210933428
BRANCH=None
TEST=Check if code compiles for all ADL boards

Change-Id: I7f9c3c8e753b982e2ede1a41bf87d6355b82da0f
Signed-off-by: MAULIK V VAGHELA <maulik.v.vaghela@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61936
Reviewed-by: Subrata Banik <subratabanik@google.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-02-25 18:59:51 +00:00
Jason Glenesk
811aab3586 Documentation/security/vboot: Update 4.16 vboot supported boards
Update list of boards that support vboot.

Change-Id: I7f372c5b923018bc1b744fd02d5acc976b03742a
Signed-off-by: Jason Glenesk <jason.glenesk@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62310
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2022-02-25 18:01:31 +00:00
Jason Glenesk
fff2413513 Documentation/releases: Update index.md
Change-Id: I71e1fc40b3cdc1844e8d8daf00f133169b7c4a3b
Signed-off-by: Jason Glenesk <jason.glenesk@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62309
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2022-02-25 18:01:21 +00:00
Jason Glenesk
e8b297ed26 Documentation/releases: Update 4.16 release notes
Update details for upcoming 4.16 release

Change-Id: Iea88b3a4025ae6a57524e08bf5ecef984810baeb
Signed-off-by: Jason Glenesk <jason.glenesk@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62302
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
2022-02-25 18:00:55 +00:00
Felix Held
928a9c8f04 cpu,mb,nb,soc: use HPET_BASE_ADDRESS instead of magic number
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I570f7de90007b67d811d158ca33e099d5cc2d5d3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62308
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-02-25 17:44:45 +00:00
Felix Held
972d9f2cce arch/x86: consolidate HPET base address definitions
Both the HPET_BASE_ADDRESS define from arch/x86/include/arch/hpet.h and
the HPET_ADDRESS Kconfig option define the base address of the HPET MMIO
region which is 0xfed00000 on all chipsets and SoCs in the coreboot
tree. Since these two different constants are used in different places
that however might end up used in the same coreboot build, drop the
Kconfig option and use the definition from arch/x86 instead. Since it's
no longer needed to check for a mismatch of those two constants, the
corresponding checks are dropped too.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ia797bb8ac150ae75807cb3bd1f9db5b25dfca35e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62307
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Lance Zhao
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-02-25 17:44:11 +00:00
Felix Held
887d4ed912 soc/intel/denverton/include/iomap: drop unused DEFAULT_HPET_ADDR define
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ie92bd54b072d545944b3d0251e9727ce493bb864
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62306
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-02-25 17:43:11 +00:00
Felix Held
f47d17d81e sb/intel/common/hpet: use HPET_BASE_ADDRESS definition
Use the definition from arch/x86 instead of a local redefinition.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: If172cde267062a8e759a9670ac93f4e74e8c94d5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62305
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-02-25 17:42:59 +00:00
Felix Held
4b2464fc90 arch/x86: factor out and commonize HPET_BASE_ADDRESS definition
All x86 chipsets and SoCs have the HPET MMIO base address at 0xfed00000,
so define this once in arch/x86 and include this wherever needed. The
old AMD AGESA code in vendorcode that has its own definition is left
unchanged, but sb/amd/cimx/sb800/cfg.c is changed to use the new common
definition.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ifc624051cc6c0f125fa154e826cfbeaf41b4de83
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62304
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
2022-02-25 17:42:45 +00:00
Felix Held
46a3a044ad soc/intel/baytrail,braswell/include/iomap: drop unused HPET_BASE_SIZE
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I875916488a99af768d087691549a93f6fd5169ea
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62303
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-02-25 17:42:31 +00:00
Felix Held
4e03727e63 arch/x86/Kconfig: add HPET_MIN_TICKS
Some Intel southbridges have HPET_MIN_TICKS in their Kconfig files, but
the CONFIG_HPET_MIN_TICKS symbol is used in the common acpi code in
acpi/acpi.c, so define this option in arch/x86/Kconfig to have it
defined in all cases where the function that ends up using this
information gets called. Since we now have the type information for this
Kconfig option in a central place, it can be dropped from the Kconfig
file of the Intel southbridges that change the default value.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ibe012069dd4b51c15a8fbc6459186ad2ea405a03
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62298
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-02-25 17:42:20 +00:00
Felix Held
7f8c737fe9 acpi/acpi: use read32p instead of pointer dereferencing
Using read32p to get the contents of the first 4 bytes of the HPET MMIO
region instead of a pointer dereference should clarify what's done in
that piece of code.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Iecf5452c63635666d7d6b17e07a1bc6aa52e72fa
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62297
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Lance Zhao
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-02-25 17:41:58 +00:00
Jason Glenesk
ce876aaa8f mb/google/guybrush: enable coreboot to request spl fuse
Enable guybrush based platforms to send fuse spl command to PSP when
required.

BUG=b:180701885
TEST=On a platform that supports SPL fusing. Confirm that PSP indicates
fusing is required, and confirm coreboot sends command. Fusing is
required when the image is built with an SPL table requiring newer
minimum versions. A message indicating fusing was requested will appear
in the serial log. "PSP: Fuse SPL requested"

Change-Id: I7bce01513af4e613f546e491d9577c92f50cb85c
Signed-off-by: Jason Glenesk <jason.glenesk@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62354
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Jon Murphy <jpmurphy@google.com>
2022-02-25 16:43:15 +00:00
FrankChu
85c64e3ff6 mb/google/volteer/var/collis: update default codec HID to 10EC5682
Modify function to set default audio codec HID
to be original setting 10EC5682.

BUG=b:192535692
BRANCH=volteer
TEST=ALC5682-VD/ALC5682I-VS audio codec can work

Signed-off-by: Frank Chu <frank_chu@pegatron.corp-partner.google.com>
Change-Id: I30fa886a39bd7082442a3a2b95fdf2d2b84ddd1c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62024
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2022-02-25 16:39:47 +00:00
Felix Singer
d17eac4f09 Documentation/index.md: Add "Contributing" menu entry
Clean up the main menu by adding a new entry `Contributing` and moving
all related menu entries below it.

Change-Id: I04ec8a568b716df48ae7f8f826826e8753f5f88b
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62220
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-02-25 15:28:14 +00:00
Felix Singer
2552c47100 Documentation/index.md: Add "Community" menu entry
Clean up the main menu by adding a new entry `Community` and moving all
related menu entries below it.

Change-Id: Ib5df0156edaa739f15e6da8489968448876e1894
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62219
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-02-25 12:49:15 +00:00
Shelley Chen
1d72afbd2a herobrine: Add Villager variant
BUG=b:218415722
BRANCH=None
TEST=./util/abuild/abuild -p none -t GOOGLE_VILLAGER -x -a -B

Change-Id: I84935ea280023cb0df1dd51fcd2a83d80db17710
Signed-off-by: Shelley Chen <shchen@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62356
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-02-25 07:01:48 +00:00
Jon Murphy
d2873756a7 mb/google/skyrim: First pass GPIO configuriation for Skyrim
BUG=b:214415401
TEST=builds
BRANCH=none

Signed-off-by: Jon Murphy <jpmurphy@google.com>
Change-Id: I60b3b3cd50eea1253df2ae3e0aea83bb89e54702
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62042
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-02-25 02:07:10 +00:00
Felix Held
26f0310317 mb/amd/chausie/devicetree: add i2c_scl_reset
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I23ec6bcb6a2b3627866165972fd6ba1c75367533
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62188
Reviewed-by: Jason Glenesk <jason.glenesk@gmail.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-02-25 00:44:45 +00:00
Felix Held
9ec4bf2fcb mb/amd/chausie/devicetree: enable I2C controllers
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I97f37c45ffe945e6bb071c8205343943edc524ac
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61871
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Reviewed-by: Jason Glenesk <jason.glenesk@gmail.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-02-25 00:44:36 +00:00
Elyes HAOUAS
a0b8032279 crossgcc: Upgrade LLVM/clang from 12.0.0 to 13.0.1
Build/run not tested on board.

Change-Id: I8c550d3528a5b1c891b318c08ecfba3a9255e69c
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/59400
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-02-25 00:44:10 +00:00
Kevin Chang
f1313ece44 mb/google/brya/var/taeko: Add GL9750 SD card reader support
Add GL9750 SD card reader support.

BUG=b:220987566
TEST=Build FW and check device function normally.

Signed-off-by: Kevin Chang <kevin.chang@lcfc.corp-partner.google.com>
Change-Id: I8f6ca45a320d34dfd820ef0b6e0d3163fab26027
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62285
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-02-24 21:39:25 +00:00
Jon Murphy
9042427ea2 mb/google/skyrim: Add stubs to configure GPIOs
BUG=b:214415401
TEST=builds
BRANCH=none

Signed-off-by: Jon Murphy <jpmurphy@google.com>
Change-Id: Ieeda9aa0c18b5befea67d2849bd4114da0c348a3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62041
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-02-24 21:38:18 +00:00
Sean Rhodes
3a260ad8f1 soc/apollolake: Allow configuring individual USB ports on GLK
Allow configuring the limited fields that FSP-S provides.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I56c37338eaa978fdb2c63807331493e8aecbdf60
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62056
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-02-24 17:10:37 +00:00
Elyes Haouas
532e043b66 treewide: Write minor version at acpi_create_fadt() function
When "fadt->FADT_MinorVersion" is not explicitly set to the right value, gcc sets it up to "0".
So set it correctly for treewide.

Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: Ic9a8e097f78622cd78ba432e3b1141b142485b9a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62221
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jason Glenesk <jason.glenesk@gmail.com>
Reviewed-by: Lance Zhao
2022-02-24 17:10:02 +00:00
Terry Chen
95f8f92451 mb/google/brya: Add SPD configs for Crota
Add a mem_parts_used.txt for Crota, containing the
memory parts used in proto builds. Generate Makefile.inc and
dram_id.generated.txt using part_id_gen.

DRAM Part Name                 ID to assign
MT62F1G32D4DR-031 WT:B         0 (0000)
MT62F512M32D2DR-031 WT:B       1 (0001)
H9JCNNNBK3MLYR-N6E             1 (0001)
H9JCNNNCP3MLYR-N6E             0 (0000)
K3LKBKB0BM-MGCP                2 (0010)

BUG=b:215443524
TEST=emerge-brya coreboot

Change-Id: I0ff6ffea4b879b6e1287e1e3cb9fd36a80f52ed6
Signed-off-by: Terry Chen <terry_chen@wistron.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62262
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2022-02-24 01:25:32 +00:00
Angel Pons
4cee77bce3 nb/intel/ironlake: Clean up jedec_read() function
Deduplicate a condition and reflow some lines.

Tested on HP ProBook 6550b, still reaches TianoCore payload.

Change-Id: If5786f34585e15100385d452b5b03a36da4c7c87
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61939
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2022-02-24 01:20:41 +00:00
Angel Pons
fa5ed059eb nb/intel/ironlake: Fix some quickpath init magic
Correct some Quickpath initialisation steps according to findings from
two different Intel reference code binaries as well as MCHBAR register
dump comparisons between vendor firmware and coreboot.

The MSR_TURBO_POWER_CURRENT_LIMIT information comes from EDK2 sources.

Tested on Apple iMac 10,1 (Clarkdale, aka desktop Ironlake), QPI init
now completes successfully instead of causing hangs before raminit.
Also tested on HP ProBook 6550b (Arrandale, aka mobile Ironlake), still
reaches payload (e.g. TianoCore).

Change-Id: Icd0139aa588dc8d948c03132b5c86866d90f3231
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60216
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2022-02-24 01:18:56 +00:00
Angel Pons
e2531ffaa8 nb/intel/ironlake: Move out HECI remainders into southbridge
Move the remaining HECI-related stuff to southbridge scope, as the HECI
hardware is in the southbridge. Note that HECI BAR is now enabled a bit
earlier than before, but this shouldn't matter.

Change-Id: I4a29d0b5d5c5e22508bcdfe34a1c5459ae967c75
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61932
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2022-02-24 01:18:03 +00:00
Zheng Bao
fdb0294846 amdfwtool: Check the real length of PMU string
The length should be checked before the PMU_STR_INS_INDEX(th) character
is accessed, otherwise it is going to an access violation.

Change-Id: I8b59eb34e1cb01fd6e2571fcebc28ef2084b6ec4
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62249
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-02-24 00:41:45 +00:00
Robert Chen
e39d371909 mb/google/brya/var/vell: Corrects ACPI _PLD macro setting
This patch is to denote the correct side of ACPI _PLD usb C ports.

        +-------------------------+
        |        LCD              |
        |                         |
        |                         |
        +-------------------------+
PORT_C2 |                         | PORT_C1
PORT_C3 |  DB                 MB  | PORT_C0
        |                         |
        +-------------------------+

BUG=b:220634230
TEST=emerge-brya coreboot

Change-Id: I84515f98b6cdab5768df75690b0f5ca1bb9ad96d
Signed-off-by: Robert Chen <robert.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62252
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-02-24 00:32:24 +00:00
Wisley Chen
77711b8677 mb/google/brya/var/anahera{4es}: Add MT53E2G32D4NQ-046 WT:C support
Add new memory MT53E2G32D4NQ-046 WT:C support

BUG=b:220821471
TEST=emerge-brya coreboot

Change-Id: I4c21254213c2107d015adebb510612e0256ffb5c
Signed-off-by: Wisley Chen <wisley.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62268
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-02-24 00:31:58 +00:00
Wisley Chen
a243111a6d mb/google/brya/var/redrix{4es}: Add MT53E2G32D4NQ-046 WT:C
Add new memory MT53E2G32D4NQ-046 WT:C support.

BUG=b:220804962
TEST=emerge-brya coreboot

Change-Id: I3353d7c119798ebb0b5ee1ea32161e54b4eec826
Signed-off-by: Wisley Chen <wisley.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62267
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-02-24 00:31:41 +00:00
Wisley Chen
0776ba1194 spd/lp4x: Generate initial SPD for MT53E2G32D4NQ-046 WT:C
Generate the initial SPD for MT53E2G32D4NQ-046 WT:C

BUG=b:220804962
TEST=util/spd_tools/bin/spd_gen spd/lp4x/memory_parts.json lp4x

Change-Id: I3e2b377f1d6d4b1fa45614ad2f3de81eef17c2b8
Signed-off-by: Wisley Chen <wisley.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62266
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-02-24 00:31:25 +00:00
Sean Rhodes
3f3a3eeca7 payloads/tianocore: Add option for to prioritize internal devices
Add TIANOCORE_PRIORITIZE_INTERNAL which, when enabled, will build edk2
with boot from internal devices before external devices.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: Ib1f73c8f3f2f2376cdc197b58d259446dc5f0138
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61797
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2022-02-24 00:29:44 +00:00
Sean Rhodes
4600c25346 payloads/tianocore: Add option for PS/2 keyboard support
Add TIANOCORE_PS2_SUPPORT which, when enabled, will build edk2
with PS/2 keyboard support.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: Ibabce6ac1ac68ab958610d42c77f3c2c494528ef
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61760
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2022-02-24 00:29:29 +00:00
Sean Rhodes
f33ddb3959 payloads/tianocore: Add option to include EFI Shell
Add TIANOCORE_HAVE_EFI_SHELL, which when enabled, will build edk2
with the EFI Shell binary.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I1272f514e3f5becfe1fddd58ca0d820c5d1c1b54
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61759
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2022-02-24 00:29:14 +00:00
Sean Rhodes
14d67b3515 payloads/tianocore: Add option to use follow BGRT spec
Adds TIANOCORE_FOLLOW_BGRT_SPEC which, when enabled, will follow
the BGRT Specification implemented by Microsoft and the Boot Logo
will be vertically centered 38.2% from the top of the display.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: If508166fe657d1cc032dd09a0fa231c7b60d9846
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61758
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2022-02-24 00:29:01 +00:00
Sean Rhodes
c8decce31c payloads/tianocore: Add option to use Escape for Boot Manager
Add TIANOCORE_BOOT_MANAGER_ESCAPE which, when enabled, will use
Escape as the hot-key to access the Boot Manager. This replaces
the default key of F2.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I1e60d116367542f55f0ffa241a6132e4faabe446
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61757
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2022-02-24 00:28:47 +00:00
Eugene Myers
b2c681fc4a security/intel/stm: Make STM setup MP safe
Some processor families allow for SMM setup to be done in parallel.

On processors that have this feature, the BIOS resource list becomes
unusable for some processors during STM startup.

This patch covers two cases: (1) The BIOS resource list becomes twice
as long because the smm_relocation function is called twice - this is
resolved by recreating the list on each invocation. (2) Not all
processors receive the correct resource list pointer - this is resolved
by having every processor execute the pointer calculation code, which is
a lot faster then forcing all processors to spin lock waiting for this
value to be calculated.

This patch has been tested on a Purism L1UM-1X8C and Purism 15v4.

Signed-off-by: Eugene Myers <cedarhouse@comcast.net>
Change-Id: I7619038edc78f306bd7eb95844bd1598766f8b37
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61689
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Eugene Myers <cedarhouse1@comcast.net>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
2022-02-24 00:27:37 +00:00
Eugene Myers
a514192ffe security/intel/stm: Use correct SMBASE for SMM descriptor setup
Commit ea3376c (SMM module loader version 2) changedhow the
SMBASE is calculated.

This patch modifies setup_smm_descriptor to properly acquire the
SMBASE.

This patch has been tested on a Purism L1UM-1X8C and a Purism 15v4.

Signed-off-by: Eugene Myers <cedarhouse@comcast.net>
Change-Id: I1d62a36cdcbc20a19c42266164e612fb96f91953
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61688
Reviewed-by: Eugene Myers <cedarhouse1@comcast.net>
Reviewed-by: Philipp Deppenwiese <zaolin.daisuki@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-02-24 00:27:08 +00:00
Felix Held
b582ce0814 arch/x86/Kconfig: drop HPET_ADDRESS_OVERRIDE
Commit b433d26ef1 (arch/x86: Define
HPET_ADDRESS_OVERRIDE) added this Kconfig option and referenced the
via/cx700 chipset which has been dropped before the 4.9 release. No SoC
in the current tree selects HPET_ADDRESS_OVERRIDE and all SoCs have
their HPET mapped at 0xfed00000, so drop this unused and no longer
needed Kconfig option.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I4021ed6f84473c7a9223323fc8aa5d3f935d8084
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62276
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-02-24 00:14:10 +00:00
Felix Held
6f413d1c3f soc/amd/*/include/soc/iomap.h: rework HPET base address check
The AMD SoCs had a check to make sure that HPET_ADDRESS_OVERRIDE isn't
set so that the HPET_ADDRESS Kconfig option will have the right default
value. Instead check if the HPET_ADDRESS Kconfig value matches the
HPET_BASE_ADDRESS define in the SoC code which is the case if
HPET_ADDRESS_OVERRIDE isn't selected.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Icf1832eb36c031e93ba24f342e9a8a7bf13faecc
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62275
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-02-24 00:14:02 +00:00
Nico Huber
47722cfe55 libpayload/lpgcc: Add --gc-sections linker argument
To be able to link libcbfs without vboot, we need garbage
collection now.

Change-Id: Id9a9fe7efb9fb4409a43ae8357f4f683618805d2
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62247
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-02-23 22:47:24 +00:00
Nico Huber
4fa9f2ae8b libpayload/x86: Fix boot_device_read() and hook it up
Casts from integer to pointer are usually a case for phys_to_virt().

Change-Id: I861d435ff2361cdc26a2abd46d43b9346fa67ccc
Signed-off-by: Nico Huber <nico.h@gmx.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62246
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-02-23 22:47:09 +00:00
Rob Barnes
22372f4ac9 cr50: Increase cr50 i2c probe timeout
Turns out 200ms still isn't enough in the worst reset conditions.
There's been some reports of failures at 200ms with some older
cr50 versions. Let's not take any chances and bump this way up
since if this fails, it prevents boot.

BUG=b:213828947
BRANCH=None
TEST=Reboot and suspend_stress on Nipperkin

Signed-off-by: Rob Barnes <robbarnes@google.com>
Change-Id: I5be0a80c064546fd277f66135abc9d0572df11cb
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61864
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-02-23 16:26:03 +00:00
Xi Chen
d239aaf741 src/mediatek: Refactor dramc_param to share more structures
The ddr_base_info struct, which stores basic DDR information, should be
platform independent. Currently the struct is defined in each SoC's
dramc_parah.h. To prevent code duplication, move it as well as other
related structs and enums to a common header.

Signed-off-by: Xi Chen <xixi.chen@mediatek.corp-partner.google.com>
Change-Id: I99772427f9b0755dc2c778b5f4150b2f8147bcc3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61293
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
2022-02-23 15:06:27 +00:00
Rex-BC Chen
3a3920263a soc/mediatek/mt8186: disable VSRAM_CORE
VSRAM_CORE is not used on kingler/krabby, so we disable it.
This implementation is according to chapter 3.7 in MT8186 Functional
Specification.

BUG=b:220071688
TEST=the rail steadily shows 0V in either S0, S3, and S5.

Signed-off-by: Rex-BC Chen <rex-bc.chen@mediatek.com>
Change-Id: I5256f6a2c0ca5a951dc79f564575b526a84463fd
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62253
Reviewed-by: Yu-Ping Wu <yupingso@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-02-23 15:05:40 +00:00
Uwe Poeche
eee62c1537 drivers/mrc_cache/mrc_cache.c: Change loglevels
Since commit 7cd8ba6eda (console: Add loglevel prefix to interactive
consoles) on the very first boot some errors occur because no MRC data
is present in the MRC cache. This is normal because the memory training
is not done yet.

This patch changes the loglevel to BIOS_NOTICE which will prevent an
error in the log in this case.

Change-Id: I1e36590e33507515e5b9dd4eb361b3dbe165511e
Signed-off-by: Uwe Poeche <uwe.poeche@siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61973
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-02-23 15:05:12 +00:00
Felix Singer
5fbbd8196b Documentation/community/services: Fix typo
Change-Id: I9d5171bd115d676775f560306e4e0a86214a39b0
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62218
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2022-02-23 15:04:28 +00:00
Mario Scheithauer
f6056113e5 console: Fix LOG_FAST macro
In the LOG_FAST macro, the comparison was incorrectly made with 'level'
value. Correct is the comparison with 'speed'.
With the wrong comparison you cannot set a lower level for console log,
the highest level is always output.

TEST:
- Boot mc_ehl2 with console log level 5 and check output

Change-Id: Ib5b4537ae2cbf01c51c3568d312b5242c4bee7bb
Signed-off-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62261
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Patrick Georgi <patrick@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2022-02-22 23:13:50 +00:00
Elyes Haouas
e6ce594da6 mb/gizmosphere/gizmo/OptionsIds.h: Remove extra empty line
Change-Id: I8ad968da1771004f7f5869e5434473a498edeaa2
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61912
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-02-22 21:25:38 +00:00
Elyes Haouas
d08a76e3ea mb/lenovo/g505s/acpi/ec.asl: Correct the path to "mainboard.h"
Change-Id: I273e29a26cf1c1ba34b95eb11bcb59a1360371e1
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61921
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-02-22 21:25:25 +00:00
Elyes Haouas
6d508dfc2d mb/lenovo/g505s: Format code
Change-Id: I9cce00e1634d62a63b3563d54a7a0c56058d0e39
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61920
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-02-22 21:23:24 +00:00
Elyes Haouas
8f38e5f5dc sb/amd/cimx/sb800/amd_pci_int_defs.h: Fix serial IRQ INT name in comment
Change-Id: If351d93c47de2ef76fb24525ff6d134b35c5f3fe
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61876
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-02-22 21:18:24 +00:00
Elyes Haouas
4450bee6b3 sb/amd/pi/hudson/early_setup.c: Fix typo in comment
Change-Id: Ib631cdc0794dc91df27cb984d5c585e0eee4a2ad
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61877
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-02-22 21:17:15 +00:00
Elyes Haouas
090fcec945 southbridge/amd/*/*/reset.c: Reduce stylistic differences
Change-Id: I2f58098e786e9b61b0d059723c375a90559e95a6
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61879
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-02-22 21:15:39 +00:00
Elyes Haouas
2a6cc959ee southbridge/amd/*/*/smbus.c: Reformat code and reduce difference
Change-Id: I43644b757a5a85864162da6a35f7f2a5335f8007
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61880
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@mailbox.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-02-22 21:13:43 +00:00
Elyes Haouas
f0d4f930a0 mb/gizmosphere/gizmo/acpi/gpe.asl: Remove extra blank line
Change-Id: I0d9b07183b06915799f221390406e930ca253a0d
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61911
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-02-22 21:11:46 +00:00
Elyes Haouas
a789643ac9 mb/gizmosphere/gizmo/devicetree.cb: Fix typo on 'pci'
While on it, use tab for indent.

Change-Id: I6cb0b4183db819d721f4882ab2168d22bcd664e3
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61913
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-02-22 21:11:27 +00:00
Elyes Haouas
5996eea5af sb/intel/i82371eb: Constify pci_devfn_t devices
Change-Id: I9056464b36cde89d2fe88ff27531e467297bed0b
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61986
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-02-22 20:58:14 +00:00
Elyes Haouas
d3687cd994 sb/intel/ibexpeak: Constify struct southbridge_intel_ibexpeak_config
Change-Id: I096ccd0ec224b98038d290422f568666bbede43a
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61985
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-02-22 20:57:20 +00:00
Elyes Haouas
95231b264d src/Kconfig: Update the path to 'c_start.S' for GDB_STUB config
Change-Id: Ib31defde0d4983a9418f05e0b812a7bbbe4fe2b7
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62057
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-02-22 20:49:10 +00:00
Sean Rhodes
16a55f7a56 mb/starlabs/labtop: Reconfigure GPIOs
Reconfigure the GPIO's so that they are configured correctly.
The original configuration was based on the AMI firmware, and
whilst it worked, it wasn't optimal.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I27ecf066685f2a81ac884a9f276c518544449443
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60759
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2022-02-22 19:21:36 +00:00
Sean Rhodes
70a1ef0716 mb/starlabs/labtop: Reconfigure CNVi GPIOs
Reconfigure the CNVi GPIO's so that they are configured correctly.
The original configuration was based on the AMI firmware, and
whilst it worked, it wasn't optimal.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I9fc9963e91da0267c8740fee20a3ec41895b4953
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60758
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2022-02-22 19:21:22 +00:00
Sean Rhodes
ad58a188e8 mb/starlabs/labtop: Update trackpad GPIO configuration
Update trackpad GPIO to avoid IRQ Storm, that causes high power
consumption when idling or in S3.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: Ieee27bd9079617ab95f4f1e27ef98b49e89e5b41
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60757
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2022-02-22 19:21:07 +00:00
Sean Rhodes
6306fc2127 mb/starlabs/labtop: Configure TPM_IRQ GPIO for TGL
Configure the TPM IRQ GPIO for TGL (StarBook Mk V) so that the
hardware TPM can be used.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: Ife88075e70184b46e69f2e24c70b85ec254edd64
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60756
Reviewed-by: Andy Pont <andy.pont@sdcsystems.com>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-02-22 19:20:49 +00:00
Sean Rhodes
3830d7a7f5 mb/starlabs/labtop: Don't configure ESPI GPIOs
Don't configure ESPI GPIOs as the default values are correct.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I052fbfccd075d19340d3e27ad0c62965c80badaf
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60755
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth - Personal <martinroth@google.com>
2022-02-22 19:20:30 +00:00
Elyes Haouas
36bf0947b9 soc/intel/common/block/acpi: Drop duplicated 'fadt->header.revision'
The 'fadt->header.revision' is already done at src/acpi/acpi.c acpi_create_fadt().

Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: Ib9b6dc7e86ca17e0b2d374ee2c3bdf06f8b82dfc
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62222
Reviewed-by: Subrata Banik <subratabanik@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-02-22 19:03:38 +00:00
Sean Rhodes
0884f21042 payloads/tianocore: Rework Makefile
Rework edkii makefile so that the various build options are
unified between CorebootPayloadPkg, uefipayload_202107 and
upstream.

This sets the project directory based on the git repository name
i.e. https://github.com/mrchromebox/edk2 becomes mrchomebox

Also builds to $(obj)/UEFIPAYLOAD.fd and allows using a commit
ID without a branch.

Signed-off-by: Sean Rhodes <sean@starlabs.systems>
Change-Id: I3cc274e7385dd71c2aae315162cc48444b7eaa5f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61620
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-by: Martin Roth - Personal <martinroth@google.com>
2022-02-22 18:53:17 +00:00
Ronak Kanabar
e0e6f07220 vendorcode/intel/fsp: Update FSP header file for Alder Lake N FSP v3054.02
The headers added are generated as per FSP v3054.02.
Previous FSP version was v2503_00.
Changes Include:
- UPD Offset Update in FspmUpd.h

BUG=b:220076892
BRANCH=None
TEST=Build and boot adlnrvp

Change-Id: I7b921e2aa467597a1c764fc554e2e83e5bb522e8
Signed-off-by: Ronak Kanabar <ronak.kanabar@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62129
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Reviewed-by: Kangheui Won <khwon@chromium.org>
2022-02-22 18:27:06 +00:00
Felix Held
9478527966 soc/amd/sabrina/i2c: remove TODO
The SoC-specific I2C code and header file have been verified some time
ago, but it seems that I forgot to remove the corresponding TODOs.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ifd162bda10e5993bc32db3a77588491397e3c19e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62223
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Reviewed-by: Jason Glenesk <jason.glenesk@gmail.com>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-02-22 18:20:18 +00:00
Elyes Haouas
fd93cff329 treewide: Get rid of CONFIG_AZALIA_MAX_CODECS
Get rid of Kconfig symbol introduced at commit 5d31dfa8
High Definition Audio Specification Revision 1.0a says, there
are 15 SDIWAKE bits.

Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Change-Id: Ib8b656daca52e21cb0c7120b208a2acdd88625e1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62202
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-02-22 17:40:30 +00:00
Varshit B Pandya
7f7ac206f8 src/driver/intel/mipi_camera: Update ACPI entry to provide silicon info
CPUID_ALDERLAKE_N_A0 is ES. Add it to generate is_es = 1 in ACPI

Signed-off-by: Varshit B Pandya <varshit.b.pandya@intel.com>
Change-Id: Icc65c52a9dadebe4ebab3d0c30599eb0db38bc3e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61862
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Reka Norman <rekanorman@chromium.org>
Reviewed-by: Kangheui Won <khwon@chromium.org>
2022-02-22 15:58:37 +00:00
Felix Held
cbaf753012 soc/amd/common/block/lpc/espi_util: use __fallthrough
Using __fallthrough instead of a comment about the fall-through being
intentional should make clang stop complaining about intended fall-
through statements.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I940529be02e20c72f6e97b2cfa10f0dd8f7020b6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62216
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Reviewed-by: Jason Glenesk <jason.glenesk@gmail.com>
2022-02-22 15:56:55 +00:00
Felix Held
6f4a5454ac vc/eltan/security/verified_boot/Makefile: add fmap_config.h dependency
Compiling vboot_check.c depends on fmap_config.h already being generated
so add this dependency.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I1fe2b738d76ae16dee3e1ebdca512264303a481c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62148
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Erik van den Bogaert <ebogaert@eltan.com>
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
2022-02-22 15:56:03 +00:00
Werner Zeh
6f74d38dc8 mb/siemens/mc_apl2: Enable PCI device for I2C bus 0
On mc_apl2 the external RTC is connected to I2C bus 3. All other I2C bus
devices (16.0, 16.1 and 16.2) have been disabled as they are not used.
While coreboot can handle the case where a PCI device does not have
function 0 enabled but a later one (here function 3), Linux seems to
check for function 0 first and ignores the rest if function 0
is missing. So enable PCI device 16.0 in order to let Linux use 16.3
again.

Test=Boot into Linux and make sure that PCI device 16.0 and 16.3 are
visible and I2C attached RTC works properly.

Change-Id: I55a748b6de8128f4b26b908118feff9f06d3fb7c
Signed-off-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62215
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-02-22 15:25:00 +00:00
Felix Singer
88ccd4863c util/nixshell: Add a Nix shell for building documentation
Add a Nix shell config allowing to build the coreboot documentation.

Change-Id: I1c9715c677342241b78fbdef0afeb4536f48d50f
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62203
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
2022-02-22 10:31:41 +00:00
Elyes Haouas
4045935eb8 include/acpi/acpi.h: Drop non-existing acpi_create_madt_lapic_nmis()
Change-Id: Ide854e5c8e2ed507548047cb6e1fad49efaffbb8
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62119
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-02-22 00:02:27 +00:00
FrankChu
53d13cbb21 mb/google/volteer/var/drobit: update default codec HID to 10EC5682
Modify function to set default audio codec HID
to be original setting 10EC5682.

BUG=b:204517112
BRANCH=volteer
TEST=ALC5682-VD/ALC5682I-VS audio codec can work

Signed-off-by: Frank Chu <frank_chu@pegatron.corp-partner.google.com>
Change-Id: Ic37e7e6757476f1d30bea31fcde4deebebd488a5
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62027
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2022-02-21 23:59:41 +00:00
FrankChu
e46e9b04ae mb/google/volteer/var/delbin: update default codec HID to 10EC5682
Modify function to set default audio codec HID
to be original setting 10EC5682.

BUG=b:204523176
BRANCH=volteer
TEST=ALC5682-VD/ALC5682I-VS audio codec can work

Signed-off-by: Frank Chu <frank_chu@pegatron.corp-partner.google.com>
Change-Id: I36e35522aba2463124b7e6e7046b1a56758b534d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62026
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2022-02-21 23:59:21 +00:00
FrankChu
994c1910e8 mb/google/volteer/var/copano: update default codec HID to 10EC5682
Modify function to set default audio codec HID
to be original setting 10EC5682.

BUG=b:218245715
BRANCH=volteer
TEST=ALC5682-VD/ALC5682I-VS audio codec can work

Signed-off-by: Frank Chu <frank_chu@pegatron.corp-partner.google.com>
Change-Id: I30a1fe2ef8d750616f6907f86a5329f035920504
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62025
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Matt DeVillier <matt.devillier@gmail.com>
2022-02-21 23:58:58 +00:00
Zheng Bao
f08705db4e soc/amd/sabrina/fw.cfg: Change the instance of PMUI/D to 2
Change-Id: Ie9dbed7d6dd1e5f0c97d4a6cedea3d6bd7b000a2
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62068
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Jason Glenesk <jason.glenesk@gmail.com>
Reviewed-by: Nikolai Vyssotski <nikolai.vyssotski@amd.corp-partner.google.com>
2022-02-21 23:49:35 +00:00
Zheng Bao
e220faa18a amdfwtool: Add entries for PMUI & PMUD with instance 2
Change-Id: I69c4b3cdd2473655064d1329d5319cffdba2425a
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62067
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Jason Glenesk <jason.glenesk@gmail.com>
Reviewed-by: Nikolai Vyssotski <nikolai.vyssotski@amd.corp-partner.google.com>
2022-02-21 23:48:57 +00:00
Zheng Bao
990d154898 amdfwtool: Add support for AMD's BIOS A/B recovery feature
The rom layout for A/B recovery:
EFS -> PSP L1 0x48 -> PSP L2 A -> BIOS L2 A
              0x4A -> PSP L2 B -> BIOS L2 B

The coreboot doesn't implement the AMD's A/B recovery. This is only
for the ROM layout. To save some flash space, the entire B section can
be eliminated.

To enable A/B recovery in PSP layout, add "--recovery-ab" to
amdfwtool.

TEST=Majolica(Cezanne)

Change-Id: I27f5d3476f648fcecafb8d258ccb6cfad4f50036
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/56773
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-02-21 23:47:20 +00:00
Zheng Bao
1a9e54302b soc/amd/*/fw.cfg: Remove the misleading name for PMUI and PMUD
Add the information of substance and instance in the string for PMUI
and PMUD. It is amdfwtool's job to extract the number from the string.

Change-Id: I43235fefcbff5f730efaf0a8e70b906e62cee42e
Signed-off-by: Zheng Bao <fishbaozi@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62066
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-02-21 21:29:50 +00:00
Reka Norman
5bba93e08a mb/google/brya: Enable eMMC HS400 mode for nissa
Based on the nivviks and nereid schematics, nissa is using eMMC HS400
mode, so enable this in devicetree.

BUG=b:197479026
TEST=Build test nivviks and nereid

Signed-off-by: Reka Norman <rekanorman@google.com>
Change-Id: Ie9772385276d3629079b95024d3ffa04438f22c2
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61998
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Kangheui Won <khwon@chromium.org>
Reviewed-by: Krishna P Bhat D <krishna.p.bhat.d@intel.com>
Reviewed-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
2022-02-21 17:05:45 +00:00
Felix Held
aade40c3f6 mb/amd/chausie/chromeos.fmd: resize EC size in FMAP to 4kByte
Only the info about the location of the EC firmware will be stored right
at the beginning of the flash, so the size can be reduced to 4kByte
which is the erase block size of the flash. The CHAUSIE_MCHP_SIG_FILE
file itself is smaller than this.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Icde5f7071183cd8423fc022caf49e2c9ee288527
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62189
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Reviewed-by: Jason Glenesk <jason.glenesk@gmail.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-02-21 16:02:41 +00:00
Arthur Heymans
b4389598cf soc/intel/alderlake: Make clang static assert happy
Change-Id: Ia3cd66f6b735f7430abcdba8a9323d5ee1320fd4
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62180
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-02-21 15:30:13 +00:00
Arthur Heymans
141163d5ea drivers/intel/pmc_mux: Fix printing type
Change-Id: I1cb517323e7d609ae6624363e116e9814fc631cb
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62179
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-02-21 15:29:55 +00:00
Arthur Heymans
02967e6113 soc/intel/alderlake: Fix function pointer type
const void is not a proper return type for a function. It's the
function pointer themselves that need to be const.

This fixes building with clang.

Change-Id: I99888ab9d9d80f1d6edb33b9f4a3f556f211a6e2
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62178
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-02-21 15:28:46 +00:00
Arthur Heymans
b53a55930e drivers/intel/fsp2_0/hob: Remove unused variable
Change-Id: Ie9f4562be9b019d8dd65d4e9040fefbb6834fa03
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62177
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Elyes Haouas <ehaouas@noos.fr>
2022-02-21 15:28:06 +00:00
Arthur Heymans
138db0601d soc/intel/adl/bootblock/report_platform.c: Use the correct format
Change-Id: I54c40434f44621c4ea6564ac9c87c5b2fa083b5d
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62176
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-02-21 15:27:35 +00:00
Arthur Heymans
4998aaee23 ec/google/chromeec/ec_acpi.c: Cast compatible enum types
Clang complains about this.

Change-Id: If7af9d5a81c1c381490c9634e3da68ff7f5edda8
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62174
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-02-21 15:27:15 +00:00
Elyes Haouas
b55ac09ce3 [acpi]{include,soc/amd,southbridge/amd}: Clarify ARM_boot_arch in comments
Change-Id: I8b209da90b5a591f62e760961c64c4c63e6ef65b
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62040
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jason Glenesk <jason.glenesk@gmail.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-02-21 15:26:30 +00:00
Felix Singer
3a5e6f529c util/liveiso: Use programs.flashrom.enable
NixOS 21.11 introduced the option `programs.flashrom.enable`. The option
allows installing flashrom and hooking up its udev rules. Thus, set it
to `true` and add the user `user` to the `flashrom` group allowing it to
use the programmers.

Change-Id: I017ddb4314702a5252dfc0d05cd1e4961043d23b
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62193
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
2022-02-21 15:25:18 +00:00
Elyes HAOUAS
2164c308b4 include/device/dram/ddr3.h: Don't redefine 'printram(x, ...)'
'printram(x, ...)' is already defined in 'include/device/dram/common.h' file

Change-Id: I75e19065b9e713df3190202b7ca9e9cd8f3f44a6
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61403
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2022-02-21 15:23:12 +00:00
Subrata Banik
e0ddea49d1 soc/intel/denverton_ns: Add pmc_mmio_regs as public function
This patch adds `pmc_mmio_regs` a public function for other IA common
code may need to get access to this function.

BUG=none
TEST=none

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I67a0f7fdcd0827172426bc938569a5022eff16f2
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62166
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Mariusz Szafrański <mariuszx.szafranski@intel.com>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
2022-02-21 15:22:35 +00:00
Subrata Banik
fac11d000a soc/intel/denverton_ns: Select PMC PCI discoverable config
This patch selects SOC_INTEL_COMMON_BLOCK_PMC_DISCOVERABLE config to
reflect the SoC actual behaviour where PMC PCI device is still
visible over bus even after FSP-S exit.

Additionally, add DNV PMC PCI ID into PMC IA-common code.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: Iaaea20e54c909800e4d75b58c29507fc1944cfba
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62135
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-by: Mariusz Szafrański <mariuszx.szafranski@intel.com>
2022-02-21 15:22:01 +00:00
John Su
bf81c24e07 mb/google/brya/variants/felwinter: Adjust I2Cs CLK to be around 400 kHz
Need to tune I2C bus 0/1/3/5 clock frequency under the 400kHz for
audio, TPM, touchscreen, and touchpad.

Audio CLK: 385 kHz
TPM CLK: 380.5 kHz
Touch Screen CLK: 373.3 kHz
Touch Pad CLK: 372.7 kHz

BUG=b:218577918
BRANCH=master
TEST=emerge-brya coreboot chromeos-bootimage
     measure by scope with felwinter.

Signed-off-by: John Su <john_su@compal.corp-partner.google.com>
Change-Id: I3e5cc10d6605f9cc41fa6b31da07a81364b72fe0
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62009
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
2022-02-21 15:21:28 +00:00
Fred Reitberger
aa41f77397 mb/amd/chausie/Kconfig: Move EC firmware image in CBFS
Move the EC to a location that does not conflict with where the main
CBFS is in the chromeos FMAP

Change-Id: I28c84cbe2ff10d45383d896ae4f942ee49eb15c0
Signed-off-by: Fred Reitberger <reitbergerfred@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62190
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-02-21 15:20:47 +00:00
Elyes Haouas
1f5e1b4f3c src/acpi/acpigen.c: Reformat code
Change-Id: I58851c8a26cad61975f8ba2910eedef3029aab6f
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62131
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lance Zhao
2022-02-21 15:19:24 +00:00
Jakub Czapiga
0ac5ed4490 libpayload/vboot: Enable vboot and x86 SHA extension for ChromeOS
Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Change-Id: Ia63d44de5440b87cedb35ff92edaa0f35ccd75a4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62122
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-02-21 15:18:55 +00:00
Jakub Czapiga
b17f1cebcb libpayload/vboot: Add missing quotes enclosing values
Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Change-Id: I1a72ea63a46dedd1fc2e1e53bf7714ad70ebc5e1
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62171
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-02-21 15:18:38 +00:00
Jakub Czapiga
7f663ab3e6 libpayload/vboot/Makefile.inc: Add strip to kconfig-to-binary macro
Lack of strip made it required to pass arguments to the
kconfig-to-binary macro without spaces. Strip fixed invalid behavior of
this macro.

Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Change-Id: I9889b45f773b9675fae287086d324c180c505a4b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62133
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-02-21 15:18:24 +00:00
Krishna Prasad Bhat
dbbb391700 mb/intel/adlrvp_n: Update devicetree
Update devicetree according to schematics.

TEST=Build and boot Alder Lake N RVP.

Change-Id: I9faee1cb3539a0246fc6a87e15b3150533de1ee5
Signed-off-by: Krishna Prasad Bhat <krishna.p.bhat.d@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60895
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Usha P <usha.p@intel.com>
Reviewed-by: Kangheui Won <khwon@chromium.org>
Reviewed-by: Reka Norman <rekanorman@chromium.org>
Reviewed-by: Ronak Kanabar <ronak.kanabar@intel.com>
Reviewed-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
2022-02-21 15:17:55 +00:00
Krishna Prasad Bhat
a6d642fa8d soc/intel/alderlake: Enable eMMC based on dev enabled
1. Add eMMC device function in pci_devs.h.
2. Enable eMMC device and configuration based on dev enabled.
3. Add SOC acpi name for eMMC.

Change-Id: I44f17420f7a2a1ca0fbb6cfb1886b1617c5a5064
Signed-off-by: Krishna Prasad Bhat <krishna.p.bhat.d@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61129
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-02-21 15:17:26 +00:00
Krishna Prasad Bhat
d2ca5be61a soc/intel/alderlake: Add eMMC ACPI methods for Alder Lake N
Alder Lake N SOC has eMMC device. Add ACPI ASL methods for it.

Change-Id: I53f04e81584493049d37b46e078d394d3c8a2f09
Signed-off-by: Krishna Prasad Bhat <krishna.p.bhat.d@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61127
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Rizwan Qureshi <rizwan.qureshi@intel.com>
2022-02-21 15:17:07 +00:00
Elyes Haouas
8b950f4d7a src/acpi: Add macro for FADT Minor Version and use it
Change-Id: I6a0e9b33c6a1045a3a4a6717487525b82d41e558
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62036
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lance Zhao
2022-02-21 15:16:37 +00:00
Jakub Czapiga
e904d9ad67 libpayload/cbfs: Add missing new line at the end of error messages
Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Change-Id: Ieec281e4f1c67e40976892b3dd1780d2f3802df4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62125
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Julius Werner <jwerner@chromium.org>
2022-02-21 15:15:37 +00:00
Felix Singer
d9884d480b Documentation/contributing/gsoc: Use paths to md files
Replace HTTP links with paths to Markdown files where possible.

Change-Id: I0ecca6460105b10b81c4fc014f00235b5d9b861c
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62205
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
2022-02-21 14:09:18 +00:00
Felix Singer
41dbba9778 Documentation/contributing/gsoc: Fix formatting
Fix formatting when text should be bold.

Change-Id: I7a88ddc0a56dba8c05d0997f37121d0f2cc84ce6
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62204
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
2022-02-21 14:09:08 +00:00
Elyes HAOUAS
e854b0b5e7 crossgcc: Upgrade CMake to 3.22.2 version
Change-Id: I4272f72dd6ed686dbad5615a0ab44c8c632b5930
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/59399
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2022-02-21 08:05:48 +00:00
Felix Singer
05b66147d2 Documentation/contributing: Add GSoC info site
Add a site containing general information for GSoC contributors and
mentors. It was initially copied from https://www.coreboot.org/GSoC.

Change-Id: I5c21d026118cba571dc6b817e89cc4da296a1799
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61791
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: David Hendricks <david.hendricks@gmail.com>
2022-02-20 04:37:22 +00:00
Felix Held
4ded64c1be mb/amd/chausie: increase RW_MRC_CACHE size in FMAP
On Sabrina SoCs the size of the APOB has increased, so the size of the
RW_MRC_CACHE FMAP sections needs to be increased in order for the data
to still fit in the corresponding FMAP partition.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: Ib31b918aba90dd507b47aec9e1f75c138857cd02
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62155
Reviewed-by: Jason Glenesk <jason.glenesk@gmail.com>
Reviewed-by: Fred Reitberger <reitbergerfred@gmail.com>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-02-19 00:46:50 +00:00
Cliff Huang
23f33546bb mb/google/brya: remove the delay from for WWAN _ON method.
Remove unecessary delay in RTD3 _ON Method after PERST# dessartion.

TEST:
2022-02-10T18:22:53.204391Z INFO kernel: [    0.190287] ACPI: Power Resource [RTD3] (on)
2022-02-10T18:22:53.204395Z INFO kernel: [    0.194252] ACPI: Power Resource [RTD3] (off)

Signed-off-by: Cliff Huang <cliff.huang@intel.com>
Change-Id: I9bc36af6e6c944fcd3de23b7d49640ad9d25642d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61783
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anil Kumar K <anil.kumar.k@intel.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Bora Guvendik <bora.guvendik@intel.com>
2022-02-18 23:23:27 +00:00
Elyes Haouas
a1f5ad0849 nb/amd/pi/00730F01/northbridge.c: Use 'pci_{and,or}_config'
Change-Id: Ifd77c90fe82e20df91562fccea8b5d89dd4a193d
Signed-off-by: Elyes Haouas <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62134
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michał Żygowski <michal.zygowski@3mdeb.com>
2022-02-18 23:23:07 +00:00
Subrata Banik
e284ca26bf soc/intel/apollolake: Create alias for GEN_PMCON1 as GEN_PMCON_A
This patch creates alias for GEN_PMCON_A to maintain parity with other
IA SoC PMC register definitions.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: Id9a23c58a325cb544c50cbda432fe3117eea22fe
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61984
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2022-02-18 20:23:51 +00:00
Subrata Banik
7848aa9335 soc/intel/denverton_ns: Add function to clear PMCON status bits
This patch adds an SoC function to clear GEN_PMCON_A status bits to
align with other IA coreboot implementations.

Added `MS4V` macro for GEN_PMCON_A bit 18 as per EDS doc:558579.

Additionally, removed `PMC_` prefix from PMC configuration register
macros GEN_PMCON_A/B and ETR3.

Moved PMC PCI device macro from pmc.h to pci_devs.h and name PCH_PMC_DEV
to PCH_DEV_PMC. Also, adjust PCI macros under B0:D31:Fx based on
function numbers.

BUG=b:211954778
TEST=None.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I2690ccd387b40c0d89cf133117fd91914e1b71a4
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61974
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2022-02-18 20:23:33 +00:00
Subrata Banik
95986169f9 soc/intel/alderlake: Skip FSP Notify APIs
Alder Lake SoC deselects Kconfigs as below:
- USE_FSP_NOTIFY_PHASE_READY_TO_BOOT
- USE_FSP_NOTIFY_PHASE_END_OF_FIRMWARE
to skip FSP notify APIs (Ready to boot and End of Firmware) and make
use of native coreboot driver to perform SoC recommended operations
prior booting to payload/OS.

Additionally, created a helper function `heci_finalize()` to keep HECI
related operations separated for easy guarding again config.

TODO: coreboot native implementation to skip FSP notify phase API (post
pci enumeration) is still WIP.

BUG=b:211954778
TEST=Able to build brya with these changes and coreboot log with this
code change as below when ADL SoC selects required configs.

BS: BS_PAYLOAD_LOAD run times (exec / console): 135 / 62 ms
coreboot skipped calling FSP notify phase: 00000040.
coreboot skipped calling FSP notify phase: 000000f0.
BS: BS_PAYLOAD_LOAD exit times (exec / console): 0 / 11 ms
Finalizing chipset.
apm_control: Finalizing SMM.
APMC done.
HECI: Sending End-of-Post
CSE: EOP requested action: continue boot
CSE EOP successful, continuing boot
HECI: CSE device 16.1 is disabled
HECI: CSE device 16.4 is disabled
HECI: CSE device 16.5 is disabled
BS: BS_PAYLOAD_BOOT entry times (exec / console): 9 / 27 ms

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I0198c9568de0e74053775682a44324405746389a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60406
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
2022-02-18 20:22:58 +00:00
Subrata Banik
90e318bba4 soc/intel/common/cse: Add finalize operation for CSE
This patch implements the required operations to perform prior to
booting to OS using coreboot native driver when platform decides
to skip FSP notify APIs i.e. Ready to Boot and End Of Firmware.

BUG=b:211954778
TEST=Able to build brya with these changes and coreboot log with this
code change as below when ADL SoC selects all required configs:

BS: BS_PAYLOAD_LOAD run times (exec / console): 135 / 62 ms
coreboot skipped calling FSP notify phase: 00000040.
coreboot skipped calling FSP notify phase: 000000f0.
BS: BS_PAYLOAD_LOAD exit times (exec / console): 0 / 11 ms
Finalizing chipset.
apm_control: Finalizing SMM.
APMC done.
HECI: Sending End-of-Post
CSE: EOP requested action: continue boot
CSE EOP successful, continuing boot
HECI: CSE device 16.1 is disabled
HECI: CSE device 16.4 is disabled
HECI: CSE device 16.5 is disabled
BS: BS_PAYLOAD_BOOT entry times (exec / console): 9 / 27 ms

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: I70bde33f77026e8be165ff082defe3cab6686ec7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/60405
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2022-02-18 20:22:23 +00:00
Subrata Banik
34f26b2989 drivers/fsp/fsp2_0: Rework FSP Notify Phase API configs
This patch renames all FSP Notify Phase API configs to primarily remove
"SKIP_"  prefix.

1. SKIP_FSP_NOTIFY_PHASE_AFTER_PCI_ENUM ->
          USE_FSP_NOTIFY_PHASE_POST_PCI_ENUM
2. SKIP_FSP_NOTIFY_PHASE_READY_TO_BOOT ->
          USE_FSP_NOTIFY_PHASE_READY_TO_BOOT
3. SKIP_FSP_NOTIFY_PHASE_END_OF_FIRMWARE ->
          USE_FSP_NOTIFY_PHASE_END_OF_FIRMWARE

The idea here is to let SoC selects all required FSP configs to execute
FSP Notify Phase APIs unless SoC deselects those configs to run native
coreboot implementation as part of the `.final` ops.

For now all SoC that uses FSP APIs have selected all required configs
to let FSP to execute Notify Phase APIs.

Note: coreboot native implementation to skip FSP notify phase API (post
pci enumeration) is still WIP.

Additionally, fixed SoC configs inclusion order alphabetically. 

BUG=b:211954778
TEST=Able to build and boot brya.

Signed-off-by: Subrata Banik <subratabanik@google.com>
Change-Id: Ib95368872acfa3c49dad4eb7d0d73fca04b4a1fb
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61792
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Lean Sheng Tan <sheng.tan@9elements.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-02-18 20:21:45 +00:00
Wisley Chen
03c0853f4d mb/google/brya/redrix{4es}: Disable unused USB2/TCSS ports
Disable unused USB2/TCSS Ports.

BUG=b:217238553
TEST=FW_NAME=redrix emerge-brya coreboot

Change-Id: I1cdee5b6dc56accb52ba1bf636bdf753a7bfd199
Signed-off-by: Wisley Chen <wisley.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62069
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-02-18 20:18:58 +00:00
Boris Mittelberg
130de14a05 arch/x86/acpi: Add code for KEY_MENU
Support of MENU key (aka hamburger) for Chromebooks with Vivaldi
keyboard

BUG=b:215038215
TEST=manually tested on Anahera device: pressing T13 key opens menu

Signed-off-by: Boris Mittelberg <bmbm@google.com>
Change-Id: I07873dd9385c743a6512408688ec44a5e97219f9
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61835
Reviewed-by: Rajat Jain <rajatja@google.com>
Reviewed-by: Lance Zhao
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2022-02-18 20:18:41 +00:00
Boris Mittelberg
0c3b7f5411 ec/google/chromeec: Update ec_commands.h
This change copies ec_commands.h directly from the Chromium OS EC repo,
with the exception of changing the copyright header to SPDX format.
Update to commit hash af9a119

Signed-off-by: Boris Mittelberg <bmbm@google.com>
Change-Id: I1f2a140257d6127fb19bb514bc345466247b7499
Reviewed-on: https://review.coreboot.org/c/coreboot/+/61997
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2022-02-18 20:18:21 +00:00
Fred Reitberger
636a6dedf9 MAINTAINERS: Add myself
Change-Id: I441369bc47ad4758c2188cb4e0f7e971607f72d5
Signed-off-by: Fred Reitberger <reitbergerfred@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62137
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2022-02-18 19:57:44 +00:00
Felix Held
655caa2da0 soc/amd/common/block/psp/Makefile: add fmap_config.h dependency
Compiling efs_fmap_check.c depends on fmap_config.h already being
generated, so add this dependency.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I85e0900574f928d1594f8d1831ba58f959b75d27
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62132
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-02-18 17:14:33 +00:00
Felix Held
63226901c7 soc/amd/common/block/apob/apob_cache: use APOB cache size from FMAP
Also add the Makefile dependency on the fmap_config.h file to make sure
that this file already exists when it's included.

Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Change-Id: I540ea2c14fd187845efd3c0c8c1e4b8f82c8cac3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/62130
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Raul Rangel <rrangel@chromium.org>
2022-02-18 17:14:12 +00:00
295 changed files with 2854 additions and 1662 deletions

View File

@@ -0,0 +1,7 @@
# Community
* [Code of Conduct](code_of_conduct.md)
* [Language style](language_style.md)
* [Community forums](forums.md)
* [Project services](services.md)
* [coreboot at conferences](conferences.md)

View File

@@ -1,6 +1,6 @@
# Accounts on coreboot.org
There are a number of places where you can benefit from creaating an account
There are a number of places where you can benefit from creating an account
in our community. Since there is no single sign-on system in place (at this
time), they come with their own setup routines.

View File

@@ -0,0 +1,249 @@
# Google Summer of Code
## Contacts
If you are interested in participating in GSoC as a contributor or mentor,
please have a look at our [community forums] and reach out to us. Working closely
with the community is highly encouraged, as we've seen that our most successful
contributors are generally very involved.
Felix Singer, David Hendricks and Martin Roth are the coreboot GSoC admins for
2022. Please feel free to reach out to them directly if you have any questions.
## Why work on coreboot for GSoC?
* coreboot offers you the opportunity to work with various architectures
right on the iron. coreboot supports both current and older silicon for a
wide variety of chips and technologies.
* coreboot has a worldwide developer and user base.
* We are a very passionate team, so you will interact directly with the
project initiators and project leaders.
* We have a large, helpful community. coreboot has some extremely talented
and helpful experts in firmware involved in the project. They are ready to
assist and mentor contributors participating in GSoC.
* One of the last areas where open source software is not common is firmware.
Running proprietary firmware can have severe effects on user's freedom and
security. coreboot has a mission to change that by providing a common
framework for initial hardware initialization and you can help us succeed.
## Contributor requirements & commitments
Google Summer of Code is a significant time commitment for you. Medium-sized
projects are estimated to take 175 hours, while large-sized projects are
estimated to take 350 hours. Depending on the project size, this means we
expect you to work roughly half-time or full-time on your project during the
three months of coding. We expect to be able to see this level of effort in the
results.
The standard program duration is 12 weeks and in consultation with the mentor
it can be extended up to 22 weeks. Please keep in mind that the actual number
of hours you spend on the project highly depends on your skills and previous
experience.
Make sure that your schedule (exams, courses, day job) gives you a sufficient
amount of spare time. If this is not the case, then you should not apply.
### Before applying
* Join the [mailing list] and our other [community forums]. Introduce yourself
and mention that you are a prospective GSoC contributor. Ask questions and
discuss the project that you are considering. Community involvement is a
key component of coreboot development.
* You accept our [Code of Conduct] and [Language style].
* Demonstrate that you can work with the coreboot codebase.
* Look over some of the development processes guidelines: [Getting started],
[Tutorial], [Flashing firmware tutorial] and [Coding style].
* Download, build and boot coreboot in QEMU or on real hardware. Please email
your serial output results to the [mailing list].
* Look through some patches on Gerrit to get an understanding of the review
process and common issues.
* Get signed up for Gerrit and push at least one patch to Gerrit for review.
Check Easy projects or ask for simple tasks on the [mailing list] or on our
other [community forums] if you need ideas.
### During the program
* To pass and to be paid by Google requires that you meet certain milestones.
* First, you must be in good standing with the community before the official
start of the program. We expect you to post some design emails to the
[mailing list], and get feedback on them, both before applying, and during
the "community bonding period" between acceptance and official start.
* You must have made progress and committed significant code before the
mid-term point and by the final.
* We require that accepted contributors to maintain a blog, where you are
expected to write about your project *WEEKLY*. This is a way to measure
progress and for the community at large to be able to help you. GSoC is
*NOT* a private contract between your mentor and you.
* You must be active in the community on IRC and the [mailing list].
* You are expected to work on development publicly, and to push commits to the
project on a regular basis. Depending on the project and what your mentor
agrees to, these can be published directly to the project or to a public
repository such as Gitlab or Github. If you are not publishing directly to
the project codebase, be aware that we do not want large dumps of code that
need to be rushed to meet the mid-term and final goals.
We don't expect our contributors to be experts in our problem domain, but we
don't want you to fail because some basic misunderstanding was in your way of
completing the task.
## Projects
There are many development tasks available in coreboot. We prepared some ideas
for Summer of Code projects. These are projects that we think can be managed in
the timeline of GSoC, and they cover areas where coreboot is trying to reach
new users and new use cases.
Of course your application does not have to be based on any of the ideas listed.
It is entirely possible that you have a great idea that we just didn't think of
yet. Please let us know!
The blog posts related to previous GSoC projects might give some insights to
what it is like to be a coreboot GSoC contributor.
## coreboot Summer of Code Application
coreboot welcomes contributors from all backgrounds and levels of experience.
Your application should include a complete project proposal. You should
document that you have the knowledge and the ability to complete your proposed
project. This may require a little research and understanding of coreboot prior
to sending your application. The community and coreboot project mentors are your
best resource in fleshing out your project ideas and helping with a project
timeline. We recommend that you get feedback and recommendations on your
proposal before the application deadline.
Please complete the standard GSoC application and project proposal. Provide the
following information as part of your application. Make sure to provide multiple
ways of communicating in case your equipment (such as a laptop) is lost,
damaged, or stolen, or in case of a natural disaster that disrupts internet
service. You risk automatically failing if your mentor cannot contact you and if
you cannot provide updates according to GSoC deadlines.
**Personal Information**
* Name
* Email and contact options (IRC, Matrix, …)
* Phone number (optional, but recommended)
* Timezone, Usual working hours (UTC)
* School / University, Degree Program, expected graduation date
* Short bio / Overview of your background
* What are your other time commitments? Do you have a job, classes, vacations?
When and how long?
**Software experience**
If applicable, please provide the following information:
* Portfolio, Website, blog, microblog, Github, Gitlab, ...
* Links to one or more patches submitted
* Links to posts on the [mailing list] with the serial output of your build.
* Please comment on your software and firmware experience.
* Have you contributed to an open source project? Which one? What was your
experience?
* What was your experience while building and running coreboot? Did you have
problems?
**Your project**
* Provide an overview of your project (in your own words).
* Provide a breakdown of your project in small specific weekly goals. Think
about the potential timeline.
* How will you accomplish this goal? What is your working style?
* Explain what risks or potential problems your project might experience.
* What would you expect as a minimum level of success?
* Do you have a stretch goal?
**Other**
* Resume (optional)
### Advice on how to apply
* [GSoC Contributor Guide]
* The Drupal project has a great page on how to write an GSoC application.
* Secrets for GSoC success: [2]
## Mentors
Each accepted project will have at least one mentor. We will match mentors and
contributors based on the project and experience level. If possible, we also
will try to match their time zones.
Mentors are expected to stay in frequent contact with the contributor and
provide guidance such as code reviews, pointers to useful documentation, etc.
This should generally be a time commitment of several hours per week.
Some projects might have more than one mentor, who can serve as a backup. They
are expected to coordinate with each other and a contributor on a regular basis,
and keep track of the contributor process. They should be able to take over
mentoring duty if one of the mentors is unavailable (vacations, sickness,
emergencies).
### Volunteering to be a mentor
If you'd like to volunteer to be a mentor, please read the [GSoC Mentor Guide].
This will give you a better idea of expectations, and where to go for help.
After that, contact Org Admins (see coreboot contacts section above).
The following coreboot developers have volunteered to be GSoC 2022 mentors.
Please stop by in our community forums and say hi to them and ask them
questions.
* Tim Wawrzynczak
* Raul Rangel
* Ron Minnich
[community forums]: ../community/forums.md
[mailing list]: https://mail.coreboot.org/postorius/lists/coreboot.coreboot.org
[Getting started]: ../getting_started/index.md
[Tutorial]: ../tutorial/index.md
[Flashing firmware tutorial]: ../flash_tutorial/index.md
[Coding style]: coding_style.md
[Code of Conduct]: ../community/code_of_conduct.md
[Language style]: ../community/language_style.md
[GSoC Contributor Guide]: https://google.github.io/gsocguides/student
[GSoC Mentor Guide]: https://google.github.io/gsocguides/mentor

View File

@@ -0,0 +1,6 @@
# Contributing
* [Coding Style](coding_style.md)
* [Project Ideas](project_ideas.md)
* [Documentation Ideas](documentation_ideas.md)
* [Google Summer of Code](gsoc.md)

View File

@@ -168,14 +168,8 @@ Contents:
* [Getting Started](getting_started/index.md)
* [Tutorial](tutorial/index.md)
* [Coding Style](contributing/coding_style.md)
* [Project Ideas](contributing/project_ideas.md)
* [Documentation Ideas](contributing/documentation_ideas.md)
* [Code of Conduct](community/code_of_conduct.md)
* [Language style](community/language_style.md)
* [Community forums](community/forums.md)
* [Project services](community/services.md)
* [coreboot at conferences](community/conferences.md)
* [Contributing](contributing/index.md)
* [Community](community/index.md)
* [Payloads](payloads.md)
* [Distributions](distributions.md)
* [Technotes](technotes/index.md)

View File

@@ -1,27 +1,340 @@
Upcoming release - coreboot 4.16
================================
coreboot 4.16
========================================================================
The 4.16 release is planned for February, 2022.
The 4.16 release was done on February 25th, 2022.
We are increasing the frequency of releases in order to enable others to release quarterly on
a fresher version of coreboot.
Since 4.15 there have been more than 1770 new commits by more than 170
developers. Of these, more than 35 contributed to coreboot for the
first time.
Update this document with changes that should be in the release notes.
Welcome to the project!
* Please use Markdown.
* See the past few release notes for the general format.
* The chip and board additions and removals will be updated right
before the release, so those do not need to be added.
Thank you to all the developers who continue to make coreboot the
great open source firmware project that it is.
New mainboards:
---------------
* Acer Aspire VN7-572G
* AMD Chausie
* ASROCK H77 Pro4-M
* ASUS P8Z77-M
* Emulation QEMU power9
* Google Agah
* Google Anahera4ES
* Google Banshee
* Google Beadrix
* Google Brya4ES
* Google Crota
* Google Dojo
* Google Gimble4ES
* Google Herobrine_Rev0
* Google Kingler
* Google Kinox
* Google Krabby
* Google Moli
* Google Nereid
* Google Nivviks
* Google Primus4ES
* Google Redrix4ES
* Google Skyrim
* Google Taeko4ES
* Google Taniks
* Google Vell
* Google Volmar
* Intel Alderlake-N RVP
* Prodrive Atlas
* Star Labs Star Labs StarBook Mk V (i3-1115G4 and i7-1165G7)
* System76 gaze16 3050
* System76 gaze16 3060
* System76 gaze16 3060-b
Removed mainboards:
-------------------
* Google -> Corsola
* Google -> Nasher
* Google -> Stryke
Added processors:
-----------------
* src/cpu/power9
* src/soc/amd/sabrina
Submodule Updates
-----------------
* /3rdparty/amd_blobs (6 commits)
* /3rdparty/arm-trusted-firmware (965 commits)
* /3rdparty/blobs (30 commits)
* /3rdparty/chromeec (2212 commits)
* /3rdparty/intel-microcode (1 commits)
* /3rdparty/qc_blobs (13 commits)
* /3rdparty/vboot (44 commits)
Plans to move platform support to a branch:
-------------------------------------------
After the 4.18 release in November 2022, we plan to move support for any
boards still requiring RESOURCE_ALLOCATOR_V3 to the 4.18 branch. V4 was
introduced more than a year ago and with minor changes most platforms
were able to work just fine with it. A major difference is that V3 uses
just one continuous region below 4G to allocate all PCI memory BAR's. V4
uses all available space below 4G and if asked to, also above 4G too.
This makes it important that SoC code properly reports all fixed
resources.
Currently only AGESA platforms have issues with it. On Gerrit both
attempts to fix AMD AGESA codebases to use V4 and compatibility modes
inside the V4 allocator have been proposed, but both efforts seem
stalled. See the (not yet merged) documentation
[CR:43603](https://review.coreboot.org/c/coreboot/+/43603) on it's
details. It looks like properly reporting all fixed resources is the
issue.
At this point, we are not specifying which platforms this will include
as there are a number of patches to fix these issues in flight.
Hopefully, all platforms will end up being migrated to the v4 resource
allocator so that none of the platforms need to be supported on the
branch.
Additionally, even if the support for the platform is moved to a branch,
it can be brought back to ToT if they're fixed to support the v4
allocator.
Plans for Code Deprecation
--------------------------
As of release 4.18 (November 2022) we plan to deprecate LEGACY_SMP_INIT.
This also includes the codepath for SMM_ASEG. This code is used to start
APs and do some feature programming on each AP, but also set up SMM.
This has largely been superseded by PARALLEL_MP, which should be able to
cover all use cases of LEGACY_SMP_INIT, with little code changes. The
reason for deprecation is that having 2 codepaths to do the virtually
the same increases maintenance burden on the community a lot, while also
being rather confusing.
A few things are lacking in PARALLEL_MP init:
- Support for !CONFIG_SMP on single core systems. It's likely easy to
extend PARALLEL_MP or write some code that just does CPU detection on
the BSP CPU.
- Support SMM in the legacy ASEG (0xa0000 - 0xb0000) region. A POC
showed that it's not that hard to do with PARALLEL_MP
https://review.coreboot.org/c/coreboot/+/58700
No platforms in the tree have any hardware limitations that would block
migrating to PARALLEL_MP / a simple !CONFIG_SMP codebase.
Significant changes
-------------------
### Add significant changes here
This is, of course, not a complete list of all changes in the 4.16
coreboot release, but a sampling of some of the more interesting and
significant changes.
### Option to disable Intel Management Engine
Disable the Intel (Converged Security) Management Engine ((CS)ME) via HECI based
on Intel Core processors from Skylake to Alder Lake. State is set based on a
CMOS value of `me_state`. A value of `0` will result in a (CS)ME state of `0`
(working) and value of `1` will result in a (CS)ME state of `3` (disabled). For
an example CMOS layout and more info, see
Disable the Intel (Converged Security) Management Engine ((CS)ME) via
HECI based on Intel Core processors from Skylake to Alder Lake. State is
set based on a CMOS value of `me_state`. A value of `0` will result in a
(CS)ME state of `0` (working) and value of `1` will result in a (CS)ME
state of `3` (disabled). For an example CMOS layout and more info, see
[cse.c](../../src/soc/intel/common/block/cse/cse.c).
### Add [AMD] apcb_v3_edit tool
apcb_v3_edit.py tool edits APCB V3 binaries. Specifically it will inject
up to 16 SPDs into an existing APCB. The APCB must have a magic number
at the top of each SPD slot.
### Allow enable/disable ME via CMOS
Add .enable method that will set the CSME state. The state is based on
the new CMOS option me_state, with values of 0 and 1. The method is very
stable when switching between different firmware platforms.
This method should not be used in combination with USE_ME_CLEANER.
State 1 will result in:
ME: Current Working State : 4
ME: Current Operation State : 1
ME: Current Operation Mode : 3
ME: Error Code : 2
State 0 will result in:
ME: Current Working State : 5
ME: Current Operation State : 1
ME: Current Operation Mode : 0
ME: Error Code : 0
### Move LAPIC configuration to MP init
Implementation for setup_lapic() did two things -- call enable_lapic()
and virtual_wire_mode_init().
In PARALLEL_MP case enable_lapic() was redundant as it was already
executed prior to initialize_cpu() call. For the !PARALLEL_MP case
enable_lapic() is added to AP CPUs.
### Add ANSI escape sequences for highlighting
Add ANSI escape sequences to highlight a log line based on its loglevel
to the output of "interactive" consoles that are meant to be displayed
on a terminal (e.g. UART). This should help make errors and warnings
stand out better among the usual spew of debug messages. For users whose
terminal or use case doesn't support these sequences for some reason (or
who simply don't like them), they can be disabled with a Kconfig.
While ANSI escape sequences can be used to add color, minicom (the
presumably most common terminal emulator for UART endpoints?) doesn't
support color output unless explicitly enabled (via -c command line
flag), and other terminal emulators may have similar restrictions, so in
an effort to make this as widely useful by default as possible I have
chosen not to use color codes and implement this highlighting via
bolding, underlining and inverting alone (which seem to go through in
all cases). If desired, support for separate color highlighting could be
added via Kconfig later.
### Add cbmem_dump_console
This function is similar to cbmem_dump_console_to_uart except it uses
the normally configured consoles. A console_paused flag was added to
prevent the cbmem console from writing to itself.
### Add coreboot-configurator
A simple GUI to change CMOS settings in coreboot's CBFS, via the
nvramtool utility. Testing on Debian, Ubuntu and Manjaro with coreboot
4.14+, but should work with any distribution or coreboot release that
has an option table. For more info, please check the
[README](https://web.archive.org/web/20220225194308/https://review.coreboot.org/plugins/gitiles/coreboot/+/refs/heads/master/util/coreboot-configurator/README.md).
### Update live ISO configs to NixOS 21.11
Update configs so that they work with NixOS 21.11. Drop `iasl` package
since it was replaced with `acpica-tools`.
### Move to U-Boot v2021.10
Move to building the latest U-Boot.
### Support systems with >128 cores
Each time the spinlock is acquired a byte is decreased and then the
sign of the byte is checked. If there are more than 128 cores the sign
check will overflow. An easy fix is to increase the word size of the
spinlock acquiring and releasing.
### Add [samsung] sx9360 [proximity sensor] driver
Add driver for setting up Semtech sx9360 SAR sensor.
The driver is based on sx9310.c. The core of the driver is the same, but
the bindings are slightly different.
Registers are documented [in the kernel tree:](https://web.archive.org/web/20220225182803/https://patchwork.kernel.org/project/linux-iio/patch/20211213024057.3824985-4-gwendal@chromium.org/)
Documentation/devicetree/bindings/iio/proximity/semtech,sx9360.yaml
### Add driver for Genesys Logic [SD Controller] GL9750
The device is a PCIe Gen1 to SD 3.0 card reader controller to be
used in the Chromebook. The datasheet name is GL9750S and the revision
is 01.
The patch disables ASPM L0s.
### Add support for Realtek RT8125
The Realtek RT8168 and RT8125 have a similar programming interface,
therefore add the PCI device ID for the RT8125 into driver for support.
### Add Fibocom 5G WWAN ACPI support
Support PXSX._RST and PXSX.MRST._RST for warm and cold reset.
PXSX._RST is invoked on driver removal.
build dependency:
soc/intel/common/block/pcie/rtd3
This driver will use the rtd3 methods for the same parent in the device
tree. The rtd3 chip needs to be added on the same root port in the
devicetree separately.
### Fix bug in vr_config
The `cpu_get_power_max()` function returns the TDP in milliwatts, but
the vr_config code interprets the value in watts. Divide the value by
1000 to fix this.
This also fixes an integer overflow when `cpu_get_power_max()` returns
a value greater than 65535 (UINT16_MAX).
### Make mixed topology work
When using a mixed memory topology with DDR4, it's not possible to boot
when no DIMMs are installed, even though memory-down is available. This
happens because the DIMM SPD length defaults to 256 when no DIMM SPD is
available. Relax the length check when no DIMMs are present to overcome
this problem.
### Add FSP 2.3 support
FSP 2.3 specification introduces following changes:
1. FSP_INFO_HEADER changes
Updated SpecVersion from 0x22 to 0x23
Updated HeaderRevision from 5 to 6
Added ExtendedImageRevision
FSP_INFO_HEADER length changed to 0x50
2. Added FSP_NON_VOLATILE_STORAGE_HOB2
Following changes are implemented in the patch to support FSP 2.3:
- Add Kconfig option
- Update FSP build binary version info based on ExtendedImageRevision
field in header
- New NV HOB related changes will be pushed as part of another patch
### Join hash calculation for verification and measurement
This patch moves the CBFS file measurement when CONFIG_TPM_MEASURED_BOOT
is enabled from the lookup step into the code where a file is actually
loaded or mapped from flash. This has the advantage that CBFS routines
which just look up a file to inspect its metadata (e.g. cbfs_get_size())
do not cause the file to be measured twice. It also removes the existing
inefficiency that files are loaded twice when measurement is enabled
(once to measure and then again when they are used). When CBFS
verification is enabled and uses the same hash algorithm as the TPM, we
are even able to only hash the file a single time and use the result for
both purposes.
### Skip FSP Notify APIs
Alder Lake SoC deselects Kconfigs as below:
- USE_FSP_NOTIFY_PHASE_READY_TO_BOOT
- USE_FSP_NOTIFY_PHASE_END_OF_FIRMWARE
to skip FSP notify APIs (Ready to boot and End of Firmware) and make
use of native coreboot driver to perform SoC recommended operations
prior booting to payload/OS.
Additionally, created a helper function `heci_finalize()` to keep HECI
related operations separated for easy guarding again config.
TODO: coreboot native implementation to skip FSP notify phase API (post
pci enumeration) is still WIP.
### Add support for PCIe Resizable BARs
Section 7.8.6 of the PCIe spec (rev 4) indicates that some devices can
indicates support for "Resizable BARs" via a PCIe extended capability.
When support this capability is indicated by the device, the size of
each BAR is determined in a different way than the normal "moving
bits" method. Instead, a pair of capability and control registers is
allocated in config space for each BAR, which can be used to both
indicate the different sizes the device is capable of supporting for
the BAR (powers-of-2 number of bits from 20 [1 MiB] to 63 [8 EiB]), and
to also inform the device of the size that the allocator actually
reserved for the MMIO range.
This patch adds a Kconfig for a mainboard to select if it knows that it
will have a device that requires this support during PCI enumeration.
If so, there is a corresponding Kconfig to indicate the maximum number
of bits of address space to hand out to devices this way (again, limited
by what devices can support and each individual system may want to
support, but just like above, this number can range from 20 to 63) If
the device can support more bits than this Kconfig, the resource request
is truncated to the number indicated by this Kconfig.

View File

@@ -16,6 +16,7 @@ Release notes for previous releases
* [4.13 - November 2020](coreboot-4.13-relnotes.md)
* [4.14 - May 2021](coreboot-4.14-relnotes.md)
* [4.15 - November 2021](coreboot-4.15-relnotes.md)
* [4.16 - Feb 2022](coreboot-4.16-relnotes.md)
The checklist contains instructions to ensure that a release covers all
important things and provides a reliable format for tarballs, branch
@@ -32,4 +33,4 @@ Upcoming release
----------------
Please add to the release notes as changes are added:
* [4.16 - Feb 2022](coreboot-4.16-relnotes.md)
* [4.17 - May 2022](coreboot-4.17-relnotes.md)

View File

@@ -1,6 +1,7 @@
# vboot-enabled devices
## AMD
- Chausie
- Majolica
## Clevo
@@ -29,9 +30,37 @@
- Panther (ASUS Chromebox CN60)
- Tricky (Dell Chromebox 3010)
- Zako (HP Chromebox G1)
- Agah
- Anahera
- Anahera4ES
- Brask
- Brya 0
- Brya4ES
- Felwinter
- Gimble
- Gimble4ES
- Kano
- Nivviks
- Nereid
- Primus
- Primus4ES
- Redrix
- Redrix4ES
- Taeko
- Taeko4ES
- Taniks
- Vell
- Volmar
- Banshee
- Crota
- Moli
- Kinox
- Butterfly (HP Pavilion Chromebook 14)
- Cherry
- Dojo
- Tomato
- Kingler
- Krabby
- Banon (Acer Chromebook 15 (CB3-532))
- Celes (Samsung Chromebook 3)
- Cyan (Acer Chromebook R11 (C738T))
@@ -70,31 +99,31 @@
- Nipperkin
- Dewatt
- Akemi (IdeaPad Flex 5/5i Chromebook)
- Ambassador
- Dooly
- Dratini (HP Pro c640 Chromebook)
- Duffy Legacy (32MB)
- Duffy (ASUS Chromebox 4)
- Faffy (ASUS Fanless Chromebox)
- Genesis
- Hatch
- Helios (ASUS Chromebook Flip C436FA)
- Helios_Diskswap
- Jinlon (HP Elite c1030 Chromebook)
- Kaisa Legacy (32MB)
- Kaisa (Acer Chromebox CXI4)
- Kohaku (Samsung Galaxy Chromebook)
- Kindred (Acer Chromebook 712)
- Helios (ASUS Chromebook Flip C436FA)
- Kohaku (Samsung Galaxy Chromebook)
- Moonbuggy
- Mushu
- Palkia
- Nightfury (Samsung Galaxy Chromebook 2)
- Noibat (HP Chromebox G3)
- Palkia
- Puff
- Helios_Diskswap
- Stryke
- Wyvern (CTL Chromebox CBx2)
- Dooly
- Ambassador
- Genesis
- Scout
- Moonbuggy
- Wyvern (CTL Chromebox CBx2)
- Herobrine
- Herobrine_Rev0
- Senor
- Piglin
- Hoglin
@@ -165,7 +194,6 @@
- Pyro (Lenovo Thinkpad (Yoga) 11e Chromebook)
- Sand (Acer Chromebook 15 CB515-1HT/1H)
- Snappy (HP Chromebook x360 11 G1 EE)
- Nasher
- Coral
- Arcada (Latitude 5300 2-in-1 Chromebook Enterprise)
- Sarien (Dell Latitude 5400 Chromebook Enterprise)
@@ -215,6 +243,8 @@
- Alderlake-P RVP with Microchip EC
- Alderlake-M RVP
- Alderlake-M RVP with Chrome EC
- Alderlake-N RVP
- Alderlake-N RVP with Chrome EC
- Basking Ridge CRB
- Coffeelake U SO-DIMM DDR4 RVP
- Coffeelake H SO-DIMM DDR4 RVP11

View File

@@ -141,6 +141,7 @@ AMD family 17h and 19h reference boards
M: Marshall Dawson <marshalldawson3rd@gmail.com>
M: Felix Held <felix-coreboot@felixheld.de>
M: Jason Glenesk <jason.glenesk@gmail.com>
M: Fred Reitberger <reitbergerfred@gmail.com>
S: Maintained
F: src/mainboard/amd/chausie/
F: src/mainboard/amd/majolica/
@@ -613,6 +614,7 @@ M: Marshall Dawson <marshalldawson3rd@gmail.com>
M: Felix Held <felix-coreboot@felixheld.de>
M: Jason Glenesk <jason.glenesk@gmail.com>
M: Raul E Rangel <rrangel@chromium.org>
M: Fred Reitberger <reitbergerfred@gmail.com>
S: Maintained
F: src/soc/amd/cezanne/
F: src/vendorcode/amd/fsp/cezanne/
@@ -622,6 +624,7 @@ M: Marshall Dawson <marshalldawson3rd@gmail.com>
M: Felix Held <felix-coreboot@felixheld.de>
M: Jason Glenesk <jason.glenesk@gmail.com>
M: Raul E Rangel <rrangel@chromium.org>
M: Fred Reitberger <reitbergerfred@gmail.com>
S: Maintained
F: src/soc/amd/common/
@@ -630,6 +633,7 @@ M: Marshall Dawson <marshalldawson3rd@gmail.com>
M: Felix Held <felix-coreboot@felixheld.de>
M: Jason Glenesk <jason.glenesk@gmail.com>
M: Raul E Rangel <rrangel@chromium.org>
M: Fred Reitberger <reitbergerfred@gmail.com>
S: Maintained
F: src/soc/amd/picasso/
F: src/vendorcode/amd/fsp/picasso/
@@ -639,6 +643,7 @@ M: Marshall Dawson <marshalldawson3rd@gmail.com>
M: Felix Held <felix-coreboot@felixheld.de>
M: Jason Glenesk <jason.glenesk@gmail.com>
M: Raul E Rangel <rrangel@chromium.org>
M: Fred Reitberger <reitbergerfred@gmail.com>
S: Maintained
F: src/soc/amd/sabrina/
F: src/vendorcode/amd/fsp/sabrina/

View File

@@ -136,22 +136,29 @@ payloads/external/depthcharge/depthcharge/build/depthcharge.elf depthcharge: $(D
# Tianocore
payloads/external/tianocore/tianocore/Build/UEFIPAYLOAD.fd tianocore: $(DOTCONFIG)
$(obj)/UEFIPAYLOAD.fd tianocore: $(DOTCONFIG)
$(MAKE) -C payloads/external/tianocore all \
HOSTCC="$(HOSTCC)" \
CC="$(HOSTCC)" \
CONFIG_TIANOCORE_REVISION_ID=$(CONFIG_TIANOCORE_REVISION_ID) \
CONFIG_TIANOCORE_DEBUG=$(CONFIG_TIANOCORE_DEBUG) \
CONFIG_TIANOCORE_TARGET_IA32=$(CONFIG_TIANOCORE_TARGET_IA32) \
CONFIG_TIANOCORE_BOOTSPLASH_FILE=$(CONFIG_TIANOCORE_BOOTSPLASH_FILE) \
CONFIG_TIANOCORE_REPOSITORY=$(CONFIG_TIANOCORE_REPOSITORY) \
CONFIG_TIANOCORE_TAG_OR_REV=$(CONFIG_TIANOCORE_TAG_OR_REV) \
CONFIG_TIANOCORE_UEFIPAYLOAD=$(CONFIG_TIANOCORE_UEFIPAYLOAD) \
CONFIG_TIANOCORE_UPSTREAM=$(CONFIG_TIANOCORE_UPSTREAM) \
CONFIG_ECAM_MMCONF_BASE_ADDRESS=$(CONFIG_ECAM_MMCONF_BASE_ADDRESS) \
CONFIG_TIANOCORE_COREBOOTPAYLOAD=$(CONFIG_TIANOCORE_COREBOOTPAYLOAD) \
CONFIG_TIANOCORE_DEBUG=$(CONFIG_TIANOCORE_DEBUG) \
CONFIG_TIANOCORE_RELEASE=$(CONFIG_TIANOCORE_RELEASE) \
CONFIG_TIANOCORE_ABOVE_4G_MEMORY=$(CONFIG_TIANOCORE_ABOVE_4G_MEMORY) \
CONFIG_TIANOCORE_BOOTSPLASH_FILE=$(CONFIG_TIANOCORE_BOOTSPLASH_FILE) \
CONFIG_TIANOCORE_BOOT_MANAGER_ESCAPE=$(CONFIG_TIANOCORE_BOOT_MANAGER_ESCAPE) \
CONFIG_TIANOCORE_BOOT_TIMEOUT=$(CONFIG_TIANOCORE_BOOT_TIMEOUT) \
CONFIG_TIANOCORE_CBMEM_LOGGING=$(CONFIG_TIANOCORE_CBMEM_LOGGING) \
CONFIG_TIANOCORE_COREBOOTPAYLOAD=$(CONFIG_TIANOCORE_COREBOOTPAYLOAD) \
CONFIG_TIANOCORE_FOLLOW_BGRT_SPEC=$(CONFIG_TIANOCORE_FOLLOW_BGRT_SPEC) \
CONFIG_TIANOCORE_HAVE_EFI_SHELL=$(CONFIG_TIANOCORE_HAVE_EFI_SHELL) \
CONFIG_TIANOCORE_PRIORITIZE_INTERNAL=$(CONFIG_TIANOCORE_PRIORITIZE_INTERNAL) \
CONFIG_TIANOCORE_PS2_SUPPORT=$(CONFIG_TIANOCORE_PS2_SUPPORT) \
CONFIG_TIANOCORE_SD_MMC_TIMEOUT=$(CONFIG_TIANOCORE_SD_MMC_TIMEOUT) \
CONFIG_TIANOCORE_USE_8254_TIMER=$(CONFIG_TIANOCORE_USE_8254_TIMER) \
CONFIG_ECAM_MMCONF_BASE_ADDRESS=$(CONFIG_ECAM_MMCONF_BASE_ADDRESS) \
GCC_CC_x86_32=$(GCC_CC_x86_32) \
GCC_CC_x86_64=$(GCC_CC_x86_64) \
GCC_CC_arm=$(GCC_CC_arm) \
@@ -161,6 +168,7 @@ payloads/external/tianocore/tianocore/Build/UEFIPAYLOAD.fd tianocore: $(DOTCONFI
OBJCOPY_arm=$(OBJCOPY_arm) \
OBJCOPY_arm64=$(OBJCOPY_arm64) \
MFLAGS= MAKEFLAGS=
mv payloads/external/tianocore/output/UEFIPAYLOAD.fd $@
# FILO

View File

@@ -2,7 +2,7 @@ if PAYLOAD_TIANOCORE
config PAYLOAD_FILE
string "Tianocore binary"
default "payloads/external/tianocore/tianocore/Build/UEFIPAYLOAD.fd"
default "$(obj)/UEFIPAYLOAD.fd"
help
The result of a UefiPayloadPkg build
@@ -35,13 +35,30 @@ config TIANOCORE_COREBOOTPAYLOAD
Select this option to build using MrChromebox's older (now deprecated)
CorebootPayloadPkg-based Tianocore branch
config TIANOCORE_CUSTOM
bool "Custom"
help
Specify your own edk2 repository and branch to use.
endchoice
config TIANOCORE_REVISION_ID
string "Insert a commit's SHA-1 or a branch name"
config TIANOCORE_REPOSITORY
string "URL to git repository for edk2"
default "https://github.com/tianocore/edk2" if TIANOCORE_UPSTREAM
default "https://github.com/mrchromebox/edk2" if TIANOCORE_UEFIPAYLOAD || TIANOCORE_COREBOOTPAYLOAD
help
The commit's SHA-1 or branch name of the revision to use. Choose "upstream/master"
for master branch of Tianocore release on github.
coreboot supports an array of build options which can be found below. These options
will only have an effect if the relevant options exist in the target repository.
config TIANOCORE_TAG_OR_REV
string "Insert a commit's SHA-1 or a branch name"
default "origin/uefipayload_202107" if TIANOCORE_UEFIPAYLOAD
default "origin/master" if TIANOCORE_UPSTREAM
default "origin/coreboot_fb" if TIANOCORE_COREBOOTPAYLOAD
help
The commit's SHA-1 or branch name of the revision to use. This must exist in
TIANOCORE_REPOSITORY, and in the case of a branch name, prefixed with origin i.e.
"origin/uefipayload_202202"
choice
prompt "Tianocore build"
@@ -64,32 +81,33 @@ endchoice
if TIANOCORE_UEFIPAYLOAD
config TIANOCORE_CBMEM_LOGGING
bool "Enable Tianocore logging to CBMEM"
config TIANOCORE_ABOVE_4G_MEMORY
bool "Enable above 4G memory"
default n
help
Select this option if you want to enable Tianocore logging to CBMEM.
You may want to increase the default cbmem buffer size when selecting
this option, especially if using a debug (vs release) build.
Selecting this option will increase the payload size in CBFS by ~220KB.
Select this option to enable Above 4G Decode. This will allow the
payload to use all of the memory, rather than an maximum of 4G.
config TIANOCORE_BOOTSPLASH_IMAGE
bool "Use a custom bootsplash image"
Disabling memory above 4G is useful for bootloaders that are not
fully 64-bit aware such as Qubes R4.0.4 bootloader.
config TIANOCORE_BOOTSPLASH_FILE
string "Tianocore Bootsplash path and filename"
default "bootsplash.bmp"
help
Select this option if you have a bootsplash image that you would
like to be used. If this option is not selected, the default
coreboot logo (European Brown Hare) will used.
config TIANOCORE_BOOTSPLASH_FILE
string "Tianocore Bootsplash path and filename"
depends on TIANOCORE_BOOTSPLASH_IMAGE
default "bootsplash.bmp"
help
The path and filename of the file to use as graphical bootsplash
image. The file must be an uncompressed BMP.
image. The file must be an uncompressed BMP, in BMP 3 format.
Linux can create these with the below command:
`convert splosh.bmp BMP3:splash.bmp`
This image will also be used as the BGRT boot image, which may
persist through your OS boot process, and will be displayed
vertically centered 38.2% from the top of the display.
persist through your OS boot process.
See ACPI spec 6.3, 5.2.22 Boot Graphics Resource Table (BGRT), and
Microsoft's documentation on BGRT positioning:
@@ -101,16 +119,61 @@ config TIANOCORE_BOOTSPLASH_FILE
If an absolute path is not given, the path will assumed to be
relative to the coreboot root directory.
config TIANOCORE_ABOVE_4G_MEMORY
bool "Enable above 4G memory"
config TIANOCORE_BOOT_MANAGER_ESCAPE
bool "Use Escape key for Boot Manager"
default n
help
Select this option to enable Above 4G Decode. This will allow the
payload to use all of the memory, rather than an maximum of 4G.
Use Escape as the hot-key to access the Boot Manager. This replaces
the default key of F2.
Disabling this option, which will reserve memory above 4G, is
useful for bootloaders that are not fully 64-bit aware such as
Qubes R4.0.4 bootloader.
config TIANOCORE_BOOT_TIMEOUT
int
default 2
help
The length of time in seconds for which the boot splash/menu prompt will be displayed.
For boards with an internal display, the default value of 2s is generally sufficient.
For boards with an external display, a value of 5s is generally sufficient.
config TIANOCORE_CBMEM_LOGGING
bool "Enable Tianocore logging to CBMEM"
help
Select this option if you want to enable Tianocore logging to CBMEM.
You may want to increase the default cbmem buffer size when selecting
this option, especially if using a debug (vs release) build.
Selecting this option will increase the payload size in CBFS by 0x10000.
config TIANOCORE_FOLLOW_BGRT_SPEC
bool "Center logo 38.2% from the top of screen"
default n
help
Follow the BGRT Specification implemented by Microsoft and
the Boot Logo 38.2% will be vertically centered 38.2% from
the top of the display.
config TIANOCORE_HAVE_EFI_SHELL
bool "Include EFI Shell"
default y
help
Include the EFI shell Binary
config TIANOCORE_PRIORITIZE_INTERNAL
bool "Prioritize internal boot devices"
default y
help
Prioritize internal boot devices over external devices
config TIANOCORE_PS2_SUPPORT
bool "Support PS/2 Keyboards"
default y
help
Include support for PS/2 keyboards
config TIANOCORE_SD_MMC_TIMEOUT
int "Timeout in μs for initializing SD Card reader"
default 1000
help
The amount of time allowed to initialize the SD Card reader and/or eMMC drive.
Most only require 1000μs, but certain readers can take 1000000μs.
endif
@@ -123,12 +186,4 @@ config TIANOCORE_USE_8254_TIMER
endif
config TIANOCORE_BOOT_TIMEOUT
int
default 2
help
The length of time in seconds for which the boot splash/menu prompt will be displayed.
For boards with an internal display, the default value of 2s is generally sufficient.
For boards without an internal display, a value of 5s is generally sufficient.
endif

View File

@@ -3,84 +3,112 @@
# force the shell to bash - the edksetup.sh script doesn't work with dash
export SHELL := env bash
project_name=Tianocore
project_dir=$(CURDIR)/tianocore
project_git_repo=https://github.com/mrchromebox/edk2
project_git_branch=uefipayload_202107
upstream_git_repo=https://github.com/tianocore/edk2
build_flavor=-D BOOTLOADER=COREBOOT -D PCIE_BASE=$(CONFIG_ECAM_MMCONF_BASE_ADDRESS) -DPS2_KEYBOARD_ENABLE
project_name = Tianocore
project_dir = $(CURDIR)/$(word 3,$(subst /, ,$(CONFIG_TIANOCORE_REPOSITORY)))
BUILD_STR = -a IA32 -a X64 -t COREBOOT
ifeq ($(CONFIG_TIANOCORE_COREBOOTPAYLOAD),y)
project_git_branch=coreboot_fb
bootloader=CorebootPayloadPkg
BUILD_STR += -p CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc
else
bootloader=UefiPayloadPkg
BUILD_STR += -p UefiPayloadPkg/UefiPayloadPkg.dsc
endif
BUILD_STR += -D BOOTLOADER=COREBOOT -q
#
# EDK II has the following build options relevant to coreboot:
#
#
# OPTION = DEFAULT_VALUE
#
# ABOVE_4G_MEMORY = TRUE
ifneq ($(CONFIG_TIANOCORE_ABOVE_4G_MEMORY),y)
BUILD_STR += -D ABOVE_4G_MEMORY=FALSE
endif
# BOOTSPLASH_IMAGE = FALSE
ifneq ($(CONFIG_TIANOCORE_BOOTSPLASH_FILE),)
BUILD_STR += -D BOOTSPLASH_IMAGE=TRUE
endif
# BOOT_MANAGER_ESCAPE = FALSE
ifeq ($(CONFIG_TIANOCORE_BOOT_MANAGER_ESCAPE),y)
BUILD_STR += -D BOOT_MANAGER_ESCAPE=TRUE
endif
# BUILD_TARGETS = DEBUG
ifeq ($(CONFIG_TIANOCORE_RELEASE),y)
BUILD_STR += -b RELEASE
endif
# FOLLOW_BGRT_SPEC = FALSE
ifeq ($(CONFIG_TIANOCORE_FOLLOW_BGRT_SPEC),y)
BUILD_STR += -D FOLLOW_BGRT_SPEC=TRUE
endif
# PRIORITIZE_INTERNAL = FALSE
ifeq ($(CONFIG_TIANOCORE_PRIORITIZE_INTERNAL),y)
BUILD_STR += -D PRIORITIZE_INTERNAL=TRUE
endif
# PS2_KEYBOARD_ENABLE = FALSE
ifeq ($(CONFIG_TIANOCORE_PS2_SUPPORT),y)
BUILD_STR += -D PS2_KEYBOARD_ENABLE=TRUE
endif
# PLATFORM_BOOT_TIMEOUT = 3
ifneq ($(TIANOCORE_BOOT_TIMEOUT),)
BUILD_STR += -D PLATFORM_BOOT_TIMEOUT=$(CONFIG_TIANOCORE_BOOT_TIMEOUT)
endif
# SIO_BUS_ENABLE = FALSE
ifeq ($(CONFIG_TIANOCORE_PS2_SUPPORT),y)
BUILD_STR += -D SIO_BUS_ENABLE=TRUE
endif
# SHELL_TYPE = BUILD_SHELL
ifneq ($(CONFIG_TIANOCORE_HAVE_EFI_SHELL),y)
BUILD_STR += -D SHELL_TYPE=NONE
endif
# USE_CBMEM_FOR_CONSOLE = FALSE
ifeq ($(CONFIG_TIANOCORE_CBMEM_LOGGING),y)
BUILD_STR += -D USE_CBMEM_FOR_CONSOLE=TRUE
endif
# SD_MMC_TIMEOUT = 1000000
ifneq ($(CONFIG_TIANOCORE_SD_MMC_TIMEOUT),)
BUILD_STR += -D SD_MMC_TIMEOUT=$(CONFIG_TIANOCORE_SD_MMC_TIMEOUT)
endif
#
# The below are legacy options only available in CorebootPayloadPkg:
#
# PCIE_BASE = 0
ifneq ($(CONFIG_ECAM_MMCONF_BASE_ADDRESS),)
BUILD_STR += -D PCIE_BASE=$(CONFIG_ECAM_MMCONF_BASE_ADDRESS)
endif
# USE_HPET_TIMER = FALSE
ifeq ($(CONFIG_TIANOCORE_USE_8254_TIMER),y)
BUILD_STR += -D USE_HPET_TIMER=TRUE
endif
ifeq ($(CONFIG_TIANOCORE_UPSTREAM),y)
TAG=upstream/master
else
TAG=origin/$(project_git_branch)
endif
ifneq ($(CONFIG_TIANOCORE_REVISION_ID),)
TAG=$(CONFIG_TIANOCORE_REVISION_ID)
endif
bootloader = $(word 8,$(subst /, ,$(BUILD_STR)))
export EDK_TOOLS_PATH=$(project_dir)/BaseTools
ifeq ($(CONFIG_TIANOCORE_DEBUG),y)
BUILD_TYPE=DEBUG
else
BUILD_TYPE=RELEASE
endif
ifeq ($(CONFIG_TIANOCORE_CBMEM_LOGGING),y)
CBMEM=-D USE_CBMEM_FOR_CONSOLE=TRUE
endif
ifeq ($(CONFIG_TIANOCORE_ABOVE_4G_MEMORY),y)
4G=-D ABOVE_4G_MEMORY=TRUE
else
4G=-D ABOVE_4G_MEMORY=FALSE
endif
TIMEOUT=-D PLATFORM_BOOT_TIMEOUT=$(CONFIG_TIANOCORE_BOOT_TIMEOUT)
ifneq ($(CONFIG_TIANOCORE_USE_8254_TIMER), y)
TIMER=-DUSE_HPET_TIMER
endif
ifeq ($(CONFIG_TIANOCORE_COREBOOTPAYLOAD),y)
BUILD_STR=-q -a IA32 -a X64 -p CorebootPayloadPkg/CorebootPayloadPkgIa32X64.dsc -t COREBOOT -b $(BUILD_TYPE) $(TIMER) -DPS2_KEYBOARD_ENABLE
else
BUILD_STR=-q -a IA32 -a X64 -p UefiPayloadPkg/UefiPayloadPkg.dsc -t COREBOOT -b $(BUILD_TYPE) $(TIMEOUT) $(build_flavor) $(CBMEM) $(4G)
endif
all: clean build
$(project_dir):
echo " Cloning $(project_name) from Git"
git clone --branch $(project_git_branch) $(project_git_repo) $(project_dir); \
cd $(project_dir); \
git remote add upstream $(upstream_git_repo)
echo " Cloning $(project_name) from $(CONFIG_TIANOCORE_REPOSITORY)"
git clone $(CONFIG_TIANOCORE_REPOSITORY) $(project_dir); \
cd $(project_dir);
update: $(project_dir)
if [ ! -d "$(project_dir)" ]; then \
git clone $(CONFIG_TIANOCORE_REPOSITORY) $(project_dir); \
fi
cd $(project_dir); \
echo " Fetching new commits from the $(project_name) repo"; \
git fetch --multiple origin upstream 2>/dev/null; \
if ! git rev-parse --verify -q $(TAG) >/dev/null; then \
echo " $(TAG) is not a valid git reference"; \
echo " Fetching new commits from $(CONFIG_TIANOCORE_REPOSITORY)"; \
git fetch origin 2>/dev/null; \
if ! git rev-parse --verify -q $(CONFIG_TIANOCORE_TAG_OR_REV) >/dev/null; then \
echo " $(CONFIG_TIANOCORE_TAG_OR_REV) is not a valid git reference"; \
exit 1; \
fi; \
if git status --ignore-submodules=dirty | grep -qv clean; then \
echo " Checking out $(project_name) revision $(TAG)"; \
git checkout --detach $(TAG); \
echo " Checking out $(project_name) revision $(CONFIG_TIANOCORE_TAG_OR_REV)"; \
git checkout --detach $(CONFIG_TIANOCORE_TAG_OR_REV) -f; \
else \
echo " Working directory not clean; will not overwrite"; \
fi; \
git submodule update --init
git submodule update --init --checkout
checktools:
echo "Checking uuid-dev..."
@@ -94,15 +122,15 @@ checktools:
( echo " Not found."; echo "Error: Please install nasm."; exit 1 )
build: update checktools
unset CC; $(MAKE) -C $(project_dir)/BaseTools
echo " build $(project_name) $(TAG)"
unset CC; $(MAKE) -C $(project_dir)/BaseTools 2>&1
echo " build $(project_name) $(CONFIG_TIANOCORE_TAG_OR_REV)"
if [ -n "$(CONFIG_TIANOCORE_BOOTSPLASH_FILE)" ]; then \
echo " Copying custom bootsplash image"; \
case "$(CONFIG_TIANOCORE_BOOTSPLASH_FILE)" in \
/*) cp $(CONFIG_TIANOCORE_BOOTSPLASH_FILE) \
$(project_dir)/MdeModulePkg/Logo/Logo.bmp;; \
*) cp $(top)/$(CONFIG_TIANOCORE_BOOTSPLASH_FILE) \
$(project_dir)/MdeModulePkg/Logo/Logo.bmp;; \
/*) convert $(CONFIG_TIANOCORE_BOOTSPLASH_FILE) \
BMP3:$(project_dir)/MdeModulePkg/Logo/Logo.bmp;; \
*) convert $(top)/$(CONFIG_TIANOCORE_BOOTSPLASH_FILE) \
BMP3:$(project_dir)/MdeModulePkg/Logo/Logo.bmp;; \
esac \
fi; \
cd $(project_dir); \
@@ -114,13 +142,14 @@ build: update checktools
cat ../tools_def.txt >> $(project_dir)/Conf/tools_def.txt; \
fi; \
build $(BUILD_STR); \
mv $(project_dir)/Build/$(bootloader)*/*/FV/UEFIPAYLOAD.fd $(project_dir)/Build/UEFIPAYLOAD.fd; \
mkdir -p $(project_dir)/../output
mv $(project_dir)/Build/$(bootloader)*/*/FV/UEFIPAYLOAD.fd $(project_dir)/../output/UEFIPAYLOAD.fd; \
git checkout MdeModulePkg/Logo/Logo.bmp > /dev/null 2>&1 || true
clean:
test -d $(project_dir) && (cd $(project_dir); rm -rf Build; rm -f Conf/tools_def.txt) || exit 0
distclean:
rm -rf $(project_dir)
rm -rf */
.PHONY: all update checktools config build clean distclean

View File

@@ -42,6 +42,7 @@ libc-$(CONFIG_LP_GPL) += string.c
libgdb-y += gdb.c
libcbfs-$(CONFIG_LP_CBFS) += rom_media.c
libcbfs-$(CONFIG_LP_CBFS) += boot_media.c
# Multiboot support is configurable
libc-$(CONFIG_LP_MULTIBOOT) += multiboot.c

View File

@@ -1,5 +1,6 @@
/* SPDX-License-Identifier: BSD-3-Clause */
#include <arch/virtual.h>
#include <boot_device.h>
#include <commonlib/bsd/cb_err.h>
#include <stddef.h>
@@ -11,7 +12,7 @@ __attribute__((weak)) ssize_t boot_device_read(void *buf, size_t offset, size_t
/* Memory-mapping usually only works for the top 16MB. */
if (!lib_sysinfo.boot_media_size || lib_sysinfo.boot_media_size - offset > 16 * MiB)
return CB_ERR_ARG;
void *ptr = (void *)(uintptr_t)(0 - lib_sysinfo.boot_media_size + offset);
const void *const ptr = phys_to_virt(0 - lib_sysinfo.boot_media_size + offset);
memcpy(buf, ptr, size);
return size;
}

View File

@@ -182,7 +182,7 @@ trygccoption -fno-stack-protector
_CFLAGS="$_CFLAGS -include $BASE/../include/kconfig.h -include $BASE/../include/compiler.h"
_CFLAGS="$_CFLAGS -I`$DEFAULT_CC $_ARCHEXTRA -print-search-dirs | head -n 1 | cut -d' ' -f2`include"
_LDFLAGS="-L$_LIBDIR $_LDSCRIPT -static"
_LDFLAGS="-L$_LIBDIR $_LDSCRIPT -static -Wl,--gc-sections"
if [ $DOLINK -eq 0 ]; then
if [ $DEBUGME -eq 1 ]; then

View File

@@ -164,13 +164,13 @@ static void *do_load(union cbfs_mdata *mdata, ssize_t offset, void *buf, size_t
if (buf) {
if (!size_inout || *size_inout < out_size) {
ERROR("'%s' buffer too small", mdata->h.filename);
ERROR("'%s' buffer too small\n", mdata->h.filename);
return NULL;
}
} else {
buf = malloc(out_size);
if (!buf) {
ERROR("'%s' allocation failure", mdata->h.filename);
ERROR("'%s' allocation failure\n", mdata->h.filename);
return NULL;
}
malloced = true;

View File

@@ -2,6 +2,7 @@
config VBOOT_LIB
bool "Compile verified boot (vboot) library"
default y if CHROMEOS
default n
help
This option enables compiling and building vboot libraries vboot_fw and tlcl.
@@ -16,6 +17,7 @@ config VBOOT_TPM2_MODE
config VBOOT_X86_SHA_EXT
bool "x86 SHA Extension"
default y if CHROMEOS
default n
depends on ARCH_X86
help

View File

@@ -7,7 +7,7 @@ TLCL_LIB = $(VBOOT_BUILD_DIR)/tlcl.a
vboot_fw-objs += $(VBOOT_FW_LIB)
tlcl-objs += $(TLCL_LIB)
kconfig-to-binary=$(if $(1),1,0)
kconfig-to-binary=$(if $(strip $(1)),1,0)
vboot-fixup-includes = $(patsubst -I%,-I$(top)/%,\
$(patsubst include/%.h,$(top)/include/%.h,\
$(filter-out -I$(obj),$(1))))
@@ -30,14 +30,14 @@ endif
$(VBOOT_FW_LIB): $(obj)/libpayload-config.h
@printf " MAKE $(subst $(obj)/,,$(@))\n"
+$(Q) FIRMWARE_ARCH=$(VBOOT_FIRMWARE_ARCH-y) \
CC=$(CC) \
+$(Q) FIRMWARE_ARCH="$(VBOOT_FIRMWARE_ARCH-y)" \
CC="$(CC)" \
CFLAGS="$(VBOOT_CFLAGS)" \
$(MAKE) -C "$(VBOOT_SOURCE)" \
TPM2_MODE=$(call kconfig-to-binary, $(CONFIG_LP_VBOOT_TPM2_MODE)) \
X86_SHA_EXT=$(call kconfig-to-binary, $(CONFIG_LP_VBOOT_X86_SHA_EXT)) \
UNROLL_LOOPS=1 \
BUILD=$(VBOOT_BUILD_DIR) \
BUILD="$(VBOOT_BUILD_DIR)" \
V=$(V) \
$(VBOOT_BUILD_DIR)/vboot_fw.a tlcl

View File

@@ -339,6 +339,18 @@
"ranksPerChannel": 2,
"speedMbps": 4267
}
},
{
"name": "MT53E2G32D4NQ-046 WT:C",
"attribs": {
"densityPerChannelGb": 16,
"banks": 8,
"channelsPerDie": 2,
"diesPerPackage": 2,
"bitWidthPerChannel": 16,
"ranksPerChannel": 2,
"speedMbps": 4267
}
}
]
}

View File

@@ -29,3 +29,4 @@ H54G46CYRBX267,spd-1.hex
H54G56CYRBX247,spd-3.hex
K4U6E3S4AB-MGCL,spd-1.hex
K4UBE3D4AB-MGCL,spd-3.hex
MT53E2G32D4NQ-046 WT:C,spd-7.hex

View File

@@ -29,3 +29,4 @@ H54G46CYRBX267,spd-1.hex
H54G56CYRBX247,spd-3.hex
K4U6E3S4AB-MGCL,spd-1.hex
K4UBE3D4AB-MGCL,spd-3.hex
MT53E2G32D4NQ-046 WT:C,spd-10.hex

View File

@@ -878,7 +878,7 @@ config GDB_STUB
depends on DRIVERS_UART
help
If enabled, you will be able to set breakpoints for gdb debugging.
See src/arch/x86/lib/c_start.S for details.
See src/arch/x86/c_start.S for details.
config GDB_WAIT
bool "Wait for a GDB connection in the ramstage"

View File

@@ -18,6 +18,8 @@
#include <acpi/acpi.h>
#include <acpi/acpi_ivrs.h>
#include <acpi/acpigen.h>
#include <arch/hpet.h>
#include <arch/mmio.h>
#include <device/pci.h>
#include <cbmem.h>
#include <commonlib/helpers.h>
@@ -847,10 +849,10 @@ void acpi_create_hpet(acpi_hpet_t *hpet)
addr->space_id = ACPI_ADDRESS_SPACE_MEMORY;
addr->bit_width = 64;
addr->bit_offset = 0;
addr->addrl = CONFIG_HPET_ADDRESS & 0xffffffff;
addr->addrh = ((unsigned long long)CONFIG_HPET_ADDRESS) >> 32;
addr->addrl = HPET_BASE_ADDRESS & 0xffffffff;
addr->addrh = ((unsigned long long)HPET_BASE_ADDRESS) >> 32;
hpet->id = *(unsigned int *)CONFIG_HPET_ADDRESS;
hpet->id = read32p(HPET_BASE_ADDRESS);
hpet->number = 0;
hpet->min_tick = CONFIG_HPET_MIN_TICKS;
@@ -1507,6 +1509,7 @@ void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt)
memcpy(header->asl_compiler_id, ASLC, 4);
header->asl_compiler_revision = asl_revision;
fadt->FADT_MinorVersion = get_acpi_fadt_minor_version();
fadt->firmware_ctrl = (unsigned long) facs;
fadt->x_firmware_ctl_l = (unsigned long)facs;
fadt->x_firmware_ctl_h = 0;
@@ -1944,11 +1947,16 @@ __weak int acpi_get_gpe(int gpe)
return -1; /* implemented by SOC */
}
u8 get_acpi_fadt_minor_version(void)
{
return ACPI_FADT_MINOR_VERSION_0;
}
int get_acpi_table_revision(enum acpi_tables table)
{
switch (table) {
case FADT:
return ACPI_FADT_REV_ACPI_6_0;
return ACPI_FADT_REV_ACPI_6;
case MADT: /* ACPI 3.0: 2, ACPI 4.0/5.0: 3, ACPI 6.2b/6.3: 5 */
return 3;
case MCFG:

View File

@@ -406,8 +406,7 @@ void acpigen_write_processor(u8 cpuindex, u32 pblock_addr, u8 pblock_len)
acpigen_emit_byte(pblock_len);
}
void acpigen_write_processor_package(const char *const name,
const unsigned int first_core,
void acpigen_write_processor_package(const char *const name, const unsigned int first_core,
const unsigned int core_count)
{
unsigned int i;
@@ -430,8 +429,7 @@ void acpigen_write_processor_cnot(const unsigned int number_of_cores)
acpigen_write_method("\\_SB.CNOT", 1);
for (core_id = 0; core_id < number_of_cores; core_id++) {
char buffer[DEVICE_PATH_MAX];
snprintf(buffer, sizeof(buffer), CONFIG_ACPI_CPU_STRING,
core_id);
snprintf(buffer, sizeof(buffer), CONFIG_ACPI_CPU_STRING, core_id);
acpigen_emit_byte(NOTIFY_OP);
acpigen_emit_namestring(buffer);
acpigen_emit_byte(ARG0_OP);
@@ -514,22 +512,19 @@ static void acpigen_write_field_length(uint32_t len)
acpigen_emit_byte(emit[j]);
}
static void acpigen_write_field_offset(uint32_t offset,
uint32_t current_bit_pos)
static void acpigen_write_field_offset(uint32_t offset, uint32_t current_bit_pos)
{
uint32_t diff_bits;
if (offset < current_bit_pos) {
printk(BIOS_WARNING, "%s: Cannot move offset backward",
__func__);
printk(BIOS_WARNING, "%s: Cannot move offset backward", __func__);
return;
}
diff_bits = offset - current_bit_pos;
/* Upper limit */
if (diff_bits > 0xFFFFFFF) {
printk(BIOS_WARNING, "%s: Offset very large to encode",
__func__);
printk(BIOS_WARNING, "%s: Offset very large to encode", __func__);
return;
}
@@ -601,8 +596,7 @@ void acpigen_write_field(const char *name, const struct fieldlist *l, size_t cou
current_bit_pos = l[i].bits;
break;
default:
printk(BIOS_ERR, "%s: Invalid field type 0x%X\n"
, __func__, l[i].type);
printk(BIOS_ERR, "%s: Invalid field type 0x%X\n", __func__, l[i].type);
break;
}
}
@@ -630,8 +624,8 @@ void acpigen_write_field(const char *name, const struct fieldlist *l, size_t cou
* PMCS, 2
* }
*/
void acpigen_write_indexfield(const char *idx, const char *data,
struct fieldlist *l, size_t count, uint8_t flags)
void acpigen_write_indexfield(const char *idx, const char *data, struct fieldlist *l,
size_t count, uint8_t flags)
{
uint16_t i;
uint32_t current_bit_pos = 0;
@@ -658,8 +652,7 @@ void acpigen_write_indexfield(const char *idx, const char *data,
current_bit_pos = l[i].bits;
break;
default:
printk(BIOS_ERR, "%s: Invalid field type 0x%X\n"
, __func__, l[i].type);
printk(BIOS_ERR, "%s: Invalid field type 0x%X\n", __func__, l[i].type);
break;
}
}
@@ -945,8 +938,8 @@ void acpigen_write_PRW(u32 wake, u32 level)
acpigen_pop_len();
}
void acpigen_write_PSS_package(u32 coreFreq, u32 power, u32 transLat,
u32 busmLat, u32 control, u32 status)
void acpigen_write_PSS_package(u32 coreFreq, u32 power, u32 transLat, u32 busmLat, u32 control,
u32 status)
{
acpigen_write_package(6);
acpigen_write_dword(coreFreq);
@@ -957,8 +950,8 @@ void acpigen_write_PSS_package(u32 coreFreq, u32 power, u32 transLat,
acpigen_write_dword(status);
acpigen_pop_len();
printk(BIOS_DEBUG, "PSS: %uMHz power %u control 0x%x status 0x%x\n",
coreFreq, power, control, status);
printk(BIOS_DEBUG, "PSS: %uMHz power %u control 0x%x status 0x%x\n", coreFreq, power,
control, status);
}
void acpigen_write_pss_object(const struct acpi_sw_pstate *pstate_values, size_t nentries)
@@ -1193,14 +1186,12 @@ void acpigen_write_resourcetemplate_footer(void)
acpigen_pop_len();
}
static void acpigen_add_mainboard_rsvd_mem32(void *gp, struct device *dev,
struct resource *res)
static void acpigen_add_mainboard_rsvd_mem32(void *gp, struct device *dev, struct resource *res)
{
acpigen_write_mem32fixed(0, res->base, res->size);
}
static void acpigen_add_mainboard_rsvd_io(void *gp, struct device *dev,
struct resource *res)
static void acpigen_add_mainboard_rsvd_io(void *gp, struct device *dev, struct resource *res)
{
resource_t base = res->base;
resource_t size = res->size;
@@ -1219,13 +1210,13 @@ void acpigen_write_mainboard_resource_template(void)
/* Add reserved memory ranges. */
search_global_resources(
IORESOURCE_MEM | IORESOURCE_RESERVE,
IORESOURCE_MEM | IORESOURCE_RESERVE,
IORESOURCE_MEM | IORESOURCE_RESERVE,
acpigen_add_mainboard_rsvd_mem32, 0);
/* Add reserved io ranges. */
search_global_resources(
IORESOURCE_IO | IORESOURCE_RESERVE,
IORESOURCE_IO | IORESOURCE_RESERVE,
IORESOURCE_IO | IORESOURCE_RESERVE,
acpigen_add_mainboard_rsvd_io, 0);
acpigen_write_resourcetemplate_footer();
@@ -1635,8 +1626,7 @@ void acpigen_write_pld(const struct acpi_pld *pld)
acpigen_pop_len();
}
void acpigen_write_dsm(const char *uuid, void (**callbacks)(void *),
size_t count, void *arg)
void acpigen_write_dsm(const char *uuid, void (**callbacks)(void *), size_t count, void *arg)
{
struct dsm_uuid id = DSM_UUID(uuid, callbacks, count, arg);
acpigen_write_dsm_uuid_arr(&id, 1);
@@ -1783,8 +1773,7 @@ void acpigen_write_CPPC_package(const struct cppc_config *config)
max = CPPC_MAX_FIELDS_VER_3;
break;
default:
printk(BIOS_ERR, "CPPC version %u is not implemented\n",
config->version);
printk(BIOS_ERR, "CPPC version %u is not implemented\n", config->version);
return;
}
acpigen_write_name(CPPC_PACKAGE_NAME);
@@ -1885,8 +1874,7 @@ void acpigen_write_rom(void *bios, const size_t length)
acpigen_write_method_serialized("_ROM", 2);
/* OperationRegion("ROMS", SYSTEMMEMORY, current, length) */
struct opregion opreg = OPREGION("ROMS", SYSTEMMEMORY,
(uintptr_t)bios, length);
struct opregion opreg = OPREGION("ROMS", SYSTEMMEMORY, (uintptr_t)bios, length);
acpigen_write_opregion(&opreg);
struct fieldlist l[] = {
@@ -1899,8 +1887,7 @@ void acpigen_write_rom(void *bios, const size_t length)
* Offset (0),
* RBF0, 0x80000
* } */
acpigen_write_field(opreg.name, l, 2, FIELD_ANYACC |
FIELD_NOLOCK | FIELD_PRESERVE);
acpigen_write_field(opreg.name, l, 2, FIELD_ANYACC | FIELD_NOLOCK | FIELD_PRESERVE);
/* Store (Arg0, Local0) */
acpigen_write_store();
@@ -2058,8 +2045,8 @@ void acpigen_get_tx_gpio(const struct acpi_gpio *gpio)
}
/* refer to ACPI 6.4.3.5.3 Word Address Space Descriptor section for details */
void acpigen_resource_word(u16 res_type, u16 gen_flags, u16 type_flags, u16 gran,
u16 range_min, u16 range_max, u16 translation, u16 length)
void acpigen_resource_word(u16 res_type, u16 gen_flags, u16 type_flags, u16 gran, u16 range_min,
u16 range_max, u16 translation, u16 length)
{
acpigen_emit_byte(0x88);
/* Byte 1+2: length (0x000d) */
@@ -2081,8 +2068,8 @@ void acpigen_resource_word(u16 res_type, u16 gen_flags, u16 type_flags, u16 gran
}
/* refer to ACPI 6.4.3.5.2 DWord Address Space Descriptor section for details */
void acpigen_resource_dword(u16 res_type, u16 gen_flags, u16 type_flags,
u32 gran, u32 range_min, u32 range_max, u32 translation, u32 length)
void acpigen_resource_dword(u16 res_type, u16 gen_flags, u16 type_flags, u32 gran,
u32 range_min, u32 range_max, u32 translation, u32 length)
{
acpigen_emit_byte(0x87);
/* Byte 1+2: length (0023) */
@@ -2110,8 +2097,8 @@ static void acpigen_emit_qword(u64 data)
}
/* refer to ACPI 6.4.3.5.1 QWord Address Space Descriptor section for details */
void acpigen_resource_qword(u16 res_type, u16 gen_flags, u16 type_flags,
u64 gran, u64 range_min, u64 range_max, u64 translation, u64 length)
void acpigen_resource_qword(u16 res_type, u16 gen_flags, u16 type_flags, u64 gran,
u64 range_min, u64 range_max, u64 translation, u64 length)
{
acpigen_emit_byte(0x8a);
/* Byte 1+2: length (0x002b) */

View File

@@ -55,6 +55,7 @@ static const uint32_t action_keymaps[] = {
KEY_PRIVACY_SCREEN_TOGGLE),
[PS2_KEY_MICMUTE] = KEYMAP(0x9b, KEY_MICMUTE), /* e01b */
[PS2_KEY_KBD_BKLIGHT_TOGGLE] = KEYMAP(0x9e, KEY_KBDILLUMTOGGLE), /* e01e */
[PS2_KEY_MENU] = KEYMAP(0xdd, KEY_CONTROLPANEL), /* e0d5 */
};
/* Keymap for numeric keypad keys */

View File

@@ -191,12 +191,8 @@ config CMOS_DEFAULT_FILE
default "src/mainboard/\$(MAINBOARDDIR)/cmos.default"
depends on HAVE_CMOS_DEFAULT
config HPET_ADDRESS_OVERRIDE
def_bool n
config HPET_ADDRESS
config HPET_MIN_TICKS
hex
default 0xfed00000 if !HPET_ADDRESS_OVERRIDE
config C_ENV_BOOTBLOCK_SIZE
hex

View File

@@ -0,0 +1,8 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef ARCH_X86_HPET_H
#define ARCH_X86_HPET_H
#define HPET_BASE_ADDRESS 0xfed00000
#endif /* ARCH_X86_HPET_H */

View File

@@ -67,7 +67,7 @@ union log_state {
};
};
#define LOG_FAST(state) (HAS_ONLY_FAST_CONSOLES || ((state).level == CONSOLE_LOG_FAST))
#define LOG_FAST(state) (HAS_ONLY_FAST_CONSOLES || ((state).speed == CONSOLE_LOG_FAST))
static void wrap_interactive_printf(const char *fmt, ...)
{

View File

@@ -1,5 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <arch/hpet.h>
#include <cpu/x86/mtrr.h>
#include <cpu/amd/msr.h>
#include <cpu/amd/mtrr.h>
@@ -28,7 +29,7 @@ void amd_initcpuio(void)
PciData |= 1 << 7; // set NP (non-posted) bit
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
PciAddress.AddressValue = MAKE_SBDFO(0, 0, 0x18, 1, 0x80);
PciData = (0xFED00000 >> 8) | 3; // lowest NP address is HPET at FED00000
PciData = (HPET_BASE_ADDRESS >> 8) | 3; // lowest NP address is HPET at FED00000
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
/* Map the remaining PCI hole as posted MMIO */

View File

@@ -1,5 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <arch/hpet.h>
#include <cpu/x86/mtrr.h>
#include <cpu/amd/msr.h>
#include <cpu/amd/mtrr.h>
@@ -28,7 +29,7 @@ void amd_initcpuio(void)
PciData |= 1 << 7; /* set NP (non-posted) bit */
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
PciAddress.AddressValue = MAKE_SBDFO(0, 0, 0x18, 1, 0x80);
PciData = (0xFED00000 >> 8) | 3; /* lowest NP address is HPET at FED00000 */
PciData = (HPET_BASE_ADDRESS >> 8) | 3; /* lowest NP address is HPET at FED00000 */
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
/* Map the remaining PCI hole as posted MMIO */

View File

@@ -1,5 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <arch/hpet.h>
#include <cpu/x86/mtrr.h>
#include <cpu/amd/msr.h>
#include <cpu/amd/mtrr.h>
@@ -28,7 +29,7 @@ void amd_initcpuio(void)
PciData |= 1 << 7; /* set NP (non-posted) bit */
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
PciAddress.AddressValue = MAKE_SBDFO (0, 0, 0x18, 1, 0x80);
PciData = (0xFED00000 >> 8) | 3; /* lowest NP address is HPET at FED00000 */
PciData = (HPET_BASE_ADDRESS >> 8) | 3; /* lowest NP address is HPET at FED00000 */
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
/* Map the remaining PCI hole as posted MMIO */

View File

@@ -1,5 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <arch/hpet.h>
#include <cpu/x86/mtrr.h>
#include <cpu/amd/msr.h>
#include <cpu/amd/mtrr.h>
@@ -32,7 +33,7 @@ void amd_initcpuio(void)
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
PciAddress.AddressValue = MAKE_SBDFO(0, 0, 0x18, 1, 0x80);
/* lowest NP address is HPET at FED00000 */
PciData = (0xFED00000 >> 8) | 3;
PciData = (HPET_BASE_ADDRESS >> 8) | 3;
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
/* Map the remaining PCI hole as posted MMIO */

View File

@@ -20,6 +20,7 @@
#define MSR_MISC_PWR_MGMT 0x1aa
#define MISC_PWR_MGMT_EIST_HW_DIS (1 << 0)
#define MSR_TURBO_POWER_CURRENT_LIMIT 0x1ac
#define MSR_TURBO_RATIO_LIMIT 0x1ad
#define MSR_POWER_CTL 0x1fc

View File

@@ -527,14 +527,6 @@ config AZALIA_PLUGIN_SUPPORT
bool
default n
config AZALIA_MAX_CODECS
int
depends on AZALIA_PLUGIN_SUPPORT
default 3
range 1 15
help
The maximum number of codecs supported on a single HD Audio controller.
config AZALIA_LOCK_DOWN_R_WO_GCAP
def_bool n
depends on AZALIA_PLUGIN_SUPPORT

View File

@@ -50,7 +50,6 @@ int azalia_exit_reset(u8 *base)
static u16 codec_detect(u8 *base)
{
struct stopwatch sw;
const u16 codec_mask = (1 << CONFIG_AZALIA_MAX_CODECS) - 1;
u16 reg16;
if (azalia_exit_reset(base) < 0)
@@ -61,9 +60,9 @@ static u16 codec_detect(u8 *base)
write16(base + HDA_GCAP_REG, read16(base + HDA_GCAP_REG));
}
/* clear STATESTS bits (BAR + 0xe)[2:0] */
/* clear STATESTS bits (BAR + 0x0e)[14:0] */
reg16 = read16(base + HDA_STATESTS_REG);
reg16 |= codec_mask;
reg16 |= 0x7fff;
write16(base + HDA_STATESTS_REG, reg16);
/* Wait for readback of register to
@@ -86,9 +85,9 @@ static u16 codec_detect(u8 *base)
if (azalia_exit_reset(base) < 0)
goto no_codec;
/* Read in Codec location (BAR + 0xe)[2..0] */
/* Read in Codec location (BAR + 0x0e)[14:0] */
reg16 = read16(base + HDA_STATESTS_REG);
reg16 &= codec_mask;
reg16 &= 0x7fff;
if (!reg16)
goto no_codec;
@@ -274,7 +273,7 @@ void azalia_codecs_init(u8 *base, u16 codec_mask)
{
int i;
for (i = CONFIG_AZALIA_MAX_CODECS - 1; i >= 0; i--) {
for (i = 14; i >= 0; i--) {
if (codec_mask & (1 << i))
azalia_codec_init(base, i, cim_verb_data, cim_verb_data_size);
}

View File

@@ -441,13 +441,14 @@ static int cr50_i2c_probe(struct tpm_chip *chip, uint32_t *did_vid)
int retries;
/*
* 200 ms should be enough to synchronize with the TPM even under the
* 1s should be enough to synchronize with the TPM even under the
* worst nested reset request conditions. In vast majority of cases
* there would be no wait at all.
* there would be no wait at all. If this probe fails, boot likely
* cannot proceed, so an extra long timeout is appropriate.
*/
printk(BIOS_INFO, "Probing TPM I2C: ");
for (retries = 20; retries > 0; retries--) {
for (retries = 100; retries > 0; retries--) {
int rc;
rc = cr50_i2c_read(TPM_DID_VID(0), (uint8_t *)did_vid, 4);

View File

@@ -310,7 +310,7 @@ config FSPS_USE_MULTI_PHASE_INIT
SoC users to select this Kconfig to set EnableMultiPhaseSiliconInit to enable and
execute FspMultiPhaseSiInit() API.
config SKIP_FSP_NOTIFY_PHASE_AFTER_PCI_ENUM
config USE_FSP_NOTIFY_PHASE_POST_PCI_ENUM
bool
help
The FSP API is used to notify the FSP about different phases in the boot process.
@@ -318,12 +318,28 @@ config SKIP_FSP_NOTIFY_PHASE_AFTER_PCI_ENUM
- Post PCI enumeration
- Ready to Boot
- End of Firmware
Select this on a platform where you want to skip calling FSP Notify
`Post PCI enumeration` API. Instead use coreboot native implementations
This option allows FSP to execute Notify Phase API (Post PCI enumeration).
SoC users can override this config to use coreboot native implementations
to perform the required lock down and chipset register configuration prior
to executing any 3rd-party code during PCI enumeration (i.e. Option ROM).
coreboot native implementation to skip FSP Notify Phase (Post PCI enumeration)
is still WIP.
config USE_FSP_NOTIFY_PHASE_READY_TO_BOOT
bool
help
The FSP API is used to notify the FSP about different phases in the boot process.
The current FSP specification supports three notify phases:
- Post PCI enumeration
- Ready to Boot
- End of Firmware
This option allows FSP to execute Notify Phase API (Ready to Boot).
SoC users can override this config to use coreboot native implementations
to perform the required lock down and chipset register configuration prior
boot to payload.
config SKIP_FSP_NOTIFY_PHASE_READY_TO_BOOT
config USE_FSP_NOTIFY_PHASE_END_OF_FIRMWARE
bool
help
The FSP API is used to notify the FSP about different phases in the boot process.
@@ -331,20 +347,9 @@ config SKIP_FSP_NOTIFY_PHASE_READY_TO_BOOT
- Post PCI enumeration
- Ready to Boot
- End of Firmware
Select this on a platform where you want to skip calling FSP Notify `Ready to Boot`
API. Instead use coreboot native implementations to perform the required lock down
and chipset register configuration prior boot to payload.
config SKIP_FSP_NOTIFY_PHASE_END_OF_FIRMWARE
bool
help
The FSP API is used to notify the FSP about different phases in the boot process.
The current FSP specification supports three notify phases:
- Post PCI enumeration
- Ready to Boot
- End of Firmware
Select this on a platform where you want to skip calling FSP Notify `End of Firmware`
API. Instead use coreboot native implementations to perform the required lock down
and chipset register configuration prior boot to payload.
This option allows FSP to execute Notify Phase API (End of Firmware).
SoC users can override this config to use coreboot native implementations
to perform the required lock down and chipset register configuration prior
boot to payload.
endif

View File

@@ -286,7 +286,6 @@ void fsp_display_fvi_version_hob(void)
{
const uint8_t *hob_uuid;
const struct hob_header *hob = fsp_get_hob_list();
size_t size;
if (!hob)
return;
@@ -300,7 +299,6 @@ void fsp_display_fvi_version_hob(void)
hob_uuid = hob_header_to_struct(hob);
if (fsp_guid_compare(hob_uuid, uuid_fv_info)) {
size = hob->length - (HOB_HEADER_LEN + 16);
display_fsp_version_info_hob(hob);
}
}

View File

@@ -20,7 +20,7 @@ struct fsp_notify_phase_data {
static const struct fsp_notify_phase_data notify_data[] = {
{
.notify_phase = AFTER_PCI_ENUM,
.skip = CONFIG(SKIP_FSP_NOTIFY_PHASE_AFTER_PCI_ENUM),
.skip = !CONFIG(USE_FSP_NOTIFY_PHASE_POST_PCI_ENUM),
.post_code_before = POST_FSP_NOTIFY_BEFORE_ENUMERATE,
.post_code_after = POST_FSP_NOTIFY_AFTER_ENUMERATE,
.timestamp_before = TS_FSP_BEFORE_ENUMERATE,
@@ -28,7 +28,7 @@ static const struct fsp_notify_phase_data notify_data[] = {
},
{
.notify_phase = READY_TO_BOOT,
.skip = CONFIG(SKIP_FSP_NOTIFY_PHASE_READY_TO_BOOT),
.skip = !CONFIG(USE_FSP_NOTIFY_PHASE_READY_TO_BOOT),
.post_code_before = POST_FSP_NOTIFY_BEFORE_FINALIZE,
.post_code_after = POST_FSP_NOTIFY_AFTER_FINALIZE,
.timestamp_before = TS_FSP_BEFORE_FINALIZE,
@@ -36,7 +36,7 @@ static const struct fsp_notify_phase_data notify_data[] = {
},
{
.notify_phase = END_OF_FIRMWARE,
.skip = CONFIG(SKIP_FSP_NOTIFY_PHASE_END_OF_FIRMWARE),
.skip = !CONFIG(USE_FSP_NOTIFY_PHASE_END_OF_FIRMWARE),
.post_code_before = POST_FSP_NOTIFY_BEFORE_END_OF_FIRMWARE,
.post_code_after = POST_FSP_NOTIFY_AFTER_END_OF_FIRMWARE,
.timestamp_before = TS_FSP_BEFORE_END_OF_FIRMWARE,

View File

@@ -138,7 +138,8 @@ static void camera_fill_cio2(const struct device *dev)
port_name[i] = strdup(name);
if (CONFIG(ACPI_ADL_IPU_ES_SUPPORT)) {
u32 cpu_id = cpu_get_cpuid();
if (cpu_id == CPUID_ALDERLAKE_A0 || cpu_id == CPUID_ALDERLAKE_A1)
if (cpu_id == CPUID_ALDERLAKE_A0 || cpu_id == CPUID_ALDERLAKE_A1 ||
cpu_id == CPUID_ALDERLAKE_N_A0)
acpi_dp_add_integer(dsd, "is_es", 1);
else
acpi_dp_add_integer(dsd, "is_es", 0);

View File

@@ -67,7 +67,7 @@ static void conn_write_cbmem_entry(struct device *dev)
port_info->sbu_orientation = config->sbu_orientation;
port_info->data_orientation = config->hsl_orientation;
printk(BIOS_INFO, "added type-c port%ld info to cbmem: usb2:%d usb3:%d sbu:%d data:%d\n",
printk(BIOS_INFO, "added type-c port%zu info to cbmem: usb2:%d usb3:%d sbu:%d data:%d\n",
count, port_info->usb2_port_number, port_info->usb3_port_number,
port_info->sbu_orientation, port_info->data_orientation);

View File

@@ -255,7 +255,7 @@ static int mrc_cache_get_latest_slot_info(const char *name,
/* No data to return. */
if (region_file_data(cache_file, rdev) < 0) {
printk(BIOS_ERR, "MRC: no data in '%s'\n", name);
printk(BIOS_NOTICE, "MRC: no data in '%s'\n", name);
return fail_bad_data ? -1 : 0;
}

View File

@@ -185,9 +185,10 @@ static void fill_ssdt_typec_device(const struct device *dev)
get_pld_from_usb_ports(&pld, usb2_port, usb3_port, usb4_port);
struct typec_connector_class_config typec_config = {
.power_role = port_caps.power_role_cap,
.try_power_role = port_caps.try_power_role_cap,
.data_role = port_caps.data_role_cap,
.power_role = (enum usb_typec_power_role)port_caps.power_role_cap,
.try_power_role =
(enum usb_typec_try_power_role)port_caps.try_power_role_cap,
.data_role = (enum usb_typec_data_role)port_caps.data_role_cap,
.usb2_port = usb2_port,
.usb3_port = usb3_port,
.usb4_port = usb4_port,
@@ -225,6 +226,7 @@ static const enum ps2_action_key ps2_enum_val[] = {
[TK_PREV_TRACK] = PS2_KEY_PREV_TRACK,
[TK_KBD_BKLIGHT_TOGGLE] = PS2_KEY_KBD_BKLIGHT_TOGGLE,
[TK_MICMUTE] = PS2_KEY_MICMUTE,
[TK_MENU] = PS2_KEY_MENU,
};
static void fill_ssdt_ps2_keyboard(const struct device *dev)

View File

@@ -177,7 +177,7 @@ extern "C" {
#define EC_MEMMAP_ACC_STATUS_PRESENCE_BIT BIT(7)
/* Number of temp sensors at EC_MEMMAP_TEMP_SENSOR */
#define EC_TEMP_SENSOR_ENTRIES 16
#define EC_TEMP_SENSOR_ENTRIES 16
/*
* Number of temp sensors at EC_MEMMAP_TEMP_SENSOR_B.
*
@@ -185,6 +185,10 @@ extern "C" {
*/
#define EC_TEMP_SENSOR_B_ENTRIES 8
/* Max temp sensor entries for host commands */
#define EC_MAX_TEMP_SENSOR_ENTRIES (EC_TEMP_SENSOR_ENTRIES + \
EC_TEMP_SENSOR_B_ENTRIES)
/* Special values for mapped temperature sensors */
#define EC_TEMP_SENSOR_NOT_PRESENT 0xff
#define EC_TEMP_SENSOR_ERROR 0xfe
@@ -1499,6 +1503,10 @@ enum ec_feature_code {
* mux.
*/
EC_FEATURE_TYPEC_MUX_REQUIRE_AP_ACK = 43,
/*
* The EC supports entering and residing in S4.
*/
EC_FEATURE_S4_RESIDENCY = 44,
};
#define EC_FEATURE_MASK_0(event_code) BIT(event_code % 32)
@@ -1765,6 +1773,8 @@ struct ec_params_flash_erase_v1 {
#define EC_FLASH_PROTECT_ROLLBACK_AT_BOOT BIT(9)
/* Rollback information flash region protected now */
#define EC_FLASH_PROTECT_ROLLBACK_NOW BIT(10)
/* Error - Unknown error */
#define EC_FLASH_PROTECT_ERROR_UNKNOWN BIT(11)
/**
@@ -2706,6 +2716,8 @@ enum motionsensor_chip {
MOTIONSENSE_CHIP_ICM42607 = 26,
MOTIONSENSE_CHIP_BMA422 = 27,
MOTIONSENSE_CHIP_BMI323 = 28,
MOTIONSENSE_CHIP_BMI220 = 29,
MOTIONSENSE_CHIP_CM32183 = 30,
MOTIONSENSE_CHIP_MAX,
};
@@ -2856,7 +2868,7 @@ struct ec_params_motion_sense {
*/
struct __ec_todo_unpacked {
/* Data to set or EC_MOTION_SENSE_NO_VALUE to read.
* kb_wake_angle: angle to wake up AP.
* kb_wake_angle: angle to wakup AP.
*/
int16_t data;
} kb_wake_angle;
@@ -6051,7 +6063,10 @@ struct ec_params_set_cbi {
* - The semantic meaning of an entry should not change.
* - Do not exceed 2^15 - 1 for reset reasons or 2^16 - 1 for shutdown reasons.
*/
enum chipset_reset_reason {
enum chipset_shutdown_reason {
/*
* Beginning of reset reasons.
*/
CHIPSET_RESET_BEGIN = 0,
CHIPSET_RESET_UNKNOWN = CHIPSET_RESET_BEGIN,
/* Custom reason defined by a board.c or baseboard.c file */
@@ -6075,13 +6090,11 @@ enum chipset_reset_reason {
/* EC detected an AP watchdog event. */
CHIPSET_RESET_AP_WATCHDOG,
CHIPSET_RESET_COUNT,
};
CHIPSET_RESET_COUNT, /* End of reset reasons. */
/*
* AP hard shutdowns are logged on the same path as resets.
*/
enum chipset_shutdown_reason {
/*
* Beginning of shutdown reasons.
*/
CHIPSET_SHUTDOWN_BEGIN = BIT(15),
CHIPSET_SHUTDOWN_POWERFAIL = CHIPSET_SHUTDOWN_BEGIN,
/* Forcing a shutdown as part of EC initialization */
@@ -6103,7 +6116,7 @@ enum chipset_shutdown_reason {
/* Force a chipset shutdown from the power button through EC */
CHIPSET_SHUTDOWN_BUTTON,
CHIPSET_SHUTDOWN_COUNT,
CHIPSET_SHUTDOWN_COUNT, /* End of shutdown reasons. */
};
@@ -6410,6 +6423,7 @@ enum action_key {
TK_PREV_TRACK = 17,
TK_KBD_BKLIGHT_TOGGLE = 18,
TK_MICMUTE = 19,
TK_MENU = 20,
};
/*
@@ -6619,6 +6633,7 @@ enum typec_control_command {
TYPEC_CONTROL_COMMAND_EXIT_MODES,
TYPEC_CONTROL_COMMAND_CLEAR_EVENTS,
TYPEC_CONTROL_COMMAND_ENTER_MODE,
TYPEC_CONTROL_COMMAND_TBT_UFP_REPLY,
};
/* Modes (USB or alternate) that a type-C port may enter. */
@@ -6628,6 +6643,12 @@ enum typec_mode {
TYPEC_MODE_USB4,
};
/* Replies the AP may specify to the TBT EnterMode command as a UFP */
enum typec_tbt_ufp_reply {
TYPEC_TBT_UFP_REPLY_NAK,
TYPEC_TBT_UFP_REPLY_ACK,
};
struct ec_params_typec_control {
uint8_t port;
uint8_t command; /* enum typec_control_command */
@@ -6639,8 +6660,12 @@ struct ec_params_typec_control {
* the command version when adding new sub-commands.
*/
union {
/* Used for CLEAR_EVENTS */
uint32_t clear_events_mask;
uint8_t mode_to_enter; /* enum typec_mode */
/* Used for ENTER_MODE - enum typec_mode */
uint8_t mode_to_enter;
/* Used for TBT_UFP_REPLY - enum typec_tbt_ufp_reply */
uint8_t tbt_ufp_reply;
uint8_t placeholder[128];
};
} __ec_align1;
@@ -6932,8 +6957,9 @@ enum pchg_state {
/* Port number is encoded in bit[28:31]. */
#define EC_MKBP_PCHG_PORT_SHIFT 28
/* Utility macro for converting MKBP event to port number. */
/* Utility macros for converting MKBP event <-> port number. */
#define EC_MKBP_PCHG_EVENT_TO_PORT(e) (((e) >> EC_MKBP_PCHG_PORT_SHIFT) & 0xf)
#define EC_MKBP_PCHG_PORT_TO_EVENT(p) (BIT((p) + EC_MKBP_PCHG_PORT_SHIFT))
/* Utility macro for extracting event bits. */
#define EC_MKBP_PCHG_EVENT_MASK(e) ((e) \
& GENMASK(EC_MKBP_PCHG_PORT_SHIFT-1, 0))
@@ -6942,6 +6968,7 @@ enum pchg_state {
#define EC_MKBP_PCHG_WRITE_COMPLETE BIT(1)
#define EC_MKBP_PCHG_UPDATE_CLOSED BIT(2)
#define EC_MKBP_PCHG_UPDATE_ERROR BIT(3)
#define EC_MKBP_PCHG_DEVICE_EVENT BIT(4)
enum ec_pchg_update_cmd {
/* Reset chip to normal mode. */
@@ -7006,6 +7033,31 @@ enum ec_set_base_state_cmd {
EC_SET_BASE_STATE_RESET,
};
#define EC_CMD_I2C_CONTROL 0x0139
/* Subcommands for I2C control */
enum ec_i2c_control_command {
EC_I2C_CONTROL_GET_SPEED,
EC_I2C_CONTROL_SET_SPEED,
};
#define EC_I2C_CONTROL_SPEED_UNKNOWN 0
struct ec_params_i2c_control {
uint8_t port; /* I2C port number */
uint8_t cmd; /* enum ec_i2c_control_command */
union {
uint16_t speed_khz;
} cmd_params;
} __ec_align_size1;
struct ec_response_i2c_control {
union {
uint16_t speed_khz;
} cmd_response;
} __ec_align_size1;
/*****************************************************************************/
/* The command range 0x200-0x2FF is reserved for Rotor. */

View File

@@ -746,8 +746,8 @@ typedef struct acpi_fadt {
u32 flags;
acpi_addr_t reset_reg;
u8 reset_value;
u16 ARM_boot_arch; /* Revision 6 only, Revision 5: Must be zero */
u8 FADT_MinorVersion; /* Revision 6 only, Revision 5: Must be zero */
u16 ARM_boot_arch; /* Must be zero if ACPI Revision <= 5.0 */
u8 FADT_MinorVersion; /* Must be zero if ACPI Revision <= 5.0 */
u32 x_firmware_ctl_l;
u32 x_firmware_ctl_h;
u32 x_dsdt_l;
@@ -768,12 +768,21 @@ typedef struct acpi_fadt {
} __packed acpi_fadt_t;
/* FADT TABLE Revision values */
#define ACPI_FADT_REV_ACPI_1_0 1
#define ACPI_FADT_REV_ACPI_2_0 3
#define ACPI_FADT_REV_ACPI_3_0 4
#define ACPI_FADT_REV_ACPI_4_0 4
#define ACPI_FADT_REV_ACPI_5_0 5
#define ACPI_FADT_REV_ACPI_6_0 6
#define ACPI_FADT_REV_ACPI_1 1
#define ACPI_FADT_REV_ACPI_2 3
#define ACPI_FADT_REV_ACPI_3 4
#define ACPI_FADT_REV_ACPI_4 4
#define ACPI_FADT_REV_ACPI_5 5
#define ACPI_FADT_REV_ACPI_6 6
/* FADT Minor Version value:
* Bits 0-3: minor version
* Bits 4-7: Errata
* value of 1 means this is compatible with Errata A,
* value of 2 would be compatible with Errata B, and so on
* Version 6.3 Errata A would be: (1 << 4) | 3
*/
#define ACPI_FADT_MINOR_VERSION_0 0 /* coreboot currently use this version */
/* Flags for p_lvl2_lat and p_lvl3_lat */
#define ACPI_FADT_C2_NOT_SUPPORTED 101
@@ -1248,8 +1257,6 @@ int acpi_create_madt_lapic_nmi(acpi_madt_lapic_nmi_t *lapic_nmi, u8 cpu,
u16 flags, u8 lint);
void acpi_create_madt(acpi_madt_t *madt);
unsigned long acpi_create_madt_lapics(unsigned long current);
unsigned long acpi_create_madt_lapic_nmis(unsigned long current, u16 flags,
u8 lint);
int acpi_create_madt_lx2apic(acpi_madt_lx2apic_t *lapic, u32 cpu, u32 apic);
int acpi_create_madt_lx2apic_nmi(acpi_madt_lx2apic_nmi_t *lapic_nmi, u32 cpu,
u16 flags, u8 lint);
@@ -1434,6 +1441,7 @@ static inline uintptr_t acpi_align_current(uintptr_t current)
* be made into a weak function if there is ever a need to override the
* coreboot default ACPI spec version supported. */
int get_acpi_table_revision(enum acpi_tables table);
u8 get_acpi_fadt_minor_version(void);
#endif // !defined(__ASSEMBLER__) && !defined(__ACPI__)

View File

@@ -26,6 +26,7 @@ enum ps2_action_key {
PS2_KEY_PREV_TRACK,
PS2_KEY_KBD_BKLIGHT_TOGGLE,
PS2_KEY_MICMUTE,
PS2_KEY_MENU,
};
#define PS2_MIN_TOP_ROW_KEYS 10

View File

@@ -32,21 +32,6 @@
#define SPD_DIMM_PART_LEN 18
/** @} */
/**
* \brief Convenience macro for enabling printk with CONFIG(DEBUG_RAM_SETUP)
*
* Use this macro instead of printk(); for verbose RAM initialization messages.
* When CONFIG(DEBUG_RAM_SETUP) is not selected, these messages are automatically
* disabled.
* @{
*/
#if CONFIG(DEBUG_RAM_SETUP)
#define printram(x, ...) printk(BIOS_DEBUG, x, ##__VA_ARGS__)
#else
#define printram(x, ...)
#endif
/** @} */
/*
* Module type (byte 3, bits 3:0) of SPD
* This definition is specific to DDR3. DDR2 SPDs have a different structure.

View File

@@ -51,7 +51,7 @@ config CHAUSIE_MCHP_FW_FILE
config CHAUSIE_MCHP_FW_OFFSET
hex
depends on CHAUSIE_HAVE_MCHP_FW
default 0x400000
default 0xB80000
help
The EC firmware blob defaults to the 4MByte offset of the firmware
image. If this offset needs to change, a new signature block must be

View File

@@ -1,7 +1,7 @@
FLASH@0xFF000000 16M {
BIOS {
EC 4K
RW_MRC_CACHE 64K
RW_MRC_CACHE 96K
FMAP 4K
COREBOOT(CBFS)
}

View File

@@ -1,7 +1,7 @@
FLASH@0xFF000000 16M {
SI_BIOS {
EC 128K
RW_MRC_CACHE(PRESERVE) 64K
EC 4K
RW_MRC_CACHE(PRESERVE) 96K
RW_SECTION_A 3M {
VBLOCK_A 8K
FW_MAIN_A(CBFS)

View File

@@ -13,6 +13,9 @@ chip soc/amd/sabrina
.flash_ch_en = 0,
}"
register "i2c_scl_reset" = "GPIO_I2C0_SCL | GPIO_I2C1_SCL |
GPIO_I2C2_SCL | GPIO_I2C3_SCL"
# I2C Pad Control RX Select Configuration
register "i2c_pad[0].rx_level" = "I2C_PAD_RX_1_8V"
register "i2c_pad[1].rx_level" = "I2C_PAD_RX_1_8V"
@@ -73,6 +76,10 @@ chip soc/amd/sabrina
end
end
device ref i2c_0 on end
device ref i2c_1 on end
device ref i2c_2 on end
device ref i2c_3 on end
device ref uart_0 on end # UART0
end

View File

@@ -1,4 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <arch/hpet.h>
#include <bootblock_common.h>
#include <device/pnp_ops.h>
#include <northbridge/intel/sandybridge/sandybridge.h>
@@ -89,7 +91,7 @@ void mainboard_fill_pei_data(struct pei_data *pei_data)
.smbusbar = CONFIG_FIXED_SMBUS_IO_BASE,
.wdbbar = 0x4000000,
.wdbsize = 0x1000,
.hpet_address = CONFIG_HPET_ADDRESS,
.hpet_address = HPET_BASE_ADDRESS,
.rcba = (uintptr_t)DEFAULT_RCBA,
.pmbase = DEFAULT_PMBASE,
.gpiobase = DEFAULT_GPIOBASE,

View File

@@ -1,5 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <arch/hpet.h>
/****************************************************************
* HPET
****************************************************************/
@@ -8,7 +10,7 @@ Scope(\_SB) {
Device(HPET) {
Name(_HID, EISAID("PNP0103"))
Name(_UID, 0)
OperationRegion(HPTM, SystemMemory, 0xFED00000, 0x400)
OperationRegion(HPTM, SystemMemory, HPET_BASE_ADDRESS, 0x400)
Field(HPTM, DWordAcc, Lock, Preserve) {
VEND, 32,
PRD, 32,
@@ -27,7 +29,7 @@ Scope(\_SB) {
}
Name(_CRS, ResourceTemplate() {
Memory32Fixed(ReadOnly,
0xFED00000, // Address Base
HPET_BASE_ADDRESS, // Address Base
0x00000400, // Address Length
)
})

View File

@@ -32,5 +32,4 @@
//#define IDSOPT_TRACING_ENABLED TRUE
#define IDSOPT_ASSERT_ENABLED TRUE
#endif

View File

@@ -30,7 +30,6 @@ Scope(\_GPE) { /* Start Scope GPE */
/* DBGO("\\_GPE\\_L10\n") */
}
/* ExtEvent1 SCI event */
Method(_L11) {
/* DBGO("\\_GPE\\_L11\n") */

View File

@@ -3,7 +3,7 @@
chip northbridge/amd/agesa/family14/root_complex
device cpu_cluster 0 on
chip cpu/amd/agesa/family14
device lapic 0 on end
device lapic 0 on end
end
end
device domain 0 on
@@ -19,7 +19,7 @@ chip northbridge/amd/agesa/family14/root_complex
device pci 8.0 off end # NB/SB Link P2P bridge
end # agesa northbridge
chip southbridge/amd/cimx/sb800 # it is under NB/SB Link, but on the same pri bus
chip southbridge/amd/cimx/sb800 # it is under NB/SB Link, but on the same pci bus
device pci 11.0 on end # SATA
device pci 12.0 on end # USB
device pci 12.1 on end # USB

View File

@@ -138,6 +138,7 @@ config BOARD_GOOGLE_TAEKO
bool "-> Taeko"
select BOARD_GOOGLE_BASEBOARD_BRYA
select DRIVERS_GENERIC_BAYHUB_LV2
select DRIVERS_GENESYSLOGIC_GL9750
select DRIVERS_GENESYSLOGIC_GL9763E
select CHROMEOS_WIFI_SAR if CHROMEOS
@@ -145,6 +146,7 @@ config BOARD_GOOGLE_TAEKO4ES
bool "-> Taeko4ES"
select BOARD_GOOGLE_BASEBOARD_BRYA
select DRIVERS_GENERIC_BAYHUB_LV2
select DRIVERS_GENESYSLOGIC_GL9750
select DRIVERS_GENESYSLOGIC_GL9763E
select CHROMEOS_WIFI_SAR if CHROMEOS

View File

@@ -7,8 +7,9 @@
#include <soc/romstage.h>
#include <string.h>
void mainboard_memory_init_params(FSP_M_CONFIG *m_cfg)
void mainboard_memory_init_params(FSPM_UPD *memupd)
{
FSP_M_CONFIG *m_cfg = &memupd->FspmConfig;
const struct mb_cfg *mem_config = variant_memory_params();
bool half_populated = variant_is_half_populated();
struct mem_spd spd_info;

View File

@@ -1,11 +1,11 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# This is an auto-generated file. Do not edit!!
# Generated by:
# ./util/spd_tools/lp4x/part_id_gen ADL lp4x src/mainboard/google/brya/variants/anahera/memory src/mainboard/google/brya/variants/anahera/memory/mem_parts_used.txt
# util/spd_tools/bin/part_id_gen ADL lp4x src/mainboard/google/brya/variants/anahera/memory/ src/mainboard/google/brya/variants/anahera/memory/mem_parts_used.txt
SPD_SOURCES =
SPD_SOURCES += spd/lp4x/set-0/spd-4.hex # ID = 0(0b0000) Parts = MT53E1G32D2NP-046 WT:A
SPD_SOURCES += spd/lp4x/set-0/spd-1.hex # ID = 1(0b0001) Parts = H9HCNNNBKMMLXR-NEE, K4U6E3S4AA-MGCR, MT53E512M32D2NP-046 WT:E, MT53E512M32D1NP-046 WT:B, H54G46CYRBX267, K4U6E3S4AB-MGCL
SPD_SOURCES += spd/lp4x/set-0/spd-3.hex # ID = 2(0b0010) Parts = H9HCNNNCPMMLXR-NEE, K4UBE3D4AA-MGCR, MT53E1G32D2NP-046 WT:B, H54G56CYRBX247, K4UBE3D4AB-MGCL
SPD_SOURCES += spd/lp4x/set-0/spd-2.hex # ID = 3(0b0011) Parts = H9HCNNNFAMMLXR-NEE
SPD_SOURCES += spd/lp4x/set-0/spd-7.hex # ID = 4(0b0100) Parts = MT53E2G32D4NQ-046 WT:A
SPD_SOURCES += spd/lp4x/set-0/spd-7.hex # ID = 4(0b0100) Parts = MT53E2G32D4NQ-046 WT:A, MT53E2G32D4NQ-046 WT:C

View File

@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# This is an auto-generated file. Do not edit!!
# Generated by:
# ./util/spd_tools/lp4x/part_id_gen ADL lp4x src/mainboard/google/brya/variants/anahera/memory src/mainboard/google/brya/variants/anahera/memory/mem_parts_used.txt
# util/spd_tools/bin/part_id_gen ADL lp4x src/mainboard/google/brya/variants/anahera/memory/ src/mainboard/google/brya/variants/anahera/memory/mem_parts_used.txt
DRAM Part Name ID to assign
MT53E1G32D2NP-046 WT:A 0 (0000)
@@ -18,3 +18,4 @@ H54G46CYRBX267 1 (0001)
K4U6E3S4AB-MGCL 1 (0001)
H54G56CYRBX247 2 (0010)
K4UBE3D4AB-MGCL 2 (0010)
MT53E2G32D4NQ-046 WT:C 4 (0100)

View File

@@ -12,3 +12,4 @@ H54G46CYRBX267
K4U6E3S4AB-MGCL
H54G56CYRBX247
K4UBE3D4AB-MGCL
MT53E2G32D4NQ-046 WT:C

View File

@@ -1,11 +1,11 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# This is an auto-generated file. Do not edit!!
# Generated by:
# ./util/spd_tools/lp4x/part_id_gen ADL lp4x src/mainboard/google/brya/variants/anahera4es/memory src/mainboard/google/brya/variants/anahera4es/memory/mem_parts_used.txt
# util/spd_tools/bin/part_id_gen ADL lp4x src/mainboard/google/brya/variants/anahera4es/memory/ src/mainboard/google/brya/variants/anahera4es/memory/mem_parts_used.txt
SPD_SOURCES =
SPD_SOURCES += spd/lp4x/set-0/spd-4.hex # ID = 0(0b0000) Parts = MT53E1G32D2NP-046 WT:A
SPD_SOURCES += spd/lp4x/set-0/spd-1.hex # ID = 1(0b0001) Parts = H9HCNNNBKMMLXR-NEE, K4U6E3S4AA-MGCR, MT53E512M32D2NP-046 WT:E, MT53E512M32D1NP-046 WT:B, H54G46CYRBX267, K4U6E3S4AB-MGCL
SPD_SOURCES += spd/lp4x/set-0/spd-3.hex # ID = 2(0b0010) Parts = H9HCNNNCPMMLXR-NEE, K4UBE3D4AA-MGCR, MT53E1G32D2NP-046 WT:B, H54G56CYRBX247, K4UBE3D4AB-MGCL
SPD_SOURCES += spd/lp4x/set-0/spd-2.hex # ID = 3(0b0011) Parts = H9HCNNNFAMMLXR-NEE
SPD_SOURCES += spd/lp4x/set-0/spd-7.hex # ID = 4(0b0100) Parts = MT53E2G32D4NQ-046 WT:A
SPD_SOURCES += spd/lp4x/set-0/spd-7.hex # ID = 4(0b0100) Parts = MT53E2G32D4NQ-046 WT:A, MT53E2G32D4NQ-046 WT:C

View File

@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# This is an auto-generated file. Do not edit!!
# Generated by:
# ./util/spd_tools/lp4x/part_id_gen ADL lp4x src/mainboard/google/brya/variants/anahera4es/memory src/mainboard/google/brya/variants/anahera4es/memory/mem_parts_used.txt
# util/spd_tools/bin/part_id_gen ADL lp4x src/mainboard/google/brya/variants/anahera4es/memory/ src/mainboard/google/brya/variants/anahera4es/memory/mem_parts_used.txt
DRAM Part Name ID to assign
MT53E1G32D2NP-046 WT:A 0 (0000)
@@ -18,3 +18,4 @@ H54G46CYRBX267 1 (0001)
K4U6E3S4AB-MGCL 1 (0001)
H54G56CYRBX247 2 (0010)
K4UBE3D4AB-MGCL 2 (0010)
MT53E2G32D4NQ-046 WT:C 4 (0100)

View File

@@ -12,3 +12,4 @@ H54G46CYRBX267
K4U6E3S4AB-MGCL
H54G56CYRBX247
K4UBE3D4AB-MGCL
MT53E2G32D4NQ-046 WT:C

View File

@@ -61,6 +61,12 @@ chip soc/intel/alderlake
[PchSerialIoIndexUART2] = PchSerialIoDisabled,
}"
register "pch_slp_s3_min_assertion_width" = "SLP_S3_ASSERTION_50_MS"
register "pch_slp_s4_min_assertion_width" = "SLP_S4_ASSERTION_1S"
register "pch_slp_sus_min_assertion_width" = "SLP_SUS_ASSERTION_1_S"
register "pch_slp_a_min_assertion_width" = "SLP_A_ASSERTION_98_MS"
register "pch_reset_power_cycle_duration" = "POWER_CYCLE_DURATION_1S"
# HD Audio
register "PchHdaDspEnable" = "1"
register "PchHdaIDispLinkTmode" = "HDA_TMODE_8T"

View File

@@ -155,7 +155,6 @@ chip soc/intel/alderlake
chip soc/intel/common/block/pcie/rtd3
register "reset_gpio" = "ACPI_GPIO_OUTPUT_ACTIVE_LOW(GPP_E0)"
register "reset_off_delay_ms" = "20"
register "reset_delay_ms" = "1000"
register "srcclk_pin" = "5"
register "ext_pm_support" = "ACPI_PCIE_RP_EMIT_ALL"
register "skip_on_off_support" = "true"

View File

@@ -17,6 +17,9 @@ chip soc/intel/alderlake
# Enable CNVi BT
register "CnviBtCore" = "true"
# eMMC HS400
register "emmc_enable_hs400_mode" = "1"
register "usb2_ports[0]" = "USB2_PORT_TYPE_C(OC_SKIP)" # USB2_C0
register "usb2_ports[1]" = "USB2_PORT_TYPE_C(OC_SKIP)" # USB2_C1
register "usb2_ports[2]" = "USB2_PORT_MID(OC_SKIP)" # USB2_A0

View File

@@ -1,5 +1,9 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# This is an auto-generated file. Do not edit!!
# Add memory parts in mem_parts_used.txt and run spd_tools to regenerate.
# Generated by:
# ./util/spd_tools/bin/part_id_gen ADL lp5 src/mainboard/google/brya/variants/crota/memory src/mainboard/google/brya/variants/crota/memory/mem_parts_used.txt
SPD_SOURCES = placeholder
SPD_SOURCES =
SPD_SOURCES += spd/lp5/set-0/spd-2.hex # ID = 0(0b0000) Parts = MT62F1G32D4DR-031 WT:B, H9JCNNNCP3MLYR-N6E
SPD_SOURCES += spd/lp5/set-0/spd-1.hex # ID = 1(0b0001) Parts = MT62F512M32D2DR-031 WT:B, H9JCNNNBK3MLYR-N6E
SPD_SOURCES += spd/lp5/set-0/spd-3.hex # ID = 2(0b0010) Parts = K3LKBKB0BM-MGCP

View File

@@ -1 +1,11 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# This is an auto-generated file. Do not edit!!
# Generated by:
# ./util/spd_tools/bin/part_id_gen ADL lp5 src/mainboard/google/brya/variants/crota/memory src/mainboard/google/brya/variants/crota/memory/mem_parts_used.txt
DRAM Part Name ID to assign
MT62F1G32D4DR-031 WT:B 0 (0000)
MT62F512M32D2DR-031 WT:B 1 (0001)
H9JCNNNBK3MLYR-N6E 1 (0001)
H9JCNNNCP3MLYR-N6E 0 (0000)
K3LKBKB0BM-MGCP 2 (0010)

View File

@@ -9,3 +9,8 @@
# See util/spd_tools/README.md for more details and instructions.
# Part Name
MT62F1G32D4DR-031 WT:B
MT62F512M32D2DR-031 WT:B
H9JCNNNBK3MLYR-N6E
H9JCNNNCP3MLYR-N6E
K3LKBKB0BM-MGCP

View File

@@ -58,16 +58,28 @@ chip soc/intel/alderlake
register "common_soc_config" = "{
.i2c[0] = {
.speed = I2C_SPEED_FAST,
.rise_time_ns = 550,
.fall_time_ns = 400,
.data_hold_time_ns = 50,
},
.i2c[1] = {
.early_init = 1,
.speed = I2C_SPEED_FAST,
.rise_time_ns = 550,
.fall_time_ns = 400,
.data_hold_time_ns = 50,
},
.i2c[3] = {
.speed = I2C_SPEED_FAST,
.rise_time_ns = 550,
.fall_time_ns = 400,
.data_hold_time_ns = 50,
},
.i2c[5] = {
.speed = I2C_SPEED_FAST,
.rise_time_ns = 550,
.fall_time_ns = 400,
.data_hold_time_ns = 50,
},
}"

View File

@@ -1,11 +1,11 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# This is an auto-generated file. Do not edit!!
# Generated by:
# ./util/spd_tools/lp4x/part_id_gen ADL lp4x src/mainboard/google/brya/variants/redrix/memory src/mainboard/google/brya/variants/redrix/memory/mem_parts_used.txt
# util/spd_tools/bin/part_id_gen ADL lp4x src/mainboard/google/brya/variants/redrix/memory/ src/mainboard/google/brya/variants/redrix/memory/mem_parts_used.txt
SPD_SOURCES =
SPD_SOURCES += spd/lp4x/set-0/spd-4.hex # ID = 0(0b0000) Parts = MT53E1G32D2NP-046 WT:A
SPD_SOURCES += spd/lp4x/set-0/spd-1.hex # ID = 1(0b0001) Parts = H9HCNNNBKMMLXR-NEE, K4U6E3S4AA-MGCR, MT53E512M32D2NP-046 WT:E, MT53E512M32D1NP-046 WT:B, H54G46CYRBX267, K4U6E3S4AB-MGCL
SPD_SOURCES += spd/lp4x/set-0/spd-3.hex # ID = 2(0b0010) Parts = H9HCNNNCPMMLXR-NEE, K4UBE3D4AA-MGCR, MT53E1G32D2NP-046 WT:B, H54G56CYRBX247, K4UBE3D4AB-MGCL
SPD_SOURCES += spd/lp4x/set-0/spd-2.hex # ID = 3(0b0011) Parts = H9HCNNNFAMMLXR-NEE
SPD_SOURCES += spd/lp4x/set-0/spd-7.hex # ID = 4(0b0100) Parts = MT53E2G32D4NQ-046 WT:A
SPD_SOURCES += spd/lp4x/set-0/spd-7.hex # ID = 4(0b0100) Parts = MT53E2G32D4NQ-046 WT:A, MT53E2G32D4NQ-046 WT:C

View File

@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# This is an auto-generated file. Do not edit!!
# Generated by:
# ./util/spd_tools/lp4x/part_id_gen ADL lp4x src/mainboard/google/brya/variants/redrix/memory src/mainboard/google/brya/variants/redrix/memory/mem_parts_used.txt
# util/spd_tools/bin/part_id_gen ADL lp4x src/mainboard/google/brya/variants/redrix/memory/ src/mainboard/google/brya/variants/redrix/memory/mem_parts_used.txt
DRAM Part Name ID to assign
MT53E1G32D2NP-046 WT:A 0 (0000)
@@ -18,3 +18,4 @@ H54G46CYRBX267 1 (0001)
K4U6E3S4AB-MGCL 1 (0001)
H54G56CYRBX247 2 (0010)
K4UBE3D4AB-MGCL 2 (0010)
MT53E2G32D4NQ-046 WT:C 4 (0100)

View File

@@ -12,3 +12,4 @@ H54G46CYRBX267
K4U6E3S4AB-MGCL
H54G56CYRBX247
K4UBE3D4AB-MGCL
MT53E2G32D4NQ-046 WT:C

View File

@@ -41,6 +41,11 @@ chip soc/intel/alderlake
register "SlowSlewRate[VR_DOMAIN_IA]" = "SLEW_FAST_8"
register "FastPkgCRampDisable[VR_DOMAIN_IA]" = "1"
register "usb2_ports[1]" = "USB2_PORT_EMPTY"
register "usb2_ports[5]" = "USB2_PORT_EMPTY"
register "usb2_ports[9]" = "USB2_PORT_EMPTY"
register "tcss_ports[1]" = "TCSS_PORT_EMPTY"
# Intel Common SoC Config
#+-------------------+---------------------------+
#| Field | Value |

View File

@@ -1,11 +1,11 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# This is an auto-generated file. Do not edit!!
# Generated by:
# ./util/spd_tools/lp4x/part_id_gen ADL lp4x src/mainboard/google/brya/variants/redrix4es/memory src/mainboard/google/brya/variants/redrix4es/memory/mem_parts_used.txt
# util/spd_tools/bin/part_id_gen ADL lp4x src/mainboard/google/brya/variants/redrix4es/memory/ src/mainboard/google/brya/variants/redrix4es/memory/mem_parts_used.txt
SPD_SOURCES =
SPD_SOURCES += spd/lp4x/set-0/spd-4.hex # ID = 0(0b0000) Parts = MT53E1G32D2NP-046 WT:A
SPD_SOURCES += spd/lp4x/set-0/spd-1.hex # ID = 1(0b0001) Parts = H9HCNNNBKMMLXR-NEE, K4U6E3S4AA-MGCR, MT53E512M32D2NP-046 WT:E, MT53E512M32D1NP-046 WT:B, H54G46CYRBX267, K4U6E3S4AB-MGCL
SPD_SOURCES += spd/lp4x/set-0/spd-3.hex # ID = 2(0b0010) Parts = H9HCNNNCPMMLXR-NEE, K4UBE3D4AA-MGCR, MT53E1G32D2NP-046 WT:B, H54G56CYRBX247, K4UBE3D4AB-MGCL
SPD_SOURCES += spd/lp4x/set-0/spd-2.hex # ID = 3(0b0011) Parts = H9HCNNNFAMMLXR-NEE
SPD_SOURCES += spd/lp4x/set-0/spd-7.hex # ID = 4(0b0100) Parts = MT53E2G32D4NQ-046 WT:A
SPD_SOURCES += spd/lp4x/set-0/spd-7.hex # ID = 4(0b0100) Parts = MT53E2G32D4NQ-046 WT:A, MT53E2G32D4NQ-046 WT:C

View File

@@ -1,7 +1,7 @@
# SPDX-License-Identifier: GPL-2.0-or-later
# This is an auto-generated file. Do not edit!!
# Generated by:
# ./util/spd_tools/lp4x/part_id_gen ADL lp4x src/mainboard/google/brya/variants/redrix4es/memory src/mainboard/google/brya/variants/redrix4es/memory/mem_parts_used.txt
# util/spd_tools/bin/part_id_gen ADL lp4x src/mainboard/google/brya/variants/redrix4es/memory/ src/mainboard/google/brya/variants/redrix4es/memory/mem_parts_used.txt
DRAM Part Name ID to assign
MT53E1G32D2NP-046 WT:A 0 (0000)
@@ -18,3 +18,4 @@ H54G46CYRBX267 1 (0001)
K4U6E3S4AB-MGCL 1 (0001)
H54G56CYRBX247 2 (0010)
K4UBE3D4AB-MGCL 2 (0010)
MT53E2G32D4NQ-046 WT:C 4 (0100)

View File

@@ -12,3 +12,4 @@ H54G46CYRBX267
K4U6E3S4AB-MGCL
H54G56CYRBX247
K4UBE3D4AB-MGCL
MT53E2G32D4NQ-046 WT:C

View File

@@ -41,6 +41,11 @@ chip soc/intel/alderlake
register "SlowSlewRate[VR_DOMAIN_IA]" = "SLEW_FAST_8"
register "FastPkgCRampDisable[VR_DOMAIN_IA]" = "1"
register "usb2_ports[1]" = "USB2_PORT_EMPTY"
register "usb2_ports[5]" = "USB2_PORT_EMPTY"
register "usb2_ports[9]" = "USB2_PORT_EMPTY"
register "tcss_ports[1]" = "TCSS_PORT_EMPTY"
# Intel Common SoC Config
#+-------------------+---------------------------+
#| Field | Value |

View File

@@ -364,28 +364,28 @@ chip soc/intel/alderlake
register "desc" = ""USB3 Type-C Port C0 (MLB)""
register "type" = "UPC_TYPE_C_USB2_SS_SWITCH"
register "use_custom_pld" = "true"
register "custom_pld" = "ACPI_PLD_TYPE_C(LEFT, LEFT, ACPI_PLD_GROUP(1, 1))"
register "custom_pld" = "ACPI_PLD_TYPE_C(RIGHT, LEFT, ACPI_PLD_GROUP(1, 1))"
device ref tcss_usb3_port1 on end
end
chip drivers/usb/acpi
register "desc" = ""USB3 Type-C Port C1 (MlB)""
register "type" = "UPC_TYPE_C_USB2_SS_SWITCH"
register "use_custom_pld" = "true"
register "custom_pld" = "ACPI_PLD_TYPE_C(RIGHT, LEFT, ACPI_PLD_GROUP(2, 1))"
register "custom_pld" = "ACPI_PLD_TYPE_C(RIGHT, RIGHT, ACPI_PLD_GROUP(2, 1))"
device ref tcss_usb3_port2 on end
end
chip drivers/usb/acpi
register "desc" = ""USB3 Type-C Port C2 (DB)""
register "type" = "UPC_TYPE_C_USB2_SS_SWITCH"
register "use_custom_pld" = "true"
register "custom_pld" = "ACPI_PLD_TYPE_C(LEFT, RIGHT, ACPI_PLD_GROUP(3, 1))"
register "custom_pld" = "ACPI_PLD_TYPE_C(LEFT, LEFT, ACPI_PLD_GROUP(3, 1))"
device ref tcss_usb3_port3 on end
end
chip drivers/usb/acpi
register "desc" = ""USB3 Type-C Port C3 (DB)""
register "type" = "UPC_TYPE_C_USB2_SS_SWITCH"
register "use_custom_pld" = "true"
register "custom_pld" = "ACPI_PLD_TYPE_C(RIGHT, RIGHT, ACPI_PLD_GROUP(4, 1))"
register "custom_pld" = "ACPI_PLD_TYPE_C(LEFT, RIGHT, ACPI_PLD_GROUP(4, 1))"
device ref tcss_usb3_port4 on end
end
end
@@ -398,21 +398,21 @@ chip soc/intel/alderlake
register "desc" = ""USB2 Type-C Port C0 (MLB)""
register "type" = "UPC_TYPE_C_USB2_SS_SWITCH"
register "use_custom_pld" = "true"
register "custom_pld" = "ACPI_PLD_TYPE_C(LEFT, LEFT, ACPI_PLD_GROUP(1, 1))"
register "custom_pld" = "ACPI_PLD_TYPE_C(RIGHT, LEFT, ACPI_PLD_GROUP(1, 1))"
device ref usb2_port1 on end
end
chip drivers/usb/acpi
register "desc" = ""USB2 Type-C Port C1 (MLB)""
register "type" = "UPC_TYPE_C_USB2_SS_SWITCH"
register "use_custom_pld" = "true"
register "custom_pld" = "ACPI_PLD_TYPE_C(RIGHT, LEFT, ACPI_PLD_GROUP(2, 1))"
register "custom_pld" = "ACPI_PLD_TYPE_C(RIGHT, RIGHT, ACPI_PLD_GROUP(2, 1))"
device ref usb2_port2 on end
end
chip drivers/usb/acpi
register "desc" = ""USB2 Type-C Port C2 (DB)""
register "type" = "UPC_TYPE_C_USB2_SS_SWITCH"
register "use_custom_pld" = "true"
register "custom_pld" = "ACPI_PLD_TYPE_C(LEFT, RIGHT, ACPI_PLD_GROUP(3, 1))"
register "custom_pld" = "ACPI_PLD_TYPE_C(LEFT, LEFT, ACPI_PLD_GROUP(3, 1))"
device ref usb2_port3 on end
end
chip drivers/usb/acpi
@@ -424,7 +424,7 @@ chip soc/intel/alderlake
register "desc" = ""USB2 Type-C Port C3 (DB)""
register "type" = "UPC_TYPE_C_USB2_SS_SWITCH"
register "use_custom_pld" = "true"
register "custom_pld" = "ACPI_PLD_TYPE_C(RIGHT, RIGHT, ACPI_PLD_GROUP(4, 1))"
register "custom_pld" = "ACPI_PLD_TYPE_C(LEFT, RIGHT, ACPI_PLD_GROUP(4, 1))"
device ref usb2_port5 on end
end
chip drivers/usb/acpi

View File

@@ -1,5 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <arch/hpet.h>
#include <stdint.h>
#include <northbridge/intel/sandybridge/sandybridge.h>
#include <northbridge/intel/sandybridge/raminit.h>
@@ -82,7 +83,7 @@ void mainboard_fill_pei_data(struct pei_data *pei_data)
.smbusbar = CONFIG_FIXED_SMBUS_IO_BASE,
.wdbbar = 0x4000000,
.wdbsize = 0x1000,
.hpet_address = CONFIG_HPET_ADDRESS,
.hpet_address = HPET_BASE_ADDRESS,
.rcba = (uintptr_t)DEFAULT_RCBA,
.pmbase = DEFAULT_PMBASE,
.gpiobase = DEFAULT_GPIOBASE,

View File

@@ -48,6 +48,7 @@ config BOARD_SPECIFIC_OPTIONS
select SOC_AMD_COMMON_BLOCK_GRAPHICS_ATIF
select SOC_AMD_COMMON_BLOCK_I2C3_TPM_SHARED_WITH_PSP
select SOC_AMD_COMMON_BLOCK_USE_ESPI
select SOC_AMD_COMMON_BLOCK_PSP_FUSE_SPL
config CHROMEOS
select EC_GOOGLE_CHROMEEC_SWITCHES

View File

@@ -29,7 +29,7 @@ DMCUINTVECTORSDCN21_FILE TypeId0x59_DmcuIntvectorsDcn21.sbin
PSPBTLDR_AB_FILE TypeId0x73_PspBootLoader_AB_CZN.sbin
# BDT
PSP_PMUI_FILE1 TypeId0x64_Appb_CZN_1D_Lpddr4_Imem.csbin L2
PSP_PMUD_FILE1 TypeId0x65_Appb_CZN_1D_Lpddr4_Dmem.csbin L2
PSP_PMUI_FILE2 TypeId0x64_Appb_CZN_2D_Lpddr4_Imem.csbin L2
PSP_PMUD_FILE2 TypeId0x65_Appb_CZN_2D_Lpddr4_Dmem.csbin L2
PSP_PMUI_FILE_SUB0_INS1 TypeId0x64_Appb_CZN_1D_Lpddr4_Imem.csbin L2
PSP_PMUD_FILE_SUB0_INS1 TypeId0x65_Appb_CZN_1D_Lpddr4_Dmem.csbin L2
PSP_PMUI_FILE_SUB0_INS4 TypeId0x64_Appb_CZN_2D_Lpddr4_Imem.csbin L2
PSP_PMUD_FILE_SUB0_INS4 TypeId0x65_Appb_CZN_2D_Lpddr4_Dmem.csbin L2

View File

@@ -27,7 +27,7 @@ config BOARD_SPECIFIC_OPTIONS
select SPI_FLASH_WINBOND
select MAINBOARD_HAS_CHROMEOS
select MAINBOARD_HAS_SPI_TPM_CR50 if BOARD_GOOGLE_PIGLIN
select MAINBOARD_HAS_I2C_TPM_CR50 if BOARD_GOOGLE_HEROBRINE_REV0 || BOARD_GOOGLE_HEROBRINE || BOARD_GOOGLE_HOGLIN
select MAINBOARD_HAS_I2C_TPM_CR50 if !BOARD_GOOGLE_PIGLIN && !BOARD_GOOGLE_SENOR
select MAINBOARD_HAS_TPM2 if !BOARD_GOOGLE_SENOR
config VBOOT
@@ -54,6 +54,7 @@ config MAINBOARD_PART_NUMBER
default "Senor" if BOARD_GOOGLE_SENOR
default "Piglin" if BOARD_GOOGLE_PIGLIN
default "Hoglin" if BOARD_GOOGLE_HOGLIN
default "Villager" if BOARD_GOOGLE_VILLAGER
config DRIVER_TPM_I2C_BUS
depends on MAINBOARD_HAS_I2C_TPM_CR50

View File

@@ -22,6 +22,9 @@ config BOARD_GOOGLE_HOGLIN
bool "-> Hoglin"
select BOARD_GOOGLE_HEROBRINE_COMMON
config BOARD_GOOGLE_VILLAGER
bool "-> Villager"
select BOARD_GOOGLE_HEROBRINE_COMMON
endif
comment "(Herobrine requires 'Allow QC blobs repository')"

View File

@@ -1,5 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <arch/hpet.h>
#include <stdint.h>
#include <string.h>
#include <device/pci_ops.h>
@@ -91,7 +92,7 @@ void mainboard_fill_pei_data(struct pei_data *pei_data)
.smbusbar = CONFIG_FIXED_SMBUS_IO_BASE,
.wdbbar = 0x4000000,
.wdbsize = 0x1000,
.hpet_address = CONFIG_HPET_ADDRESS,
.hpet_address = HPET_BASE_ADDRESS,
.rcba = (uintptr_t)DEFAULT_RCBA,
.pmbase = DEFAULT_PMBASE,
.gpiobase = DEFAULT_GPIOBASE,

View File

@@ -1,5 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <arch/hpet.h>
#include <stdint.h>
#include <northbridge/intel/sandybridge/sandybridge.h>
#include <northbridge/intel/sandybridge/raminit.h>
@@ -60,7 +61,7 @@ void mainboard_fill_pei_data(struct pei_data *pei_data)
.smbusbar = CONFIG_FIXED_SMBUS_IO_BASE,
.wdbbar = 0x4000000,
.wdbsize = 0x1000,
.hpet_address = CONFIG_HPET_ADDRESS,
.hpet_address = HPET_BASE_ADDRESS,
.rcba = (uintptr_t)DEFAULT_RCBA,
.pmbase = DEFAULT_PMBASE,
.gpiobase = DEFAULT_GPIOBASE,

View File

@@ -5,6 +5,9 @@ config BOARD_GOOGLE_BASEBOARD_SKYRIM
if BOARD_GOOGLE_BASEBOARD_SKYRIM
config IGNORE_IASL_MISSING_DEPENDENCY
def_bool y
config AMD_FWM_POSITION_INDEX
int
default 3
@@ -13,9 +16,17 @@ config AMD_FWM_POSITION_INDEX
config BOARD_SPECIFIC_OPTIONS
def_bool y
select AMD_SOC_CONSOLE_UART
select BOARD_ROMSIZE_KB_16384
select EC_GOOGLE_CHROMEEC
select EC_GOOGLE_CHROMEEC_ESPI
select FW_CONFIG
select MAINBOARD_HAS_CHROMEOS
select SOC_AMD_SABRINA
config CHROMEOS
select EC_GOOGLE_CHROMEEC_SWITCHES
config DEVICETREE
default "variants/baseboard/devicetree.cb"
@@ -32,4 +43,17 @@ config MAINBOARD_FAMILY
config MAINBOARD_PART_NUMBER
default "Skyrim" if BOARD_GOOGLE_SKYRIM
config OVERRIDE_DEVICETREE
string
default "variants/\$(CONFIG_VARIANT_DIR)/overridetree.cb"
config VARIANT_DIR
string
default "skyrim" if BOARD_GOOGLE_SKYRIM
config VBOOT
select VBOOT_LID_SWITCH
select VBOOT_SEPARATE_VERSTAGE
select VBOOT_STARTS_IN_BOOTBLOCK
endif # BOARD_GOOGLE_BASEBOARD_SKYRIM

View File

@@ -5,7 +5,11 @@ bootblock-y += bootblock.c
romstage-y += port_descriptors.c
ramstage-y += mainboard.c
ramstage-y += ec.c
ramstage-$(CONFIG_CHROMEOS) += chromeos.c
subdirs-y += variants/baseboard
subdirs-y += variants/$(VARIANT_DIR)
CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/baseboard/include
CPPFLAGS_common += -I$(src)/mainboard/$(MAINBOARDDIR)/variants/$(VARIANT_DIR)/include

View File

@@ -7,3 +7,12 @@ void bootblock_mainboard_early_init(void)
{
/* TODO: Perform mainboard initialization */
}
void bootblock_mainboard_init(void)
{
size_t num_gpios;
const struct soc_amd_gpio *gpios;
variant_bootblock_gpio_table(&gpios, &num_gpios);
gpio_configure_pads(gpios, num_gpios);
}

View File

@@ -0,0 +1,26 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <baseboard/gpio.h>
#include <boot/coreboot_tables.h>
#include <bootmode.h>
#include <gpio.h>
#include <vendorcode/google/chromeos/chromeos.h>
void fill_lb_gpios(struct lb_gpios *gpios)
{
struct lb_gpio chromeos_gpios[] = {
{-1, ACTIVE_HIGH, get_lid_switch(), "lid"},
{-1, ACTIVE_HIGH, 0, "power"},
};
lb_add_gpios(gpios, chromeos_gpios, ARRAY_SIZE(chromeos_gpios));
}
static const struct cros_gpio cros_gpios[] = {
CROS_GPIO_REC_AL(CROS_GPIO_VIRTUAL, GPIO_DEVICE_NAME),
CROS_GPIO_WP_AL(CROS_WP_GPIO, GPIO_DEVICE_NAME),
};
void mainboard_chromeos_acpi_generate(void)
{
chromeos_acpi_gpio_generate(cros_gpios, ARRAY_SIZE(cros_gpios));
}

View File

@@ -1,6 +1,7 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi.h>
#include <variant/ec.h>
DefinitionBlock (
"dsdt.aml",
@@ -13,4 +14,14 @@ DefinitionBlock (
{
#include <acpi/dsdt_top.asl>
#include <soc.asl>
/* Chrome OS Embedded Controller */
Scope (\_SB.PCI0.LPCB)
{
/* ACPI code for EC SuperIO functions */
#include <ec/google/chromeec/acpi/superio.asl>
/* ACPI code for EC functions */
#include <ec/google/chromeec/acpi/ec.asl>
}
}

View File

@@ -0,0 +1,34 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <acpi/acpi.h>
#include <amdblocks/gpio.h>
#include <amdblocks/smi.h>
#include <console/console.h>
#include <ec/google/chromeec/ec.h>
#include <soc/smi.h>
#include <variant/ec.h>
static const struct sci_source espi_sci_sources[] = {
{
.scimap = SMITYPE_ESPI_SYS,
.gpe = GEVENT_3,
.direction = SMI_SCI_LVL_HIGH, /* enum smi_sci_lvl */
.level = SMI_SCI_EDG, /* enum smi_sci_dir */
}
};
void mainboard_ec_init(void)
{
const struct google_chromeec_event_info info = {
.log_events = MAINBOARD_EC_LOG_EVENTS,
.sci_events = MAINBOARD_EC_SCI_EVENTS,
.s3_wake_events = MAINBOARD_EC_S3_WAKE_EVENTS,
.s5_wake_events = MAINBOARD_EC_S5_WAKE_EVENTS,
.s0ix_wake_events = MAINBOARD_EC_S0IX_WAKE_EVENTS,
};
google_chromeec_events_init(&info, acpi_is_wakeup_s3());
/* Configure eSPI SCI events */
gpe_configure_sci(espi_sci_sources, ARRAY_SIZE(espi_sci_sources));
}

View File

@@ -1,15 +1,31 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <baseboard/variants.h>
#include <console/console.h>
#include <device/device.h>
#include <variant/ec.h>
static void mainboard_configure_gpios(void)
{
size_t base_num_gpios, override_num_gpios;
const struct soc_amd_gpio *base_gpios, *override_gpios;
variant_base_gpio_table(&base_gpios, &base_num_gpios);
variant_override_gpio_table(&override_gpios, &override_num_gpios);
gpio_configure_pads_with_override(base_gpios, base_num_gpios,
override_gpios, override_num_gpios);
}
static void mainboard_init(void *chip_info)
{
/* TODO: Perform mainboard initialization */
mainboard_configure_gpios();
mainboard_ec_init();
}
static void mainboard_enable(struct device *dev)
{
/* TODO: Enable mainboard */
printk(BIOS_INFO, "Mainboard " CONFIG_MAINBOARD_PART_NUMBER " Enable.\n");
}
struct chip_operations mainboard_ops = {

View File

@@ -0,0 +1,5 @@
bootblock-y += gpio.c
ramstage-y += gpio.c
smm-y += gpio.c

View File

@@ -1,5 +1,18 @@
# SPDX-License-Identifier: GPL-2.0-or-later
chip soc/amd/sabrina
device domain 0 on
device ref lpc_bridge on
chip ec/google/chromeec
device pnp 0c09.0 alias chrome_ec on end
end
end
device ref gpp_bridge_a on # Internal GPP Bridge 0 to Bus A
device ref gfx on end # Internal GPU (GFX)
device ref xhci_0 on
end
device ref xhci_1 on
end
end
end # domain
device ref uart_0 on end # UART0
end # chip soc/amd/sabrina

View File

@@ -0,0 +1,176 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#include <baseboard/gpio.h>
#include <baseboard/variants.h>
#include <commonlib/helpers.h>
#include <soc/gpio.h>
/* GPIO configuration in ramstage*/
static const struct soc_amd_gpio base_gpio_table[] = {
/* PWR_BTN_L */
PAD_NF(GPIO_0, PWR_BTN_L, PULL_NONE),
/* SYS_RESET_L */
PAD_NF(GPIO_1, SYS_RESET_L, PULL_NONE),
/* WAKE_L */
PAD_NF_SCI(GPIO_2, WAKE_L, PULL_NONE, EDGE_LOW),
/* SOC_PEN_DETECT_ODL */
PAD_WAKE(GPIO_3, PULL_NONE, EDGE_LOW, S0i3),
/* EN_PWR_FP */
PAD_GPO(GPIO_4, HIGH),
/* EN_PP3300_TCHPAD */
PAD_GPO(GPIO_5, HIGH),
/* SSD_AUX_RESET_L */
PAD_GPO(GPIO_6, HIGH),
/* WLAN_AUX_RST_L */
PAD_GPO(GPIO_7, HIGH),
/* EN_PWR_WWAN_X */
PAD_GPO(GPIO_8, HIGH),
/* EN_PP3300_WLAN */
PAD_GPO(GPIO_9, HIGH),
/* BT_DISABLE */
PAD_GPO(GPIO_10, LOW),
/* EC_SOC_WAKE_ODL */
PAD_SCI(GPIO_11, PULL_NONE, EDGE_LOW),
/* SOC_FP_RST_L */
PAD_GPO(GPIO_12, LOW),
/* GPIO_13 - GPIO_15: Not available */
/* USB_OC0_L */
PAD_NF(GPIO_16, USB_OC0_L, PULL_NONE),
/* SOC_SAR_INT_L */
PAD_SCI(GPIO_17, PULL_NONE, EDGE_LOW),
/* GSC_SOC_INT_L */
PAD_GPI(GPIO_18, PULL_NONE),
/* I2C3_SCL */
PAD_NF(GPIO_19, I2C3_SCL, PULL_NONE),
/* I2C3_SDA */
PAD_NF(GPIO_20, I2C3_SDA, PULL_NONE),
/* WLAN_DISABLE */
PAD_GPO(GPIO_21, LOW),
/* ESPI_ALERT_D1 */
PAD_NF(GPIO_22, ESPI_ALERT_D1, PULL_NONE),
/* AC_PRES */
PAD_NF(GPIO_23, AC_PRES, PULL_UP),
/* SOC_FP_INT_L */
PAD_SCI(GPIO_24, PULL_NONE, EDGE_LOW),
/* GPIO_25: Not available */
/* PCIE_RST0_L */
PAD_NFO(GPIO_26, PCIE_RST0_L, HIGH),
/* SD_AUX_RESET_L */
PAD_GPO(GPIO_27, HIGH),
/* GPIO_28: Not available */
/* EN_PP3300_TCHSCR */
PAD_GPO(GPIO_29, HIGH),
/* SOC_DISABLE_DISP_BL */
PAD_GPO(GPIO_30, HIGH),
/* Unused */
PAD_NC(GPIO_31),
/* LPC_RST_L */
PAD_GPO(GPIO_32, LOW),
/* GPIO_33 - GPIO_39: Not available */
/* SOC_TCHPAD_INT_ODL */
PAD_SCI(GPIO_40, PULL_NONE, EDGE_LOW),
/* GPIO_41: Not available */
/* WWAN_RST_L */
PAD_GPO(GPIO_42, HIGH),
/* GPIO_43 - GPIO_66: Not available */
/* GPIO_67 */
PAD_GPI(GPIO_67, PULL_NONE),
/* SPI1_DATA2 */
PAD_NF(GPIO_68, SPI1_DAT2, PULL_NONE),
/* SPI1_DATA3 */
PAD_NF(GPIO_69, SPI1_DAT3, PULL_NONE),
/* ESPI_CS_L */
PAD_NF(GPIO_74, SPI1_CS1_L, PULL_NONE),
/* TCHSCR_REPORT_EN */
PAD_GPO(GPIO_76, LOW),
/* SPI1_CLK */
PAD_NF(GPIO_77, SPI1_CLK, PULL_NONE),
/* EN_PP3300_CAM */
PAD_GPO(GPIO_78, HIGH),
/* SPI1_DATA1 */
PAD_NF(GPIO_80, SPI1_DAT1, PULL_NONE),
/* SPI1_DATA0 */
PAD_NF(GPIO_81, SPI1_DAT0, PULL_NONE),
/* EC_SOC_INT_ODL */
PAD_GPI(GPIO_84, PULL_NONE),
/* RAM_ID_1 / DEV_BEEP_DATA */
PAD_GPI(GPIO_85, PULL_NONE),
/* RAM_ID_2 / DEV_BEEP_LRCLK */
PAD_GPI(GPIO_89, PULL_NONE),
/* HP_INT_ODL */
PAD_GPI(GPIO_90, PULL_NONE),
/* RAM_ID_3 / DEV_BEEP_BCLK */
PAD_GPI(GPIO_91, PULL_NONE),
/* CLK_REQ0_L / SSD */
PAD_NF(GPIO_92, CLK_REQ0_L, PULL_NONE),
/* I2C2_SCL */
PAD_NF(GPIO_113, I2C2_SCL, PULL_NONE),
/* I2C2_SDA */
PAD_NF(GPIO_114, I2C2_SDA, PULL_NONE),
/* CLK_REQ1_L / SD */
PAD_NF(GPIO_115, CLK_REQ1_L, PULL_NONE),
/* CLK_REQ2_L / WLAN */
PAD_NF(GPIO_116, CLK_REQ2_L, PULL_NONE),
/* SOC_FPMCU_BOOT0 */
PAD_GPO(GPIO_130, LOW),
/* TCHSCR_INT_ODL */
PAD_GPI(GPIO_131, PULL_NONE),
/* TCHSCR_RESET_L */
PAD_GPO(GPIO_136, LOW),
/* SOC_BIOS_WP_L */
PAD_GPI(GPIO_138, PULL_NONE),
/* EN_SPKR */
PAD_GPO(GPIO_139, HIGH),
/* RAM_ID_0 / DEV_BEEP_EN */
PAD_GPI(GPIO_144, PULL_NONE),
/* UART1_TXD / FP */
PAD_NF(GPIO_140, UART1_TXD, PULL_NONE),
/* UART0_RXD / DBG */
PAD_NF(GPIO_141, UART0_RXD, PULL_NONE),
/* UART1_RXD / FP*/
PAD_NF(GPIO_142, UART1_RXD, PULL_NONE),
/* UART0_TXD / DBG */
PAD_NF(GPIO_143, UART0_TXD, PULL_NONE),
/* I2C0_SCL */
PAD_NF(GPIO_145, I2C0_SCL, PULL_NONE),
/* I2C0_SDA */
PAD_NF(GPIO_146, I2C0_SDA, PULL_NONE),
/* I2C1_SCL */
PAD_NF(GPIO_147, I2C1_SCL, PULL_NONE),
/* I2C1_SDA */
PAD_NF(GPIO_148, I2C1_SDA, PULL_NONE),
};
/* GPIO configuration for sleep */
static const struct soc_amd_gpio sleep_gpio_table[] = {
/* TODO: Fill sleep gpio configuration */
};
/* Early GPIO configuration in bootblock */
static const struct soc_amd_gpio bootblock_gpio_table[] = {
/* TODO: Fill bootblock gpio configuration */
};
__weak void variant_base_gpio_table(const struct soc_amd_gpio **gpio, size_t *size)
{
*size = ARRAY_SIZE(base_gpio_table);
*gpio = base_gpio_table;
}
__weak void variant_override_gpio_table(const struct soc_amd_gpio **gpio, size_t *size)
{
*size = 0;
*gpio = NULL;
}
__weak void variant_bootblock_gpio_table(const struct soc_amd_gpio **gpio, size_t *size)
{
*size = ARRAY_SIZE(bootblock_gpio_table);
*gpio = bootblock_gpio_table;
}
__weak void variant_sleep_gpio_table(const struct soc_amd_gpio **gpio, size_t *size)
{
*size = ARRAY_SIZE(sleep_gpio_table);
*gpio = sleep_gpio_table;
}

View File

@@ -0,0 +1,80 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef __MAINBOARD_EC_H__
#define __MAINBOARD_EC_H__
#include <ec/ec.h>
#include <ec/google/chromeec/ec_commands.h>
#include <baseboard/gpio.h>
#include <soc/gpio.h>
#define MAINBOARD_EC_SCI_EVENTS \
(EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_CLOSED) \
| EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_OPEN) \
| EC_HOST_EVENT_MASK(EC_HOST_EVENT_AC_CONNECTED) \
| EC_HOST_EVENT_MASK(EC_HOST_EVENT_AC_DISCONNECTED) \
| EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_LOW) \
| EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_CRITICAL) \
| EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY) \
| EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_STATUS) \
| EC_HOST_EVENT_MASK(EC_HOST_EVENT_THERMAL_THRESHOLD) \
| EC_HOST_EVENT_MASK(EC_HOST_EVENT_THROTTLE_START) \
| EC_HOST_EVENT_MASK(EC_HOST_EVENT_THROTTLE_STOP) \
| EC_HOST_EVENT_MASK(EC_HOST_EVENT_PD_MCU) \
| EC_HOST_EVENT_MASK(EC_HOST_EVENT_MODE_CHANGE) \
| EC_HOST_EVENT_MASK(EC_HOST_EVENT_USB_MUX))
#define MAINBOARD_EC_SMI_EVENTS (EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_CLOSED))
/* EC can wake from S5 with lid or power button */
#define MAINBOARD_EC_S5_WAKE_EVENTS \
(EC_HOST_EVENT_MASK(EC_HOST_EVENT_LID_OPEN) \
| EC_HOST_EVENT_MASK(EC_HOST_EVENT_POWER_BUTTON))
/* EC can wake from S3 with lid, power button or mode change event */
#define MAINBOARD_EC_S3_WAKE_EVENTS \
(MAINBOARD_EC_S5_WAKE_EVENTS \
| EC_HOST_EVENT_MASK(EC_HOST_EVENT_AC_CONNECTED) \
| EC_HOST_EVENT_MASK(EC_HOST_EVENT_AC_DISCONNECTED) \
| EC_HOST_EVENT_MASK(EC_HOST_EVENT_KEY_PRESSED) \
| EC_HOST_EVENT_MASK(EC_HOST_EVENT_MODE_CHANGE))
#define MAINBOARD_EC_S0IX_WAKE_EVENTS (MAINBOARD_EC_S3_WAKE_EVENTS)
/* Log EC wake events plus EC shutdown events */
#define MAINBOARD_EC_LOG_EVENTS \
(EC_HOST_EVENT_MASK(EC_HOST_EVENT_THERMAL_SHUTDOWN) \
| EC_HOST_EVENT_MASK(EC_HOST_EVENT_BATTERY_SHUTDOWN) \
| EC_HOST_EVENT_MASK(EC_HOST_EVENT_PANIC))
/*
* ACPI related definitions for ASL code.
*/
/* Set GPI for SCI */
#define EC_SCI_GPI GEVENT_3 /* eSPI system event -> GPE 3 */
/* Enable LID switch and provide wake pin for EC */
#define EC_ENABLE_LID_SWITCH
#define EC_ENABLE_WAKE_PIN GEVENT_5 /* AGPIO 11 -> GPE 5 */
/* Enable Tablet switch */
#define EC_ENABLE_TBMC_DEVICE
#define SIO_EC_MEMMAP_ENABLE /* EC Memory Map Resources */
#define SIO_EC_HOST_ENABLE /* EC Host Interface Resources */
#define SIO_EC_ENABLE_PS2K /* Enable PS/2 Keyboard */
/* Enable EC sync interrupt */
#define EC_ENABLE_SYNC_IRQ_GPIO
/* EC sync irq */
#define EC_SYNC_IRQ GPIO_84
/* Enable EC backed PD MCU device in ACPI */
#define EC_ENABLE_PD_MCU_DEVICE
/* Enable EC backed Keyboard Backlight in ACPI */
#define EC_ENABLE_KEYBOARD_BACKLIGHT
#endif /* __MAINBOARD_EC_H__ */

View File

@@ -0,0 +1,11 @@
/* SPDX-License-Identifier: GPL-2.0-or-later */
#ifndef __BASEBOARD_GPIO_H__
#define __BASEBOARD_GPIO_H__
#include <soc/gpio.h>
/* SPI Write protect */
#define CROS_WP_GPIO GPIO_138
#endif /* __BASEBOARD_GPIO_H__ */

View File

@@ -3,4 +3,26 @@
#ifndef __BASEBOARD_VARIANTS_H__
#define __BASEBOARD_VARIANTS_H__
#include <amdblocks/gpio.h>
/*
* This function provides base GPIO configuration table. It is typically provided by
* baseboard using a weak implementation. If GPIO configuration for a variant differs
* significantly from the baseboard, then the variant can also provide a strong implementation
* of this function.
*/
void variant_base_gpio_table(const struct soc_amd_gpio **gpio, size_t *size);
/*
* This function allows variant to override any GPIOs that are different than the base GPIO
* configuration provided by variant_base_gpio_table().
*/
void variant_override_gpio_table(const struct soc_amd_gpio **gpio, size_t *size);
/* This function provides GPIO init in bootblock. */
void variant_bootblock_gpio_table(const struct soc_amd_gpio **gpio, size_t *size);
/* This function provides GPIO settings before entering sleep. */
void variant_sleep_gpio_table(const struct soc_amd_gpio **gpio, size_t *size);
#endif /* __BASEBOARD_VARIANTS_H__ */

Some files were not shown because too many files have changed in this diff Show More