[MODERN FEATURES] ACPI tables

This commit is contained in:
thomas committed 2017-03-27 23:09:08 +02:00
1 parent d801e0fd6c
commit 56d5fea388
6 files changed
+193 -5

No files matched your search

+2 -4
View File
@@ -7,6 +7,7 @@
#include <thread.h>
#include <process.h>
#include <cpuid.h>
#include <acpi.h>
void thread_function()
{
@@ -31,11 +32,8 @@ int kmain(uint64_t multiboot_magic, void *multiboot_data)
gdt_init();
scheduler_init();
pic_init();
acpi_init();
debug_info("CPUID - max function number: Normal:%x, Extended:%x\n", cpuid_max, cpuid_maxx);
debug_info("CPUID - has MSR:%d\n", CPUID_FEATURE_MSR);
debug_info("CPUID - has APIC:%d\n", CPUID_FEATURE_APIC);
debug_info("CPUID - has SYSCALL:%d\n", CPUID_FEATURE_SYSCALL);
process_t *p1 = process_spawn(0);
process_t *p2 = process_spawn(p1);
+7
View File
@@ -70,6 +70,11 @@ void parse_multiboot2()
mboot_data.mmap = tag->data;
debug_ok("MBOOT2 - handle ");
break;
case MBOOT2_ACPI_V1:
case MBOOT2_ACPI_V2:
mboot_data.rsdp = &tag->data;
debug_ok("[MBOOT2] %x handle ", mboot_data.rsdp);
break;
default:
debug_warning("MBOOT2 - ignore ");
break;
@@ -129,6 +134,8 @@ int multiboot_page_used(uintptr_t addr)
mboot2_tags_head *data = mboot_data.data;
if(overlapsz(addr, PAGE_SIZE, V2P(data), data->total_size))
return 1;
if(mboot_data.rsdp && overlapsz(addr, PAGE_SIZE, mboot_data.rsdp, 1))
return 1;
}
return 0;
}