stivale2: Implement kernel slide tag

This commit is contained in:
mintsuki 2021-03-28 16:20:23 +02:00
parent c45407cb62
commit 0885bac3aa
2 changed files with 17 additions and 0 deletions

View File

@ -140,6 +140,18 @@ void stivale2_load(char *config, char *cmdline, bool pxe, void *efi_system_table
append_tag(&stivale2_struct, (struct stivale2_tag *)tag);
}
//////////////////////////////////////////////
// Create kernel slide struct tag
//////////////////////////////////////////////
{
struct stivale2_struct_tag_kernel_slide *tag = ext_mem_alloc(sizeof(struct stivale2_struct_tag_kernel_slide));
tag->tag.identifier = STIVALE2_STRUCT_TAG_KERNEL_SLIDE_ID;
tag->kernel_slide = slide;
append_tag(&stivale2_struct, (struct stivale2_tag *)tag);
}
//////////////////////////////////////////////
// Create firmware struct tag
//////////////////////////////////////////////

View File

@ -139,6 +139,11 @@ void stivale2_main(struct stivale2_struct *info) {
e9_printf("Raw kernel file loaded at: %x", t->kernel_file);
break;
}
case STIVALE2_STRUCT_TAG_KERNEL_SLIDE_ID: {
struct stivale2_struct_tag_kernel_slide *t = (struct stivale2_struct_tag_kernel_slide *)tag;
e9_printf("Kernel slide: %x", t->kernel_slide);
break;
}
case STIVALE2_STRUCT_TAG_SMP_ID: {
struct stivale2_struct_tag_smp *s = (struct stivale2_struct_tag_smp *)tag;
e9_puts("SMP tag:");