stivale tests: fix BUG: Unidentified tag 0x9b4358364c19ee62

Signed-off-by: Andy-Python-Programmer <andypythonappdeveloper@gmail.com>
This commit is contained in:
Andy-Python-Programmer 2022-01-27 16:43:06 +11:00
parent 10b585a9f1
commit c506f35d9f
No known key found for this signature in database
GPG Key ID: 80E0357347554B89
1 changed files with 22 additions and 0 deletions

View File

@ -61,6 +61,19 @@ static void ap_entry(struct stivale2_smp_info *s) {
for (;;) asm("hlt"); for (;;) asm("hlt");
} }
static void print_guid(struct stivale2_guid guid) {
e9_printf("\t\ta: %x", guid.a);
e9_printf("\t\tb: %x", guid.b);
e9_printf("\t\tc: %x", guid.c);
e9_puts("\t\td: [");
for (uint8_t i = 0; i < 8; i++) {
e9_printf("\t\t\t%x,", guid.d[i]);
}
e9_puts("\t\t]\n");
}
void stivale2_main(struct stivale2_struct *info) { void stivale2_main(struct stivale2_struct *info) {
// Print the tags. // Print the tags.
struct stivale2_tag *tag = (struct stivale2_tag *)info->tags; struct stivale2_tag *tag = (struct stivale2_tag *)info->tags;
@ -225,6 +238,15 @@ void stivale2_main(struct stivale2_struct *info) {
e9_printf("\tVirtual base address: %x", t->virtual_base_address); e9_printf("\tVirtual base address: %x", t->virtual_base_address);
break; break;
} }
case STIVALE2_STRUCT_TAG_BOOT_VOLUME_ID: {
struct stivale2_struct_tag_boot_volume *t = (void *)tag;
e9_puts("Boot volume:");
e9_printf("\tGUID:");
print_guid(t->guid);
e9_printf("\tPartition GUID:");
print_guid(t->part_guid);
break;
}
case STIVALE2_STRUCT_TAG_SMP_ID: { case STIVALE2_STRUCT_TAG_SMP_ID: {
struct stivale2_struct_tag_smp *s = (struct stivale2_struct_tag_smp *)tag; struct stivale2_struct_tag_smp *s = (struct stivale2_struct_tag_smp *)tag;
e9_puts("SMP tag:"); e9_puts("SMP tag:");