2018-09-28 20:35:51 +02:00
|
|
|
/*******************************************************************************/
|
|
|
|
/* COS2000 - Compatible Operating System - LGPL v3 - Hordé Nicolas */
|
|
|
|
/* */
|
2018-10-02 17:16:23 +02:00
|
|
|
#include "interrupts.h"
|
|
|
|
|
2007-04-02 15:57:08 +02:00
|
|
|
typedef struct cpuinfo
|
|
|
|
{
|
|
|
|
u8 vendor[13];
|
|
|
|
u8 names[32];
|
|
|
|
u8 detectedname[48];
|
|
|
|
u8 techs[48];
|
|
|
|
u8 stepping;
|
|
|
|
u8 models;
|
|
|
|
u8 family;
|
|
|
|
u8 types;
|
|
|
|
u8 emodels;
|
|
|
|
u8 efamily;
|
|
|
|
u8 apicid;
|
|
|
|
u8 count;
|
|
|
|
u8 linesize;
|
|
|
|
u8 brandid;
|
|
|
|
bool mmx;
|
|
|
|
bool mmx2;
|
|
|
|
bool sse;
|
|
|
|
bool sse2;
|
|
|
|
bool sse3;
|
|
|
|
bool fpu;
|
|
|
|
bool now3d;
|
|
|
|
bool now3d2;
|
|
|
|
bool htt;
|
|
|
|
bool apic;
|
2018-09-18 14:29:35 +02:00
|
|
|
bool bits64;
|
|
|
|
bool syscall;
|
|
|
|
bool msr;
|
|
|
|
bool sse4a;
|
|
|
|
bool vmx;
|
|
|
|
bool sse41;
|
|
|
|
bool sse42;
|
|
|
|
bool apic2;
|
2007-04-02 15:57:08 +02:00
|
|
|
} cpuinfo __attribute__ ((packed));
|
|
|
|
|
2018-10-02 17:16:23 +02:00
|
|
|
bool cansetflag (u32 flag);
|
|
|
|
void cpuid(u32 op, u32 *eax, u32 *ebx,u32 *ecx, u32 *edx);
|
|
|
|
u8 getcpuinfos(cpuinfo *inf);
|
|
|
|
u32 getESP(void);
|
2018-10-03 22:50:54 +02:00
|
|
|
u32 setESP(u32 stack);
|
|
|
|
void dump_cpu(save_stack *stack);
|
|
|
|
void show_cpu(save_stack *stack);
|