Commit Graph

112 Commits

Author SHA1 Message Date
Aiden Park f72baff803
[Script] Skip CopyFspBins for unsupported platforms (#182)
Instead of Exception, need to skip FSP copying for all unsupported platforms

Signed-off-by: Aiden Park <aiden.park@intel.com>
2019-06-11 17:21:53 -07:00
Aiden Park ad835d686c Initial baseline for Whiskeylake/Coffeelake platforms support
- Build command (target 'cfl' is common for both WHL/CFL)
  python BuildLoader.py build cfl

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

Signed-off-by: Aiden Park <aiden.park@intel.com>
2019-06-11 15:24:46 -07:00
Guo Dong 9b24273090 Add ACPI_ENABLED()
Add ACPI_ENABLED() to align with MEASURED_BOOT_ENABLED().
Update MEASURED_BOOT_ENABLED() by checking PcdMeasuredBootEnabled
firstly.
Update PlatformFeaturesInit () in stage1b to fix potential inconsistent.
Update other code for changes above.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2019-06-06 14:28:00 -07:00
Raghava Gudla c55eb04d03 Fix error during capsule generation
Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
2019-05-24 15:58:43 -07:00
Raghava Gudla cd2f00fe2c Add Multiple firmware update capsule image support
This patch will add support for updating multiple firmwares
using a single capsule image.

Following modifications are made for existing firmware update flow

1) Gather and validate capsule image
2) State Machine will be set to capsule processing state.
3) Signature of the capsule image is now stored in reserved region
   During each reboot until the end of firmware update, stored signature
   will be compared against the capsule image signature to make sure
   capsule image is not modified until the end of firmware update.
4) Process Capsule image to gather firmware images
5) Each Firmware image information will be stored in reserved region
   using FW_UPDATE_COMP_STATUS. Update pending will be marked to
   update pending state indicating that this image is not processed.
6) Firmware update will use the reserved region comp structures starting
   with the first image with update pending state, update the comp update
   pending field to processing and applies the image. After the update, pending
   field will be updated to Done and updates the status of the update in the
   component structure and moves on to next image found.
7) After all the component structure in the reserved region updating pending
   field are set to Done. Firmware update mode is exited.

Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
2019-05-23 15:52:47 -07:00
Raghava Gudla f489425ba7 Package multiple firmware into single capsule
This patch will update GenCapsuleFirmware.py tool to package
multiple firmware update images into single capsule.

Example:

python GenCapsuleFirmware.py -p BIOS pld1.bin -p <GUID> pld2.bin
	   -p CSME Pld3.bin -p CSMD Pld4.bin -o img.bin -k  TestSigningPrivateKey.pem

The following are the changes made

1) Capsule header format is changed to align with
   EFI_FIRMWARE_MANAGEMENT_CAPSULE_HEADER
2) Each firmware image in the capsule will have
   EFI_FIRMWARE_MANAGEMENT_CAPSULE_IMAGE_HEADER
3) BIOS, CSME, CSME Update Driver (CSMD) and CFGData payloads
   can be passed to the tool using their names as suggested in
   example.
4) Unknown payloads can also be passed to the tool with associated
   guid as input.

Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
2019-05-23 15:35:24 -07:00
Guo Dong f8d361c2a3 Add MP hook point for platform CPU init
Some platform might need do some platform specific init
on all the threads. So add a MP hook using a PCD.
Np impact for the platform that doesn't need this hook.
This patch also enable InSMM bit for APL.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2019-05-17 09:47:43 -07:00
James Gutbub 7a325d18ea Add BaseMemoryLibSse2 library
Copying the MdePkg BaseMemoryLibSse2 library into
SBL for faster CopyMem and other routines to improve
boot performance every where except for Stage1A &
Stage1B due to 'movntdq' usage limitation in earlier
stages. Remove all of the X64 files since SBL is compiled
as 32-bit. Also patch PCI enumeration code to perform
manual memory copying (using SSE2 CopyMem gives some
issue as tested on APL).

The BaseMemoryLibSse2 folder was copied from EDK2
GitHub based on the following commit ID:

9344f0921518309295da89c221d10cbead8531aa

