Commit Graph

110 Commits

Author SHA1 Message Date
lsubash 8b00a77adb Update TPM Type to Loader Platform info HOB
TPM type as dTPM and fTPM is utilized in UEFI payload to
update TPM instance

Signed-off-by: Subash Lakkimsetti <subashx.lakkimsetti@intel.com>
2019-07-31 07:57:14 -07:00
Markus Schuetterle c1117a2be5 Add support for ELF type: Shared object file
SBL only support ELF type: EXEC (Executable file)
This changes also allow loading ELF type: DYN (Shared object file)

This is required to boot recent ACRN Hypervisor.

Signed-off-by: Markus Schuetterle <markus.schuetterle@intel.com>
2019-07-31 07:56:15 -07:00
Maurice Ma 626a8db20e Add temporary memory management for MemoryAllocationLib
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>
2019-07-29 14:44:02 -07:00
Guo Dong 214fd3de91 Add a platform flag for SPI flash SMM write disable
When writing flash in SMM mode, some platform need disable SMM write
protection. when this flag is set, it means this platform need disable
SMM write protection.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2019-07-29 14:42:19 -07:00
James Gutbub bc8f743c53 Add EXT2F_INCOMPAT_RECOVER to EXT2F_INCOMPAT_SUPP
Currently there is some limitation with mounting an
EXT4 partition to retrieve a file for booting when
the partition was not properly umounted during the
previous usage (ex. powering off an OS without
using 'poweroff' command, unplugging power, etc.).

There is no recovery support in the Ext23Lib but
as a temporary solution we can ignore the recovery
bit to avoid boot issues when the recovery bit is
flipped due to unexpected power loss.

Signed-off-by: James Gutbub <james.gutbub@intel.com>
2019-07-22 18:34:05 -07:00
Guo Dong a30d2ea913 Enhance SPI Flash Library
1. Add region type FlashRegionAll support
2. Add Hardware sequence check

Signed-off-by: Guo Dong <guo.dong@intel.com>
2019-07-18 13:25:01 -07:00
Sai Talamudupula 10fa1fe72a Handle empty and NULL strings in Smbios types
If the platform provides an empty or a NULL string,
Smbios type might end abruptly and the Types are
reported incorrectly.

Signed-off-by: Sai Talamudupula <sai.kiran.talamudupula@intel.com>
2019-06-26 17:13:48 -07:00
James Gutbub c9f5d2e35f Fix EXT4 extent calculations
When determining which extent node to fetch
the filesystem block address from for a file's
data we should count from block 0 of the file
and when we enter into a non-zero extent node
we need to subtract the starting block number
from the file block number we are looking for
so that we don't skip over any blocks.

