Commit Graph

892 Commits

Author SHA1 Message Date
Maurice Ma c76e3272d4 Fix MTRR mask programming for GFX framebuffer
Linux reported incorrect MTRR mask programming in SBL. This patch
fixed this issue by using the proper MTRR mask for GFX FB.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-02-18 21:48:51 -08:00
Guo Dong 57fb7e2fb3 [TGL] Update Vtd support
GNVS should be aligned with VTD PCD
Fix a DMR check issue.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2021-02-17 21:44:43 -07:00
tongyana 7af9db9f40 Update Fspbin.inf to pull latest FSP code.
Increase the size of Stage1b
to avoid build failing issue in Linux debug.

Signed-off-by: tongyana <tong.yan.au@intel.com>
2021-02-17 21:43:39 -07:00
Guo Dong 6b6a0e3796 [TGL] Remove WDT
It is not necessary to set WDT for FSPM.
So remove it to avoid potential issue.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2021-02-16 09:51:40 -07:00
Guo Dong d23b509483 [TGL] Update ConfigTdpLevel
Set UPD ConfigTdpLevel in FSPM instead FSPS
Remove unused CFG data

Signed-off-by: Guo Dong <guo.dong@intel.com>
2021-02-16 09:51:12 -07:00
jinjhuli 43d8692fda [EHL] Add require ACPI files for Yocto cpufreq
Add ACPI HWP files to support Yocto acpi_cpufreq

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2021-02-12 17:21:33 -08:00
Aiden Park dd9bff2804 [X64] Read the first time stamp before TempRamInit
Currently, the 1st time stamp includes FSP-T execution time in X64.
This will read the 1st time stamp before TempRamInit.

Signed-off-by: Aiden Park <aiden.park@intel.com>
2021-02-12 17:21:11 -08:00
Maurice Ma 04b162e75e Add CPU X2APIC support
This patch added X2APIC support. It is to enable the case when
APIC ID is greater than 255. This patch only handle core wakeup
portion. Platform still needs to handle ACPI related changes for
X2APIC.

X2APIC lib is backward compatible with XAPIC lib. So there is no
need to use XAPIC lib anymore.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-02-12 17:20:57 -08:00
Talamudupula 8fe118f1e1 Enhance GpioWriteLockReg in common GpioLib
Certain platforms can't support GpioLockUnlock, so let
them return the Opcode they want to use for locking.
Also updated dependent platform.

