Skip to content

Commit 2e29551

Browse files
committed
main.c: make booting work without AMDSL
Signed-off-by: Sergii Dmytruk <[email protected]>
1 parent a728113 commit 2e29551

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

main.c

+6-1
Original file line numberDiff line numberDiff line change
@@ -329,6 +329,7 @@ asm_return_t skl_main(void)
329329

330330
struct tpm *tpm;
331331
struct slr_entry_dl_info *dl_info;
332+
struct slr_entry_amd_info *amd_info;
332333
asm_return_t ret;
333334
u32 entry_offset;
334335

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

363365
if ( dl_info == NULL
366+
|| amd_info == NULL
364367
|| dl_info->hdr.size != sizeof(*dl_info)
365368
|| end_of_slrt() < _p(&dl_info[1])
369+
|| amd_info->hdr.size != sizeof(*amd_info)
370+
|| end_of_slrt() < _p(&amd_info[1])
366371
|| dl_info->dlme_base >= 0x100000000ULL
367372
|| dl_info->dlme_base + dl_info->dlme_size >= 0x100000000ULL
368373
|| dl_info->dlme_entry >= dl_info->dlme_size
@@ -381,7 +386,7 @@ asm_return_t skl_main(void)
381386
free_tpm(tpm);
382387

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

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

0 commit comments

Comments
 (0)