Signed-off-by: James Gutbub <james.gutbub@intel.com>
2019-06-17 17:04:52 -07:00
Aiden Park 0066eccdb3
Re-implement ElfLib for ELF32 format image (#193)
The previous implementation has a little confusion in license header.
To avoid further annoying, simply re-implement ElfLib.
- 32bits, little-endian, executable elf only supported
- elf32.h/elf_common.h from BaseTools/Source/C/GenFw
- LoadElfImage() interface changed

Signed-off-by: Aiden Park <aiden.park@intel.com>
2019-06-17 16:58:08 -07:00
James Gutbub e702622fee Add support for EXT4 partition reading
The current EXT2/3 library does not support EXT4 partition
reading namely due to a limitation with handling extents
instead of block maps within an I_node's I_block data.

There is a todo currently to support 48-bit logical block
addressing, the code currently does not support reading
larger than 32-bit addresses; throw an ASSERT if upper
16-bits are non-zero.

Signed-off-by: James Gutbub <james.gutbub@intel.com>
2019-06-17 12:08:07 -07:00
Maurice Ma 4061d47f30 Add call to board notifications by default
Current SBL does not call board ReadyToBoot & EndOfFirmware phases
in Stage on normal boot flow. Current open source UEFI payload does not
do it either. It caused some security concerns. The patch enforced
these notification calls on normal boot flow in SBL for all payloads
except for those that can handle board and FSP notification on its own.

It fixed #191.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2019-06-14 16:18:41 -07:00
Maurice Ma 896937483c [WHL] Fix boot performance issue for BP1
On WHL, if using Boot Guard profile 0, booting from BP1 will be
significantly slower than BP0. It is because some code region in BP1
is not covered by MTRR cache settings. This patch adjusted MTRR
settings during PostTempRamInit notification to cover full flash
code region if Boot Guard profile 0 is used.

It fixed #188.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2019-06-13 15:02:36 -07:00
Guo Dong 5e10bd1e07 Update BSD license to BSD+Patent license
To align with EDK2, update file license
to use BSD+Patent license

Signed-off-by: Guo Dong <guo.dong@intel.com>
2019-06-13 10:46:49 -07:00
Maurice Ma 179130751f Fix FAT file path matching issue
In current FAT lib, the file path matching code will just compare
the 1st N chars and ignored the remaining. The end of the string
should be checked to ensure exact matching. As part of this fix,
the GRUB config parsing library needs to be updated since the file
name length field is one less than expected.

It fixed #183.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2019-06-12 10:59:31 -07:00
Maurice Ma 6f8c44b375 Sync up with EDK2 stable tag edk2-stable201905
Synced up MdePkg, IntelFsp2Pkg and BaseTools to EDK2 stable tag
edk2-stable201905.

There are several changes for MdePkg and BaseTools.
MdePkg:
 - Support light print to reduce SBL size
   MdePkg\Library\BasePrintLib\PrintLibInternal.c
   MdePkg\Include\Library\DebugLib.h
 - TCG TPM2 spec changes and remove dependencies
   MdePkg\Include\IndustryStandard\UefiTcgPlatform.h
   MdePkg\Include\IndustryStandard\Tpm2Acpi.h
 - Use old NVM protocol file
   MdePkg\Include\Protocol\NvmExpressPassthru.h
 - Removed unused files

BaseTools:
 - Added LZ4 support
 - Removed unused files

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2019-06-12 08:29:06 -07:00
Guo Dong b9ad47848a Move SpiFlashLib into bootloader common package
Cleaned up SpiFlashLib in APL platform, and move it into
BootloaderCommonPkg, so that other platform could reuse
this SpiFlashLib

Signed-off-by: Guo Dong <guo.dong@intel.com>
2019-06-06 14:28:31 -07:00
Guo Dong 512062b1bd Clean up PCI MM address
Common MM_PCI_ADDRESS() provided PCI device BDF to PCIE MMIO base address.
So remove MmPciAddress() and MmPciBase () defined in platform and update
code to use MM_PCI_ADDRESS().
Add TO_PCI_LIB_ADDRESS() in common library.

Signed-off-by: Guo Dong <guo.dong@intel.com>
2019-06-04 12:30:11 -07:00
James Gutbub 90b155b3e3 Enable EXT2/3 sub-directory filepath image loading
Currently when providing a filepath with sub-directories
the EXT2/3 library is not able to locate the file. The
code for traversing sub-directories is already present
but was not enabled. This change enables this support.
Ex: 'boot/iasimage.bin'

Signed-off-by: James Gutbub <james.gutbub@intel.com>
2019-06-04 11:41:41 -07:00
Aiden Park 497e66eadb [FileSystemLib] Added generic filesystem/file access APIs
FileSystemLib provides generic interfaces to access file system and
its files as a abstraction of FatLib/ExtLib.

- Added CloseFileSystem
  If there are opened files in a specific filesystem, those files
  will be de-allocated in CloseFileSystem.
- Added OpenFile/GetFileSize/ReadFile/CloseFile
  The ReadFile() does not allocate any memory for the file content.
  The caller of OpenFile() MUST allocate necessary memory before
  calling ReadFile().

Signed-off-by: Aiden Park <aiden.park@intel.com>
2019-05-23 15:53:03 -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
Aiden Park 51b69d447b
[PartitionLib] Added ClosePartitions to clean-up partition data (#167)
The FindPartitions() allocates memory for PART_BLOCK_DEVICE instance.
This allocated memory needs to be de-allocated if no more necessary
to avoid memory leak.

TBD: Current partition info needs to be cleared before going to next
boot option.

Signed-off-by: Aiden Park <aiden.park@intel.com>
2019-05-22 09:03:41 -07:00
Aiden Park 592915c7e7
[MmcAccessLib] Fix SD card single block read failure (#165)
- CMD23(SET_BLOCK_COUNT) is for only MMC.
- CMD17(READ_SINGLE_BLOCK) must be used when reading a single block
  with SD card

Signed-off-by: Aiden Park <aiden.park@intel.com>
2019-05-20 09:48:32 -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
Guo Dong 799a9051c8 Update SMM Information HOB
Update LDR_SMM_INFO on SMM control and enable info
Add comments to LDR_SMM_INFO HOB

Signed-off-by: Guo Dong <guo.dong@intel.com>
2019-04-26 08:04:44 -07:00
Maurice Ma 0d8fad8bbc Allow SATA boot option to boot from any AHCI port
For SATA boot option, the hardware partition is mapped into AHCI
port. Current implementation requires a specific AHCI port in order
to boot from that hard drive. This patch added support to boot
from the first detected AHCI port when the hardware partition is
set to 0xFF.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2019-04-19 10:43:10 -07:00
Maurice Ma 3dfcd913eb Fix incorrect image base for TE image
TE image has stripped header to reduce the image size. When calculating
the preferred base for TE image, the gap should be added back in order
to match the actual TE image base. This patch fixed #133.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2019-04-12 10:44:02 -07:00
Maurice Ma 0980e74c12 Remove IPP 7z file from BootloaderCommonPkg
This patch removed the IPP 7z file from the BootloaderCommonPkg.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2019-04-10 10:26:59 -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 98f687e692 [QEMU] Allow select UEFI payload from QEMU command line
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>
2019-03-26 16:37:58 -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
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
Subash Lakkimsetti db58e2358b Log startup locality only when Boot Guard is not enabled
When Boot guard is enabled, Locality event would be
logged from Boot guard library.

Signed-off-by: Subash Lakkimsetti <subashx.lakkimsetti@intel.com>
2019-03-13 08:34:15 -07:00
Maurice Ma a62bd10f63 Add framebuffer info into Multiboot table
Multiboot defined framebuffer structure.  However, it was not
implemented in SBL.  This patch added this support by filling in
the framebuffer information into the multiboot table.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2019-03-06 13:28:10 -08:00
Maurice Ma 93d1915742 Add FAT long file name support
This patch enhanced the FAT library to support long file name. The
old driver only supports 8.3 short name. Combined with FAT full path
support, the FAT library now can load any file from the partition.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2019-03-04 17:42:11 -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
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
Maurice Ma 072d5f5427 Add full path support for FAT file loading
Current FAT library can only support loading file from the root
directory of FAT file system. This patch enhanced it to support
load file from FAT file system with any give full path. Both unix
and Windows style path are supported. For example, "efi\boot.cfg",
"\efi\boot.cfg", "/efi/boot.cfg", etc, all are valid path string.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2019-02-26 08:53:08 -08:00
Subash Lakkimsetti 5e1174fc67 Security Flags updates to LOADER_PLATFORM_INFO
LOADER_GLOBAL_DATA.LdrFeatures is updated in early stages and
subsequent stages could use these flags.

LOADER_PLATFORM_INFO.LdrFeatures is used to for feature updates
and this need to be checked by loader and payloads.

LOADER_PLATFORM_INFO.HwState for Hw supported features as
Boot guard profiles.

Signed-off-by: Subash Lakkimsetti <subashx.lakkimsetti@intel.com>
2019-02-25 10:45:39 -07: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
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
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 1f972af0cd Fix large file read issue on USB device
The current USB block read library trancated the number of blocks
to read from UINT32 to UINT16. It caused read issue for large file
on USB disk. This patch fixed #63. It has been verified on LeahHill
CRB platform.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2019-01-07 13:30:57 -08:00
Huang Jin 3009428255
Fix bug in file system library
When InitFileSystem() API is given EnumFileSystemTypeFat in argument,
the FAT file system is not initialized. This bug is discovered when
firmware update payload fails to load capsule from FAT partition via
shell interface.

Fixed #62 

TEST=Created FwuImage.bin and perform firmware update from SBL shell on
     UP2 board. Verified successful update and booting to Ubuntu 16.04
     from eMMC

Signed-off-by: Huang Jin <huang.jin@intel.com>
2019-01-03 13:18:25 -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
Raghava Gudla 91c09cee79 Updated FwUpdate to get capsule info from cfg data
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>
2018-11-21 10:32:44 -07:00
Aiden Park aabfe786a6
Fix gcc compile errors (#43)
There are 'uninitialized' errors and size exceed error in PAYLOAD
with old gcc versions. This change has been verified with gcc-4.8,
gcc-5, gcc-7 and gcc-8 on Ubuntu 18.04 LTS.

Signed-off-by: Aiden Park <aiden.park@intel.com>
2018-11-15 09:39:16 -08: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
Aiden Park 2f2fb8802e Revert '[DebugAgent] Fix image info loading failure in QEMU CAR stage'
This reverts commit 8cba382774.

The original fix still has the issue on Windows UDK Debugger and
a simpler way can resolve the QEMU specific issue. In UDK debugger
configuration, 'NoAccessLimit = 0' is required for QEMU only.
  [Target System]
  NoAccessLimit = 0x0

This change has been verified on both Linux and Windows UDK Debuggers
and user guide will include this information.

Change-Id: I09de713d7a9a892230475cbc4aca70b1a5c11b3c
Signed-off-by: Aiden Park <aiden.park@intel.com>
2018-11-06 11:33:53 -08:00
Aiden Park 8cba382774 [DebugAgent] Fix image info loading failure in QEMU CAR stage
QEMU FSP reports that CAR base is 0x0, but DebugAgent cannot access
the memory space since MEMORY_READY is not set.
In order to disable low memory filtering, simply check CAR space and
then trigger MEMORY_READY.

Change-Id: I9e1703215c95fd64e2a0be3afd001c59f736e81b
Signed-off-by: Aiden Park <aiden.park@intel.com>
2018-10-30 17:42:04 -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
Borgerson, Matthew A 47ffab52ab Add shell command to print contents of log buffer
This patch adds a new shell command `dmesg` to print out the contents of
the boot log buffer.

Signed-off-by: Borgerson, Matthew A <matthew.a.borgerson@intel.com>
2018-10-29 16:39:00 -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
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
Maurice Ma 97466fac83 Add XHCI controller check during initialization (#21)
Current XHCI library does initialization without checking the
controller PCI class and interface type. It will cause assertion
in late phase if the device is not a real XHCI controller. This
patch added the class and interface type check for XHCI controller.
Also more error handling was added to deal with the initialization
failure.

Signed-off-by: Maurice Ma <maurice.ma@intel.com>
2018-10-16 22:53:43 -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
Maurice Ma c6999f497a Initial check-in for Slim Bootloader source 2018-09-13 16:11:07 -07:00