xref: /reactos/hal/halarm/include/halp.h (revision c2c66aff)
1 #pragma once
2 
3 //
4 // ARM Headers
5 //
6 #include <internal/arm/ke.h>
7 #include <internal/arm/intrin_i.h>
8 
9 //
10 // Versatile Peripherals
11 //
12 #include <peripherals/pl011.h>
13 #include <peripherals/pl190.h>
14 #include <peripherals/sp804.h>
15 
16 #define PRIMARY_VECTOR_BASE     0x00
17 
18 /* Usage flags */
19 #define IDT_REGISTERED          0x01
20 #define IDT_LATCHED             0x02
21 #define IDT_INTERNAL            0x11
22 #define IDT_DEVICE              0x21
23 
24 typedef struct _IDTUsageFlags
25 {
26     UCHAR Flags;
27 } IDTUsageFlags;
28 
29 typedef struct
30 {
31     KIRQL Irql;
32     UCHAR BusReleativeVector;
33 } IDTUsage;
34 
35 VOID
36 NTAPI
37 HalpRegisterVector(IN UCHAR Flags,
38                    IN ULONG BusVector,
39                    IN ULONG SystemVector,
40                    IN KIRQL Irql);
41 
42 VOID
43 NTAPI
44 HalpEnableInterruptHandler(IN UCHAR Flags,
45                            IN ULONG BusVector,
46                            IN ULONG SystemVector,
47                            IN KIRQL Irql,
48                            IN PVOID Handler,
49                            IN KINTERRUPT_MODE Mode);
50 
51 VOID HalpInitPhase0 (PLOADER_PARAMETER_BLOCK LoaderBlock);
52 VOID HalpInitPhase1(VOID);
53 
54 VOID HalpInitializeInterrupts(VOID);
55 VOID HalpInitializeClock(VOID);
56 VOID HalpClockInterrupt(VOID);
57 VOID HalpProfileInterrupt(VOID);
58 
59 extern ULONG HalpCurrentTimeIncrement, HalpNextTimeIncrement, HalpNextIntervalCount;
60