RDFU  1.0
 All Classes Files Functions Variables Typedefs Enumerations Enumerator Macros
Arch.h File Reference

Header for ASM functions and various low level structures. More...

Include dependency graph for Arch.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  _x64_context
 
struct  _x86_context
 
struct  _gdt_entry
 
struct  idt_base
 
struct  idt_entry
 

Typedefs

typedef UINT32 UINT_ARCH
 
typedef struct _x64_context x64_context
 
typedef struct _x86_context x86_context
 
typedef struct _gdt_entry gdt_entry
 

Functions

VOID ASMDbgBreak (VOID)
 
VOID Int03Handler (VOID)
 
USHORT ASMGetRegCs (VOID)
 
USHORT ASMGetRegDs (VOID)
 
USHORT ASMGetRegEs (VOID)
 
USHORT ASMGetRegSs (VOID)
 
USHORT ASMGetRegFs (VOID)
 
USHORT ASMGetRegGs (VOID)
 
UINT_ARCH ASMGetRegCr0 (VOID)
 
UINT_ARCH ASMGetRegCr2 (VOID)
 
UINT_ARCH ASMGetRegCr3 (VOID)
 
UINT_ARCH ASMGetRegCr4 (VOID)
 
UINT_ARCH ASMGetRegCr8 (VOID)
 
UINT_ARCH ASMGetRegRflags (VOID)
 
UINT_ARCH ASMGetIdtBase (VOID)
 
USHORT ASMGetIdtLimit (VOID)
 
UINT_ARCH ASMGetGdtBase (VOID)
 
USHORT ASMGetGdtLimit (VOID)
 
USHORT GetLdtr (VOID)
 
USHORT ASMGetTrSelector (VOID)
 
UINT_ARCH ASMGetRegRbx (VOID)
 
UINT_ARCH ASMGetRegRax (VOID)
 
UINT_ARCH ASMGetRegRcx (VOID)
 
UINT_ARCH ASMGetRegRdx (VOID)
 
UINT_ARCH ASMGetRegRsi (VOID)
 
UINT_ARCH ASMGetRegRdi (VOID)
 
UINT_ARCH ASMGetRegRbp (VOID)
 
UINT_ARCH ASMGetRegRsp (VOID)
 
UINT_ARCH ASMGetRegDr0 (VOID)
 
UINT_ARCH ASMGetRegDr1 (VOID)
 
UINT_ARCH ASMGetRegDr2 (VOID)
 
UINT_ARCH ASMGetRegDr3 (VOID)
 
UINT_ARCH ASMGetRegDr6 (VOID)
 
UINT_ARCH ASMGetRegDr7 (VOID)
 
UINT_ARCH ASMSetRegDr0 (VOID)
 
UINT_ARCH ASMSetRegDr1 (VOID)
 
UINT_ARCH ASMSetRegDr2 (VOID)
 
UINT_ARCH ASMSetRegDr3 (VOID)
 
UINT_ARCH ASMSetRegCr3 (PVOID NewCr3)
 
UINT_ARCH ASMSetRegCr4 (PVOID NewCr4)
 
UINT_ARCH ASMSetRegCr8 (UINT_ARCH NewCr8)
 
VOID ASMWritePortByte (ULONG Port, UCHAR Value)
 
UCHAR ASMReadPortByte (ULONG Port)
 

Detailed Description

Header for ASM functions and various low level structures.

Author
Piotr Bania
Date
Feb 2013 Header for ASM functions and various low level structures

Definition in file Arch.h.

Typedef Documentation

typedef struct _gdt_entry gdt_entry

GDT entry (it seems to be the same on both x86 and x64 EFI firmware) even though the x64 gdt entry uses two additional fields.

typedef UINT32 UINT_ARCH

UINT_ARCH is a type either 32bit or 64bit long depending on the architecture.

Definition at line 26 of file Arch.h.

typedef struct _x64_context x64_context

X64 context structure

typedef struct _x86_context x86_context

x86 context structure

Function Documentation

VOID ASMDbgBreak ( VOID  )

Referenced by IdtHookTest().

Here is the caller graph for this function:

UINT_ARCH ASMGetGdtBase ( VOID  )

Referenced by DumpGDT().

Here is the caller graph for this function:

USHORT ASMGetGdtLimit ( VOID  )

Referenced by DumpGDT().

Here is the caller graph for this function:

UINT_ARCH ASMGetIdtBase ( VOID  )

Referenced by DumpIDT(), and GetIdtEntry().

Here is the caller graph for this function:

USHORT ASMGetIdtLimit ( VOID  )

Referenced by DumpIDT().

Here is the caller graph for this function:

UINT_ARCH ASMGetRegCr0 ( VOID  )

Referenced by GetX64Context(), and GetX86Context().

