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

abios.h

Go to the documentation of this file.
00001 /*++ 00002 00003 Copyright (c) 1989 Microsoft Corporation 00004 00005 Module Name: 00006 00007 abios.h 00008 00009 Abstract: 00010 00011 This module contains the i386 kernel ABIOS specific header file. 00012 00013 Author: 00014 00015 Shie-Lin Tzong (shielint) 22-May-1991 00016 00017 Revision History: 00018 00019 --*/ 00020 00021 // 00022 // Define public portion of the ABIOS Device Block 00023 // 00024 00025 typedef struct _KDEVICE_BLOCK { 00026 USHORT Length; 00027 UCHAR Revision; 00028 UCHAR SecondDeviceId; 00029 USHORT LogicalId; 00030 USHORT DeviceId; 00031 USHORT NumberExclusivePortPairs; 00032 USHORT NumberCommonPortPairs; 00033 } KDEVICE_BLOCK, *PKDEVICE_BLOCK; 00034 00035 00036 typedef struct _KABIOS_POINTER { 00037 USHORT Offset; 00038 USHORT Selector; 00039 } KABIOS_POINTER, *PKABIOS_POINTER; 00040 00041 #pragma pack(1) 00042 00043 // 00044 // ABIOS Function Transfer Table definition 00045 // 00046 00047 typedef struct _KFUNCTION_TRANSFER_TABLE { 00048 KABIOS_POINTER CommonRoutine[3]; 00049 USHORT FunctionCount; 00050 USHORT Reserved; 00051 KABIOS_POINTER SpecificRoutine; 00052 } KFUNCTION_TRANSFER_TABLE, *PKFUNCTION_TRANSFER_TABLE; 00053 00054 00055 // 00056 // ABIOS Commom Data Area definitions 00057 // 00058 00059 typedef struct _KDB_FTT_SECTION { 00060 KABIOS_POINTER DeviceBlock; 00061 KABIOS_POINTER FunctionTransferTable; 00062 } KDB_FTT_SECTION, *PKDB_FTT_SECTION; 00063 00064 typedef struct _KCOMMON_DATA_AREA { 00065 USHORT DataPointer0Offset; 00066 USHORT NumberLids; 00067 ULONG Reserved; 00068 PKDB_FTT_SECTION DbFttPointer; 00069 } KCOMMON_DATA_AREA, *PKCOMMON_DATA_AREA; 00070 00071 #pragma pack() 00072 00073 // 00074 // Available GDT Entry 00075 // 00076 00077 typedef struct _KFREE_GDT_ENTRY { 00078 struct _KFREE_GDT_ENTRY *Flink; 00079 ULONG BaseMid : 8; 00080 ULONG Type : 5; 00081 ULONG Dpl : 2; 00082 ULONG Present : 1; 00083 ULONG LimitHi : 4; 00084 ULONG Sys : 1; 00085 ULONG Reserved_0 : 1; 00086 ULONG Default_Big : 1; 00087 ULONG Granularity : 1; 00088 ULONG BaseHi : 8; 00089 } KFREE_GDT_ENTRY, *PKFREE_GDT_ENTRY; 00090 00091 // 00092 // Logical Id table entry 00093 // 00094 00095 typedef struct _KLID_TABLE_ENTRY { 00096 ULONG Owner; 00097 ULONG OwnerCount; 00098 } KLID_TABLE_ENTRY, *PKLID_TABLE_ENTRY; 00099 00100 #define LID_NO_SPECIFIC_OWNER 0xffffffff 00101 #define NUMBER_LID_TABLE_ENTRIES 1024 00102 00103 // 00104 // Macro to extract the high byte of a short offset 00105 // 00106 00107 #define HIGHBYTE(l) ((UCHAR)(((USHORT)(l)>>8) & 0xff)) 00108 00109 // 00110 // Macro to extract the low byte of a short offset 00111 // 00112 00113 #define LOWBYTE(l) ((UCHAR)(l)) 00114 00115 // 00116 // The following selectors are reserved for 16 bit stack, code and 00117 // ABIOS Common Data Area. 00118 // 00119 00120 #define KGDT_STACK16 0xf8 00121 #define KGDT_CODE16 0xf0 00122 #define KGDT_CDA16 0xe8 00123 #define KGDT_GDT_ALIAS 0x70 00124 00125 // 00126 // Misc. definitions 00127 // 00128 00129 #define RESERVED_GDT_ENTRIES 28 00130 00131 // 00132 // External references 00133 // 00134 00135 extern PKFREE_GDT_ENTRY KiAbiosGdtStart; 00136 extern PKFREE_GDT_ENTRY KiAbiosGdtEnd; 00137 extern PUCHAR KiEndOfCode16; 00138 extern ULONG KiStack16GdtEntry; 00139 00140 extern 00141 VOID 00142 KiI386CallAbios( 00143 IN KABIOS_POINTER AbiosFunction, 00144 IN KABIOS_POINTER DeviceBlockPointer, 00145 IN KABIOS_POINTER FunctionTransferTable, 00146 IN KABIOS_POINTER RequestBlock 00147 ); 00148 00149 VOID 00150 KiInitializeAbiosGdtEntry ( 00151 OUT PKGDTENTRY GdtEntry, 00152 IN ULONG Base, 00153 IN ULONG Limit, 00154 IN USHORT Type 00155 ); 00156 00157 extern 00158 ULONG 00159 KiAbiosGetGdt ( 00160 VOID 00161 ); 00162 00163

Generated on Sat May 15 19:39:12 2004 for test by doxygen 1.3.7