Skip to content

Drtm payload 25.12#926

Open
hanetzer wants to merge 13 commits into
Dasharo:dasharo-25.12from
hanetzer:drtm_payload-25.12
Open

Drtm payload 25.12#926
hanetzer wants to merge 13 commits into
Dasharo:dasharo-25.12from
hanetzer:drtm_payload-25.12

Conversation

@hanetzer

Copy link
Copy Markdown
Contributor

Replacement of #916, can't change my branch, just the target. Hoping to avoid losing the comments there. Sorry for the noise.

@hanetzer hanetzer force-pushed the drtm_payload-25.12 branch from 8abdcd7 to a2678b4 Compare June 19, 2026 20:55

@SergiiDmytruk SergiiDmytruk left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the changes in more detail.

Comment thread src/acpi/dsdt_top.asl Outdated
Comment thread src/acpi/dsdt_top.asl Outdated
Comment thread src/include/acpi/acpi_ivrs.h Outdated
Comment thread src/soc/amd/common/skl/skinit.c Outdated
Comment thread src/soc/amd/common/skl/skinit.c Outdated
Comment thread src/soc/amd/common/skl/skinit.c Outdated
Comment thread src/soc/amd/common/skl/skinit.c Outdated
Comment thread .gitmodules Outdated
@hanetzer hanetzer force-pushed the drtm_payload-25.12 branch from a2678b4 to 2c798c1 Compare June 24, 2026 16:01
@hanetzer hanetzer changed the base branch from dasharo-25.12 to dasharo June 24, 2026 16:05
@hanetzer hanetzer changed the base branch from dasharo to dasharo-25.12 June 24, 2026 16:05
@SergiiDmytruk SergiiDmytruk linked an issue Jun 26, 2026 that may be closed by this pull request
@hanetzer

Copy link
Copy Markdown
Contributor Author

I think one problem I'm really having is mapping secure-launch terminology to coreboot parts. This is outside my normal area of 'doing coreboot' stuff, I'd much rather and be more in my comfort zone porting new platforms but I'll take what I can get. If you could explain, for example, what part of this stack maps to DLME, for example, I'd probably have an easier time of it moving forward.

@SergiiDmytruk

Copy link
Copy Markdown
Member

I think one problem I'm really having is mapping secure-launch terminology to coreboot parts. This is outside my normal area of 'doing coreboot' stuff, I'd much rather and be more in my comfort zone porting new platforms but I'll take what I can get. If you could explain, for example, what part of this stack maps to DLME, for example, I'd probably have an easier time of it moving forward.

Just saw this comment and I think you figured it out by now, but anyway:

  • DCE preamble is coreboot
  • DL Event is SKINIT instruction or rather its handler in CPU/PSP
  • DCE is SKL
  • DLME is EDK2 and by extension whatever it runs (which is the purpose of putting DRTM in the firmware)

krystian-hebel and others added 13 commits June 28, 2026 17:48
Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Signed-off-by: Krystian Hebel <krystian.hebel@3mdeb.com>
Signed-off-by: Marty E. Plummer <hanetzer@startmail.com>
Signed-off-by: Marty E. Plummer <hanetzer@startmail.com>
Signed-off-by: Marty E. Plummer <hanetzer@startmail.com>
Signed-off-by: Marty E. Plummer <hanetzer@startmail.com>
Signed-off-by: Marty E. Plummer <hanetzer@startmail.com>
Signed-off-by: Marty E. Plummer <hanetzer@startmail.com>
Signed-off-by: Marty E. Plummer <hanetzer@startmail.com>
@hanetzer hanetzer force-pushed the drtm_payload-25.12 branch from 2c798c1 to 7ff8f3f Compare June 28, 2026 22:50
@hanetzer

Copy link
Copy Markdown
Contributor Author

Just saw this comment and I think you figured it out by now, but anyway:

  • DCE preamble is coreboot
  • DL Event is SKINIT instruction or rather its handler in CPU/PSP
  • DCE is SKL
  • DLME is EDK2 and by extension whatever it runs (which is the purpose of putting DRTM in the firmware)

Thank you. I'm honestly crap with terminology at times so having a definitive 'this is that' list helps. I guess if edk2 loads grub, grub also goes onto the dlme listing? and also later the kernel?

@SergiiDmytruk

Copy link
Copy Markdown
Member

I guess if edk2 loads grub, grub also goes onto the dlme listing? and also later the kernel?

Yes, although it makes sense to start Linux directly by the firmware in this scenario to execute less code in the early boot environment (Secure Boot could validate GRUB and it has lockdown mode, but there is still a lot of code in there).

log_info->hdr.tag = SLR_ENTRY_LOG_INFO;
log_info->hdr.size = sizeof(*log_info);
slrt->size += log_info->hdr.size;
ce = cbmem_entry_find(CBMEM_ID_TPM2_TCG_LOG);

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This event log is for SRTM. DRTM's measurements form an independent chain that can also be reset if DRTM is re-started, so the log needs to be separate (cbmem_add()).

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm. Would I need to define a new CBMEM_ID then? CBMEM_ID_SRTM_LOG or so?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

hmm. Would I need to define a new CBMEM_ID then?

Yes, I think cbmem_add() requires it. Updating https://github.com/Dasharo/coreboot/blob/dasharo/src/commonlib/bsd/include/commonlib/bsd/cbmem_id.h is two places should be enough.

CBMEM_ID_SRTM_LOG or so?

"DRTM", maybe CBMEM_ID_TPM_DRTM_LOG to be less ambiguous.

if (ce) {
log_info->addr = (uintptr_t)cbmem_entry_start(ce);
log_info->size = cbmem_entry_size(ce);
log_info->format = SLR_DRTM_TPM20_LOG; // TODO: Support 1.2?

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

// TODO: Support 1.2?

coreboot, SKL and EDK support TPM1.2 and the cost for it here is a bit of initialization (see it in GRUB; despite the name that function is used on AMD as well), so may as well do it. TPM2.0 log just needs to be zeroed, its size in GRUB is 32 KiB regardless of TPM family.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

coreboot implementation for AMD

3 participants