Compare commits

...

611 Commits

Author SHA1 Message Date
Jeremy Soller
29f9270d39 darp7 SD card does not support RTD3
Change-Id: Ie393e9cd42f58d2b3b7172c99b9cd5a1b3a41d87
2020-12-28 09:30:35 -07:00
Jeremy Soller
b625b0db73 Disable invalid PLD group
Change-Id: I2c8f8aa405a34e56ba1bd8f38b35447bed999a5e
2020-12-22 14:45:08 -07:00
Jeremy Soller
d0dbaebd28 Fixes for S0ix
Change-Id: I293b4219332f6ea58f81a231a613b03b74f5e1c4
2020-12-22 14:28:06 -07:00
Jeremy Soller
7e69c5aae8 Fix PLD groups
Change-Id: I6b0aaab65350a6588cee7956f9a2d2d773bf458a
2020-12-22 14:27:20 -07:00
Jeremy Soller
7bb6096cb5 Enable darp7 color keyboard
Change-Id: I839e32dfea4a3c26f49da8b0aeb92bff711c7a9a
2020-12-22 13:26:01 -07:00
Jeremy Soller
5cf1e853cc Add darp7
Change-Id: I8c47a18095ad19f907c9018952dec551865e27fe
2020-12-22 11:32:42 -07:00
Jeremy Soller
6690cc7c7a Ensure that GPU SSID is restored
Change-Id: Iada67ff9b7d882167ca2047a1618230e73d4300d
2020-12-15 10:09:48 -07:00
Jeremy Soller
ebf03eb621 Fix galp5 integrated graphics mode
Change-Id: I3f46b0fd1e5c66ace2f0c45fa9e4bc580d907547
2020-12-14 14:59:13 -07:00
Jeremy Soller
776cb6366b Do not ping GPU_EVENT
Change-Id: I07f0852d57a1cc52f8595c06960db6e7dc78ce76
2020-12-08 09:07:39 -07:00
Jeremy Soller
36f3b1af84 Enable galp5 NVIDIA GPU
Change-Id: I9dd1a7b0150672925bf454202947ccace8b0edb7
2020-12-08 09:05:34 -07:00
Jeremy Soller
3b186d8baf Add debugging and _PR3 linkage for RTD3 driver
Change-Id: I243e0d8a65f682b1a68af68fa911c8fb8e000cb0
2020-12-08 09:03:52 -07:00
Jeremy Soller
5fbdab4ddb Remove invalid writes to set TCSS D3 2020-12-03 21:32:32 -07:00
Jeremy Soller
fd716f3457 Casually disable TBT RTD3
Change-Id: Ia20aded6de9769d9e69a374e67b7ceb569169bc5
2020-12-03 20:39:14 -07:00
Jeremy Soller
8d4dd30363 Use 9KB VBT
Change-Id: I19017f4af04bde2b681255a32a9ffc073deb4f62
2020-12-03 13:17:49 -07:00
Jeremy Soller
c6f49ca48a Revert removal of MMCONFIG
Change-Id: I22be03d5714b58bd19fdf0cd126487b1e72d7473
2020-12-03 11:03:30 -07:00
Jeremy Soller
a20126a4b3 Use SCI to wake from suspend whe on TGL models
Change-Id: I153a9627b846516404b8fd2dceb86872307eecd2
2020-12-03 09:08:25 -07:00
Jeremy Soller
869eebbbb5 Hide MMCONFIG on TGL and set VBT to 8KB
Change-Id: I46d9535266e2ca1946213d899ddecc1b426d2294
2020-12-03 08:45:48 -07:00
Jeremy Soller
bbfea8bd39 Merge remote-tracking branch 'upstream/master' into HEAD
Change-Id: Id25620ddd031ef761b2f7962acb6682223c9753b
2020-12-02 20:42:22 -07:00
Jeremy Soller
d95db48cd7 Re-enable lpit 2020-12-02 15:59:24 -07:00
Felix Held
ab0d85c987 soc/amd/stoneyridge: align AOAC code with Picasso
In commit 09d50671e6 the AOAC code was
reworked for Picasso and this patch ports this back to Stoneyridge to
facilitate factoring out the functionality into common code.

Change-Id: I836b91dc647987d064170fff7c8ca6ef2ee49211
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48181
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2020-12-01 20:59:32 +00:00
Felix Held
0d57f42e83 soc/amd/picasso/aoac: make aoac_devs array unsigned
The numbers in the array are unsigned, so use an unsigned type there.

Change-Id: I9a85594de0e4c53db965ab84239f19eb46432348
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48180
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2020-12-01 20:59:19 +00:00
Felix Held
9bc16ed856 soc/amd/picasso/aoac: fix typo in comment
The power_off_aoac_device function clears the FCH_AOAC_PWR_ON_DEV bit,
so the comment should be that it powers off the devices.

Change-Id: Ia5e5d80b1977c3f53fcd9cf6d48bdb59045dfc3c
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48155
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2020-12-01 18:07:33 +00:00
Patrick Rudolph
ee38ccecf8 soc/intel/common/block/smm/smihandler: Fix compilation under x86_64
Change-Id: Ie44ded11a6a9ddd2a1163d2f57dad6935e1ea167
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48172
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-12-01 16:02:19 +00:00
Patrick Rudolph
ed5835a04d soc/intel/common/block/cpu/car/exit_car: Fix compilation on x86_64
Change-Id: Ieac4a4924ff4684b2a419471cd54e3d3b1f5bbe6
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48171
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-12-01 16:01:58 +00:00
Patrick Rudolph
2b77112e66 soc/intel/common/block/cpu/car/cache_as_ram: Add x86_64 support
Doesn't affect x86_32.
Tested on Intel Skylake. Boots into bootblock and console is working.

Change-Id: I1b36ca8816dab9d30754aadd230c136978e3b344
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48170
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-12-01 16:01:44 +00:00
Patrick Rudolph
0e3884cfff drivers/aspeed/common/ast: Fix compilation under x86_64
Change-Id: I5fb6594ff83904df02083bcbea14b2d0b89cd9dd
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48169
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-12-01 16:01:31 +00:00
Patrick Rudolph
90fda02f60 drivers/intel/fsp2_0/notify: Fix compilation under x86_64
Change-Id: Id63b9b372bf23e80e25b7dbef09d1b8bfa9be069
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48168
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-12-01 16:01:19 +00:00
Patrick Rudolph
3805354ff9 soc/intel/common/block/systemagent: Fix compilation on x86_64
Change-Id: Ibc8dc1cf33f594284edb82d4730967e077739c3c
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48167
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-12-01 16:01:10 +00:00
Patrick Rudolph
2dbbb83ae4 lib/reg_script: Add cast to fix compilation on x86_64
Change-Id: Ia713e7dbe8c75b764f7a4ef1a029e64fb2d321fb
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48166
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-12-01 16:00:57 +00:00
Patrick Rudolph
429c77a5e3 cpu/x86/early_reset: Mark assemblycode as 32bit
Allows to compile the file under x86_64 without errors.

The caller has to make sure to call the functions while in protected
mode, which is usually the case in early bootblock.

Change-Id: Ic6601e2af57e0acc6474fc3a4297e3d2281decd6
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48165
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-12-01 16:00:40 +00:00
Patrick Rudolph
983ea18f17 cpu/intel/microcode: Mark assemblycode as 32bit
Allows to compile the file under x86_64 without errors.

The caller has to make sure to call the functions while in protected
mode, which is usually the case in early bootblock.

Change-Id: Ic6d98febb357226183c293c11ba7961f27fac40c
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48164
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-12-01 16:00:34 +00:00
V Sowmya
a99f61fec4 mb/intel/jslrvp: Modify the flash layout for fsp debug build
Current flash layout doesn't support the fsp debug builds since
the FW_MAIN_A/B doesn't have enough space to hold the fsp debug
binaries along with ME RW binaries.
This patch reduces the SI_ALL size to 3.5MiB and increase the
SI_BIOS to 12.5MiB to include both ME RW and FSP debug binaries.

BRANCH=dedede
TEST=Build and Boot jslrvp with fsp debug enabled coreboot.

Cq-Depend: chrome-internal:3425366
Change-Id: I6f6354b0c80791f626c09dabafe33eefccedb9c2
Signed-off-by: V Sowmya <v.sowmya@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48154
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
Reviewed-by: Ronak Kanabar <ronak.kanabar@intel.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2020-12-01 15:27:01 +00:00
Martin Roth
e2ce56928c mb/google/zork: Mark RW_MRC_CACHE as "Preserve"
AGESA checks to make sure that the firmware version reading the MRC
cache is the same version that wrote it, so it doesn't need to be
erased during a firmware update.

BUG=b:173724014
TEST=Flash firmware to DUT, update firmware, check RW_MRC_CACHE was
not erased
BRANCH=Zork

Signed-off-by: Martin Roth <martin@coreboot.org>
Change-Id: Ice3d1d467c25366b7ef678cd6481d043f62644ca
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47776
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2020-12-01 15:24:13 +00:00
Patrick Rudolph
a169550479 cpu/x86/sipi: Add x86_64 support
Enter long mode on secondary APs.

Tested on Lenovo T410 with additional x86_64 patches.
Tested on HP Z220 with additional x86_64 patches.

Still boots on x86_32.

Change-Id: I53eae082123d1a12cfa97ead1d87d84db4a334c0
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45187
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2020-12-01 14:53:44 +00:00
Felix Singer
45dc92a8c2 mb/kontron/mal10: Use the system library for headers
Use the system library for header files instead of relative filesystem
paths.

Built with BUILD_TIMELESS=1, coreboot.rom remains the same.

Signed-off-by: Felix Singer <felixsinger@posteo.net>
Change-Id: I0b356d0188f104d7c49571ce5c8fe65e79589123
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48141
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
2020-12-01 13:47:39 +00:00
Felix Singer
fee6974452 mb/kontron/mal10/Kconfig: Reorder selects alphabetically
Built with BUILD_TIMELESS=1, coreboot.rom remains the same.

Signed-off-by: Felix Singer <felixsinger@posteo.net>
Change-Id: Id78c478a1252099cd1aa42c62efd406e7e1c5ef8
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48140
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
2020-12-01 13:47:20 +00:00
Felix Singer
3c02ed9cb6 MAINTAINERS: Add missing trailing slashes
Add missing trailing slashes so that Gerrit recognizes maintainers
correctly.

Signed-off-by: Felix Singer <felixsinger@posteo.net>
Change-Id: I35fcaf41617247e2b86cd6ddd7ee1b319a695797
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48137
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-12-01 13:46:54 +00:00
Tim Chu
39ea223249 mb/ocp/deltalake: Update SMBIOS type 8 information
Update port connector information for Delta Lake.

Tested=Execute "dmidecode -t 8" to check all the information of
SMBIOS type 8 is correct.

Signed-off-by: Tim Chu <Tim.Chu@quantatw.com>
Change-Id: I880bb9a5a41077172423f78b56c19aadd93e001f
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47893
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jonathan Zhang <jonzhang@fb.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-12-01 08:04:30 +00:00
Subrata Banik
f5c3e29bdf ec/google/chromeec/acpi: Make OperationRegion brace align
Inject TAB to make OperationRegion closing brace align with
opening brace.

Change-Id: Idb9f23cf6a2c249fb1fd02f4a2ac314d4f7e180b
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48149
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-12-01 08:00:23 +00:00
Subrata Banik
52fabb1247 mb/intel/adlrvp: Remove unused EC_SYNC_IRQ GPIO on ADLRVP
As per latest schematics GPP_A15 is not used for EC_SYNC_IRQ
hence remove the unused GPIO.

Wrong GPIO configuration is causing platform reboot issue on
ADLRVP with Chrome SKU.

Change-Id: I704cd722683258c80197d8872d3bdaafb7c923dc
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48131
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: V Sowmya <v.sowmya@intel.com>
2020-12-01 08:00:09 +00:00
Varshit Pandya
5e1d4dd947 mb/intel/adlrvp: Add ASL support for WFC annd UFC
1. Add 2 ports and 2 endpoints
2. Add support for OVTI5675

WFC Cam is on I2C5 and UFC is on I2C1
BUG=None
BRANCH=None
TEST=Build and Boot adlrvp board and able to capture image
using camera.

Signed-off-by: Varshit Pandya <varshit.b.pandya@intel.com>
Change-Id: I6d2a4fdca99354d1b6977233c70ccd950c99d8a2
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47497
Reviewed-by: V Sowmya <v.sowmya@intel.com>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-12-01 07:59:52 +00:00
Varshit Pandya
e9695f0d70 mb/intel/adlrvp: Configure Camera related GPIO as per schematics
Configure RST and PWR_EN signals for both WFC and UFC

Signed-off-by: Varshit Pandya <varshit.b.pandya@intel.com>
Change-Id: Ie416da373756b1c73472b8572f87930965a3d6ec
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47496
Reviewed-by: V Sowmya <v.sowmya@intel.com>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-12-01 07:59:23 +00:00
Varshit Pandya
1ce5f5827d mb/intel/adlrvp: Update GPIO configuration as per schematics
Configure I2C related GPIO as per ADL-P schematics.
This is based on Revision 0.974 of schematics.

Signed-off-by: Varshit Pandya <varshit.b.pandya@intel.com>
Change-Id: I76e1207cb31bed10b6e9fbeb2456b6feec42f97e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47495
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: V Sowmya <v.sowmya@intel.com>
2020-12-01 07:58:57 +00:00
Subrata Banik
840679d2c1 mainboard/intel/adlrvp: Enable PCH PCIe device over x1 slot
List of changes:
1. Enable Root Port 8 aka 0:0x1c:7
2. Assign free running clock for RP8
3. Apply W/A to get card detected on x1 slot
- Drive OEB 7:GPP_A7 and OEB 6:GPP_E5 low

TEST=Able to detect PCIe SD card over x1 slot
localhost ~ # dmesg | grep mmc
[ 3.643755] mmc0: SDHCI controller on PCI [0000:02:00.0] using ADMA
[ 3.825201] mmc0: new ultra high speed DDR50 SDHC card at address 17f8
[ 3.835452] mmcblk0: mmc0:17f8 SE16G 14.4 GiB
[ 3.849158] mmcblk0: p1

Change-Id: Ibea37b8de4dd020ff0108ec90ea6f8bcfaa4fb17
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48080
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: V Sowmya <v.sowmya@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-12-01 07:52:26 +00:00
Subrata Banik
0f044a5007 mainboard/intel/adlrvp/spd: Update SPD for LP4x SKU
List of changes in SPD:
1. SPD Revision (of JEDEC spec)
2. SDRAM Maximum Cycle Time (tCKAVGmax) (MTB)
3. MSB -> CAS Latencies Supported, First Byte
4. CAS Latencies Supported, Second Byte
5. CAS Latencies Supported, Third Byte
6. LSB -> CAS Latencies Supported, Fourth Byte
7. Minimum CAS Latency Time (tAAmin)
8. Fine Offset for SDRAM Maximum Cycle Time (tCKAVGmax)
9. Fine Offset for SDRAM Minimum Cycle Time (tCKAVGmin)
10.Cyclical Redundancy Code (0- 125 byte)

TEST=Able to build and boot with updated SPD.

Change-Id: Iae7f2693e87bffb2dfa20bd07b22f4a4768c56cb
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48079
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: V Sowmya <v.sowmya@intel.com>
2020-12-01 07:49:58 +00:00
Sridhar Siricilla
ae81d59eca mb/intel/adlrvp: Add support for LPDDR5
This patch adds LPDDR5 memory configuration parameters to FSP.

TEST=Able to pass FSP-M MRC training on LPDDR5 RVP.

Signed-off-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
Change-Id: I787bf97dd6c244bd3b0662e5bd061a2da80baa90
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46899
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: V Sowmya <v.sowmya@intel.com>
2020-12-01 07:49:47 +00:00
Subrata Banik
4cb8776c31 mb/intel/adlrvp: Refactor lpddr4_mem_config structure
List of changes:
1. Initialize dq_map array in a single line
2. Make dqs_map array also in a single line

TEST=Able to build and boot ADLRVP LP4 SKU.

Change-Id: I64f2b38492934c8ede301f4b252c8700060ed4ac
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48077
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: V Sowmya <v.sowmya@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-12-01 07:49:32 +00:00
Yu-Ping Wu
3c729487bf Makefile.inc: Alloc .bss* sections for "struct" file type
When the global variable of a "struct" CBFS file is zero (for example,
CB:47696), the binary will appear in the .bss* section in the ELF file
(instead of .data). This results in an empty binary file added to CBFS,
so that file size check will fail when reading it at runtime.

BUG=b:173751635
TEST=emerge-asurada coreboot
TEST=Check sdram-lpddr4x-KMDP6001DA-B425-4GB is non-empty in CBFS
BRANCH=none

Change-Id: Idfd17d10101a948de0eb0522a672afd5c2f83b04
Signed-off-by: Yu-Ping Wu <yupingso@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47903
Reviewed-by: Julius Werner <jwerner@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-12-01 07:31:22 +00:00
Paul Fagerburg
679b236bed util/mb/google/puff: remove HECI from overridetree
The template for overridetree.cb includes HeciEnabled, which has
been removed from the CNL config struct, so remove it from the
overridetree.

BUG=b:174360951
TEST=`new_variant_fulltest.sh puff` succeeds

Signed-off-by: Paul Fagerburg <pfagerburg@google.com>
Change-Id: I87f67c53cc75d9ddd40b4960739180a95de6ecd6
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48129
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Edward O'Callaghan <quasisec@chromium.org>
2020-12-01 01:25:17 +00:00
Felix Singer
617150e0ff mb/siemens/chili: Configure GPIOs in gpio.c
Get rid of variant_gpio_table() and configure GPIOs in gpio.c instead
of passing data around.

Change-Id: Ib158d6bdbcbceb3c1dc4f47fc7c3e098b9c7e5c4
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47974
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-30 23:08:50 +00:00
Felix Singer
e8774933d3 mb/siemens/chili: Introduce include folder for header files
Use include folder for header files allowing proper includes.

Change-Id: I80066fb925b918d040062397e633c5d499a50dbe
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47973
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-30 23:08:31 +00:00
Felix Singer
48b80c134a mb/kontron/bsl6: Configure GPIOs using mainboard_ops
Hook up the mainboard_ops driver and configure the GPIOs using .init,
since mainboard_silicon_init_params() is meant for the configuration of
the FSP, not the GPIOs.

Change-Id: I6ab8d258c6f81c90d835cb8d07c6387d3de76d85
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47850
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-30 23:08:17 +00:00
Felix Singer
3616e9c3b0 soc/intel/skylake: Fix comment
mainboard_silicon_init_params() is *not* meant for configuring GPIOs. It
should only be used to configure FSP options, which can not be
configured elsewhere.

Change-Id: Ia92d0d173af9c67600e93b473480967304772998
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48008
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-30 22:20:46 +00:00
Patrick Georgi
36c2ea4a63 util/pgtblgen: Improve compatibility
Fix build on Debian/jessie

Change-Id: I987e7a03441b40ab06ccd54a21e38aac81a1c28d
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48004
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2020-11-30 21:51:05 +00:00
Jeremy Soller
4dd22de634 Restore changes to TCSS ASL
Change-Id: I8e6093f117f5e5aa453a739b88d1d6fc3fed6598
2020-11-30 14:08:14 -07:00
Felix Held
e2cb8696f0 soc/amd/picasso: remove PICASSO_LPC_IOMUX Kconfig option from SoC
PICASSO_LPC_IOMUX was only used in the amd/mandolin board, but not in
the corresponding SoC code, so remove it from the SoC's Kconfig and
reanme it in the mainboard's Kconfig to MANDOLIN_LPC.

Change-Id: I261e093d6c56be6073a816b79c60d3a0457616f8
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47891
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2020-11-30 19:17:29 +00:00
Jeremy Soller
b69fba193b Enable UART on lemp10
Change-Id: If82418b9dfcb63dfb7fdd192107d3f6b3d77d3b9
2020-11-30 11:40:55 -07:00
Jeremy Soller
fd8c25ab61 Re-enable UART on galp5, default to disabled NVIDIA GPU
Change-Id: I7dffdce4d213f083f1742695943fcff0c4859e80
2020-11-30 10:56:45 -07:00
Felix Held
ffb4652461 soc/amd/picasso: remove unused AMDFW_OUTSIDE_CBFS Kconfig option
The corresponding functionality in the SoC's Makefile.inc was removed in
commit ef3395d990

Change-Id: Iba84d9deb155ce314b3a3588781752b83a21486b
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47890
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2020-11-30 17:55:10 +00:00
Felix Held
0aada3cddb soc/amd: move bootblock inside main SoC directories
There's no need to have the bootblock in its own sub-directory, so move
it to each SoC's main directory to avoid clutter. This makes soc/amd
more consistent with the coreboot code base in src/northbridge,
src/southbridge and src/soc with the exception of src/soc/intel.

Change-Id: I78a9ce1cd0d790250a66c82bb1d8aa6c3b4f7162
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47982
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-30 17:54:22 +00:00
Jeremy Soller
c051009031 WIP: Revert changes that may cause TBT RTD3 issues
Change-Id: I8ada670bc06af11b79c721fcf39ed3bdfa362b17
2020-11-30 10:53:04 -07:00
Frank Chu
de2ba63f47 mb/google/volteer: Create drobit variant
Create the drobit variant of the volteer reference board by copying
the template files to a new directory named for the variant.

(Auto-Generated by create_coreboot_variant.sh version 4.2.0).

BUG=b:171947885
BRANCH=none
TEST=emerge-volteer coreboot

Signed-off-by: Frank Chu <frank_chu@pegatron.corp-partner.google.com>
Change-Id: I63b7312bba236bd5af028359804d042f6850d8ba
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47787
Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-30 17:40:23 +00:00
Jeremy Soller
bf721bef43 Merge remote-tracking branch 'upstream/master' into galp5
Change-Id: Iaa3dca6a7c101b6e006d3487361d8a5b327e6d04
2020-11-30 10:01:26 -07:00
Felix Held
3e22cb6e1c soc/amd/common/vboot: use transfer_buffer_valid function
show_psp_transfer_info reimplemented the functionality of
transfer_buffer_valid, so use replace that with a function call.

Change-Id: Ie3d373b10bdb0ab00640dabeea12b13ec25406cc
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47977
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2020-11-30 16:29:14 +00:00
Felix Held
cd50715e03 soc/amd: move vboot-on-PSP-related functions to common/vboot
Change-Id: I4f07d3ab12116229a13d2e8c02b2deb06e51a1af
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47976
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2020-11-30 16:28:56 +00:00
Felix Held
9900c4f0b0 soc/amd: move vboot bootblock functions to common folder
Change-Id: I9e9fed26a686b8f90797687dd720902be48dae72
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47975
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2020-11-30 16:28:32 +00:00
Felix Held
84eb61c32c soc/amd: move assembly part of non-CAR bootblock to common directory
There will be more files added to the common non-CAR Makefile.inc, so
use an ifeq statement there.

Change-Id: I1f71954d27fbf10725387a0e95bc57f5040024cc
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47880
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
2020-11-30 16:28:13 +00:00
Felix Held
21cdf0de08 soc/amd/common: introduce SOC_AMD_COMMON_BLOCK_PCI_MMCONF
Add a Kconfig symbol for including the PCIe MMCONF setup function in the
build and select it when SOC_AMD_COMMON_BLOCK_PCI is selected and in the
southbridges call enable_pci_mmconf(), but don't select
SOC_AMD_COMMON_BLOCK_PCI.

Change-Id: I32de7450bff5b231442f9f2094a18ebe01874ee7
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47878
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-30 16:27:52 +00:00
Arthur Heymans
4b84a2c8a2 drivers/intel/fsp2_0: Remove console in weak function
This pollutes the log on all platforms not implementing an override.

Change-Id: I0d8371447ee7820cd8e86e9d3d5e70fcf4f91e34
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48128
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-30 08:09:13 +00:00
Meera Ravindranath
2ac88f2347 mb/google/dedede: Update Imon slope and Offset Value for Drawcia
Updating Imon slope and offset values as per recommendation of
ODM based on calibaration.
Updating Imon slope to 1.0 and offset to 1.4

BUG=b:167294777
BRANCH=dedede
TEST=Boot dedede platform and confirm values in FSP.

Change-Id: I3eb32218040163f0abef9b8dd4c52efb16289fe7
Signed-off-by: Meera Ravindranath <meera.ravindranath@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48072
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Vinay Kumar <vinay.kumar@intel.com>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
2020-11-30 08:08:59 +00:00
Raymond Chung
eee1f4387a mb/google/dedede: Create sasuke variant
Create the sasuke variant of the waddledoo reference board by
copying the template files to a new directory named for the variant.

(Auto-Generated by create_coreboot_variant.sh version 4.3.1).

BUG=b:172104731
BRANCH=None
TEST=util/abuild/abuild -p none -t google/dedede -x -a
make sure the build includes GOOGLE_SASUKE

Signed-off-by: Raymond Chung <raymondchung@ami.corp-partner.google.com>
Change-Id: I29405d63fd266224807e535c3f86a2ad5ab8cdf3
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48112
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Henry Sun <henrysun@google.com>
Reviewed-by: SH Kim <sh_.kim@samsung.corp-partner.google.com>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
2020-11-30 08:08:47 +00:00
Mike Banon
4ae881a576 lenovo/g505s: remove the unused and not present devices
Remove the devices unused or not present on this laptop.

Signed-off-by: Mike Banon <mikebdp2@gmail.com>
Change-Id: I0decad499dfbb5f1e0a189d21f0fca47c80bd490
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47913
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-11-30 08:08:22 +00:00
Frank Chu
ae99ea5f08 mb/google/volteer/variants/delbin: Enhance I2C5 bus freq closer 400 kHz
The current I2C5 bus frequency is 367 kHZ, which does not meet the spec.
This change updates scl_lcnt, scl_hcnt, scl_hcnt value for I2C5 to bring
the bus frequency closer to 400kHz.

BUG=b:173670150
TEST=Verified that I2C5 frequency is between 386-387kHz.

Signed-off-by: Frank Chu <frank_chu@pegatron.corp-partner.google.com>
Change-Id: I6d60abe15645dc51ed9ee30975d2521b8940c2d0
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47736
Reviewed-by: Zhuohao Lee <zhuohao@google.com>
Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-30 08:07:50 +00:00
Tim Wawrzynczak
092813a50c soc/intel/alderlake: Add initial chipset.cb
Similar to the chipset.cb for TGL, this patch gives alias names to all
of the published PCI devices.

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: I6576ef4237c1fc8439795ad5b64b1840504edf73
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48009
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-30 08:07:26 +00:00
Bora Guvendik
2821cb498b include/device/pci_ids.h: Fix device id for gspi2
Device ID for "D18:F6 - GSPI #2" shoud be 0xA0FB

BUG=none
TEST=Boot to OS, verify SSDT

Signed-off-by: Selma BENSAID <selma.bensaid@intel.com>
Signed-off-by: Bora Guvendik <bora.guvendik@intel.com>
Change-Id: I0d814170d24ff1b989eceb1d9ebdf6134df85e2e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48060
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-30 08:07:00 +00:00
Tim Wawrzynczak
c67e3c1a90 soc/intel/tigerlake: Add some helper macros for accessing TCSS DMA devices
Change-Id: I6289d2049fbbb6bb532be3d9e2355c563ec98d1b
Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47410
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2020-11-30 08:06:13 +00:00
Tim Wawrzynczak
f1b4a7c9d4 elog: Add new wake source codes
Tiger Lake introduces new wake-capable devices, including thunderbolt
ports, TCSS XHCI & XDCI as well as DMA ports. Add new ELOG_WAKE_SOURCE
macros for each of these types of devices.

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: Ie5dae6514c2776b30418a390c4da53bda0b2d456
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47395
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
2020-11-30 08:05:55 +00:00
Frans Hendriks
f90056268f util/docker/Makefile: Add missing separator
Build using docker results in error: Makefile:86: *** missing separator.

Add space after ifeq.

Tested: Building Facebook FBG1701 binary.

Change-Id: Ib42abe966e67dac380173ec982c9f6bd4cf074cc
Signed-off-by: Frans Hendriks <fhendriks@eltan.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47992
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Wim Vervoorn <wvervoorn@eltan.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-11-30 08:05:29 +00:00
Nick Vaccaro
b38ca863d9 mb/google/volteer/variant/copano: Add memory part support
Add support for the following 5 LPDDR4x memory parts:
- MT53E512M64D4NW-046 WT:E
- H9HCNNNCRMBLPR-NEE
- MT53D1G64D4NW-046 WT:A
- H9HCNNNFBMBLPR-NEE
- MT53D512M64D4NW-046 WT:F

DRAM Part Name                 ID to assign
-------------------------------------------
MT53E512M64D4NW-046 WT:E       0 (0000)
H9HCNNNCRMBLPR-NEE             0 (0000)
MT53D1G64D4NW-046 WT:A         1 (0001)
H9HCNNNFBMBLPR-NEE             2 (0010)
MT53D512M64D4NW-046 WT:F       0 (0000)

BUG=b:172993397
TEST=none

Change-Id: Iff8f6257c6cff77fc3f0bda7e75434f9f4de1777
Signed-off-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47981
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-30 08:03:45 +00:00
Nick Vaccaro
ace29dff9e lp4x: Add new memory parts and generate SPDs
Add MT53D512M64D4NW-046 WT:F memory part to LP4x global list of
available LP4x parts and to the global JSON file containing LP4x parts
and their characteristics.

BUG=b:172993397
TEST=none

Change-Id: I09c6eab640c169dbdb451964967d14a31e314496
Signed-off-by: Nick Vaccaro <nvaccaro@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47980
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Rob Barnes <robbarnes@google.com>
2020-11-30 08:03:35 +00:00
Angel Pons
13c50005c5 mb/prodrive/hermes: Use PCH_DEV_SMBUS definition
This allows dropping ugly preprocessor usage from this file.

Change-Id: Idb66d295129d98725f38d11ac162978418bd94c2
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47959
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2020-11-30 08:03:18 +00:00
Angel Pons
fe17a8cd6a mb/prodrive/hermes: Encapsulate GPIO setup
Having variants' gpio.c call the `gpio_configure_pads` function results
in an API that does not need to pass data around, which is much simpler.

Change-Id: I1064dc6258561bcf83f0e249d65b823368cf0d31
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47958
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by:  Felix Singer <felixsinger@posteo.net>
2020-11-30 08:02:09 +00:00
Angel Pons
329ebb340b mb/prodrive/hermes: Use C-style comments
Most of the existing comments are C-style already.

Change-Id: I9ca4779f5b0560320e9bce4f33e54766522689f9
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47957
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by:  Felix Singer <felixsinger@posteo.net>
2020-11-30 08:01:57 +00:00
Pratik Prajapati
1e67816961 inteltool: Add support to print TME/MKTME status
Print whether the SOC supports TME/MKTME. If the SOC supports the
feature, print the status of enable and lock bit from TME_ACTIVATE
MSR. -t option prints this status.

Sample output:

If TME/MKTME is supported:
============= Dumping INTEL TME/MKTME status =============
TME supported : YES
TME locked    : YES
TME enabled   : YES
====================================================

If TME/MKTME is not supported:
============= Dumping INTEL TME status =============
TME supported : NO
====================================================

Signed-off-by: Pratik Prajapati <pratikkumar.v.prajapati@intel.com>
Change-Id: I584ac4b045ba80998d454283e02d3f28ef45692d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45088
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2020-11-30 08:01:38 +00:00
Felix Held
41220cd245 soc/amd/common: add comments and FIXME to Makefile.inc files
Change-Id: Ie347ee508acd900353467b4a3e0a5d1928b110e1
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47877
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-30 08:00:19 +00:00
Felix Held
870e44a7b9 soc/amd/common: simplify conditionals in Makefiles
If there are multiple statements that are conditional on the same
Kconfig option, group them and move the condition check around the
statement. If there's only one statement depending on one condition, use
the short form instead.

Change-Id: I89cb17954150c146ffc762d8cb2e3b3b374924de
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47876
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-30 07:59:55 +00:00
Felix Held
63d36bc733 soc/amd/common/block/cpu: move CAR-specific Makefile to sub-directory
Since there are sub-directories for both the cache-as-RAM case and the
non-CAR case where the RAM is already initialized when the x86 cores are
released from reset, move the CAR-specific parts of the Makefile.inc to
another Makefile.inc in the car sub-directory. Further patches will add
a Makefile.inc to the non-CAR directory.

Change-Id: I43a3039237d96e02baa33488e71c5f24effe8359
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47875
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-30 07:59:02 +00:00
Angel Pons
5ad4206e72 drivers/intel/i210: Request Bus Master in .final ops
Commit bd31642ad8 (intel/i210: Set bus master bit in command register)
is only necessary because a buggy OS expects Bus Master to be set, not
because the hardware requires Bus Master during initialization. It is
thus safe to defer the Bus Master request into the .final callback.

Change-Id: Iecfa6366eb4b1438fd12cd9ebb1a77ada97fa2f6
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47401
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by:  Felix Singer <felixsinger@posteo.net>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Tested-by: siemens-bot
2020-11-30 07:58:13 +00:00
Angel Pons
45eeae4f8f mb/siemens/mc_apl1: Deduplicate wait_for_legacy_dev()
There's one copy of this function for all variants except mc_apl4. Move
one copy into common mainboard.c and exit early if running on mc_apl4.

Change-Id: I4e35b58adc074831ccec433b8e014db0695b955e
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47402
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
2020-11-30 07:57:36 +00:00
Angel Pons
afb60e7112 mb/siemens/mc_apl1: Simplify is_mac_adr_valid() logic
A MAC address that is neither 00:00:00:00:00:00 nor ff:ff:ff:ff:ff:ff is
considered valid. Instead of using a temporary buffer and memcmp(), use
a single loop that exits as soon as the MAC cannot possibly be invalid.

Change-Id: I2b15b510092860fbbefd150c9060da38aeb13311
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47405
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Mario Scheithauer <mario.scheithauer@siemens.com>
Reviewed-by: Uwe Poeche <uwe.poeche@siemens.com>
2020-11-30 07:56:35 +00:00
Angel Pons
c19a9a5278 drivers/intel/i210: Define MAC_ADDR_LEN
Define and use the MAC_ADDR_LEN macro in place of the `6` magic value.

Change-Id: Icfa2ad9bca6668bea3d84b10f613d01e437ac6a2
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47404
Tested-by: siemens-bot
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
2020-11-30 07:53:22 +00:00
Angel Pons
a9db4bd989 mb/siemens/mc_apl1/mainboard.c: Refactor loop body
Break down multi-line compound conditions into multiple if-statements,
and leverage `continue` statements to avoid nesting multiple checks.

Change-Id: I5edc279a57e25a0dff1a4b42f0bbc88c0659b476
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47403
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Tested-by: siemens-bot
Reviewed-by: Werner Zeh <werner.zeh@siemens.com>
Reviewed-by: Uwe Poeche <uwe.poeche@siemens.com>
2020-11-30 07:53:02 +00:00
Scott Chao
c97a1c0ac8 mb/google/volteer: eldrid: use devtree aliases for PMC MUX connectors
Now that soc_get_pmc_mux_device() is gone, the PMC MUX connector devices
can be hooked up together via devicetree aliases.

BUG=b:172528109
BRANCH=firmware-volteer-13521.B
TEST=built and USB3.0, type-c display work.

Signed-off-by: Scott Chao <scott_chao@wistron.corp-partner.google.com>
Change-Id: Iedf9b972b341064ff62a4443bfa83f69c8c60108
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48066
Reviewed-by: Zhuohao Lee <zhuohao@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-29 22:43:10 +00:00
Furquan Shaikh
d149bfa17f soc/intel: Configure P2SB before other PCH controllers
This change updates bootblock_pch_early_init() to perform P2SB
configuration before any other PCH controllers are initialized. This
is done because the other controllers might perform PCR settings which
requires the PCR base address to be configured. As the PCR base
address configuration happens during P2SB initialization, this change
moves the p2sb init calls before any other PCH controller
initialization.

BUG=b:171534504

Change-Id: I485556be003ff5338b4e2046768fe4f6d8a619a3
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47885
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-by: Subrata Banik <subrata.banik@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-29 17:18:02 +00:00
Sridhar Siricilla
95ee5996f7 soc/intel/alderlake: Add lp5_ccc_config to the board memory configuration
TEST=Able to pass LPDDR5 MRC training with Lp5CccConfig override.

Signed-off-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
Change-Id: I24b1cf50c1b0b945fce75239bac38e40aeb8a83a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47436
Reviewed-by: V Sowmya <v.sowmya@intel.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-29 14:39:06 +00:00
Subrata Banik
3a873b5c9a mb/intel/adlrvp: Disable dq_pins_interleaved for DDR4/5 RVP
TEST=Able to pass MRC training on DDR4/5 SKUs

Change-Id: I38fcb17a1be5a8544a17cef8255631b6abef0741
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48078
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sridhar Siricilla <sridhar.siricilla@intel.com>
Reviewed-by: V Sowmya <v.sowmya@intel.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-11-29 14:23:03 +00:00
Michael Niewöhner
f79f00991c mb/supermicro/x11-lga1151-series: set FADT PM profile to ENTERPRISE_SERVER
Set the FADT PM profile to ENTERPRISE_SERVER, since the currently
supported X11 boards are server boards.

Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Change-Id: I8fb5c7c262fbd3f3c085d7c2e2ef3d6ff6ce73eb
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48088
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-29 07:29:21 +00:00
Michael Niewöhner
c1d1dddbcc mb/supermicro/x11-lga1151-series: rework gpio setup to not use headers
Rework gpio setup for the board series to not use headers but
stage-specific compilation units.

Tested successfully on X11SSM-F.

Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Change-Id: Ic62ce4335af605c081ef288e892441585ff2bd3e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48087
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by:  Felix Singer <felixsinger@posteo.net>
2020-11-29 07:28:56 +00:00
Michael Niewöhner
e88dacfa43 mb/supermicro/x11-lga1151-series: switch from dev.init to mb_ops.init
GPIO needs to be initialized before the IPMI device gets initialized,
so the GPIOs can be read/set by the code in CB:48096 and CB:48094. Thus,
use mainboard_ops.init for GPIO configuration instead of using the
indirection via a mainboard_enable function.

To make it more visible, that we use chip.init, rename `mainboard_init`
to `mainboard_chip_init`.

Tested successfully on X11SSM-F including the IPMI changes.

Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Change-Id: I192e69a34fa262b38bc40a95fb11c22a4041d0ae
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48083
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-11-29 07:27:47 +00:00
Michael Niewöhner
dc811c9ea3 mb/supermicro/x11ssm-f: drop unneeded ITSS override
The ITSS override is not needed for LPC_CLKOUT* pads. Drop it.

Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Change-Id: I3dbbc8944751779151dcd4f92fb870d937801d69
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48084
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-28 12:59:03 +00:00
Michael Niewöhner
1b0d751777 mb/supermicro/x11-lga1151-series: configure gpios in mainboard init
Move gpio configuration from the Fsp callback to mainboard init.

Tested successfully on X11SSM-F.

Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Change-Id: If2a54c75c5243d94cdc025c597ee347820b35d32
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48086
Reviewed-by:  Felix Singer <felixsinger@posteo.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-28 12:58:28 +00:00
Michael Niewöhner
ddd44f4fe9 mb/supermicro/x11-lga1151-series: restructure and clean up devicetree
Drop zero-value devicetree options and move PcieRpEnable options down to
the corresponding devices.

Test: built with TIMELESS=1; binaries remain identical

Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Change-Id: I9285d786e973621a732e2627c734adc930e54207
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48082
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by:  Felix Singer <felixsinger@posteo.net>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-11-28 12:57:51 +00:00
Michael Niewöhner
84fde762e7 soc/intel/skl: correct OC pin skip value for disabled usb ports
Commit 056d552 introduced a bug where 0xFF gets set as OC pin value to
supposedly skip programming an OC pin for a disabled USB port. While the
value is correct for the other platforms, Skylake uses 0x08 for this
purpose. Correct this by using the enum value OC_SKIP (0x08) instead.

Change-Id: I41a8df3dce3712b4ab27c4e6e10160b2207406d1
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48003
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by:  Felix Singer <felixsinger@posteo.net>
2020-11-28 12:57:08 +00:00
Michael Niewöhner
43dd2e458f docs/mb/supermicro/x11-lga-series: Update documentation
- Drop issue about non-working TianoCore with Aspeed NGI. see CB:35726
- Add missing reference to X11SSH-F
- Drop TODO reference; there are no TODOs left

Change-Id: I5becfa9ea01a0d9d651c6b51b30ebfcedb6412a5
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48101
Reviewed-by: Patrick Rudolph <siro@das-labor.org>
Reviewed-by:  Felix Singer <felixsinger@posteo.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-27 20:49:16 +00:00
Michael Niewöhner
4c56d79ba6 {docs/,}mb/supermicro/x11ssh-tf: drop TODO section
Drop the TODO comment, since there is no TODO left. Also drop the now
obsolete TODO section from the board documentation.

Change-Id: I4192aaedc1429c8ff1bd7c52baa4741e1df0d0c5
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48126
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by:  Felix Singer <felixsinger@posteo.net>
2020-11-27 20:49:04 +00:00
Michael Niewöhner
ce04a42db9 docs/mb/supermicro/x11ssm-f: Update board documentation
- Drop vanished issue on PCIe warning
- Drop TODO section, since the TODOs are done
- Document the jumper J6, that was not documented by the vendor. Its
  function has been determined by dissecting a dead board.
- The flash is not socketed anymore. Drop that note and compress the
  whole paragraph. Also add a note about flashing via the BMC web
  interface.

Change-Id: I2b5a08a6b6d80717621d6a30f31829fe4b84891a
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/48125
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by:  Felix Singer <felixsinger@posteo.net>
2020-11-27 20:48:55 +00:00
Arthur Heymans
0f34054964 Makefile.inc: Move adding mcu FIT entries
This can be done using in the INTERMEDIATE target in the proper place.

Change-Id: I28a7764205e0510be89c131058ec56861a479699
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46453
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-by: Christian Walter <christian.walter@9elements.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-27 09:18:20 +00:00
Meera Ravindranath
f71572605a soc/intel/jasperlake: Enable VT-d and generate DMAR Table
Update UPDs required for the creation of DMAR table.

By default coreboot was not generating DMAR table for IOMMU which
was resulting in below error message in kernel:
DMAR: [Firmware Bug]: No DRHD structure found in DMAR table
DMAR: No DMAR devices found
These changes will publish DMAR table through ACPI and will not
result in the above error.

BUG=b:170261791
BRANCH=dedede
TEST=Build Dedede, boot to kernel and check dmesg if DMAR
     table exists.

Signed-off-by: Meera Ravindranath <meera.ravindranath@intel.com>
Change-Id: I97a9f2df185002a4e58eaa910f867acd0b97ec2b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47506
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Maulik V Vaghela <maulik.v.vaghela@intel.com>
2020-11-27 05:10:12 +00:00
Idwer Vollering
99eed832ae util/inteltool: drop OS-specific rdmsr/wrmsr prototypes
The previous commit (that was not touching inteltool.h)
marking internal functions as static is commit 6faccd1f00

Tested on: FreeBSD 13.0-CURRENT r355582

Change-Id: I4aba72f39b528fd70451a4656fd6c835ff766e49
Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/37767
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jacob Garber <jgarber1@ualberta.ca>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-11-26 23:31:46 +00:00
Michael Niewöhner
3044d708f8 drivers/intel/fsp2_0: move the FSP FD PATH option down in menuconfig
Move the FSP FD PATH option down, so it gets shown in place of the split
FD files, when the users chooses to use a full FD binary.

Change-Id: Ie03a418fab30a908d020abf94becbaedf54fbb99
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47999
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2020-11-26 21:57:44 +00:00
Michael Niewöhner
59f06ada68 drivers/intel/fsp2_0: introduce possibility of using a full FD binary
Currently, setting a custom FSP binary is only possible by using split
FSP-T/M/S FD files. This change introduces the possibility to pass a
combined FD file (the "standard" FSP format).

This is done by adding a new boolean Kconfig FSP_FULL_FD, specifying
that the FSP is a single FD file instead of split FSP-T/M/S FD files,
and making FSP_FD_PATH user-visible when the option is chosen. In this
case, the other options for split files get hidden.

When the user chooses to use a full FD file instead of the split ones,
the FD file gets split during build, just like it is done when selecting
the Github FSP repo (FSP_USE_REPO).

Test: Supermicro X11SSM-F builds and boots fine with custom FSP FD set.

Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Change-Id: I1cb98c1ff319823a2a8a95444c9b4f3d96162a02
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47993
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2020-11-26 21:57:33 +00:00
Subrata Banik
905939b3c8 vc/intel/fsp/fsp2_0/alderlake: Update FSP header file version to 1483_11
List of changes:
1. FSP-M Header:
- Adjust UPD Offset for Reservedxx
- Rename UPD Offset UnusedUpdSpace32 -> UnusedUpdSpace29
2. FSP-S Header:
- Rename UPD Offset UnusedUpdSpace46 -> UnusedUpdSpace44

Change-Id: Ia1ef59e4cf6ccce8f48908af51535aea761cd972
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47901
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: V Sowmya <v.sowmya@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-26 18:10:47 +00:00
Jeremy Soller
5ae625110d Merge remote-tracking branch 'upstream/master' into galp5
Change-Id: I3b61b0368544499706b8416d093e1ceedd1143c6
2020-11-25 14:37:36 -07:00
Jeremy Soller
2672659890 Add DRIVERS_INTEL_PMC to galp5
Change-Id: I26b27e887e5e06ae65b8e55e24befa0cf679a20f
2020-11-25 14:33:00 -07:00
FrankChu
8b0c1c8027 mb/google/dedede: Create galtic variant
Create the galtic variant of the waddledee reference board by
copying the template files to a new directory named for the variant.

(Auto-Generated by create_coreboot_variant.sh version 4.3.1).

BUG=b:170913840
BRANCH=None
TEST=util/abuild/abuild -p none -t google/dedede -x -a
make sure the build includes GOOGLE_GALTIC

Signed-off-by: FrankChu <Frank_Chu@pegatron.corp-partner.google.com>
Change-Id: Ie7534d56bc67aca4484f40af1221d669addc01fd
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47900
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-25 21:29:46 +00:00
Jeremy Soller
4f36a5779d Sync USB ACPI and PMC mux to galp5
Change-Id: I3f3d3ad0486ec457960fbda3be5cce05e6a6d748
2020-11-25 13:48:31 -07:00
Jeremy Soller
0304273049 Fix lemp10 USB ACPI
Change-Id: Ie5c558db0de770b92bff4cec77fa52beab428bcb
2020-11-25 13:48:16 -07:00
Jeremy Soller
79f0e60861 Add USB ACPI drivers and re-enable PMC mux
Change-Id: Iec6f0a9ea29cba69fcdb0d708aaa5cc39a9e4f04
2020-11-25 13:33:12 -07:00
Nick Chen
1856effaf2 mb/google/volteer: Update Eldrid USB2 port settings in overridetree
1. Disable M.2 WWAN and Type-A Port A1
2. Change register 4 to 3 and tuning USB2 Port1 eye diagram
3. Lower camera driving

BUG=b:169105751
Signed-off-by: Nick Chen <nick_xr_chen@wistron.corp-partner.google.com>
Change-Id: I6b8a5c0d5e814de232d79a43354f5ec0220fc5ea
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47863
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2020-11-25 18:40:24 +00:00
Patrick Georgi
2f1d686ba6 Update vboot submodule to upstream master
Updating from commit id 9d4053d:
2020-11-20 01:51:08 +0000 - (Revert "Reland: Clean up implicit fall through.")

to commit id 48195e5:
2020-11-24 10:23:45 +0000 - (Makefile: Test for warning flags before using them)

This brings in 3 new commits.

Change-Id: I64f27f346df264cb6eeeb4e3203fcca7d35f7e83
Signed-off-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47906
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Idwer Vollering <vidwer@gmail.com>
2020-11-25 16:26:48 +00:00
Idwer Vollering
5190f42306 util/crossgcc: ensure curl writes downloaded bytes to a file
Commit 82a30a134c (util/crossgcc: Retry package downloads on failure) caused a regression for curl users.

Signed-off-by: Idwer Vollering <vidwer@gmail.com>
Change-Id: I0d946b86baad3f6409a5042701808da307e5bcb7
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47911
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-11-25 16:03:30 +00:00
Tim Chu
9b7dc7645d mb/ocp/deltalake: Define SMBIOS type 16 error correction type by
RasModesEnabled

Use RasModesEnabled from SystemMemoryMapHob to define SMBIOS type
16 error correction type

Tested=Execute "dmidecode -t 16" to check if error correction type
is correct.

Signed-off-by: Tim Chu <Tim.Chu@quantatw.com>
Change-Id: I3636fcc4a874261cf484c10e2db15015ac5d7e68
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47509
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jonathan Zhang <jonzhang@fb.com>
2020-11-25 09:18:25 +00:00
Tim Chu
a96eaf8700 arch/x86/smbios: Update SMBIOS type 16 error correction type
Add weak function for SMBIOS type 16 error correction type.

Tested=Execute "dmidecode -t 16" to check if error correction type
is correct.

Signed-off-by: Tim Chu <Tim.Chu@quantatw.com>
Change-Id: I85b37e9cfd22a78544d03e5506ff92b1f2404f8e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47508
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Reviewed-by: Jonathan Zhang <jonzhang@fb.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-25 09:18:04 +00:00
Matt DeVillier
f7cdb8e3c6 mb/google/hatch: select SOC_INTEL_CSE_LITE_SKU only if CHROMEOS
Selecting SOC_INTEL_CSE_LITE_SKU without conditioning on CHROMEOS
force-selects CHROMEOS, per src/soc/intel/common/block/cse/Kconfig.

Conditioning on CHROMEOS allows for non-ChromeOS targets to be built.

Test: build wyvern variant with CONFIG_CHROMEOS=n

Change-Id: I61c9c78a3b02d64bab2813b7a80915b7ecf7f934
Signed-off-by: Matt DeVillier <matt.devillier@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47725
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-11-25 09:17:21 +00:00
Julius Werner
105cdf5625 cbfstool: Don't add compression attribute for uncompressed files
Our current cbfstool has always added a compression attribute to the
CBFS file header for all files that used the cbfstool_convert_raw()
function (basically anything other than a stage or payload), even if the
compression type was NONE. This was likely some sort of oversight, since
coreboot CBFS reading code has always accepted the absence of a
compression attribute to mean "no compression". This patch fixes the
behavior to avoid adding the attribute in these cases.

Change-Id: Ic4a41152db9df66376fa26096d6f3a53baea51de
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46835
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2020-11-25 09:16:45 +00:00
Angel Pons
d87a84830e soc/intel/{broadwell,quark}: Drop PEI_DATA typedef
It is not used.

Change-Id: I3ef0878811bf2ec406ded03aac6c5dfeb5bf45a2
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47001
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-25 09:15:36 +00:00
Elyes HAOUAS
794a9b7b9c crossgcc: Upgrade binutils to 2.35.1
Change-Id: I8694a154d48c5a718b27d4beb858942db0feb997
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45550
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2020-11-25 09:14:50 +00:00
Elyes HAOUAS
f106b3b430 crossgcc: Upgrade LLVM to version 11.0.0
Change-Id: I1cc02355e3fea7eb9ad98be6396a492dbbdc47b2
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46379
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2020-11-25 09:14:37 +00:00
Stanley Wu
64f7bdf19a mb/google/volteer/variant/lindar: change speaker smart amplifier to ALC1011
Lindar change amp to ALC1011
Add ALC1011 amp acpi info to devicetree

BUG=b:171771736
BRANCH=firmware-volteer-13521.B
TEST=build and verify ALC1011 can be recognized.

Change-Id: I4d83a19b3baa87cc926bb7c3a2cb96bf3165d2f4
Signed-off-by: Stanley Wu <stanley1.wu@lcfc.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47009
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Zhuohao Lee <zhuohao@google.com>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
2020-11-25 09:14:28 +00:00
Jakub Czapiga
ea378ccc8f tests: Add lib/list-test test case
Change-Id: If74f241b2bb788b3e2fd1b9062fc74819f7be31e
Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47507
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
2020-11-25 09:14:07 +00:00
Felix Singer
5a41b0db20 MAINTAINERS: Add maintainers for kontron/mal10
Add Maxim Polyakov, Nico Huber and Felix Singer as maintainers for
kontron/mal10.

Change-Id: I2f4200708e4aec6d74916fb5e63efe2f20594882
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47889
Reviewed-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-25 09:13:55 +00:00
Nikolai Vyssotski
6f32d80e18 mb/amd/mandolin: Add decode range for LPC debug card
Some LPC debug boards hard strap SIO address to be at
0x164e/0x164d vs 0x4e/0x4d. Add support for configurable
SIO address to support these cards.

BUG=b:159933344
TEST=boot with LPC debug card, verify serial output

Change-Id: I103c61f21f13970dfa3b9a788b29964e478fb84c
Signed-off-by: Nikolai Vyssotski <nikolai.vyssotski@amd.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47545
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2020-11-25 09:13:41 +00:00
Wisley Chen
eb8036b591 mb/google/volteer/var/elemi: Add H5ANAG6NCJR-XNC
Add H5ANAG6NCJR-XNC.

BUG=b:165461530
BRANCH=volteer
TEST=emerge-volteer coreboot

Change-Id: I827158ce0abe764f1e3b5de46abf50dc148a6ff0
Signed-off-by: Wisley Chen <wisley.chen@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47855
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2020-11-25 09:13:29 +00:00
Angel Pons
ec5cf1504e nb/amd: Deduplicate nb_common.h
Save for the IO_APIC2_ADDR definition, they are equivalent.

Change-Id: I14da3d9aeefcc725428957ce0c9ac164eabacec6
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47408
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-25 09:11:58 +00:00
Angel Pons
c19cbeeb6b device: Drop unused HyperTransport code
Only two definitions are actually used somewhere, the rest is unused.

Change-Id: Iec52d0d47fce6a1ec5455b670824b995a7a34a4c
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47407
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-25 09:11:46 +00:00
Felix Singer
ec8f5c79a5 mb/clevo/kbl-u: Configure GPIOs using mainboard_ops
Hook up the mainboard_ops driver and configure the GPIOs using .init,
since mainboard_silicon_init_params() is meant for the configuration of
the FSP, not the GPIOs.

Change-Id: I82f1eaf6693d9b117fb211776047058cdc787288
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47825
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-24 22:43:23 +00:00
Felix Singer
12e5fda496 mb/kontron/bsl6: Move GPIO configuration to C file
Change-Id: I008de1bf91ba97ee5eefbde11947c73059fff5f7
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47851
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-24 21:41:40 +00:00
Jeremy Soller
3d37711899 Apply TCSS recommendations from 617016
Change-Id: Ia30fa057f3f03e8d7e82d067e09ea85a7bab3385
2020-11-24 14:40:41 -07:00
Felix Singer
f84e304ea1 mb/kontron/bsl6: Use include folder for header files
Change-Id: Id73a7385f7701920efebaa3e293ac50a6ba93272
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47849
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-24 20:22:29 +00:00
Jeremy Soller
13338f9ae2 Sync lemp10 iom config
Change-Id: Ie7a07c1447a3b41d3b53d1198e86cf04b51f96bc
2020-11-24 12:31:22 -07:00
Jeremy Soller
f28c6180a7 Disable IomTypeCPortPadCfg
Change-Id: Ic30860e5157fa31445a5bcc01b7adfb358ae5467
2020-11-24 12:29:47 -07:00
Jeremy Soller
d7ed6947c2 Remove duplicate TCSS ACPI
Change-Id: Ic19299f938541b48eb636fcc79f122fc39189833
2020-11-24 12:29:32 -07:00
Felix Singer
4ea08f9f56 sb/intel/lynxpoint: Replace hard-coded IDs with defines
Replace hard-coded IDs with defines introduced in CB:47807.

Used documents:
- 328904-003
- 329003-003

Built lenovo/t440p with BUILD_TIMELESS=1, coreboot.rom remains
identical.

Change-Id: I910ab356dd8728c316018989bfb2689d4c67c2dc
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47808
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-24 18:37:58 +00:00
Felix Singer
d5f1c08816 include/device/pci_ids.h: Add PCI IDs used in Lynxpoint chipsets
Used documents:
- 328904-003
- 329003-003

Change-Id: I95790cda6f7c42a9de57bf5e92eb829ee1807dbe
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47807
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-24 18:37:46 +00:00
Angel Pons
de50d399a1 mb/**/cmos.layout: Drop copy-pasted volume entries
This option only applies to boards using the Lenovo H8 EC code.

Change-Id: I3b16a61a0aa9f51a4061b1b5e58fc276e7383415
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47150
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-24 17:47:29 +00:00
Angel Pons
8e021d96b3 mb/**/cmos.layout: Drop copy-pasted SNB entries on non-SNB
Only Sandy Bridge MRC stores scrambler seeds in CMOS. Non-Sandybridge
boards ended up with these entries because of copy-paste programming.

Change-Id: I5a5bda6ea4e63ba03a4219bb2a6aa546bb6ecd7a
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47149
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-24 17:47:15 +00:00
Sheng-Liang Pan
c5395bc95d mb/google/volteer/var/voxel: Update DPTF parameters
update the DPTF parameters received from the thermal team.

BUG=b:167523658
TEST=emerge-volteer coreboot

Signed-off-by: Pan Sheng-Liang <sheng-liang.pan@quanta.corp-partner.google.com>
Change-Id: Iafc3fb389ade5cfec79a816a28880262bdce7c74
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47858
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-24 16:24:20 +00:00
Jeremy Soller
0182cebfbc Enable CNVi wake, document all RTD3 pins with names from schematics
Change-Id: I5581b39b3d4a072124cbb09cc4fbe16a671eb700
2020-11-24 08:54:16 -07:00
Jeremy Soller
b4dcbd3c28 Sync more tcss changes from alderlake to tigerlake
Change-Id: I4ec025714f48bed5623687827d3362e507dc6f90
2020-11-24 08:27:12 -07:00
Rocky Phagura
17a798b68c soc/intel/xeon_sp: Enable SMI handler
SMI handler was not installed for Xeon_sp platforms. This enables SMM
relocation and SMI handling.

TESTED:
- SMRR are correctly set
- The save state revision is correct (0x00030101)
- SMI's are properly generated and handled
- SMM MSR save state are not supported, so relocate SMM on all cores
in series
- Verified on OCP/Deltalake mainboard.

NOTE:
- Code for accessing a CPU save state is not working for SMMLOADERV2,
so some SMM features like GSMI, SMMSTORE, updating the ACPI GNVS
pointer are not supported.
- This hooks up to some soc/intel/common like TCO and ACPI GNVS. GNVS
is broken and needs to be fixed separately. It is unknown if TCO is
supported. This might require a cleanup in the future.

Change-Id: Iabee5c72f0245ab988d477ac8df3d8d655a2a506
Signed-off-by: Rocky Phagura <rphagura@fb.com>
Signed-off-by: Christian Walter <christian.walter@9elements.com>
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46231
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-24 12:44:28 +00:00
Arthur Heymans
f4721246db soc/intel/xeon_sp: Select INTEL_COMMON_BLOCK_TCO
TCO is configured by FSP. This mostly makes it possible to report TCO
events in SMM if enabled.

Change-Id: I4f81c7888e45ed01ee68b1d6e6a9986a4d735467
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47764
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-24 12:02:06 +00:00
Arthur Heymans
f4f332dba9 soc/intel/xeon_sp: Hook up the PMC driver
The soc code was already there but it was never linked.

Change-Id: I75ee08dab524bc40f1630612f93cbd42025b6d4e
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47763
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-24 12:01:52 +00:00
Zhuohao Lee
b3b4ccfb26 mb/google/volteer: fw_config: Add setting for new sd readers
This patch adds three settings for the new sd readers.
The new assigned values are:
1. RTS5227S: 3
2. L9750: 4
3. SD_OZ711LV2LN: 5

BUG=b:173676531
BRANCH=volteer
TEST=abuild -t google/volteer

Change-Id: I595695f99d3298f146fcdb7c2b942ce007ae9327
Signed-off-by: Zhuohao Lee <zhuohao@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47856
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
2020-11-24 09:42:49 +00:00
Benjamin Doron
eecaf360de soc/intel/skylake: Support NHLT 1ch DMIC
Allows advertising support for a 1ch array DMIC in the NHLT table.
Boards use the NHLT if a microphone is connected to the DSP.

Tested on an Acer Aspire VN7-572G (Skylake-U) on Windows 10.
A custom ALSA topology will be required for Linux.

Change-Id: Idba3a714faab5ca1958de7dcfc0fc667c60ea7fd
Signed-off-by: Benjamin Doron <benjamin.doron00@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43072
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-11-24 09:42:23 +00:00
Benjamin Doron
9ee1b82db4 soc/intel/skylake: Use correct NHLT_PDM_DEV definition
According to the NHLT specification[1], PDM_DEV is defined as "1" on
Kabylake based platforms. coreboot currently sets it to "0" on
all platforms. Add an entry to the enum and use it to define
NHLT_PDM_DEV for Kabylake.

"Device Type" will resume from "2" on all platforms, but entries are
currently reserved.

Tested on an Acer Aspire VN7-572G (Skylake-U), which has a 1ch array
DMIC, on Windows 10.

1. https://01.org/sites/default/files/595976_intel_sst_nhlt.pdf

Change-Id: Ifbc67228c9e7af7db5154d597ca8d67860cfd2ed
Signed-off-by: Benjamin Doron <benjamin.doron00@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45010
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-24 09:42:14 +00:00
Jeremy Soller
aebf02be02 Fixup
Change-Id: I4e124cb8a69496a11e9eac270612c65025bb1f7c
2020-11-23 20:58:31 -07:00
Jeremy Soller
c9d9c491ec Also require TBT0 and TBT1 resource for DMA and RP
Change-Id: I6238c0b6cb7b47c18f3918d53f0e5c1a6706ce57
2020-11-23 20:50:44 -07:00
Jeremy Soller
7f543c99f8 Try to use GPIO PM modes
Change-Id: I97a9ecabf2839e29d00a76db0c5b17db99965ee3
2020-11-23 20:45:41 -07:00
Mike Banon
1e6a227f10 nb/amd/agesa/family15tn: define macros for GNB and IOMMU devices
Follow the example of newer AMD code for Stoneyridge and Picasso.

Signed-off-by: Mike Banon <mikebdp2@gmail.com>
Change-Id: I9c17d4cb4953b28a47483f5d7db308ccc89e9281
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47848
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-11-23 19:18:03 +00:00
Mike Banon
58d0336ef3 nb/amd/agesa/family15tn: define macro for internal HDMI audio controller
Following the example of CB:7630 done for family16kb boards
(git commit 3ff4f85ccd).

Signed-off-by: Mike Banon <mikebdp2@gmail.com>
Change-Id: Ic48c7475ceadb60f825ca9e3c3427c8a7525a266
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46589
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-11-23 16:46:55 +00:00
Kevin Chiu
de20b28fe4 mb/google/zork: correct USB2 phy TXVREFTUNE0 parameter name
From spec, [31:28] "HS DC Voltage Level Adjustment" is "TXVREFTUNE0".
correct rx_vref_tune -> tx_vref_tune

BUG=None
BRANCH=zork
TEST=emerge-zork coreboot

Signed-off-by: Kevin Chiu <kevin.chiu@quantatw.com>
Change-Id: I27003a952d8f8bdd8fe52af8a37010e23ee9cdfd
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47735
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2020-11-23 16:44:59 +00:00
Jeremy Soller
bd6bbc3655 Merge remote-tracking branch 'upstream/master' into galp5
Change-Id: Ic25f3dba2af53111bca9e7762a2690c518c35fe1
2020-11-23 08:52:59 -07:00
Jeremy Soller
3cdc454b18 Sync galp5 with lemp10
Change-Id: I0596f182021758b6013733429a7a810963b09995
2020-11-23 08:50:51 -07:00
Angel Pons
93859e319e sb/intel/lynxpoint: Drop invalid SATA registers
Code was copy-pasted from older chips and has no effect on Lynxpoint.

Change-Id: I2c789ba48f175b3c9c9643118fc2209c94f24c3e
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47097
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-23 13:00:14 +00:00
Angel Pons
28ed7878f0 mb/siemens/mc_apl1: Use pci_or_config16 function
Change-Id: I93e09fc9801f6d32cade351bac0cba82f671acfe
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47400
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Tested-by: siemens-bot
Reviewed-by: Mario Scheithauer <mario.scheithauer@siemens.com>
2020-11-23 12:44:20 +00:00
Angel Pons
16c06c273c soc/intel/cannonlake: Add ICC limits for CFL-S DT 4
TEST=Boot with an i3-9100F and see no vr_config errors.

Change-Id: Ic62ef038ad11d147a38804f694d3e056611b96db
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47445
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Christian Walter <christian.walter@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-23 12:43:26 +00:00
Angel Pons
b3aaa63e8f soc/intel/denverton_ns: Hook up SMMSTORE
Tested on Intel Harcuvar CRB, SMMSTORE is now working.

Change-Id: I996c7bf3b510a8f0a9d1bb7d945ce777b646448e
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47450
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-23 12:43:17 +00:00
Felix Singer
8446935d3b mb/clevo/cml-u: Get rid of gpio.h and use C files instead
Split up gpio.h into two seperate compilation units, gpio.c and
gpio_early.c, containing the complete configuration and a minimal
configuration used in early stages.

Tested on clevo/l140cu and it still boots.

Change-Id: I5b056e8faac0c426a37501dbc175373c22dde339
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47836
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-23 12:02:20 +00:00
Felix Singer
79c42635ae mb/clevo/cml-u: Get rid of cnl_configure_pads()
Get rid of cnl_configure_pads() since it is a hack for the FSP. Instead,
hook up to the mainboard_ops driver and configure the GPIOs using .init.

Tested on clevo/l140cu and it still boots.

Change-Id: I75dd15ab6d2b3b72b3ad0398df87b349fd00bc3c
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47835
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-23 12:02:09 +00:00
Felix Singer
ce4ecfed57 mb/clevo/cml-u: Move bootblock.c and ramstage.c to mb level
Change-Id: Ifca49c656f259b08fb8ab47fe36e93c146f25266
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47834
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-23 12:01:56 +00:00
Felix Singer
e7265a9b10 mb/clevo/cml-u: Use include folder for header files
Change-Id: I50be3d9b829f624cbe460060c40482047f39774c
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47833
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-23 12:01:48 +00:00
Felix Singer
aef866be11 mb/clevo/cml-u: Move hda_verb.c to mainboard's Makefile
Move hda_verb.c from the variant's Makefile to the mainboard's Makefile,
because every variant needs one.

Change-Id: Ia94813f68620abcff48de4fdb117466c91f6863c
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47820
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-23 12:01:40 +00:00
Felix Singer
32608cf87c MAINTAINERS: Add maintainers for siemens/chili and kontron/bsl6
Add Nico Huber and Felix Singer as maintainers for the mainboards
siemens/chili and kontron/bsl6.

Change-Id: Ic70004d6f4c87b308246031429794312cc37107a
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47843
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-23 12:00:43 +00:00
Angel Pons
c85cce077c mb/**/cmos.layout: Indent everything with tabs
Time has shown that using spaces never converges into proper alignment.

Change-Id: I5338aeaf139580f9eab3e1e02cb910080a95d2c2
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47147
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
2020-11-23 09:56:20 +00:00
Angel Pons
2c0aa00d6e mb/**/cmos.layout: Remove crusty comments
Most of these comments have been copy-pasted or serve no purpose other
than to eventually turn into misleading info. While the description of
the first 120 bits of CMOS could be useful, it should instead be added
to the documentation for the CMOS option infrastructure, or /dev/null.
Moreover, trim down newlines to no more than two consecutive newlines.

Change-Id: I119b248821221e68c4e31edba71ba83b7d2e14e9
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47143
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
2020-11-23 09:55:43 +00:00
Subrata Banik
447233ce8c soc/intel/alderlake: Update UART0 GPIO as per latest schematics
UART0_RX: C8 -> H10
UART0_TX: C9 -> H11

GPIO PIN Mode: NF1 -> NF2

Change-Id: I7a193b67e22258ff600679f27955a37480ed3f0d
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47847
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-11-23 03:37:33 +00:00
Subrata Banik
8ed53ec8c0 mb/intel/adlrvp: Enable pre-boot display over HDMI-B port
List of changes:
1. Configure CTRLCLK and CTRLDATA for HDMI
2. Enable Ddc and HPD for Port-B
3. Disable dual eDP configuration for Port-A and B

TEST=Able to see depthcharge pre-boot screens over HDMI-B port.

Change-Id: I7509b981f35fc60a7885b2b07067cb0d35ec625f
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47838
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-11-23 03:37:14 +00:00
Subrata Banik
191bd82734 soc/intel/alderlake: Update DCACHE_BSP_STACK_SIZE and DCACHE_RAM_SIZE
According to the latest Alderlake Platform FSP Integration Guide, the
minimum amount of stack needed for FSP-M is 512KiB. Change
DCACHE_RAM_SIZE and DCACHE_BSP_STACK_SIZE to reflect that (plus 1KB
previously determined empirically).

TEST=Able to pass FSP-M MRC training on LPDDR5 SKU without any hang.

Change-Id: Ic831ca9110a15fdb48ad31a7db396740811bf0f2
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47837
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-11-23 03:37:04 +00:00
Caveh Jalali
6de5bf6698 libpayload/usb: Add format string checking to usb_debug
This turns on the compiler's printf style format string checker.

BUG=b:167517417
TEST=enabled all USB controllers on volteer and fixed resulting
	compiler errors when USB_DEBUG is enabled.

Change-Id: Ic94ebcbafdde8a5f79278b5635111b99af40f892
Signed-off-by: Caveh Jalali <caveh@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45025
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-22 22:34:55 +00:00
Caveh Jalali
8079a6a558 libpayload/usb: Fix printf format string mismatches in debug messages
This fixes format string mismatch errors in the USB subsystem found by
the compiler's format string checker.

BUG=b:167517417
TEST=enabled all USB controllers on volteer and fixed resulting
	compiler errors when USB_DEBUG is enabled.

Change-Id: I4dc70baefb3cd82fcc915cc2e7f68719cf6870cc
Signed-off-by: Caveh Jalali <caveh@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45024
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2020-11-22 22:34:52 +00:00
Bora Guvendik
2a70419e7c soc/intel/alderlake: Fix overlapping memory address used for early GSPI2 and UART bars
BAR address used during early initilization of GPSI 2 is overlapping with UART bar.

//For GSPI2 this is the address calculated
GSPI_BUS_BASE(0xFE030000,2)=0xFE032000
GSPI_BUS_BASE(bar, bus) ((bar) + (bus) * 4 * KiB)

//overlaps with
CONSOLE_UART_BASE_ADDRESS -> 0xfe032000

TEST=none

Signed-off-by: Bora Guvendik <bora.guvendik@intel.com>
Change-Id: I3249a91df8a2e319aff6303ef9400e74163afe93
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47644
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2020-11-22 22:34:44 +00:00
Bora Guvendik
c3c3e453ff soc/intel/tigerlake: Fix overlapping memory address used for early GSPI2 and UART bars
BAR address used during early initilization of GPSI 2 is overlapping with UART bar.

//For GSPI2 this is the address calculated
GSPI_BUS_BASE(0xFE030000,2)=0xFE032000
GSPI_BUS_BASE(bar, bus) ((bar) + (bus) * 4 * KiB)

//overlaps with
CONSOLE_UART_BASE_ADDRESS -> 0xfe032000

Change-Id: Id9f2140a6dd21c2cb8d75823cc83cced0c660179
Signed-off-by: Bora Guvendik <bora.guvendik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47643
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Anil Kumar K <anil.kumar.k@intel.com>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2020-11-22 22:34:38 +00:00
Jakub Czapiga
f9961fff31 tests: Add lib/cbmem_console-test test case
Add test case executed twice, once for ROMSTAGE and once RAMSTAGE.
Each test is named and visible in cmocka output with stage in its name.

Signed-off-by: Jakub Czapiga <jacz@semihalf.com>
Change-Id: I464eee61f538188427bec730d2e004c7b76cca67
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47642
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
2020-11-22 22:33:56 +00:00
Sam Lewis
fde084bc49 soc/ti/am335x: Fix timer implementation
Implements the monotonic timer using the am335x dmtimer peripheral.

Change-Id: I4736b6d3b6e26370be9e8f369fc02285ad519223
Signed-off-by: Sam Lewis <sam.vr.lewis@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44383
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-22 22:32:46 +00:00
Sam Lewis
b5353965e1 soc/ti/am335x: Enable MMU in bootblock
Enables the MMU primarily to allow the unaligned word reads that the
FMAP code requires. Without enabling this, the chip gets data access
exceptions.

Enabling the MMU also gives some advantages in allowing the icache and
dcache to be enabled, so is probably worth doing regardless.

Change-Id: Ic571570cc44b0696ea61cc76e3bce7167a3256cf
Signed-off-by: Sam Lewis <sam.vr.lewis@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44382
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-11-22 22:32:11 +00:00
Tim Chu
be34afad6f mb/ocp/deltalake: Override SMBIOS type 4 cpu voltage
Override SMBIOS type 4 cpu voltage. For Delta Lake, 1.6V is expected.

Tested=Execute "dmidecode -t 4" to check if cpu voltage is correct.

Signed-off-by: Tim Chu <Tim.Chu@quantatw.com>
Change-Id: I0ecbec8fb3dc79b8c3f3581d6193aade01bcd68e
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47562
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Jonathan Zhang <jonzhang@fb.com>
2020-11-22 22:31:58 +00:00
Patrick Rudolph
b01ac7e264 cpu/intel/common: Fill cpu voltage in SMBIOS tables
Introduce a weak function to let the platform code provide the processor
voltage in 100mV units.

Implement the function on Intel platforms using the MSR_PERF_STATUS msr.
On other platforms the processor voltage still reads as unknown.

Tested on Intel CFL. The CPU voltage is correctly advertised.

Change-Id: I31a7efcbeede50d986a1c096a4a59a316e09f825
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43904
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Jonathan Zhang <jonzhang@fb.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2020-11-22 22:31:40 +00:00
Martin Roth
44cfde02d5 util/docker: Minor Makefile updates
- Update url for docker install instructions.
- Update docker-cleanall target to require verification.
- Update docker-jenkins-attach target to check for docker and
use docker variable.
- Update spaces to tabs in the docs targets.

Signed-off-by: Martin Roth <martin@coreboot.org>
Change-Id: Ic1e1a545024fe1fdc37d7d8c7e6f54f124d1697b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47342
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2020-11-22 22:31:04 +00:00
Martin Roth
82a30a134c util/crossgcc: Retry package downloads on failure
For whatever reason, I've had buildgcc fail to download packages a
number of times.  Adding 2 additional retries before failing helps
with that problem.

Signed-off-by: Martin Roth <martin@coreboot.org>
Change-Id: I060eaa5a0da955436169e2199c1c62044dcfd5ea
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47338
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2020-11-22 22:30:22 +00:00
Tony Huang
b37f2e9902 mb/google/puff/var/dooly: update USB2 type-c strength
Based on USB DB report.

BRANCH=puff
BUG=b:163561808
TEST=build and measure by EE team.

Change-Id: I379987b6d6d2a7aef33d4c42e589dc52d40205a3
Signed-off-by: Tony Huang <tony-huang@quanta.corp-partner.google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47687
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Sam McNally <sammc@google.com>
2020-11-22 22:30:03 +00:00
Martin Roth
08b862ef47 nb/amd/pi: Remove 00660F01 directory & files
These files are not used by any platform, so remove them.

Signed-off-by: Martin Roth <martin@coreboot.org>
Change-Id: I75651d2cc53fc5a3cb3233686ad66881d129312d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47649
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-11-22 22:29:49 +00:00
David Wu
6be3352e98 mb/google/volteer: Remove unused devices for terrador and todor
Remove the following devices
- Goodix Touchscreen
- SAR0 Proximity Sensor

BUG=b:173480406
TEST=FW_NAME=terrador emerge-volteer coreboot chromeos-bootimage

Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com>
Change-Id: I6b56ca136533b53ff7e003a665be67fbe12c1ade
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47690
Reviewed-by: Caveh Jalali <caveh@chromium.org>
Reviewed-by: Paul Fagerburg <pfagerburg@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-22 22:29:17 +00:00
Elyes HAOUAS
1ba663ce0a crossgcc: Upgrade nasm to version 2.15.05
Changes (https://nasm.us/doc/nasmdocc.html):
Version 2.15.05:
Correct %ifid $ and %ifid $$ being treated as true.
Add --reproducible option to suppress NASM version numbers and
timestamps in output files.

Version 2.15.04:
Correct the encoding of the ENQCMDS and TILELOADT1 instructions.
Fix case where the COFF backend (the coff, win32 and win64 output
formats) would add padding bytes in the middle of a section if a
SECTION/SEGMENT directive was provided which repeated an
ALIGN= attribute. This neither matched legacy behavior, other
backends, or user expectations.
Fix SSE instructions not being recognized with an explicit memory
operation size (e.g. movsd qword [eax],xmm0).

Change-Id: I3f9aa8e743f2dc50fce1ce68718c0ae17209a509
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44694
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-22 22:28:16 +00:00
Elyes HAOUAS
274c3faf09 crossgcc: Upgrade IASL to version 20200925
This release added support for SMBus predefined names: _SBA, _SBI, _SBR,
_SBT and _SBW.

CB:44507 and CB:41735 needs this version.

Change log: https://acpica.org/node/184

Change-Id: I3559e5bd884db4dccdaa5ac7edba4faf57da7930
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45750
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Maxim Polyakov <max.senia.poliak@gmail.com>
2020-11-22 22:28:03 +00:00
Frans Hendriks
c248382d52 vendorcode/eltan/security: Add dependency for menu items
Subitem for VENDORCODE_ELTAN_VBOOT and VENDORCODE_ELTAN_MBOOT are
always displayed.

Add dependency and display these items when feature is enabled only.

Tested on Facebook FBG1701.

Change-Id: I51e47efddbcf51d87439bec33b85432da56fa4c6
Signed-off-by: Frans Hendriks <fhendriks@eltan.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47740
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-11-22 22:27:43 +00:00
Patrick Rudolph
d8d8be1a6a drivers/tpm: Move PPI stub
As preparation to a full PPI implementation move the acpi code out
of the pc80/tpm/tis driver into the generic tpm driver folder.

This doesn't change any functionality.

Change-Id: I7818d0344d4a08926195bd4804565502717c48fa
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/45567
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-11-22 22:27:29 +00:00
Frans Hendriks
ac7f461d8d mb/facebook/fbg1701/Kconfig: Add dependency
VENDORCODE_ELTAN items are only used when USE_VENDORCODE_ELTAN is enabled.

Add dependency of USE_VENDORCODE_ELTAN.

Change-Id: Ibcc40014930c90e29904661f5ffa41bc688d368b
Signed-off-by: Frans Hendriks <fhendriks@eltan.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46218
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Wim Vervoorn <wvervoorn@eltan.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-11-22 22:26:51 +00:00
Arthur Heymans
02dec12629 soc/intel/xeon_sp: Work around FSP-T not respecting its own API
The CPX FSP-T does not respect the FSP2.x spec and uses registers where
coreboot has its initial timestamp stored.

If the initial timestamp is later than some other timestamps this
messes up the timestamps 'cbmem -t' reports as it thinks they are a
result from a timestamp overflow (reporting that it took 100k years to
boot).

TEST: The ocp/deltalake boots within the span of a lifetime.

Change-Id: I4ba15decec22cd473e63149ec399d82c5e3fd214
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47738
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-11-22 22:26:25 +00:00
Sheng-Liang Pan
832dd4388a mb/google/octopus: fix droid lte sku load specific wifi sar value
This CL add droid lte sku 37 38 39 40 to load wifi_sar-droid.hex.

BUG=none
BRANCH=octopus
TEST=emerge-octopus coreboot

Signed-off-by: Pan Sheng-Liang <sheng-liang.pan@quanta.corp-partner.google.com>
Change-Id: I55dda85b8f3e664d97834b712a2c6a48d1434010
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47697
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-22 22:26:08 +00:00
Arthur Heymans
b54212109e cpu/amd/microcode: Remove dead Makefile
Change-Id: If9d1e28ac50b8ca227b2c09dbbfdd3c9b60aca6a
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47718
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-11-22 22:25:42 +00:00
Arthur Heymans
8461cec76c soc/intel/block/pmclib.c: Properly guard apm_control()
This function is only properly implemented with SMM support.

Change-Id: I9e0fc7433a9226825f5ae4903c0ff2e0162d86ac
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47757
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-11-22 22:25:23 +00:00
Arthur Heymans
f2baae3735 soc/intel/common/pmc.c Don't implement a weak function that dies
Buildtime failures are better than runtime failures.

Change-Id: I5fe4c86a13dbabb839977010f129419e337e8281
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47752
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-11-22 22:25:10 +00:00
Arthur Heymans
1ae8cd1064 soc/intel/block/pmc: Only include the PCI driver when it is not hidden
On more recent Intel platforms FSP-S hides the PMC PCI device and the
driver is broken for those devices so don't include it at all.

Change-Id: I784be250698ec1c1e9b3b766cf1bcca55730c021
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47756
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-11-22 22:25:03 +00:00
Arthur Heymans
08c646c060 soc/intel/block/pmc: Move pmc_set_acpi_mode() to pmc_lib.c
pmc.c mostly contains a PCI driver, while this function just calls
into SMM.

Change-Id: I9a93a5079b526da5d0f95f773f2860e43b327edf
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47755
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-11-22 22:24:54 +00:00
Mariusz Szafranski
778c4f8c96 MAINTAINERS: update maintainers of Intel Denverton-NS SoC
Change-Id: Ifdb24f9566b53af6c23b4cd4adba0c1876e4fc9d
Signed-off-by: Mariusz Szafranski <mariuszx.szafranski@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47753
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: David Guckian <d.guckian20@gmail.com>
Reviewed-by: Christian Walter <christian.walter@9elements.com>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
2020-11-22 22:24:41 +00:00
Elyes HAOUAS
e49856dfa8 soc/intel/denverton_ns: Convert to ASL 2.0 syntax
Change-Id: I261add8142c3192ab944845e8e1a362a3aca00c8
Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46240
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Mariusz Szafrański <mariuszx.szafranski@intel.com>
2020-11-22 22:24:19 +00:00
David Wu
d3a1560609 mb/google/volteer/var/voema: Update gpio and devicetree settings
Based on latest schematic and gpio table of voema, update gpio and
devicetree settings for voema Proto.

BUG=b:169356808
TEST=FW_NAME=voema emerge-volteer coreboot chromeos-bootimage

Signed-off-by: David Wu <david_wu@quanta.corp-partner.google.com>
Change-Id: I719a9948ed0d60e1de5368e096ff60c2345803b0
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47667
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
Reviewed-by: Caveh Jalali <caveh@chromium.org>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2020-11-22 22:24:12 +00:00
Martin Roth
c681a82657 cpu/amd/pi: Remove unused cpu code 00660F01
Remove the processor directory and references to the Kconfig symbol.

Signed-off-by: Martin Roth <martin@coreboot.org>
Change-Id: I403a453362fd76d6ef2a5b75728a362efa4f2491
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47652
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-11-22 22:23:22 +00:00
Frans Hendriks
7e3bf0c5dd mb/facebook/fbg1701: Add VBOOT support
Add VBOOT support.

Disable USE_VENDOR_ELTAN when VBOOT is enabled.
Add FMD file and split binary into RW and RO region settings.

Tested on Facebook FBG1701

Signed-off-by: Frans Hendriks <fhendriks@eltan.com>
Change-Id: I641bca58c0f7c81d5742235c8b2c184d13c00c55
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46219
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Wim Vervoorn <wvervoorn@eltan.com>
2020-11-22 22:22:46 +00:00
Matt DeVillier
3d62781acb drivers/i2c/hid: Use ACPI device name if provided by config
Follow model of drivers/i2c/generic and use user-supplied device
name if specified in the chip config.

Change-Id: Ia783bac2797e239989c03a3421b9293a055db3d0
Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47782
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-22 22:22:06 +00:00
Matt DeVillier
86dce8fa75 drivers/i2c/generic: Only write DDN field if description not empty
DDN field isn't required, no point in writing an empty string to it.

Change-Id: Ifea6e48c324598f114178e86a79f519ee35f5258
Signed-off-by: Matt DeVillier <matt.devillier@puri.sm>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47781
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-22 22:22:00 +00:00
Paul Menzel
9226fe9aee Documentation: Mention newer Intel μ-code updates in 4.13 release notes
Start a new section *Notes* for these kind of information.

Change-Id: I86be22cebb96e6f07676a9bc52794a4c12dad3e4
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47762
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-22 22:21:29 +00:00
Eric Lai
f9ed4d20f1 drivers/i2c: Add a driver for Semtech SX9324
This adds a new driver for the SX9324 proximity detector device.
Follow SX9324 datasheet Rev3.

BUG=b:172397658
BRANCH=zork
TEST=Test sx9324 is working as expected.

Signed-off-by: Eric Lai <ericr_lai@compal.corp-partner.google.com>
Change-Id: Ifd582482728a2f535ed85f6696b2f5a4529ba421
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47640
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-22 22:20:33 +00:00
Angel Pons
c930c87998 Doc/releases/checklist.md: Fix up URLs
Use angle brackets so that they appear as links, and update a link to a
Gerrit change to use the current format.

Change-Id: I41f82986429dcfd1cbc5b5c088a0c47bd24a57c4
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47812
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-22 22:19:58 +00:00
Angel Pons
5ea7bb74bd Doc/releases/checklist.md: Add reminder to unpack relnotes
Explicitly add this easy-to-forget step. Also add a missing period.

Change-Id: Iaf13155fcc8a70f3565fb2404cef886524fa5161
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47811
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-22 22:19:48 +00:00
Angel Pons
2687d37a3c payloads/external: Fix up SPDX license headers
Remove copyright notices and other unnecessary churn.

Change-Id: Ie69cc121d2b6eed95aa3cbaa7215d61880148858
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47815
Reviewed-by: Nico Huber <nico.h@gmx.de>
Reviewed-by: Martin Roth <martinroth@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-22 22:19:19 +00:00
Angel Pons
6d4de7eef9 payloads/external/Makefile.inc: Fix SeaBIOS option regressions
Commit 14ca740719 (Makefile.inc: Move adding SeaBIOS cbfs config files)
introduced various regressions that were not spotted during review.

TEST=Building with SEABIOS_THREAD_OPTIONROMS is working properly again.

Change-Id: I4de0b11747e3df8dd31a85160add129d8cc6bd8a
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47814
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-22 22:18:54 +00:00
Maxim Polyakov
0fcd37172f mb/kontron: Add Kontron mAL10 COMe module support
This patch adds support for the Kontron mAL10 COMe module with the
Apollo Lake SoC together with Kontron T10-TNI carrierboard.

Working:
  - UART console and I2C on Kontron kempld;
  - USB2/3
  - Ethernet controller
  - eMMC
  - SATA
  - PCIe ports
  - IGD/DP
  - SMBus
  - HWM

Not tested:
  - IGD/LVDS
  - SDIO

TODO:
  - HDA (codec IDT 92HD73C1X5, currently disabled)

Tested payloads:
  - SeaBIOS
  - Tianocore, UEFIPayload - without video, EFI-shell in console only

Tested on COMe module with Intel Atom x5-E3940 processor (4 Core,
1.6/1.8GHz, 9.5W TDP). Xubuntu 18.04.2 was used as a bootable OS
(5.0.0-32-generic linux kernel)

Change-Id: Ib8432e10396f77eb05a71af1ccaaa4437a2e43ea
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/39133
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-11-22 22:18:22 +00:00
Frans Hendriks
0948b363b0 soc/intel/braswell/bootblock/bootblock.c: Report the FSP-T output
Report the FSP temporary RAM location

Tested on Facebook FBG1701

Change-Id: Ia2ce48f7a7948d1fe51ad1ca33b8fb385674cb41
Signed-off-by: Frans Hendriks <fhendriks@eltan.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47759
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-11-22 22:17:53 +00:00
Frans Hendriks
c022a79503 drivers/intel/fsp1_1: Add function to report FSP-T output
This allows to compare the FSP-T output in %ecx and %edx to coreboot's
CAR symbols.

Tested on Facebook FBG1701

Change-Id: Ice748e542180f6e1dc1505e7f37b6b6c68772bda
Signed-off-by: Frans Hendriks <fhendriks@eltan.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47758
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-11-22 22:17:43 +00:00
Frans Hendriks
335eb1219c src/drivers/intel/fsp1_1/cache_as_ram.S: Clear _bss area only
Whole car region is cleared, while only small part needs to be done.

Clear .bss area only

Tested on Facebook FBG1701

Change-Id: I021c2f7d3531c553015fde98d155915f897b434d
Signed-off-by: Frans Hendriks <fhendriks@eltan.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47760
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-11-22 22:17:22 +00:00
Karthikeyan Ramasubramanian
f752fc6546 mb/google/sarien: Configure IRQs as level triggered for HID over I2C
As per HID over I2C Protocol Specification[1] Version 1.00 Section 7.4,
the interrupt line used by the device is required to be level triggered.
Hence, this change updates the configuration of the HID over I2C devices
to be level triggered.

References:
[1] http://download.microsoft.com/download/7/d/d/7dd44bb7-2a7a-4505-ac1c-7227d3d96d5b/hid-over-i2c-protocol-spec-v1-0.docx

BUG=b:172846122
TEST=./util/abuild/abuild

Change-Id: I27c485c9c8c5d47a44fc050d8cf12c553bffd01e
Signed-off-by: Karthikeyan Ramasubramanian <kramasub@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47424
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
2020-11-22 22:17:07 +00:00
Tim Wawrzynczak
f61011a56f mb/google/brya: Add new google brya mainboard
This commit is a stub for brya, which is a an Intel Alder Lake-P
reference platform.

BUG=b:173562731
TEST=util/abuild/abuild -p none -t google/brya -a -c max

Signed-off-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Change-Id: Ia34130ff92a0a07063cb8e80527204b3a80184a0
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47819
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
2020-11-22 22:16:27 +00:00
Furquan Shaikh
6c8ba9b9ae vc/amd/pi/00670F00: Add raw AGESA binary only to COREBOOT CBFS
If AGESA is added as a raw binary (and not a stage), then cbfstool
does not perform relocation. In this case, it should be added only to
COREBOOT (i.e. default) CBFS since the binary needs to be present only
in one specific location that is present in the default CBFS.

Change-Id: I7a7edc217663f9d1d36b05308bbd35f56a28b9b1
Signed-off-by: Furquan Shaikh <furquan@google.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47832
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-11-22 22:15:07 +00:00
Angel Pons
121d2de18d util/inteltool/ivy_memory.c: Do not rely on MR0 values
MR0 may not always be programmed in the training result registers. Thus,
do not rely on its values. Also account for per-channel differences.

Change-Id: Iaf3b545ea55735b46caf1bd62d5859f2b3efa159
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47750
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
2020-11-22 22:14:26 +00:00
Angel Pons
0b6ab953f3 util/inteltool/ivy_memory.c: Properly mask tAONPD
This field is only 4 bits wide.

Change-Id: I2cb746e98176d58fc5be423e18babdaa8801b096
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47749
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Stefan Reinauer <stefan.reinauer@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-11-22 22:14:15 +00:00
Angel Pons
4f86d63006 nb/intel/sandybridge: Clean up COMPOFST1 logic
This register needs to be updated differently depending on the CPU
generation and stepping. Handle this as per reference code. Further,
introduce a bitfield for the register to make the code easier to read.

Change-Id: I51649cb2fd06c5896f90559f59f25d49a8e6695e
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47766
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-11-22 22:14:03 +00:00
Angel Pons
2921cbf277 nb/intel/sandybridge: Correct get_COMP2 function
Values differ between Sandy and Ivy Bridge. Remove the lookup table,
since it contains duplicated values and is hard to see which values
correspond to which frequencies. New values come from reference code.

Change-Id: I3b28568f0053f1b39618e16bdffc24207547d81f
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47765
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-11-22 22:13:55 +00:00
Angel Pons
2a7d752aaa nb/intel/sandybridge: Rename and refactor discover_timC_write
This is actually aggressive write training, similar to aggressive read
training. Rename it accordingly and refactor it to improve clarity.

Enabling IOSAV_n_SPECIAL_COMMAND_ADDR optimizations must only be done
for later Ivy Bridge steppings. Therefore, guard the code accordingly.

Change-Id: Ia3331b95c265113d94cb5d66c57a97cb77fc3dc9
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47748
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-11-22 22:13:45 +00:00
Angel Pons
9fbb1b096f nb/intel/sandybridge: Only use write Vref if supported
Only some Ivy Bridge SKUs support write Vref control.

Change-Id: I4e606c69c6758d909946da43c3d243e3af8833cf
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47747
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-11-22 22:13:28 +00:00
Angel Pons
09fc4b90eb nb/intel/sandybridge: Refine power-down mode logic
When memory is running at fast frequencies, power-down modes can lessen
system stability. Check tXP and tXPDLL values and use safer power down
modes if their values are high. Do not use APD with DLL-off on mobile:
vendor firmware does not use it, and it can influence system stability.

Change-Id: Ic8e98162ca86ae454a8c951be163d58960940e0e
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47746
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-11-22 22:13:18 +00:00
Angel Pons
2ad03a43ec nb/intel/sandybridge: Lower tPRPDEN to 1
This is the default value, and matches what vendor firmware does.

Change-Id: Id0c9758a845d711a87c4b06f89fa0926ae658e02
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47745
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-11-22 22:13:01 +00:00
Angel Pons
1146332b9c nb/intel/sandybridge: Increase tRWDRDD with fast RAM
This has been reported to increase stability, and vendor BIOS also does
the same.

Change-Id: I4e3ea76f61771683dea61b18bee531516cda5843
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47744
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-11-22 22:12:51 +00:00
Angel Pons
08f749d5f6 nb/intel/sandybridge: Rename and clean up discover_edges_write
This is actually an (incomplete) aggressive read training algorithm.
Rename functions and variables accordingly, and tidy up declarations.

Tested on Asus P8H61-M PRO, still boots.

Change-Id: I8a4900f8e3acffe4e4d75a51a2588ad6b65eb411
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47679
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-11-22 22:12:21 +00:00
Angel Pons
801a5cbaac nb/intel/sandybridge: Relocate PREA-ACT-RD sequence
Tested on Asus P8H61-M PRO, still boots.

Change-Id: Ie5e243380d940ca89857b230e15091ac01fde928
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47622
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-11-22 22:11:58 +00:00
Angel Pons
c674223fd4 nb/intel/sandybridge: Remove spurious writes to IOSAV BW mask
The byte-wise error mask only needs to be set for certain corner cases
in read MPR training. Thus, minimize writes to this register.

Tested on Asus P8H61-M PRO, still boots.

Change-Id: I0bb8d99ad60c4964f896d303878e5982ae1dcdbe
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47621
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-11-22 22:11:37 +00:00
Angel Pons
4c76d25717 nb/intel/sandybridge: Drop precharge function
This is a copy of `find_predefined_pattern` without any effect.

Tested on Asus P8H61-M PRO, still boots.

Change-Id: Ieb72066ca25b40b6e60f04e6c4097a0ccc2a56b3
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47620
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-11-22 22:10:50 +00:00
Felix Singer
c39d11cec0 mb/*: Use ACPI_DSDT_REV_2 instead of hard-coded value
Change-Id: I6c5b86c348386aa17ee42bdaf34aa388fe6207f9
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47839
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-22 22:03:22 +00:00
Angel Pons
a1f1714ca5 nb/intel/sandybridge: Clarify register write
It is necessary to program this register before doing an I/O reset.

Change-Id: Iada74b7ee704f47cc07c71123a62b826d62cfc50
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47619
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-11-22 20:41:08 +00:00
Angel Pons
820bce7322 nb/intel/sandybridge: Encapsulate JEDEC write leveling
Create and rename a few functions to contain the entire JEDEC write
leveling algorithm. Not all write training is JEDEC write leveling.

Tested on Asus P8H61-M PRO, still boots.

Change-Id: Ie9c6315340164029e30354723b4103d906633602
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47617
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-11-22 20:39:52 +00:00
Angel Pons
c6d2feaee5 nb/intel/sandybridge: Do not rewrite write leveling sequence
There's no need to reprogram the exact same sequence over a hundred
times. Move it out of the timB loop, and drop the `test_timB` function.

Tested on Asus P8H61-M PRO, still boots.

Change-Id: I375e325cf8b5369889b9cb059c3675cd00bdbb3f
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47616
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-11-22 20:35:41 +00:00
Angel Pons
9426721807 nb/intel/sandybridge: Make helper for write leveling sequence
Encapsulate the IOSAV sequence into a helper to help reduce clutter.

Tested on Asus P8H61-M PRO, still boots.

Change-Id: I58595a5c53fcdc3f29fa55b015a82cbfe85cd6cb
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47615
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-11-22 20:34:04 +00:00
Angel Pons
068c2595f2 nb/intel/sandybridge: Run read_mpr_training before write training
Reference code does this, so follow suit.

Tested on Asus P8H61-M PRO, still boots.

Change-Id: I21c5161da55b380dd4b2d574b22a1ef038f55fce
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47611
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-11-22 20:32:15 +00:00
Angel Pons
7f5a97ce98 nb/intel/sandybridge: Rename read_training function
Given that it sets the receive enable mode bit in the GDCRTRAININGMOD
register, it's clear that this is about receive enable calibration.

Remove a potentially-outdated comment. Proper documentation will be
written once code refactoring and various improvements are complete.

Change-Id: Iaefc8905adf2878bec3b43494dc53530064a9f5d
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47576
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-22 20:31:45 +00:00
Angel Pons
58b609bf30 nb/intel/sandybridge: Use bitfield for GDCRTRAININGMOD register
Tested on Asus P8H61-M PRO, still boots.

Change-Id: Ie4b5777dd3789d4cd818ee66bdf3074ad055c818
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47572
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-22 20:30:33 +00:00
Angel Pons
737f111d2c nb/intel/sandybridge: Use bitfield for GDCRCMDPICODING
This register's layout makes no sense, so use bitfields for clarity.

Tested on Asus P8H61-M PRO, still boots.

Change-Id: I61efc7349badc2c3297c9b71535dceecaba509d0
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47571
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-11-22 20:22:38 +00:00
Angel Pons
8137806326 nb/intel/sandybridge: Move constants out of for-loop
Most per-channel registers are programmed with the same values.

Tested on Asus P8H61-M PRO, still boots.

Change-Id: Ifddff3043b68113058859cef08625b90012ca424
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47513
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-11-22 19:55:55 +00:00
Angel Pons
7a61274943 nb/intel/sandybridge: Use bitfields to program MCMAIN timings
Tested on Asus P8H61-M PRO, still boots.

Change-Id: I9a996de5d596cdb541c8b327f119425243724007
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47512
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
2020-11-22 19:54:11 +00:00
Angel Pons
593f4ca10b nb/intel/sandybridge: Clean up TC_OTHP writes
ODT stretch is configured for both slots in `dram_odt_stretch`. Also
drop an unjustified OR, which is setting ODT stretch for one slot.

Tested on Asus P8H61-M PRO, still boots.

Change-Id: I3a9076afec96e33cfdd12f9b78ca4101b3776dab
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47490
Reviewed-by: Frans Hendriks <fhendriks@eltan.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-22 19:22:15 +00:00
Angel Pons
59996e0377 nb/intel/sandybridge: Use one sequence for write leveling
In order to run a write leveling test, one needs to unset the Qoff bit
in MR1, then run the test, and finally set Qoff again. The current IOSAV
sequence uses two subsequences to perform the test, while the other two
are unused. It is possible to perform the two necessary MR1 updates in
the same sequence, which can potentially improve runtime (not measured).

Since `write_mrreg` is no longer used, it is necessary to handle address
mirroring explicitly. This can be accomplished with the recently-added
`ddr3_mirror_mrreg` function, which is also used in `write_mrreg`.

Tested on Asus P8H61-M PRO, still boots.

Change-Id: I65ca1aa32cdb177d2a9e27c3b02e74ac0c882794
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47614
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-22 19:18:57 +00:00
Kevin Chiu
d029a579ba mb/google/zork: update berknip CHTC thermal setting
Update APU CHTC thermal temperature protection point:
Temperature limit(C'): 90

Update system config=2 to meet TDP 15W design.

BUG=b:162377903
BRANCH=zork
TEST=1. emerge-zork coreboot
     2. check CHTC temperature by AMD utility

Change-Id: I03245a824d838c2d9468ae0fa3cfa34389560e9d
Signed-off-by: Kevin Chiu <kevin.chiu@quantatw.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47158
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2020-11-22 17:36:25 +00:00
Felix Held
9065f4f8ed soc/amd: move non-CAR linker scripts to common directory
AMD family 17h and newer don't use cache as RAM, since the RAM is
already initialized by the PSP when the x86 cores are released from
reset. Therefore they use a different linker script as the rest of the
x86 chips in coreboot do. Since there will be support for newer
generations than Picasso will be added, move those linker scripts from
soc/amd/picasso to soc/amd/common/block/cpu/noncar.

TEST=Timeless build of amd/mandolin and amd/gardenia result in identical
binaries.

Change-Id: Ie60372aa498b6e505708f97213b502c9d0b3534b
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47828
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2020-11-22 17:35:20 +00:00
Angel Pons
53ed3e501f sb/intel/lynxpoint/smbus.c: Remove invalid PCI IDs
These two IDs are for Cougar Point and Panther Point, the previous
generation of Platform Controller Hubs. So, drop their device IDs.

Change-Id: I27a58720f32b1cc3eb68c0af2d6819e16c36b954
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47816
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by:  Felix Singer <felixsinger@posteo.net>
Reviewed-by: Nico Huber <nico.h@gmx.de>
2020-11-22 14:25:30 +00:00
Felix Held
ea3417b5eb util/amdfwtool: add missing zero-initialization for local variable
Change-Id: Ib156b16b874f74f58bd816071db3a7acf33c5aaf
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47817
Reviewed-by: Furquan Shaikh <furquan@google.com>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-21 19:40:33 +00:00
Felix Held
ea3402213f soc/amd: factor out vbnv_cmos_failed() into soc/amd/common/vboot
Change-Id: I7f976c6c5a2a715e1a5372bb93fe657d0d86c848
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47584
Reviewed-by: Furquan Shaikh <furquan@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-21 19:40:20 +00:00
Subrata Banik
65d9a7ae31 vc/intel/fsp/fsp2_0/alderlake: Update FSP header file version to 1474_11
List of changes:
1. FSP-M Header:
- Rename UPD Offset UnusedUpdSpace33 -> UnusedUpdSpace32
2. FSP-S Header:
- Adjust UPD Offset for Reservedxx

Change-Id: I99294da825f47135d1336a6ad90b1c9bb73eb849
Signed-off-by: Subrata Banik <subrata.banik@intel.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47722
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-11-21 13:52:22 +00:00
Yidi Lin
aad4651e3e mb/google/asurada: Get RAM code from ADC 3
On Chromebooks the RAM code is implemented by the resistor straps
that we can read and decode from ADC. For Asurada the RAM code can be
read from ADC channel 3.

Signed-off-by: CK Hu <ck.hu@mediatek.com>
Signed-off-by: Yidi Lin <yidi.lin@mediatek.com>
Change-Id: Iaadabea1b6aa91c48b137f7c6784ab7ee0adc473
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46391
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Hung-Te Lin <hungte@chromium.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-11-21 13:36:23 +00:00
Julius Werner
1e37c9ca46 cbfs: Add metadata cache
This patch adds a new CBFS "mcache" (metadata cache) -- a memory buffer
that stores the headers of all CBFS files. Similar to the existing FMAP
cache, this cache should reduce the amount of SPI accesses we need to do
every boot: rather than having to re-read all CBFS headers from SPI
flash every time we're looking for a file, we can just walk the same
list in this in-memory copy and finally use it to directly access the
flash at the right position for the file data.

This patch adds the code to support the cache but doesn't enable it on
any platform. The next one will turn it on by default.

Change-Id: I5b1084bfdad1c6ab0ee1b143ed8dd796827f4c65
Signed-off-by: Julius Werner <jwerner@chromium.org>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/38423
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Aaron Durbin <adurbin@chromium.org>
2020-11-21 10:43:53 +00:00
Jeremy Soller
10b8410a2e Try acoustic noise mitigation
Change-Id: I6d6bffedbb48f5340e664fc9c7bdd406e9ed8680
2020-11-20 19:58:33 -07:00
Angel Pons
7d11513ab3 nb/intel/sandybridge: Introduce disable_refresh_machine function
The same IOSAV sequence is used in both loops, so there's no need to
reprogram it again in the second loop.

Tested on Asus P8H61-M PRO, still boots.

Change-Id: If7ee7917b61e4b752b4fc4700715dc9506520c03
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47612
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-21 02:07:02 +00:00
Julius Werner
8360946c8e intel/socket_441: Increase bootblock size
One mainboard using this socket has less than 20 bytes of space left in
its bootblock, hindering development. Double the bootblock size to solve
the problem.

Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: I620c13eab53c3326a4f4660b63ed1dd0fc81f563
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47585
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-21 01:53:18 +00:00
Julius Werner
d656d08f5e Update vboot submodule to upstream master
Updating from commit id 4c523ed1:
    vboot2: Add support for modexp acceleration

to commit id 9d4053df:
    Revert "Reland: Clean up implicit fall through."

This brings in 32 new commmits. Among the changes are restored support
for older GCC/clang versions that do not support
__attribute__((fallthrough)).

Signed-off-by: Julius Werner <jwerner@chromium.org>
Change-Id: I1110664bf71b4376bcdd9ba934a95031ba872c1d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47784
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Joel Kitching <kitching@google.com>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-11-21 00:35:46 +00:00
Kevin Chiu
f73580f624 zork: Create gumboz variant
Create the gumboz variant of the dalboz reference board by copying
the template files to a new directory named for the variant.

(Auto-Generated by create_coreboot_variant.sh version 4.2.0).

BUG=b:173536689
BRANCH=zork
TEST=util/abuild/abuild -p none -t google/zork -x -a
make sure the build includes GOOGLE_GUMBOZ

Change-Id: I48db7eba7864c18e7307b45fe9f84073bfca0155
Signed-off-by: Kevin Chiu <kevin.chiu@quantatw.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47717
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rob Barnes <robbarnes@google.com>
2020-11-21 00:19:30 +00:00
Kevin Chiu
d5ffc75fa0 mb/google/zork: update DRAM table for dirinboz
Add Hynix DDR4 DRAM, index was generated by gen_part_id
H5ANAG6NCJR-XNC

BUG=b:173480390
BRANCH=zork
TEST=emerge-zork coreboot

Change-Id: Ib6f26a7b8d014493f4a256b328bee7ad3bf3c2b9
Signed-off-by: Kevin Chiu <kevin.chiu@quantatw.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47700
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Martin Roth <martinroth@google.com>
Reviewed-by: Rob Barnes <robbarnes@google.com>
2020-11-21 00:15:21 +00:00
Kevin Chiu
324b1ee09e util: Add new DDR4 H5ANAG6NCJR-XNC for zork boards
Add DDR4 part H5ANAG6NDMR-XNC. Attributes are derived from data
sheets.

BUG=None
TEST=Compared generated SPD with data sheets and checked in SPD

Change-Id: I324aefbce1b138a2f71aad3173d6a138cf7fa510
Signed-off-by: Kevin Chiu <kevin.chiu@quantatw.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47698
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Rob Barnes <robbarnes@google.com>
2020-11-21 00:14:23 +00:00
Kane Chen
9d86866109 mb/google/zork: update telemetry settings for Woomax
Update Woomax to improve the performance.

BUG=b:168073070
BRANCH=zork
TEST=emerge-zork coreboot

Signed-off-by: Kane Chen <kane_chen@pegatron.corp-partner.google.com>
Change-Id: I2703d15f1fbe715ab1c684274d9e4e0bb55ef23b
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47743
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
2020-11-21 00:07:23 +00:00
Felix Held
07c85ad11c include/device/pci_ids: add PCI IDs for new AMD SoCs
Change-Id: I0caea5627045b7855e2c5f3cb01d4fa21332788b
Signed-off-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47703
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2020-11-21 00:04:29 +00:00
John Su
e59f70a4d9 mb/google/dedede/variants/madoo: Increase TCC offset from 5 to 10
Increase TCC offset value from 5 to 10 for Thermal Control Circuit (TCC)
activation.

BUG=b:171531244
TEST=build and verify by thermal team

Signed-off-by: John Su <john_su@compal.corp-partner.google.com>
Change-Id: Ic2822b059f166779e1f0bcf92e753dad1078783c
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47691
Reviewed-by: EricR Lai <ericr_lai@compal.corp-partner.google.com>
Reviewed-by: Sumeet R Pawnikar <sumeet.r.pawnikar@intel.com>
Reviewed-by: Karthik Ramasubramanian <kramasub@google.com>
Reviewed-by: Ben Kao <ben.kao@intel.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-20 23:08:21 +00:00
Jeremy Soller
aa2159786d Disable WiFi wake
Change-Id: Icf7490278872b11723fec5c6d820728945a8cfe0
2020-11-20 15:54:34 -07:00
Angel Pons
96a06dd464 nb/intel/sandybridge: Rename loop variable
The `discover_edges_real` function actually tests a range of values for
DQS PI and evaluates how the system responds. Rename the loop variable.

Change-Id: I67390ba315d618d153f91c0e8a81db04ec8f63e1
Signed-off-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47606
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-20 22:07:56 +00:00
Martin Roth
cdd7d18120 mb/google/zork: Remove 50ms WIFI delay
As a part of trying to get our boot time as low as possible, any delays
in the code should try to be refactored out.  This removes the 50ms
delay in the WIFI sequence by enabling power and putting the wifi module
into reset in bootblock, then bringing it out of reset in ramstage.
This is significantly longer than the 50ms requirement.  The reset GPIO
was already being set high in ramstage, so that code didn't need to be
added.

BUG=b:171513520
TEST=Boot on boards with different module types, WIFI works on both.
BRANCH=Zork

Signed-off-by: Martin Roth <martinroth@chromium.org>
Change-Id: I211d3da338ad368d1f011f03cf7d05121c057075
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47719
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marshall Dawson <marshalldawson3rd@gmail.com>
2020-11-20 19:30:48 +00:00
Johnny Lin
5b47d77047 intel/fsp2_0: Add soc_validate_fsp_version for FSP version check
Only need to check this once so check it at romstage where
the console is usually ready. Also define union fsp_revision
to avoid code duplication.

Change-Id: I628014e05bd567462f50af2633fbf48f3dc412bc
Signed-off-by: Johnny Lin <johnny_lin@wiwynn.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47559
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Marc Jones <marc@marcjonesconsulting.com>
Reviewed-by: Jonathan Zhang <jonzhang@fb.com>
2020-11-20 18:58:54 +00:00
Jeremy Soller
5352c7b0b2 Merge remote-tracking branch 'upstream/master' into galp5
Change-Id: I718ce2ea23c20405a0392793361cf3e52e864276
2020-11-20 10:30:40 -07:00
Wisley Chen
982f64d1b7 mb/google/volteer/var/elemi: Update gpio
1. Config EN_PP3300_SSD (GPP_B2) to gpo
2. EMMC_CLKREQ_ODL(GPP_C1) change to GPP_H11
3. WLAN_PERST_L (GPP_H10) change to GPP_H10

BUG=b:172630765, b:171467336
BRANCH=volteer
TEST=emerge-volteer coreboot chromeos-bootimage and boot into emmc
Change-Id: I9d112373c4ecd2cea5ce3d2d47b190c061d50da6
Signed-off-by: Wisley Chen <wisley.chen@quantatw.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47705
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-20 16:34:49 +00:00
Wisley Chen
e928391f74 mb/google/volteer/var/elemi: enable Genesys Logic GL9763E
Enable Genesys GL9763E as PCI-to-eMMC bridge.

BUG=b:171467336
BRANCH=volteer
TEST=emerge-volteer coreboot

Signed-off-by: Wisley Chen <wisley.chen@quantatw.com>
Change-Id: I858c12151df5b6fc19132869317edfa1b090335d
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47040
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Tim Wawrzynczak <twawrzynczak@chromium.org>
2020-11-20 16:34:35 +00:00
Paul Menzel
bb1ada6d3a mb/asus/f2a85-m_pro: Enable PCIe bridge 00:15.2 in AGESA
Currently, the PCIe bridge 00:15.2 is not detected by coreboot, causing
the connected network device also to be missing.

This is caused by not configuring the third of the four PCIe General
Purpose Ports (GPP) of the AMD Fusion Controller Hub (FCH), which can be
exposed as one to four PCIe devices.

So, enable it in AGESA but disable enumeration in coreboot. Otherwise,
the serial console stops working in romstage after

    […]
    PCI: 00:15.1 bridge ctrl <- 0013
    PCI: 00:15.1 cmd <- 06
    PCI: 00:15.2 bridge ctrl <- 0013
    PCI: 00:15.2 cmd <- 07

and the system hangs in the payload (SeaBIOS banner is shown on VGA
attached monitor).

TEST=Serial console and payload works, and Linux 5.10-rc2 configures
     PCIe bridge. Output of `lspci -t`:

    -[0000:00]-+-00.0
               +-00.2
               +-01.0
               +-01.1
               +-10.0
               +-10.1
               +-11.0
               +-12.0
               +-12.2
               +-13.0
               +-13.2
               +-14.0
               +-14.2
               +-14.3
               +-14.4-[01]--
               +-14.5
               +-15.0-[02]--
               +-15.1-[03]----00.0
               +-15.2-[04]----00.0
               +-18.0
               +-18.1
               +-18.2
               +-18.3
               +-18.4
               \-18.5

Change-Id: Ia1d60a212b0d249c7d8b3f8ec16baf5e93c985da
Signed-off-by: Paul Menzel <pmenzel@molgen.mpg.de>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/46527
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Nico Huber <nico.h@gmx.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-20 16:01:16 +00:00
Maxim Polyakov
33f4ec8217 Makefile.inc: Add CARRIER_DIR to component discovery
The idea is to split the “mainboard” category into “variants” and
“carrierboards”, in the case when we use the COMe module together
with the Carrier Board instead of a single monolithic motherboard.
Previously, the “variants” category defined the type of motherboard,
which has a number of differences from the base one, for example, it
differed in the size or type of memory, and in the configuration of
the interfaces. Thus, there is no need to create a separate directory
in src/mainboard for a board that is similar in configuration to the
base board. But for a COMe module, “variants” contains different
variants of only this module, and the entire Carrier Board configuration
is allocated to a separate category - “carrierboards”, and each of the
variants can be used with one of the many boards in “carrierboards”.

For example, in the case of the Kontron mAL10 COMe module, variant
refers to the COMe-mAL10 or COMe-m4AL10 module type. They differ in the
type of memory (DDR3L or DDR4), and maybe they differ in some chips (see
more in https://www.kontron.com/products). However, all variants contain
the same type of processor/SoC.

The "carrierboards" directory can be able contain both the Kontron's
Evalution carrier boards (such as Eval Carrier2 T10 and COMe
Ref.Carrier-i T10  TNI) and third party vendor backplanes that are
compatible with the COMe modules from “variants”.

Thus, the src/mainboard/<module-name> directory contains the common
configuration code for all variants from src/mainboard/<module-name>/
variants, which can be supplemented/redefined with a configuration from
src/mainboard/<module-name>/carrierboard/<vendor-carrierboard-name>.

This architectural solution will be able to systematize and simplify
understanding of the code structure for COMe modules and will allow
vendors to add/maintain their code in a separate directory.

This work is also the first step towards to union of all carrierboards
into the global category in src/carrierboard on a par with all boards
from src/mainboard.

The patch takes this into account in the build system and adds
CARRIER_DIR component to use the “carrierboards” category, as it has
done for VARIANT_DIR.

TEST = Build ROM image for Kontron mAL10 COMe module together with T10
TNI carrier board (https://review.coreboot.org/c/coreboot/+/39133).

Change-Id: Ic6b2f8994b1293ae6f5bda8c9cc95128ba0abf7a
Signed-off-by: Maxim Polyakov <max.senia.poliak@gmail.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/42609
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Patrick Georgi <pgeorgi@google.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-20 15:37:58 +00:00
Felix Singer
8db0a22677 vc/intel/fsp2/denverton_ns: Remove unused files
The Denverton-NS SoC uses the header files from the FSP git repository.
Therefore, remove these from coreboot source.

Change-Id: Ib22d3f5e5ce83eb83bf589ea8bba7b55ebe44ea8
Signed-off-by: Felix Singer <felixsinger@posteo.net>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/47754
Reviewed-by: Mariusz Szafrański <mariuszx.szafranski@intel.com>
Reviewed-by: Arthur Heymans <arthur@aheymans.xyz>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Reviewed-by: Michael Niewöhner <foss@mniewoehner.de>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-11-20 15:25:11 +00:00
Jeremy Soller
f786129104 Add CPU LTR for lemp10
Change-Id: I6d3c0aad1d120185c5801420093c64f85ba89ada
2020-11-19 15:54:26 -07:00
Jeremy Soller
dafe9d6fe0 Add CPU LTR
Change-Id: I91c494b2d085abc6bea10bda0bc13fb31eec2cff
2020-11-19 15:49:37 -07:00
Jeremy Soller
953ceb040b Sync lemp10 with galp5
Change-Id: I1808db36e269b828d7cec0f3300915b4be2e6622
2020-11-19 13:32:49 -07:00
Jeremy Soller
f10995e09e Fix missing on
Change-Id: I0f8ffe1edfd19d05b735f7b95fdd46e469682950
2020-11-19 12:16:13 -07:00
Jeremy Soller
3fae15eea4 Fix typo
Change-Id: I92af63f5f4075e96ba0a4b60f34409d69dce9761
2020-11-19 12:15:25 -07:00
Jeremy Soller
b14e953b71 Remove unused USB ports and crash log
Change-Id: Id1978bddb3f63d1b9623d92b8b7d1b5b74cbd328
2020-11-19 12:13:11 -07:00
Jeremy Soller
7d302de633 WIP: Reorganize devicetree
Change-Id: Ia17916de8794077e57ce7fd04464e99d3751479d
2020-11-19 12:09:40 -07:00
Jeremy Soller
cf36cd8f13 WIP: adjust GPIOs to enable retimer
Change-Id: If9256d01dc844b7272433827ca40d874c55eb713
2020-11-19 10:46:13 -07:00
Jeremy Soller
77009f599d Add PEG0 definition
Change-Id: I75f36d32b53c0cf683a36cd3518cc0c966cf2077
2020-11-18 21:34:51 -07:00
Jeremy Soller
047e58bc35 Move CPU AER and PTM config to mainboard
Change-Id: Idd7908426e33a64afa34ea9e5d02ec7378a56271
2020-11-18 21:13:15 -07:00
Jeremy Soller
130a3b0281 WIP: undo changes that might impact CPU PCIe
Change-Id: Ied4e4ed4c11172a9bb1c7aa47787ba6fb7e72803
2020-11-18 20:27:11 -07:00
Jeremy Soller
18cb9b5ab0 Sync lemp10 CPU power config with lemp9
Change-Id: Ia326f80113c1d19c18d492d5387057fe939b3809
2020-11-18 12:50:34 -07:00
Jeremy Soller
2267ee62e4 Fix lemp10 USB config
Change-Id: If371e351956b4ef65e3c7989f45ec8a88c55e3af
2020-11-18 12:49:52 -07:00
Jeremy Soller
6d1cc1ca1d Sync galp5 with lemp10
Change-Id: I7fdb50fd56beba8a38bdeb10e838dc22eb857deb
2020-11-18 10:59:37 -07:00
Jeremy Soller
1331815d90 Disable CPU PCIe clock req messaging
Change-Id: I7936a770463d150b5310b89a4ab577d8c9aacc98
2020-11-17 20:48:05 -07:00
Jeremy Soller
9847012bc6 Disable Precision Time Measurement for CPU PCIe ports
Change-Id: I007b6825a7d558254f890723ef568b96d9e884bc
2020-11-17 19:26:27 -07:00
Duncan Laurie
efd716cef0 soc/intel/tigerlake: Expose UPD to disable Precision Time Measurement
Expose a config option that allows disabling the FSP UPD which controls
Precision Time Measurement for a particular PCIe root port.  Since this
is enabled by default the option is inverted to allow disabling for
a particular port while not affecting others.

BUG=b:160996445
TEST=boot on volteer with PTM disabled for the NVMe root port

Change-Id: Icb51b256eb581d942b2d30fcabfae52fa90e48d4
Signed-off-by: Duncan Laurie <dlaurie@google.com>
2020-11-17 19:24:07 -07:00
Patrick Rudolph
417fa84913 device/pciexp: Allow ASPM on bridge devices
The device acceptable latency field is only valid for 'endpoints',
but not for bridge devices. Set the maximum acceptable latency on
such devices to allow ASPM being enabled if supported on both sides.

Allows the PCIe link on bridge devices to go into L0s/L1.

This allows the package to enter a deeper sleep state when all links
are idle.

WARNING: This might cause issues on PCIe bridge devices that doesn't
properly support ASPM. In addition it might decrease performance.

Change-Id: I277efe0bd1448ee8bff633428aa729aeedf04e28
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
2020-11-17 19:13:14 -07:00
John Zhao
d13acd817d device: Enable ASPM for TBT PCIe root ports
The virtual/generic device under TBT PCIe root ports has path type as
DEVICE_PATH_GENERIC. While scanning the pcie bus, the generic device
blocks its root ports configuration. This change adds device path type
check and enables ASPM for TBT root ports.

BUG=b:173207454
TEST=Built image and booted to kernel on Voxel board. Verified both of
the TBT Root ports 00:07.0 and 00:07.1 ASPM are enabled.

Signed-off-by: John Zhao <john.zhao@intel.com>
Change-Id: I82ffaeb5a8821d9034d8dae9d98d3b5953a9608b
2020-11-17 19:12:04 -07:00
Jeremy Soller
79aa5fa87f Debug pcie rtd3
Change-Id: I60d2b7533178c8fad5871b0d3b0e3cd6a3cb99e8
2020-11-17 17:08:18 -07:00
Jeremy Soller
2d40287435 Add _PR3 power resource to RTD3 driver
Change-Id: Iddfeaaf1424f7af9983167dd5e234d656e252da7
2020-11-17 16:35:27 -07:00
Jeremy Soller
604e699ace Disable debug console
Change-Id: Ieca895cb4c7be95600f955ed85fc06f877ba9216
2020-11-17 13:53:16 -07:00
Jeremy Soller
68ccba9a11 Enable GNA and disable I2C2 pins
Change-Id: I46b6254748f13c763551ac48e390aedfb2a6def1
2020-11-17 13:51:16 -07:00
Jeremy Soller
faa6da02cc Do not disable PEG60 srcclk
Change-Id: I08808789e48f7e25d8419d752e238cc8c35c3df8
2020-11-16 21:19:39 -07:00
Jeremy Soller
3d0ab91fce Debug root port number in RTD3 driver
Change-Id: I2ce1d69bc8ccc4602b745dd3672af30a70ecff73
2020-11-16 20:59:51 -07:00
Michael Niewöhner
306b440892 [TEST] LPIT table test implementation
... cowardly stolen from CB:32350 ;-)

Change-Id: I08b9948366db68bf16076e330bbca8c8dc85e65c

Signed-off-by: Shaunak Saha <shaunak.saha@intel.com>
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
Change-Id: Ibb7f34d03120824710e84d69f8459ea8bd35fbcb
2020-11-16 19:54:13 -07:00
Michael Niewöhner
903d70ab8e soc/intel/common/acpi,mb/*: replace the two obsolete LPID with PEPD
Replace the two obsolete LPID implementations with the new PEPD device.

The PEPD device gets included in the plaforms' `southbridge.asl`, since
it is required to load the `intel_pmc_core` module in Linux, which
checks for the _HID. (See CB:46469 for more info on that.)

There is no harm for mainboards not supporting S0ix, because the _DSM
function won't be called with the LPS0 UUID on such boards. Such boards
can use the debugging functionality of `intel_pmc_core`, too.

Change-Id: Ic8427db33286451618b50ca429d41b604dbb08a5
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-16 19:54:13 -07:00
Michael Niewöhner
914ec1eb46 soc/intel/common/acpi: add _HID to PEPD
Add the _HID INT33A1 to PEPD to make Linux recognize it as "Intel Power
Engine" in the pmc core driver.

The _ADR gets dropped, because _HID and _ADR are mutually exclusive.

Change-Id: I7a0335681f1601f7fd8a9245a3dea72ffd100b55
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-16 19:54:13 -07:00
Michael Niewöhner
0b02151c1a soc/intel/common/acpi: correct return value for PEPD enum function
The PEPD enum function returns a bitmask to announce supported/enabled
PEPD functions. Add a comment describing this bitmask and correct the
return value to announce function 1, 5 and 6 as supported.

Also add comments to the disabled functions 3 and 4.

Change-Id: Ib523a54f5ad695e79005aba422282e03f2bc4bed
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-16 19:54:13 -07:00
Michael Niewöhner
032971dc2c soc/intel/common/acpi: work around Windows crash on S0ix-enabled boards
Windows does not comply with the Low Power Idle S0 specification and
crashes with an `INTERNAL_POWER_ERROR` bluescreen when function 1, does
not return at least one device constraint, even when function 1 is
announced as being not available by the enum function. Returning an
empty package does not work.

At least the following Windows versions were verified to be affected:
- Windows 8.1 x64, release 6.3.9600
- Windoes 10 x64, version 1809, build 17763.379
- Windows 10 x64, version 1903, build 18362.53
- Windows 10 x64, version 2004, build 19041.508
- Windows 10 x64, version 20H2 / 2009, build 19042.450

To make Windows work on S0ix-enabled boards, return a dummy constraint
package with a disabled dummy device.

Since the device constraints are only used for debugging low power
states in Linux and probably also in Windows, there shouldn't be any
negative effect to S0ix. Real device constraint entries could be added
at a later point, if needed.

Note: to fully prevent the BSOD mentioned above the LPIT table is
required on Windows, too. The patch for this is WIP, see CB:32350.
If you want to test this, you need to applie the whole ACPI patch
series including the hacky LPIT test implementation from CB:47242:
https://review.coreboot.org/q/topic:%22low_power_idle_fix%22

Test: no bluescreen anymore on Clevo L140CU on all Windows versions
listed above and S0ix gets detected in `powercfg -a`.

Change-Id: Icd08cbcb1dfcb8cbb23f4f4c902bf8c367c8e3ac
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-16 19:54:13 -07:00
Michael Niewöhner
c4726c168e soc/intel/common/acpi: drop return value for disabled PEPD function 2
PEPD function 2 is currently unused and disabled. Thus, drop the return
value, which matches the default return value.

Change-Id: Ia95b8b36fcb78e8976b66de15ec214a38c178cda
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-16 19:54:13 -07:00
Michael Niewöhner
72ceea7118 soc/intel/common/acpi: rename PEPD/LPI macros for clarification
`ARG2` in the macro's names does not really provide any useful
information. Drop it and add `LPI` to clarify the relation to only
low-power idle states.

Change-Id: I8d44c9e4974c7f34aa5c32ba00328725f536fda6
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-16 19:54:13 -07:00
Michael Niewöhner
1ff04c8b7d soc/intel/common/acpi: rename LPID to PEPD
Rename LPID to PEPD for consistency. PEPD means "Power Engine Plug-In
Device" and is the name Intel and vendors usually use, so let's comply.

Change-Id: I1caa009a3946b1c55da8afbae058cafe98940c6d
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-16 19:54:13 -07:00
Michael Niewöhner
8369925be2 soc/intel/common/acpi: move S0ix UUID to the condition
Move the UUID to the condition, since there is no need to assign a name
when it is only used once. Also add a comment to make clear that the
functions inside that condition are only used by the Low Power Idle S0
functionality, while the PEPD in general can be present on boards
without S0ix capability, too. For details check CB:46469.

Change-Id: Ic62c37090ad1b747f9d7d204363cc58f96ef67ef
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-16 19:54:13 -07:00
Michael Niewöhner
0bf0c25af4 soc/intel/common/acpi: drop the southridge scope around PEPD
PEPD will get included directly in the southbridge. Thus, drop the
scope around it.

Change-Id: Icb7a40e476966a7aca36bee055ee71d181508b87
Signed-off-by: Michael Niewöhner <foss@mniewoehner.de>
2020-11-16 19:54:12 -07:00
Jeremy Soller
8bd1ee6bd4 Remove lpit acpi code
Change-Id: Iaa51fa7a58a5649be4671437377d2fc94cd8ff8d
2020-11-16 19:54:12 -07:00
Jeremy Soller
d206f606e1 Disable legacy 8254 timer on lemp10
Change-Id: I0d8acc95b778d0d3c1acb29890c765d9c8eba0b3
2020-11-16 10:56:18 -07:00
Jeremy Soller
8ddde8e912 Enable SATA SALP support
Change-Id: If261f708d943df3ad46082a9d4365fd1b9f47f06
2020-11-16 10:49:51 -07:00
Jeremy Soller
abb149ebce Add default IomTypeCPortPadCfg
Change-Id: I5b6639f7f5a2b62aa644c93c69889dda590c34d5
2020-11-16 09:24:34 -07:00
Duncan Laurie
5c341798b3 soc/intel/common: Use per-soc definition for BAR sizes
The various platform BARs are not always the same size across different
SOCs, so use the defined size rather than a hardcoded value.

This results in the following change on TGL which increased the MCHBAR
size to 128K:

-system 00:00: [mem 0xfedc0000-0xfeddffff] has been reserved
+system 00:00: [mem 0xfedc0000-0xfedc7fff] has been reserved

And fixes the following error output from the kernel:

resource sanity check: requesting [mem 0xfedc0000-0xfedcdfff],
  which spans more than pnp 00:00 [mem 0xfedc0000-0xfedc7fff]

Change-Id: I82796c2fc81dec883f3c69ae7bdcedc7d3f16c64
Signed-off-by: Duncan Laurie <dlaurie@google.com>
2020-11-16 08:52:31 -07:00
Duncan Laurie
d4e3f5a44c soc/intel/tigerlake: Enable GPIO IOSTANDBY configuration
Enable SOC_INTEL_COMMON_BLOCK_GPIO_IOSTANDBY so the pads can be
configured with non-zero IOSSTATE values.

BUG=b:171993054

Signed-off-by: Duncan Laurie <dlaurie@google.com>
Change-Id: I1f895dbdbb71a353a98272db6dc70b54e8e172a3
2020-11-16 08:51:03 -07:00
Jeremy Soller
934fe49137 Add lpit asl to lemp10
Change-Id: I52fb84961cdd0ca8aef23f53ebab06041610a014
2020-11-14 21:20:28 -07:00
Jeremy Soller
32e9a708d5 Select retimer driver
Change-Id: I03304ffe1e6bc108c4557a9dfbe448729d2eaec0
2020-11-14 20:38:13 -07:00
Jeremy Soller
d695072b56 Add retimer device
Change-Id: I40f380af709acce80ce96c674eca521683b1252d
2020-11-14 20:36:36 -07:00
Jeremy Soller
7a1774b337 Enable SATA devslp on lemp10
Change-Id: Ic41d672431d76519406eb3403f8ce1f8b154d6d9
2020-11-14 20:24:11 -07:00
Jeremy Soller
2214f27d92 Add rtd3 config for lemp10 m.2 slots
Change-Id: I0d49ba23205801dbcca7fe420ed8e763e1e80514
2020-11-14 20:13:22 -07:00
Duncan Laurie
bcda5840d2 soc/intel/tigerlake: Enable RTD3 driver and IPC mailbox
This SOC overrides the common PMC device and instantiates the PMC device
in the SSDT.  It needs to call the common PMC function to provide the
IPC mailbox method.

The common PCIe RTD3 driver can also be enabled which will allow
mainboards to enable Runtime D3 power control for PCIe devices.

BUG=b:160996445
TEST=boot on volteer with this driver enabled for the NVMe device in the
devicetree and disassemble the SSDT to ensure the RTD3 code is present.

Signed-off-by: Duncan Laurie <dlaurie@google.com>
Change-Id: Ifa54ec3b8cebcc2752916cc4f8616fcb6fd2fecc
2020-11-14 19:59:42 -07:00
Duncan Laurie
3a549208b5 soc/intel/common: Add PCIe Runtime D3 driver for ACPI
This driver is for devices attached to a PCIe root port that support
Runtime D3.  It creates the necessary PowerResource in the root port to
provide _ON/_OFF methods for which will turn off power and clocks to the
device when it is in the D3cold state.

The mainboard declares the driver in devicetree and provides the GPIOs
that control power/reset for the device attached to the root port and
the SRCCLK pin used for the PMC IPC mailbox to enable/disable the clock.

An additional device property is created for storage devices if it
matches the PCI storage class which is used to indicate that the storage
device should use D3 for power savings.

BUG=b:160996445
TEST=boot on volteer device with this driver enabled in the devicetree
and disassemble the SSDT to ensure this code exists.

Signed-off-by: Duncan Laurie <dlaurie@google.com>
Change-Id: I13e59c996b4f5e4c2657694bda9fad869b64ffde
2020-11-14 19:59:25 -07:00
Jeremy Soller
e2c16d57e3 Merge remote-tracking branch 'upstream/master' into galp5
Change-Id: I13cd0997db873191951e5c74c819b00acbbf1e89
2020-11-14 19:56:37 -07:00
Jeremy Soller
721cfbc4c5 Disable s3
Change-Id: I1fa063eed7f439ae390225340a10050d0549e65b
2020-11-14 16:35:35 -07:00
Jeremy Soller
2ad8956e6a Add fivr and lpm config
Change-Id: I702cc273aed7d676016c587e38f31945948b2bc6
2020-11-13 21:55:23 -07:00
Jeremy Soller
dfaccb9009 Enable S0iX
Change-Id: Iba1828a385456a1a5a4e998af9b22e312e298119
2020-11-13 19:58:42 -07:00
Jeremy Soller
247a002d4a Disable PM timer to prevent TCO watchdog timeout on resume from suspend
Change-Id: I46047d5fe36320fbb4673ac92f523d8bb2832f0c
2020-11-13 09:14:39 -07:00
Jeremy Soller
69ed89d502 Disable GPU RTD3 temporarily
Change-Id: I12ca425807c9a71137a7595fabad37ee2ebd35fc
2020-11-11 08:47:21 -07:00
Jeremy Soller
82bca31f3f Disable CPU PCIE RP AER by default
Change-Id: I619e7845d16eeca5544cd88789facebe18742c46
2020-11-10 14:26:37 -07:00
Jeremy Soller
e82bbc5f2f Enable smbus and fix m.2 clkreqs
Change-Id: I521a30570efafb528e4d77688677307507f97742
2020-11-10 09:18:47 -07:00
Jeremy Soller
0ecb18229e Sync some galp5 and lemp10 gpios
Change-Id: I0159b093bb5fc6edde3ca94c014645f3a19cb148
2020-11-09 09:26:18 -07:00
Jeremy Soller
2fb0138a9b Annotate lemp10 gpios
Change-Id: I54b39f7f58330bad642e80d6d04de3ca76671a06
2020-11-09 09:22:33 -07:00
Jeremy Soller
ce6bff58d2 Allow TGL mixed topology to have mismatched SPD length
Change-Id: I1a0d66ed580cf2f11c61500b801335500b35c603
2020-11-06 11:01:01 -07:00
Jeremy Soller
15436f7225 Enable lemp10 integrated memory
Change-Id: Ic2e74a34e2e1b3c0044f23d6b24114a5b0575f64
2020-11-06 10:41:17 -07:00
Jeremy Soller
287fc4c7dc Update lemp10 touchpad GPIO
Change-Id: Idf45d3e41b4cf3c9480d0a11cfbd5017e69087cd
2020-11-03 11:43:14 -07:00
Jeremy Soller
56da115d48 Disable integrated memory on lemp10 temporarily
Change-Id: I31bce31c853234f2e30a84e3da82434704da3ff3
2020-11-03 11:40:05 -07:00
Jeremy Soller
fdfd543cca Sync galp5 and lemp10 romstage
Change-Id: I777d52fe47e5c60613442afc8c036c44fbe31ac6
2020-11-03 11:00:10 -07:00
Jeremy Soller
00396acb5c Update devicetree definition of wifi
Change-Id: I1cfebe558953e375d17b8b98d627b05556ab5743
2020-11-03 10:40:47 -07:00
Jeremy Soller
063c9484d7 Merge remote-tracking branch 'upstream/master' into galp5
Change-Id: Idb9f8389e2f1b16091f06f2a786e44968b566be3
2020-11-03 10:26:49 -07:00
Jeremy Soller
6576e07dd7 lemp10
Change-Id: Ia3d636931efd5bab6047a4305ba934b707043568
2020-10-30 11:48:31 -06:00
Jeremy Soller
11d4c0495d Adjust touchpad interrupt
Change-Id: Ia04988d063b52fe03ef21a34a154b40af7c2bef4
2020-10-28 14:51:21 -06:00
Jeremy Soller
8d7bbb9369 Fix galp5 compilation
Change-Id: I20eec17107cf7d609a8b21fede86095a29e34db7
2020-10-28 12:42:38 -06:00
Jeremy Soller
3ace8eb089 Merge remote-tracking branch 'upstream/master' into galp5
Change-Id: Ia43c6f4cdd97cd8c20a15a71499291ad4a92dedf
2020-10-28 12:03:28 -06:00
Jeremy Soller
581081092e Update galp5 power limits
Change-Id: Ic9b22570cc2e61b5489f7bbdb58e7920a4507b7f
2020-10-27 08:36:48 -06:00
Jeremy Soller
467ae4536d Move TGL MMCONF address to CNL address
Change-Id: Ibe2b299d8026ad84a0197093effcfa8756e4b7e9
2020-10-16 13:13:52 -06:00
Jeremy Soller
bcd90d09a3 Use MMCONF address for DGPU PCIe registers
Change-Id: I6ff555e2695a6495b00af30daefae55cb0a532e7
2020-10-16 13:08:42 -06:00
Jeremy Soller
87712d8d53 Fix use of DGPU_DEVICE config
Change-Id: I019227731e0f0db7f5202fa8144392dd8d073198
2020-10-16 12:54:40 -06:00
Jeremy Soller
789a6f3815 Fix GPU root port
Change-Id: I270199003437634c7cd07efcafa9a01d48be6f15
2020-10-16 12:46:19 -06:00
Jeremy Soller
4714bc94b1 Configurable GPU root port
Change-Id: Iae1641a407e075087179f11e186092b40c0c3022
2020-10-16 12:42:57 -06:00
Jeremy Soller
a1aaca8cc8 Add i915_gpu_controller_info
Change-Id: I5f4e360974aefc75570ec20e500bb77bd962ca0a
2020-10-16 12:01:09 -06:00
Jeremy Soller
d58c413a7a Enable NVIDIA GPU and ACPI backlight
Change-Id: If92c122ab2eaf0ef6fad13e2fe42b0532a25ee15
2020-10-16 11:56:32 -06:00
Jeremy Soller
bd046ce5dd ROM stage has been confirmed
Change-Id: Ib2b73d8a9498907416a3f8c31f5eac0965310f66
2020-10-16 11:49:46 -06:00
Jeremy Soller
94cfd014ee Add PEG60 IRQ mappings
Change-Id: I747a58fb056c5c19f4c4e3e50eedf2f396077f8b
2020-10-16 11:24:17 -06:00
Jeremy Soller
3449cbbdca Disable GMA ACPI
Change-Id: Ifc07265b35bc41a980cb0c8f034294144409f510
2020-10-16 09:32:50 -06:00
Jeremy Soller
1bb86c038d Adjustments to device tree
Change-Id: I3016dbdea9f6d6fb463d5306b7f4ffda2536e08c
2020-10-16 08:51:00 -06:00
Jeremy Soller
a67207b24e Disable GPU sleep hook
Change-Id: I99cae1176de1a163cdcc7fde19c3757b26c590b5
2020-10-15 20:58:13 -06:00
Jeremy Soller
ace9fe645a Enable more PCIe devices
Change-Id: I1113ae7f601b8c9db05ea8ec794d6e4b149af6b5
2020-10-15 20:54:01 -06:00
Jeremy Soller
0a7afd5b4c Disable GPU driver
Change-Id: I689a7ff7ef1fec0e78d85116c4b97e7ba0f394fd
2020-10-15 20:53:50 -06:00
Jeremy Soller
eb2feb01fe Fix UART and touchpad interrupt
Change-Id: I1a13f34d9efa0e381ffffa3bbc5263b6c3d94974
2020-10-15 19:41:51 -06:00
Jeremy Soller
cbcb467005 Enable UART2_TXD
Change-Id: I130f92018524f1746133ae37bdc6106226082cfa
2020-10-15 12:49:16 -06:00
Jeremy Soller
532ba5d55e Disable GPU, document GPIOs
Change-Id: Ieee0c7c5dd4a1e6da29bf3fca10ff957f89eaf95
2020-10-15 10:15:36 -06:00
Jeremy Soller
3c0bcaa4a1 Add displayport config
Change-Id: Id86108ad223695c994018cc2c7481b168264dc00
2020-10-15 08:49:30 -06:00
Jeremy Soller
ce3053ad87 Set continuous serirq
Change-Id: I2c099901a1e7b8b1402b5261c2a5c5a1685ec69f
2020-10-15 08:49:15 -06:00
Jeremy Soller
83f634f231 Add SSD1 clkreq
Change-Id: Id10a760c2c854583297c53c096f588a7c58b2248
2020-10-14 20:21:13 -06:00
Jeremy Soller
53be4d2666 Disable unused TBT devices
Change-Id: Id5831f95fd1ac3545063b6155f957bfe1943e340
2020-10-14 20:19:30 -06:00
Jeremy Soller
3c75673da2 Adjust GPIO init to look like prior boards
Change-Id: I36ff193a1d540f1723f45ebd7326a02b24c090d7
2020-10-14 20:14:03 -06:00
Jeremy Soller
d811be0127 Fix ROM stage
Change-Id: Iede1a99d7a40e236c8cf9a89f652e23adb2289ed
2020-10-14 20:13:50 -06:00
Jeremy Soller
43da0a5d6e Updates for new FSP
Change-Id: I7709d5f69d113cc5a4464f0e163403ffea1f2313
2020-10-14 15:58:51 -06:00
Jeremy Soller
a742e159e4 Fix DIMM addresses
Change-Id: I0314d0942a9f84e547d0899f723b33af3671a19c
2020-10-14 15:39:48 -06:00
Jeremy Soller
05708809fc Add some GPIO comments
Change-Id: I5137f61e40f081da7d97f5478414b77fc13e0bca
2020-10-13 13:17:35 -06:00
Jeremy Soller
bd9d221978 More compilation fixes
Change-Id: I9cfffd9792675eaaa036225f4229da127caa143f
2020-10-13 12:41:20 -06:00
Jeremy Soller
da78b7d723 Add missing include
Change-Id: I03d9c548353af9067223723a67ad3996cd2f92a1
2020-10-13 12:31:05 -06:00
Jeremy Soller
a90ec66c0a Fix compilation
Change-Id: Ie6e0bf1d4ad7829d0d76c716d241ac5c15e9c331
2020-10-13 12:29:53 -06:00
Jeremy Soller
9d7f328e41 galp5
Change-Id: I09342ee3a49331f8c1463f962ea8fc2d522ef448
2020-10-13 11:59:41 -06:00
Jeremy Soller
ce6ff1d16f Update .gitmodules
Change-Id: I8c6e912aedc4527b58009ec930e9769424af4ba4
2020-10-13 11:59:05 -06:00
Jeremy Soller
3a3b10b81d Merge remote-tracking branch 'upstream/master' into galp5
Change-Id: I10d9f61ff58ff2edd7d6e8430dd42be3b93cc994
2020-10-13 11:54:56 -06:00
Tim Crawford
8be09c0c61 mb/system76/oryp5: Use VBT from oryp6
Change-Id: I0c2c9fd90ad9b54ce7af3c67c747f7c7e299632a
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2020-10-07 06:32:56 -07:00
Tim Crawford
a88ed3f87a mb/system76/oryp5: gpio: Convert raw pads to macros
Tested with BUILD_TIMELESS=1

Change-Id: I5e9c2eae1245690e1efccf1211dcaee831067436
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2020-10-07 06:32:56 -07:00
Tim Crawford
32a9c2f786 mb/system76/oryp5: Add Oryx Pro 5
Change-Id: I0bbbddbb46c1a4a70146e7384ce1fbc9448c9269
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2020-10-07 06:32:56 -07:00
Jeremy Soller
5a710b2387 Add PCI_DEVICE_ID_INTEL_CNP_H_SMBUS to soc/intel/common/block/smbus/smbus.c
Change-Id: I9fd425b199c17d11c49add504c645d9aa1aae122
2020-10-05 13:58:14 -07:00
Jeremy Soller
a4a356011b Sync addw1 with addw2
Change-Id: Ie4bf24567eb3da046e6b2102e61db697e7c0f932
2020-10-05 13:58:14 -07:00
Jeremy Soller
84bb9befff addw1
Change-Id: Iae42a750dce4d93d1dea75eef6c47f08160f3fe1
2020-10-05 13:58:14 -07:00
Jeremy Soller
caf3ce984c Save and restore ECOS during suspend/resume
Change-Id: I137ef6c574a372601bc51f6e815158767acd0e1b
2020-09-29 19:42:54 -06:00
Tim Crawford
35d6693a27 mb/system76: Enable battery charging thresholds
Change-Id: Icdd0d67c4d054fdbbb726db4827ca6164753c477
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2020-09-22 16:08:13 -06:00
Tim Crawford
1f24cd4271 ec/system76/ec: Add battery charging thresholds
Change-Id: I3d656291c096f320d469274677e9fe6c74819d25
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2020-09-22 16:08:13 -06:00
Jeremy Soller
2ee83f8df4 cml-u,whl-u: Disable above 4G allocation to fix running out of MTRRs
Change-Id: Icfee8750ad225e5b4f2fd1118230b7c0b8d0f850
2020-09-22 11:21:38 -06:00
Jeremy Soller
64004943b4 cml-u: Remove unused TBT ACPI code
Change-Id: Iade0316d76f2bd1fb037fcdb18e7d81f3b6fdbb0
2020-09-22 06:23:05 -06:00
Jeremy Soller
c97a435978 cml-u: Sync devicetree changes from lemp9
Change-Id: I69855d082708b185815343b2d92807f3028b2478
2020-09-22 06:23:01 -06:00
Jeremy Soller
e13bade2dd cml-u: Remove hacks no longer required for thunderbolt and camera toggle
Change-Id: I17e293f524253a14d7a07842f7abf8e75ad472a8
2020-09-22 06:22:55 -06:00
Tim Crawford
1853d8737b mb/system76: Convert to devicetree subsystemid
Upstream has converted all uses of SUBSYSTEM_{VENDOR,DEVICE}_ID in
Kconfig to subsystemid in devicetree. It will soon produce a lint error
from Jenkins [1].

[1]: https://review.coreboot.org/c/coreboot/+/45513/

Change-Id: I66d5d5f23d3c8ab6ed79dad432a0773841147eea
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2020-09-21 08:12:25 -06:00
Tim Crawford
7ba5665046 mb/system76/thelio-b1: Fix devicetree formatting
Change-Id: I35b238aaea49b6213c1b4094d0ac153ab9a76c8c
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2020-09-21 08:12:25 -06:00
Tim Crawford
1ff8f316f4 ec/system76/ec: Sync changes from upstream
Change-Id: I277324a731548fd9d30e790922834172ac86c2a3
2020-09-18 11:52:27 -06:00
Tim Crawford
3dd5bc6550 mb/system76: Remove FSP_M_XIP
FSP_M_XIP is already selected by the soc.

Ref: 48833363da ("mb/system76/lemp9: drop FSP_M_XIP")
Change-Id: I4bb33208119e27d036e8a0bcb63a99dec9cf3bce
2020-09-17 09:56:28 -06:00
Jeremy Soller
1a8107d238 Add OLED screen toggle 2020-09-03 12:13:31 -06:00
Jeremy Soller
b39c286f31 Add ACPI thermal interface to S76D
Change-Id: I1ada73d5a255074a2f628e18cc605e8dc6109c0e
2020-09-03 12:13:31 -06:00
Jeremy Soller
f338b238da gaze15: fix touchpad interrupt
Change-Id: I535fa847d791aa2d7c805ce616163d7582b689b0
2020-09-02 08:40:50 -06:00
Jeremy Soller
fa5896209f ec/system76/ec: Clean up and document ACPI EC registers
Change-Id: I8d60b1826fd5402978fb7092fe807da0c4dd5179
2020-09-02 08:40:50 -06:00
Jeremy Soller
fbf0bd5b7e soc/intel/cannonlake: Allow setting of PCIe subsystem IDs after FSP SiliconInit
Change-Id: Ie5c7d497e4a64a2f5e2960a2cdca8e5780dc07ea
2020-08-24 14:49:06 -06:00
Patrick Rudolph
264a0fee22 soc/intel/cannonlake/acpi/serialio.asl: Don't advertise unavailable devices
On PCH-H the I2C4 0:19.0 device isn't usable and thus 0:19.1 and
0:19.2 can't be detected using standard PCI probing.

Remove I2C4, I2C5 and UART2 from generic ASL code on PCH-H platforms
that advertise its PCI conformance by the _ADR attribute.

Change-Id: I89f9ab7d4afb2e7d1b1e24d072adf99e0da6fecf
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/44198
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
2020-08-24 10:22:08 -06:00
Patrick Rudolph
fbd57b1dac soc/intel/cannonlake: Fix DMAR when no iGPU is present
Don't emit RMRR for the iGPU if it's not present. This is done on
other platforms as well.

Fixes an DMAR error seen in dmesg on platforms without iGPU.

Change-Id: Iafe86e6938a120b707aaae935cb8168f790bb22f
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/43994
Reviewed-by: Angel Pons <th3fanbus@gmail.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
2020-08-24 10:22:05 -06:00
Jeremy Soller
f6268a00d4 soc/intel/cannonlake: Add PCIe RP 17-24 ACPI information
Change-Id: I119b9cd6dbaa8f2d17d6132dbd9d44a778ff8111
2020-08-20 14:06:32 -06:00
Gaggery Tsai
4f1c9f486a soc/intel/cannonlake: Add Iccmax and loadlines for CML-S
Following up 3ccae2b7, this patch adds Iccmax and AC/DC
loadlines and iPL2 for CML-S CPUs. The information is from
CML EDS volume 1, doc #606599 and pdg #610244.

Change-Id: Id2797a979a8b6a52a34baae66f95c7136ed1dc72
Signed-off-by: Gaggery Tsai <gaggery.tsai@intel.com>
2020-08-19 14:20:55 -06:00
Jeremy Soller
fa580ac218 bonw14: set TBT reset GPIOs to RSMRST reset group 2020-08-19 13:01:14 -06:00
Jeremy Soller
0cdfae9d40 gaze15: fix display GPIOs
Change-Id: I3273f8bf668d16c4ede81695e2676db77047df42
2020-08-19 11:49:41 -06:00
Jeremy Soller
eb1110c8d0 bonw14: fix TBT 2020-08-19 11:38:23 -06:00
Jeremy Soller
d928cd856b addw2: add annotations for LAN and TBT reset lines 2020-08-19 11:38:23 -06:00
Jeremy Soller
729a256348 soc/intel/cannonlake: Allow PCIe root port #1 to use clockreq 2020-08-19 11:38:22 -06:00
Jeremy Soller
a9d462e94f Add Cometlake-H/S Q0 (10+2) CPU 2020-08-19 11:38:22 -06:00
Tim Crawford
376945c45f mb/system76/gaze15: Add NB_ENAVDD to early_gpio_table
Fixes FSP not finding a valid framebuffer on reboots, which resulted in
a black screen when running the edk2 payload.

Change-Id: I946adb0657c07cf6c5a9aeb369e4fdfd8826abb2
2020-08-14 12:15:33 -06:00
Tim Crawford
25e164c5e2 mb/system76/gaze15: Annotate GPIOs
This was done using the schematics for the 15" GTX 1660 Ti variant.

Change-Id: I2f7628d68bd5491438b6d71556b5cb73873b9b89
2020-08-14 11:34:44 -06:00
Jeremy Soller
df0ecca51d select TPM_RDRESP_NEED_DELAY for system76 laptops
Change-Id: I7909b05e9203ce9ad07c8e87a847bc46cf281b34
2020-08-13 13:12:15 -06:00
Jeremy Soller
e4bfd5b28a Merge pull request #23 from system76/bonw14
bonw14
2020-08-13 12:20:24 -06:00
Jeremy Soller
fe9ea17423 bonw14
Change-Id: I533acb5e835de97c1ac52a201bca95671f53d932
2020-08-13 12:18:59 -06:00
Tim Crawford
efe04c82e0 mb/system76: Fix left USB3 port on gaze14/gaze15
The USB table in the manuals incorrectly list the USB3 port as 5.
The labeled pins show it correctly as port 2.

Change-Id: I9a6a96af847ca66ad667738d83cfca7c3166956a
2020-08-13 08:01:00 -06:00
Jeremy Soller
011439cb91 Sync addw2 devicetree with oryp6
Change-Id: Id32845c96479ce124a6bb55c2434e78e6f96b519
2020-08-06 08:24:46 -06:00
Jeremy Soller
599ca05c8c Update devicetree.cb 2020-08-04 10:42:15 -06:00
Jeremy Soller
d563135d4b Sync changes from upstream PRs
Change-Id: If65cd6262ab625047edb8d242d00f520e4ff8d14
2020-07-21 09:09:38 -06:00
Jeremy Soller
bccef94545 Quote MAINBOARD_DIR
Change-Id: Ida3ca099fd8ab6d7b1112e5f203b791e6c46dd0d
2020-07-20 12:09:30 -06:00
Jeremy Soller
dca083da74 Absolute path for qc_blobs in gitmodules
Change-Id: I5bab7ace1503f54fafff9073b35f9b3e0952c0b7
2020-07-20 11:55:13 -06:00
Jeremy Soller
94612338ef Merge remote-tracking branch 'upstream/master' into system76
Change-Id: Idceb013b3495324b8d84a388ea5ee5b5ea4b69db
2020-07-20 11:54:36 -06:00
Jeremy Soller
9e729e44a8 Refactor DGPU support code into drivers/system76/dgpu
Change-Id: Id29d6ade82b7212a3a68f6f3c27769e17d3fdcdc
2020-07-20 11:52:44 -06:00
Jeremy Soller
65600cdec6 Move most mainboard/system76 ACPI code to ec/system76 (#21)
* Move most mainboard/system76 ACPI code to ec/system76

* Move drivers/system76_ec to ec/system76

* Include system76_ec.c when CONSOLE_SYSTEM76 is set

* Fix inclusion of system76 EC code

* Default CONSOLE_SYSTEM76_EC to n

* addw2: fix SSD2 clkreq
2020-07-18 13:49:05 -06:00
Jeremy Soller
8321d760b0 Add addw2 smart amp init
Change-Id: Icbd640dd9584f0c58833dffc9a46a6afb4787abc
2020-07-14 11:29:11 -06:00
Jeremy Soller
cff2635a22 Move smart-amp init to mainboard
Change-Id: I8f60e98d7d8f70c7a7374baf978461c963694cb8
2020-07-14 09:45:51 -06:00
Jeremy Soller
f3ba5937e7 Change system76_ec timeout to 10 ms
Change-Id: Ic3d01892df83c09d8323433585e1d8fe507f8c3a
2020-07-02 09:39:46 -06:00
Jeremy Soller
5a9fddc3de gaze15 does not support SaOcSupport 2020-07-01 15:23:52 -06:00
Jeremy Soller
46dacbd7c3 Sync addw2 and gaze15 with oryp6 2020-07-01 12:44:59 -06:00
Jeremy Soller
9ba7399ee9 oryp6: allow memory clocks higher than 2933 MHz
Change-Id: I6ea0e402f5ec0c89fa97cdd50615209551ad839f
2020-06-30 15:28:06 -06:00
Jeremy Soller
4459b6355f oryp6: set reset config of TBT GPIO pins to RSMRST, and configure them early 2020-06-29 14:15:38 -06:00
Jeremy Soller
04c88e9113 oryp6: Set M.2 and LAN power and reset lines to reset with RSMRST to avoid glitching during reboots 2020-06-29 10:12:23 -06:00
Jeremy Soller
87a74eb767 oryp6: set subsystem IDs
Change-Id: I659ae6da3c5ff61c22a10ed112b82984cb3168d7
2020-06-26 14:25:57 -07:00
Jeremy Soller
264f4cd55b oryp6: Enable DMIC microphone on ALC1220 2020-06-26 10:35:03 -07:00
Jeremy Soller
8e7ffe4952 Refactor DGPU implementation, fix hybrid suspend
Change-Id: Ia7873a016e003532346170a3d27469bf085a47c4
2020-06-26 10:35:03 -07:00
Jeremy Soller
3b8e9fa539 oryp6: Disable PCH DMIC, remove verbs for other codecs
Change-Id: Ib22dca12568ec768a0b10883c38dfb0fcf4e4499
2020-06-26 10:35:03 -07:00
Jeremy Soller
b294e590d9 oryp6: Add GPIO_LANRTD3 to early_gpio_table 2020-06-25 11:02:57 -06:00
Jeremy Soller
6e2c6eb6b5 oryp6: Add GPIO descriptions
Change-Id: I668d72e655ceb12d7f15ffff51b86780628b4bbf
2020-06-25 10:27:23 -06:00
Jeremy Soller
f1e696b4a5 Add smart amp init
Change-Id: I55749428284387629ba760fc713d0bfb62e8f8ab
2020-06-23 14:10:53 -06:00
Jeremy Soller
11aca6bb7c Add stub for tas5825m driver and add it to oryp6 model 2020-06-19 09:39:18 -06:00
Jeremy Soller
90a93a8a32 Update cml-h pl2 to 90W
Change-Id: Ibc1c142c4191334308eb02c5dee65d38c51b34e8
2020-06-17 11:52:14 -06:00
Jeremy Soller
e0de23478e Sync addw2 and gaze15 with oryp6
Change-Id: Ifb117d95d98c42a8ed0004e66b822df947e610ba
2020-06-17 11:29:11 -06:00
Jeremy Soller
b0a89bfc26 Disable GPU power if GC6 is not enterred 2020-06-16 09:21:47 -06:00
Jeremy Soller
c9ec63b78b oryp6 GC6 support
Change-Id: Ic2be6aecf1c4ab1fbba6b20d1d2a11e4b69df07f
2020-06-11 22:04:16 -06:00
Jeremy Soller
0484c85cb3 Disable s0ix
Change-Id: I8c3249a6c5f652a0a032835e55a2045b95758aa5
2020-06-11 12:55:57 -06:00
Jeremy Soller
8a580cb7a7 Add ACPI backlight code
Change-Id: I325fb544e2f2fa06606fd02138b95b236782fdbf
2020-06-11 12:55:57 -06:00
Jeremy Soller
bc3e31005d Use DISABLE HECI message instead of HMRFPO
Change-Id: If1c3dfed4aff7f8299951cfe429677c9ea92b086
2020-06-11 12:55:57 -06:00
Jeremy Soller
1ca3e44c90 Add gaze15 and oryp6
Change-Id: Iff7c619b388f95ef60b32a77858c790d2e0f6126
2020-06-11 12:55:57 -06:00
Jeremy Soller
42cf287a62 Disable i2c-hid on galp3-c and galp4 2020-06-04 11:42:37 -06:00
Jeremy Soller
05577fc186 Revert "whl-u: remove invalid i2c_hid interrupt"
This reverts commit 09b8f28bb0.
2020-06-04 11:27:04 -06:00
Jeremy Soller
09b8f28bb0 whl-u: remove invalid i2c_hid interrupt
Change-Id: Id62800031ba9c2e990bfd25de708ab249c9f2e96
2020-06-04 11:13:57 -06:00
Jeremy Soller
cde1985ec3 Add addw2
Change-Id: I773fc5561857591da12c31f0f7be9f74cc98a239
2020-06-04 10:11:18 -06:00
Jeremy Soller
5b18ffb566 Update cannonlake FSP
Change-Id: I7be51195779a1cca77186e8dab54b168fc234fb0
2020-06-04 10:09:13 -06:00
Jeremy Soller
24ba49558e system76_ec: Improve performance
Change-Id: I4c35dd70067d78c3eded549de1a37ded6db3d364
2020-06-04 10:05:39 -06:00
Jeremy Soller
d06f9c7699 kbl-u: Fix compilation 2020-06-04 09:13:54 -06:00
Jeremy Soller
6bd5d1934c kbl-u: remove MAINBOARD_USES_FSP2_0 2020-06-04 08:59:27 -06:00
Jeremy Soller
37dc6de31d kbl-u: Sync some changes from whl-u 2020-06-04 08:56:09 -06:00
Jeremy Soller
5c6c34c32b whl-u: Sync with cml-u 2020-06-04 08:41:06 -06:00
Jeremy Soller
64faf29f6b cml-u: enable s0ix and c6dram 2020-06-04 08:40:48 -06:00
Jeremy Soller
27753e2b4f lemp9: enable s0ix and c6dram 2020-06-04 08:40:35 -06:00
Jeremy Soller
7f40e1b1f7 lemp9: Remove backlight code 2020-06-04 08:40:21 -06:00
Jeremy Soller
15eec6ad44 cml-u: sync with lemp9, enable i2c-hid 2020-06-03 15:39:47 -06:00
Jeremy Soller
ba59168f06 cml-u: update license headers 2020-06-03 15:39:19 -06:00
Jeremy Soller
a14d7ac871 Fix submodule URLs 2020-06-03 14:19:46 -06:00
Jeremy Soller
0625765de5 Merge remote-tracking branch 'origin/master' into system76
Change-Id: I4593b91276d447f8ac00daca7388fdfb22bca7f2
2020-06-01 14:11:34 -06:00
Jeremy Soller
b7dd4abee4 Sync cannonlake graphics with skylake 2020-05-15 13:03:55 -06:00
Jeremy Soller
ec5cb88ea1 Merge tag '4.12' into system76
coreboot version 4.12
2020-05-15 13:01:54 -06:00
Jeremy Soller
37384c6b67 Improve support for Intel HID event filter 2020-05-15 11:43:36 -06:00
Tim Crawford
0348ce2085 mainboard/system76: Fix compiling other boards on 4.12
Signed-off-by: Tim Crawford <tcrawford@system76.com>
2020-05-13 12:15:45 -06:00
Jeremy Soller
45535e4a05 lemp9: add custom backlight levels 2020-05-09 13:26:35 -06:00
Jeremy Soller
e294752055 Work around double definition of GFX0 2020-05-09 13:11:52 -06:00
Jeremy Soller
88117c16f0 Update serirq mode in lemp9 mainboard 2020-05-09 13:11:28 -06:00
Jeremy Soller
d164dd2f24 Fix merge issues in src/soc/intel 2020-05-09 13:09:05 -06:00
Jeremy Soller
f208e51e57 Merge remote-tracking branch 'upstream/master' into system76 2020-05-09 12:56:34 -06:00
Jeremy Soller
0f11811ab7 mainboard/system76/lemp9: add GMA backlight control 2020-05-09 12:37:26 -06:00
Jeremy Soller
fa200b0587 soc/intel/cannonlake: add GMA backlight control 2020-05-09 12:36:59 -06:00
Jeremy Soller
419d23908a Enable i2c-hid interface for touchpad 2020-05-09 09:37:08 -06:00
Jeremy Soller
84ff4bbc2b Fix clkreq comments 2020-04-08 16:19:44 -06:00
Jeremy Soller
888064d65d Enable system agent thermal device 2020-04-06 08:08:52 -06:00
Jeremy Soller
f33e07f0bc lemp9: increase power limits to 20W/30W 2020-04-05 13:14:28 -06:00
Jeremy Soller
9364864ad1 lemp9: remove sleeps from ACPI tables 2020-04-05 13:13:50 -06:00
Jeremy Soller
2edffffa2d System76 EC console support
Change-Id: I04c2aeb19d780a7c6638b502192fa9f569e32e94
2020-03-15 12:23:51 -06:00
Jeremy Soller
8d7937abb9 Move EC memory map to avoid conflicts 2020-02-25 14:20:19 -07:00
Jeremy Soller
4bf67af212 Add LPC decode of new memory map regions to cml-u and whl-u 2020-02-18 10:22:15 -07:00
Jeremy Soller
89f919072d TPM_PIRQ is not required 2020-02-17 20:21:01 -07:00
Jeremy Soller
1bd5d2e07d Do not set TPM IRQ in GPIO settings
Change-Id: Iba2aea1908c23640546801cc5ef54dbd4e392259
2020-02-17 20:08:26 -07:00
Jeremy Soller
afb3a7bd22 TPM support
Change-Id: I1d106ac7da4d7229706cb8ad5a98c58b32d86a40
2020-02-17 19:27:22 -07:00
Jeremy Soller
d48dd84ae8 Add LPC decode of new memory map regions 2020-02-17 09:24:23 -07:00
Jeremy Soller
92780afb68 Update pin configuration for headset microphone 2020-02-13 14:15:25 -07:00
Jeremy Soller
adc0d3b4e9 Merge remote-tracking branch 'upstream/master' into system76 2020-02-13 14:03:34 -07:00
Jeremy Soller
3f76a2ec4c Merge remote-tracking branch 'upstream/master' into system76 2020-01-27 12:28:25 -07:00
Jeremy Soller
5cb80763d7 Fix syntax error from last commit 2020-01-22 10:35:16 -07:00
Jeremy Soller
1c6cbf3a6a Update cml-u and whl-u with lemp9 changes 2020-01-22 10:34:04 -07:00
Jeremy Soller
887093b627 Allow FSP to use coreboot stack 2020-01-22 10:19:01 -07:00
Jeremy Soller
6fbb57fb22 Add serirq setting to lemp9 2020-01-22 10:18:47 -07:00
Jeremy Soller
f0bd902a2a Merge remote-tracking branch 'upstream/master' into system76 2020-01-22 10:11:28 -07:00
Jeremy Soller
3005ceecf2 mainboard/system76: Add System76 Lemur Pro (lemp9)
The System76 Lemur Pro (lemp9) is an upcoming laptop computer. Support
in coreboot is developed by System76 and provided as the default
firmware option. Testing is done on a pre-production model expected to
be identical from a firmware perspective to the production model.

Working:
- Payload
    - Tianocore
- CPU
    - Intel i7-10510U
    - Intel i5-10210U
- EC
    - ITE IT5570E running https://github.com/system76/ec
    - Backlit Keyboard, with standard PS/2 keycodes and SCI hotkeys
    - Battery
    - Charger, using AC adapter or USB-C PD
    - Suspend/resume
    - Touchpad
- GPU
    - Intel UHD Graphics 620
    - GOP driver is recommended, VBT is provided
    - eDP 14-inch 1920x1080 LCD
    - HDMI video
    - USB-C DisplayPort video
- Memory
    - 8-GB DDR4 Samsung K4AAG165WA-BCTD (Channel 0)
    - 8-GB/16-GB/32-GB DDR4 SO-DIMM (Channel 1)
- Networking
    - M.2 PCIe/CNVi WiFi/Bluetooth
- Sound
    - Realtek ALC293D
    - Internal speaker
    - Internal microphone
    - Combined headphone/microphone 3.5-mm jack
    - HDMI audio
    - USB-C DisplayPort audio
- Storage
    - M.2 PCIe/SATA SSD-1
    - M.2 PCIe/SATA SSD-2
    - RTS5227S MicroSD card reader
- USB
    - 1280x720 CCD camera
    - USB 3.1 Gen 2 Type-C (left)
    - USB 3.1 Gen 2 Type-A (left)
    - USB 3.1 Gen 1 Type-A (right)

Not working:
- TPM2 - SPI bus 0, chip select 2 is used. Chip selects other than 0
  are not currently supported by the intel fast_spi driver.

Signed-off-by: Jeremy Soller <jeremy@system76.com>
Change-Id: Ib0a32bbc6f89a662085ab4a254676bc1fad7dc60
2020-01-22 10:09:25 -07:00
Jeremy Soller
8aa05ff5de Remove lemp9 to prepare for merge of upstream lemp9 PR 2020-01-22 10:09:13 -07:00
Jeremy Soller
3b4db8f4a7 Merge branch 'upstream-35946' into system76 2020-01-13 11:05:21 -07:00
Jeremy Soller
d4440fa641 pciexp: Add support for allocating PCI express hotplug resources
This change adds support for allocating resources for PCI express hotplug
bridges when PCIEXP_HOTPLUG is selected. By default, this will add 32 PCI
subordinate numbers (buses), 256 MiB of prefetchable memory, 8 MiB of
non-prefetchable memory, and 8 KiB of I/O space to any device with the
PCI_EXP_SLTCAP_HPC bit set in the PCI_EXP_SLTCAP register, which
indicates hot-plugging capability. The resource allocation is configurable,
please see the PCIEXP_HOTPLUG_* variables in src/device/Kconfig.

In order to support the allocation of hotplugged PCI buses, a new field
is added to struct device called hotplug_buses. This is defaulted to
zero, but when set, it adds the hotplug_buses value to the subordinate
value of the PCI bridge. This allows devices to be plugged in and
unplugged after boot.

This code was tested on the System76 Darter Pro (darp6). Before this
change, there are not enough resources allocated to the Thunderbolt
PCI bridge to allow plugging in new devices after boot. This can be
worked around in the Linux kernel by passing a boot param such as:
pci=assign-busses,hpbussize=32,realloc

This change makes it possible to use Thunderbolt hotplugging without
kernel parameters, and attempts to match closely what our motherboard
manufacturer's firmware does by default.

Signed-off-by: Jeremy Soller <jeremy@system76.com>
Change-Id: I500191626584b83e6a8ae38417fd324b5e803afc
2020-01-13 11:03:00 -07:00
Jeremy Soller
28dab93390 Enable deep s5 for lemp9 2019-12-21 15:56:32 -07:00
Jeremy Soller
4f613c1b1f Fix inclusion of SPD information 2019-12-17 16:09:29 -07:00
Jeremy Soller
9c786fa310 Add lemp9 2019-12-17 15:48:54 -07:00
Jeremy Soller
8a3dadab7c Revert "Set USB power plane to off during restart"
This reverts commit ca35998d29.
2019-11-20 08:43:58 -07:00
Jeremy Soller
f81e2ad385 Update kbl-u 2019-11-19 08:57:13 -07:00
Jeremy Soller
ca35998d29 Set USB power plane to off during restart
Change-Id: I9d722b7b74dac1ccb7f0a80559cbdf763f4c6c1f
2019-11-04 18:45:17 -07:00
Jeremy Soller
d49c64e17f Revert "Full reset by default"
This reverts commit 5bf53bc73b.
2019-11-04 14:26:05 -07:00
Jeremy Soller
5bf53bc73b Full reset by default 2019-11-04 14:14:57 -07:00
Jeremy Soller
560238e052 Fix sleepstates ACPI include 2019-11-04 09:31:21 -07:00
Jeremy Soller
ecd04d98b2 Fix globalnvs ACPI include 2019-11-04 09:27:26 -07:00
Jeremy Soller
dae38b24e7 Remove duplicate code 2019-11-04 09:03:32 -07:00
Jeremy Soller
c8600c36d7 Merge remote-tracking branch 'upstream/master' into system75 2019-11-04 09:01:17 -07:00
Jeremy Soller
37c69a0123 Update whl-u to match cml-u 2019-11-01 14:54:22 -06:00
Jeremy Soller
27b4ae24f4 Only RP01 is a hotplug port 2019-10-30 15:48:01 -06:00
Jeremy Soller
852283919e Enable UART 2019-10-30 12:08:01 -06:00
Jeremy Soller
36f788c558 Disable HECI 2019-10-27 19:33:10 -06:00
Jeremy Soller
ad1ddc0343 Set subsystem IDs 2019-10-24 09:57:48 -06:00
Jeremy Soller
76e2ab61bb Disable thunderbolt force power and do not enable thunderbolt rtd3 power 2019-10-22 21:08:31 -06:00
Jeremy Soller
46cc5d6b53 Set prefetch and non-prefetch hotplug memory separately 2019-10-11 10:15:34 -06:00
Jeremy Soller
0a0b9c599d Add PCIe hotplug bridge support
Change-Id: I7b7ed634685d85a6ca30130c16b39007bd327167
2019-10-10 15:36:40 -06:00
Jeremy Soller
610b680154 Remove thunderbolt driver
Change-Id: I2cfda79ab838e76170219e9081daf8218b4c09fc
2019-10-10 15:36:15 -06:00
Jeremy Soller
486c132f1e Add comments 2019-10-09 21:36:31 -06:00
Jeremy Soller
9ca336f837 Remove debugging 2019-10-09 21:33:58 -06:00
Jeremy Soller
e2e360e3f8 Add hotplug_buses to device struct to allow removal of hack 2019-10-09 21:28:04 -06:00
Jeremy Soller
9f16fa4e74 Hack to add 32 to subordinate 2019-10-09 16:44:38 -06:00
Jeremy Soller
f0e552d664 Enable allocation of resources to device 1 on thunderbolt bus 2019-10-09 16:28:18 -06:00
Jeremy Soller
a22c00bc39 Fix cml-u board info 2019-10-09 16:19:57 -06:00
Jeremy Soller
14fa57aa54 Enable PCIE debug info and disable fake devices under thunderbolt controller 2019-10-09 15:11:14 -06:00
Jeremy Soller
57d53e9635 WIP Thunderbolt support 2019-10-09 14:24:00 -06:00
Jeremy Soller
954d813a61 soc/intel/cannonlake: Add debugging of a number of FSPM parameters
This implements soc_display_fspm_upd_params for soc/intel/cannonlake

Some parameters are available only on Coffee Lake FSP or Comet Lake FSP

Tested on System76 galp3-c (Coffee Lake FSP) and System76 galp4 (Comet 
Lake FSP)
2019-10-04 11:40:11 -06:00
Jeremy Soller
d4e111ff97 Revert "soc/intel/cannonlake: Allow coreboot to reserve stack for fsp"
This reverts commit 349b6a1152.
2019-10-04 11:31:28 -06:00
Jeremy Soller
86ddef58dc system76/whl-u: Do not use FSP from repository 2019-10-04 10:28:10 -06:00
Jeremy Soller
0fd77e191b Merge remote-tracking branch 'upstream/master' into system76 2019-10-03 16:21:13 -06:00
Jeremy Soller
015f42bbe4 Attempt to disable ME 2019-10-03 13:40:45 -06:00
Jeremy Soller
7a944bda90 Remove old devicetree option 2019-10-02 11:10:46 -06:00
Jeremy Soller
3225862d82 Update ACPI in system76 cfl-h mainboard 2019-10-02 11:08:52 -06:00
Jeremy Soller
fbdb388c39 Revert "soc/intel/cannonlake: Remove DMA support for PTT"
This reverts commit d5018a8f78.
2019-10-02 10:15:22 -06:00
Jeremy Soller
3e2083ba43 Merge remote-tracking branch 'upstream/master' into system76 2019-10-02 08:05:15 -06:00
Jeremy Soller
00b6224b65 Update smmstore patches 2019-09-26 15:01:19 -06:00
Jeremy Soller
57c382c424 Merge branch 'master' into system76 2019-09-26 14:57:23 -06:00
Jeremy Soller
bc09219912 Fix camera toggle on cml-u 2019-09-23 13:58:48 -06:00
Jeremy Soller
9d22c72d15 Use i2ec to enable camera toggle 2019-09-23 12:58:12 -06:00
Jeremy Soller
d99ff72fa9 Fix SMMSTORE compilation in QEMU target 2019-09-20 14:07:50 -06:00
Jeremy Soller
7214976b60 Fix use of PCI ID 2019-09-19 16:25:10 -06:00
Jeremy Soller
ea8658b1d1 Fix mainboard_dir 2019-09-19 16:23:20 -06:00
Jeremy Soller
ad626ce7de Disable FSP_USE_REPO 2019-09-19 16:20:01 -06:00
Jeremy Soller
49b4fe8478 Fix darp6 name 2019-09-19 16:04:18 -06:00
Jeremy Soller
26f0060f60 Add Comet Lake U models 2019-09-19 15:52:02 -06:00
Jeremy Soller
b09afbb9fa Fix failure to boot grub by enabling the 8254 timer 2019-08-30 09:59:50 -06:00
Jeremy Soller
aaba647096 Port previous commit to kbl-u 2019-08-22 10:54:02 -06:00
Jeremy Soller
5e46698ee9 Merge branch 'system76_cleanup' of https://github.com/system76/coreboot into system76_cleanup 2019-08-22 10:50:56 -06:00
Jeremy Soller
a8cb89b101 Improvements for color keyboard when kernel driver not loaded 2019-08-22 10:50:45 -06:00
Jeremy Soller
fcd2891d6f Implement EC init for kbl-u 2019-08-21 14:54:31 -06:00
Jeremy Soller
d472cda80a Move EC initialization from kernel driver to ACPI and motherboard init 2019-08-21 12:36:20 -06:00
Jeremy Soller
7c8a9f60f4 Enable PCH SPI 2019-08-09 11:44:19 -06:00
Jeremy Soller
fc1062809a Fix smmstore compilation 2019-08-09 10:00:08 -06:00
Jeremy Soller
8a734e7045 Merge remote-tracking branch 'upstream/master' into system76_cleanup 2019-08-09 09:52:58 -06:00
Jeremy Soller
5a4a99cf43 Fix compilation of bootblock 2019-08-09 09:14:33 -06:00
Jeremy Soller
adc9851e1f Add bootblock to set early GPIOs, set TBT GPIOs to match proprietary BIOS 2019-08-09 09:02:12 -06:00
Jeremy Soller
9784a2c677 Merge remote-tracking branch 'upstream/master' into system76_cleanup 2019-07-15 14:28:03 -06:00
Jeremy Soller
f7b117bba7 Remove old clock gate patch 2019-07-15 14:26:18 -06:00
Jeremy Soller
95778bf7ea Merge branch 'master' into system76_cleanup
Change-Id: Ida07401fa877243cc64fae9ac96a65b5a58d01ab
2019-07-01 08:30:40 -06:00
Jeremy Soller
744c9acbe1 Organize GPPs by name 2019-06-26 13:47:53 -06:00
Jeremy Soller
99406e6b09 Fix PMC and GPIO mappings (again) 2019-06-26 13:44:10 -06:00
Jeremy Soller
f5519f0df3 Truly fix gpio misccfg values 2019-06-26 10:36:29 -06:00
Jeremy Soller
fbfba7cb84 Revert "Fix gpio miscfg register values"
This reverts commit d1e6a842c7.
2019-06-26 10:26:19 -06:00
Jeremy Soller
82dd1fc5a1 Add device specific data for thunderbolt 2019-06-26 10:03:18 -06:00
Jeremy Soller
97317433ed Force thunderbolt power 2019-06-26 10:03:05 -06:00
Jeremy Soller
87e186e7a8 Update gpe config 2019-06-20 15:58:29 -06:00
Jeremy Soller
d1e6a842c7 Fix gpio miscfg register values 2019-06-20 15:58:20 -06:00
Jeremy Soller
1d39c09349 Add more EC RAM items 2019-06-20 14:51:32 -06:00
Jeremy Soller
fcba28382a Fix order of outb 2019-06-20 14:51:16 -06:00
Jeremy Soller
2e9bae8216 Fix PMC GPP mappings 2019-06-20 14:51:05 -06:00
Jeremy Soller
0bcf238f2c Update gpio's after fixing coreboot-collector 2019-06-20 13:57:30 -06:00
Jeremy Soller
80c4017d85 Merge remote-tracking branch 'upstream/master' into system76_cleanup 2019-06-13 14:36:33 -06:00
Jeremy Soller
8d5df05d7d Add code to attempt to enable GPU, when configured 2019-06-13 14:29:53 -06:00
Jeremy Soller
39223b859e Update whl-u memory config 2019-06-12 10:52:56 -06:00
Jeremy Soller
2106c470f3 Add gaze14 1660ti variant files 2019-06-06 14:49:49 -06:00
Jeremy Soller
ee528da151 Fix smmstore driver compilation 2019-06-05 14:19:48 -06:00
Jeremy Soller
6adc503a3b Update cfl-h to new memory configuration struct 2019-06-05 14:19:34 -06:00
Jeremy Soller
1eb4a65e0a Merge remote-tracking branch 'upstream/master' into system76_cleanup 2019-06-05 14:09:13 -06:00
Jeremy Soller
aeb79392cc Remove pei_data from kbl-u 2019-06-04 08:27:02 -06:00
Jeremy Soller
53c0e6c494 Fix slow serial 2019-05-13 14:21:47 -06:00
Jeremy Soller
1c813a7e4b Initialize early GPIOs 2019-05-13 14:03:59 -06:00
Jeremy Soller
6ac5c4bf8a Disable C22 and C23 2019-05-13 14:01:37 -06:00
Jeremy Soller
e90c6c8e4c No longer need NO_UART_ON_SUPERIO 2019-05-13 14:00:36 -06:00
Jeremy Soller
d249ac929f Enable UART, unlock GPIO, set clksrcusage for GPU 2019-05-13 13:04:52 -06:00
Jeremy Soller
09f85ecf66 Enable SATA ports 2019-05-13 10:49:17 -06:00
Jeremy Soller
635c88090e Enable more PCI devices 2019-05-13 10:49:10 -06:00
Jeremy Soller
34b4341eac Define NO_UART_ON_SUPERIO 2019-05-13 09:04:59 -06:00
Jeremy Soller
12bb32890f Merge remote-tracking branch 'upstream/master' into system76_cleanup 2019-05-10 17:35:18 -06:00
Jeremy Soller
6512180461 Update ACPI GPE config 2019-05-10 11:07:09 -06:00
Jeremy Soller
764d87a6d4 Update LPC and GPE config 2019-05-10 11:03:24 -06:00
Jeremy Soller
747364169f Update GPIO settings 2019-05-10 10:19:02 -06:00
Jeremy Soller
6bbc98a1ef Update CPU count and add GPU clkreq 2019-05-10 10:18:52 -06:00
Jeremy Soller
5580493101 Add HDA settings and disable GPU by default (temporary) 2019-05-10 08:42:54 -06:00
Jeremy Soller
724c1b5cf8 Use color keyboard ACPI tables on gaze14 2019-05-09 21:35:32 -06:00
Jeremy Soller
852d63f618 Fix gpio syntax 2019-05-09 21:32:44 -06:00
Jeremy Soller
e90740693f WIP: add cfl-h models, starting with gaze14 2019-05-09 20:54:13 -06:00
Jeremy Soller
b99d0bfa32 Update memory settings for thelio-b1 2019-05-06 11:47:23 -06:00
Jeremy Soller
51802ead2d Fix thelio-b1 devicetree 2019-05-02 20:44:32 -06:00
Jeremy Soller
b0f598558e whl-u: Remove VmxEnable and DebugConsent from devicetree.cb 2019-05-02 15:41:18 -06:00
Jeremy Soller
28148e9442 Add system76 mainboard module 2019-05-02 15:32:17 -06:00
Jeremy Soller
8a67395e4e Update .gitmodules 2019-05-02 15:32:06 -06:00
Jeremy Soller
e1e1025c6b Revert "soc/intel/cannonlake: Remove DMA support for PTT"
This reverts commit d5018a8f78.
2019-05-02 15:31:16 -06:00
Jeremy Soller
67a5b962d0 soc/intel/cannonlake: Set correct serirq mode based on SERIRQ_CONTINUOUS_MODE
Tested on system76 galp3-c

Signed-off-by: Jeremy Soller <jeremy@system76.com>
Change-Id: I9ad4f5a6c7391fc6e813ec1306c708f449a69f59
2019-05-02 15:29:09 -06:00
Jeremy Soller
00b535505d soc/intel/cannonlake: Set FSP-S Enable8254ClockGating using clock_gate_8254 devicetree parameter
Tested on system76 galp3-c

Signed-off-by: Jeremy Soller <jeremy@system76.com>
Change-Id: Id346173ac7ae5246de0b38b9dd23be7b72e70f1e
2019-05-02 15:27:04 -06:00
Arthur Heymans
946ecabd31 sb/intel/common/smihandler: Hook up smmstore
TESTED on Asus P5QC

Change-Id: I20b87f3dcb898656ad31478820dd5153e4053cb2
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
2019-05-02 15:24:30 -06:00
Arthur Heymans
ef4042cf61 drivers/smmstore: Fix some issues
This fixes the following:
- Fix smmstore_read_region to actually read stuff
- Make the API ARCH independent (no dependency on size_t)
- clean up the code a little
- Change the loglevel for non error messages to BIOS_DEBUG

Change-Id: I629be25d2a9b65796ae8f7a700b6bdab57b91b22
Signed-off-by: Arthur Heymans <arthur@aheymans.xyz>
2019-05-02 15:24:13 -06:00
883 changed files with 45987 additions and 13410 deletions

32
.gitmodules vendored
View File

@@ -1,60 +1,60 @@
[submodule "3rdparty/blobs"]
path = 3rdparty/blobs
url = ../blobs.git
url = https://review.coreboot.org/blobs.git
update = none
ignore = dirty
[submodule "util/nvidia-cbootimage"]
path = util/nvidia/cbootimage
url = ../nvidia-cbootimage.git
url = https://review.coreboot.org/nvidia-cbootimage.git
[submodule "vboot"]
path = 3rdparty/vboot
url = ../vboot.git
url = https://review.coreboot.org/vboot.git
[submodule "arm-trusted-firmware"]
path = 3rdparty/arm-trusted-firmware
url = ../arm-trusted-firmware.git
url = https://review.coreboot.org/arm-trusted-firmware.git
[submodule "3rdparty/chromeec"]
path = 3rdparty/chromeec
url = ../chrome-ec.git
url = https://review.coreboot.org/chrome-ec.git
[submodule "libhwbase"]
path = 3rdparty/libhwbase
url = ../libhwbase.git
url = https://review.coreboot.org/libhwbase.git
[submodule "libgfxinit"]
path = 3rdparty/libgfxinit
url = ../libgfxinit.git
url = https://review.coreboot.org/libgfxinit.git
[submodule "3rdparty/fsp"]
path = 3rdparty/fsp
url = ../fsp.git
url = https://review.coreboot.org/fsp.git
update = none
ignore = dirty
[submodule "opensbi"]
path = 3rdparty/opensbi
url = ../opensbi.git
url = https://review.coreboot.org/opensbi.git
[submodule "intel-microcode"]
path = 3rdparty/intel-microcode
url = ../intel-microcode.git
url = https://review.coreboot.org/intel-microcode.git
update = none
ignore = dirty
[submodule "3rdparty/ffs"]
path = 3rdparty/ffs
url = ../ffs.git
url = https://review.coreboot.org/ffs.git
[submodule "3rdparty/amd_blobs"]
path = 3rdparty/amd_blobs
url = ../amd_blobs
url = https://review.coreboot.org/amd_blobs.git
update = none
ignore = dirty
[submodule "3rdparty/cmocka"]
path = 3rdparty/cmocka
url = ../cmocka.git
url = https://review.coreboot.org/cmocka.git
update = none
[submodule "3rdparty/qc_blobs"]
path = 3rdparty/qc_blobs
url = ../qc_blobs.git
url = https://review.coreboot.org/qc_blobs.git
update = none
ignore = dirty
[submodule "3rdparty/intel-sec-tools"]
path = 3rdparty/intel-sec-tools
url = ../9esec-security-tooling.git
url = https://review.coreboot.org/9esec-security-tooling.git
[submodule "3rdparty/stm"]
path = 3rdparty/stm
url = ../STM
url = https://review.coreboot.org/STM
branch = stmpe

2
3rdparty/vboot vendored

View File

@@ -76,6 +76,10 @@ The boards in this section are not real mainboards, but emulators.
- [IceLake RVP](intel/icelake_rvp.md)
- [KBLRVP11](intel/kblrvp11.md)
## Kontron
- [mAL-10](kontron/mal10.md)
## Lenovo
- [Mainboard codenames](lenovo/codenames.md)

View File

@@ -0,0 +1,106 @@
# Kontron mAL10 Computer-on-Modules platform
The Kontron [mAL10] COMe is a credit card sized Computer-on-Modules
platform based on the Intel Atom E3900 Series, Pentium and Celeron
processors.
## Technology
```eval_rst
+------------------+----------------------------------+
| COMe Type | mini pin-out type 10 |
+------------------+----------------------------------+
| SoC | Intel Atom x5-E3940 (4 core) |
+------------------+----------------------------------+
| GPU | Intel HD Graphics 500 |
+------------------+----------------------------------+
| Coprocessor | Intel TXE 3.0 |
+------------------+----------------------------------+
| RAM | 8GB DDR3L |
+------------------+----------------------------------+
| eMMC Flash | 32GB eMMC pSLC |
+------------------+----------------------------------+
| USB3 | x2 |
+------------------+----------------------------------+
| USB2 | x6 |
+------------------+----------------------------------+
| SATA | x2 |
+------------------+----------------------------------+
| LAN | Intel I210IT, I211AT |
+------------------+----------------------------------+
| Super IO/EC | Kontron CPLD/EC |
+------------------+----------------------------------+
| HWM | NCT7802 |
+------------------+----------------------------------+
```
## Building coreboot
The following commands will build a working image:
```bash
make distclean
make defconfig KBUILD_DEFCONFIG=configs/config.kontron_mal10
make
```
## Payloads
- SeaBIOS
- Tianocore
- Linux as payload
## Flashing coreboot
The SPI flash can be accessed internally using [flashrom].
The following command is used to flash BIOS region.
```bash
$ flashrom -p internal --ifd -i bios -w coreboot.rom --noverify-all
```
## Hardware Monitor
The Nuvoton [NCT7802Y] is a hardware monitoring IC, capable of monitor critical
system parameters including power supply voltages, fan speeds, and temperatures.
The remote inputs can be connected to CPU/GPU thermal diode or any thermal diode
sensors and thermistor.
- 6 temperature sensors;
- 5 voltage sensors;
- 3 fan speed sensors;
- 4 sets of temperature setting points.
PECI is not supported by Apollo Lake Pentium/Celeron/Atom processors and the CPU
temperature value is taken from a thermal resistor (NTC) that is placed very
close to the CPU.
## Known issues
- Works only with Tianocore "UEFIPayload" payload edk2-stable201903-1569-g3e63a91
Booting with the "CorebootPayload" [crashes].
- Tianocore outputs video through an external GPU only.
## Untested
- IGD/LVDS
- SDIO
## Tested and working
- Kontron CPLD/EC (Serial ports, I2C port)
- NCT7802 [HWM](#Hardware Monitor)
- USB2/3
- Gigabit Ethernet ports
- eMMC
- SATA
- PCIe ports
- IGD/DP
## TODO
- Onboard audio (codec IDT 92HD73C1X5, currently disabled)
- S3 suspend/resume
[mAL10]: https://www.kontron.com/products/iot/iot-industry-4.0/iot-ready-boards-and-modules/com-express/com-express-mini/come-mal10-e2-.html
[W25Q128FV]: https://www.winbond.com/resource-files/w25q128fv%20rev.m%2005132016%20kms.pdf
[flashrom]: https://flashrom.org/Flashrom
[NCT7802Y]: https://www.nuvoton.com/products/cloud-computing/hardware-monitors/desktop-server-series/nct7802y/?__locale=en
[crashes]: https://pastebin.com/cpCfrPCL

View File

@@ -7,6 +7,7 @@ Controller etc.
## Supported boards
- [X11SSH-TF](x11ssh-tf/x11ssh-tf.md)
- [X11SSH-F](x11ssh-f/x11ssh-f.md)
- [X11SSM-F](x11ssm-f/x11ssm-f.md)
## Required proprietary blobs
@@ -30,14 +31,12 @@ Look at the [flashing tutorial] and the board-specific section.
These issues apply to all boards. Have a look at the board-specific issues, too.
- TianoCore doesn't work with Aspeed NGI, as it's text mode only (Fix is WIP CB:35726)
- MRC caching does not work on cold boot with Intel SPS (see [Intel FSP2.0])
## ToDo
- Fix issues above
- Fix issues in board specific sections
- Fix TODOs mentioned in code
- Add more boards! :-)
## Technology

View File

@@ -33,10 +33,6 @@ in a 32 MiB SOIC-16 chip in the corner of the mainboard near the [AST2400]. This
See general issue section.
## ToDo
- Fix TODOs mentioned in code
## Technology
```eval_rst

View File

@@ -4,11 +4,11 @@ This section details how to run coreboot on the [Supermicro X11SSM-F].
## Flashing coreboot
The board can be flashed externally. FTDI FT2232H and FT232H based programmers worked.
The board can be flashed externally. FTDI FT2232H and FT232H based programmers worked. For this,
one needs to add a diode between VCC and the flash chip. The flash IC [MX25L12873F] can be found
near PCH PCIe Slot 4.
The flash IC [MX25L12873F] can be found near PCH PCIe Slot 4. It is socketed on retail boards.
For doing ISP (In-System-Programming) one needs to add a diode between VCC and the flash chip.
Flashing is also possible through the BMC web interface, when a valid license was entered.
## BMC (IPMI)
@@ -16,6 +16,10 @@ This board has an ASPEED [AST2400], which has BMC/[IPMI] functionality. The BMC
32 MiB SOIC-16 chip in the corner of the mainboard near the PCH PCIe Slot 4. This chip is a
[MX25L25635F].
## Disabling LAN firmware
To disable the proprietary LAN firmware, the undocumented jumper J6 can be set to 2-3.
## Tested and working
- GRUB2 payload with Debian testing and kernel 5.2
@@ -32,14 +36,9 @@ This board has an ASPEED [AST2400], which has BMC/[IPMI] functionality. The BMC
## Known issues
- See general issue section
- "only partially covers this bridge" info from Linux kernel (what does that mean?)
- LNXTHERM missing
- S3 resume not working
## ToDo
- Fix TODOs mentioned in code
## Technology
```eval_rst

View File

@@ -75,7 +75,8 @@ be more frequent than was needed, so we scaled it back to twice a year.
- [ ] Test the release from the actual release tarballs.
- [ ] Push signed Tag to repo.
- [ ] Announce that the release tag is done on IRC.
- [ ] Upload release files to web server
- [ ] Upload release files to web server.
- [ ] Also extract the release notes and place them on the web server.
- [ ] Upload crossgcc sources to web server.
- [ ] Update download page to point to files, push to repo.
- [ ] Write and publish blog post with release notes.
@@ -197,16 +198,16 @@ the coreboot server, and put them in the release directory at
````
People can now see the release tarballs on the website at
https://www.coreboot.org/releases/
<https://www.coreboot.org/releases/>
The downloads page is the official place to download the releases from, and it needs to be updated with links to the new release tarballs and .sig files. It can be found at https://review.coreboot.org/cgit/homepage.git/tree/downloads.html
The downloads page is the official place to download the releases from, and it needs to be updated with links to the new release tarballs and .sig files. It can be found at <https://review.coreboot.org/cgit/homepage.git/tree/downloads.html>
Here is an example commit to change it: https://review.coreboot.org/#/c/19515/
Here is an example commit to change it: <https://review.coreboot.org/c/homepage/+/19515>
## Upload crossgcc sources
Sometimes the source files for older revisions of
crossgcc disappear. To deal with that we maintain a mirror at
https://www.coreboot.org/releases/crossgcc-sources/ where we host the
<https://www.coreboot.org/releases/crossgcc-sources/> where we host the
sources used by the crossgcc scripts that are part of coreboot releases.
Run
@@ -220,7 +221,7 @@ sources. Download them yourself and copy them into the crossgcc-sources
directory on the server.
## After the release is complete
Post the release notes on https://blogs.coreboot.org
Post the release notes on <https://blogs.coreboot.org>
## Making a branch
At times we will need to create a branch, generally for patch fixes.

View File

@@ -234,3 +234,27 @@ to ensure that the platforms listed above are fixed before the next release. If
is interest in maintaining support for these platforms beyond the next release,
please ensure that the platforms are fixed to conform to the expectations of resource
allocation.
Notes
-----
### Intel microcode updates
Intel microcode updates tagged *microcode-20200616* are still included in our
builds. Note, [Intel released new microcode updates]
(https://github.com/intel/Intel-Linux-Processor-Microcode-Data-Files/blob/main/releasenote.md)
tagged
1. *microcode-20201110*
2. *microcode-20201112*
3. *microcode-20201118*
with security updates for [INTEL-SA-00381]
(https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00381.html)
and [INTEL-SA-00389]
(https://www.intel.com/content/www/us/en/security-center/advisory/intel-sa-00389.html).
Due to too short time for rigorous testing and bad experience with botched
microcode updates in the past, these new updates are not included. Users wanting
to use those, can apply them in the operating system, or update the submodule
pointer themselves.

View File

@@ -233,19 +233,19 @@ F: src/mainboard/facebook/monolith/
GETAC P470 MAINBOARD
M: Patrick Georgi <patrick@georgi.software>
S: Maintained
F: src/mainboard/getac/p470
F: src/mainboard/getac/p470/
GIGABYTE GA-G41M-ES2L MAINBOARD
M: Damien Zammit <damien@zamaudio.com>
S: Odd Fixes
F: src/mainboard/gigabyte/ga-g41m-es2l
F: src/mainboard/gigabyte/ga-g41m-es2l/
GIGABYTE GA-H61M SERIES MAINBOARDS
M: Angel Pons <th3fanbus@gmail.com>
S: Maintained
F: src/mainboard/gigabyte/ga-h61m-series
F: src/mainboard/gigabyte/ga-h61m-series/
@@ -273,7 +273,7 @@ F: src/mainboard/google/stout/
INTEL D510MO MAINBOARD
M: Damien Zammit <damien@zamaudio.com>
S: Odd Fixes
F: src/mainboard/intel/d510mo
F: src/mainboard/intel/d510mo/
INTEL STRAGO MAINBOARD
M: Hannah Williams <hannah.williams@intel.com>
@@ -282,6 +282,21 @@ F: /src/mainboard/intel/strago/
KONTRON BSL6 MAINBOARD
M: Felix Singer <felixsinger@posteo.net>
M: Nico Huber <nico.h@gmx.de>
S: Supported
F: src/mainboard/kontron/bsl6/
KONTRON MAL10 MAINBOARD
M: Maxim Polyakov <max.senia.poliak@gmail.com>
M: Nico Huber <nico.h@gmx.de>
M: Felix Singer <felixsinger@posteo.net>
S: Supported
F: src/mainboard/kontron/mal10/
LENOVO MAINBOARDS
M: Alexander Couzens <lynxis@fe80.eu>
M: Patrick Rudolph <siro@das-labor.org>
@@ -299,7 +314,7 @@ LIBRETREND LT1000 MAINBOARD
M: Piotr Król <piotr.krol@3mdeb.com>
M: Michał Żygowski <michal.zygowski@3mdeb.com>
S: Maintained
F: src/mainboard/libretrend/lt1000
F: src/mainboard/libretrend/lt1000/
OCP DELTALAKE MAINBOARD
@@ -310,7 +325,7 @@ M: Morgan Jang <Morgan_Jang@wiwynn.com>
M: Ryback Hung <<Ryback.Hung@quantatw.com>
M: Bryant Ou <Bryant.Ou@quantatw.com>
S: Supported
F: src/mainboard/ocp/deltalake
F: src/mainboard/ocp/deltalake/
OCP TIOGAPASS MAINBOARD
M: Jonathan Zhang <jonzhang@fb.com>
@@ -320,7 +335,7 @@ M: Morgan Jang <Morgan_Jang@wiwynn.com>
M: Ryback Hung <<Ryback.Hung@quantatw.com>
M: Bryant Ou <Bryant.Ou@quantatw.com>
S: Maintained
F: src/mainboard/ocp/tiogapass
F: src/mainboard/ocp/tiogapass/
@@ -360,14 +375,14 @@ PRODRIVE HERMES MAINBOARD
M: Christian Walter <christian.walter@9elements.com>
M: Patrick Rudolph <patrick.rudolph@9elements.com>
S: Maintained
F: src/mainboard/prodrive/hermes
F: src/mainboard/prodrive/hermes/
PURISM MAINBOARDS
M: Matt DeVillier <matt.devillier@puri.sm>
S: Supported
F: src/mainboard/purism
F: src/mainboard/purism/
@@ -379,6 +394,12 @@ F: src/mainboard/samsung/stumpy/
SIEMENS CHILI MAINBAORD
M: Felix Singer <felixsinger@posteo.net>
M: Nico Huber <nico.h@gmx.de>
S: Supported
F: src/mainboard/siemens/chili/
SIEMENS MC_xxxx MAINBOARDS
M: Werner Zeh <werner.zeh@siemens.com>
S: Maintained
@@ -506,12 +527,13 @@ F: src/drivers/intel/
F: src/include/cpu/intel/
INTEL FSP DENVERTON-NS SOC & HARCUVAR CRB
M: Suresh Bellampalli <suresh.bellampalli@intel.com>
M: Vanessa Eusebio <vanessa.f.eusebio@intel.com>
M: David Guckian <david.guckian@intel.com>
S: Odd Fixes
M: Michal Motyl <michalx.motyl@intel.com>
M: Mariusz Szafranski <mariuszx.szafranski@intel.com>
S: Maintained
F: src/mainboard/intel/harcuvar/
F: src/soc/intel/denverton_ns/
F: src/vendorcode/intel/fsp/fsp2_0/denverton_ns/
INTEL FSP 1.1
M: Lee Leahy <leroy.p.leahy@intel.com>
@@ -534,8 +556,8 @@ M: Marshall Dawson <marshalldawson3rd@gmail.com>
M: Felix Held <felix-coreboot@felixheld.de>
M: Jason Glenesk <jason.glenesk@gmail.com>
S: Maintained
F: src/soc/amd/picasso
F: src/vendorcode/amd/fsp/picasso
F: src/soc/amd/picasso/
F: src/vendorcode/amd/fsp/picasso/
INTEL APOLLOLAKE_SOC
M: Andrey Petrov <andrey.petrov@gmail.com>
@@ -547,8 +569,8 @@ M: Piotr Król <piotr.krol@3mdeb.com>
M: Michał Żygowski <michal.zygowski@3mdeb.com>
M: Frans Hendriks <fhendriks@eltan.com>
S: Maintained
F: /src/soc/intel/braswell
F: /src/vendorcode/intel/fsp/fsp1_1/braswell
F: /src/soc/intel/braswell/
F: /src/vendorcode/intel/fsp/fsp1_1/braswell/
INTEL Xeon Sacalable Processor Family
M: Jonathan Zhang <jonzhang@fb.com>
@@ -559,13 +581,13 @@ M: Ryback Hung <<Ryback.Hung@quantatw.com>
M: Bryant Ou <Bryant.Ou@quantatw.com>
S: Supported
F: src/soc/intel/xeon_sp
F: src/vendorcode/intel/fsp/fsp2_0/skylake_sp
F: src/vendorcode/intel/fsp/fsp2_0/copperlake_sp
F: src/vendorcode/intel/fsp/fsp2_0/skylake_sp/
F: src/vendorcode/intel/fsp/fsp2_0/copperlake_sp/
MEDIATEK SOCS
M: Hung-Te Lin <hungte@chromium.org>
S: Supported
F: src/soc/mediatek
F: src/soc/mediatek/
ORPHANED ARM SOCS
S: Orphaned
@@ -593,13 +615,13 @@ F: payloads/coreinfo/
EXTERNAL PAYLOADS INTEGRATION
M: Stefan Reinauer <stefan.reinauer@coreboot.org>
M: Martin Roth <gaumless@gmail.com>
F: payloads/external
F: payloads/external/
LINUXBOOT PAYLOAD INTEGRATION
M: Christian Walter <christian.walter@9elements.com>
M: Marcello Sylvester Bauer <info@marcellobauer.com>
S: Supported
F: payloads/external/LinuxBoot
F: payloads/external/LinuxBoot/
################################################################################
# Utilities
@@ -729,7 +751,7 @@ TPM SUPPORT
M: Christian Walter <christian.walter@9elements.com>
S: Supported
F: src/drivers/*/tpm/
F: src/security/tpm
F: src/security/tpm/
SUPERIOS & SUPERIOTOOL
M: Felix Held <felix-coreboot@felixheld.de>
@@ -747,7 +769,7 @@ ELTAN VENDORCODE
M: Frans Hendriks <fhendriks@eltan.com>
M: Wim Vervoorn <wvervoorn@eltan.com>
S: Maintained
F: src/vendorcode/eltan
F: src/vendorcode/eltan/
MISSING: TIMERS / DELAYS

View File

@@ -35,7 +35,8 @@ COREBOOT_EXPORTS += KERNELVERSION
# Basic component discovery
MAINBOARDDIR=$(call strip_quotes,$(CONFIG_MAINBOARD_DIR))
VARIANT_DIR:=$(call strip_quotes,$(CONFIG_VARIANT_DIR))
COREBOOT_EXPORTS += MAINBOARDDIR VARIANT_DIR
CARRIER_DIR:=$(call strip_quotes,$(CONFIG_CARRIER_DIR))
COREBOOT_EXPORTS += MAINBOARDDIR VARIANT_DIR CARRIER_DIR
## Final build results, which CBFSTOOL uses to create the final
## rom image file, are placed under $(objcbfs).
@@ -337,7 +338,7 @@ cbfs-files-processor-struct= \
$(eval $(2): $(1) $(obj)/build.h $(KCONFIG_AUTOHEADER); \
printf " CC+STRIP $(@)\n"; \
$(CC_ramstage) -MMD $(CPPFLAGS_ramstage) $(CFLAGS_ramstage) $$(ramstage-c-ccopts) -include $(KCONFIG_AUTOHEADER) -MT $(2) -o $(2).tmp -c $(1) && \
$(OBJCOPY_ramstage) -O binary $(2).tmp $(2); \
$(OBJCOPY_ramstage) -O binary --set-section-flags .bss*=alloc,contents,load $(2).tmp $(2); \
rm -f $(2).tmp) \
$(eval DEPENDENCIES += $(2).d)
@@ -1120,8 +1121,6 @@ $(REFCODE_BLOB): $(RMODTOOL)
$(RMODTOOL) -i $(CONFIG_REFCODE_BLOB_FILE) -o $@
endif
FIT_ENTRY=$(call strip_quotes, $(CONFIG_INTEL_TOP_SWAP_FIT_ENTRY_FMAP_REG))
ifeq ($(CONFIG_HAVE_RAMSTAGE),y)
RAMSTAGE=$(objcbfs)/ramstage.elf
else
@@ -1135,42 +1134,13 @@ $(obj)/coreboot.rom: $(obj)/coreboot.pre $(RAMSTAGE) $(CBFSTOOL) $$(INTERMEDIATE
dd if=/dev/zero bs=$(call _toint,$(CONFIG_ROM_SIZE)) count=1 2> /dev/null | tr '\000' '\377' > $@.tmp
dd if=$(obj)/coreboot.pre of=$@.tmp bs=8192 conv=notrunc 2> /dev/null
ifeq ($(CONFIG_CPU_INTEL_FIRMWARE_INTERFACE_TABLE),y)
ifneq ($(CONFIG_UPDATE_IMAGE),y) # never update the bootblock
ifeq ($(CONFIG_CPU_MICROCODE_CBFS_EXTERNAL_HEADER),y)
@printf " UPDATE-FIT\n"
$(IFITTOOL) -f $@.tmp -a -n cpu_microcode_blob.bin -t 1 -s $(CONFIG_CPU_INTEL_NUM_FIT_ENTRIES) \
-r COREBOOT
endif
ifeq ($(CONFIG_USE_CPU_MICROCODE_CBFS_BINS),y)
@printf " UPDATE-FIT\n"
$(IFITTOOL) -f $@.tmp -a -n cpu_microcode_blob.bin -t 1 -s $(CONFIG_CPU_INTEL_NUM_FIT_ENTRIES) \
-r COREBOOT
endif
# Print final FIT table
$(IFITTOOL) -f $@.tmp -D -r COREBOOT
# Second FIT in TOP_SWAP bootblock
# Print final TS BOOTBLOCK FIT table
ifeq ($(CONFIG_INTEL_ADD_TOP_SWAP_BOOTBLOCK),y)
# INTEL_TOP_SWAP_FIT_ENTRY_FMAP_REG adds a region as first ucode into the seconds bootblock
ifneq ($(FIT_ENTRY),)
@printf " UPDATE-FIT2\n"
$(IFITTOOL) -f $@.tmp -A -n $(FIT_ENTRY) -t 1 -s $(CONFIG_CPU_INTEL_NUM_FIT_ENTRIES) \
$(TS_OPTIONS) -r COREBOOT
endif
ifeq ($(CONFIG_CPU_MICROCODE_CBFS_EXTERNAL_HEADER),y)
@printf " UPDATE-FIT2\n"
$(IFITTOOL) -f $@.tmp -a -n cpu_microcode_blob.bin -t 1 -s $(CONFIG_CPU_INTEL_NUM_FIT_ENTRIES) \
$(TS_OPTIONS) -r COREBOOT
endif
ifeq ($(CONFIG_USE_CPU_MICROCODE_CBFS_BINS),y)
@printf " UPDATE-FIT2\n"
$(IFITTOOL) -f $@.tmp -a -n cpu_microcode_blob.bin -t 1 -s $(CONFIG_CPU_INTEL_NUM_FIT_ENTRIES) \
$(TS_OPTIONS) -r COREBOOT
endif
@printf " TOP SWAP FIT table\n"
$(IFITTOOL) -f $@.tmp -D $(TS_OPTIONS) -r COREBOOT
endif
endif # !CONFIG_UPDATE_IMAGE
endif # CONFIG_INTEL_ADD_TOP_SWAP_BOOTBLOCK
endif # CONFIG_CPU_INTEL_FIRMWARE_INTERFACE_TABLE
mv $@.tmp $@
@printf " CBFSLAYOUT $(subst $(obj)/,,$(@))\n\n"

View File

@@ -1,7 +1,3 @@
##
## Copyright (C) 2017 Facebook Inc.
## Copyright (C) 2018 9elements Cyber Security
##
## SPDX-License-Identifier: GPL-2.0-only
if PAYLOAD_LINUXBOOT

View File

@@ -1,6 +1,3 @@
##
## Copyright (C) 2017 Facebook Inc.
##
## SPDX-License-Identifier: GPL-2.0-only
config PAYLOAD_LINUXBOOT

View File

@@ -1,7 +1,3 @@
##
## Copyright (C) 2017 Facebook Inc.
## Copyright (C) 2018 9elements Cyber Security
##
## SPDX-License-Identifier: GPL-2.0-only
project_dir=linuxboot

View File

@@ -1,7 +1,3 @@
##
## Copyright (C) 2017 Facebook Inc.
## Copyright (C) 2018 9elements Cyber Security
##
## SPDX-License-Identifier: GPL-2.0-only
SHELL := /bin/bash

View File

@@ -1,7 +1,3 @@
##
## Copyright (C) 2017 Facebook Inc.
## Copyright (C) 2018 9elements Cyber Security
##
## SPDX-License-Identifier: GPL-2.0-only
project_dir=$(shell pwd)/linuxboot

View File

@@ -1,10 +1,3 @@
################################################################################
##
##
## Copyright (C) 2009-2010 coresystems GmbH
## Copyright (C) 2015 Google Inc.
## Copyright (C) 2017 Facebook Inc.
##
## SPDX-License-Identifier: GPL-2.0-only
# set up payload config and version files for later inclusion
@@ -121,14 +114,14 @@ ifeq ($(CONFIG_SEABIOS_ADD_SERCON_PORT_FILE),y)
INTERMEDIATE+=seabios_sercon
seabios_sercon: $(obj)/coreboot.pre $(CBFSTOOL)
@printf " SeaBIOS Add sercon-port file\n"
# $(CBFSTOOL) $@.tmp add-int -i $(CONFIG_SEABIOS_SERCON_PORT_ADDR) -n etc/sercon-port
$(CBFSTOOL) $< add-int -i $(CONFIG_SEABIOS_SERCON_PORT_ADDR) -n etc/sercon-port
endif
ifeq ($(CONFIG_SEABIOS_THREAD_OPTIONROMS),y)
INTERMEDIATE+=seabios_thread_optionroms
seabios_thread_optionroms: $(obj)/coreboot.pre $(CBFSTOOL)
@printf " SeaBIOS Thread optionroms\n"
$(CBFSTOOL) $@.tmp add-int -i 2 -n etc/threads
$(CBFSTOOL) $< add-int -i 2 -n etc/threads
endif
# Depthcharge

View File

@@ -1,7 +1,3 @@
##
##
## Copyright (C) 2016 Google Inc.
##
## SPDX-License-Identifier: GPL-2.0-only
TAG-$(CONFIG_MEMTEST_MASTER)=origin/master

View File

@@ -1,7 +1,3 @@
##
##
## Copyright (C) 2015 Google Inc.
##
## SPDX-License-Identifier: GPL-2.0-only
# 2019-4 tag

View File

@@ -1,7 +1,3 @@
##
##
## Copyright (C) 2016 Google Inc.
##
## SPDX-License-Identifier: GPL-2.0-only
TAG-$(CONFIG_YABITS_MASTER)=origin/master

View File

@@ -1,5 +1,3 @@
##
##
## SPDX-License-Identifier: GPL-2.0-only
config PXE

View File

@@ -1,7 +1,3 @@
##
##
## Copyright (C) 2016 Google Inc.
##
## SPDX-License-Identifier: GPL-2.0-only
# 2019.3 - Last commit of March 2019

View File

@@ -1,7 +1,3 @@
##
##
## Copyright (C) 2017 Google Inc.
##
## SPDX-License-Identifier: GPL-2.0-only
# force the shell to bash - the edksetup.sh script doesn't work with dash

View File

@@ -28,6 +28,7 @@
//#define USB_DEBUG
#include <inttypes.h>
#include <libpayload.h>
#include <arch/barrier.h>
#include <arch/cache.h>
@@ -46,15 +47,15 @@ static void dump_td(u32 addr)
usb_debug("|..[OUT]............................................|\n");
else
usb_debug("|..[]...............................................|\n");
usb_debug("|:|============ EHCI TD at [0x%08lx] ==========|:|\n", addr);
usb_debug("|:| ERRORS = [%ld] | TOKEN = [0x%08lx] | |:|\n",
usb_debug("|:|============ EHCI TD at [0x%08"PRIx32"] ==========|:|\n", addr);
usb_debug("|:| ERRORS = [%"PRId32"] | TOKEN = [0x%08"PRIx32"] | |:|\n",
3 - ((td->token & QTD_CERR_MASK) >> QTD_CERR_SHIFT), td->token);
usb_debug("|:+-----------------------------------------------+:|\n");
usb_debug("|:| Next qTD [0x%08lx] |:|\n", td->next_qtd);
usb_debug("|:| Next qTD [0x%08"PRIx32"] |:|\n", td->next_qtd);
usb_debug("|:+-----------------------------------------------+:|\n");
usb_debug("|:| Alt. Next qTD [0x%08lx] |:|\n", td->alt_next_qtd);
usb_debug("|:| Alt. Next qTD [0x%08"PRIx32"] |:|\n", td->alt_next_qtd);
usb_debug("|:+-----------------------------------------------+:|\n");
usb_debug("|:| | Bytes to Transfer |[%05ld] |:|\n", (td->token & QTD_TOTAL_LEN_MASK) >> 16);
usb_debug("|:| | Bytes to Transfer |[%05"PRId32"] |:|\n", (td->token & QTD_TOTAL_LEN_MASK) >> 16);
usb_debug("|:| | PID CODE: | [%ld] |:|\n", (td->token & (3UL << 8)) >> 8);
usb_debug("|:| | Interrupt On Complete (IOC) | [%ld] |:|\n", (td->token & (1UL << 15)) >> 15);
usb_debug("|:| | Status Active | [%ld] |:|\n", (td->token & (1UL << 7)) >> 7);
@@ -277,9 +278,11 @@ static int wait_for_tds(qtd_t *head)
if (cur->next_qtd & 1) {
break;
}
if (0) dump_td(virt_to_phys(cur));
if (0)
dump_td(virt_to_phys(cur));
/* helps debugging the TD chain */
if (0) usb_debug("\nmoving from %x to %x\n", cur, phys_to_virt(cur->next_qtd));
if (0)
usb_debug("\nmoving from %p to %p\n", cur, phys_to_virt(cur->next_qtd));
cur = phys_to_virt(cur->next_qtd);
}
return result;

View File

@@ -29,6 +29,7 @@
//#define USB_DEBUG
#include <arch/virtual.h>
#include <inttypes.h>
#include <usb/usb.h>
#include "ohci_private.h"
#include "ohci.h"
@@ -59,7 +60,7 @@ dump_td (td_t *cur)
else
usb_debug("|..[]...............................................|\n");
usb_debug("|:|============ OHCI TD at [0x%08lx] ==========|:|\n", virt_to_phys(cur));
usb_debug("|:| ERRORS = [%ld] | CONFIG = [0x%08lx] | |:|\n",
usb_debug("|:| ERRORS = [%ld] | CONFIG = [0x%08"PRIx32"] | |:|\n",
3 - ((cur->config & (3UL << 26)) >> 26), cur->config);
usb_debug("|:+-----------------------------------------------+:|\n");
usb_debug("|:| C | Condition Code | [%02ld] |:|\n", (cur->config & (0xFUL << 28)) >> 28);
@@ -69,11 +70,11 @@ dump_td (td_t *cur)
usb_debug("|:| I | Data Toggle | [%ld] |:|\n", (cur->config & (3UL << 24)) >> 24);
usb_debug("|:| G | Error Count | [%ld] |:|\n", (cur->config & (3UL << 26)) >> 26);
usb_debug("|:+-----------------------------------------------+:|\n");
usb_debug("|:| Current Buffer Pointer [0x%08lx] |:|\n", cur->current_buffer_pointer);
usb_debug("|:| Current Buffer Pointer [0x%08"PRIx32"] |:|\n", cur->current_buffer_pointer);
usb_debug("|:+-----------------------------------------------+:|\n");
usb_debug("|:| Next TD [0x%08lx] |:|\n", cur->next_td);
usb_debug("|:| Next TD [0x%08"PRIx32"] |:|\n", cur->next_td);
usb_debug("|:+-----------------------------------------------+:|\n");
usb_debug("|:| Current Buffer End [0x%08lx] |:|\n", cur->buffer_end);
usb_debug("|:| Current Buffer End [0x%08"PRIx32"] |:|\n", cur->buffer_end);
usb_debug("|:|-----------------------------------------------|:|\n");
usb_debug("|...................................................|\n");
usb_debug("+---------------------------------------------------+\n");
@@ -88,9 +89,9 @@ dump_ed (ed_t *cur)
usb_debug("+---------------------------------------------------+\n");
usb_debug("| Next Endpoint Descriptor [0x%08lx] |\n", cur->next_ed & ~0xFUL);
usb_debug("+---------------------------------------------------+\n");
usb_debug("| | @ 0x%08lx : |\n", cur->config);
usb_debug("| | @ 0x%08"PRIx32" : |\n", cur->config);
usb_debug("| C | Maximum Packet Length | [%04ld] |\n", ((cur->config & (0x3fffUL << 16)) >> 16));
usb_debug("| O | Function Address | [%04ld] |\n", cur->config & 0x7F);
usb_debug("| O | Function Address | [%04"PRIx32"] |\n", cur->config & 0x7F);
usb_debug("| N | Endpoint Number | [%02ld] |\n", (cur->config & (0xFUL << 7)) >> 7);
usb_debug("| F | Endpoint Direction | [%ld] |\n", ((cur->config & (3UL << 11)) >> 11));
usb_debug("| I | Endpoint Speed | [%ld] |\n", ((cur->config & (1UL << 13)) >> 13));
@@ -468,7 +469,7 @@ ohci_control (usbdev_t *dev, direction_t dir, int drlen, void *setup, int dalen,
head->tail_pointer = virt_to_phys(final_td);
head->head_pointer = virt_to_phys(first_td);
usb_debug("ohci_control(): doing transfer with %x. first_td at %x\n",
usb_debug("%s(): doing transfer with %x. first_td at %"PRIxPTR"\n", __func__,
head->config & ED_FUNC_MASK, virt_to_phys(first_td));
#ifdef USB_DEBUG
dump_ed(head);
@@ -506,7 +507,7 @@ ohci_bulk (endpoint_t *ep, int dalen, u8 *src, int finalize)
td_t *cur, *next;
int remaining = dalen;
u8 *data = src;
usb_debug("bulk: %x bytes from %x, finalize: %x, maxpacketsize: %x\n", dalen, src, finalize, ep->maxpacketsize);
usb_debug("bulk: %x bytes from %p, finalize: %x, maxpacketsize: %x\n", dalen, src, finalize, ep->maxpacketsize);
if (!dma_coherent(src)) {
data = OHCI_INST(ep->dev->controller)->dma_buffer;
@@ -596,7 +597,7 @@ ohci_bulk (endpoint_t *ep, int dalen, u8 *src, int finalize)
head->tail_pointer = virt_to_phys(cur);
head->head_pointer = virt_to_phys(first_td) | (ep->toggle?ED_TOGGLE:0);
usb_debug("doing bulk transfer with %x(%x). first_td at %x, last %x\n",
usb_debug("doing bulk transfer with %x(%x). first_td at %"PRIxPTR", last %"PRIxPTR"\n",
head->config & ED_FUNC_MASK,
(head->config & ED_EP_MASK) >> ED_EP_SHIFT,
virt_to_phys(first_td), virt_to_phys(cur));

View File

@@ -29,6 +29,7 @@
//#define USB_DEBUG
#include <arch/virtual.h>
#include <inttypes.h>
#include <usb/usb.h>
#include "uhci.h"
#include "uhci_private.h"
@@ -79,8 +80,8 @@ static void td_dump(td_t *td)
(td->ptr & (1UL << 2)) >> 2, (td->ptr & (1UL << 1)) >> 1, td->ptr & 1UL);
usb_debug("|:+-----------------------------------------------+:|\n");
usb_debug("|:| T | Maximum Length | [%04lx] |:|\n", (td->token & (0x7FFUL << 21)) >> 21);
usb_debug("|:| O | PID CODE | [%04lx] |:|\n", td->token & 0xFF);
usb_debug("|:| K | Endpoint | [%04lx] |:|\n", (td->token & TD_EP_MASK) >> TD_EP_SHIFT);
usb_debug("|:| O | PID CODE | [%04"PRIx32"] |:|\n", td->token & 0xFF);
usb_debug("|:| K | Endpoint | [%04"PRIx32"] |:|\n", (td->token & TD_EP_MASK) >> TD_EP_SHIFT);
usb_debug("|:| E | Device Address | [%04lx] |:|\n", (td->token & (0x7FUL << 8)) >> 8);
usb_debug("|:| N | Data Toggle | [%lx] |:|\n", (td->token & (1UL << 19)) >> 19);
usb_debug("|:+-----------------------------------------------+:|\n");
@@ -101,7 +102,7 @@ static void td_dump(td_t *td)
usb_debug("|:| S ----------------------------------------|:|\n");
usb_debug("|:| | Actual Length | [%04lx] |:|\n", td->ctrlsts & 0x7FFUL);
usb_debug("|:+-----------------------------------------------+:|\n");
usb_debug("|:| Buffer pointer [0x%08lx] |:|\n", td->bufptr);
usb_debug("|:| Buffer pointer [0x%08"PRIx32"] |:|\n", td->bufptr);
usb_debug("|:|-----------------------------------------------|:|\n");
usb_debug("|...................................................|\n");
usb_debug("+---------------------------------------------------+\n");

View File

@@ -28,6 +28,7 @@
//#define USB_DEBUG
#include <inttypes.h>
#include <libpayload-config.h>
#include <usb/usb.h>
@@ -229,7 +230,7 @@ get_free_address (hci_t *controller)
int i = controller->latest_address + 1;
for (; i != controller->latest_address; i++) {
if (i >= ARRAY_SIZE(controller->devices) || i < 1) {
usb_debug("WARNING: Device addresses for controller %#x"
usb_debug("WARNING: Device addresses for controller %#" PRIxPTR
" wrapped around!\n", controller->reg_base);
i = 0;
continue;

View File

@@ -194,7 +194,7 @@ xhci_init (unsigned long physical_bar)
xhci->hcrreg = phys_to_virt(physical_bar) + xhci->capreg->rtsoff;
xhci->dbreg = phys_to_virt(physical_bar) + xhci->capreg->dboff;
xhci_debug("regbase: 0x%"PRIx32"\n", physical_bar);
xhci_debug("regbase: 0x%"PRIxPTR"\n", physical_bar);
xhci_debug("caplen: 0x%"PRIx32"\n", CAP_GET(CAPLEN, xhci->capreg));
xhci_debug("rtsoff: 0x%"PRIx32"\n", xhci->capreg->rtsoff);
xhci_debug("dboff: 0x%"PRIx32"\n", xhci->capreg->dboff);
@@ -208,8 +208,8 @@ xhci_init (unsigned long physical_bar)
}
xhci_debug("context size: %dB\n", CTXSIZE(xhci));
xhci_debug("maxslots: 0x%02lx\n", CAP_GET(MAXSLOTS, xhci->capreg));
xhci_debug("maxports: 0x%02lx\n", CAP_GET(MAXPORTS, xhci->capreg));
xhci_debug("maxslots: 0x%02"PRIx32"\n", CAP_GET(MAXSLOTS, xhci->capreg));
xhci_debug("maxports: 0x%02"PRIx32"\n", CAP_GET(MAXPORTS, xhci->capreg));
const unsigned pagesize = xhci->opreg->pagesize << 12;
xhci_debug("pagesize: 0x%04x\n", pagesize);
@@ -374,7 +374,7 @@ xhci_reinit (hci_t *controller)
/* Initialize command ring */
xhci_init_cycle_ring(&xhci->cr, COMMAND_RING_SIZE);
xhci_debug("command ring @%p (0x%08x)\n",
xhci_debug("command ring @%p (0x%08"PRIxPTR")\n",
xhci->cr.ring, virt_to_phys(xhci->cr.ring));
xhci->opreg->crcr_lo = virt_to_phys(xhci->cr.ring) | CRCR_RCS;
xhci->opreg->crcr_hi = 0;
@@ -384,9 +384,9 @@ xhci_reinit (hci_t *controller)
/* Initialize event ring */
xhci_reset_event_ring(&xhci->er);
xhci_debug("event ring @%p (0x%08x)\n",
xhci_debug("event ring @%p (0x%08"PRIxPTR")\n",
xhci->er.ring, virt_to_phys(xhci->er.ring));
xhci_debug("ERST Max: 0x%lx -> 0x%lx entries\n",
xhci_debug("ERST Max: 0x%"PRIx32" -> 0x%x entries\n",
CAP_GET(ERST_MAX, xhci->capreg),
1 << CAP_GET(ERST_MAX, xhci->capreg));
memset((void*)xhci->ev_ring_table, 0x00, sizeof(erst_entry_t));

View File

@@ -334,7 +334,7 @@ int usb_interface_check(u16 vendor, u16 device);
#define USB_QUIRK_TEST (1 << 31)
#define USB_QUIRK_NONE 0
static inline void usb_debug(const char *fmt, ...)
static inline void __attribute__((format(printf, 1, 2))) usb_debug(const char *fmt, ...)
{
#ifdef USB_DEBUG
va_list ap;

View File

@@ -720,6 +720,12 @@ config ACPI_NHLT
help
Build support for NHLT (non HD Audio) ACPI table generation.
config ACPI_LPIT
bool
default y
help
Build an ACPI Low Power Idle Table.
#These Options are here to avoid "undefined" warnings.
#The actual selection and help texts are in the following menu.

View File

@@ -1264,6 +1264,78 @@ void acpi_create_fadt(acpi_fadt_t *fadt, acpi_facs_t *facs, void *dsdt)
acpi_checksum((void *) fadt, header->length);
}
/*
* The value of residency couneter register address is MSR value and
* implementation specific.e.e.g, scenerios:
* 1. For CNL: space_id:0,residency_counter.addrl:0x632 and ACPI_LPIT
* selected in soc Kconfig sysfs file thet kernel creates is
* /sys/devices/system/cpu/cpuidle/low_power_idle_cpu_residency_us.
* 2. For CNL: space_id:0, residency_counter.addrl:0xfe000000 + 0x193C
* and ACPI_LPIT elected in soc Kconfig sysfs file thet kernel creates is
* /sys/devices/system/cpu/cpuidle/low_power_idle_system_residency_us
* which gets populated with integer values whenever system goes in s0ix.
*/
__weak void soc_residency_counter(struct acpi_lpit_native *lpit_soc)
{
lpit_soc->header.unique_id = 0;
lpit_soc->residency = 0x7530;
lpit_soc->latency = 0xBB8;
lpit_soc->entry_trigger.space_id = 0x7f;
lpit_soc->entry_trigger.bit_width = 0x01;
lpit_soc->entry_trigger.bit_offset = 0x02;
lpit_soc->entry_trigger.addrl = 0x60;
lpit_soc->residency_counter.space_id = 0x7f;
lpit_soc->residency_counter.bit_width = 0x40;
lpit_soc->residency_counter.addrl = 0x632;
}
__weak void system_residency_counter(struct acpi_lpit_native *lpit_system)
{
lpit_system->header.unique_id = 1;
lpit_system->counter_frequency = 0x256c;
lpit_system->residency = 0x7530;
lpit_system->latency = 0xBB8;
lpit_system->entry_trigger.space_id = 0x7f;
lpit_system->entry_trigger.bit_width = 0x01;
lpit_system->entry_trigger.bit_offset = 0x02;
lpit_system->entry_trigger.addrl = 0x60;
lpit_system->residency_counter.space_id = 0x00;
lpit_system->residency_counter.bit_width = 0x20;
lpit_system->residency_counter.access_size = 0x03;
lpit_system->residency_counter.addrl = 0xfe00193c;
}
static void acpi_create_lpit_generator(acpi_table_lpit *lpit)
{
acpi_header_t *header = &(lpit->header);
memset((void *)lpit, 0, sizeof(acpi_table_lpit));
memcpy(header->signature, "LPIT", 4);
header->revision = 2; /* ACPI 1.0/2.0: ?, ACPI 3.0/4.0: 2 */
memcpy(header->oem_id, OEM_ID, 6);
memcpy(header->oem_table_id, ACPI_TABLE_CREATOR, 8);
header->oem_revision = 42;
memcpy(header->asl_compiler_id, ASLC, 4);
header->asl_compiler_revision = 0;
header->length = sizeof(acpi_table_lpit);
lpit->lpit_soc.header.length = sizeof(struct acpi_lpit_native);
lpit->lpit_system.header.length = sizeof(struct acpi_lpit_native);
soc_residency_counter(&lpit->lpit_soc);
system_residency_counter(&lpit->lpit_system);
/* (Re)calculate length and checksum. */
header->checksum = acpi_checksum((void *)lpit, header->length);
}
unsigned long __weak fw_cfg_acpi_tables(unsigned long start)
{
return 0;
@@ -1284,6 +1356,7 @@ unsigned long write_acpi_tables(unsigned long start)
acpi_tcpa_t *tcpa;
acpi_tpm2_t *tpm2;
acpi_madt_t *madt;
acpi_table_lpit *lpit;
struct device *dev;
unsigned long fw;
size_t slic_size, dsdt_size;
@@ -1489,6 +1562,18 @@ unsigned long write_acpi_tables(unsigned long start)
current += madt->header.length;
acpi_add_table(rsdp, madt);
}
if (CONFIG(ACPI_LPIT)) {
printk(BIOS_DEBUG, "ACPI: * LPIT\n");
lpit = (acpi_table_lpit *)current;
acpi_create_lpit_generator(lpit);
if (lpit->header.length >= sizeof(acpi_table_lpit)) {
current += lpit->header.length;
acpi_add_table(rsdp, lpit);
}
}
current = acpi_align_current(current);
printk(BIOS_DEBUG, "current = %lx\n", current);

View File

@@ -463,6 +463,12 @@ static int get_socket_type(void)
return 0x02; /* Unknown */
}
unsigned int __weak smbios_memory_error_correction_type(struct memory_info *meminfo)
{
return meminfo->ecc_capable ?
MEMORY_ARRAY_ECC_SINGLE_BIT : MEMORY_ARRAY_ECC_NONE;
}
unsigned int __weak smbios_processor_external_clock(void)
{
return 0; /* Unknown */
@@ -493,6 +499,12 @@ unsigned int __weak smbios_cache_conf_operation_mode(u8 level)
return SMBIOS_CACHE_OP_MODE_UNKNOWN; /* Unknown */
}
/* Returns the processor voltage in 100mV units */
unsigned int __weak smbios_cpu_get_voltage(void)
{
return 0; /* Unknown */
}
static size_t get_number_of_caches(struct cpuid_result res_deterministic_cache)
{
size_t max_logical_cpus_sharing_cache = 0;
@@ -595,6 +607,7 @@ static int smbios_write_type3(unsigned long *current, int handle)
static int smbios_write_type4(unsigned long *current, int handle)
{
unsigned int cpu_voltage;
struct cpuid_result res;
struct smbios_type4 *t = (struct smbios_type4 *)*current;
int len = sizeof(struct smbios_type4);
@@ -686,6 +699,9 @@ static int smbios_write_type4(unsigned long *current, int handle)
}
}
t->processor_characteristics = characteristics | smbios_processor_characteristics();
cpu_voltage = smbios_cpu_get_voltage();
if (cpu_voltage > 0)
t->voltage = 0x80 | cpu_voltage;
*current += len;
return len;
@@ -1025,8 +1041,7 @@ static int smbios_write_type16(unsigned long *current, int *handle)
t->location = MEMORY_ARRAY_LOCATION_SYSTEM_BOARD;
t->use = MEMORY_ARRAY_USE_SYSTEM;
t->memory_error_correction = meminfo->ecc_capable ?
MEMORY_ARRAY_ECC_SINGLE_BIT : MEMORY_ARRAY_ECC_NONE;
t->memory_error_correction = smbios_memory_error_correction_type(meminfo);
/* no error information handle available */
t->memory_error_information_handle = 0xFFFE;

View File

@@ -37,6 +37,13 @@ postcar-y += bsd/cbfs_private.c
ramstage-y += bsd/cbfs_private.c
smm-y += bsd/cbfs_private.c
bootblock-y += bsd/cbfs_mcache.c
verstage-y += bsd/cbfs_mcache.c
romstage-y += bsd/cbfs_mcache.c
postcar-y += bsd/cbfs_mcache.c
ramstage-y += bsd/cbfs_mcache.c
smm-y += bsd/cbfs_mcache.c
decompressor-y += bsd/lz4_wrapper.c
bootblock-y += bsd/lz4_wrapper.c
verstage-y += bsd/lz4_wrapper.c

View File

@@ -0,0 +1,143 @@
/* SPDX-License-Identifier: BSD-3-Clause OR GPL-2.0-or-later */
#include <assert.h>
#include <commonlib/bsd/cbfs_private.h>
/*
* A CBFS metadata cache is an in memory data structure storing CBFS file headers (= metadata).
* It is defined by its start pointer and size. It contains a sequence of variable-length
* union mcache_entry entries. There is no overall header structure for the cache.
*
* Each mcache_entry is the raw metadata for a CBFS file (including attributes) in the same form
* as stored on flash (i.e. values in big-endian), except that the CBFS magic signature in the
* first 8 bytes ('LARCHIVE') is overwritten with mcache-internal bookkeeping data. The first 4
* bytes are a magic number (MCACHE_MAGIC_FILE) and the next 4 bytes are the absolute offset in
* bytes on the cbfs_dev_t that this metadata blob was found at. (Note that depending on the
* implementation of cbfs_dev_t, this offset may still be relative to the start of a subregion
* of the underlying storage device.)
*
* The length of an mcache_entry (i.e. length of the underlying metadata blob) is encoded in the
* metadata (entry->file.h.offset). The next mcache_entry begins at the next
* CBFS_MCACHE_ALIGNMENT boundary after that. The cache is terminated by a special 4-byte
* mcache_entry that consists only of a magic number (MCACHE_MAGIC_END or MCACHE_MAGIC_FULL).
*/
#define MCACHE_MAGIC_FILE 0x454c4946 /* 'FILE' */
#define MCACHE_MAGIC_FULL 0x4c4c5546 /* 'FULL' */
#define MCACHE_MAGIC_END 0x444e4524 /* '$END' */
union mcache_entry {
union cbfs_mdata file;
struct { /* These fields exactly overlap file.h.magic */
uint32_t magic;
uint32_t offset;
};
};
struct cbfs_mcache_build_args {
void *mcache;
void *end;
int count;
};
static cb_err_t build_walker(cbfs_dev_t dev, size_t offset, const union cbfs_mdata *mdata,
size_t already_read, void *arg)
{
struct cbfs_mcache_build_args *args = arg;
union mcache_entry *entry = args->mcache;
const uint32_t data_offset = be32toh(mdata->h.offset);
if (args->end - args->mcache < data_offset)
return CB_CBFS_CACHE_FULL;
if (cbfs_copy_fill_metadata(args->mcache, mdata, already_read, dev, offset))
return CB_CBFS_IO;
entry->magic = MCACHE_MAGIC_FILE;
entry->offset = offset;
args->mcache += ALIGN_UP(data_offset, CBFS_MCACHE_ALIGNMENT);
args->count++;
return CB_CBFS_NOT_FOUND;
}
cb_err_t cbfs_mcache_build(cbfs_dev_t dev, void *mcache, size_t size,
struct vb2_hash *metadata_hash)
{
struct cbfs_mcache_build_args args = {
.mcache = mcache,
.end = mcache + ALIGN_DOWN(size, CBFS_MCACHE_ALIGNMENT)
- sizeof(uint32_t), /* leave space for terminating magic */
.count = 0,
};
assert(size > sizeof(uint32_t) && IS_ALIGNED((uintptr_t)mcache, CBFS_MCACHE_ALIGNMENT));
cb_err_t ret = cbfs_walk(dev, build_walker, &args, metadata_hash, 0);
union mcache_entry *entry = args.mcache;
if (ret == CB_CBFS_NOT_FOUND) {
ret = CB_SUCCESS;
entry->magic = MCACHE_MAGIC_END;
} else if (ret == CB_CBFS_CACHE_FULL) {
ERROR("mcache overflow, should increase CBFS_MCACHE size!\n");
entry->magic = MCACHE_MAGIC_FULL;
}
LOG("mcache @%p built for %d files, used %#zx of %#zx bytes\n", mcache,
args.count, args.mcache + sizeof(entry->magic) - mcache, size);
return ret;
}
cb_err_t cbfs_mcache_lookup(const void *mcache, size_t mcache_size, const char *name,
union cbfs_mdata *mdata_out, size_t *data_offset_out)
{
const size_t namesize = strlen(name) + 1; /* Count trailing \0 so we can memcmp() it. */
const void *end = mcache + mcache_size;
const void *current = mcache;
while (current + sizeof(uint32_t) < end) {
const union mcache_entry *entry = current;
if (entry->magic == MCACHE_MAGIC_END)
return CB_CBFS_NOT_FOUND;
if (entry->magic == MCACHE_MAGIC_FULL)
return CB_CBFS_CACHE_FULL;
assert(entry->magic == MCACHE_MAGIC_FILE);
const uint32_t data_offset = be32toh(entry->file.h.offset);
const uint32_t data_length = be32toh(entry->file.h.len);
if (namesize <= data_offset - offsetof(union cbfs_mdata, filename) &&
memcmp(name, entry->file.filename, namesize) == 0) {
LOG("Found '%s' @%#x size %#x in mcache @%p\n",
name, entry->offset, data_length, current);
*data_offset_out = entry->offset + data_offset;
memcpy(mdata_out, &entry->file, data_offset);
return CB_SUCCESS;
}
current += ALIGN_UP(data_offset, CBFS_MCACHE_ALIGNMENT);
}
ERROR("CBFS mcache overflow!\n");
return CB_ERR;
}
size_t cbfs_mcache_real_size(const void *mcache, size_t mcache_size)
{
const void *end = mcache + mcache_size;
const void *current = mcache;
while (current + sizeof(uint32_t) < end) {
const union mcache_entry *entry = current;
if (entry->magic == MCACHE_MAGIC_FULL || entry->magic == MCACHE_MAGIC_END) {
current += sizeof(entry->magic);
break;
}
assert(entry->magic == MCACHE_MAGIC_FILE);
current += ALIGN_UP(be32toh(entry->file.h.offset), CBFS_MCACHE_ALIGNMENT);
}
return current - mcache;
}

View File

@@ -39,6 +39,7 @@ enum cb_err {
CB_CBFS_IO = -400, /**< Underlying I/O error */
CB_CBFS_NOT_FOUND = -401, /**< File not found in directory */
CB_CBFS_HASH_MISMATCH = -402, /**< Master hash validation failed */
CB_CBFS_CACHE_FULL = -403, /**< Metadata cache overflowed */
};
/* Don't typedef the enum directly, so the size is unambiguous for serialization. */

View File

@@ -113,4 +113,25 @@ cb_err_t cbfs_copy_fill_metadata(union cbfs_mdata *dst, const union cbfs_mdata *
cb_err_t cbfs_lookup(cbfs_dev_t dev, const char *name, union cbfs_mdata *mdata_out,
size_t *data_offset_out, struct vb2_hash *metadata_hash);
/* Both base address and size of CBFS mcaches must be aligned to this value! */
#define CBFS_MCACHE_ALIGNMENT sizeof(uint32_t) /* Largest data type used in CBFS */
/* Build an in-memory CBFS metadata cache out of the CBFS on |dev| into a |mcache_size| bytes
* memory area at |mcache|. Also verify |metadata_hash| unless it is NULL. If this returns
* CB_CBFS_CACHE_FULL, the mcache is still valid and can be used, but lookups may return
* CB_CBFS_CACHE_FULL for files that didn't fit to indicate that the caller needs to fall back
* to cbfs_lookup(). */
cb_err_t cbfs_mcache_build(cbfs_dev_t dev, void *mcache, size_t mcache_size,
struct vb2_hash *metadata_hash);
/*
* Find a file named |name| in a CBFS metadata cache and copy its metadata into |mdata_out|.
* Pass out offset to the file data (on the original CBFS device used for cbfs_mcache_build()).
*/
cb_err_t cbfs_mcache_lookup(const void *mcache, size_t mcache_size, const char *name,
union cbfs_mdata *mdata_out, size_t *data_offset_out);
/* Returns the amount of bytes actually used by the CBFS metadata cache in |mcache|. */
size_t cbfs_mcache_real_size(const void *mcache, size_t mcache_size);
#endif /* _COMMONLIB_BSD_CBFS_PRIVATE_H_ */

View File

@@ -67,6 +67,8 @@
#define CBMEM_ID_ROM2 0x524f4d32
#define CBMEM_ID_ROM3 0x524f4d33
#define CBMEM_ID_FMAP 0x464d4150
#define CBMEM_ID_CBFS_RO_MCACHE 0x524d5346
#define CBMEM_ID_CBFS_RW_MCACHE 0x574d5346
#define CBMEM_ID_FSP_LOGO 0x4c4f474f
#define CBMEM_ID_SMM_COMBUFFER 0x53534d32
@@ -129,5 +131,7 @@
{ CBMEM_ID_ROM1, "VGA ROM #1 "}, \
{ CBMEM_ID_ROM2, "VGA ROM #2 "}, \
{ CBMEM_ID_ROM3, "VGA ROM #3 "}, \
{ CBMEM_ID_FMAP, "FMAP "},
{ CBMEM_ID_FMAP, "FMAP "}, \
{ CBMEM_ID_CBFS_RO_MCACHE, "RO MCACHE "}, \
{ CBMEM_ID_CBFS_RW_MCACHE, "RW MCACHE "}
#endif /* _CBMEM_ID_H_ */

View File

@@ -1,2 +0,0 @@
ramstage-y += microcode.c
romstage-y += microcode.c

View File

@@ -1,13 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-only
config CPU_AMD_PI_00660F01
bool
select X86_AMD_FIXED_MTRRS
if CPU_AMD_PI_00660F01
config CPU_ADDR_BITS
int
default 48
endif

View File

@@ -1,14 +0,0 @@
# SPDX-License-Identifier: GPL-2.0-only
romstage-y += fixme.c
ramstage-y += fixme.c
ramstage-y += chip_name.c
ramstage-y += model_15_init.c
subdirs-y += ../../mtrr
subdirs-y += ../../../x86/tsc
subdirs-y += ../../../x86/lapic
subdirs-y += ../../../x86/cache
subdirs-y += ../../../x86/mtrr
subdirs-y += ../../../x86/pae
subdirs-y += ../../../x86/smm

View File

@@ -1,48 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0-only */
/*
* Processor Object
*
*/
Scope (\_SB) { /* define processor scope */
Device (P000) {
Name(_HID, "ACPI0007")
Name(_UID, 0)
}
Device (P001) {
Name(_HID, "ACPI0007")
Name(_UID, 1)
}
Device (P002) {
Name(_HID, "ACPI0007")
Name(_UID, 2)
}
Device (P003) {
Name(_HID, "ACPI0007")
Name(_UID, 3)
}
Device (P004) {
Name(_HID, "ACPI0007")
Name(_UID, 4)
}
Device (P005) {
Name(_HID, "ACPI0007")
Name(_UID, 5)
}
Device (P006) {
Name(_HID, "ACPI0007")
Name(_UID, 6)
}
Device (P007) {
Name(_HID, "ACPI0007")
Name(_UID, 7)
}
} /* End _SB scope */

View File

@@ -1,7 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <device/device.h>
struct chip_operations cpu_amd_pi_00660F01_ops = {
CHIP_NAME("AMD CPU Family 15h Model 60h-6Fh")
};

View File

@@ -1,55 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <cpu/x86/mtrr.h>
#include <cpu/amd/msr.h>
#include <cpu/amd/mtrr.h>
#include <northbridge/amd/agesa/agesa_helper.h>
#include <Porting.h>
#include <AGESA.h>
#include <amdlib.h>
void amd_initcpuio(void)
{
UINT64 MsrReg;
UINT32 PciData;
PCI_ADDR PciAddress;
AMD_CONFIG_PARAMS StdHeader;
/* Enable legacy video routing: D18F1xF4 VGA Enable */
PciAddress.AddressValue = MAKE_SBDFO(0, 0, 0x18, 1, 0xF4);
PciData = 1;
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
/* The platform BIOS needs to ensure the memory ranges of SB800 legacy
* devices (TPM, HPET, BIOS RAM, Watchdog Timer, I/O APIC and ACPI) are
* set to non-posted regions.
*/
PciAddress.AddressValue = MAKE_SBDFO(0, 0, 0x18, 1, 0x84);
/* last address before processor local APIC at FEE00000 */
PciData = 0x00FEDF00;
/* set NP (non-posted) bit */
PciData |= 1 << 7;
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;
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
/* Map the remaining PCI hole as posted MMIO */
PciAddress.AddressValue = MAKE_SBDFO(0, 0, 0x18, 1, 0x8C);
PciData = 0x00FECF00; /* last address before non-posted range */
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
LibAmdMsrRead(TOP_MEM, &MsrReg, &StdHeader);
MsrReg = (MsrReg >> 8) | 3;
PciAddress.AddressValue = MAKE_SBDFO(0, 0, 0x18, 1, 0x88);
PciData = (UINT32)MsrReg;
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
/* Send all IO (0000-FFFF) to southbridge. */
PciAddress.AddressValue = MAKE_SBDFO(0, 0, 0x18, 1, 0xC4);
PciData = 0x0000F000;
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
PciAddress.AddressValue = MAKE_SBDFO(0, 0, 0x18, 1, 0xC0);
PciData = 0x00000003;
LibAmdPciWrite(AccessWidth32, PciAddress, &PciData, &StdHeader);
}

View File

@@ -1,119 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <console/console.h>
#include <cpu/x86/msr.h>
#include <cpu/amd/msr.h>
#include <cpu/x86/mtrr.h>
#include <cpu/amd/mtrr.h>
#include <device/device.h>
#include <device/pci.h>
#include <cpu/x86/pae.h>
#include <cpu/x86/lapic.h>
#include <cpu/cpu.h>
#include <cpu/x86/cache.h>
#include <amdlib.h>
#include <PspBaseLib.h>
void PSPProgBar3Msr(void *Buffer);
void PSPProgBar3Msr(void *Buffer)
{
u32 Bar3Addr;
u64 Tmp64;
/* Get Bar3 Addr */
Bar3Addr = PspLibPciReadPspConfig(0x20);
Tmp64 = Bar3Addr;
printk(BIOS_DEBUG, "Bar3=%llx\n", Tmp64);
LibAmdMsrWrite(0xC00110A2, &Tmp64, NULL);
LibAmdMsrRead(0xC00110A2, &Tmp64, NULL);
}
static void model_15_init(struct device *dev)
{
printk(BIOS_DEBUG, "Model 15 Init.\n");
u8 i;
msr_t msr;
int num_banks;
int msrno;
#if CONFIG(LOGICAL_CPUS)
u32 siblings;
#endif
disable_cache();
/* Enable access to AMD RdDram and WrDram extension bits */
msr = rdmsr(SYSCFG_MSR);
msr.lo |= SYSCFG_MSR_MtrrFixDramModEn;
msr.lo &= ~SYSCFG_MSR_MtrrFixDramEn;
wrmsr(SYSCFG_MSR, msr);
// BSP: make a0000-bffff UC, c0000-fffff WB
msr.lo = msr.hi = 0;
wrmsr(MTRR_FIX_16K_A0000, msr);
msr.lo = msr.hi = 0x1e1e1e1e;
wrmsr(MTRR_FIX_64K_00000, msr);
wrmsr(MTRR_FIX_16K_80000, msr);
for (msrno = MTRR_FIX_4K_C0000; msrno <= MTRR_FIX_4K_F8000; msrno++)
wrmsr(msrno, msr);
msr = rdmsr(SYSCFG_MSR);
msr.lo &= ~SYSCFG_MSR_MtrrFixDramModEn;
msr.lo |= SYSCFG_MSR_MtrrFixDramEn;
wrmsr(SYSCFG_MSR, msr);
x86_mtrr_check();
x86_enable_cache();
/* zero the machine check error status registers */
msr = rdmsr(IA32_MCG_CAP);
num_banks = msr.lo & MCA_BANKS_MASK;
msr.lo = 0;
msr.hi = 0;
for (i = 0; i < num_banks; i++)
wrmsr(IA32_MC0_STATUS + (i * 4), msr);
/* Enable the local CPU APICs */
setup_lapic();
#if CONFIG(LOGICAL_CPUS)
siblings = cpuid_ecx(0x80000008) & 0xff;
if (siblings > 0) {
msr = rdmsr_amd(CPU_ID_FEATURES_MSR);
msr.lo |= 1 << 28;
wrmsr_amd(CPU_ID_FEATURES_MSR, msr);
msr = rdmsr_amd(CPU_ID_EXT_FEATURES_MSR);
msr.hi |= 1 << (33 - 32);
wrmsr_amd(CPU_ID_EXT_FEATURES_MSR, msr);
}
printk(BIOS_DEBUG, "siblings = %02d, ", siblings);
#endif
PSPProgBar3Msr(NULL);
/* DisableCf8ExtCfg */
msr = rdmsr(NB_CFG_MSR);
msr.hi &= ~(1 << (46 - 32));
wrmsr(NB_CFG_MSR, msr);
/* Write protect SMM space with SMMLOCK. */
msr = rdmsr(HWCR_MSR);
msr.lo |= (1 << 0);
wrmsr(HWCR_MSR, msr);
}
static struct device_operations cpu_dev_ops = {
.init = model_15_init,
};
static const struct cpu_device_id cpu_table[] = {
{ X86_VENDOR_AMD, 0x660f00 },
{ X86_VENDOR_AMD, 0x660f01 },
{ 0, 0 },
};
static const struct cpu_driver model_15 __cpu_driver = {
.ops = &cpu_dev_ops,
.id_table = cpu_table,
};

View File

@@ -4,7 +4,6 @@ config CPU_AMD_PI
bool
default y if CPU_AMD_PI_00630F01
default y if CPU_AMD_PI_00730F01
default y if CPU_AMD_PI_00660F01
default n
select ARCH_ALL_STAGES_X86_32
select DRIVERS_AMD_PI
@@ -46,4 +45,3 @@ endif # CPU_AMD_PI
source "src/cpu/amd/pi/00630F01/Kconfig"
source "src/cpu/amd/pi/00730F01/Kconfig"
source "src/cpu/amd/pi/00660F01/Kconfig"

View File

@@ -2,4 +2,3 @@
subdirs-$(CONFIG_CPU_AMD_PI_00630F01) += 00630F01
subdirs-$(CONFIG_CPU_AMD_PI_00730F01) += 00730F01
subdirs-$(CONFIG_CPU_AMD_PI_00660F01) += 00660F01

View File

@@ -32,6 +32,9 @@ config CPU_INTEL_COMMON_TIMEBASE
endif
config CPU_INTEL_COMMON_VOLTAGE
bool
config CPU_INTEL_COMMON_SMM
bool
default y if CPU_INTEL_COMMON

View File

@@ -1,5 +1,6 @@
ramstage-$(CONFIG_CPU_INTEL_COMMON) += common_init.c
ramstage-$(CONFIG_CPU_INTEL_COMMON) += hyperthreading.c
ramstage-$(CONFIG_CPU_INTEL_COMMON_VOLTAGE) += voltage.c
ifeq ($(CONFIG_CPU_INTEL_COMMON_TIMEBASE),y)
bootblock-y += fsb.c

View File

@@ -0,0 +1,12 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <cpu/x86/msr.h>
#include <smbios.h>
/* This is not an architectural MSR. */
#define MSR_PERF_STATUS 0x198
unsigned int smbios_cpu_get_voltage(void)
{
return (rdmsr(MSR_PERF_STATUS).hi & 0xffff) * 10 / 8192;
}

View File

@@ -1 +1,29 @@
bootblock-y += fit.S
FIT_ENTRY=$(call strip_quotes, $(CONFIG_INTEL_TOP_SWAP_FIT_ENTRY_FMAP_REG))
ifneq ($(CONFIG_UPDATE_IMAGE),y) # never update the bootblock
ifneq ($(CONFIG_CPU_MICROCODE_CBFS_NONE),y)
INTERMEDIATE+=add_mcu_fit
add_mcu_fit: $(obj)/coreboot.pre $(IFITTOOL)
@printf " UPDATE-FIT Microcode\n"
$(IFITTOOL) -f $< -a -n cpu_microcode_blob.bin -t 1 -s $(CONFIG_CPU_INTEL_NUM_FIT_ENTRIES) -r COREBOOT
# Second FIT in TOP_SWAP bootblock
ifeq ($(CONFIG_INTEL_ADD_TOP_SWAP_BOOTBLOCK),y)
INTERMEDIATE+=add_ts_mcu_fit
add_ts_mcu_fit: $(obj)/coreboot.pre $(IFITTOOL)
@printf " UPDATE-FIT Top Swap: Microcode\n"
ifneq ($(FIT_ENTRY),)
$(IFITTOOL) -f $< -A -n $(FIT_ENTRY) -t 1 -s $(CONFIG_CPU_INTEL_NUM_FIT_ENTRIES) $(TS_OPTIONS) -r COREBOOT
endif # FIT_ENTRY
$(IFITTOOL) -f $< -a -n cpu_microcode_blob.bin -t 1 -s $(CONFIG_CPU_INTEL_NUM_FIT_ENTRIES) $(TS_OPTIONS) -r COREBOOT
endif # CONFIG_INTEL_ADD_TOP_SWAP_BOOTBLOCK
endif # CONFIG_CPU_MICROCODE_CBFS_NONE
endif # CONFIG_UPDATE_IMAGE

View File

@@ -20,6 +20,7 @@ config CPU_SPECIFIC_OPTIONS
select CPU_INTEL_COMMON
select CPU_INTEL_COMMON_TIMEBASE
select HAVE_ASAN_IN_ROMSTAGE
select CPU_INTEL_COMMON_VOLTAGE
config SMM_TSEG_SIZE
hex

View File

@@ -43,6 +43,7 @@
* if the revision of the update is newer than what is installed
*/
.code32
.section .text
.global update_bsp_microcode

View File

@@ -12,7 +12,7 @@ config SOCKET_SPECIFIC_OPTIONS # dummy
config C_ENV_BOOTBLOCK_SIZE
hex
default 0x4000
default 0x8000
config DCACHE_RAM_BASE
hex

View File

@@ -16,7 +16,12 @@
#endif
#include <cpu/x86/msr.h>
#if defined(__RAMSTAGE__)
#include <arch/ram_segs.h>
#else
#include <arch/rom_segs.h>
#endif
setup_longmode:
/* Get page table address */
@@ -42,7 +47,12 @@ setup_longmode:
movl %eax, %cr0
/* use long jump to switch to 64-bit code segment */
#if defined(__RAMSTAGE__)
ljmp $RAM_CODE_SEG64, $__longmode_start
#else
ljmp $ROM_CODE_SEG64, $__longmode_start
#endif
.code64
__longmode_start:

View File

@@ -7,6 +7,7 @@
#include <cpu/x86/mtrr.h>
.code32
.section .text
.global check_mtrr

View File

@@ -5,6 +5,8 @@
#include <cpu/x86/msr.h>
#include <arch/ram_segs.h>
#define __RAMSTAGE__
/* The SIPI vector is responsible for initializing the APs in the system. It
* loads microcode, sets up MSRs, and enables caching before calling into
* C code. */
@@ -192,11 +194,24 @@ load_msr:
mov %eax, %cr4
#endif
#ifdef __x86_64__
/* entry64.inc preserves ebx. */
#include <cpu/x86/64bit/entry64.inc>
mov %rsi, %rdi /* cpu_num */
movl c_handler, %eax
call *%rax
#else
/* c_handler(cpu_num), preserve proper stack alignment */
sub $12, %esp
push %esi /* cpu_num */
mov c_handler, %eax
call *%eax
#endif
halt_jump:
hlt
jmp halt_jump

View File

@@ -491,18 +491,6 @@ config MMCONF_SUPPORT
bool
default !NO_MMCONF_SUPPORT
config HYPERTRANSPORT_PLUGIN_SUPPORT
bool
default n
config HT_CHAIN_UNITID_BASE
int
default 0
config HT_CHAIN_END_UNITID_BASE
int
default 0
config PCIX_PLUGIN_SUPPORT
bool
default y

View File

@@ -35,7 +35,6 @@ postcar-y += pci_ops.c
ramstage-y += pci_ops.c
smm-y += pci_ops.c
ramstage-$(CONFIG_HYPERTRANSPORT_PLUGIN_SUPPORT) += hypertransport.c
ramstage-$(CONFIG_PCIX_PLUGIN_SUPPORT) += pcix_device.c
ramstage-$(CONFIG_PCIEXP_PLUGIN_SUPPORT) += pciexp_device.c
ramstage-$(CONFIG_CARDBUS_PLUGIN_SUPPORT) += cardbus_device.c

View File

@@ -1,499 +0,0 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <console/console.h>
#include <device/device.h>
#include <device/path.h>
#include <device/pci.h>
#include <device/pci_ops.h>
#include <device/pci_ids.h>
#include <device/hypertransport.h>
struct ht_link {
struct device *dev;
unsigned int pos;
unsigned char ctrl_off, config_off, freq_off, freq_cap_off;
};
static struct device *ht_scan_get_devs(struct device **old_devices)
{
struct device *first, *last;
first = *old_devices;
last = first;
/*
* Extract the chain of devices to (first through last) for the next
* hypertransport device.
*/
while (last && last->sibling &&
(last->sibling->path.type == DEVICE_PATH_PCI) &&
(last->sibling->path.pci.devfn > last->path.pci.devfn))
{
last = last->sibling;
}
if (first) {
struct device *child;
/* Unlink the chain from the list of old devices. */
*old_devices = last->sibling;
last->sibling = 0;
/* Now add the device to the list of devices on the bus. */
/* Find the last child of our parent. */
for (child = first->bus->children; child && child->sibling;)
child = child->sibling;
/* Place the chain on the list of children of their parent. */
if (child)
child->sibling = first;
else
first->bus->children = first;
}
return first;
}
static int ht_setup_link(struct ht_link *prev, struct device *dev, unsigned int pos)
{
struct ht_link cur[1];
int linkb_to_host;
/* Set the hypertransport link width and frequency. */
/*
* See which side of the device our previous write to set the unitid
* came from.
*/
cur->dev = dev;
cur->pos = pos;
linkb_to_host =
(pci_read_config16(cur->dev, cur->pos + PCI_CAP_FLAGS) >> 10) & 1;
if (!linkb_to_host) {
cur->ctrl_off = PCI_HT_CAP_SLAVE_CTRL0;
cur->config_off = PCI_HT_CAP_SLAVE_WIDTH0;
cur->freq_off = PCI_HT_CAP_SLAVE_FREQ0;
cur->freq_cap_off = PCI_HT_CAP_SLAVE_FREQ_CAP0;
} else {
cur->ctrl_off = PCI_HT_CAP_SLAVE_CTRL1;
cur->config_off = PCI_HT_CAP_SLAVE_WIDTH1;
cur->freq_off = PCI_HT_CAP_SLAVE_FREQ1;
cur->freq_cap_off = PCI_HT_CAP_SLAVE_FREQ_CAP1;
}
/*
* Remember the current link as the previous link, but look at the
* other offsets.
*/
prev->dev = cur->dev;
prev->pos = cur->pos;
if (cur->ctrl_off == PCI_HT_CAP_SLAVE_CTRL0) {
prev->ctrl_off = PCI_HT_CAP_SLAVE_CTRL1;
prev->config_off = PCI_HT_CAP_SLAVE_WIDTH1;
prev->freq_off = PCI_HT_CAP_SLAVE_FREQ1;
prev->freq_cap_off = PCI_HT_CAP_SLAVE_FREQ_CAP1;
} else {
prev->ctrl_off = PCI_HT_CAP_SLAVE_CTRL0;
prev->config_off = PCI_HT_CAP_SLAVE_WIDTH0;
prev->freq_off = PCI_HT_CAP_SLAVE_FREQ0;
prev->freq_cap_off = PCI_HT_CAP_SLAVE_FREQ_CAP0;
}
return 0;
}
static unsigned int ht_lookup_slave_capability(struct device *dev)
{
unsigned int pos;
pos = 0;
do {
pos = pci_find_next_capability(dev, PCI_CAP_ID_HT, pos);
if (pos) {
u16 flags;
flags = pci_read_config16(dev, pos + PCI_CAP_FLAGS);
printk(BIOS_SPEW, "flags: 0x%04x\n", flags);
if ((flags >> 13) == 0) {
/* Entry is a slave secondary, success... */
break;
}
}
} while (pos);
return pos;
}
static void ht_collapse_early_enumeration(struct bus *bus,
unsigned int offset_unitid)
{
unsigned int devfn;
struct ht_link prev;
u16 ctrl;
/* Initialize the hypertransport enumeration state. */
prev.dev = bus->dev;
prev.pos = bus->cap;
prev.ctrl_off = PCI_HT_CAP_HOST_CTRL;
prev.config_off = PCI_HT_CAP_HOST_WIDTH;
prev.freq_off = PCI_HT_CAP_HOST_FREQ;
prev.freq_cap_off = PCI_HT_CAP_HOST_FREQ_CAP;
/* Wait until the link initialization is complete. */
do {
ctrl = pci_read_config16(prev.dev, prev.pos + prev.ctrl_off);
/* Is this the end of the hypertransport chain? */
if (ctrl & (1 << 6))
return;
/* Has the link failed? */
if (ctrl & (1 << 4)) {
/*
* Either the link has failed, or we have a CRC error.
* Sometimes this can happen due to link retrain, so
* lets knock it down and see if its transient.
*/
ctrl |= ((1 << 4) | (1 << 8)); /* Link fail + CRC */
pci_write_config16(prev.dev, prev.pos + prev.ctrl_off,
ctrl);
ctrl = pci_read_config16(prev.dev,
prev.pos + prev.ctrl_off);
if (ctrl & ((1 << 4) | (1 << 8))) {
printk(BIOS_ALERT, "Detected error on "
"Hypertransport link\n");
return;
}
}
} while ((ctrl & (1 << 5)) == 0);
/* Actually, only for one HT device HT chain, and unitid is 0. */
#if !CONFIG_HT_CHAIN_UNITID_BASE
if (offset_unitid)
return;
#endif
/* Check if is already collapsed. */
if ((!offset_unitid) || (offset_unitid
&& (!((CONFIG_HT_CHAIN_END_UNITID_BASE == 0)
&& (CONFIG_HT_CHAIN_END_UNITID_BASE
< CONFIG_HT_CHAIN_UNITID_BASE))))) {
struct device dummy;
u32 id;
dummy.bus = bus;
dummy.path.type = DEVICE_PATH_PCI;
dummy.path.pci.devfn = PCI_DEVFN(0, 0);
id = pci_read_config32(&dummy, PCI_VENDOR_ID);
if (!((id == 0xffffffff) || (id == 0x00000000)
|| (id == 0x0000ffff) || (id == 0xffff0000))) {
return;
}
}
/* Spin through the devices and collapse any early HT enumeration. */
for (devfn = PCI_DEVFN(1, 0); devfn <= 0xff; devfn += 8) {
struct device dummy;
u32 id;
unsigned int pos, flags;
dummy.bus = bus;
dummy.path.type = DEVICE_PATH_PCI;
dummy.path.pci.devfn = devfn;
id = pci_read_config32(&dummy, PCI_VENDOR_ID);
if ((id == 0xffffffff) || (id == 0x00000000)
|| (id == 0x0000ffff) || (id == 0xffff0000)) {
continue;
}
dummy.vendor = id & 0xffff;
dummy.device = (id >> 16) & 0xffff;
dummy.hdr_type = pci_read_config8(&dummy, PCI_HEADER_TYPE);
pos = ht_lookup_slave_capability(&dummy);
if (!pos)
continue;
/* Clear the unitid. */
flags = pci_read_config16(&dummy, pos + PCI_CAP_FLAGS);
flags &= ~0x1f;
pci_write_config16(&dummy, pos + PCI_CAP_FLAGS, flags);
printk(BIOS_SPEW, "Collapsing %s [%04x/%04x]\n",
dev_path(&dummy), dummy.vendor, dummy.device);
}
}
static unsigned int do_hypertransport_scan_chain(struct bus *bus, unsigned int min_devfn,
unsigned int max_devfn,
unsigned int *ht_unitid_base,
unsigned int offset_unitid)
{
/*
* Even CONFIG_HT_CHAIN_UNITID_BASE == 0, we still can go through this
* function, because of end_of_chain check. Also, we need it to
* optimize link.
*/
unsigned int next_unitid, last_unitid, min_unitid, max_unitid;
struct device *old_devices, *dev, *func, *last_func = NULL;
struct ht_link prev;
int ht_dev_num = 0;
printk(BIOS_SPEW, "%s for bus %02x\n", __func__, bus->secondary);
min_unitid = (offset_unitid) ? CONFIG_HT_CHAIN_UNITID_BASE : 1;
#if CONFIG_HT_CHAIN_END_UNITID_BASE != 0x20
/*
* Let's record the device of last HT device, so we can set the unitid
* to CONFIG_HT_CHAIN_END_UNITID_BASE.
*/
unsigned int real_last_unitid = 0, end_used = 0;
u8 real_last_pos = 0;
struct device *real_last_dev = NULL;
#endif
/* Restore the hypertransport chain to it's uninitialized state. */
ht_collapse_early_enumeration(bus, offset_unitid);
/* See which static device nodes I have. */
old_devices = bus->children;
bus->children = 0;
/* Initialize the hypertransport enumeration state. */
prev.dev = bus->dev;
prev.pos = bus->cap;
prev.ctrl_off = PCI_HT_CAP_HOST_CTRL;
prev.config_off = PCI_HT_CAP_HOST_WIDTH;
prev.freq_off = PCI_HT_CAP_HOST_FREQ;
prev.freq_cap_off = PCI_HT_CAP_HOST_FREQ_CAP;
/* If present, assign unitid to a hypertransport chain. */
max_unitid = next_unitid = min_unitid;
do {
u8 pos;
u16 flags, ctrl;
unsigned int count, static_count;
last_unitid = next_unitid;
/* Wait until the link initialization is complete. */
do {
ctrl = pci_read_config16(prev.dev,
prev.pos + prev.ctrl_off);
/* End of chain? */
if (ctrl & (1 << 6))
goto end_of_chain;
if (ctrl & ((1 << 4) | (1 << 8))) {
/*
* Either the link has failed, or we have a CRC
* error. Sometimes this can happen due to link
* retrain, so lets knock it down and see if
* it's transient.
*/
ctrl |= ((1 << 4) | (1 <<8)); // Link fail + CRC
pci_write_config16(prev.dev,
prev.pos + prev.ctrl_off, ctrl);
ctrl = pci_read_config16(prev.dev,
prev.pos + prev.ctrl_off);
if (ctrl & ((1 << 4) | (1 << 8))) {
printk(BIOS_ALERT, "Detected error on "
"hypertransport link\n");
goto end_of_chain;
}
}
} while ((ctrl & (1 << 5)) == 0);
/* Get and setup the device_structure. */
dev = ht_scan_get_devs(&old_devices);
/* See if a device is present and setup the device structure. */
dev = pci_probe_dev(dev, bus, 0);
if (!dev || !dev->enabled)
break;
/* Find the hypertransport link capability. */
pos = ht_lookup_slave_capability(dev);
if (pos == 0) {
printk(BIOS_ERR, "%s Hypertransport link capability "
"not found", dev_path(dev));
break;
}
/* Update the unitid of the current device. */
flags = pci_read_config16(dev, pos + PCI_CAP_FLAGS);
/*
* If the device has a unitid set and is at devfn 0 we are
* done. This can happen with shadow hypertransport devices,
* or if we have reached the bottom of a HT device chain.
*/
if (flags & 0x1f)
break;
flags &= ~0x1f; /* Mask out base Unit ID. */
count = (flags >> 5) & 0x1f; /* Het unit count. */
#if CONFIG_HT_CHAIN_END_UNITID_BASE != 0x20
if (offset_unitid) {
/* max_devfn will be (0x17<<3)|7 or (0x1f<<3)|7. */
if (next_unitid > (max_devfn >> 3)) {
if (!end_used) {
next_unitid =
CONFIG_HT_CHAIN_END_UNITID_BASE;
end_used = 1;
} else {
goto end_of_chain;
}
}
}
#endif
flags |= next_unitid & 0x1f;
pci_write_config16(dev, pos + PCI_CAP_FLAGS, flags);
/* Update the unitid in the device structure. */
static_count = 1;
for (func = dev; func; func = func->sibling) {
func->path.pci.devfn += (next_unitid << 3);
static_count = (func->path.pci.devfn >> 3)
- (dev->path.pci.devfn >> 3) + 1;
last_func = func;
}
/* Compute the number of unitids consumed. */
printk(BIOS_SPEW, "%s count: %04x static_count: %04x\n",
dev_path(dev), count, static_count);
if (count < static_count)
count = static_count;
/* Update the unitid of the next device. */
ht_unitid_base[ht_dev_num] = next_unitid;
ht_dev_num++;
#if CONFIG_HT_CHAIN_END_UNITID_BASE != 0x20
if (offset_unitid) {
real_last_pos = pos;
real_last_unitid = next_unitid;
real_last_dev = dev;
}
#endif
next_unitid += count;
if (next_unitid > max_unitid)
max_unitid = next_unitid;
/* Setup the hypertransport link. */
bus->reset_needed |= ht_setup_link(&prev, dev, pos);
printk(BIOS_DEBUG, "%s [%04x/%04x] %s next_unitid: %04x\n",
dev_path(dev), dev->vendor, dev->device,
(dev->enabled? "enabled" : "disabled"), next_unitid);
} while (last_unitid != next_unitid);
end_of_chain:
#if CONFIG_HT_CHAIN_END_UNITID_BASE != 0x20
if (offset_unitid && (ht_dev_num > 1)
&& (real_last_unitid != CONFIG_HT_CHAIN_END_UNITID_BASE)
&& !end_used) {
u16 flags;
flags = pci_read_config16(real_last_dev,
real_last_pos + PCI_CAP_FLAGS);
flags &= ~0x1f;
flags |= CONFIG_HT_CHAIN_END_UNITID_BASE & 0x1f;
pci_write_config16(real_last_dev,
real_last_pos + PCI_CAP_FLAGS, flags);
for (func = real_last_dev; func; func = func->sibling) {
func->path.pci.devfn -= ((real_last_unitid
- CONFIG_HT_CHAIN_END_UNITID_BASE) << 3);
last_func = func;
}
/* Update last one. */
ht_unitid_base[ht_dev_num-1] = CONFIG_HT_CHAIN_END_UNITID_BASE;
printk(BIOS_DEBUG, " unitid: %04x --> %04x\n",
real_last_unitid, CONFIG_HT_CHAIN_END_UNITID_BASE);
}
#endif
next_unitid = max_unitid;
if (next_unitid > 0x20)
next_unitid = 0x20;
if ((bus->secondary == 0) && (next_unitid > 0x18))
next_unitid = 0x18; /* Avoid K8 on bus 0. */
/*
* Die if any leftover static devices are are found. There's probably
* a problem in devicetree.cb.
*/
if (old_devices) {
struct device *left;
for (left = old_devices; left; left = left->sibling)
printk(BIOS_DEBUG, "%s\n", dev_path(left));
printk(BIOS_ERR, "HT: Leftover static devices. "
"Check your devicetree.cb\n");
/*
* Put back the leftover static device, and let pci_scan_bus()
* disable it.
*/
if (last_func && !last_func->sibling)
last_func->sibling = old_devices;
}
return next_unitid;
}
/**
* Scan a PCI bridge and the buses behind the bridge.
*
* Determine the existence of buses behind the bridge. Set up the bridge
* according to the result of the scan.
*
* This function is the default scan_bus() method for PCI bridge devices.
*
* @param bus TODO
* @param min_devfn TODO
* @param max_devfn TODO
*/
static void hypertransport_scan_chain_x(struct bus *bus,
unsigned int min_devfn, unsigned int max_devfn)
{
unsigned int ht_unitid_base[4];
unsigned int offset_unitid = 1;
unsigned int next_unitid = do_hypertransport_scan_chain(bus, min_devfn, max_devfn,
ht_unitid_base, offset_unitid);
/* Now that nothing is overlapping it is safe to scan the children. */
pci_scan_bus(bus, 0x00, ((next_unitid - 1) << 3) | 7);
}
static void ht_scan_bridge(struct device *dev)
{
do_pci_scan_bridge(dev, hypertransport_scan_chain_x);
}
/** Default device operations for hypertransport bridges */
static struct pci_operations ht_bus_ops_pci = {
.set_subsystem = 0,
};
struct device_operations default_ht_ops_bus = {
.read_resources = pci_bus_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_bus_enable_resources,
.scan_bus = ht_scan_bridge,
.reset_bus = pci_bus_reset,
.ops_pci = &ht_bus_ops_pci,
};

View File

@@ -19,7 +19,6 @@
#include <device/pci_ids.h>
#include <device/pcix.h>
#include <device/pciexp.h>
#include <device/hypertransport.h>
#include <pc80/i8259.h>
#include <security/vboot/vbnv.h>
#include <timestamp.h>
@@ -862,19 +861,6 @@ static struct device_operations *get_pci_bridge_ops(struct device *dev)
return &default_pcix_ops_bus;
}
#endif
#if CONFIG(HYPERTRANSPORT_PLUGIN_SUPPORT)
unsigned int htpos = 0;
while ((htpos = pci_find_next_capability(dev, PCI_CAP_ID_HT, htpos))) {
u16 flags;
flags = pci_read_config16(dev, htpos + PCI_CAP_FLAGS);
if ((flags >> 13) == 1) {
/* Host or Secondary Interface */
printk(BIOS_DEBUG, "%s subordinate bus HT\n",
dev_path(dev));
return &default_ht_ops_bus;
}
}
#endif
#if CONFIG(PCIEXP_PLUGIN_SUPPORT)
unsigned int pciexpos;
pciexpos = pci_find_capability(dev, PCI_CAP_ID_PCIE);

View File

@@ -32,7 +32,7 @@ int ast_crtc_do_set_base(struct drm_crtc *crtc)
return -ENOMEM;
}
fb->mmio_addr = (u32)res2mmio(res, 4095, 4095);
fb->mmio_addr = (uintptr_t)res2mmio(res, 4095, 4095);
ast_set_offset_reg(crtc);
ast_set_start_address_crt1(ast, fb->mmio_addr);
@@ -230,7 +230,7 @@ int ast_driver_framebuffer_init(struct drm_device *dev, int flags)
set_vbe_mode_info_valid(&edid, fb.mmio_addr);
/* Clear display */
memset((void *)fb.mmio_addr, 0, edid.bytes_per_line * edid.y_resolution);
memset((void *)(uintptr_t)fb.mmio_addr, 0, edid.bytes_per_line * edid.y_resolution);
return 0;
}

View File

@@ -72,6 +72,7 @@ void i2c_generic_fill_ssdt(const struct device *dev,
if (config->cid)
acpigen_write_name_string("_CID", config->cid);
acpigen_write_name_integer("_UID", config->uid);
if (config->desc)
acpigen_write_name_string("_DDN", config->desc);
acpigen_write_STA(acpi_device_status(dev));

View File

@@ -28,6 +28,10 @@ static void i2c_hid_fill_ssdt_generator(const struct device *dev)
static const char *i2c_hid_acpi_name(const struct device *dev)
{
static char name[5];
struct drivers_i2c_hid_config *config = dev->chip_info;
if (config->generic.name)
return config->generic.name;
snprintf(name, sizeof(name), "H%03.3X", dev->path.i2c.device);
name[4] = '\0';
return name;

View File

@@ -0,0 +1,6 @@
config DRIVERS_I2C_SX9324
bool
default n
depends on HAVE_ACPI_TABLES
help
Board has a Semtech SX9324 proximity sensor.

View File

@@ -0,0 +1 @@
ramstage-$(CONFIG_DRIVERS_I2C_SX9324) += sx9324.c

View File

@@ -0,0 +1,31 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef __DRIVERS_I2C_SX9324_CHIP_H__
#define __DRIVERS_I2C_SX9324_CHIP_H__
#include <acpi/acpi_device.h>
#include <device/i2c_simple.h>
#define REGISTER(NAME) uint8_t NAME
struct drivers_i2c_sx9324_config {
/* Device Description */
const char *desc;
/* ACPI _UID */
unsigned int uid;
/* Bus speed in Hz, default is I2C_SPEED_FAST */
enum i2c_speed speed;
/* Use GPIO-based interrupt instead of IO-APIC */
struct acpi_gpio irq_gpio;
/* IO-APIC interrupt */
struct acpi_irq irq;
#include "registers.h"
};
#undef REGISTER
#endif /* __DRIVERS_I2C_SX9324_CHIP_H__ */

View File

@@ -0,0 +1,50 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef REGISTER
#error "define REGISTER(NAME) before including this file"
#endif
REGISTER(reg_gnrl_ctrl0);
REGISTER(reg_gnrl_ctrl1);
REGISTER(reg_afe_ctrl0);
REGISTER(reg_afe_ctrl1);
REGISTER(reg_afe_ctrl2);
REGISTER(reg_afe_ctrl3);
REGISTER(reg_afe_ctrl4);
REGISTER(reg_afe_ctrl5);
REGISTER(reg_afe_ctrl6);
REGISTER(reg_afe_ctrl7);
REGISTER(reg_afe_ctrl8);
REGISTER(reg_afe_ctrl9);
REGISTER(reg_prox_ctrl0);
REGISTER(reg_prox_ctrl1);
REGISTER(reg_prox_ctrl2);
REGISTER(reg_prox_ctrl3);
REGISTER(reg_prox_ctrl4);
REGISTER(reg_prox_ctrl5);
REGISTER(reg_prox_ctrl6);
REGISTER(reg_prox_ctrl7);
REGISTER(reg_adv_ctrl0);
REGISTER(reg_adv_ctrl1);
REGISTER(reg_adv_ctrl2);
REGISTER(reg_adv_ctrl3);
REGISTER(reg_adv_ctrl4);
REGISTER(reg_adv_ctrl5);
REGISTER(reg_adv_ctrl6);
REGISTER(reg_adv_ctrl7);
REGISTER(reg_adv_ctrl8);
REGISTER(reg_adv_ctrl9);
REGISTER(reg_adv_ctrl10);
REGISTER(reg_adv_ctrl11);
REGISTER(reg_adv_ctrl12);
REGISTER(reg_adv_ctrl13);
REGISTER(reg_adv_ctrl14);
REGISTER(reg_adv_ctrl15);
REGISTER(reg_adv_ctrl16);
REGISTER(reg_adv_ctrl17);
REGISTER(reg_adv_ctrl18);
REGISTER(reg_adv_ctrl19);
REGISTER(reg_adv_ctrl20);

View File

@@ -0,0 +1,104 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <acpi/acpi_device.h>
#include <acpi/acpigen.h>
#include <console/console.h>
#include <device/i2c_simple.h>
#include <device/device.h>
#include <device/path.h>
#include <string.h>
#include "chip.h"
#define I2C_SX9324_ACPI_ID "STH9324"
#define I2C_SX9324_CHIP_NAME "Semtech SX9324"
#define REGISTER(NAME) acpi_dp_add_integer(dsd, \
I2C_SX9324_ACPI_ID "," #NAME, \
config->NAME)
static void i2c_sx9324_fill_ssdt(const struct device *dev)
{
struct drivers_i2c_sx9324_config *config = dev->chip_info;
const char *scope = acpi_device_scope(dev);
struct acpi_i2c i2c = {
.address = dev->path.i2c.device,
.mode_10bit = dev->path.i2c.mode_10bit,
.speed = I2C_SPEED_FAST,
.resource = scope,
};
struct acpi_dp *dsd;
if (!scope || !config)
return;
if (config->speed)
i2c.speed = config->speed;
/* Device */
acpigen_write_scope(scope);
acpigen_write_device(acpi_device_name(dev));
acpigen_write_name_string("_HID", I2C_SX9324_ACPI_ID);
acpigen_write_name_integer("_UID", config->uid);
acpigen_write_name_string("_DDN", config->desc);
acpigen_write_STA(acpi_device_status(dev));
/* Resources */
acpigen_write_name("_CRS");
acpigen_write_resourcetemplate_header();
acpi_device_write_i2c(&i2c);
if (config->irq_gpio.pin_count)
acpi_device_write_gpio(&config->irq_gpio);
else
acpi_device_write_interrupt(&config->irq);
acpigen_write_resourcetemplate_footer();
/* DSD */
dsd = acpi_dp_new_table("_DSD");
#include "registers.h"
acpi_dp_write(dsd);
acpigen_pop_len(); /* Device */
acpigen_pop_len(); /* Scope */
printk(BIOS_INFO, "%s: %s at %s\n", acpi_device_path(dev),
config->desc ? : dev->chip_ops->name, dev_path(dev));
}
#undef REGISTER
static const char *i2c_sx9324_acpi_name(const struct device *dev)
{
static char name[5];
snprintf(name, sizeof(name), "SX%02.2X", dev->path.i2c.device);
return name;
}
static struct device_operations i2c_sx9324_ops = {
.read_resources = noop_read_resources,
.set_resources = noop_set_resources,
.acpi_name = i2c_sx9324_acpi_name,
.acpi_fill_ssdt = i2c_sx9324_fill_ssdt,
};
static void i2c_sx9324_enable(struct device *dev)
{
struct drivers_i2c_sx9324_config *config = dev->chip_info;
if (!config) {
dev->enabled = 0;
return;
}
dev->ops = &i2c_sx9324_ops;
if (config->desc)
dev->name = config->desc;
}
struct chip_operations drivers_i2c_sx9324_ops = {
CHIP_NAME(I2C_SX9324_CHIP_NAME)
.enable_dev = i2c_sx9324_enable
};

View File

@@ -0,0 +1,5 @@
config DRIVERS_I2C_TAS5825M
bool
default n
help
Enable support for TI TAS5825M Amplifier.

View File

@@ -0,0 +1 @@
ramstage-$(CONFIG_DRIVERS_I2C_TAS5825M) += tas5825m.c

View File

@@ -0,0 +1,6 @@
/* SPDX-License-Identifier: GPL-2.0-only */
struct drivers_i2c_tas5825m_config {
// Used to uniquely identify the AMP
int id;
};

View File

@@ -0,0 +1,72 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <console/console.h>
#include <device/smbus.h>
#include <device/pci.h>
#include "chip.h"
#include "tas5825m.h"
int tas5825m_write_at(struct device *dev, uint8_t addr, uint8_t value) {
return smbus_write_byte(dev, addr, value);
}
//TODO: use I2C block write for better performance
int tas5825m_write_block_at(struct device *dev, uint8_t addr, const uint8_t * values, uint8_t length) {
int res = 0;
for (uint8_t i = 0; i < length; i++) {
res = smbus_write_byte(dev, addr + i, values[i]);
if (res < 0) return res;
}
return (int)length;
}
int tas5825m_set_page(struct device *dev, uint8_t page) {
return tas5825m_write_at(dev, 0x00, page);
}
int tas5825m_set_book(struct device *dev, uint8_t book) {
int res = tas5825m_set_page(dev, 0x00);
if (res < 0) return res;
return tas5825m_write_at(dev, 0x7F, book);
}
__weak int tas5825m_setup(struct device *dev, int id) {
printk(BIOS_ERR, "tas5825m: setup not implemented\n");
return -1;
}
static void tas5825m_init(struct device *dev) {
if (dev->enabled && dev->path.type == DEVICE_PATH_I2C &&
ops_smbus_bus(get_pbus_smbus(dev))) {
printk(BIOS_DEBUG, "tas5825m at %s\n", dev_path(dev));
struct drivers_i2c_tas5825m_config *config = dev->chip_info;
if (config) {
printk(BIOS_DEBUG, "tas5825m id %d\n", config->id);
int res = tas5825m_setup(dev, config->id);
if (res) {
printk(BIOS_ERR, "tas5825m init failed: %d\n", res);
} else {
printk(BIOS_DEBUG, "tas5825m init successful\n");
}
} else {
printk(BIOS_ERR, "tas5825m: failed to find config\n");
}
}
}
static struct device_operations tas5825m_operations = {
.read_resources = noop_read_resources,
.set_resources = noop_set_resources,
.init = tas5825m_init,
};
static void tas5825m_enable_dev(struct device *dev) {
dev->ops = &tas5825m_operations;
}
struct chip_operations drivers_i2c_tas5825m_ops = {
CHIP_NAME("TI TAS5825M Amplifier")
.enable_dev = tas5825m_enable_dev,
};

View File

@@ -0,0 +1,12 @@
#ifndef TAS5825M_H
#define TAS5825M_H
#include <device/device.h>
int tas5825m_write_at(struct device *dev, uint8_t addr, uint8_t value);
int tas5825m_write_block_at(struct device *dev, uint8_t addr, const uint8_t * values, uint8_t length);
int tas5825m_set_page(struct device *dev, uint8_t page);
int tas5825m_set_book(struct device *dev, uint8_t book);
int tas5825m_setup(struct device *dev, int id);
#endif // TAS5825M_H

View File

@@ -9,6 +9,7 @@ verstage-$(CONFIG_VBOOT_SEPARATE_VERSTAGE) += verstage.c
bootblock-$(CONFIG_USE_GENERIC_FSP_CAR_INC) += cache_as_ram.S
bootblock-y += fsp_util.c
bootblock-y += ../../../cpu/intel/microcode/microcode_asm.S
bootblock-y += fsp_report.c
romstage-y += car.c
romstage-y += fsp_util.c

View File

@@ -145,16 +145,28 @@ CAR_init_done:
* mm1: high 32-bits of TSC value
*/
/* coreboot assumes stack/heap region will be zero */
/*
* temp_memory_start/end reside in the .bss section, which gets cleared
* below. Save the FSP return value to the stack before writing those
* variables.
*/
push %ecx
push %edx
/* clear .bss section */
cld
movl %ecx, %edi
neg %ecx
/* Clear up to Temp Ram top. */
add %edx, %ecx
xor %eax, %eax
movl $(_ebss), %ecx
movl $(_bss), %edi
sub %edi, %ecx
shrl $2, %ecx
xorl %eax, %eax
rep stosl
pop %edx
movl %edx, temp_memory_end
pop %ecx
movl %ecx, temp_memory_start
/* Need to align stack to 16 bytes at call instruction. Account for
the pushes below. */
andl $0xfffffff0, %esp

View File

@@ -0,0 +1,27 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <arch/symbols.h>
#include <console/console.h>
#include <fsp/util.h>
/* filled in assembly after FSP-T ran */
uintptr_t temp_memory_start;
uintptr_t temp_memory_end;
void report_fsp_output(void)
{
const struct region fsp_car_region = {
.offset = temp_memory_start,
.size = temp_memory_end - temp_memory_start,
};
const struct region coreboot_car_region = {
.offset = (uintptr_t)_car_region_start,
.size = (uintptr_t)_car_region_size,
};
printk(BIOS_DEBUG, "FSP: reported temp_mem region: [0x%08lx,0x%08lx)\n",
temp_memory_start, temp_memory_end);
if (!region_is_subregion(&fsp_car_region, &coreboot_car_region)) {
printk(BIOS_ERR, "Wrong CAR region used!\n");
printk(BIOS_ERR, "Adapt DCACHE_RAM_BASE and DCACHE_RAM_SIZE to match FSP-T\n");
}
}

View File

@@ -31,6 +31,7 @@ void *get_next_resource_hob(const EFI_GUID *guid, const void *hob_start);
void *get_first_resource_hob(const EFI_GUID *guid);
void fsp_display_upd_value(const char *name, uint32_t size, uint64_t old,
uint64_t new);
void report_fsp_output(void);
/* Return version of FSP associated with fih. */
static inline uint32_t fsp_version(FSP_INFO_HEADER *fih)

View File

@@ -41,6 +41,7 @@ config HAVE_INTEL_FSP_REPO
config FSP_USE_REPO
bool "Use binaries of the Intel FSP repository on GitHub"
depends on HAVE_INTEL_FSP_REPO
select FSP_FULL_FD
default y
help
Select this option to use the default FSP headers and binaries
@@ -55,13 +56,6 @@ config FSP_HEADER_PATH
help
Include directory with the FSP ABI header files.
config FSP_FD_PATH
string
depends on FSP_USE_REPO
help
Path to the FSP FD file that contains the individual FSP-T, FSP-M
and FSP-S binaries.
config ADD_FSP_BINARIES
bool "Add Intel FSP 2.0 binaries to CBFS" if !FSP_USE_REPO
default y if FSP_USE_REPO
@@ -81,25 +75,38 @@ config FSP_M_CBFS
string "Name of FSP-M in CBFS"
default "fspm.bin"
config FSP_FULL_FD
bool "Use a combined FSP FD file" if !FSP_USE_REPO
depends on ADD_FSP_BINARIES
help
Use a combined FSP FD file instead of specifying individual, already split
binaries and split the file at build-time.
config FSP_FD_PATH
string "Location of FSP FD file" if FSP_FULL_FD && !FSP_USE_REPO
help
Path to the FSP FD file that contains the individual FSP-T, FSP-M
and FSP-S binaries. The file gets split at build-time.
config FSP_T_FILE
string "Intel FSP-T (temp RAM init) binary path and filename" if !FSP_USE_REPO
string "Intel FSP-T (temp RAM init) binary path and filename" if !FSP_FULL_FD
depends on ADD_FSP_BINARIES
depends on FSP_CAR
default "\$(obj)/Fsp_T.fd" if FSP_USE_REPO
default "\$(obj)/Fsp_T.fd" if FSP_FULL_FD
help
The path and filename of the Intel FSP-T binary for this platform.
config FSP_M_FILE
string "Intel FSP-M (memory init) binary path and filename" if !FSP_USE_REPO
string "Intel FSP-M (memory init) binary path and filename" if !FSP_FULL_FD
depends on ADD_FSP_BINARIES
default "\$(obj)/Fsp_M.fd" if FSP_USE_REPO
default "\$(obj)/Fsp_M.fd" if FSP_FULL_FD
help
The path and filename of the Intel FSP-M binary for this platform.
config FSP_S_FILE
string "Intel FSP-S (silicon init) binary path and filename" if !FSP_USE_REPO
string "Intel FSP-S (silicon init) binary path and filename" if !FSP_FULL_FD
depends on ADD_FSP_BINARIES
default "\$(obj)/Fsp_S.fd" if FSP_USE_REPO
default "\$(obj)/Fsp_S.fd" if FSP_FULL_FD
help
The path and filename of the Intel FSP-S binary for this platform.

View File

@@ -72,7 +72,7 @@ ifeq ($(CONFIG_FSP_COMPRESS_FSP_S_LZ4),y)
$(FSP_S_CBFS)-compression := LZ4
endif
ifeq ($(CONFIG_FSP_USE_REPO),y)
ifeq ($(CONFIG_FSP_FULL_FD),y)
$(obj)/Fsp_M.fd: $(call strip_quotes,$(CONFIG_FSP_FD_PATH))
python2 3rdparty/fsp/Tools/SplitFspBin.py split -f $(CONFIG_FSP_FD_PATH) -o "$(obj)" -n "Fsp.fd"

View File

@@ -5,15 +5,7 @@
void fsp_print_header_info(const struct fsp_header *hdr)
{
union {
uint32_t val;
struct {
uint8_t bld_num;
uint8_t revision;
uint8_t minor;
uint8_t major;
} rev;
} revision;
union fsp_revision revision;
revision.val = hdr->fsp_revision;

View File

@@ -42,6 +42,16 @@ struct hob_resource {
uint64_t length;
} __packed;
union fsp_revision {
uint32_t val;
struct {
uint8_t bld_num;
uint8_t revision;
uint8_t minor;
uint8_t major;
} rev;
};
#if CONFIG_UDK_VERSION < CONFIG_UDK_2017_VERSION
enum resource_type {
EFI_RESOURCE_SYSTEM_MEMORY = 0,
@@ -90,6 +100,7 @@ void fsp_find_bootloader_tolum(struct range_entry *re);
void fsp_get_version(char *buf);
void lb_string_platform_blob_version(struct lb_header *header);
void report_fspt_output(void);
void soc_validate_fsp_version(const struct fsp_header *hdr);
/* Fill in header and validate sanity of component within region device. */
enum cb_err fsp_validate_component(struct fsp_header *hdr,

View File

@@ -57,7 +57,7 @@ static void fsp_notify(enum fsp_notify_phase phase)
static void fsp_notify_dummy(void *arg)
{
enum fsp_notify_phase phase = (uint32_t)arg;
enum fsp_notify_phase phase = (uint32_t)(uintptr_t)arg;
display_mtrrs();

View File

@@ -85,6 +85,9 @@ enum cb_err fsp_validate_component(struct fsp_header *hdr,
return CB_ERR;
}
if (ENV_ROMSTAGE)
soc_validate_fsp_version(hdr);
return CB_SUCCESS;
}
@@ -213,15 +216,7 @@ enum cb_err fsp_load_component(struct fsp_load_descriptor *fspld, struct fsp_hea
void fsp_get_version(char *buf)
{
struct fsp_header *hdr = &fsps_hdr;
union {
uint32_t val;
struct {
uint8_t bld_num;
uint8_t revision;
uint8_t minor;
uint8_t major;
} rev;
} revision;
union fsp_revision revision;
revision.val = hdr->fsp_revision;
snprintf(buf, FSP_VER_LEN, "%u.%u-%u.%u.%u.%u", (hdr->spec_version >> 4),
@@ -243,3 +238,7 @@ void lb_string_platform_blob_version(struct lb_header *header)
rec->size = ALIGN_UP(sizeof(*rec) + len + 1, 8);
memcpy(rec->string, fsp_version, len+1);
}
__weak void soc_validate_fsp_version(const struct fsp_header *hdr)
{
}

View File

@@ -148,7 +148,7 @@
{
If (LEqual(^BOX3.XBCM (Arg0), Ones))
{
^LEGA.XBCM (Arg0)
//TODO: fix Windows initial setup ^LEGA.XBCM (Arg0)
}
}

View File

@@ -206,17 +206,17 @@ static void init(struct device *dev)
return;
}
static void set_resources(struct device *dev)
static void enable_bus_master(struct device *dev)
{
pci_dev_set_resources(dev);
dev->command |= PCI_COMMAND_MASTER;
pci_or_config16(dev, PCI_COMMAND, PCI_COMMAND_MASTER);
}
static struct device_operations i210_ops = {
.read_resources = pci_dev_read_resources,
.set_resources = set_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = pci_dev_enable_resources,
.init = init,
.final = enable_bus_master,
};
static const unsigned short i210_device_ids[] = { 0x1537, 0x1538, 0x1533, 0 };

View File

@@ -27,9 +27,10 @@
#define I210_CHECKSUM_ERROR 0x00000010
#define I210_FLASH_UPDATE_ERROR 0x00000020
#define MAC_ADDR_LEN 6
/* We need one function we can call to get a MAC address to use */
/* This function can be coded somewhere else but must exist. */
extern enum cb_err mainboard_get_mac_address(struct device *dev,
uint8_t mac[6]);
extern enum cb_err mainboard_get_mac_address(struct device *dev, uint8_t mac[MAC_ADDR_LEN]);
#endif /* _INTEL_I210_H_ */

View File

@@ -21,13 +21,11 @@
#include <console/console.h>
#include <security/tpm/tis.h>
#include <device/pnp.h>
#include <drivers/tpm/tpm_ppi.h>
#include "chip.h"
#define PREFIX "lpc_tpm: "
/* TCG Physical Presence Interface */
#define TPM_PPI_UUID "3dddfaa6-361b-4eb4-a424-8d10089d1653"
/* TCG Memory Clear Interface */
#define TPM_MCI_UUID "376054ed-cc13-4675-901c-4756d7f2d45d"
/* coreboot wrapper for TPM driver (start) */
#define TPM_DEBUG(fmt, args...) \
if (CONFIG(DEBUG_TPM)) { \
@@ -777,104 +775,9 @@ static void lpc_tpm_set_resources(struct device *dev)
}
#if CONFIG(HAVE_ACPI_TABLES)
static void tpm_ppi_func0_cb(void *arg)
{
/* Functions 1-8. */
u8 buf[] = {0xff, 0x01};
acpigen_write_return_byte_buffer(buf, 2);
}
static void tpm_ppi_func1_cb(void *arg)
{
if (CONFIG(TPM2))
/* Interface version: 2.0 */
acpigen_write_return_string("2.0");
else
/* Interface version: 1.2 */
acpigen_write_return_string("1.2");
}
static void tpm_ppi_func2_cb(void *arg)
{
/* Submit operations: drop on the floor and return success. */
acpigen_write_return_byte(0);
}
static void tpm_ppi_func3_cb(void *arg)
{
/* Pending operation: none. */
acpigen_emit_byte(RETURN_OP);
acpigen_write_package(2);
acpigen_write_byte(0);
acpigen_write_byte(0);
acpigen_pop_len();
}
static void tpm_ppi_func4_cb(void *arg)
{
/* Pre-OS transition method: reboot. */
acpigen_write_return_byte(2);
}
static void tpm_ppi_func5_cb(void *arg)
{
/* Operation response: no operation executed. */
acpigen_emit_byte(RETURN_OP);
acpigen_write_package(3);
acpigen_write_byte(0);
acpigen_write_byte(0);
acpigen_write_byte(0);
acpigen_pop_len();
}
static void tpm_ppi_func6_cb(void *arg)
{
/*
* Set preferred user language: deprecated and must return 3 aka
* "not implemented".
*/
acpigen_write_return_byte(3);
}
static void tpm_ppi_func7_cb(void *arg)
{
/* Submit operations: deny. */
acpigen_write_return_byte(3);
}
static void tpm_ppi_func8_cb(void *arg)
{
/* All actions are forbidden. */
acpigen_write_return_byte(1);
}
static void (*tpm_ppi_callbacks[])(void *) = {
tpm_ppi_func0_cb,
tpm_ppi_func1_cb,
tpm_ppi_func2_cb,
tpm_ppi_func3_cb,
tpm_ppi_func4_cb,
tpm_ppi_func5_cb,
tpm_ppi_func6_cb,
tpm_ppi_func7_cb,
tpm_ppi_func8_cb,
};
static void tpm_mci_func0_cb(void *arg)
{
/* Function 1. */
acpigen_write_return_singleton_buffer(0x3);
}
static void tpm_mci_func1_cb(void *arg)
{
/* Just return success. */
acpigen_write_return_byte(0);
}
static void (*tpm_mci_callbacks[])(void *) = {
tpm_mci_func0_cb,
tpm_mci_func1_cb,
};
static void lpc_tpm_fill_ssdt(const struct device *dev)
{
const char *path = acpi_device_path(dev->bus->dev);
u32 arg;
if (!path) {
path = "\\_SB_.PCI0.LPCB";
@@ -938,31 +841,12 @@ static void lpc_tpm_fill_ssdt(const struct device *dev)
acpi_device_write_interrupt(&tpm_irq);
}
acpigen_write_resourcetemplate_footer();
if (!CONFIG(CHROMEOS)) {
/*
* _DSM method
*/
struct dsm_uuid ids[] = {
/* Physical presence interface.
* This is used to submit commands like "Clear TPM" to
* be run at next reboot provided that user confirms
* them. Spec allows user to cancel all commands and/or
* configure BIOS to reject commands. So we pretend that
* user did just this: cancelled everything. If user
* really wants to clear TPM the only option now is to
* do it manually in payload.
*/
DSM_UUID(TPM_PPI_UUID, &tpm_ppi_callbacks[0],
ARRAY_SIZE(tpm_ppi_callbacks), (void *) &arg),
/* Memory clearing on boot: just a dummy. */
DSM_UUID(TPM_MCI_UUID, &tpm_mci_callbacks[0],
ARRAY_SIZE(tpm_mci_callbacks), (void *) &arg),
};
if (!CONFIG(CHROMEOS))
tpm_ppi_acpi_fill_ssdt(dev);
acpigen_write_dsm_uuid_arr(ids, ARRAY_SIZE(ids));
}
acpigen_pop_len(); /* Device */
acpigen_pop_len(); /* Scope */

View File

@@ -0,0 +1,12 @@
config DRIVERS_SYSTEM76_DGPU
bool
default n
help
System76 switchable graphics support
#TODO: make this cleaner, use device tree?
config DRIVERS_SYSTEM76_DGPU_DEVICE
hex
default 0x01
help
System76 switchable graphics root device number

View File

@@ -0,0 +1,3 @@
# SPDX-License-Identifier: GPL-2.0-only
ramstage-$(CONFIG_DRIVERS_SYSTEM76_DGPU) += ramstage.c

View File

@@ -0,0 +1,201 @@
/* SPDX-License-Identifier: GPL-2.0-only */
Device (\_SB.PCI0.PEGP) {
Name (_ADR, CONFIG_DRIVERS_SYSTEM76_DGPU_DEVICE << 16)
PowerResource (PWRR, 0, 0) {
Name (_STA, 1)
Method (_ON) {
Debug = "PEGP.PWRR._ON"
If (_STA != 1) {
\_SB.PCI0.PEGP.DEV0._ON ()
_STA = 1
}
}
Method (_OFF) {
Debug = "PEGP.PWRR._OFF"
If (_STA != 0) {
\_SB.PCI0.PEGP.DEV0._OFF ()
_STA = 0
}
}
}
Name (_PR0, Package () { \_SB.PCI0.PEGP.PWRR })
Name (_PR2, Package () { \_SB.PCI0.PEGP.PWRR })
Name (_PR3, Package () { \_SB.PCI0.PEGP.PWRR })
}
Device (\_SB.PCI0.PEGP.DEV0) {
Name(_ADR, 0x00000000)
Name (_STA, 0xF)
Name (LTRE, 0)
// Memory mapped PCI express registers
// Not sure what this stuff is, but it is used to get into GC6
OperationRegion (RPCX, SystemMemory, CONFIG_MMCONF_BASE_ADDRESS + 0x8000, 0x1000)
Field (RPCX, ByteAcc, NoLock, Preserve) {
PVID, 16,
PDID, 16,
CMDR, 8,
Offset (0x19),
PRBN, 8,
Offset (0x84),
D0ST, 2,
Offset (0xAA),
CEDR, 1,
Offset (0xAC),
, 4,
CMLW, 6,
Offset (0xB0),
ASPM, 2,
, 2,
P0LD, 1,
RTLK, 1,
Offset (0xC9),
, 2,
LREN, 1,
Offset (0x11A),
, 1,
VCNP, 1,
Offset (0x214),
Offset (0x216),
P0LS, 4,
Offset (0x248),
, 7,
Q0L2, 1,
Q0L0, 1,
Offset (0x504),
Offset (0x506),
PCFG, 2,
Offset (0x508),
TREN, 1,
Offset (0xC20),
, 4,
P0AP, 2,
Offset (0xC38),
, 3,
P0RM, 1,
Offset (0xC74),
P0LT, 4,
Offset (0xD0C),
, 20,
LREV, 1
}
Method (_ON) {
Debug = "PEGP.DEV0._ON"
If (_STA != 0xF) {
Debug = " If DGPU_PWR_EN low"
If (! GTXS (DGPU_PWR_EN)) {
Debug = " DGPU_PWR_EN high"
STXS (DGPU_PWR_EN)
Debug = " Sleep 16"
Sleep (16)
}
Debug = " DGPU_RST_N high"
STXS(DGPU_RST_N)
Debug = " Sleep 10"
Sleep (10)
Debug = " Q0L0 = 1"
Q0L0 = 1
Debug = " Sleep 16"
Sleep (16)
Debug = " While Q0L0"
Local0 = 0
While (Q0L0) {
If ((Local0 > 4)) {
Debug = " While Q0L0 timeout"
Break
}
Sleep (16)
Local0++
}
Debug = " P0RM = 0"
P0RM = 0
Debug = " P0AP = 0"
P0AP = 0
Debug = Concatenate(" LREN = ", ToHexString(LTRE))
LREN = LTRE
Debug = " CEDR = 1"
CEDR = 1
Debug = " CMDR |= 7"
CMDR |= 7
Debug = " _STA = 0xF"
_STA = 0xF
}
}
Method (_OFF) {
Debug = "PEGP.DEV0._OFF"
If (_STA != 0x5) {
Debug = Concatenate(" LTRE = ", ToHexString(LREN))
LTRE = LREN
Debug = " Q0L2 = 1"
Q0L2 = 1
Debug = " Sleep 16"
Sleep (16)
Debug = " While Q0L2"
Local0 = Zero
While (Q0L2) {
If ((Local0 > 4)) {
Debug = " While Q0L2 timeout"
Break
}
Sleep (16)
Local0++
}
Debug = " P0RM = 1"
P0RM = 1
Debug = " P0AP = 3"
P0AP = 3
Debug = " Sleep 10"
Sleep (10)
Debug = " DGPU_RST_N low"
CTXS(DGPU_RST_N)
Debug = " While DGPU_GC6 low"
Local0 = Zero
While (! GRXS(DGPU_GC6)) {
If ((Local0 > 4)) {
Debug = " While DGPU_GC6 low timeout"
Debug = " DGPU_PWR_EN low"
CTXS (DGPU_PWR_EN)
Break
}
Sleep (16)
Local0++
}
Debug = " _STA = 0x5"
_STA = 0x5
}
}
}

View File

@@ -0,0 +1,23 @@
/* SPDX-License-Identifier: GPL-2.0-only */
//TODO: do not require this to be included in mainboard bootblock.c
#include <console/console.h>
#include <delay.h>
#include <gpio.h>
static void dgpu_power_enable(int onoff) {
printk(BIOS_DEBUG, "system76: DGPU power %d\n", onoff);
if (onoff) {
gpio_set(DGPU_RST_N, 0);
mdelay(4);
gpio_set(DGPU_PWR_EN, 1);
mdelay(4);
gpio_set(DGPU_RST_N, 1);
} else {
gpio_set(DGPU_RST_N, 0);
mdelay(4);
gpio_set(DGPU_PWR_EN, 0);
}
mdelay(50);
}

View File

@@ -0,0 +1,81 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <bootstate.h>
#include <console/console.h>
#include <device/pci.h>
static void dgpu_read_resources(struct device *dev) {
printk(BIOS_INFO, "system76: dgpu_read_resources %s\n", dev_path(dev));
pci_dev_read_resources(dev);
int bar;
// Find all BARs on DGPU, mark them above 4g if prefetchable
for (bar = PCI_BASE_ADDRESS_0; bar <= PCI_BASE_ADDRESS_5; bar += 4) {
printk(BIOS_INFO, " BAR at 0x%02x\n", bar);
struct resource *res;
res = probe_resource(dev, bar);
if (res) {
if (res->flags & IORESOURCE_PREFETCH) {
printk(BIOS_INFO, " marked above 4g\n");
res->flags |= IORESOURCE_ABOVE_4G;
} else {
printk(BIOS_INFO, " not prefetch\n");
}
} else {
printk(BIOS_INFO, " not found\n");
}
}
}
static void dgpu_enable_resources(struct device *dev) {
printk(BIOS_INFO, "system76: dgpu_enable_resources %s\n", dev_path(dev));
dev->subsystem_vendor = CONFIG_SUBSYSTEM_VENDOR_ID;
dev->subsystem_device = CONFIG_SUBSYSTEM_DEVICE_ID;
printk(BIOS_INFO, " subsystem <- %04x/%04x\n", dev->subsystem_vendor, dev->subsystem_device);
pci_write_config32(dev, 0x40, ((dev->subsystem_device & 0xffff) << 16) | (dev->subsystem_vendor & 0xffff));
pci_dev_enable_resources(dev);
}
static struct device_operations dgpu_pci_ops_dev = {
.read_resources = dgpu_read_resources,
.set_resources = pci_dev_set_resources,
.enable_resources = dgpu_enable_resources,
#if CONFIG(HAVE_ACPI_TABLES)
.write_acpi_tables = pci_rom_write_acpi_tables,
.acpi_fill_ssdt = pci_rom_ssdt,
#endif
.init = pci_dev_init,
.ops_pci = &pci_dev_ops_pci,
};
static void dgpu_above_4g(void *unused) {
struct device *pdev;
// Find PEGP
pdev = pcidev_on_root(CONFIG_DRIVERS_SYSTEM76_DGPU_DEVICE, 0);
if (!pdev) {
printk(BIOS_ERR, "system76: failed to find PEGP\n");
return;
}
printk(BIOS_INFO, "system76: PEGP at %p, %04x:%04x\n", pdev, pdev->vendor, pdev->device);
int fn;
for (fn = 0; fn < 8; fn++) {
struct device *dev;
// Find DGPU functions
dev = pcidev_path_behind(pdev->link_list, PCI_DEVFN(0, fn));
if (dev) {
printk(BIOS_INFO, "system76: DGPU fn %d at %p, %04x:%04x\n", fn, dev, dev->vendor, dev->device);
dev->ops = &dgpu_pci_ops_dev;
} else {
printk(BIOS_ERR, "system76: failed to find DGPU fn %d\n", fn);
}
}
}
BOOT_STATE_INIT_ENTRY(BS_DEV_RESOURCES, BS_ON_ENTRY, dgpu_above_4g, NULL);

View File

@@ -1 +1,3 @@
ramstage-$(CONFIG_TPM_INIT) += tpm.c
ramstage-$(CONFIG_HAVE_ACPI_TABLES) += ppi_stub.c

133
src/drivers/tpm/ppi_stub.c Normal file
View File

@@ -0,0 +1,133 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#include <types.h>
#include <stddef.h>
#include <acpi/acpi.h>
#include <acpi/acpigen.h>
#include <acpi/acpi_device.h>
#include "tpm_ppi.h"
static void tpm_ppi_func0_cb(void *arg)
{
/* Functions 1-8. */
u8 buf[] = {0xff, 0x01};
acpigen_write_return_byte_buffer(buf, sizeof(buf));
}
static void tpm_ppi_func1_cb(void *arg)
{
if (CONFIG(TPM2))
/* Interface version: 2.0 */
acpigen_write_return_string("2.0");
else
/* Interface version: 1.2 */
acpigen_write_return_string("1.2");
}
static void tpm_ppi_func2_cb(void *arg)
{
/* Submit operations: drop on the floor and return success. */
acpigen_write_return_byte(PPI2_RET_SUCCESS);
}
static void tpm_ppi_func3_cb(void *arg)
{
/* Pending operation: none. */
acpigen_emit_byte(RETURN_OP);
acpigen_write_package(2);
acpigen_write_byte(0);
acpigen_write_byte(0);
acpigen_pop_len();
}
static void tpm_ppi_func4_cb(void *arg)
{
/* Pre-OS transition method: reboot. */
acpigen_write_return_byte(2);
}
static void tpm_ppi_func5_cb(void *arg)
{
/* Operation response: no operation executed. */
acpigen_emit_byte(RETURN_OP);
acpigen_write_package(3);
acpigen_write_byte(0);
acpigen_write_byte(0);
acpigen_write_byte(0);
acpigen_pop_len();
}
static void tpm_ppi_func6_cb(void *arg)
{
/*
* Set preferred user language: deprecated and must return 3 AKA
* "not implemented".
*/
acpigen_write_return_byte(PPI6_RET_NOT_IMPLEMENTED);
}
static void tpm_ppi_func7_cb(void *arg)
{
/* Submit operations: deny. */
acpigen_write_return_byte(PPI7_RET_BLOCKED_BY_FIRMWARE);
}
static void tpm_ppi_func8_cb(void *arg)
{
/* All actions are forbidden. */
acpigen_write_return_byte(PPI8_RET_FIRMWARE_ONLY);
}
static void (*tpm_ppi_callbacks[])(void *) = {
tpm_ppi_func0_cb,
tpm_ppi_func1_cb,
tpm_ppi_func2_cb,
tpm_ppi_func3_cb,
tpm_ppi_func4_cb,
tpm_ppi_func5_cb,
tpm_ppi_func6_cb,
tpm_ppi_func7_cb,
tpm_ppi_func8_cb,
};
static void tpm_mci_func0_cb(void *arg)
{
/* Function 1. */
acpigen_write_return_singleton_buffer(0x3);
}
static void tpm_mci_func1_cb(void *arg)
{
/* Just return success. */
acpigen_write_return_byte(0);
}
static void (*tpm_mci_callbacks[])(void *) = {
tpm_mci_func0_cb,
tpm_mci_func1_cb,
};
void tpm_ppi_acpi_fill_ssdt(const struct device *dev)
{
/*
* _DSM method
*/
struct dsm_uuid ids[] = {
/* Physical presence interface.
* This is used to submit commands like "Clear TPM" to
* be run at next reboot provided that user confirms
* them. Spec allows user to cancel all commands and/or
* configure BIOS to reject commands. So we pretend that
* user did just this: cancelled everything. If user
* really wants to clear TPM the only option now is to
* do it manually in payload.
*/
DSM_UUID(TPM_PPI_UUID, tpm_ppi_callbacks,
ARRAY_SIZE(tpm_ppi_callbacks), NULL),
/* Memory clearing on boot: just a dummy. */
DSM_UUID(TPM_MCI_UUID, tpm_mci_callbacks,
ARRAY_SIZE(tpm_mci_callbacks), NULL),
};
acpigen_write_dsm_uuid_arr(ids, ARRAY_SIZE(ids));
}

58
src/drivers/tpm/tpm_ppi.h Normal file
View File

@@ -0,0 +1,58 @@
/* SPDX-License-Identifier: GPL-2.0-only */
#ifndef _TPM_PPI_H_
#define _TPM_PPI_H_
#include <device/device.h>
#if CONFIG(HAVE_ACPI_TABLES)
void tpm_ppi_acpi_fill_ssdt(const struct device *dev);
#else
static inline void tpm_ppi_acpi_fill_ssdt(const struct device *dev)
{
}
#endif
/* Return codes */
/* Function 2 */
#define PPI2_RET_SUCCESS 0
#define PPI2_RET_NOT_SUPPORTED 1
#define PPI2_RET_GENERAL_FAILURE 2
/* Function 3 */
#define PPI3_RET_SUCCESS 0
#define PPI3_RET_GENERAL_FAILURE 1
/* Function 4 */
#define PPI4_RET_NONE 0
#define PPI4_RET_SHUTDOWN 1
#define PPI4_RET_REBOOT 2
#define PPI4_RET_OS_VENDOR_SPECIFIC 3
/* Function 5 */
#define PPI5_RET_SUCCESS 0
#define PPI5_RET_GENERAL_FAILURE 1
/* Function 6 */
#define PPI6_RET_NOT_IMPLEMENTED 3
/* Function 7 */
#define PPI7_RET_SUCCESS 0
#define PPI7_RET_NOT_IMPLEMENTED 1
#define PPI7_RET_GENERAL_FAILURE 2
#define PPI7_RET_BLOCKED_BY_FIRMWARE 3
/* Function 8 */
#define PPI8_RET_NOT_IMPLEMENTED 0
#define PPI8_RET_FIRMWARE_ONLY 1
#define PPI8_RET_BLOCKED_FOR_OS_BY_FW 2
#define PPI8_RET_ALLOWED_WITH_PP 3
#define PPI8_RET_ALLOWED 4
/* TCG Physical Presence Interface */
#define TPM_PPI_UUID "3dddfaa6-361b-4eb4-a424-8d10089d1653"
/* TCG Memory Clear Interface */
#define TPM_MCI_UUID "376054ed-cc13-4675-901c-4756d7f2d45d"
#endif /* _TPM_PPI_H_ */

View File

@@ -12,3 +12,13 @@ config EC_SYSTEM76_EC_COLOR_KEYBOARD
depends on EC_SYSTEM76_EC
bool
default n
config EC_SYSTEM76_EC_DGPU
depends on EC_SYSTEM76_EC
bool
default n
config EC_SYSTEM76_EC_OLED
depends on EC_SYSTEM76_EC
bool
default n

View File

@@ -30,29 +30,29 @@ Device (BAT0)
Name (PBIF, Package (0x0D)
{
One,
0xFFFFFFFF,
0xFFFFFFFF,
One,
0x39D0,
Zero,
Zero,
0x40,
0x40,
"BAT",
"0001",
"LION",
"Notebook"
One, // 0 - Power Unit
0xFFFFFFFF, // 1 - Design Capacity
0xFFFFFFFF, // 2 - Last Full Charge Capacity
One, // 3 - Battery Technology
0xFFFFFFFF, // 4 - Design Voltage
Zero, // 5 - Design Capacity of Warning
Zero, // 6 - Design Capacity of Low
0x40, // 7 - Battery Capacity Granularity 1
0x40, // 8 - Battery Capacity Granularity 2
" ", // 9 - Model Number
" ", // 10 - Serial Number
" ", // 11 - Battery Type
" " // 12 - OEM Information
})
Method (IVBI, 0, NotSerialized)
{
PBIF [One] = 0xFFFFFFFF
PBIF [0x02] = 0xFFFFFFFF
PBIF [0x04] = 0xFFFFFFFF
PBIF [0x09] = " "
PBIF [0x0A] = " "
PBIF [0x0B] = " "
PBIF [0x0C] = " "
PBIF [1] = 0xFFFFFFFF
PBIF [2] = 0xFFFFFFFF
PBIF [4] = 0xFFFFFFFF
PBIF [9] = " "
PBIF [10] = " "
PBIF [11] = " "
PBIF [12] = " "
BFCC = Zero
}
@@ -61,20 +61,20 @@ Device (BAT0)
If (^^PCI0.LPCB.EC0.BAT0)
{
Local0 = (^^PCI0.LPCB.EC0.BDC0 & 0xFFFF)
PBIF [One] = Local0
PBIF [1] = Local0
Local0 = (^^PCI0.LPCB.EC0.BFC0 & 0xFFFF)
PBIF [0x02] = Local0
PBIF [2] = Local0
BFCC = Local0
Local0 = (^^PCI0.LPCB.EC0.BDV0 & 0xFFFF)
PBIF [0x04] = Local0
PBIF [4] = Local0
Local0 = (^^PCI0.LPCB.EC0.BCW0 & 0xFFFF)
PBIF [0x05] = Local0
PBIF [5] = Local0
Local0 = (^^PCI0.LPCB.EC0.BCL0 & 0xFFFF)
PBIF [0x06] = Local0
PBIF [0x09] = "BAT"
PBIF [0x0A] = "0001"
PBIF [0x0B] = "LION"
PBIF [0x0C] = "Notebook"
PBIF [6] = Local0
PBIF [9] = "BAT"
PBIF [10] = "0001"
PBIF [11] = "LION"
PBIF [12] = "Notebook"
}
Else
{
@@ -98,17 +98,17 @@ Device (BAT0)
Name (PBST, Package (0x04)
{
Zero,
0xFFFFFFFF,
0xFFFFFFFF,
0x3D90
Zero, // 0 - Battery state
0xFFFFFFFF, // 1 - Battery present rate
0xFFFFFFFF, // 2 - Battery remaining capacity
0xFFFFFFFF // 3 - Battery present voltage
})
Method (IVBS, 0, NotSerialized)
{
PBST [Zero] = Zero
PBST [One] = 0xFFFFFFFF
PBST [0x02] = 0xFFFFFFFF
PBST [0x03] = 0x2710
PBST [0] = Zero
PBST [1] = 0xFFFFFFFF
PBST [2] = 0xFFFFFFFF
PBST [3] = 0xFFFFFFFF
}
Method (UPBS, 0, NotSerialized)
@@ -139,10 +139,10 @@ Device (BAT0)
Local2 = (^^PCI0.LPCB.EC0.BRC0 & 0xFFFF)
Local3 = (^^PCI0.LPCB.EC0.BPV0 & 0xFFFF)
PBST [Zero] = Local0
PBST [One] = Local1
PBST [0x02] = Local2
PBST [0x03] = Local3
PBST [0] = Local0
PBST [1] = Local1
PBST [2] = Local2
PBST [3] = Local3
If ((BFCC != ^^PCI0.LPCB.EC0.BFC0))
{
Notify (BAT0, 0x81) // Information Change

View File

@@ -62,9 +62,13 @@ Device (\_SB.PCI0.LPCB.EC0)
}
}
Name (S3OS, Zero)
Method (PTS, 1, Serialized) {
Debug = Concatenate("EC: PTS: ", ToHexString(Arg0))
If (ECOK) {
// Save ECOS during sleep
S3OS = ECOS
// Clear wake cause
WFNO = Zero
}
@@ -73,6 +77,9 @@ Device (\_SB.PCI0.LPCB.EC0)
Method (WAK, 1, Serialized) {
Debug = Concatenate("EC: WAK: ", ToHexString(Arg0))
If (ECOK) {
// Restore ECOS after sleep
ECOS = S3OS
// Set current AC state
^^^^AC.ACFG = ADP
@@ -97,6 +104,9 @@ Device (\_SB.PCI0.LPCB.EC0)
Method (_Q0B, 0, NotSerialized) // Screen Toggle
{
Debug = "EC: Screen Toggle"
#if CONFIG(EC_SYSTEM76_EC_OLED)
Notify (^^^^S76D, 0x85)
#endif // CONFIG(EC_SYSTEM76_EC_OLED)
}
Method (_Q0C, 0, NotSerialized) // Mute

View File

@@ -3,168 +3,47 @@
OperationRegion (ERAM, EmbeddedControl, Zero, 0xFF)
Field (ERAM, ByteAcc, Lock, Preserve)
{
NMSG, 8,
SLED, 4,
Offset (0x02),
MODE, 1,
FAN0, 1,
TME0, 1,
TME1, 1,
FAN1, 1,
, 2,
Offset (0x03),
LSTE, 1,
LSW0, 1,
LWKE, 1,
WAKF, 1,
, 2,
PWKE, 1,
MWKE, 1,
AC0, 8,
PSV, 8,
CRT, 8,
TMP, 8,
AC1, 8,
BBST, 8,
Offset (0x0B),
Offset (0x0C),
Offset (0x0D),
Offset (0x0E),
SLPT, 8,
SWEJ, 1,
SWCH, 1,
LSTE, 1, // Lid is open
, 1,
LWKE, 1, // Lid wake
, 5,
Offset (0x07),
TMP1, 8, // CPU temperature
Offset (0x10),
ADP, 1,
AFLT, 1,
BAT0, 1,
BAT1, 1,
, 3,
PWOF, 1,
WFNO, 8,
BPU0, 32,
BDC0, 32,
BFC0, 32,
BTC0, 32,
BDV0, 32,
BST0, 32,
BPR0, 32,
BRC0, 32,
BPV0, 32,
BTP0, 16,
BRS0, 16,
ADP, 1, // AC adapter connected
, 1,
BAT0, 1, // Battery connected
, 5,
WFNO, 8, // Wake cause (not implemented)
Offset (0x16),
BDC0, 32, // Battery design capacity
BFC0, 32, // Battery full capacity
Offset (0x22),
BDV0, 32, // Battery design voltage
BST0, 32, // Battery status
BPR0, 32, // Battery current
BRC0, 32, // Battery remaining capacity
BPV0, 32, // Battery voltage
Offset (0x3A),
BCW0, 32,
BCL0, 32,
BCG0, 32,
BG20, 32,
BMO0, 64,
BIF0, 64,
BSN0, 32,
BTY0, 64,
Offset (0x67),
Offset (0x68),
ECOS, 8,
LNXD, 8,
ECPS, 8,
Offset (0x6C),
BTMP, 16,
EVTN, 8,
Offset (0x72),
PRCL, 8,
PRC0, 8,
PRC1, 8,
PRCM, 8,
PRIN, 8,
PSTE, 8,
PCAD, 8,
PEWL, 8,
PWRL, 8,
PECD, 8,
PEHI, 8,
PECI, 8,
PEPL, 8,
PEPM, 8,
PWFC, 8,
PECC, 8,
PDT0, 8,
PDT1, 8,
PDT2, 8,
PDT3, 8,
PRFC, 8,
PRS0, 8,
PRS1, 8,
PRS2, 8,
PRS3, 8,
PRS4, 8,
PRCS, 8,
PEC0, 8,
PEC1, 8,
PEC2, 8,
PEC3, 8,
CMDR, 8,
CVRT, 8,
GTVR, 8,
FANT, 8,
SKNT, 8,
AMBT, 8,
MCRT, 8,
DIM0, 8,
DIM1, 8,
PMAX, 8,
PPDT, 8,
PECH, 8,
PMDT, 8,
TSD0, 8,
TSD1, 8,
TSD2, 8,
TSD3, 8,
CPUP, 16,
MCHP, 16,
SYSP, 16,
CPAP, 16,
MCAP, 16,
SYAP, 16,
CFSP, 16,
CPUE, 16,
Offset (0xC6),
Offset (0xC7),
VGAT, 8,
ECOS, 8, // Detected OS, 0 = no ACPI, 1 = ACPI but no driver, 2 = ACPI with driver
Offset (0xC8),
OEM1, 8,
OEM2, 8,
OEM3, 16,
OEM4, 8,
Offset (0xCE),
DUT1, 8,
DUT2, 8,
RPM1, 16,
RPM2, 16,
RPM4, 16,
Offset (0xD7),
DTHL, 8,
DTBP, 8,
AIRP, 8,
WINF, 8,
RINF, 8,
Offset (0xDD),
INF2, 8,
MUTE, 1,
Offset (0xE0),
RPM3, 16,
ECKS, 8,
Offset (0xE4),
, 4,
XTUF, 1,
EP12, 1,
Offset (0xE5),
INF3, 8,
Offset (0xE7),
GFOF, 8,
Offset (0xE9),
KPCR, 1,
Offset (0xEA),
Offset (0xF0),
PL1T, 16,
PL2T, 16,
TAUT, 8,
OEM4, 8, // Extra SCI data
Offset (0xCD),
TMP2, 8, // GPU temperature
DUT1, 8, // Fan 1 duty
DUT2, 8, // Fan 2 duty
RPM1, 16, // Fan 1 RPM
RPM2, 16, // Fan 2 RPM
Offset (0xD9),
AIRP, 8, // Airplane mode LED
WINF, 8, // Enable ACPI brightness controls
Offset (0xF8),
FCMD, 8,
FDAT, 8,

View File

@@ -6,6 +6,7 @@
// 0x82 - backlight down
// 0x83 - backlight up
// 0x84 - backlight color change
// 0x85 - OLED screen toggle
Device (S76D) {
Name (_HID, "17761776")
Name (_UID, 0)
@@ -111,4 +112,57 @@ Device (S76D) {
}
}
#endif // CONFIG(EC_SYSTEM76_EC_COLOR_KEYBOARD)
// Fan names
Method (NFAN, 0, Serialized) {
Return (Package (2) {
"CPU fan",
#if CONFIG(EC_SYSTEM76_EC_DGPU)
"GPU fan",
#endif // CONFIG(EC_SYSTEM76_EC_DGPU)
})
}
// Get fan duty and RPM as a single value
Method (GFAN, 1, Serialized) {
Local0 = 0
Local1 = 0
If (^^PCI0.LPCB.EC0.ECOK) {
If (Arg0 == 0) {
Local0 = ^^PCI0.LPCB.EC0.DUT1
Local1 = ^^PCI0.LPCB.EC0.RPM1
} ElseIf (Arg0 == 1) {
Local0 = ^^PCI0.LPCB.EC0.DUT2
Local1 = ^^PCI0.LPCB.EC0.RPM2
}
}
If (Local1 != 0) {
// 60 * (EC frequency / 120) / 2
Local1 = 2156250 / Local1
}
Return ((Local1 << 8) | Local0)
}
// Temperature names
Method (NTMP, 0, Serialized) {
Return (Package (2) {
"CPU temp",
#if CONFIG(EC_SYSTEM76_EC_DGPU)
"GPU temp",
#endif // CONFIG(EC_SYSTEM76_EC_DGPU)
})
}
// Get temperature
Method (GTMP, 1, Serialized) {
Local0 = 0;
If (^^PCI0.LPCB.EC0.ECOK) {
If (Arg0 == 0) {
Local0 = ^^PCI0.LPCB.EC0.TMP1
} ElseIf (Arg0 == 1) {
Local0 = ^^PCI0.LPCB.EC0.TMP2
}
}
Return (Local0)
}
}

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