fix gcc warnings & improved makefile echos
[lunaix-os.git] / lunaix-os / includes / hal / cpu.h
1 #ifndef __LUNAIX_CPU_H
2 #define __LUNAIX_CPU_H
3
4 typedef unsigned int reg32;
5 typedef unsigned short reg16;
6
7 typedef struct {
8     reg32 edi;
9     reg32 esi;
10     reg32 ebp;
11     reg32 esp;
12     reg32 ebx;
13     reg32 edx;
14     reg32 ecx;
15     reg32 eax;
16 } __attribute__((packed)) registers;
17
18 reg32 cpu_r_cr0();
19
20 reg32 cpu_r_cr2();
21
22 reg32 cpu_r_cr3();
23
24 void cpu_w_cr0(reg32 v);
25
26 void cpu_w_cr2(reg32 v);
27
28 void cpu_w_cr3(reg32 v);
29
30 void cpu_get_model(char* model_out);
31
32 int cpu_brand_string_supported();
33
34 void cpu_get_brand(char* brand_out);
35
36 #endif /* __LUNAIX_CPU_H */