Signed-off-by: James Gutbub <james.gutbub@intel.com>
2019-05-14 14:56:29 -07:00
James Gutbub e75dd48e83 Enhance BMP image splashing
Current implementation of splashing a BMP image to the
display requires the allocation of a temporary buffer
to store the BMP image into a GOP Blt friendly format
that can then be used to splash the image to the display.
Instead of using a buffer for the whole image we can
allocate a smaller buffer to splash one line at a time
since splashing is already performed one line at a time.

Also fix a small print message regarding frame buffer
format.

Signed-off-by: James Gutbub <james.gutbub@intel.com>
2019-05-13 15:55:55 -07:00
Sai Talamudupula 0522b833df Add Smbios support
Initial Smbios support infrastructure

Signed-off-by: Sai Talamudupula <sai.kiran.talamudupula@intel.com>
2019-04-30 15:22:05 -07:00
Maurice Ma 02771f5fb9 Add payload binary file check in BuildUtility.py
This patch added the additional existence check for payload binary.
If the file does not exist, it will error out.  Also if the binary
is already under build FV folder, skip the unnecessary copy.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2019-04-23 11:11:46 -07:00
James Gutbub 0721b7c3d4 Add pre-OS checker support
Some OSes may require a pre-OS checker executable
to run before actually jumping to the OS. Add
support for this pre-OS checker loading & execution
as part of the OS Loader payload when it is compiled
as an FV and when ENABLE_PRE_OS_CHECKER option is
enabled in BoardConfig.py (per the following command):

SblBuild.py build <plat> -p OsLoader.Fv:LLDR:Lz4

The pre-OS checker entry point takes in a single
parameter which provides the CPU boot state that
should be loaded once jumping into the OS for the
pre-OS checker to launch after it finishes execution
(e.g. pre-OS checker does not return to Slim Bootloader).

Signed-off-by: James Gutbub <james.gutbub@intel.com>
2019-04-15 14:16:03 -07:00
Maurice Ma 872f046291 Fix help information for PatchFv.py
The usage information cannot be printed properly in PatchFv.py.
This patch fixed #136.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2019-04-12 10:59:19 -07:00
Maurice Ma ff2f614917 Allow searching payload file in build FV folder
When specify a payload file in the build command line, the current
searching folder is: PayloadPkg/PayloadBins, Platform/$(PlatformBoardPkg)
/Binaries. This patch added another searching folder in the Build FV
if the payload file cannot be found in the listed folders above. This
is useful when the payload image itself is generated from the build
process.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2019-04-12 10:44:21 -07:00
Guo Dong ef4dbd9177 Fix debug message display issue
The message was displayed before the value was copied.
So adjust the sequence to correct it.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2019-04-10 12:18:06 -07:00
Guo Dong 5c041c0fe1 Clean up graphics HOBs
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>
2019-04-10 10:23:58 -07:00
Maurice Ma 1253b19c14 [QEMU] Adjust SPI image layout to have fixed size
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>
2019-04-08 11:59:10 -07:00
James Gutbub f022d093ba Add SBL logos for community usage
Slim Bootloader has its own set of approved logos. Add them to
the repo for community usage along with guidelines on logo usage.

Signed-off-by: James Gutbub <james.gutbub@intel.com>
2019-04-03 13:33:09 -07:00
Maurice Ma ca6b6d56c4 Update SBL to use the approved SBL logo
Slim Bootloader has its own approved logo. Updated the original logo
to use this new one.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2019-03-26 09:05:09 -07:00
Maurice Ma 9f3b9f2a3b Add command line loading CFGDATA support in ConfigEditor
This patch added support to load CFGDATA directly from command line
interface. Minor clean-up work is also done to remove unused and
duplicated functions.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2019-03-20 16:30:05 -07:00
Raghava Gudla f514ba35b7 Added support for FWST OEM ACPI table
This patch added support for FWST ACPI table. This table
contains generic address structure which has pointer to the
EFI System Resource Table.

