2 * Various useful prototypes
11 #include <internal/linkage.h>
15 * Use these to place a function in a specific section of the executable
17 #define PLACE_IN_SECTION(s) __attribute__((section (s)))
18 #define INIT_FUNCTION (PLACE_IN_SECTION("init"))
19 #define PAGE_LOCKED_FUNCTION (PLACE_IN_SECTION("pagelk"))
20 #define PAGE_UNLOCKED_FUNCTION (PLACE_IN_SECTION("pagepo"))
23 * Maximum size of the kmalloc area (this is totally arbitary)
25 #define NONPAGED_POOL_SIZE (4*1024*1024)
27 VOID
KiInterruptDispatch(unsigned int irq
);
28 VOID
KiDispatchInterrupt(unsigned int irq
);
29 VOID
KeTimerInterrupt(VOID
);
32 * Defines a descriptor as it appears in the processor tables
40 extern descriptor idt
[256];
41 extern descriptor gdt
[256];
44 * printf style functions
46 asmlinkage
void printk(const char* fmt
, ...);
47 int vsprintf(char *buf
, const char *fmt
, va_list args
);
48 int sprintf(char* buf
, const char* fmt
, ...);
53 * Magic value (useless really)
64 * Number of files (including the kernel) loaded
66 unsigned int nr_files
;
69 * Range of physical memory being used by the system
71 unsigned int start_mem
;
75 * List of module lengths (terminated by a 0)
77 unsigned int module_length
[64];
82 * Initalization functions (called once by main())
84 void MmInitalize(boot_param
* bp
);
85 void InitalizeExceptions(void);
86 void InitalizeIRQ(void);
87 void InitializeTimer(void);
88 void InitConsole(boot_param
* bp
);
90 void HalInit(boot_param
* bp
);
92 void ObjNamespcInit(void);
94 void KeInitializeBugCheck(void);
95 VOID
KeInitializeDispatcher(VOID
);
97 void KeCalibrateTimerLoop(void);
100 * FUNCTION: Called to execute queued dpcs
102 void KeDrainDpcQueue(void);
104 void KeExpireTimers(void);
106 typedef unsigned int (exception_hook
)(CONTEXT
* c
, unsigned int exp
);
107 asmlinkage
unsigned int ExHookException(exception_hook fn
, UINT exp
);