Here is the caller graph for this function:

UINT_ARCH ASMGetRegCr2 ( VOID  )

Referenced by GetX64Context(), and GetX86Context().

Here is the caller graph for this function:

UINT_ARCH ASMGetRegCr3 ( VOID  )

Referenced by GetX64Context(), and GetX86Context().

Here is the caller graph for this function:

UINT_ARCH ASMGetRegCr4 ( VOID  )

Referenced by GetX64Context(), and GetX86Context().

Here is the caller graph for this function:

UINT_ARCH ASMGetRegCr8 ( VOID  )

Referenced by GetX64Context().

Here is the caller graph for this function:

USHORT ASMGetRegCs ( VOID  )

Referenced by GetX64Context(), and GetX86Context().

Here is the caller graph for this function:

UINT_ARCH ASMGetRegDr0 ( VOID  )

Referenced by GetX64Context(), and GetX86Context().

Here is the caller graph for this function:

UINT_ARCH ASMGetRegDr1 ( VOID  )
UINT_ARCH ASMGetRegDr2 ( VOID  )

Referenced by GetX64Context(), and GetX86Context().

Here is the caller graph for this function:

UINT_ARCH ASMGetRegDr3 ( VOID  )

Referenced by GetX64Context(), and GetX86Context().

Here is the caller graph for this function:

UINT_ARCH ASMGetRegDr6 ( VOID  )

Referenced by GetX64Context(), and GetX86Context().

Here is the caller graph for this function:

UINT_ARCH ASMGetRegDr7 ( VOID  )

Referenced by GetX64Context(), and GetX86Context().

Here is the caller graph for this function:

USHORT ASMGetRegDs ( VOID  )

Referenced by GetX64Context(), and GetX86Context().

Here is the caller graph for this function:

USHORT ASMGetRegEs ( VOID  )

Referenced by GetX64Context(), and GetX86Context().

Here is the caller graph for this function:

USHORT ASMGetRegFs ( VOID  )

Referenced by GetX64Context(), and GetX86Context().

Here is the caller graph for this function:

USHORT ASMGetRegGs ( VOID  )

Referenced by GetX64Context(), and GetX86Context().

Here is the caller graph for this function:

UINT_ARCH ASMGetRegRax ( VOID  )

Referenced by GetX64Context(), and GetX86Context().

Here is the caller graph for this function:

UINT_ARCH ASMGetRegRbp ( VOID  )

Referenced by GetX64Context(), and GetX86Context().

Here is the caller graph for this function:

UINT_ARCH ASMGetRegRbx ( VOID  )

Referenced by GetX64Context(), and GetX86Context().

Here is the caller graph for this function:

UINT_ARCH ASMGetRegRcx ( VOID  )

Referenced by GetX64Context(), and GetX86Context().

Here is the caller graph for this function:

UINT_ARCH ASMGetRegRdi ( VOID  )

Referenced by GetX64Context(), and GetX86Context().

Here is the caller graph for this function:

UINT_ARCH ASMGetRegRdx ( VOID  )

Referenced by GetX64Context(), and GetX86Context().

Here is the caller graph for this function:

UINT_ARCH ASMGetRegRflags ( VOID  )

Referenced by GetX64Context(), and GetX86Context().

Here is the caller graph for this function:

UINT_ARCH ASMGetRegRsi ( VOID  )

Referenced by GetX64Context(), and GetX86Context().

Here is the caller graph for this function:

UINT_ARCH ASMGetRegRsp ( VOID  )

Referenced by GetX64Context(), and GetX86Context().

Here is the caller graph for this function:

USHORT ASMGetRegSs ( VOID  )

Referenced by GetX64Context(), and GetX86Context().

Here is the caller graph for this function:

USHORT ASMGetTrSelector ( VOID  )
UCHAR ASMReadPortByte ( ULONG  Port)

Referenced by ComGetChar(), and ComPutChar().

Here is the caller graph for this function:

UINT_ARCH ASMSetRegCr3 ( PVOID  NewCr3)
UINT_ARCH ASMSetRegCr4 ( PVOID  NewCr4)
UINT_ARCH ASMSetRegCr8 ( UINT_ARCH  NewCr8)
UINT_ARCH ASMSetRegDr0 ( VOID  )
UINT_ARCH ASMSetRegDr1 ( VOID  )
UINT_ARCH ASMSetRegDr2 ( VOID  )
UINT_ARCH ASMSetRegDr3 ( VOID  )
VOID ASMWritePortByte ( ULONG  Port,
UCHAR  Value 
)

Referenced by ComPutChar().

Here is the caller graph for this function:

USHORT GetLdtr ( VOID  )
VOID Int03Handler ( VOID  )

Referenced by IdtHookTest().

Here is the caller graph for this function: