Commit Graph

716 Commits

Author SHA1 Message Date
Ong Kok Tong 0dc5b1da43 [ADLN] Read BoardID from SMBus
Ported the SMBus BoardID reading for ADLN
Added CfgData for BoardID get method (eg. SmBus, EC)

Signed-off-by: Ong Kok Tong <kok.tong.ong@intel.com>
2022-06-01 14:02:07 -07:00
jinjhuli be468405af [ADLPS] Add break statement
Add break statement in AcpiPlatform c file
for ADL_PS case.

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2022-05-27 09:05:16 -07:00
jinjhuli 3cfddd995e [ADLPS] Disable SCI for hibernate issue
SCI storm is happening for GPIO pins D13 and E00.
Disable them as not needed.

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2022-05-25 20:26:44 -07:00
Kalp Parikh f3941ce7b4 Revert "[ADLPS] Process GPIO from Cfg Data"
This reverts commit 9e2bd6ea8b.
2022-05-25 19:46:04 -07:00
Sindhura Grandhi 9e2bd6ea8b [ADLPS] Process GPIO from Cfg Data
- Updated GPIO table to match BIOS PV ER3 release.
- Disable SCI for D13 and E00.
- Process the GPIO table from dlt file instead
of the hard-coded table. The mGpioTablePostMemAdlPsDdr5Rvp
is only for reference purposes.
- Move DEBUG CODE END to later part of the GPIO function in
order to add GPIO prints when required.

Signed-off-by: Sindhura Grandhi <sindhura.grandhi@intel.com>
2022-05-25 19:39:42 -07:00
jinjhuli 27b3b75338 [ADLPS] FSP update for PV release
FSP UPDs update for PV milestone release

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2022-05-25 09:45:28 -07:00
Sindhura Grandhi e44fc9cb7b
[ADL] Fix KW issue (#1582)
This patch fixes the KW issue that is reported due to NULL
pointer deference. Moved up the code where CfgData checks for NULL.

Signed-off-by: Sindhura Grandhi <sindhura.grandhi@intel.com>
2022-05-23 10:47:29 -07:00
Raghava Gudla 38906c73bb
[ADL] Update BDF for UFS device (#1581)
This patch fixed BDF for UFS device, bus number and function
number are improperly ported and this patch fixed the issue.

Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
2022-05-23 10:22:02 -07:00
Raghava Gudla f8ffd17c39
[ADLP] Enable UFS configuration (#1580)
This patch enabled UFS configuration on ADLP platform

Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
2022-05-20 17:44:54 -07:00
Ong Kok Tong 5d792b35f8 [ADLN] FSP update for pre-alpha release
FSP update for pre-alpha milestone release

Signed-off-by: Ong Kok Tong <kok.tong.ong@intel.com>
2022-05-20 10:12:13 -07:00
Sindhura Grandhi f1844b05ba [ADLS] Resolve reboot issue on DDR4 board
This patch fixes the hang seen during a reboot cmd on ADLS DDR4 board.
Setting the DmiMaxLinkSpeed to Auto mode.

Signed-off-by: Sindhura Grandhi <sindhura.grandhi@intel.com>
2022-05-20 10:10:34 -07:00
Sindhura Grandhi 0a332af102
[ADL] Fix HsPhyInit failure (#1576)
HsPhy feature is only applicable for ADLS and not for others.
Adding a condition to apply only for it.

Signed-off-by: Sindhura Grandhi <sindhura.grandhi@intel.com>
2022-05-18 11:00:51 -07:00
jinjhuli 79eac5d32d
[ADLPS] Enable S0ix feature (#1574)
This patch enable S0ix feature in ADLPS

1. Disabled PCH LAN.
2. Added ADLPS FSPS UPD update.
3. Added ADLPS NVS value update.
4. Added ADLPS CPU SKU Device ID.

Verified: ADL-PS RVP

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2022-05-18 10:22:26 -07:00
Raghava Gudla 0e6cda520d Add support for getting csme boot time perf data
This patch added support to get csme boot time performance
data and display it in perf command and also before booting
to linux.

Introduced a board config option BOOT_PERFORMANCE_MASK to control
PcdBootPerformanceMask, BIT 2 now enables printing CSME boot
performance data.

Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
2022-05-11 09:02:52 -07:00
Randy Lin cae174c307 [EHL] Fix ACPI error
Sync from EHL BIOS.

Error: ACPI BIOS Error (bug): AE_AML_BUFFER_LIMIT, Field [IOF2] at
bit offset/length 712/16 exceeds size of target Buffer (664 bits)

Signed-off-by: Randy Lin <randy.lin@intel.com>
2022-05-11 08:56:16 -07:00
Sindhura Grandhi 4618fac1c4 [ADLP] Update FSP ingredients
Update FSP UPDs and VBT changes as part of the ADLP MR release.

TEST=Tested to boot to OS.

Signed-off-by: Sindhura Grandhi <sindhura.grandhi@intel.com>
2022-05-10 18:48:45 -07:00
Sean McGinn 4808bd4481 Support ACM FW Capsule Update
*Adds code to support the updating
of ACM FW via capsule

*Adds code that disallows for the
roll back of ACM FW

Signed-off-by: Sean McGinn <sean.mcginn@intel.com>
2022-05-05 10:18:26 -07:00
Vincent Chen 7400d6f0b3 fix the wrong sblopen_dir value in StitchLoader.py and StitchIfwi.py
This patch can reduce the chance of setting SBL_SOURCE when the
SBL root directory is not named as "SblOpen" or when the scripts
are run from the path other than the SBL root directory. Also note
that os.path.abspath() returns the absolute path relative to the
current working directory instead of the real path of __file__.
So in StitchIfwi.py, sblopen_dir was incorrect since the working
directory had been changed before calling stitch().

Signed-off-by: Vincent Chen <vincent.chen@intel.com>
2022-05-05 10:09:21 -07:00
Sindhura Grandhi 10a9e53b3b
[ADLN] Add GPIO configuration from Cfg Data (#1566)
Add GPP_T as part of the base cfg in order to use for
other ADL flavors like ADL PS.

Signed-off-by: Sindhura Grandhi <sindhura.grandhi@intel.com>
2022-05-02 16:45:48 -07:00
Subash Lakkimsetti bf6d59e82a
[ADL] Configure MTRR to enable full flash region cache (#1565)
FSPT doesn't allow to enable full flash code cache.
Bootloader configures MTRR in non BTG cases to avoid
performance penalty.

This fixes the ADL boot from BP1 partition.

Signed-off-by: Subash Lakkimsetti <subash.lakkimsetti@intel.com>
2022-04-29 13:13:36 -07:00
Randy Lin eac83f5ca8 [EHL] Refine the PSE FW stitch logic
PSE is enabled by default.
During SBL building, it will check the existance of PSE FW binary.
If it is missing in binaries folder, the PSEF won't be appended in
container list and casue StitchIFWI script fail if it try to update.

Signed-off-by: Randy Lin <randy.lin@intel.com>
2022-04-29 08:21:45 -07:00
Randy Lin a3eeef4e31 [EHL] Update FSP version since MR3 is released
Also set the CpuTempSensorReadEnable = 1
It was renamed from PchCpuTempSensorEnable
and removed in commit 44faa431c9

Signed-off-by: Randy Lin <randy.lin@intel.com>
2022-04-28 10:40:47 -07:00
Guo Dong 4a734902f1 [ADL] Adjust debug message level
Low debug message level to avoid too many
error message in the release build.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2022-04-26 07:49:50 -07:00
Guo Dong 388640654c [ADL] Add a new CPU ID support
Add a new CPU ID in the list.
And update debug message level to avoid
error message in the release build.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2022-04-26 07:49:50 -07:00
Guo Dong fde2520f5c [ADL] expose Lp5BankMode FSP UPD in SBL configuration data
The default FSP UPD value for Lp5BankMode doesn't work
for all the platforms. It would help override it using
SBL configuration data if it is exposed.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2022-04-26 07:49:50 -07:00
Raghava Gudla 7aa9cf6e47
[ADLN] Changes required for ADLN FSP Sync (#1558)
This patch added changes required for ADLN FSP Sync and
also did the following

1) Added SA config for DDR5 CRB
2) Initialized VBT to enable 2 HDMI and a DP port
3) Moved FSPM config to delta file

Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
2022-04-25 13:03:34 -07:00
Maurice Ma 93317d89fc Revert "[UPX] Disable malfunctioned USB2 port"
This reverts commit 1caacefeb5.

The USB port that does not respond to USB bus enumeration is port 8 on
the newer UPX board. The old UPX board might have different behavior.
The original commit was valid on old UPX board only, and this patch
reverted it. Confirmed the USB error message disappeared on the new
UPX board after the reverting.

Signed-off-by: Maurice Ma <mauricemx.ma@gmail.com>
2022-04-25 08:58:41 -07:00
Randy Lin 147cea8839 [EHL] Fix IBECC error injection
Only enabled IehMode when IBECC error injection is disabled
Iehmode will cause failure in IBECC error injection test

Signed-off-by: Ong Kok Tong <kok.tong.ong@intel.com>
2022-04-21 12:15:38 -07:00
Sindhura Grandhi 5266d3a502 [ADLS] Fix build error
Match the FSP include path from Board Config to that of
FspBin inf file so it fixes the build issue.

Signed-off-by: Sindhura Grandhi <sindhura.grandhi@intel.com>
2022-04-15 09:23:17 -07:00
Sindhura Grandhi 6215a63638 [ADLS] Update project to be able to build/stitch from opensource
Signed-off-by: Sindhura Grandhi <sindhura.grandhi@intel.com>
2022-04-14 13:55:45 -07:00
Guo Dong c2e2dfa6ac Add BootToShell configuration item
By default OsLoader payload shell is only available in debug build.
In some case customer also wants to have shell in release build.
So add a BootToShell configuration item to enable shell in release build.
By default BootToShell is set to 0. When it is set to 1 the shell behavior
would be same in release and debug build.

NOTE: user could add this line in platform dlt file to set BootToShell.
GEN_CFG_DATA.BootToShell  |1

Signed-off-by: Guo Dong <guo.dong@intel.com>
2022-04-13 14:07:43 -07:00
Guo Dong 37befc027c [ADL-TEST] Program TSN GPIO
Add TEST-S platform to program the TSN GPIO table.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2022-04-11 16:35:08 -07:00
Sindhura Grandhi b6f5c998e7 [ADLN] Fix build issue
WRDS is not defined for ADLN. Hence, add a condition so that
it is skipped for ADLN.

Signed-off-by: Sindhura Grandhi <sindhura.grandhi@intel.com>
2022-04-08 15:45:33 -07:00
Sindhura Grandhi 0209d9b3ea [ADL] Remove Cpu stepping condition for HT
The CPU stepping condition is not needed anymore for ADLS.
Removing it for now.

Signed-off-by: Sindhura Grandhi <sindhura.grandhi@intel.com>
2022-04-07 11:20:09 -07:00
Sindhura Grandhi eb23e4c4ed [ADL] Expose Timed GPIO to OS
This patch assigns Timed GPIO Cfg Data to the NVS variables
in order for the OS to load this driver.

Signed-off-by: Sindhura Grandhi <sindhura.grandhi@intel.com>
2022-04-05 15:40:49 -07:00
Sindhura Grandhi 17ca1074a8 [ADL] Add version info
This patch adds the missing version info for ADL.

Signed-off-by: Sindhura Grandhi <sindhura.grandhi@intel.com>
2022-04-04 13:13:54 -07:00
Guo Dong 977450bae8
Add platform name (#1540)
* Generate platform build name definition

Same code could be shared by different platforms. At same time,
some platform might need do minor change to the shared code.
In order to support this case, this patch updated the build tool
to generate a macro definition for current build platform name
in a header file. so the shared code could have platform specific
code change with this macro definition.
e.g. add "#define #define PLATFORM_ADLS 1" for ADLS.

Signed-off-by: Guo Dong <guo.dong@intel.com>

* [ADLS] update

FspsUpdUpdateLib could be shared by different platform,
use ADLS macro definition instead of PcdAdlLpSupport for
ADLS specific change.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2022-04-01 11:55:11 -07:00
Vincent Chen cee9341f6b [CML] increase the max memory map entry number
SBL uses PcdMemoryMapEntryNumber to control the max entry
number of memory map info HOB. In some platforms, CML
encountered "Memory map failure" due to the actual entry
number exceeding it. So increase the max to accommodate
the case.

Signed-off-by: Vincent Chen <vincent.chen@intel.com>
2022-04-01 11:48:35 -07:00
Vincent Chen 8b35904cb1 [CML] Update FSP, UCODE and platform version since MR1 is released
- FSP:
  * 09.03.7B.20 for CML-S
  * 09.01.7B.20 for CML-V
  * bpmgen2_params: set VTD_BAR to 0xFED91000
- Microcode:
  * m22A0653_000000EA.mcb  # G1-Step
  * m22A0655_000000EC.mcb  # Q0-Step
- update CML platform version to 1.1

Signed-off-by: Vincent Chen <vincent.chen@intel.com>
2022-04-01 11:46:47 -07:00
Vincent Chen 6fd1141c75 [TGL] Support individual TSN ports Enable/Disable
New FSP (from 0A.00.66.12) supports switching TSN GbE ports
Enable/Disable individually. SBL requires CfgData change
accordingly to avoid build errors.

Signed-off-by: Vincent Chen <vincent.chen@intel.com>
2022-03-30 09:58:35 -07:00
Vincent Chen 87d7ebfdc8 [TGL] Update FSP and platform version since MR5 is released
- update FSP version to IoT FSP 4391_03 (0A.00.66.13)
- update TGL platform version to 1.5

Signed-off-by: Vincent Chen <vincent.chen@intel.com>
2022-03-30 09:58:14 -07:00
Raghava Gudla e8f96f53a6
[ADLS] Fix build issues (#1534)
This patch fixed build issues caused by adding L2QosEnumerationEn UPD
which is not present on other ADL platforms.

Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
2022-03-29 16:45:16 -07:00
Guo Dong 23076e447a
[RPLS] Update big core number default value (#1533)
The default big core number was set to 8, it has to be overridden if
the CPU number is not 8. Had better set to 0xFF to all active big cores.
Also it mentioned the default value is 0xFF in the help message.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2022-03-29 16:28:11 -07:00
Raghava Gudla 55735b5727
[ADLS] Update fspm upds using config data (#1532)
This patch updated some more FSPM upd's using
config data.

Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
2022-03-29 13:40:01 -07:00
Sindhura Grandhi 116fe8fb62
[ADLS] Tcc updates for MR1 release (#1531)
Signed-off-by: Sindhura Grandhi <sindhura.grandhi@intel.com>
2022-03-29 12:06:33 -07:00
Raghava Gudla d1f9bb461d
[ADLS] Update FSPM upds to latest BIOS (#1530)
This patch updated FSPM UPD to latest BIOS release

Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
2022-03-29 09:01:49 -07:00
Raghava Gudla 1bfe28a366
[ADLS] Sync UPD to latest BIOS release (#1529)
This patch updated UPD to latest BIOS release

Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
2022-03-25 16:33:01 -07:00
Sindhura Grandhi d99e5f724a [ADLN] Add TSN support
Unlike ADLS, TSN link speed will be coming from the Cfg data.
New TSN GPIO table needed for ADLN board.

Signed-off-by: Sindhura Grandhi <sindhura.grandhi@intel.com>
2022-03-25 10:33:51 -07:00
Guo Dong eb91954c66 [ADL] Add a new platform
Add a new SO DDR5 platform ID 0x31.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2022-03-23 14:27:51 -07:00
Stanley Chang 7e6c2dee2f [TGL] Restore AUTO payload-switching behavior
Previous commit fe6cf3272 unexpectedly changed the AUTO payload-switching
behavior. This patch restores the behavior to the original design.

Verified: TGL-UP3 RVP

Signed-off-by: Stanley Chang <stanley.chang@intel.com>
2022-03-22 22:13:37 -07:00
Aiman Rosli 371a4eaa79 [EHL] SBL thermal and new gpio scheme default
Signed-off-by: Aiman Rosli <muhammad.aiman.rosli@intel.com>
2022-03-17 08:24:53 -07:00
jinjhuli 36a4c007f2 [EHL] UPDs for Zephyr support
Add PchPseAicEnabled and PchUnlockGpioPads in
CfgData_Silicon.yaml file to allow modification
using Config Editor tool.

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2022-03-16 20:40:41 -07:00
Sindhura Grandhi 5be18b2731 [ADLS] Fix Tcc issue caused due to incorrect UPD setting.
Some of the RTCT table entries werent populated due to this
missing UPD setting. Hence, assigning it to the correct value.

TEST= Verified the fix on ADLS board.

Signed-off-by: Sindhura Grandhi <sindhura.grandhi@intel.com>
2022-03-16 12:49:28 -07:00
Stanley Chang 698fdf1e72 [TGL] add TCO Timer control option
This patch adds control option for TCO timer.

Use case: the control option shall be enabled when Linux hw watchdog
driver (iTCO) is enabled.

Verified: TGL-UP3 RVP

Signed-off-by: Stanley Chang <stanley.chang@intel.com>
2022-03-08 08:56:29 -07:00
Maurice Ma c4ac8e1939 Update loader serial port hob to support 64bit base
This patch added a new 64bit base field in the loader serial
port hob to support 64bit resource. The revision is updated
to 2. It is backward compatible with revision 1.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2022-03-03 12:45:00 -08:00
Maurice Ma fd6c9dedf3 Add FS load Shell command
This patch adds "fs load" command to SBL shell so that it can be
used to load a file from boot media into memory. It also supports
loading file at specified memory address.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2022-03-03 08:23:00 -08:00
Raghava Gudla edb83e2fed
[ADLN] Additional RVP support changes (#1513)
Added more changes required for RVP support.

Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
2022-03-02 13:24:36 -07:00
Sindhura Grandhi 2cfe5fec46 [ADL] ADL enhancements
- Resolve build issue and did some naming enhancements.

Signed-off-by: Sindhura Grandhi <sindhura.grandhi@intel.com>
2022-03-02 11:36:13 -07:00
Raghava Gudla eb84a4e4de [ADL] Update VBT binary before silicon init
Graphics driver in FSP Silicon init is expecting
board related changes for VBT, so moved UpdateVbt
function call before Silicon Init.

Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
2022-03-02 09:03:58 -08:00
Ong Kok Tong 4f51c79daf [ADL] Remove RTC logic in payload switching
Removed RTC logic, it is problematic and should not be used,
all other platforms are not using this logic and
we should remove this from the code

Signed-off-by: Ong Kok Tong <kok.tong.ong@intel.com>
2022-03-02 09:03:48 -08:00
Raghava Gudla d4bb24fc16
[ADLN] Initial support for ADLN platform (#1501)
This patch added support for ADLN platform.
EC related ACPI changes need to be reinvestigated
as disabling ECAvailable NVS change might be
sufficient to disable EC support in ACPI.

Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
2022-02-25 09:44:51 -07:00
kokweich dabb3143d1 Enable Grahpics Console during firmware update
This patch enables graphics console when entering FWU payload.
FWU progress will show on both graphics console and serial port.

Signed-off-by: kokweich <kok.wei.chan@intel.com>
2022-02-24 13:31:59 -08:00
Sindhura Grandhi b64aa3f51f
[ADLS] Fix bad DSO failure test case (#1499)
This patch fixes the test case where when a bad dso is
provided, it will revert back to the default dso settings.

TEST= Ran the test case successfully on ADLS board.

Signed-off-by: Sindhura Grandhi <sindhura.grandhi@intel.com>
2022-02-22 12:22:39 -07:00
Maurice Ma 64d682755b Add missing ACPI PRES method for SATA ports
On TGL, Linux reported ACPI errors on missing PRES method for SATA
port 0. This patch added the missing PRES implementation for all
SATA ports.

This fixed #1497.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2022-02-17 11:14:39 -08:00
Maurice Ma 3979c356d9 Add conditional scope for I2C pad and panel
Current SBL ACPI table does not define any I2C pad or panel. And
it will cause ACPI error for Linux. This patch added conditional
scope for I2C pad and panel reference so that if pad type or panel
type is not defined, these scope will not be used by ACPI.

This fixed #1496.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2022-02-17 11:14:39 -08:00
Randy Lin a3f5cfaade [TGL] Fix ACPI Errors reported in kernel dmesg
Fix two errors:
ACPI Error: Aborting method \_SB.PR00.GCAP due to previous error
(AE_INVALID_TABLE_LENGTH)
ACPI Error: Aborting method \_SB.PR00._PDC due to previous error
(AE_INVALID_TABLE_LENGTH)

UEFI BIOS always does dynamic loading, but SBL does static loading
instead.

Signed-off-by: Randy Lin <randy.lin@intel.com>
2022-02-17 04:49:37 -08:00
Sindhura Grandhi 071f5f1d77
[ADL] Update Silicon UPD Config (#1494)
As part of FSP updates for ADLPtest board, update
Silicon UPD settings.

TEST=Validated boot on the RVP board.

Signed-off-by: Sindhura Grandhi <sindhura.grandhi@intel.com>
2022-02-16 17:21:46 -07:00
Raghava Gudla 1c6853ec25
[ADLP] Fix build issue in adl (#1493)
This patch fixed a build issue in adl

Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
2022-02-15 10:55:04 -07:00
Sai T 20c30ff496 Gpio data convert improvements
Pass in a pch_series param to GpioDataConvert tool
to fetch the correct gpio group info for a platform
based on the pch series.

The tool expects the platform specific config file to
implement a function vir_to_phy_grp () that returns
a BOOL value based on:

If vir_to_phy_grp = False, SBL's config has A->0, B->1 etc. mapping.
And GpioSiLib.c or GpioInitLib.c corresponding libraries will map
this virtual group #s to real physical group #s (if not same).

If vir_to_phy_grp = True, SBL's config has A->G1, B->G2 etc.
physical mapping directly, so the GpioLib library uses this as is.

GpioDataConfig.py file was added for ADL platform.

Signed-off-by: Sai T <sai.kiran.talamudupula@intel.com>
2022-02-15 10:39:12 -07:00
Raghava Gudla 6c99587e20
[ADL] Register change for boot time reduction (#1492)
Program SLP_A_MIN_ASST_WDTH to 0 on fast boot path
to reduce boot time

Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
2022-02-15 10:17:39 -07:00
Raghava Gudla b843980583
[ADL] Fix Klockwork issues (#1491)
This patch fixed issues reported by Klockwork

Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
2022-02-15 00:27:29 -07:00
Raghava Gudla 1ef66916df
[ADL] Remove unused variable (#1490)
Linux build is complaning of an unused variable,
removed that variable to fix build issues.

Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
2022-02-14 23:11:40 -07:00
Raghava Gudla e7e79720d4
[ADL] Fix Linux build issues (#1489)
Removed unused functions and redundant code.

Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
2022-02-14 22:41:29 -07:00
Raghava Gudla 35813687fb
[ADL] Fix ADL build errors (#1486)
With latest changes for S0ix, PciePm is expecting GetCpuSku and
GetCpuSkuInfo function declaration in header files. Added these
declarations in CpuPcieHsPhyInitLib header file

Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
2022-02-11 17:43:55 -07:00
Raghava Gudla a84f5f0058
[ADL] Update FSP UPD params (#1485)
This patch updated UPD params to match latest FSP

Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
2022-02-11 17:30:33 -07:00
jinjhuli 3bbfe44bec
[ADL] Enable PCIe PM features (#1479)
The patch enables PCIe PM features by,
1. Store Root Port configuration before FSP-S.
2. Configure Pcie RP in PostPciEnumeration with the stored RP config.

The feature is controlled by ENABLE_PCIE_PM and the corresponding
PcdEnablePciePm

The implementation is silicon-dependent, because of registers definition.
The PciePmNull component is a generic implementation. This patch also
implements PciePm for ADL.

Verified: ADL-P RVP

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2022-02-11 13:52:42 -07:00
jinjhuli cec75a036b
[ADLP] Enable S0ix feature (#1480)
This patch enable S0ix feature in ADLP
1. Ported correct NVS value for ADLP.
2. Ported ACPI value refer to BIOS.
3. Implemented workaround for RP08.

Verified: ADL-P RVP

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2022-02-11 12:19:06 -07:00
Maurice Ma 7a9cc52e05 [TGL] Update MCFG table template with correct end bus number
Current TGL platform set 0 as the PCI end bus number in ACPI
MCFG table. And it caused incorrect MMCONFIG range calculation in
Linux. This patch updated the template to use 0xFF as the PCI
end bus number.

It should fix #1481, to be confirmed.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2022-02-11 09:48:40 -07:00
Mike Crowe a9d9774ca9 StitchIfwi: Indicate failure through exit status
When run as part of an automated system it's important to ensure that
any failure is reported to the calling process. Writing an error message
and then exiting indicating success leads to difficult-to-diagnose
problems.

Signed-off-by: Mike Crowe <mac@mcrowe.com>
2022-02-11 09:48:23 -07:00
Stanley Chang 7191710225 [TGL] Enable PCIe PM features
The patch enables PCIe PM features by,
1. Store Root Port configuration before FSP-s.
2. Configure Pcie RP in PostPciEnumeration with the stored RP config.

The feature is controlled by ENABLE_PCIE_PM and the corresponding
PcdEnablePciePm

The implementation is silicon-dependent, because of registers definition.
The PciePmNull component is a generic implementation. This patch also
implements PciePm for TGL.

Verified: TGL-U RVP

Signed-off-by: Stanley Chang <stanley.chang@intel.com>
2022-02-08 20:02:23 -08:00
Sindhura Grandhi 5ab1612bad [ADL] Add Alderlake platform support
This patch adds Platform and Silicon support for Alderlake
project. Currently, FSP and microcode are not publicly
available. So build will fail with errors. We will update
the project whenever they are available.

Signed-off-by: Sindhura Grandhi <sindhura.grandhi@intel.com>
2022-01-27 16:07:20 -08:00
Randy Lin de8ddefeb3 [TGL] Disable s0ix on TGLU RVP
s0ix feature enabling flag also turn off some FSP configs
so that default SBL image can't detect the onboard Lan
and type c devices.

Signed-off-by: Randy Lin <randy.lin@intel.com>
2022-01-27 10:44:30 -08:00
Maurice Ma b45e49b74e [EHL] Enhance GPIO convert tool
This patch enhanced GPIO convert tool so that it can handle the
new GPIO template format.

EX:
  To convert GPIO from YAML format to CSV format:
  python Platform\CommonBoardPkg\Tools\GpioDataConvert.py -cf
         Platform\ElkhartlakeBoardPkg\Script\GpioDataConfig.py -if
         Platform\ElkhartlakeBoardPkg\CfgData\CfgData_Gpio.yaml
	 -of csv -o gpio.csv

  To convert GPIO from CSV to YAML format:
  python Platform\CommonBoardPkg\Tools\GpioDataConvert.py -cf
         Platform\ElkhartlakeBoardPkg\Script\GpioDataConfig.py -if
         gpio.csv -of yaml -o gpio.yaml -t new

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2022-01-24 09:31:12 -08:00
Stanley Chang 0c82e73533 [TGL] Fix UART0 access
This patch fixes no activity on UART0 pins when enabling it for serial
communication.

In TGL, there are two UART0 instances (GPP_C8~C11 and GPP_F0~F4) while
one (GPP_F0~F4) is shared with CNVI. This patch enables GPP_C8~C11 as
the UART0 instance to reduce the conflict with CNVI.

This patch also fixes the GPIO pins definition for TGL-H and moves
serial io initialization code to SerialIo.c to simplfy Stage2BoardInitLib.c.

Test: TGL-UP3 RVP and TGL-H RVP

Signed-off-by: Stanley Chang <stanley.chang@intel.com>
2022-01-21 07:46:23 -08:00
Ong Kok Tong 44faa431c9 [EHL] Update PROJ_MINOR_VER and PSE SIZE
1. Update VERINFO_PROJ_MINOR_VER to 3 for MR3
2. Update PSE SIZE to 0x00030000
3. Removal of PchCpuTempSensorEnable FSP UPD due
FSP update

Signed-off-by: Ong Kok Tong <kok.tong.ong@intel.com>
2022-01-13 08:11:27 -08:00
Ong Kok Tong 98e73fe9cd [EHL] Increase CFGDATA SIZE
Increase CFG_DATABASE_SIZE due to the addition
of up6000 dlt file in SBL EHL cfgdata.
The AddConfigData funciton will return EFI_OUT_OF_RESOURCES
due to insufficient cfgdata size when TCC is enabled.

Signed-off-by: Ong Kok Tong <kok.tong.ong@intel.com>
2022-01-11 08:09:27 -08:00
Randy Lin 071686dacd [CML] Fix ACPI GPE 0x6F interrupt storm
RTD3 table isn't ready so that comment _L6F out.

Signed-off-by: Randy Lin <randy.lin@intel.com>
2022-01-05 12:01:05 -08:00
Randy Lin 4a436f44ab [CFL] Fix Klocwork scanning issue
Fix Expression 'BootMode' can never reach the value

Signed-off-by: Randy Lin <randy.lin@intel.com>
2022-01-04 13:32:16 -08:00
Guo Dong bf4a56033f
Move DSO update/check to TccLib (#1444)
IsMarkedBadDso and InvalidateBadDso would be required for all
the platforms that support TCC. And the implementation is also
common, so just move them to common TccLib.
Also updated the implementation to remove SPI flash erase for
InvalidateBadDso().

Signed-off-by: Guo Dong <guo.dong@intel.com>
2021-12-23 15:11:03 -08:00
Vincent Chen 62b5d48e6c [TGL] Update FSP, UCODE and platform version since MR4 is released
- update FSP/VBT version to UP3 IoT FSP MR4
- update TGLU microcode version to 9A
- update TGL platform version to 1.4
- remove redundant files in case of files not being updated

Signed-off-by: Vincent Chen <vincent.chen@intel.com>
2021-12-22 17:11:28 -07:00
Stanley Chang d66202f25d [TGL] Invalidate bad DSO region
This patch invalidates the DSO region with a marker after
a DSO hang (caused by corrupted DSO) is detected (by WDT timeout).
With the marker, stage1b can know the DSO tuning should be skipped.

The bad DSO mark is defined as both Signature and Size in the
TCCT component header are zero.

With this patch, the previous defined WDT scratchpad bit,
WDT_FLAG_TCC_BAD_DSO, is removed.

TEST=Verified on TGL-U RVP

Signed-off-by: Stanley Chang <stanley.chang@intel.com>
2021-12-22 06:11:29 -08:00
Guo Dong 16d7d22040 Update BtgSign tool
Currently StitchLoader.py is under platform package, and
the common tool BtgSign.py should not depend on that tool.
And BtgSign.py indeed doesn't depend on it, so just update
it to make it could work without StitchLoader.py.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2021-12-16 08:11:53 -07:00
Maurice Ma 4a9390c3f8 [CFL][CML] Fix board hook call sequence issue
On CFL and CML, the board hook PostMemoryInit was called before
FspMemoryInit API. This should be called afterwards instead.

This patch fixed this issue. It is because of missing "break"
statement. It fixed #1435.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-12-15 10:15:17 -07:00
Ong Kok Tong 6737caaed0 [EHL] UP2 6000 support
Aaeon UP2 6000 board first boot

1. Added platform ID support
2. Added BoardID read from GPIO
3. Added UP2 6000 dlt file

Signed-off-by: Ong Kok Tong <kok.tong.ong@intel.com>
2021-12-10 23:10:18 -08:00
Ong Kok Tong 6ebcc6971c [EHL] Fix ASL compiler warnings
Fixed ASL warning for SBL EHL

Signed-off-by: Ong Kok Tong <kok.tong.ong@intel.com>
2021-12-10 23:08:04 -08:00
Stanley Chang bfbc7943e0 [TGL] Fix infinite reset loop caused by bad DSO
This patch solves an infinite reset loop issue caused
by bad DSO with the scenario:
  After platform reset (due to WDT timeout), FSPm asks
  for another reset, but before that, WDT_FLAG_TCC_DSO_IN_PROGRESS
  is already cleaned. As a result, in the thrid reset, stage1B
  will have no idea about the DSO is corrupted and it
  continues boot with Tcc Tuning flow, which causes WDT
  timeout reset again.

This patch introduces a WDT_FLAG_TCC_BAD_DSO flag in WDT
scrachpad (bit 18). The flag is a marker that is set when
a bad DSO is detected. The new booting flow for "bad DSO" case
if Tcc_Tuning enabled will be:

  1st boot: (after fwupdate)
     - TCC_DSO and WDT set by stage1b and stage2
     - FSP hangs and trigger WDT reset
  2nd boot:
     - Stage1b detects "bad DSO" because of WDT and
       TCC_DSO_IN_PROGRESS. For this case:
         Clear TCC_DSO_IN_PROGRESS and WDT.
         Set TCC_BAD_DSO.
       Then it continues boot that will skip Tcc Tuning
       (because of TCC_DSO_IN_PROGRESS unset)
     - FSPm asks for a reset
  3rd boot:
     - Stage1b detects "bad DSO" because of TCC_BAD_DSO
       It continues boot that will skip Tcc Tuning
       (because of TCC_DSO_IN_PROGRESS unset)

The patch does not remove the 200-sec abnormal boot-up symptom
because the symptom is noticeable to user. So user can be aware
of something wrong (bad DSO).

The "bad DSO" flag will be clear before fwupdate, so a fwupdate
with a correct DSO can solve the 200 sec abnormal boot up time.

Signed-off-by: Stanley Chang <stanley.chang@intel.com>
2021-12-10 23:07:48 -08:00
Randy Lin 1e5a04030c [TGL] Add stitch option to support TGL-H RVP Config 3
Config 1/3 RVP boards can't share same IFWI image
and it is required to adjust the FIT parameters.
Add -o cfg3 to support this.

Signed-off-by: Randy Lin <randy.lin@intel.com>
2021-12-03 07:20:47 -08:00
Randy Lin fb0a4aec22 Fix ASL compile warnings.
Signed-off-by: Randy Lin <randy.lin@intel.com>
2021-11-30 07:57:32 -08:00
Ong Kok Tong e4a00293f4 [EHL] Removed hardcoded PSE PWM pin enable
Removed hardcoded PSE PWM pin enable and adapt from
CfgData in Stage2.

Signed-off-by: Ong Kok Tong <kok.tong.ong@intel.com>
2021-11-29 15:35:30 -08:00
James Gutbub fe6cf32721 Add common GPIO payload selection CFG
GPIO payload selection settings can be made
into a platform optional common config. This
will ensure that the options display the same
across all platforms which add support for
the GPIO payload selection feature. Each
platform will need to include the
CfgData_PayloadSelection.yaml and needs to
create their own CfgData_GpioPadGroups.yaml
to provide the list of GPIO pad groups to
select from.

Signed-off-by: James Gutbub <james.gutbub@intel.com>
2021-11-18 13:49:44 -07:00
Kok Tong Ong 18fc9592a8 [EHL] Enable Gbe TSN config in yaml
Enable Gbe TSN config in silicon yaml file below:
- PchTsnGbeSgmiiEnable
- PseTsnGbeSgmiiEnable
- PseTsnGbePhyInterfaceType

Signed-off-by: Kok Tong Ong <kok.tong.ong@intel.com>
2021-11-17 11:43:00 -08:00
Sai T b9422c7969 Enhance Smbios Init Lib
This patch does the following updates to SmBiosInitLib:

  1. Provide AddSmbiosType() to add a SmBios Type header.
  2. Provide AddSmbiosString() to append strings to Type header.
  3. Move Finalize() to after 'PrePayloadLoading' board init phase.
     All Smbios related calls need to be done before this.
  4. Modified TGL project to adjust to these changes.

Signed-off-by: Sai T <sai.kiran.talamudupula@intel.com>
2021-11-16 12:35:12 -08:00
Ong Kok Tong 97fbf9349c [EHL] Increase epayload size
Increase epayload size to 0x00162000 for compilation
error with latest debug version of uefi-payload

Signed-off-by: Ong Kok Tong <kok.tong.ong@intel.com>
2021-11-15 19:06:24 -08:00
Maurice Ma d424a15994 Add boot from multiple USB devices
When multiple USB devices are attached, current SBL will try to
boot the device with index specified by HwPart in the boot option.
However, it is hard to determine the USB device index order since
it depends on which port the device is connected to. Instead, for
USB devices, SBL can try to boot from each of them until the boot
image is loaded successfully or all USB devices have been tried out.
This patch added this support.

To enable this feature, it is required to set the USB boot option
HwPart to 0xFF.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-11-10 14:28:31 -08:00
Maurice Ma d94ff784bd Remove trailing whitespace/tabs from source files
Current PatchChecker.py still complains lots of files with
trailing whitespace and tabs. This patch addressed these
error reporting.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-11-10 13:15:04 -08:00
Mike Crowe 990e3e81e6 Use LF line endings in the repository
Convert the line endings stored for all text files in the repository to
LF. The majority previously used DOS-style CRLF line endings. Add a
.gitattributes file to enforce this and treat certain extensions as
never being text files.

Update PatchCheck.py to insist on LF line endings rather than CRLF.
However, its other checks fail on this commit due to lots of
pre-existing complaints that it only notices because the line endings
have changed.

Silicon/QemuSocPkg/FspBin/Patches/0001-Build-QEMU-FSP-2.0-binaries.patch
needs to be treated as binary since it contains a mixture of line
endings.

This change has implications depending on the client platform you are
using the repository from:

* Windows

The usual configuration for Git on Windows means that text files will
be checked out to the work tree with DOS-style CRLF line endings. If
that's not the case then you can configure Git to do so for the entire
machine with:

 git config --global core.autocrlf true

or for just the repository with:

 git config core.autocrlf true

Line endings will be normalised to LF when they are committed to the
repository. If you commit a text file with only LF line endings then it
will be converted to CRLF line endings in your work tree.

* Linux, MacOS and other Unices

The usual configuration for Git on such platforms is to check files out
of the repository with LF line endings. This is probably the right thing
for you. In the unlikely even that you are using Git on Unix but editing
or compiling on Windows for some reason then you may need to tweak your
configuration to force the use of CRLF line endings as described above.

* General

For more information see
https://docs.github.com/en/get-started/getting-started-with-git/configuring-git-to-handle-line-endings .

Fixes: https://github.com/slimbootloader/slimbootloader/issues/1400
Signed-off-by: Mike Crowe <mac@mcrowe.com>
2021-11-10 12:46:42 -08:00
Ong Kok Tong 8c75111faa [EHL] Disabled AC split lock by default
Disabled AC split lock by default in CfgData yaml file.

Signed-off-by: Ong Kok Tong <kok.tong.ong@intel.com>
2021-11-08 18:02:37 -08:00
Jim c035269a4a [TGL] Remove SGX Configurability
This patch removes SGX configurability from Slim Bootloader as
SGX is not supported on TGL.

Signed-off-by: Jim <jim.pelner@intel.com>
2021-11-08 11:02:43 -08:00
Aiden Park 95f335b6b0
Fix variable not initialized KW issue (#1398)
This is to initialize a Boolean variable to fix KW issue

Signed-off-by: Aiden Park <aiden.park@intel.com>
2021-11-04 20:29:53 -07:00
Maurice Ma 5996369705 Enable GFX framebuffer as WC by BAR parsing
In order to improve the UEFI payload display performance, it is
desirable to have the framebuffer as write-combining for cache
attribute. This patch added a common API to enable this and it
enabled the GFX framebuffer cache for QEMU and TGL. Other
platforms still need porting.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-11-04 11:46:13 -07:00
Maurice Ma f67122518c SBL clean up to split core private data out
This patch moved SBL core private data strctures and definitions
into a private header file so that other packages cannot refer
to the private structures.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-11-04 10:49:49 -07:00
Maurice Ma 505c484600 [TGL] Fix incorrect pin index in GPIO CFGDATA
On TGL, current GPIO CFGDATA used incorrect pin index for GPIO
group J and G. This patch fixed it.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-11-04 10:49:14 -07:00
Stanley Chang 383500eee7 [TGL] Fix SaGv CfgData to align with FSP
The patch updates CfgData yaml to align with FSP:

1. correct value range for SaGv

2. remove unused variables: FreqSaGvLow and FreqSaGvMid

Signed-off-by: Stanley Chang <stanley.chang@intel.com>
2021-11-04 08:21:55 -07:00
Sai T acccaea853 Add RxRaw field to Gpio config template
Current GpioLib uses 2 bits from OtherSettings to
configure RxRaw field in GPIO PAD CFG DWORD 0. But
Gpio config templates are missing the option to configure
this feature. This patch adds the option in template.

Signed-off-by: Sai T <sai.kiran.talamudupula@intel.com>
2021-11-03 16:18:42 -07:00
Maurice Ma fe5067e5b9 [TGL] Fix the GPIO group ID overriding issue
Current SBL uses DLT file to override the GPIO group id in the
GPIO CFGDATA table because the group ID used in CFGDATA needs to
match the group ID used by GPIO library. This patch decoupled the
GPIO group id with the GPIO library. Instead, a translation was
added to convert the group ID to the value required by the GPIO
library.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-11-02 10:55:04 -07:00
Maurice Ma 56d63ca01c Add API to set fixed display mode in VBT table
In certain condition, it is required to use fixed display mode. This
path added a new API SetVbtFixedMode() in BoardSupportLib to provide
such function. It can be used to request a fixed resolution at runtime
to run an application, such as setup screen.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-11-01 12:55:11 -07:00
Maurice Ma aa219ecd67 [QEMU] Enable CFGDATA update test using CfgDataStitch tool
This patch added test cases to verify CfgDataStitch flow for
CFGDATA modification.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-10-29 16:17:39 -07:00
Maurice Ma 2e9cdbf5a7 [QEMU] Add GPIO fields to enable more tests
This patch added more fields in QEMU GPIO so that more CFGDATA
related tests can be done on QEMU platform.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-10-29 16:17:39 -07:00
Maurice Ma 0e0eb047e3 Add UpdateMemoryInfo implementation for all open platforms
This patch implemented SOC specific hook to update the memory
map info through UpdateMemoryInfo() API.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-10-29 07:49:55 -07:00
Raghava Gudla 02e06c48b0 [EHL] Increase Fwupdate payload size
This patch increased fwupdate payload size to 0x1B000 to resolve
build issue.

Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
2021-10-26 16:50:36 -07:00
Maurice Ma 4936832cde [TGL] Add SOC specific memory info
This patch updated the memory info for TGL platform using the SOC
specific memory map registers.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-10-26 14:32:20 -07:00
Guo Dong 2064c1f003 [TGL] Enabling WDT for TCC DSO
When some settings from DSO caused system hang, the WDT
would cause the system reboot. And in the next boot,
SBL would use the default setting by not apply the DSO
values.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2021-10-26 13:58:26 -07:00
Maurice Ma d0594faf84 [QEMU] Enable SMBIOS support
This patch enable SMBIOS support for QEMU. It allows to test SMBIOS
on QEMU platform.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-10-25 16:46:33 -07:00
Maurice Ma c62e24eb8c Add PCD to let platform control the ACPI processor ID base
This patch added PcdAcpiProcessorIdBase to allow platform to
customize the processor ID start base within MADT APIC entry.
Current EHL and TGL declared PR00 processor object in ACPI
with unique ID value 0, but other projects used vlaue 1
instead. This patch will help fix this issue.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-10-25 16:43:20 -07:00
Maurice Ma 4c443f15fd [TGL] Enable PCI 64bit resource in X64 build
This patch enabled several config options for TGL x64 build so that
64 bit PCI resource can be allocated properly. As part of it, the
related GFX bar read/write has been extended to handle 64bit address.

This has been tested on UPX i11 board. X64 SBL can boot to Ubuntu
properly.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-10-21 10:14:03 -07:00
Maurice Ma 21917377c8 Change GetSerialPortBase() API to return 64bit address
When UART bar is alloaced to 64 bit address, the current SBL API
GetSerialPortBase() only returns the lower 32 bit address, which will
cause problem for UART access. This patch fixed this issue.

Please note the patch did not change the payload HOB interface for
UART info. That needs to be updated to 64bit base address too. But this
patch does not cover that.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-10-21 10:09:20 -07:00
Jim 06b5292c20 [TGLU] Expand LPDDR4 DDI Config Array to 16 Entries
The DDI config array for LPDDR4 was incorrectly defined as 13 entries.
There are 16 UPDs that are programmed in UpdateFspConfig, resulting in
random UPD assignments.

This addresses issue
https://github.com/slimbootloader/slimbootloader/issues/1365#issue-1031580997

Signed-off-by: Jim <jim.pelner@intel.com>
2021-10-20 09:50:04 -07:00
Ong Kok Tong 9807395a57 [EHL] Check the existance PSE FW
To check the existance of PSE FW in Binaries folder to
prevent the infinite FSP reboot issue.

Signed-off-by: Ong Kok Tong <kok.tong.ong@intel.com>
2021-10-20 06:00:21 -07:00
Stanley Chang 519ec079be [TGL] Fix S0ix issues
This patch fixes three S0ix issues:

1. a regression caused by commit 20889 where the
   FspsConfig->SerialIoUartMode missed configuring for legacy UART

2. failed s0ix when assigning uart port2 as debug port: root caused
   by Maurice. He pointed out that several uart properties should
   not be reset
   This fixed #1314.

3. conflict with TCC/TSN: In TGL, S0ix should be disabled when either
   TCC or TSN is enabled. If s0ix is enabled, the patch checks TCC/TSN
   enabling status and forces turning off S0ix if TCC/TSN is enabled.

Signed-off-by: Stanley Chang <stanley.chang@intel.com>
2021-10-18 21:25:47 -07:00
Maurice Ma 4f2e81e4be [UPX i11] Clear boot flags in the default USB boot option
By default, the boot option 0 has mender OS boot flag set, and it causes
"root=" to be appended to the Linux boot command line. For Ubuntu OS,
it will cause the wrong root fs parameter and prevent it from booting.
This patch fixed this issue.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-10-18 10:01:54 -07:00
Maurice Ma cf71b4557d [TGL] Report PCI 64bit resource to OS
This patch added PCI MEM64 resource in ACPI table so that OS can
re-allocate 64bit PCI resource if required.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-10-18 09:14:52 -07:00
Maurice Ma ee9e09f96d Clean up GPIO DEBUG message level
There are too much ERROR level debug message in GPIO library. Since
ERROR level debug message will be stored in final release binary,
it increases the image size. This patch changed the GPIO DEBUG
level to VERBOSE by default to reduce binary size. When debug is
needed, we can change the debug level in the header file to allow
more detailed info.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-10-18 08:16:04 -07:00
Sai T 4d17d55a21 Move PchPcrLib to CommonSocPkg
Make PchPcrLib common. Remove redundant headers
not used by some platforms and link the new common
lib with the platforms currently using it.

Signed-off-by: Sai T <sai.kiran.talamudupula@intel.com>
2021-10-18 08:02:42 -07:00
Ong Kok Tong 3157d851ac [EHL] Enabled AC Split Lock
Removal of disabling AcSplitLock FSP UPD.
The FSP UPD is commented out due to the Yocto hang
issue previously which no longer occured.

Signed-off-by: Ong Kok Tong <kok.tong.ong@intel.com>
2021-10-18 06:47:03 -07:00
Maurice Ma 145d71041a [TGL] Skip CPU replacement check to allow MRC fast boot
This patch will skip ME CPU replacement check on SBL to always
allow MRC fast boot flow.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-10-15 22:20:54 -07:00
Maurice Ma 05592150d8 [TGL] Fix MRC full training issue on warm reset flow
On TGL warm reset flow, current MRC will always do full MRC training.
It is because of wrong PMC rigster was used in platform code to set
and clear the MRC scratch pad bit.

This fixed #1346.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-10-14 15:19:56 -07:00
Maurice Ma a149d0ebca [UPX i11] Enable Ubuntu boot support
Ubuntu 20.04.3 can support TGL platform. However, current SBL won't
be able to boot without changes. It is caused by following issues:
 - GRUB CFG support is not enabled by default
 - Payload heap is too small to load the full INITRD image
 - USB boot option is set to boot from partition 1 and EXT2 filesystem.

This patch addressed above issues. It has been tested on UPX i11.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-10-14 14:41:09 -07:00
Maurice Ma b9b01e8640 [UPX i11] Address USB boot long delay issue
This patch fixed the USB enumeration long delay issue seen on
UPX i11 board. It disabled the malfunction USB port 8.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-10-14 11:04:05 -07:00
Maurice Ma 9aa774f635 Issue cache flush before FWU reset in Shell
Since the commit below was reverted
24f5aa59b5. The cache flush
need to be moved into the place where data consistency
across warm reset is required. The patch added the WBINVD
to flush the cache before "fwupdate" command issues warm
reset.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-10-13 14:58:35 -07:00
Maurice Ma eea78479da [QEMU] Add UEFI universal payload test case
This patch added UEFI universal payload boot test on QEMU.
It fixed #1332.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-10-11 15:23:42 -07:00
Maurice Ma 1caacefeb5 [UPX] Disable malfunctioned USB2 port
On UPX, one USB2 port does not respond properly during PCI enumeration.
It needs to be disabled.  The current SBL code disabled the wrong port.
It should be port 10 (USB2 index 9).

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-10-11 15:23:09 -07:00
Jim A. Pelner 8d4b0dc19d [TGLH] Fix Yocto Boot Issue with TCC Enabled
In the TGL implementation of UpdateFspConfig() in Stage1BBoardInitLib.c,
there are two missing UPD updates that have been validated for TGLH. This
manifested itself when enabling the TCC feature by setting ENABLE_TCC in
BoardConfig.py by reporting a bad VT-d descriptor and hanging.

This patch incorporates these two UPD settings for the TGLH boards.

Signed-off-by: Jim A. Pelner <jim.pelner@intel.com>
2021-10-11 15:06:14 -07:00
Maurice Ma 0b5581895f [UPX] Disable trace hub debug interface by default
During UP Extreme board enabling, trace hub interface was enabled
to help debug. But it should be disabled by default. This patch
fixed it.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-10-09 07:14:30 -07:00
Aiden Park bea07fdc60 [Tool] Allow each platforms to override min tool versions
This allows each platforms to override its own minimum tool versions.

Current SBL default minimum tool versions:
    'python'    : '3.6.0'
    'nasm'      : '2.12.02'
    'iasl'      : '20160422'
    'openssl'   : '1.1.0g'
    'git'       : '2.20.0'
    'vs'        : '2015'
    'gcc'       : '7.3'
    'clang'     : '9.0.0'

If a board needs to use VS2008 and nasm2.14,
In BoardConfig.py,
    def GetPlatformToolchainVersions(self):
        version_dict = {
            'nasm'      : '2.14',
            'vs'        : '2008',
        }
        return version_dict

Signed-off-by: Aiden Park <aiden.park@intel.com>
2021-10-08 20:05:10 -07:00
Maurice Ma 4189ae986b [TGL] Fix UpdateFspConfig() early return issue
On TGL  UpdateFspConfig() funciton in Stage2BoardInitLib.c has code
path to return early, it will skip all remaining UPD initialization.
The code should always continue the flow to finish the whole
function. This patch fixed this issue.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-10-07 11:28:37 -07:00
Randy Lin 5f7dc196ab [TGL] Disable Intel HD Audio (Azalia)
1. HD Audio and TSN share pins. These are mutually exclusive features.
 2. RVP board should be reworked to support legacy HD Audio mode.

Signed-off-by: Randy Lin <randy.lin@intel.com>
2021-10-05 11:29:04 -07:00
James Gutbub 26bb66cedf [CFL] Increase PAYLOAD size
Seems some recent patches may have added additional
size to OS Loader and now the internal pre-commit build
test in Jenkins is failing due to not enough space
for PAYLOAD. Other platforms are also using 29000h
so might be best to increase the CFL value as well.

Signed-off-by: James Gutbub <james.gutbub@intel.com>
2021-10-04 22:37:32 -07:00
Maurice Ma 8c85533285 Add accurate TSC frequency calculation support
Current SBL code uses MSR(0xce) to calculate the CPU TSC frequency.
However, it is not very accurate. A better way is to use CPUID to
calculate the TSC frequency. This patch added new API to get accurate
TSC frequency.  It also added APIs to allow conversion between time
and TSC ticks.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-10-04 13:16:51 -07:00
Maurice Ma 4d45a48ac0 Add gitignore file in Silicon and Platform folder
Current SBL build will show lots of FSP files as untracked files.
This patch re-orgnized the rules for .gitignore file so that it
has better control at different folder level. With these new rules
no untracked files will be shown for the FSP and VBT files.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-10-04 12:20:26 -07:00
Maurice Ma 8d0b3467b5 [QEMU] Fix AUTO boot option index
On SBL, it can support boot option selection through QEMU command line
"-boot order" parameter. However, it does not work anymore. It was
because of the MAX_BOOT_OPTION_CFGDATA_ENTRY adjustment in other commit.
This patch decoupled internal boot option index with the CFGDATA boot
option index so that it does not have impacts on each other. With this
change, QEMU boot option can be altered through command line again.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-10-04 12:00:05 -07:00