ESRT table for now supports only system firmware. This table
will provide the operating system and tools knowledge of what
is the last attempt status and version of the system firmare
update.

Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
2019-03-20 16:03:57 -07:00
Raghava Gudla ed4f7d1aad This patch add code to handle fsp requested reset
after silicon init API call. Also added code after
memory init to differentitate warm and cold reset requests.

Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
2019-03-20 15:59:19 -07:00
Maurice Ma f6c1b690c2 Disable deprecated EDKII API interfaces
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>
2019-03-14 11:26:03 -07:00
Matt Borgerson 90e61539bb Add basic pre-build check for OpenSSL/NASM
Signed-off-by: Matt Borgerson <matthew.a.borgerson@intel.com>
2019-03-06 13:27:44 -08:00
Sai Talamudupula 5f09e82c10 Enhance SMMBASE_INFO communication structure
Match the strcture definition with payload

Signed-off-by: Sai Talamudupula <sai.kiran.talamudupula@intel.com>
2019-03-01 21:10:12 -08:00
Maurice Ma d397299797 Add GRUB config file support to boot Ubuntu
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>
2019-02-28 12:42:44 -08:00
Sai Talamudupula 14c3862005 Relocate SMM bases on S3 resume path
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>
2019-02-26 11:23:29 -07:00
Guo Dong d6c1ea6964 Add ACPI Firmware Performance Data Table (FPDT) support
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>
2019-02-25 10:03:46 -07:00
Maurice Ma a11fbf0538 Add multiple VBT table support
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>
2019-02-13 17:15:33 -08:00
Maurice Ma 66aa54a5fa Remove Debug/Release field from VerInfo.txt file
In current implementation, FspDebug/BldDebug flag is saved into
VerInfo.txt. But it should be always determined by the build flags
instead of the VerInfo.txt file. This patch fixed #84 .

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2019-02-07 09:51:05 -08:00
Maurice Ma f9397b39a4 Add duplicated CFGDATA check in GenCfgData.py
CFGDATA name should be unique in the whole CFGDATA database. Current
tool does not check this and will keep silent for this error. This
brings issue into later development stage. The build process should
be enhanced to check this and error out if duplicated CFGDATA item is
found. This patch added this check.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2019-02-06 08:04:16 -08:00
Sai Talamudupula 635645705f Adding print for EXT CFG data and payload ID
Print a debug message if EXT CFG Data fails to append
in the config database. ALso, print the Payload ID in
stage2.

Signed-off-by: Sai Talamudupula <sai.kiran.talamudupula@intel.com>
2019-01-31 14:47:33 -08:00
Maurice Ma 7b37f56ff2 Refactor LiteFvLib/LitePeCoffLib implementation
This patch did some clean up for LiteFvLib and LitePeCoffLib.  It
also moved LoadFvImage() API from Stage2 core code into the LiteFvLib.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2019-01-31 14:06:36 -08:00
Maurice Ma a6efeb29eb Enable payload loading to high memory by default
This patch enabled payload loading into high memory by default. It
is a more flexible way to allocate memory for payload image instead
of hard-coded base address.  However, in some special cases, such
as UEFI payload, it still needs to be executed at pre-compiled address.
This patch also handled this special case in the flow.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2019-01-31 08:04:57 -08:00
Maurice Ma da11283b51 Allow payload binaries to be located in platform folder
This patch added support to allow payload binaries in platform folder
instead of PayloadPkg/PayloadBins. Sometimes platform might have its
own customized payload specifically for this platform. In this case,
it is better to put the payload binaries in its platform folder.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2019-01-28 13:54:25 -08:00
Guo Dong 095f281023 Enhance UEFI payload support
Previously SBL expects UEFI payload entrypoint and base at
hardcoded address of FV header. With this patch, SBL could
parse FV to get these info.

TEST=Tested on Leafhill and boot UEFI payload success.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2019-01-28 13:54:11 -08:00
Raghava Gudla d6d0e92a80 Fix firmware update failure
When UEFI payload or epayload is enabled and firmware update mode
is enabled, current code in prepare payload function will consider
firmware update payload as multi payload. This is causing failure
and end up as halting cpu.

This patch will add an additional check for firmware update mode
and do hash verification

TEST=Verified that firmware update is working when UEFI payload
	 is enabled.

Signed-off-by: Raghava Gudla <raghava.gudla@intel.com>
2019-01-25 17:01:37 -08:00
Guo Dong ee4b3f812f Add SMM support to UEFI payload
Build a new SMM info HOB to payload to report SMM info.
Add UEFI payload variable region into flash map.

