Commit Graph

800 Commits

Author SHA1 Message Date
Maurice Ma 7ec367c38f Enable Windows build target for Azure Pipelines
This patch enabled Windows build targes for APL, CFL, CML, CMLv
and QEMU.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2020-12-01 16:38:38 -08:00
Maurice Ma e51ab53016 Enhance grub.cfg to support CentOS
CentOS live CD iso image has different path for grub.cfg file. It
also used "linuxefi" and "initrdefi" for keywords. This patch added
support for it. With this patch, verified it can boot to CentOS
live-cd on APL platform.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2020-12-01 16:19:21 -08:00
Maurice Ma 5f1923604d Fix InitRd image alignment issue
Current SBL used AllocatePool to allocae space for Linux files
including Kernel and InitRd. However, since InitRd is required to
be aligned at page boundary, it needs to use AllocatePages instead.
This patch addressed this issue. It fixed #908.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2020-12-01 13:09:34 -08:00
Maurice Ma 589238aeed Set up initial CI with Azure Pipelines
Migrated to Azure Pipelines for SBL CI to align with EDK2 project.
This is an initial commit to enable basic check. Currently it will
verify patch format and QEMU GCC build and test.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2020-12-01 12:38:53 -08:00
Singh Nitin G 7011ce1bf0 Fix HeciGetFwCapsSkuMsg api to update MBP
Made changes to ensure the ME BIOS data information
is correctly reported.

