From 36d7c86a1e9e72d689d672a0e8576adbc740d541 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Tue, 8 Sep 2020 15:29:38 +0200 Subject: Some work on CPU stuff (soon: SMP) --- libc/inc/cpu.h | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'libc/inc/cpu.h') diff --git a/libc/inc/cpu.h b/libc/inc/cpu.h index c25dc60..e742390 100644 --- a/libc/inc/cpu.h +++ b/libc/inc/cpu.h @@ -5,6 +5,8 @@ #include +enum cpuid_requests { CPUID_VENDOR_STRING, CPUID_FEATURES, CPUID_TLB, CPUID_SERIAL }; + u8 inb(u16 port); u16 inw(u16 port); u32 inl(u16 port); @@ -14,6 +16,10 @@ void outb(u16 port, u8 data); void outw(u16 port, u16 data); void outl(u16 port, u32 data); +void cpuid(int code, u32 *a, u32 *b, u32 *c, u32 *d); +char *cpu_string(char buf[12]); +void cpu_print(); + #ifdef kernel void cli(); void sti(); -- cgit v1.2.3