Signed-off-by: Talamudupula <stalamudupula@gmail.com>
2021-02-10 20:01:25 -07:00
Guo Dong 234bf55561
Fix the MP hang issue (#1013)
The ApDataPtr->CProcedure was wrongly updated in previous patch.
This patch fixed it and CPU task name from CProcedure to TaskFunc
to avoid confusion.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2021-02-10 09:29:54 -08:00
Aiden Park 2aade4dddb
Fix new Klocwork scanning issues (#1012)
This patch addresses new reported klocwork scanning issues.

Signed-off-by: Aiden Park <aiden.park@intel.com>
2021-02-10 08:55:00 -08:00
jinjhuli 21b4d1d07d [EHL] Fix UEFI Payload debug boot issue
Add LOADER_RSVD_MEM_SIZE in BoardConfig
to fix UEFI payload debug boot ASSERT
error.

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2021-02-09 08:16:25 -07:00
Maurice Ma 6b9463e791
Update QEMU FSP build to latest EDK2 (#1007)
This patch changed QEMU FSP to use INF file to provide commit id.
It also synced up to the latest EDK2 stable tag edk2-stable202011.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-02-08 09:13:37 -08:00
koktong-ong 89c6d7f0f9
[EHL] Fix yocto hang issue and s0ix enable (#1009)
Resolved yocto hang issue after booted into OS
for non Fusa sku.
Enabled s0ix for yocto and windows.

Signed-off-by: Ong Kok Tong <kok.tong.ong@intel.com>
2021-02-08 09:10:40 -08:00
Praveen Hp b715ba0177 [CML] Fix StitchIfwi script error
This Patch fixes below error,
"ModuleNotFoundError: No module named 'defusedxml'"

Signed-off-by: Praveen Hp <praveen.hodagatta.pranesh@intel.com>
2021-02-08 09:36:21 -07:00
Praveen Hp c3e4b75284 [CFL] Add CSME FWU driver build support
This patch adds support to build CSME firmware update driver.

BUILD_CSME_UPDATE_DRIVER in BoardConfig.py must set 1 to build csme FWU
driver.

Signed-off-by: Praveen Hp <praveen.hodagatta.pranesh@intel.com>
2021-02-08 09:32:36 -07:00
Guo Dong 45be2a8daa Build MP CPU TASK info hob
With this hob, user could run a task from AP in Osloader.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2021-02-08 09:31:08 -07:00
Maurice Ma fd436737a6
Delay MP init done for OsLoader payload (#1003)
There is request to utilize MP in OsLoader. To support it, it is
desired to delay MP init done signal to the end of the OsLoader.
This patch moved the MP init done signal into board ReadyToBoot
notification so that MP is still alive in OsLoader phase.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-02-05 16:15:23 -08:00
Maurice Ma f9c97abfdb
Avoid building duplicated GFX HOB (#1002)
In some cases Bootloader will build GFX HOB. This patch updated
SBL to check the bootloader GFX HOB first before building a new
GFX HOB from FSP. This is to avoid duplicated GFX HOB to be
generated in bootloader HOB.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-02-05 09:03:06 -08:00
Raghava Gudla ca738786cc
Fix firmware update failure during sbl svn check (#999)
This patch fixed a failure in firmware update that
occur during SBL version check. Current code assume
that the SBL layout does not change between the existing
firmware and the capsule, when the layout change, stage1A
address change and this is causing error while obtaining
the firmware version.

Code is modified to use the last 4 bytes of the SBL region
which contain Stage1A FV address and this is used to obtain
the version information.

Signed-off-by: Raghava <raghava.gudla@intel.com>
2021-02-05 09:01:26 -08:00
Praveen Hp 4f2ff03f81 [CFL] Fix CSME firmware update failure
during CSME firmware update process, CSME update library throw error
"Could not access PCI device".this patch fixes this issue by adding
back "PciReadBuffer".

TEST=Verified CSME FWU on CFL-H & WHL platforms.

Signed-off-by: Praveen Hp <praveen.hodagatta.pranesh@intel.com>
2021-02-04 13:59:18 -08:00
Aiden Park 680cab980b [PCI] Add an option to allocate PCI PMEM resource first
This introduces an additional PCI Enumeration option.
- self._PCI_ENUM_FLAG_ALLOC_PMEM_FIRST

By deafult, the option will allocate PCI resource by ascending order
(MEM32->PMEM32->MEM64->PMEM64). If it's set to 1, by reversed order.

Signed-off-by: Aiden Park <aiden.park@intel.com>
2021-02-03 17:14:51 -08:00
Adithya Baglody c3d73ff4de commonSocPkg: SpiFlashLib: Permissions bit read per read/write
The RegionPermission doesn't usually represent the current state of
the Region. There is a need to re-read the permission bit for each
read/write. There by making the variable accurately represents the
HW status.

Signed-off-by: Adithya Baglody <adithya.nagaraj.baglody@intel.com>
2021-02-02 22:42:57 -08:00
Maurice Ma f68a5dce1b Add FSP HOB print function
This patch will display FSP HOBs. It will help the debug when FSP
produce incomplete HOBs.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-02-02 19:48:39 -08:00
Maurice Ma b5e0c56cbd Add splash support post PCI enumeration
In some cases FSP does not support GFX and does not produce
GFX hob. But platform will be able to initialize its GFX after
PCI enumeration. This patch allows splash to be displayed post
PCI if the splash has not been displayed yet.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-02-02 14:05:50 -08:00
jinjhuli 87cdd8ebb2 [EHL] Update FSP header and Fix build error
1. Update Beta4 FSP header.
2. Temporary fix build error while pending FSP,
vbt and ucode to be upstream.
3. Fix Fadt syntax error.

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2021-02-01 19:26:20 -07:00
Talamudupula e6d73eb55b [TGL] Use common GpioLib
Point TGL project to use common GpioLib and fix build errors.
GpioPlatformLib instance for TGL platform is also provided
as a reference for other platforms. Also remove TGL specific
Gpio Library related files.

Usage:

    To configure Gpio pins provided by GPIO CFG DATA:
        ConfigureGpio(Gpio_Cfg_Data_Tag, 0, NULL);

    To configure Gpio pins provided by GPIO_INIT_CONFIG array:
        ConfigureGpio(0, Num_entries, Ptr_to_Array);

Signed-off-by: Talamudupula <stalamudupula@gmail.com>
2021-02-01 19:24:26 -07:00
jinjhuli 8fe45093d4 [EHL] Get SVN ver from capsule during firmware update
ported changes from commit 46e4a98cd1
to EHL.

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2021-02-01 10:01:30 -08:00
leanshen cf6663c996 Add silicon common IgdOpRegion library
This adds a common IgdOpRegion library for the same APIs on TGL
and EHL platforms. Plan to include older platforms support in the v2
patch.

Signed-off-by: Lean Sheng <lean.sheng.tan@intel.com>
2021-01-28 08:56:27 -08:00
Ong Kok Tong d988a8cc81 [EHL] ECLITE support
Enable ECLITE support in SBL EHL

Signed-off-by: Ong Kok Tong <kok.tong.ong@intel.com>
2021-01-27 08:01:37 -07:00
Praveen Hp b982bb3df8 [CFL] Fix audio record issue
This patches fixes the audio record issue using onboard 3mm jack.

TEST= booted to windows on both CFL-S & CFL-H board and verified
      Audio playback and record is working using onboard 3mm jack.

Signed-off-by: Praveen Hp <praveen.hodagatta.pranesh@intel.com>
2021-01-27 07:57:41 -07:00
Praveen Hp 89bb7b2b5b [CFL] Add TPM2 ACPI table
similar to CML, CFL also uses both IOB2 & IOB3 ports to pass the info
and generate an SMI. where as common code ACPI implementation uses
only IOB2, hence TPM2 ACPI tables are ported from CML platforms.
This patch fixes physical presence query and TPM clear issue on windows.

TEST: boot to windows on CFL-H platform and verified TPM physical
      presence and TPM clear command is successfull.

Signed-off-by: Praveen Hp <praveen.hodagatta.pranesh@intel.com>
2021-01-27 07:56:22 -07:00
leanshen a9b4a48ed3 [EHL] Update Fadt from v5 to v6.1
Update EHL ACPI FADT (FACP) from acpi v5.0 to v6.1.

Signed-off-by: LeanSheng <lean.sheng.tan@intel.com>
2021-01-26 21:43:58 -07:00
Guo Dong c1025b99fd [TGL] Enlarge Payload region Size
Since image form Linux build is a little bigger,
so enlarge the payload region size to fix linux build.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2021-01-26 21:19:38 -07:00
jinjhuli db12787c8c [EHL] Fix Jenkins build and stitch error
1. Fix jenkins build causes by some binaries
2. Fix Stitchifwi script

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2021-01-26 21:17:43 -07:00
jinjhuli b8cc3a43ae [EHL] Fix S4 issue in Windows
Fixes an issue where S4 is not working in
Windows when a PCIE card is attached.

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2021-01-26 21:15:19 -07:00
jinjhuli 1faaabcd54
[EHL] Set SPI flash EISS and LE (#983)
Set SPI flash EISS and LE in EHL.

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2021-01-25 17:23:04 -08:00
Raghava Gudla c9be70efd2
Fix failure during csme firmware update (#982)
This patch fixed a failure occured during CSME firmware
update. CSME firmware update library expects PCI read buffer
with a specific format, there is mismatch with input and output
parameter with the current code. Added a wrapper function
with the expected format to fix the failure.

Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
2021-01-25 15:46:54 -08:00
Maurice Ma 1771e3a35e
Change PCI resource PCD to patchable type (#979)
Current PCI resource PCD bases are defined as fixed type. It
makes it impossible to dynamically adjust the base at runtime.
This patch changed it to be module patchable so that platform
can update when required.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-01-25 09:54:32 -08:00
Guo Dong 1ca2058a95 [TGL] Add TCC GPIO support
Add SBL configuration data for TCC GPIO.
Update TCC GPIO UPD and ACPI NVS data based
on SBL configuration data.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2021-01-25 09:29:30 -07:00
Guo Dong 5782673871 [TGL] Fix linux stitch using StitchIfwi.py
This patch will fix the linux stitch error
using StitchIfwi.py

Signed-off-by: Guo Dong <guo.dong@intel.com>
2021-01-24 21:26:40 -07:00
Maurice Ma 06d3c531c9 Enable Azure Pipelines with Ubuntu-20.04
This patch moves the Linux build environment into latest Ubuntu
20.04 and updated to use latest ACPICA. All GCC build now is
enabled.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-01-24 19:47:54 -08:00
Aiden Park 2e9d97de20 Fix a bug in PAE 2MB paging
This will fix invalid PDP/PDE generation with PAE 2MB Pages,
and high bit calculation at PayloadEntry additionally.

Signed-off-by: Aiden Park <aiden.park@intel.com>
2021-01-23 07:42:19 -08:00
jinjhuli 09f7f879d8 [EHL] Fix EHL Build issue
Fix build issue that cause by missing
HASH_USAGE and ACPI register

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2021-01-23 07:42:06 -08:00
Maurice Ma b520f9561c Enable Azure Pipeline build for TGL
This patch enabled auto build for TGL Azure Pipelines.
Only Windows build is enabled. GCC build has IASL issue.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-01-22 10:01:37 -08:00
jinjhuli 3b51628a0d Enable/Disable EISS in CommonSocPkg
1. Disable EISS if BLE is not set in DisableBiosWriteProtect()
2. Enable EISS if BLE is not set in EnableBiosWriteProtect()

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2021-01-22 08:19:11 -07:00
James Gutbub a018d21694 [TGL] Add TCC mode DLT files
To ease the process of configuring CFG settings to
enable TCC mode, 2 additional DLT files have been
added for TGL-U DDR4 & LPDDR4 boards that can be
copied over the default files (or updated in the
BoardConfig.py) to set TCC mode settings. There
are 2 expectations currently (subject to change
later on):

1. UEFI PLD will be used
2. NVMe media is used for capsule update location

Also, remove TGL-H DLT file since it is not used
currently and update BoardConfig.py accordingly.

Signed-off-by: James Gutbub <james.gutbub@intel.com>
2021-01-21 18:02:12 -07:00
Praveen Hp eeb5e1ac10 Fix Secureboot status in PSD
CFL, CML, EHL, TGL platforms are using PSD version 0.3.
as per PSD Spec v0.3 secureboot status indication as ber below,

000 – Secure boot is Disabled
001 – UEFI Secure boot is enabled
010 – Boot Guard is Enabled
100 – Bootloader Verified boot is Enabled

Signed-off-by: Praveen Hp <praveen.hodagatta.pranesh@intel.com>
2021-01-21 16:47:38 -08:00
Maurice Ma 5d573cf55e Fix paging issue when PCI PMEM64 resource exists
In 32 bit SBL, when PCI PMEM64 exists, the OsLoader will hang
during boot in CreateIdentityMappingPageTables().  The function
is inteneded to be used in X64 mode only, and cannot handle
32bit well. So OsLoader should not call it for 32 bit build.

This patch also zeroed the allcated memory to ensure the unused
entries are all 0.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-01-21 14:08:53 -08:00
Aiden Park ba39f788cf [BoardConfig] Support Inherited BoardConfig
This will allow inherited BoardConfig from the existing one
in the same BoardPkg. It will be useful when a new BoardConfig
has very minimum difference from the existing one.

See Platform/QemuBoardPkg/BoardConfigOverride.py as a reference.

Signed-off-by: Aiden Park <aiden.park@intel.com>
2021-01-21 08:27:42 -07:00