We tried to run D-RTM on PC Engines apu2 using latest versions from TrenchBoot repositories: SKL from master, GRUB from trenchboot_support_2.04, and kernel from linux-sl-5.13-amd branch.
Version
Firmware:
coreboot build 20212712
BIOS version v4.15.0.2
SeaBIOS (version rel-1.14.0.1-0-g8610266a)
1st scenario: TrenchBoot latest version (from here):
Patch for secure-kernel-loader with IOMMU workaround - link
To Reproduce
Build TrenchBoot using defconfigs from following versions, or use our branches
to build image with bitbake: meta-fobnail
(Pull requests with [NOT FOR MERGE] prefix)
Boot prepared system
Expected behavior
Booting from GRUB and SKL to Linux shell properly, without kernel panic on first
scenario
Actual behavior
In the 1st scenario: secure-kernel-loader is unable to run kernel because of
bad bootloader data format:
grub_cmd_slaunch:122: check for manufacturer
grub_cmd_slaunch:126: check for cpuid
grub_cmd_slaunch:136: set slaunch
grub_cmd_slaunch_module:156: check argc
grub_cmd_slaunch_module:161: check relocator
grub_cmd_slaunch_module:170: open file
grub_cmd_slaunch_module:175: get size
grub_cmd_slaunch_module:180: allocate memory
grub_cmd_slaunch_module:192: addr: 0x100000
grub_cmd_slaunch_module:194: target: 0x100000
grub_cmd_slaunch_module:196: add module
grub_cmd_slaunch_module:205: read file
grub_cmd_slaunch_module:215: close file
grub_slaunch_boot_skinit:41: real_mode_target: 0x8b000
grub_slaunch_boot_skinit:42: prot_mode_target: 0x1000000
grub_slaunch_boot_skinit:43: params: 0xcfdfb7c
Bad bootloader data format
Rebooting now..
In the 2nd scenario: secure-kernel-loader entry into an infinite loop during
flushing IOMMU cache and print dots endlessly:
shasum calculated:
0x001001dc: ff dc d4 84 73 07 f0 06 8a f3 eb 47 b5 ed 7e 09 ....s......G..~.
0x001001ec: 78 f5 a4 24 cc cc cc cc cc cc cc cc cc cc cc cc x..$............
shasum calculated:
0x001001f0: 03 94 76 22 df 42 8c 3b ac f5 cc e5 ea 60 c6 ef ..v".B.;.....`..
0x00100200: 50 52 55 ac 86 79 e3 5c 52 d5 84 8c 2d db 9c f0 PRU..y.\R...-...
PCR extended
IOMMU MMIO Base Address = 0xd0500000:
0x00000000: IOMMU_MMIO_STATUS_REGISTER
0x00106001: IOMMU_MMIO_DEVICE_TABLE_BA
0x00103000: IOMMU_MMIO_COMMAND_BUF_BA
0x00105000: IOMMU_MMIO_EVENT_LOG_BA
0x00000018: IOMMU_MMIO_STATUS_REGISTER
INVALIDATE_IOMMU_ALL
0x00290ad2: IOMMU_MMIO_EXTENDED_FEATURE
0x0000000a: IOMMU_MMIO_STATUS_REGISTER
0x0000000a: IOMMU_MMIO_STATUS_REGISTER
Disabling SLB protection
IOMMU MMIO Base Address = 0xd0500000:
0x0000000a: IOMMU_MMIO_STATUS_REGISTER
0x00106001: IOMMU_MMIO_DEVICE_TABLE_BA
0x00103000: IOMMU_MMIO_COMMAND_BUF_BA
0x00105000: IOMMU_MMIO_EVENT_LOG_BA
0x0000001a: IOMMU_MMIO_STATUS_REGISTER
INVALIDATE_IOMMU_ALL
0x00290ad2: IOMMU_MMIO_EXTENDED_FEATURE
0x0000000a: IOMMU_MMIO_STATUS_REGISTER
0x0000000a: IOMMU_MMIO_STATUS_REGISTER
Flushing IOMMU cache.....
In the 3rd scenario: kernel booting stops by TPM event log panic:
Affected component(s) or functionality
Working properly TrenchBoot D-RTM configuration: kernel + GRUB + Secure Kernel Loader
Brief summary
We tried to run D-RTM on PC Engines apu2 using latest versions from TrenchBoot repositories: SKL from master, GRUB from trenchboot_support_2.04, and kernel from linux-sl-5.13-amd branch.
Version
Firmware:
1st scenario: TrenchBoot latest version (from here):
2nd scenario: previous scenario with:
3rd scenario: previous scenario with:
To Reproduce
[NOT FOR MERGE]
prefix)Expected behavior
Booting from GRUB and SKL to Linux shell properly, without kernel panic on first scenario
Actual behavior
In the 1st scenario:
secure-kernel-loader
is unable to run kernel because of bad bootloader data format:In the 2nd scenario: secure-kernel-loader entry into an infinite loop during flushing IOMMU cache and print dots endlessly:
In the 3rd scenario: kernel booting stops by TPM event log panic:
Screenshots
Full bootlogs:
Scenario 1 Scenario 2 Scenario 3
Additional context
N/A
Solutions you've tried
All of the described scenarios
Relevant documentation you've consulted
N/A
Related, non-duplicate issues
N/A