FreeNOS
Data Structures | Macros | Typedefs | Functions | Variables
IntelCore.h File Reference
#include <Types.h>
#include <Macros.h>
#include "IntelIO.h"

Go to the source code of this file.

Data Structures

struct  TSS
 Intel's Task State Segment. More...
 
struct  Segment
 Segment descriptor used in the GDT. More...
 
struct  SegRegs
 Segmentation registers. More...
 
struct  CPURegs
 Structure represents the pusha/popa format. More...
 
struct  IRQRegs0
 Privileged Interrupt Registers (ring 0) More...
 
struct  IRQRegs3
 Unprivileged Interrupt Registers (ring 3) More...
 
struct  CPUState
 Contains all the CPU registers. More...
 
class  IntelCore
 Intel CPU Core. More...
 

Macros

#define cpu_reboot()
 Reboot the system (by sending the a reset signal on the keyboard I/O port) More...
 
#define cpu_shutdown()
 Shutdown the machine via ACPI. More...
 
#define idle()   asm volatile ("hlt");
 Puts the CPU in a lower power consuming state. More...
 
#define ltr(sel)
 Loads the Task State Register (LTR) with the given segment. More...
 
#define tlb_flush(addr)   asm volatile("invlpg (%0)" ::"r" (addr) : "memory")
 Flushes the Translation Lookaside Buffers (TLB) for a single page. More...
 
#define tlb_flush_all()
 Flushes all Translation Lookaside Buffers (TLB). More...
 
Intel CPU Exceptions
#define INTEL_DIVZERO   0
 
#define INTEL_DEBUGEX   1
 
#define INTEL_NMI   2
 
#define INTEL_BREAKP   3
 
#define INTEL_OVERFLOW   4
 
#define INTEL_BOUNDS   5
 
#define INTEL_OPCODE   6
 
#define INTEL_DEVERR   7
 
#define INTEL_DOUBLEF   8
 
#define INTEL_COSEG   9
 
#define INTEL_TSSERR   10
 
#define INTEL_SEGERR   11
 
#define INTEL_STACKERR   12
 
#define INTEL_GENERR   13
 
#define INTEL_PAGEFAULT   14
 
#define INTEL_FLOATERR   16
 
#define INTEL_ALIGNERR   17
 
#define INTEL_MACHCHK   18
 
#define INTEL_SIMD   19
 
#define INTEL_VIRTERR   20
 
Intel EFLAGS Register
#define INTEL_EFLAGS_DEFAULT   (1 << 1)
 
#define INTEL_EFLAGS_IRQ   (1 << 9)
 

Typedefs

typedef struct TSS TSS
 Intel's Task State Segment. More...
 
typedef struct Segment Segment
 Segment descriptor used in the GDT. More...
 
typedef struct SegRegs SegRegs
 Segmentation registers. More...
 
typedef struct CPURegs CPURegs
 Structure represents the pusha/popa format. More...
 
typedef struct IRQRegs0 IRQRegs0
 Privileged Interrupt Registers (ring 0) More...
 
typedef struct IRQRegs3 IRQRegs3
 Unprivileged Interrupt Registers (ring 3) More...
 
typedef struct CPUState CPUState
 Contains all the CPU registers. More...
 

Functions

u64 timestamp ()
 Reads the CPU's timestamp counter. More...
 

Variables

Segment gdt []
 Global Descriptor Table. More...
 
TSS kernelTss
 Task State Segment. More...
 
Address kernelPageDir []
 Kernel page directory. More...