Skip to content

Skl loader amdsl v11 nopsp #23

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 3 commits into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/qubesos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:

jobs:
qubes-dom0-package:
uses: TrenchBoot/.github/.github/workflows/qubes-dom0-packagev2.yml@master
uses: TrenchBoot/.github/.github/workflows/qubes-dom0-packagev2.yml@very-stable

with:
qubes-component: 'secure-kernel-loader'
Expand Down
2 changes: 2 additions & 0 deletions include/slrt.h
Original file line number Diff line number Diff line change
Expand Up @@ -93,6 +93,8 @@ struct slr_entry_amd_info {
u64 slrt_size;
u64 slrt_base;
u64 boot_params_base;
u16 psp_version;
u16 reserved[3];
} __packed;

/* Secure Kernel Loader */
Expand Down
7 changes: 6 additions & 1 deletion main.c
Original file line number Diff line number Diff line change
Expand Up @@ -329,6 +329,7 @@ asm_return_t skl_main(void)

struct tpm *tpm;
struct slr_entry_dl_info *dl_info;
struct slr_entry_amd_info *amd_info;
asm_return_t ret;
u32 entry_offset;

Expand Down Expand Up @@ -359,10 +360,14 @@ asm_return_t skl_main(void)
* but we can't trust that the bootloader passed it without modification.
*/
dl_info = next_entry_with_tag(NULL, SLR_ENTRY_DL_INFO);
amd_info = next_entry_with_tag(NULL, SLR_ENTRY_AMD_INFO);

if ( dl_info == NULL
|| amd_info == NULL
|| dl_info->hdr.size != sizeof(*dl_info)
|| end_of_slrt() < _p(&dl_info[1])
|| amd_info->hdr.size != sizeof(*amd_info)
|| end_of_slrt() < _p(&amd_info[1])
|| dl_info->dlme_base >= 0x100000000ULL
|| dl_info->dlme_base + dl_info->dlme_size >= 0x100000000ULL
|| dl_info->dlme_entry >= dl_info->dlme_size
Expand All @@ -381,7 +386,7 @@ asm_return_t skl_main(void)
free_tpm(tpm);

ret.dlme_entry = _p(dl_info->dlme_base + dl_info->dlme_entry);
ret.dlme_arg = _p(dl_info->bl_context.context);
ret.dlme_arg = _p(amd_info->boot_params_base);

/* End of the line, off to the protected mode entry into the kernel */
print("dlme_entry:\n");
Expand Down