test: abios.h File Reference

Main Page | Class Hierarchy | Class List | File List | Class Members | File Members

# abios.h File Reference

Go to the source code of this file.

## Classes

struct | _KDEVICE_BLOCK
struct | _KABIOS_POINTER
struct | _KFUNCTION_TRANSFER_TABLE
struct | _KDB_FTT_SECTION
struct | _KCOMMON_DATA_AREA
struct | _KFREE_GDT_ENTRY
struct | _KLID_TABLE_ENTRY

## Defines

#define | LID_NO_SPECIFIC_OWNER 0xffffffff
#define | NUMBER_LID_TABLE_ENTRIES 1024
#define | HIGHBYTE(l) ((UCHAR)(((USHORT)(l)>>8) & 0xff))
#define | LOWBYTE(l) ((UCHAR)(l))
#define | KGDT_STACK16 0xf8
#define | KGDT_CODE16 0xf0
#define | KGDT_CDA16 0xe8
#define | KGDT_GDT_ALIAS 0x70
#define | RESERVED_GDT_ENTRIES 28

## Typedefs

typedef _KDEVICE_BLOCK | KDEVICE_BLOCK
typedef _KDEVICE_BLOCK * | PKDEVICE_BLOCK
typedef _KABIOS_POINTER | KABIOS_POINTER
typedef _KABIOS_POINTER * | PKABIOS_POINTER
typedef _KFUNCTION_TRANSFER_TABLE | KFUNCTION_TRANSFER_TABLE
typedef _KFUNCTION_TRANSFER_TABLE * | PKFUNCTION_TRANSFER_TABLE
typedef _KDB_FTT_SECTION | KDB_FTT_SECTION
typedef _KDB_FTT_SECTION * | PKDB_FTT_SECTION
typedef _KCOMMON_DATA_AREA | KCOMMON_DATA_AREA
typedef _KCOMMON_DATA_AREA * | PKCOMMON_DATA_AREA
typedef _KFREE_GDT_ENTRY | KFREE_GDT_ENTRY
typedef _KFREE_GDT_ENTRY * | PKFREE_GDT_ENTRY
typedef _KLID_TABLE_ENTRY | KLID_TABLE_ENTRY
typedef _KLID_TABLE_ENTRY * | PKLID_TABLE_ENTRY

## Functions

VOID | KiI386CallAbios (IN KABIOS_POINTER AbiosFunction, IN KABIOS_POINTER DeviceBlockPointer, IN KABIOS_POINTER FunctionTransferTable, IN KABIOS_POINTER RequestBlock)
VOID | KiInitializeAbiosGdtEntry (OUT PKGDTENTRY GdtEntry, IN ULONG Base, IN ULONG Limit, IN USHORT Type)
ULONG | KiAbiosGetGdt (VOID)

## Variables

PKFREE_GDT_ENTRY | KiAbiosGdtStart
PKFREE_GDT_ENTRY | KiAbiosGdtEnd
PUCHAR | KiEndOfCode16
ULONG | KiStack16GdtEntry

## Define Documentation

#define HIGHBYTE | ( | l |  | ) | ((UCHAR)(((USHORT)(l)>>8) & 0xff))

| Definition at line 107 of file abios.h. Referenced by KeI386FlatToGdtSelector().

#define KGDT_CDA16 0xe8

| Definition at line 122 of file abios.h. Referenced by KiInitializeAbios().

#define KGDT_CODE16 0xf0

| Definition at line 121 of file abios.h. Referenced by KiInitializeAbios().

#define KGDT_GDT_ALIAS 0x70

| Definition at line 123 of file abios.h. Referenced by KiInitializeAbios().

#define KGDT_STACK16 0xf8

| Definition at line 120 of file abios.h. Referenced by KiInitializeAbios().

#define LID_NO_SPECIFIC_OWNER 0xffffffff

| Definition at line 100 of file abios.h. Referenced by KeI386AbiosCall(), KeI386GetLid(), and KeI386ReleaseLid().

#define LOWBYTE | ( | l |  | ) | ((UCHAR)(l))

| Definition at line 113 of file abios.h. Referenced by KeI386FlatToGdtSelector().

#define NUMBER_LID_TABLE_ENTRIES 1024

| Definition at line 101 of file abios.h. Referenced by KeI386GetLid().

#define RESERVED_GDT_ENTRIES 28

| Definition at line 129 of file abios.h. Referenced by KeI386FlatToGdtSelector(), and Ki386InitializeGdtFreeList().

## Typedef Documentation