TEST=Tested on LeafHill with UEFI payload.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2019-01-22 17:11:54 -07:00
Maurice Ma 650fcf1cb7 Retrieve version info from proper platform repo
SBL supports putting platform packages in a separate repo tree
defined by environment variable PLT_SOURCE. Current build process
will always retrieve the latest commit id info from open source
repo as version even when the platform uses a separate repo tree.
This patch corrected this behavior. When a platform package is in
a separate repo, the git commit id info will be retrieved from that
platform repo instead.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2019-01-17 13:55:42 -08:00
stalamudupula e48f46236d Enhance BuildUtlity tool (#58)
Updated BuildUtility.py to allow IAS file to use relative file path
from platform directory.

Signed-off-by: Sai Talamudupula <sai.kiran.talamudupula@intel.com>
2018-12-19 09:17:38 -08:00
Aiden Park 397f25b853
Remove Python cx-freeze dependency (#51)
Ported the patch from EDKII repository and added following up changes

<Original commit info in EDKII>
commit 7b500c606ad101fad52327318af37889048cd45e
Author: Liming Gao <liming.gao@intel.com>
Date:   Tue Oct 16 23:08:46 2018 +0800

    BaseTools: Remove the step to freeze python tool

    https://bugzilla.tianocore.org/show_bug.cgi?id=1257
    Binary python tool is not supported anymore. So, the freeze python tool
    step is not required.

Signed-off-by: Aiden Park <aiden.park@intel.com>
2018-12-03 15:05:24 -08:00
Guo Dong a005c979eb Update GenCfgData tool (#48)
Remove SBL_SOURCE env dependency when searching DSC file, instead it
uses GenCfgData tool path to find the slim boot source root.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2018-11-28 17:37:35 -08:00
Guo Dong 501be46716 Update file system support
The patch gives the platform the configuration capability to only build
required file system into final image.
This helps to have a smaller image for fast boot.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2018-11-27 15:09:14 -07:00
Vijay B S b83bf23a93 Retain the state of cache disable bit
This patch retains the cache disable bit status
at reset vector. Needed for secure boot.

Signed-off-by: Vijay B S <vijay.ballagere.siddalingaiah@intel.com>
2018-11-19 08:08:04 -07:00
Guo Dong cd9edfdd8b Add Device table
Update core code to support device table.
Updated boot option to consume device table.
Update firmware update to consume device table.
Update shell command on boot option changes.
Add device table for APL and Qemu.
Remove unnecessary code.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2018-11-12 09:38:59 -07:00
Maurice Ma dd3c729361 Rename KeyStore to HashStore to reduce confusion
Current code refers hash store as "key store". It is confusing
since there is no key stored in the image at all.  Instead, the
public key hash is stored.  The patch renames the KeyStore
to HashStore.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2018-11-09 16:49:37 -08:00
Guo Dong 193eb17192 Update file Guid and name in BootloaderCoreLib
BootloaderCoreLib use same File_GUID and Base_NAME
with BootloaderLib, this patch updates INF to fix
this issue.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2018-11-09 16:30:22 -08:00
Aiden Park e690373d7b [APL] Fix a compile error when VTD is disabled on APL
When VTD_ENABLE sets to '0', a compile error occurs because some .inf
files refer to VtdLib. Therefore, VtdLib is included to default
libraries - dsc_libs['IA32'].

Additionaly, VTD_ENABLED is renamed to ENABLE_VTD to make feature
enabling name consistent

Change-Id: I74c12bdc2805ebd0a5774780f029a460b33d19d5
Signed-off-by: Aiden Park <aiden.park@intel.com>
2018-11-09 14:20:07 -08:00
Maurice Ma e8d879ebb5 Convert ASM opcode to instructions in MpFuncs (#37)
Current MpFuncs.nasm used hard coded opcodes to support 16bit ASM.
It makes it difficult to maintain. Per suggestion, this patch
convered the 16bit opcodes into instruction directly.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2018-11-02 09:09:46 -07:00
Maurice Ma f768137b66 Add basic SMM rebasing support
SBL has no intention to support SMI. However, on many hardware
platforms, there is no reliable way to prevent SMI from generating
through SMI IPI.  In case it occurs, CPU will jump to the default
0x38000 location for execution, which exposes huge security issues.

The recommended solution is to do basic SMM base relocation and put
a dummy SMI handler (RSM) there for platform does not support SMI
disabling. In this way, the SMI will be ignored, and it also closes
the security concerns. This patch implemented basic SMM relocation.

It is under the control of a new PCD PcdSmmRebaseEnabled. By default,
it is disabled.  To enable it, please set ENABLE_SMM_REBASE in
BoardConfig.py. As part of it, platform library needs to set
PcdSmramTsegBase and PcdSmramTsegSize properly in PreSiliconInit board
hook. Please take APL platform for reference.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2018-11-01 20:00:13 -07:00
Aiden Park 5c19d4a9aa Fix a build failure on Windows with Visual Studio
Explicitly type cast from a data pointer to a function pointer.

Change-Id: Ia060bc7ac2c9176fe19d289c484285918b9befe8
Signed-off-by: Aiden Park <aiden.park@intel.com>
2018-10-30 17:41:41 -07:00
Aiden Park 76db3e9714 Support ELF format payload
In order to support ELF format payload in Stage2, ElfLib is separated
from MultibootLib.

Additionally,
- Load ONLY Executable/Loadable segments
- Keep LoadElfSymtab function for future use
- Mark ELF syms flag as 'not supported' in MultibootInfo

Change-Id: Iec1ca6770ffeff9222b71327216cc6176ea1e925
Signed-off-by: Aiden Park <aiden.park@intel.com>
2018-10-30 17:41:41 -07:00
Maurice Ma 697c02302f Enable USB keyboard console support for QEMU
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>
2018-10-29 09:39:27 -07:00
Guo Dong 3fe37921b1 Enhance GenCfgData tool
Currently GenCfgData.py tool could open generated
CfgDataDef.dsc, but could not open CfgDataDef.dsc
in the source code since it includes other DSC files
in CommonBoardPkg. The files could not be found by
default if SBL_SOURCE is not defined.
This patch would search DSC in CommonBoardPkg, so
even SBL_SOURCE is not defined, it could still open
CfgDataDef.dsc.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2018-10-26 13:17:01 -07:00
Maurice Ma 03385ca8a7 Enable graphics framebuffer as WriteCombining
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>
2018-10-26 11:03:09 -07:00
Borgerson, Matthew A 2255bc10b0 Enable basic framebuffer text console output
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>
2018-10-25 19:25:44 -07:00
Aiden Park e74b4e5ce5 Start DebugAgent from the beginning of Stage1B
Hardware Breakpoints must be used during CAR execution until
memory has been initiailzed for APL platform.

In order to use Hareware Breakpoints in UDK debugger, add
FlashRange in UDK config file and force to cover CAR area.
In SoftDebugger.ini of Windows UDK Debugger
Or In /etc/udkdebugger.conf of Linux UDK Debugger
  [Target System]
  FlashRange        = 0xFEF00000:0x1100000

Additionally,
  added Stage1BBase in STAGE1A_HOB
  fixed Stage1A module base report

Change-Id: I717f87bf141168de0b0987eb309fd4c5d48d3c14
Signed-off-by: Aiden Park <aiden.park@intel.com>
2018-10-16 14:47:13 -07:00
Aiden Park b6697f12a8
Enable DebugAgentLib to support source level debug over serial (#18)
* 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>
2018-10-15 10:45:23 -07:00
Maurice Ma 09f8270825 Add USB input console support
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>
2018-10-09 12:56:58 -07:00
Maurice Ma bd1ea24cc1 Add ConsoleInLib to abstract console input (#13)
Current implementation assumes serial port is the only input console
device supported.  But other input console devices can be added later
on. This patch added a ConsoleInLib to abstract the input console
interfaces.  It also added PCDs to control enabled input console
devices.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2018-10-05 14:36:29 -07:00
Guo, Dong fb8d75f08e Retire windows build script
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>
2018-09-28 08:18:23 -07:00
Maurice Ma c6999f497a Initial check-in for Slim Bootloader source 2018-09-13 16:11:07 -07:00