Commit Graph

27 Commits

Author SHA1 Message Date
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
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
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
Stanley Chang 53496b3423 [CML] Fix RTC S3 wake hang
This patch clears RTC alarm when RTC is the S3 wake-up source.
Without clearing it, SMI# will be triggered once SMI_EN is set
by RestoreS3RegInfo, but no handler to clear it which results
in hang.

In addition to clearing RTC SMI#, this patch also clears other
SMI# as UEFI BIOS does.

Test method: rtcwake -m -s 15

Signed-off-by: Stanley Chang <stanley.chang@intel.com>
2021-10-04 06:18:23 -07:00
Praveen Hp 1e93e7bec2 [CML] Fix chipsec SMM issues in S3 path
This patch upstreams previous CML patch for RC3 hotfix:
  [CMLV] Fix chipsec SMM issues in S3 path:
    Trigger SMI in S3 path to let UEFI payload restore registers.

Signed-off-by: Stanley Chang <stanley.chang@intel.com>
2021-09-22 21:01:20 -07:00
Randy Lin 0cbd8a79c4 [CML][TGL] Fix klockwork scanning issues.
Add check for Pointer 'HdaVerbTablePtr' returned from call to function
'AllocateZeroPool'

Signed-off-by: Randy Lin <randy.lin@intel.com>
2021-09-15 09:26:50 -07:00
Sai T 772da78bfa Move BdatLib to CommonSocPkg
This patch adds BdatLib to CommonSocPkg so that all projects
can refer to one single instance of BdatLib. Also removed the
redundant platform-specific package folders.

Signed-off-by: Sai T <sai.kiran.talamudupula@intel.com>
2021-09-08 16:39:56 -07:00
Stanley Chang ddd3e022de [CML] enable stitch tools for linux
The patch enables stitching CML/CMLV IFWI under Linux.

  CML/CMLV stitch tools do not natively support for Linux.
  A wrapper using 'wine' is required and works.

Signed-off-by: Stanley Chang <stanley.chang@intel.com>
2021-08-24 10:51:08 -07:00
Stanley Chang 02a10d7452 fix TSeg full during warn reset
This patch fixes TSeg region full problem after multiple
warn reset. Each time of warm reset, except S3 resume, the
TSeg region should be clear.

Signed-off-by: Stanley Chang <stanley.chang@intel.com>
2021-08-19 07:59:32 -07:00
Aiden Park 4b2e566921 Cleanup Platform/Silicon code to access LoaderGlobalData via APIs
This makes all Platform & Silicon code use APIs to access
LoaderGlobalData instead of accessing variables directly.

Signed-off-by: Aiden Park <aiden.park@intel.com>
2021-08-06 12:34:36 -07:00
Talamudupula fc8a3b33ce GpioLib header clean-up
Inconsistent and redundant header files are removed.
All projects going forward

 - Use API declared in GpioLib.h
 - Provide instance of GpioSiLib.h
 - Use common defines in GpioConfig.h

[QEMU][APL][CFL][CML][CMLV]
 - Follow above header model
 - Have own instance of GpioLib

[EHL][TGL]
 - Follow above header model
 - Use common GpioLib instance

Signed-off-by: Talamudupula <stalamudupula@gmail.com>
2021-07-01 11:24:03 -07:00
stalamudupula 1320881dd9
[CFL][CML][CML-V][EHL][TGL] Use common PchSbiAccessLib (#1161)
Use the newly added PchSbiAccessLib in common package,
for all the current platfroms. Platform specific PchSbi Lib
is removed.

Signed-off-by: Talamudupula <stalamudupula@gmail.com>
2021-05-20 11:24:26 -07:00
Subash Lakkimsetti dfd4444a33 Generate signed slimboot binary to output path
Currently final IFWI gets generated output path.
Copy the signed slimboot binary to out path.
Added option for outpath.

Signed-off-by: Subash Lakkimsetti <subash.lakkimsetti@intel.com>
2021-05-20 11:13:36 -07:00
Talamudupula 85826d40f2 Fix buffer overflow for copy in S3SaveRestore lib
For appending Save/Restore structs in TSEG area,
bootloader should reserve space for TotalSize and
for certain structs, only header info should be
actually populated. Rest should be all Zeros.

Signed-off-by: Talamudupula <stalamudupula@gmail.com>
2021-04-14 11:16:13 -07:00
Stanley Chang 4603bc0611 [CML] enable SMM rebase
Set SMM related PCD early and update platform
to enable SMM rebase

Signed-off-by: Stanley Chang <stanley.chang@intel.com>
2021-04-14 11:15:22 -07:00
Maurice Ma 94d22382bd [APL/CFL] Enable SMM rebase for mon UEFI payload
For non UEFI payload, SBL will install dummy SMI handler for
security concern. For UEFI payload, SMM rebasing is expected
to be done itself. This patch enabled this feature for APL and
CFL platform.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-04-10 15:28:07 -07:00
Maurice Ma 41ccfcca7c Clean up release build debug output
Current SBL release debug output has more than what is expected.
This patch reset some of the debug message to proper level to limit
debug message for release build.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-04-04 07:59:03 -07:00
randylintw d2c8288059
[CML] Fix Windows take a very long time to boot (#1085)
It takes more than 3 minutes to enter the home screen and also
restart/shutdown.

Signed-off-by: Randy Lin <randy.lin@intel.com>
2021-03-31 13:07:01 -07: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
Subash Lakkimsetti 1f0b99cf3b Update get_openssl_path to return absoulte path
Tools as MEU used for signing and generating key manifests
expects to pass abosulte openssl paths. Updating
get_openssl_path to return paths for linux cases.

Signed-off-by: Subash Lakkimsetti <subash.lakkimsetti@intel.com>
2021-01-15 13:24:07 -07:00
Sachin Agrawal e3cedba233 Handle TPMStartup error during S3 resume
As per TCG spec, if a Tpm2Startup(TPM_SU_STATE) fails during
S3 resume, a host reset should be done.

When BootGuard is enabled, ACM will notify of this failure via Bit46 in
BootGuardBootStatus register.


Signed-off-by: Sachin Agrawal <sachin.agrawal@intel.com>
2021-01-11 12:43:11 -08:00
Maurice Ma a2725951ad Removed deprecated python imp module usage
Python 3.4 and above have deprecated imp module in favor of
importlib.  This patch removed imp module usage from SBL, and
used importlib instead.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2021-01-06 11:16:59 -08:00
jinjhuli d1b404fbac Rename cnl file to cml & cmlv
Rename file with "cnl" to "cml" & "cmlv".
Rename include file's name in related file.

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2020-10-13 08:07:29 -07:00
jinjhuli 76728a2e3c [CML] Code clean-up
Removed empty lines, unused defines, comments,
empty files and empty #ifdef with clean-up tool.

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2020-10-09 15:17:23 -07:00
jinjhuli b1f6cd0f55 [CML] Fix travis build fail in linux system
Fix payload size to 0x00028000.

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2020-09-21 07:47:29 -07:00
jinjhuli f088f629c8 [CML] Fix travis build fail
1. Fix payload size.
2. Fix microcode clone command.

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2020-09-18 06:42:02 -07:00
jinjhuli 278789bc8c [CML] Initial baseline for CML platform support
- Build command
  python BuildLoader.py build cml

- Stitch command
  python Platform/CometlakeBoardPkg/Script/StitchLoader.py
  -i <EXISTING_IFWI_IMAGE>
  -o <SBL_IFWI_IMAGE>
  -s Outputs/cml/SlimBootloader.bin

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2020-09-15 09:18:02 -07:00