typedef struct _KABIOS_POINTER KABIOS_POINTER

typedef struct _KCOMMON_DATA_AREA KCOMMON_DATA_AREA

typedef struct _KDB_FTT_SECTION KDB_FTT_SECTION

typedef struct _KDEVICE_BLOCK KDEVICE_BLOCK

typedef struct _KFREE_GDT_ENTRY KFREE_GDT_ENTRY

typedef struct _KFUNCTION_TRANSFER_TABLE KFUNCTION_TRANSFER_TABLE

typedef struct _KLID_TABLE_ENTRY KLID_TABLE_ENTRY

| Referenced by KeI386GetLid().

typedef struct _KABIOS_POINTER * PKABIOS_POINTER

typedef struct _KCOMMON_DATA_AREA * PKCOMMON_DATA_AREA

typedef struct _KDB_FTT_SECTION * PKDB_FTT_SECTION

typedef struct _KDEVICE_BLOCK * PKDEVICE_BLOCK

typedef struct _KFREE_GDT_ENTRY * PKFREE_GDT_ENTRY

typedef struct _KFUNCTION_TRANSFER_TABLE * PKFUNCTION_TRANSFER_TABLE

typedef struct _KLID_TABLE_ENTRY * PKLID_TABLE_ENTRY

## Function Documentation

ULONG KiAbiosGetGdt | ( | VOID |  | ) |

| Referenced by Ki386InitializeGdtFreeList(), KiI386SelectorBase(), and KiInitializeAbios().

VOID KiI386CallAbios | ( | IN KABIOS_POINTER | AbiosFunction,
|  | IN KABIOS_POINTER | DeviceBlockPointer,
|  | IN KABIOS_POINTER | FunctionTransferTable,
|  | IN KABIOS_POINTER | RequestBlock
| ) |

| Referenced by KeI386AbiosCall(), and KiInitializeAbios().

VOID KiInitializeAbiosGdtEntry | ( | OUT PKGDTENTRY | GdtEntry,
|  | IN ULONG | Base,
|  | IN ULONG | Limit,
|  | IN USHORT | Type
| ) |

Definition at line 83 of file abiosc.c.

References USHORT.

Referenced by KiInitializeAbios().

    00092                    :
    00093
    00094     This function initializes a GDT entry for abios specific code.  Base,
    00095     Limit, and Type (code, data) are set according to parameters.  All other
    00096     fields of the entry are set to match standard system values.
    00097
    00098     N.B. The BIG and GRANULARITY are always set to 0.
    00099
    00100 Arguments:
    00101
    00102     GdtEntry - GDT descriptor to be filled in.
    00103
    00104     Base - Linear address of the first byte mapped by the selector.
    00105
    00106     Limit - Size of the selector in BYTE.
    00107
    00108     Type - Code or Data.  All code selectors are marked readable,
    00109             all data selectors are marked writeable.
    00110
    00111 Return Value:
    00112
    00113     Pointer to the GDT entry.
    00114
    00115 --*/
    00116
    00117 {
    00118     GdtEntry->LimitLow = (USHORT)(Limit & 0xffff);
    00119     GdtEntry->BaseLow = (USHORT)(Base & 0xffff);
    00120     GdtEntry->HighWord.Bytes.BaseMid = (UCHAR)((Base & 0xff0000) >> 16);
    00121     GdtEntry->HighWord.Bits.Type = Type;
    00122     GdtEntry->HighWord.Bits.Dpl = 0;
    00123     GdtEntry->HighWord.Bits.Pres = 1;
    00124     GdtEntry->HighWord.Bits.LimitHi = (Limit & 0xf0000) >> 16;
    00125     GdtEntry->HighWord.Bits.Sys = 0;
    00126     GdtEntry->HighWord.Bits.Reserved_0 = 0;
    00127     GdtEntry->HighWord.Bits.Default_Big = 0;
    00128     GdtEntry->HighWord.Bits.Granularity = 0;
    00129     GdtEntry->HighWord.Bytes.BaseHi = (UCHAR)((Base & 0xff000000) >> 24);
    00130 }

## Variable Documentation

PKFREE_GDT_ENTRY KiAbiosGdtEnd

| Definition at line 136 of file abios.h.

PKFREE_GDT_ENTRY KiAbiosGdtStart

| Definition at line 135 of file abios.h.

PUCHAR KiEndOfCode16

| Definition at line 137 of file abios.h. Referenced by KiInitializeAbios().

ULONG KiStack16GdtEntry

| Definition at line 138 of file abios.h. Referenced by KiInitializeAbios().