Signed-off-by: Divneil Rai Wadhawan <divneil.r.wadhawan@intel.com>
2020-11-24 15:40:54 -08:00
Maurice Ma c6feaaf3e3
Add ACPI RSDP to Linux BOOT_PARAMS (#905)
For UEFI Linux boot, a new parameter was added into BOOT_PARAMS.
This patch added this parameter support so that ACPI base can
be passed directly to kernel.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2020-11-22 21:08:19 -08:00
Maurice Ma bd07c6504c
Add legacy EF segment memory config (#904)
Current SBL code will build pointers in E/F segment for ACPI
and SMBIOS table. On some platforms, E/F segment is not supported.
So a new configuration ENABLE_LEGACY_EF_SEG is added.  When
it is enabled, SBL will not use legacy E/F segment memory.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2020-11-22 21:06:38 -08:00
Maurice Ma 9cf145bf57 Allow platform to override SOC or board specific inf files
In current SBL BootloaderCorePkg dsc and fdf files, it contains
hard-coded INF file path for SOC or board, such as ACPI INF
file and SOC/Board init library INF file. It makes it hard for
platform to provide its own overriding using different path.
This patch addressed this issue by allowing platform to override
the default paths in BoardConfig.py.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2020-11-13 16:03:39 -08:00
Maurice Ma 82fd4dd175 IntelFsp2Pkg: Fix FSP binary rebasing issue for PE32+ image
Current FSP rebasing script SplitFspBin.py has support for both
PE32 and PE32+ image formats. However, while updating the ImageBase
field in the image header, it always assumed the ImageBase field is
32bit long. Since PE32+ image format defined ImageBase as 64bit,
the current script will only update the lower 32bit value and leave
the upper 32bit untouched. It does not work well for PE32+ image
that requires update in the upper 32bit ImageBase field. The
expected behavior is to update the full 64bit field. This patch
implemented this fix.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2020-11-13 16:03:19 -08:00
James Gutbub ae99635490
Resolve raw partition boot loading (#899)
The calculation on where to start reading the
remainder of the boot image from is not being
calculated properly, the aligned header size
is given in bytes instead of in terms of block
size. This patch updates the calculation
accordingly.

Also, if SwPart is set as 255 then the LBA given
will be used as an absolute LBA instead of used
relative to the SwPart's starting LBA.

Signed-off-by: James Gutbub <james.gutbub@intel.com>
2020-11-10 22:26:26 -08:00
Guo Dong b5d78531df Fix MicroCode path
Use the default path only when MICROCODE_INF_FILE
is not defined in platform board. Currently it will
override the one defined in platform.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2020-11-09 16:47:24 -07:00
Guo Dong 7979fc9329 Update Microcode path to support customization
Microcode module locates in different place.
so each platform could specify the path by
MICROCODE_INF_FILE in BoardConfig.py.
By default, it uses the same path if there
is no MICROCODE_INF_FILE defined in platform.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2020-11-06 13:38:03 -07:00
Mircea Gherzan 9f3d2b5fc3 Fix the compiler flags for MSVC 2017 and 2019
* Enable frame pointers (via /Oy-) for 32-bit modules. From the
documentation: "If you specify a debug compiler option (/Z7, /Zi, /ZI),
we recommend that you specify the /Oy- option after any other
optimization compiler options."
* /O1b2s is equivaled to /O1 (/Ob2 and /Os are included in /O1)
* /Z7 for debug info is obsolete, replace with /Zi

Signed-off-by: Mircea Gherzan <mircea.gherzan@intel.com>
2020-11-03 12:38:58 -08:00
Aiden Park 2d7c2b920f Add PCI resource downgrade option for all Bus-0 devices
In 64-bit operation, some PCI devices have high mmio BARs,
but 32-bit FSP can only access 32-bit memory space.
This introduces and additional PCI resource downgrade option
to downgrade all PCI devices under Bus-0.
- self._PCI_ENUM_DOWNGRADE_BUS0 = 1
  Force to have 32-bit BAR for all Bus-0 devices

Signed-off-by: Aiden Park <aiden.park@intel.com>
2020-11-02 10:57:15 -08:00
Maurice Ma f371334318 Enable build without FSP binary
Current SBL build needs the actual FSP binary to pass the build.
This patch enables a mode to test the build without the actual FSP
bianry. It is useful for test before the FSP binary is available.
It is controlled by HAVE_FSP_BIN option. It can be overriden in
BoardConfig.py file.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2020-11-02 10:52:07 -08:00
Aiden Park 149b0f03dc Revert "Reserve Pcie config space region as a reserved memory"
This reverts commit cadc49893b.
2020-10-30 10:40:14 -07:00
Raghava Gudla 1914cab2a6 [CFL] Fix BOM ID detection for Upx platform.
This patch addressed an issue while detecting the
BOM ID for Upx platform which is causing the MRC
to fail.

Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
2020-10-29 20:48:48 -07:00
Guo Dong d909151879 Add build config for fastboot
With this flag, platform could update the settings to
get the expected boot performance data

Signed-off-by: Guo Dong <guo.dong@intel.com>
2020-10-28 09:18:51 -07:00
jinjhuli b53de73b53
[CMLV] Fix PMC register offset value (#887)
Fix register R_PMC_PWRM_GPIO_CFG to the correct
value: 0x1920.

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2020-10-24 08:22:34 -07:00
Aiden Park cadc49893b Reserve Pcie config space region as a reserved memory
This will report pcie config space region as a reserved memory in e820
and let Linux use the PCI MMCONFIG which has bus range information.
If it is not reserved, the pcie config space region will be freed/available
for PCI devices.

Signed-off-by: Aiden Park <aiden.park@intel.com>
2020-10-21 12:10:20 -07:00
Sai Talamudupula 7f37f16720 Support YAML and drop DSC for GpioConvert tool
GpioConvert Tool converts Gpio config data between following
sets of formats:

[.h, .csv, .txt] ---> [.yaml, .dlt] and vice-versa

.dsc related conversion is deprecated starting from this commit.

Signed-off-by: Sai Talamudupula <sai.kiran.talamudupula@intel.com>
2020-10-21 12:10:03 -07:00
Maurice Ma b6d2c307af Fix duplicated PlatformId in DLT file
Using ConfigEditor to save back DLT changes, it will produce two
PlatformId lines in DLT file. This patch removed the extra line.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2020-10-19 23:35:51 -07:00
Divneil Rai Wadhawan 5f81526d1b [CommonSocPkg]: Add HeciGetManufactureMode() to get EOM Status
o This is a common HECI PCI config space across platforms which
  return STS6 space.
o HeciGetManufactureMode() returns if the platform is in debug mode
  (fuses unlocked) or production (fuses locked).

Signed-off-by: Divneil Rai Wadhawan <divneil.r.wadhawan@intel.com>
2020-10-16 13:24:58 -07:00
Maurice Ma 5eb9ae3d46 Fix save full delta file issue in ConfigEditor
Current ConfigEditor produces the same result for
"Save full cfg data" vs "save cfg changes".  This patch provided
a fix for it.  It fixed #882.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2020-10-16 13:20:33 -07:00
Maurice Ma eb43c7e8f4 Fix default value change issue in ConfigEditor
In ConfigEditor, while scrolling page using mouse middle wheel,
the Combo configuration items will change its default value. It
is because Combo control will bind MouseWheel event by default.
To address it, added code to unbind it explicitly.

It fixed #878.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2020-10-14 15:07:53 -07:00
Maurice Ma 0b63ef7ac6 [APL] Fix compiler intrinsics link error for NOOPT build
This patch fixed link error for APL NOOPT build due to compiler
intrinsics functions. However, due to APL hardware requirements,
it is not feasible to fit NOOPT build into real flash. This
patch will not fix the NOOPT build error caused by code size issue.

For example, the following error might still occur for APL NOOPT
build:
  Invalid the required fv image size 0xe3b0 exceeds the set fv image
  size 0x6000
The APL SOC requires Stage1A to fit into 32KB. Since FSP-T will take
8KB, it only gives 24KB for SBL Stage1A code. NOOPT build will create
about 56KB for Stage1A, and it is impossible to fit into the layout.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2020-10-14 10:02:36 -07: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
Sai Talamudupula 83174d7af2 Fix permission check during Spi access
Check for Write access permission during
Write/Erase Flash cycles for BIOS/FLAHD regions.

Signed-off-by: Sai Talamudupula <sai.kiran.talamudupula@intel.com>
2020-10-12 19:23:11 -07:00
Maurice Ma 1608235af1 Resync BaseTools with latest EDKII stable tag
This patch synced BaseTools with EDKII stable tag:
  edk2-stable202008

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2020-10-12 16:02:35 -07:00
Maurice Ma 1002d880a2 Enable mixed payload mode calling
Since SBL could be built into either x86 or x64 mode, and the payload
can also be x86 or x64 mode. When mixed modes are used, it is required
to switch to proper mode first before calling into payload entrypoint.
This patch added this check to switch to required mode before calling
into payload entry point.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2020-10-12 13:01:07 -07:00
Maurice Ma 9a4407018d [QEMU] Fix NOOPT build failure
This patch fixed NOOPT build failure for QEMU.
It fixed #871.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2020-10-12 13:00:44 -07:00
jinjhuli f87c9a7d2c [CMLV] 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:18:44 -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
Sai Talamudupula be30a11910 Enhance eMMC driver
Improve the HS200 switch code to set bus mode
correctly on some eMMC cards.

Signed-off-by: Sai Talamudupula <sai.kiran.talamudupula@intel.com>
2020-10-08 17:04:38 -07:00
Raghava Gudla 3ec4e03a74 Expand HECI service to add more API's
This patch expanded HECI service to include send, receive and
reset interface functions. This helps in making firmwareupdatelib.c
and PSDlib common across platforms.

Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
2020-10-08 15:40:00 -07:00
Aiden Park 26a24f5ab2 [CFL] Fix the ucode checkout issue
This will fix the ucode repo checkout issue on 'cfl' target.

FYI, here are simple steps to reproduce.
1) Build 'apl' target first
2) Build 'cfl' target -> fails to checkout ucode repo

Signed-off-by: Aiden Park <aiden.park@intel.com>
2020-10-08 13:07:46 -07:00
Maurice Ma dd8fe22046 Add MultiBoot support for X64 build
During X64 enabling, there was a pending task to enable 32bit
MultiBoot support. It is not implemented.  This patch added the
support to allow X64 SBL to boot a 32bit MB image through thunking.
As part of this patch, the ThunkLib is separated from the FspApiLib
so that it can be shared by other component.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2020-10-07 14:20:50 -07:00
Aiden Park 89a0f3491f Move ME_BIOS_PAYLOAD to silicon specific directory
The structure of ME_BIOS_PAYLOAD varies on silicons. So, it's moved to
silicon directory and common structures are in MeBiosPayloadDataCommon.h.
- MeBiosPayloadDataCommon.h in CommonSocPkg
- MeBiosPayloadData.h in the specific silicon package

Additionally, DEBUG_VERBOSE message level is used for HeciCore.

Signed-off-by: Aiden Park <aiden.park@intel.com>
2020-10-06 13:21:31 -07:00
Aiden Park 40ded551cd [APL] Use the common HeciLib and Apollolake MeChipsetLib
This allows APL target to use the common HECI library.
The APL target uses the common HeciLib from CommonSocPkg,
and overrides MeChipsetLib for Apollake specific APIs.

Signed-off-by: Aiden Park <aiden.park@intel.com>
2020-10-06 13:21:31 -07:00
Aiden Park bbecda8c27 [CFL] Use the common HECI library
This allows CFL target to use the common HECI library as it is.
The CFL target uses both HeciLib and MeChipsetLib from CommonSocPkg,
and the unnecessary files are cleaned-up.

Signed-off-by: Aiden Park <aiden.park@intel.com>
2020-10-06 13:21:31 -07:00
Aiden Park ea3741581d [HECI] Add a silicon common HECI Library
This adds a common HECI library for the same APIs on all platforms.
New MeChipsetLib is intruduced for the silicon specific HECI APIs.
- Silicon/CommonSocPkg/Library/HeciLib
- Silicon/CommonSocPkg/Library/MeChipsetLib

Signed-off-by: Aiden Park <aiden.park@intel.com>
2020-10-06 13:21:31 -07:00
James Gutbub 467c804172 Add IGD Op Region version macros
Different SoCs can use different versions of
Gen graphics and subsequently may use different
versions of the IGD Op Region; the OVER variable
will determine how the OS GFX driver interprets
the IGD Op Region provided in ACPI space.

Signed-off-by: James Gutbub <james.gutbub@intel.com>
2020-10-02 21:20:11 -07:00
Guo Dong 05ac9b4e2d
Enhance FSP build path support (#859)
Currently the build tool will always find FSP binaries from
Silicon'\self._board.SILICON_PKG_NAME\FspBin folder.
This patch enhance the build tool to support to get FSP from
_FSP_PATH_NAME. If _FSP_PATH_NAME is not specified, the default
behavior is same with current build.

If user wants to use a different one, they could override it
in BoardConfig.py as below:
self._FSP_PATH_NAME  = 'Silicon/Fsp'

Signed-off-by: Guo Dong <guo.dong@intel.com>
2020-09-29 15:25:03 -07:00
Maurice Ma e5329259c1
Enable extra including path for build (#858)
This patch added support to allow platform to add specific include
folders for the build. All include paths will be relative to the
SBL $(WORKSPACE).

To eanable this feature, please add similar definitions as below
into BoardConfig.py. For example,
  self._EXTRA_INC_PATH = ['Silicon/QemuSocPkg/Include/Fsp']

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2020-09-28 20:15:22 -07:00
jinjhuli 8bb91f5841 Enable cml & cmlv boot options in travis
This patch enabled CML & CMLV test script for travis build.

Signed-off-by: jinjhuli <jin.jhu.lim@intel.com>
2020-09-21 08:39:24 -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
Raghava Gudla 418e31ad38 [CFL] Added support for mutiple VBT
This patch did the following

1) Added common routines LocateVbtByImageId to look for VBT image using
   ImageId provided by configuration data and GetVbtAddress.
2) GetVbtAddress routine will provide abstaction for all platforms
   irrespective of multiple VBT or single VBT used by the platform.
3) LocateVbtByImageId routine is moved from platform local function to
   common package.
4) VbtImageId configuration option defined in QEMU platform config is
   moved to common configuration in CfgData_Common.yaml
5) ApolloLake VBT ID selection is now done using configuration data.
6) Added latest VBT binary for CFL, WHL is using existing VBT.

Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
2020-09-18 17:41:12 -07:00
Guo Dong d9feb94de3 Add SetDeviceAddr() for device table update
Currently SBL library has GetDeviceAddr() to get the device
address based on device type and instance. This patch adds
SetDeviceAddr() to update a given device type and address so
that platform could update the device table dynamically.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2020-09-18 17:39:27 -07:00
James Gutbub e6935143a4 Clarify SATA and USB HwPart usage
The SATA and USB HwPart usage for BootOption
config data varies from the other block device
types. This patch adds clarification to explain
the meaning of HwPart for these 2 media types
respectively.

Signed-off-by: James Gutbub <james.gutbub@intel.com>
2020-09-18 17:35:59 -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