Include new PMU firmware file in the PSP BIOS directories that
are available on Turin SOC.
Upstream-Status: Pending
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Avoid adding APOB NV or BIOS NV is size is not specified. Otherwise,
the PSP BIOS directory may end up with BIOS NV of base 0 and size 0.
Upstream-Status: Pending
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Add new parameter to pass the SBOM directory path where the SBOM JSON
files should be placed. If the path is not NULL, generate the SBOM
JSON file for each unique AMD PSP and BIOS directory entry processed
by the amdfwtool.
Upstream-Status: Pending
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
When using ROM Armor, the AMD_BIOS_APOB_NV BIOS directory table
entry needs to be marked as writable. Add support for marking
BIOS directory table entries as writable and set all BIOS directory
files to RO, except for AMD_BIOS_APOB_NV (type 0x63), which is
written at end of coreboot based on the FMAP.
TEST=ROM Armor 3 enabled system can write APOB through PSP mailbox
interface. When the writable bit is not set cannot write APOB
through mailbox interface.
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Change-Id: Idce7f4afbdd2246a5c0fc96d27c3c721e4a5b03a
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91700
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Upstream-Status: Backport [CB:91700]
When ROM Armor is enabled and PSP is not in "capsule update mode",
the PSP can only write to PSP directory entries that have the writable
bit set. As the fTPM PSP trustlet must write to NVRAM regions as part
of the fTPM operation, set the writable bit on such regions.
Fixes crash on PSP side when using ROM Armor and fTPM.
Signed-off-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Change-Id: I5668976d687e5f9aa3fc62e91adf6bde5cadb5b8
Reviewed-on: https://review.coreboot.org/c/coreboot/+/91699
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Maximilian Brune <maximilian.brune@9elements.com>
Upstream-Status: Backport [CB:91699]
AMD_FW_GFXIMU_2 entry has the same type value as AMD_FW_SRAM_FW_EXT.
The tool may integrate one of these blobs incorrectly, because
it searches for the first entry of given type in the amd_psp_fw_table.
AMD_FW_GFXIMU_2 could have been added by mistake, because there is no
board that actually defines PSP_GFX_IMMU_FILE_2 in fw.cfg file.
Change-Id: I7e1f38c77156d06e9e6d801bdfa9b9eefcbb374e
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/90388
Reviewed-by: Patrick Rudolph <patrick.rudolph@9elements.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Upstream-Status: Backport [CB:90388]
This is needed to properly set addresses of objects located in the Top
Swap region of the flash, when Top Swap-based redundancy is enabled.
Upstream-Status: Pending
Signed-off-by: Michał Kopeć <michal.kopec@3mdeb.com>
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Separating the bootblock into two copies (in BOOTBLOCK and TOPSWAP fmap
regions) breaks the CBFS verification as TSPI CRTM knows nothing about
the new regions and looks for bootblock in a hard-coded COREBOOT fmap
region.
Introduce and use cbfs_unverified_area_type_alloc() which is an
extension of cbfs_unverified_area_alloc(), very similar to how
cbfs_ro_type_map() is an extension of cbfs_ro_map(). This allows to
specify a region of the bootblock file and skip verification because
bootblock serves as a container of hashes and is not verified itself.
The branching is done on the state of RTC BUC to always use the current
bootblock. Somewhat confusingly, the measurement always uses BOOTBLOCK
region because with active Top Swap that's the way to access a
memory-mapped TOPSWAP region.
Makefile.mk now verifies both COREBOOT and COREBOOT_TS regions.
cbfstool needed a few updates as well:
- recognize both "BOOTBLOCK" and "TOPSWAP" regions
- recognize both "COREBOOT" and "COREBOOT_TS" regions
- reset metadata cache before processing each region as cache may now
be invalid
SMM doesn't link with vboot functions, so cbfs_file_hash_mismatch() has
to skip verification in SMM due to the use of CMOS options backend.
This is a part of the bootblock redundancy feature proposed
on the mailing list:
https://mail.coreboot.org/archives/list/coreboot@coreboot.org/thread/C6JN2PB7K7D67EG7OIKB6BBERZU5YV35/
Tested by successfully booting into Protectli VP6670 with Top Swap and
CBFS Verification features enabled and Top Swap state being toggled.
Change-Id: Ia75e714ae84d8c0ae09b27495e3056313b109999
Upstream-Status: Backport [CB:8961]
Signed-off-by: Filip Gołaś <filip.golas@3mdeb.com>
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Reviewed-on: https://review.coreboot.org/c/coreboot/+/89691
Reviewed-by: Michał Kopeć <michal.kopec@3mdeb.com>
Reviewed-by: Filip Lewiński <filip.lewinski@3mdeb.com>
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Some variables can't be described using any of the predefined types.
Allow passing their values from a file.
Upstream-Status: Pending
Change-Id: Idb03e8dbdbdd446cc16cae584640cf1641ecc2c1
Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Commands and parameters are passed as raw numbers, but that's the point,
we want to test it with something more than normal SMMSTORE interface.
Upstream-Status: Pending
Change-Id: Ib3a32f0bdef038e4ccc2fb2bb8a6c98ae6d0cfbd
Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
This fixes the following Perl error (which prevents pre-commit hook from
succeeding):
Possible precedence problem between ! and pattern match (m//)
`!$filename =~ /~$/` was apparently interpreted as
`(!$filename) =~ /~$/`. Fix that by wrapping `=~` expression in
parenthesis.
Upstream-Status: Pending
Change-Id: If63a4b6981e5b562a9af7f2f8ac64947fad7f7b0
Signed-off-by: Sergii Dmytruk <sergii.dmytruk@3mdeb.com>
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
If the script is run in the directory that was used to build coreboot,
chances are that edk2 repository is already cloned in the payloads
subdirectory. It is passed as '--reference-if-able' option, which
reduces the number of objects to be downloaded, even when it is checked
out on older revision. If that path doesn't exist, the repo gets cloned
as usual.
Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: I11eae8a7d87923a469ac7ba927103395ceb979f4
Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Other payloads aren't supported.
Both submodules and edk2 commits are nested one level deeper that the
main log. This is a compromise between enough information (previously
just the number of commit added in a submodule was printed) and clear
grouping between categories.
Changelog for edk2 is limited in history, it starts with the first
commit pointed to by common Kconfig default. For releases made before
this commit, a warning about a possibly incomplete edk2 changelog
will be shown in the comment just above the changelog. The changelog
will be complete only if older tag is made after this commit, in most
cases this will be two releases (or release candidates) from now, for
each platform separately.
Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: I9db19340b25ba8fe3c8382217e777c9dbe901d04
Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Protectli and NovaCustom aren't split to dedicated groups for single
boards, since new platforms are added often for those vendors.
Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: I2385ec18605f3095580857fdcac0f0e726446794
Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Apart for new comments for handling the tags, the format of log file
was adjusted so that all informational lines that are not expected in
the final tag description are written as comments. The changelog file
now starts with the instructions for the committer.
This commit also changes the logic checking for clean git tree - the
script no longer requires running from the main branch.
Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: I9c9b5712fc346a59e9ad0bf7969ee0be1f473a61
Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
This includes:
- tool check - it is assumed that git is installed, and other tools are
no longer required
- lines of code calculations - not required for a changelog
- list of added or removed mainboards, SOCs, CPUs etc.
- number of commits by author and list of new authors
Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: I17ef764516cd4ca3467e96f39ac0c81b28b8e06a
Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
This is an exact copy of util/release/genrelnotes as of 50e8579bfd
("util/release: Remove makefile.inc references from genrelnotes").
It will be modified for a new role in following commits.
Upstream-Status: Inappropriate [Dasharo downstream]
Change-Id: I32f3d2cb5ad57a52f4b20791f31f2b8ebdfcdd4a
Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
The utility assumed that TCG TPM log area is zeroed and then filled
with events but it does not have to be true. If there is garbage
after the last valid event entry, the utility will most likely
access data outside of the cbmem area containing the logs. Relevant
issue: https://github.com/linuxboot/heads/issues/1608
TEST=Dump TCG TPM1.2 event log on Dell OptiPlex 7010 and see
"Invalid TPM1.2 log entry overflowing cbmem area" error is printed.
Upstream-Status: Submitted [CB:84926]
Change-Id: I7e057db3378b701d046d4e578272b10f294142a7
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>
Print key hashes when displaying manifests as it may be useful when
obtaining information from binary about the used keys and what hash
should be provisioned in TXE.
Change-Id: I288fbb3db6b42e231977683145ce67e8fbd98dfc
Upstream-Status: Pending
Co-authored-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Signed-off-by: Michał Żygowski <michal.zygowski@3mdeb.com>