This patch switched to use SerialPortLib in BootloaderCommonPkg for
QEMU and CFL platforms. For APL platform, it can also use this common
library. However, it has an optimized SerialPortLib with FIFO enabled.
So for APL, it still uses its SOC specific library.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
QEMU has its own SpiFlashLib and SpiFlashLib.h file.
But, the header file is identical to the one in Silicon/CommonSocPkg.
Therefore, remove QEMU's one and re-use the common header file from
Silicon/CommonSocPkg.
Signed-off-by: Aiden Park <aiden.park@intel.com>
GenContainer.py tool can be used to create a container
with the boot files as follows:
python %SBL_ROOT%\BootloaderCorePkg\Tools\GenContainer.py create
-cl CMDL:<cmdline.txt> KRNL:<vmlinuz> INRD:<initrd>
-o <Out> -k <Key>
<cmdline.txt> = command line file
<vmlinuz> = kernel image
<initrd> = initrd image
<Out> = dir/file where final Pods Image is copied
<Key> = Private signing key file/dir path
Signed-off-by: Sai Talamudupula <sai.kiran.talamudupula@intel.com>
Current ConfigEditor only supports UINT8 format cell in table.
This patch added support for variable cell width including UINT8,
UINT16, UINT32 in table widget. Test configuration items were
also added in QEMU to test these format.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
QEMU compiling will fail when EXECUTE_IN_PLACE is set to 1 due to
size issue. Even after fixing size issue, the execution will still
fail. It is because the variable services will try to put SPI into
command mode while code fetching will fail if it is executed from flash.
This patch added necessary code to skip variable tests in Stage1B and
Stage2 when XIP is enabled. It fixed#324.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
This will detect CPUs up-to 255 and update MADT ProcessorLocalApic entries
with the detected CPU information.
- Set PcdCpuMaxLogicalProcessorNumber to 255 in QEMU BoardConfig.py
Test>
qemu-system-x86_64 -machine q35 -nographic -serial mon:stdio
-pflash Outputs/qemu/SlimBootloader.bin
-smp 8
Signed-off-by: Aiden Park <aiden.park@intel.com>
Getting platform name from config data and set platform name is
common almost for all the platforms. So move it to common library.
Loading external configuration data from SPI is also common, so
add it into common library. Platform could still use its own method
to load config data if the common one doesn't work.
Signed-off-by: Guo Dong <guo.dong@intel.com>
To make it easier to share the most common configuration items in a
DLT file, it is better to support '!include' in DLT file. This patch
added this feature. It also added examples in QEMU to test this.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
This patch enabled Linux as payload support on QEMU platform. To build
Linux as payload, please follow instructions mentioned in commit:
4a5af4f8b0
In addtion, to boot Linux payload on QEMU, please append following
into QEMU command line to set Payload ID to 'LINX' dynamically.
-boot order=abc
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
The current implementation used a huge array to represent boot options in
a single CFGDATA tag. With this approach, when a different board needs
to modify a single field, the whole array needs to be duplicated in the
CFGDATA. It is not efficient. A better approach is to break the options
into individual boot option CFGDATA tag. It will reduce the overall CFGDATA
in general. This patch implemented this mechanism. A library interface
FillBootOptionListFromCfgData() is provided to convert the CFGDATA into
the required OS_BOOT_OPTION_LIST.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
This patch enabled container use case for EPAYLOAD loading.
It also switched to use LoadComponent() API for Stage2 and
payload loading. It simplified the code flow. An example in
QEMU was added to demonstrate on how to add a container in
build and load it in Stage2 code.
To define a container layout, it is required to provide
GetContainerList() in BoardConfig.py. Then in stage or payload
code, LoadComponent() can be used to load a component from the
container.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
There are cases where temporary memory is required in stages. Since
MemoryAllocationLib instance for stages has no de-allocation function,
it needs special handling. This patch added temporary memory management
into standard MemoryAllocatoinLib interface.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
Removing the HOB defined by SBL to use generic HOBs from EDK2.
Update GraphicsLib for above HOB change.
Update osloader and multibootLib for hob change.
update APL and Qemu platform for hob change.
Signed-off-by: Guo Dong <guo.dong@intel.com>
Current QEMU build will produce many different SPI layouts due to
different build feature flags, such as source level debug support.
Since QEMU is a virtual platform, it is better to relax the size
so as to have consistent SPI layout. It will make it easier for
debug. This patch produces fixed QEMU image size (2MB).
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
Current SBL depends on GEN_CFG_DATA.PayloadId to determine which payload
to boot if multiple payloads exist. With this patch, when PayloadId is
set to "AUTO", QEMU will use the QEMU command line parameter
'-boot order' to determine which payload to boot.
For example, adding '-boot order=dba' in QEMU commadn line will boot to
UEFI payload. This provides a simple way to test different payloads using
the same SBL image.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
This patch enabled DISABLE_NEW_DEPRECATED_INTERFACES build option by
default so that the deprecated APIs cannot be used in SBL source tree.
It is to enhance the coding for security.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
This patch added a simple parser for grub.cfg to make it easy to boot
Ubuntu ISO image using OsLoader payload. Without it, it is required to
copy vmlinuz/initrd to root directory and create a config.cfg to list
the kernel boot command line in order to boot the ISO image. This patch
makes it possible to boot the original Ubuntu ISO (16.04 or 18.04)
directly. It provides better user experience for people who wants to
try out SBL.
Please note, same as before, when verified boot is enabled, only debug
build will support this feature. Release build will disable this feature
due to security concern, please use IAS image boot mechnism instead.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
Smm bases for all the procs need to be relocated on the
S3 resume path (as payload is not run) for Windows boot.
Signed-off-by: Sai Talamudupula <sai.kiran.talamudupula@intel.com>
This patch adds FPDT table into ACPI table, and updates all
the performance data for S3 path.
It also update basic boot performance data for reset end.
Other boot performance data could be updated by UEFI payload.
Signed-off-by: Guo Dong <guo.dong@intel.com>
Current SBL can only support on VBT file. However, different board
might need different VBT table. It is better to have the capability
to embed multiple VBT table into the image. This patch implemented
this feature and enabled it on QEMU. By default, it will take the
original behavior. if _MULTI_VBT_FILE in BoardConfig.py is specified,
multiple VBT files can be used.
If multiple VBT table support is required, list them as:
{VbtImageId1 :VbtFileName1, VbtImageId2 : VbtFileName2, ...}
VbtImageId is ID to identify a VBT image. It is a UINT32 number to
match the ImageId field in the VBT container.
VbtFileName is the VBT file name. It needs to be located under platform
VbtBin folder.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
This patch fixed some QEMU firmware update related issues.
It enabled firmware update testing on QEMU using script.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
This patch added SMM TSEG range support in QEMU FSP. It also added
QEMU TSEG base and size reporting in HOB.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
This patch updates firmware update code to get capsule location
information from configuration data instead of searching in all the
available boot media.
Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
Previous USB keyboard console support commit worked fine on APL real
platform, but it has issue on QEMU. This patch further enables USB
keyboard console support for QEMU. A new PcdUsbKeyboardPollingTimeout
is added. It will be used to control the USB keyboard interrupt
transfer polling timeout. For QEMU, it needs a larger number due to
timing issue. As part of it, booting from USB device is also enabled
by this patch. This patch fixes#30.
To test USB keyboard console in QEMU, please first change
CONSOLE_IN _DEVICE_MASK in BoardConfig.py to 3, and then add the
following in the QEMU command line to add XHCI controller and USB KB:
-device qemu-xhci,id=xhci,bus=pcie.0,addr=4 -device usb-kbd,bus=xhci.0
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
On APL platform, all PCI MMIO range is set to UC in current
implementation. It includes graphics framebuffer MMIO. It
caused the system performance issue due to large mount of
framebuffer write access. This patch set framebuffer as
WC (WriteCombining) per recommendation to enhance system
performance.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
This patch simplifies the GraphicsLib code and adds an abstraction layer
for printing to a virtual "console," through the familier
ConsoleWrite(buffer, len) style function call.
ConsoleWrite can be configured to output to either the serial port, or
the display framebuffer, or both. This primarily enables the command
shell to be used with a display and keyboard.
Signed-off-by: Borgerson, Matthew A <matthew.a.borgerson@intel.com>
* Enable DebugAgentLib to support source level debug over serial
By default, source level debug is NOT enabled. ENABLE_SOURCE_DEBUG
needs to be set to 1 in BoardConfig.py of each Platforms.
- self.ENABLE_SOURCE_DEBUG = 1
As an initial drop, there are some limitations on APL platform.
- Stage1A does not include DebugAgentLib due to Stage1A size
limitation(32KB). Further optimization is required.
- DebugAgentLib supports ONLY POSTMEM debugging on APL currently.
Refer to EDKII Debugging:
- https://github.com/tianocore/tianocore.github.io/wiki/EDK-II-Debugging
- https://github.com/tianocore/tianocore.github.io/wiki/SourceLevelDebugPkg
Change-Id: Ia28c5470bc5755768f2b380cc1dabbcb8ee60f0d
Signed-off-by: Aiden Park <aiden.park@intel.com>
* Additional changes for DebugAgent
- Adjust stage size depending on ENABLE_SOURCE_DEBUG Pcd value
- Add PeCoffFindAndReportImageInfo
- Fix debugger hang at Shell
Change-Id: I11b41e5ad610fcb2999e9d43e5dd8f8899e8265a
Signed-off-by: Aiden Park <aiden.park@intel.com>
* Move PeCoffFindAndReportImageInfo() from LitePeCoffLib to DebugAgentLib
Change-Id: I2c4ab4f9561dfd0536da1820048f0e5f2660e2ab
Signed-off-by: Aiden Park <aiden.park@intel.com>
This patch implemented USB keyboard library and added it as an
input console device. It can be enabled by setting BIT1 in
self.CONSOLE_IN_DEVICE_MASK in BoardConfig.py. By default, it
will be disabled for performance and size consideration.
Test has been done on APL Leafhill board. USB keyboard can work
in Shell.
Signed-off-by: Maurice Ma <maurice.ma@intel.com>
Update build tool to use Buildloader.py to build SBL
in both Linux and Windows.
Update tools to support multiple workspaces, so platform
packages could be in another place.
TEST=Build qemu and APL platform success.
Change-Id: I2482037ba605218c947b6de28abe8e3eeacdc17f
Signed-off-by: Guo, Dong <guo.dong@intel.com>