ReactOS  0.4.14-dev-593-g1793dcc
halp.h
Go to the documentation of this file.
1 /*
2  *
3  */
4 
5 #pragma once
6 
7 #ifdef CONFIG_SMP
8 #define HAL_BUILD_TYPE (DBG ? PRCB_BUILD_DEBUG : 0)
9 #else
10 #define HAL_BUILD_TYPE ((DBG ? PRCB_BUILD_DEBUG : 0) | PRCB_BUILD_UNIPROCESSOR)
11 #endif
12 
13 typedef struct _HAL_BIOS_FRAME
14 {
29 
30 typedef
31 VOID
33  VOID
34 );
35 
36 typedef
37 VOID
39  IN PKTRAP_FRAME TrapFrame
40 );
41 
42 #define HAL_APC_REQUEST 0
43 #define HAL_DPC_REQUEST 1
44 
45 /* HAL profiling offsets in KeGetPcr()->HalReserved[] */
46 #define HAL_PROFILING_INTERVAL 0
47 #define HAL_PROFILING_MULTIPLIER 1
48 
49 /* CMOS Registers and Ports */
50 #define CMOS_CONTROL_PORT (PUCHAR)0x70
51 #define CMOS_DATA_PORT (PUCHAR)0x71
52 #define RTC_REGISTER_A 0x0A
53 #define RTC_REG_A_UIP 0x80
54 #define RTC_REGISTER_B 0x0B
55 #define RTC_REG_B_PI 0x40
56 #define RTC_REGISTER_C 0x0C
57 #define RTC_REG_C_IRQ 0x80
58 #define RTC_REGISTER_D 0x0D
59 #define RTC_REGISTER_CENTURY 0x32
60 
61 /* Usage flags */
62 #define IDT_REGISTERED 0x01
63 #define IDT_LATCHED 0x02
64 #define IDT_READ_ONLY 0x04
65 #define IDT_INTERNAL 0x11
66 #define IDT_DEVICE 0x21
67 
68 /* Conversion functions */
69 #define BCD_INT(bcd) \
70  (((bcd & 0xF0) >> 4) * 10 + (bcd & 0x0F))
71 #define INT_BCD(int) \
72  (UCHAR)(((int / 10) << 4) + (int % 10))
73 
74 //
75 // BIOS Interrupts
76 //
77 #define VIDEO_SERVICES 0x10
78 
79 //
80 // Operations for INT 10h (in AH)
81 //
82 #define SET_VIDEO_MODE 0x00
83 
84 //
85 // Video Modes for INT10h AH=00 (in AL)
86 //
87 #define GRAPHICS_MODE_12 0x12 /* 80x30 8x16 640x480 16/256K */
88 
89 //
90 // Commonly stated as being 1.19318MHz
91 //
92 // See ISA System Architecture 3rd Edition (Tom Shanley, Don Anderson, John Swindle)
93 // P. 471
94 //
95 // However, the true value is closer to 1.19318181[...]81MHz since this is 1/3rd
96 // of the NTSC color subcarrier frequency which runs at 3.57954545[...]45MHz.
97 //
98 // Note that Windows uses 1.193167MHz which seems to have no basis. However, if
99 // one takes the NTSC color subcarrier frequency as being 3.579545 (trimming the
100 // infinite series) and divides it by three, one obtains 1.19318167.
101 //
102 // It may be that the original NT HAL source code introduced a typo and turned
103 // 119318167 into 1193167 by ommitting the "18". This is very plausible as the
104 // number is quite long.
105 //
106 #define PIT_FREQUENCY 1193182
107 
108 //
109 // These ports are controlled by the i8254 Programmable Interrupt Timer (PIT)
110 //
111 #define TIMER_CHANNEL0_DATA_PORT 0x40
112 #define TIMER_CHANNEL1_DATA_PORT 0x41
113 #define TIMER_CHANNEL2_DATA_PORT 0x42
114 #define TIMER_CONTROL_PORT 0x43
115 
116 //
117 // Mode 0 - Interrupt On Terminal Count
118 // Mode 1 - Hardware Re-triggerable One-Shot
119 // Mode 2 - Rate Generator
120 // Mode 3 - Square Wave Generator
121 // Mode 4 - Software Triggered Strobe
122 // Mode 5 - Hardware Triggered Strobe
123 //
125 {
135 
137 {
143 
144 typedef enum _TIMER_CHANNELS
145 {
151 
153 {
154  struct
155  {
160  };
163 
164 //
165 // See ISA System Architecture 3rd Edition (Tom Shanley, Don Anderson, John Swindle)
166 // P. 400
167 //
168 // This port is controled by the i8255 Programmable Peripheral Interface (PPI)
169 //
170 #define SYSTEM_CONTROL_PORT_A 0x92
171 #define SYSTEM_CONTROL_PORT_B 0x61
173 {
174  struct
175  {
184  };
187 
188 //
189 // See ISA System Architecture 3rd Edition (Tom Shanley, Don Anderson, John Swindle)
190 // P. 396, 397
191 //
192 // These ports are controlled by the i8259 Programmable Interrupt Controller (PIC)
193 //
194 #define PIC1_CONTROL_PORT 0x20
195 #define PIC1_DATA_PORT 0x21
196 #define PIC2_CONTROL_PORT 0xA0
197 #define PIC2_DATA_PORT 0xA1
198 
199 //
200 // Definitions for ICW/OCW Bits
201 //
203 {
207 
209 {
213 
215 {
219 
221 {
225 
227 {
231 
233 {
239 
241 {
247 
248 typedef enum _I8259_EOI_MODE
249 {
259 
260 //
261 // Definitions for ICW Registers
262 //
263 typedef union _I8259_ICW1
264 {
265  struct
266  {
273  };
276 
277 typedef union _I8259_ICW2
278 {
279  struct
280  {
283  };
286 
287 typedef union _I8259_ICW3
288 {
289  union
290  {
291  struct
292  {
301  };
302  struct
303  {
306  };
307  };
310 
311 typedef union _I8259_ICW4
312 {
313  struct
314  {
320  };
323 
324 typedef union _I8259_OCW2
325 {
326  struct
327  {
331  };
334 
335 typedef union _I8259_OCW3
336 {
337  struct
338  {
345  };
348 
349 typedef union _I8259_ISR
350 {
351  union
352  {
353  struct
354  {
363  };
364  };
367 
369 
370 //
371 // See EISA System Architecture 2nd Edition (Tom Shanley, Don Anderson, John Swindle)
372 // P. 34, 35
373 //
374 // These ports are controlled by the i8259A Programmable Interrupt Controller (PIC)
375 //
376 #define EISA_ELCR_MASTER 0x4D0
377 #define EISA_ELCR_SLAVE 0x4D1
378 
379 typedef union _EISA_ELCR
380 {
381  struct
382  {
383  struct
384  {
393  } Master;
394  struct
395  {
404  } Slave;
405  };
408 
409 typedef struct _PIC_MASK
410 {
411  union
412  {
413  struct
414  {
417  };
419  };
420 } PIC_MASK, *PPIC_MASK;
421 
422 typedef
423 BOOLEAN
425  IN KIRQL Irql,
426  IN ULONG Irq,
428 );
429 
430 BOOLEAN
431 NTAPI
433  IN KIRQL Irql,
434  IN ULONG Irq,
436 );
437 
438 BOOLEAN
439 NTAPI
441  IN KIRQL Irql,
442  IN ULONG Irq,
444 );
445 
446 BOOLEAN
447 NTAPI
449  IN KIRQL Irql,
450  IN ULONG Irq,
452 );
453 
454 BOOLEAN
455 NTAPI
457  IN KIRQL Irql,
458  IN ULONG Irq,
460 );
461 
462 BOOLEAN
463 NTAPI
465  IN KIRQL Irql,
466  IN ULONG Irq,
468 );
469 
470 BOOLEAN
471 NTAPI
473  IN KIRQL Irql,
474  IN ULONG Irq,
476 );
477 
478 BOOLEAN
479 NTAPI
481  IN KIRQL Irql,
482  IN ULONG Irq,
484 );
485 
486 BOOLEAN
487 NTAPI
489  IN KIRQL Irql,
490  IN ULONG Irq,
492 );
493 
494 VOID
495 __cdecl
497  VOID
498 );
499 
500 //
501 // Hack Flags
502 //
503 #define HALP_REVISION_FROM_HACK_FLAGS(x) ((x) >> 24)
504 #define HALP_REVISION_HACK_FLAGS(x) ((x) >> 12)
505 #define HALP_HACK_FLAGS(x) ((x) & 0xFFF)
506 
507 //
508 // Feature flags
509 //
510 #define HALP_CARD_FEATURE_FULL_DECODE 0x0001
511 
512 //
513 // Match Flags
514 //
515 #define HALP_CHECK_CARD_REVISION_ID 0x10000
516 #define HALP_CHECK_CARD_SUBVENDOR_ID 0x20000
517 #define HALP_CHECK_CARD_SUBSYSTEM_ID 0x40000
518 
519 //
520 // Mm PTE/PDE to Hal PTE/PDE
521 //
522 #define HalAddressToPde(x) (PHARDWARE_PTE)MiAddressToPde(x)
523 #define HalAddressToPte(x) (PHARDWARE_PTE)MiAddressToPte(x)
524 
525 typedef struct _IDTUsageFlags
526 {
527  UCHAR Flags;
528 } IDTUsageFlags;
529 
530 typedef struct
531 {
532  KIRQL Irql;
533  UCHAR BusReleativeVector;
534 } IDTUsage;
535 
536 typedef struct _HalAddressUsage
537 {
539  CM_RESOURCE_TYPE Type;
541  struct
542  {
545  } Element[];
547 
548 /* adapter.c */
550 
551 /* sysinfo.c */
552 INIT_FUNCTION
553 VOID
554 NTAPI
556  IN ULONG BusVector,
557  IN ULONG SystemVector,
558  IN KIRQL Irql);
559 
560 INIT_FUNCTION
561 VOID
562 NTAPI
564  IN ULONG BusVector,
565  IN ULONG SystemVector,
566  IN KIRQL Irql,
567  IN PVOID Handler,
569 
570 /* pic.c */
577 
578 /* profil.c */
580 
581 /* timer.c */
582 INIT_FUNCTION VOID NTAPI HalpInitializeClock(VOID);
585 
586 VOID
587 NTAPI
589 
590 /* pci.c */
592 
593 /* dma.c */
594 INIT_FUNCTION VOID HalpInitDma (VOID);
595 
596 /* Non-generic initialization */
599 
600 VOID
601 NTAPI
603 
604 //
605 // KD Support
606 //
607 VOID
608 NTAPI
610  VOID
611 );
612 
613 INIT_FUNCTION
614 VOID
615 NTAPI
617  VOID
618 );
619 
620 INIT_FUNCTION
621 NTSTATUS
622 NTAPI
624  IN PVOID LoaderBlock,
626 );
627 
628 INIT_FUNCTION
629 NTSTATUS
630 NTAPI
633 );
634 
635 //
636 // Memory routines
637 //
638 ULONG64
639 NTAPI
641  IN PLOADER_PARAMETER_BLOCK LoaderBlock,
642  IN ULONG64 MaxAddress,
643  IN PFN_NUMBER PageCount,
644  IN BOOLEAN Aligned
645 );
646 
647 PVOID
648 NTAPI
651  IN PFN_COUNT PageCount,
652  IN BOOLEAN FlushCurrentTLB
653 );
654 
655 VOID
656 NTAPI
659  IN PFN_COUNT NumberPages,
660  IN BOOLEAN FlushCurrentTLB
661 );
662 
663 PVOID
664 NTAPI
667  IN PFN_COUNT PageCount
668 );
669 
670 VOID
671 NTAPI
674  IN PFN_COUNT NumberPages
675 );
676 
677 /* sysinfo.c */
678 NTSTATUS
679 NTAPI
683  IN OUT PVOID Buffer,
685 );
686 
687 NTSTATUS
688 NTAPI
693 );
694 
695 //
696 // BIOS Routines
697 //
698 BOOLEAN
699 NTAPI
701  VOID
702 );
703 
704 VOID
705 FASTCALL
707  PKTRAP_FRAME TrapFrame
708 );
709 
710 VOID
711 __cdecl
713  VOID
714 );
715 
716 //
717 // Processor Halt Routine
718 //
719 VOID
720 NTAPI
722  VOID
723 );
724 
725 //
726 // CMOS Routines
727 //
728 INIT_FUNCTION
729 VOID
730 NTAPI
732  VOID
733 );
734 
735 UCHAR
736 NTAPI
738  IN UCHAR Reg
739 );
740 
741 VOID
742 NTAPI
744  IN UCHAR Reg,
745  IN UCHAR Value
746 );
747 
748 //
749 // Spinlock for protecting CMOS access
750 //
751 VOID
752 NTAPI
754  VOID
755 );
756 
757 VOID
758 NTAPI
760  VOID
761 );
762 
763 VOID
764 NTAPI
766  VOID
767 );
768 
769 NTSTATUS
770 NTAPI
773  IN HANDLE RootKey,
777 );
778 
779 INIT_FUNCTION
780 VOID
781 NTAPI
783  VOID
784 );
785 
786 INIT_FUNCTION
787 BOOLEAN
788 NTAPI
790  VOID
791 );
792 
793 INIT_FUNCTION
794 VOID
795 NTAPI
797  VOID
798 );
799 
800 INIT_FUNCTION
801 NTSTATUS
802 NTAPI
804  VOID
805 );
806 
807 INIT_FUNCTION
808 VOID
809 NTAPI
811  VOID
812 );
813 
814 INIT_FUNCTION
815 VOID
816 NTAPI
819  IN INTERFACE_TYPE InterfaceType
820 );
821 
822 INIT_FUNCTION
823 ULONG
824 NTAPI
826  VOID
827 );
828 
829 NTSTATUS
830 NTAPI
832  OUT PIO_RESOURCE_REQUIREMENTS_LIST *Requirements
833 );
834 
835 VOID
836 FASTCALL
838  IN PKTRAP_FRAME TrapFrame,
841 );
842 
843 INIT_FUNCTION
844 VOID
845 NTAPI
847  VOID
848 );
849 
850 NTSTATUS
851 NTAPI
853  VOID
854 );
855 
856 INIT_FUNCTION
857 VOID
858 NTAPI
860  IN ULONG i,
861  IN ULONG j,
862  IN ULONG k,
863  IN PPCI_COMMON_CONFIG PciData
864 );
865 
866 VOID
867 NTAPI
869  IN ULONG ProcessorNumber,
870  IN PLOADER_PARAMETER_BLOCK LoaderBlock
871 );
872 
873 #ifdef _M_AMD64
874 
875 VOID
876 NTAPI
879  _In_ PLOADER_PARAMETER_BLOCK LoaderBlock
880 );
881 
882 #define KfLowerIrql KeLowerIrql
883 #define KiEnterInterruptTrap(TrapFrame) /* We do all neccessary in asm code */
884 #define KiEoiHelper(TrapFrame) return /* Just return to the caller */
885 #define HalBeginSystemInterrupt(Irql, Vector, OldIrql) ((*(OldIrql) = PASSIVE_LEVEL), TRUE)
886 #ifndef CONFIG_SMP
887 /* On UP builds, spinlocks don't exist at IRQL >= DISPATCH */
888 #define KiAcquireSpinLock(SpinLock)
889 #define KiReleaseSpinLock(SpinLock)
890 #define KfAcquireSpinLock(SpinLock) KfRaiseIrql(DISPATCH_LEVEL);
891 #define KfReleaseSpinLock(SpinLock, OldIrql) KeLowerIrql(OldIrql);
892 #endif // !CONFIG_SMP
893 #endif // _M_AMD64
894 
896 
898 
900 
902 
904 
906 
909 extern PWCHAR HalName;
910 
912 
914 
915 extern const USHORT HalpBuildType;
UCHAR InterruptVector
Definition: halp.h:282
UCHAR IrqNumber
Definition: halp.h:328
UCHAR Irq8Level
Definition: halp.h:396
enum _TIMER_OPERATING_MODES TIMER_OPERATING_MODES
_In_opt_ ULONG _Out_ PULONG Value
Definition: rtlfuncs.h:2343
UCHAR SpecialMaskMode
Definition: halp.h:343
ULONG Length
Definition: halp.h:544
ULONG CsLimit
Definition: halp.h:21
NTSTATUS NTAPI HaliQuerySystemInformation(IN HAL_QUERY_INFORMATION_CLASS InformationClass, IN ULONG BufferSize, IN OUT PVOID Buffer, OUT PULONG ReturnedLength)
Definition: sysinfo.c:19
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ ULONG _Out_ PNDIS_STRING KeyName
Definition: ndis.h:4711
UCHAR Irq11Level
Definition: halp.h:399
UCHAR Interval
Definition: halp.h:269
#define IN
Definition: typedefs.h:38
UCHAR Irq5
Definition: halp.h:360
static NTSTATUS EnableInterrupts(IN PPORT_DEVICE_EXTENSION DeviceExtension, IN UCHAR FlagsToDisable, IN UCHAR FlagsToEnable)
Definition: pnp.c:380
VOID FASTCALL HalpExitToV86(PKTRAP_FRAME TrapFrame)
Definition: halp.h:205
PADAPTER_OBJECT NTAPI HalpAllocateAdapterEx(ULONG NumberOfMapRegisters, BOOLEAN IsMaster, BOOLEAN Dma32BitAddresses)
enum _INTERFACE_TYPE INTERFACE_TYPE
UCHAR InterruptMode
Definition: halp.h:270
union _I8259_ISR * PI8259_ISR
static PMEMKEY RootKey
Definition: registry.c:55
VOID NTAPI HalpRegisterVector(IN UCHAR Flags, IN ULONG BusVector, IN ULONG SystemVector, IN KIRQL Irql)
Definition: usage.c:34
_Out_ PULONG NumberOfMapRegisters
Definition: halfuncs.h:209
USHORT Bits
Definition: halp.h:406
#define __cdecl
Definition: accygwin.h:79
_In_ ULONG Mode
Definition: hubbusif.h:303
_Must_inspect_result_ _Out_ PNDIS_STATUS _In_ NDIS_HANDLE _In_ ULONG _Out_ PNDIS_STRING _Out_ PNDIS_HANDLE KeyHandle
Definition: ndis.h:4711
BOOLEAN NTAPI HalpDismissIrqLevel(IN KIRQL Irql, IN ULONG Irq, OUT PKIRQL OldIrql)
Definition: pic.c:937
_TIMER_CHANNELS
Definition: halp.h:144
UCHAR Irq0
Definition: halp.h:355
ULONG PFN_COUNT
Definition: mmtypes.h:102
union _SYSTEM_CONTROL_PORT_B_REGISTER * PSYSTEM_CONTROL_PORT_B_REGISTER
VOID HalpClockInterrupt(VOID)
Definition: timer.c:30
INIT_FUNCTION BOOLEAN NTAPI HalpGetDebugPortTable(VOID)
Definition: halacpi.c:952
_I8259_EOI_MODE
Definition: halp.h:248
UCHAR EoiMode
Definition: halp.h:330
UCHAR SlaveIrq5
Definition: halp.h:298
UCHAR Sbz
Definition: halp.h:329
enum _I8259_ICW1_INTERRUPT_MODE I8259_ICW1_INTERRUPT_MODE
_In_ BOOLEAN Create
Definition: pstypes.h:511
INIT_FUNCTION NTSTATUS NTAPI HalpMarkAcpiHal(VOID)
Definition: misc.c:64
USHORT Both
Definition: halp.h:418
LONG NTSTATUS
Definition: precomp.h:26
union _TIMER_CONTROL_PORT_REGISTER TIMER_CONTROL_PORT_REGISTER
struct _PIC_MASK PIC_MASK
union _I8259_ICW4 I8259_ICW4
NTSTATUS NTAPI HalpQueryAcpiResourceRequirements(OUT PIO_RESOURCE_REQUIREMENTS_LIST *Requirements)
Definition: halacpi.c:1016
INIT_FUNCTION VOID NTAPI HalpReportResourceUsage(IN PUNICODE_STRING HalName, IN INTERFACE_TYPE InterfaceType)
Definition: usage.c:26
UCHAR Irq2Level
Definition: halp.h:387
_I8259_ICW1_OPERATING_MODE
Definition: halp.h:202
enum _I8259_ICW4_SYSTEM_MODE I8259_ICW4_SYSTEM_MODE
UCHAR Irq9Level
Definition: halp.h:397
_I8259_ICW4_BUFFERED_MODE
Definition: halp.h:232
ULONG CsBase
Definition: halp.h:22
union _I8259_OCW3 * PI8259_OCW3
UCHAR NTAPI HalpReadCmos(IN UCHAR Reg)
Definition: cmos.c:24
ULONG SsFlags
Definition: halp.h:26
uint16_t * PWCHAR
Definition: typedefs.h:54
VOID HalpInitializeClock(VOID)
Definition: timer.c:54
PADDRESS_USAGE HalpAddressUsageList
Definition: usage.c:59
VOID NTAPI HalpCheckPowerButton(VOID)
Definition: misc.c:20
union _I8259_ICW3 * PI8259_ICW3
union _EISA_ELCR EISA_ELCR
#define FASTCALL
Definition: nt_native.h:50
_Out_ PKIRQL Irql
Definition: csq.h:179
union _I8259_ISR I8259_ISR
UCHAR SlaveIrq3
Definition: halp.h:296
#define DECLSPEC_NORETURN
Definition: ntbasedef.h:176
INIT_FUNCTION ULONG NTAPI HalpIs16BitPortDecodeSupported(VOID)
Definition: halacpi.c:961
union _I8259_ICW1 I8259_ICW1
UCHAR SlaveIrq2
Definition: halp.h:295
BOOLEAN NTAPI HalpDismissIrq15(IN KIRQL Irql, IN ULONG Irq, OUT PKIRQL OldIrql)
Definition: pic.c:804
PVOID NTAPI HalpMapPhysicalMemory64Vista(IN PHYSICAL_ADDRESS PhysicalAddress, IN PFN_COUNT PageCount, IN BOOLEAN FlushCurrentTLB)
Definition: memory.c:156
INIT_FUNCTION VOID NTAPI HalpDebugPciDumpBus(IN ULONG i, IN ULONG j, IN ULONG k, IN PPCI_COMMON_CONFIG PciData)
Definition: bussupp.c:807
DECLSPEC_NORETURN VOID FASTCALL HalpDispatchInterrupt2ndEntry(IN PKTRAP_FRAME TrapFrame)
Definition: pic.c:1288
VOID FASTCALL KeUpdateSystemTime(IN PKTRAP_FRAME TrapFrame, IN ULONG Increment, IN KIRQL OldIrql)
Definition: time.c:64
UCHAR Bits
Definition: halp.h:284
UCHAR KIRQL
Definition: env_spec_w32.h:591
UCHAR Bits
Definition: halp.h:308
UCHAR SlaveIrq7
Definition: halp.h:300
union _I8259_OCW2 * PI8259_OCW2
_Must_inspect_result_ _In_ ULONG Flags
Definition: wsk.h:170
VOID HalpInitPhase1(VOID)
Definition: halinit_up.c:26
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
VOID NTAPI HalpEnableInterruptHandler(IN UCHAR Flags, IN ULONG BusVector, IN ULONG SystemVector, IN KIRQL Irql, IN PVOID Handler, IN KINTERRUPT_MODE Mode)
Definition: usage.c:49
ULONG PFN_NUMBER
Definition: ke.h:8
UCHAR ReadRequest
Definition: halp.h:339
NTSTATUS(* NTAPI)(IN PFILE_FULL_EA_INFORMATION EaBuffer, IN ULONG EaLength, OUT PULONG ErrorOffset)
Definition: IoEaTest.cpp:117
enum _TIMER_CHANNELS TIMER_CHANNELS
NTSTATUS NTAPI HalpSetupPciDeviceForDebugging(IN PVOID LoaderBlock, IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice)
Definition: pci.c:473
VOID NTAPI HalpUnmapVirtualAddress(IN PVOID VirtualAddress, IN ULONG NumberPages)
Definition: misc.c:39
UCHAR Irq2
Definition: halp.h:357
PWCHAR HalName
Definition: halacpi.c:45
_I8259_READ_REQUEST
Definition: halp.h:240
struct _HAL_BIOS_FRAME HAL_BIOS_FRAME
DECLSPEC_NORETURN VOID FASTCALL HalpApcInterrupt2ndEntry(IN PKTRAP_FRAME TrapFrame)
Definition: pic.c:1239
UCHAR Bits
Definition: halp.h:365
ULONG Start
Definition: halp.h:543
UCHAR Slave
Definition: halp.h:416
struct _EISA_ELCR::@1497::@1499 Master
VOID __cdecl HalpDispatchInterrupt(VOID)
UCHAR Irq4Level
Definition: halp.h:389
UCHAR SpecialFullyNestedMode
Definition: halp.h:318
UCHAR Reserved
Definition: halp.h:319
enum _I8259_ICW4_EOI_MODE I8259_ICW4_EOI_MODE
ULONG Esp
Definition: halp.h:16
UCHAR Irq6Level
Definition: halp.h:391
unsigned char BOOLEAN
BOOLEAN HalDisableFirmwareMapper
Definition: halacpi.c:43
VOID HalpProfileInterrupt(VOID)
enum _I8259_READ_REQUEST I8259_READ_REQUEST
enum _KINTERRUPT_MODE KINTERRUPT_MODE
UCHAR Flags
Definition: halp.h:26
VOID NTAPI HalpWriteCmos(IN UCHAR Reg, IN UCHAR Value)
Definition: cmos.c:35
VOID(FASTCALL * PHAL_SW_INTERRUPT_HANDLER_2ND_ENTRY)(IN PKTRAP_FRAME TrapFrame)
Definition: halp.h:38
ULONG EFlags
Definition: halp.h:17
Definition: bufpool.h:45
ULONG SsBase
Definition: halp.h:25
VOID NTAPI HalpFlushTLB(VOID)
Definition: misc.c:163
BOOLEAN NTAPI HalpBiosDisplayReset(VOID)
Definition: x86bios.c:455
struct _HalAddressUsage::@1505 Element[]
VOID NTAPI HalpAcquireCmosSpinLock(VOID)
Definition: spinlock.c:227
UCHAR Sbz
Definition: halp.h:281
UCHAR Bits
Definition: halp.h:274
CM_RESOURCE_TYPE Type
Definition: halp.h:539
UCHAR Sbo
Definition: halp.h:341
UCHAR Irq4
Definition: halp.h:359
union _I8259_ICW1 * PI8259_ICW1
UCHAR SlaveIrq6
Definition: halp.h:299
UCHAR SystemMode
Definition: halp.h:315
enum _HAL_QUERY_INFORMATION_CLASS HAL_QUERY_INFORMATION_CLASS
Definition: halp.h:244
VOID HalpInitPciBus(VOID)
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
VOID HalpInitPhase0(PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: halinit_mp.c:31
INIT_FUNCTION VOID NTAPI HalpBuildAddressMap(VOID)
Definition: halacpi.c:944
ULONG CsFlags
Definition: halp.h:23
BOOLEAN HalpProfilingStopped
Definition: profil.c:18
UCHAR OperatingMode
Definition: halp.h:268
NTSTATUS NTAPI HalpReleasePciDeviceForDebugging(IN OUT PDEBUG_DEVICE_DESCRIPTOR PciDevice)
Definition: pci.c:482
VOID NTAPI HalpCalibrateStallExecution(VOID)
Definition: hardware.c:100
union _EISA_ELCR * PEISA_ELCR
UCHAR BufferedMode
Definition: halp.h:317
union _I8259_ICW4 * PI8259_ICW4
KAFFINITY HalpActiveProcessors
Definition: processor.c:17
struct _PIC_MASK * PPIC_MASK
UCHAR NeedIcw4
Definition: halp.h:267
struct _HalAddressUsage * PADDRESS_USAGE
ULONG SegSs
Definition: halp.h:15
UCHAR Irq5Level
Definition: halp.h:390
ULONG SegCs
Definition: halp.h:18
#define BufferSize
Definition: classpnp.h:419
ADDRESS_USAGE HalpDefaultIoSpace
Definition: usage.c:81
union _SYSTEM_CONTROL_PORT_B_REGISTER SYSTEM_CONTROL_PORT_B_REGISTER
const USHORT HalpBuildType
Definition: halinit_apic.c:22
I8259_ISR * PI8259_IDR
Definition: halp.h:368
UCHAR Irq15Level
Definition: halp.h:403
UCHAR Irq7
Definition: halp.h:362
struct _HAL_BIOS_FRAME * PHAL_BIOS_FRAME
UCHAR EoiMode
Definition: halp.h:316
KSPIN_LOCK HalpSystemHardwareLock
Definition: cmos.c:18
ULONG SsLimit
Definition: halp.h:24
enum _I8259_ICW4_BUFFERED_MODE I8259_ICW4_BUFFERED_MODE
NTSTATUS NTAPI HaliInitPnpDriver(VOID)
Definition: halpnpdd.c:902
INIT_FUNCTION VOID NTAPI HalpInitializeCmos(VOID)
Definition: cmos.c:160
BOOLEAN NTAPI HalpDismissIrq15Level(IN KIRQL Irql, IN ULONG Irq, OUT PKIRQL OldIrql)
Definition: pic.c:947
UCHAR Irq1Level
Definition: halp.h:386
PWCHAR HalHardwareIdString
Definition: halacpi.c:44
union _I8259_OCW3 I8259_OCW3
enum _TIMER_ACCESS_MODES TIMER_ACCESS_MODES
unsigned __int64 ULONG64
Definition: imports.h:198
_I8259_ICW1_INTERRUPT_MODE
Definition: halp.h:208
enum _HAL_SET_INFORMATION_CLASS HAL_SET_INFORMATION_CLASS
_Must_inspect_result_ typedef _In_ PHYSICAL_ADDRESS PhysicalAddress
Definition: iotypes.h:1061
unsigned char UCHAR
Definition: xmlstorage.h:181
struct _IDTUsageFlags IDTUsageFlags
_I8259_ICW4_EOI_MODE
Definition: halp.h:226
ULONG Eip
Definition: halp.h:19
INIT_FUNCTION VOID NTAPI HalpInitBusHandlers(VOID)
Definition: halacpi.c:935
VOID __cdecl HalpApcInterrupt(VOID)
KAFFINITY HalpDefaultInterruptAffinity
Definition: processor.c:18
_Requires_lock_held_ Interrupt _Releases_lock_ Interrupt _In_ _IRQL_restores_ KIRQL OldIrql
Definition: kefuncs.h:803
struct _HalAddressUsage ADDRESS_USAGE
LARGE_INTEGER HalpPerfCounter
Definition: timer.c:25
Definition: halp.h:245
VOID NTAPI HalInitializeBios(_In_ ULONG Unknown, _In_ PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: x86bios.c:46
PVOID *typedef PHANDLE
Definition: ntsecpkg.h:414
#define VOID
Definition: acefi.h:82
UCHAR Irq10Level
Definition: halp.h:398
UCHAR Irq3Level
Definition: halp.h:388
struct _EISA_ELCR::@1497::@1500 Slave
_In_ ULONG _In_ BATTERY_QUERY_INFORMATION_LEVEL _In_ LONG _In_ ULONG _Out_ PULONG ReturnedLength
Definition: batclass.h:187
UCHAR Bits
Definition: halp.h:321
VOID NTAPI HalpReleaseCmosSpinLock(VOID)
Definition: spinlock.c:244
_I8259_ICW1_INTERVAL
Definition: halp.h:214
KIRQL * PKIRQL
Definition: env_spec_w32.h:592
UCHAR Bits
Definition: halp.h:332
VOID NTAPI HalpUnmapVirtualAddressVista(IN PVOID VirtualAddress, IN PFN_COUNT NumberPages, IN BOOLEAN FlushCurrentTLB)
Definition: memory.c:227
BOOLEAN NTAPI HalpDismissIrqGeneric(IN KIRQL Irql, IN ULONG Irq, OUT PKIRQL OldIrql)
Definition: pic.c:794
_In_ ULONG _In_ BOOLEAN _Must_inspect_result_ PVOID * VirtualAddress
Definition: ndis.h:3791
UCHAR Flags
Definition: halp.h:540
UCHAR Irq7Level
Definition: halp.h:392
ULONG64 NTAPI HalpAllocPhysicalMemory(IN PLOADER_PARAMETER_BLOCK LoaderBlock, IN ULONG64 MaxAddress, IN PFN_NUMBER PageCount, IN BOOLEAN Aligned)
Definition: memory.c:29
UCHAR SlaveIrq4
Definition: halp.h:297
UCHAR Irq14Level
Definition: halp.h:402
BOOLEAN NTAPI HalpDismissIrq13(IN KIRQL Irql, IN ULONG Irq, OUT PKIRQL OldIrql)
Definition: pic.c:840
ACPI_PHYSICAL_ADDRESS ACPI_SIZE BOOLEAN Warn BOOLEAN Physical UINT32 ACPI_TABLE_HEADER *OutTableHeader ACPI_TABLE_HEADER **OutTable ACPI_HANDLE UINT32 ACPI_WALK_CALLBACK ACPI_WALK_CALLBACK void void **ReturnValue UINT32 ACPI_BUFFER *RetPathPtr ACPI_OBJECT_HANDLER Handler
Definition: acpixf.h:668
_TIMER_OPERATING_MODES
Definition: halp.h:124
PHAL_SW_INTERRUPT_HANDLER __cdecl HalpDispatchInterrupt2(VOID)
Definition: pic.c:1304
UCHAR Reserved
Definition: halp.h:344
UCHAR InterruptVectorAddress
Definition: halp.h:272
UCHAR Irq6
Definition: halp.h:361
enum _I8259_ICW1_OPERATING_MODE I8259_ICW1_OPERATING_MODE
#define _In_
Definition: no_sal2.h:204
UCHAR PollCommand
Definition: halp.h:340
union _I8259_OCW2 I8259_OCW2
NTSTATUS NTAPI HalpOpenRegistryKey(IN PHANDLE KeyHandle, IN HANDLE RootKey, IN PUNICODE_STRING KeyName, IN ACCESS_MASK DesiredAccess, IN BOOLEAN Create)
Definition: misc.c:111
union _I8259_ICW3 I8259_ICW3
UCHAR Irq0Level
Definition: halp.h:385
UCHAR Bits
Definition: halp.h:346
VOID NTAPI HaliHaltSystem(VOID)
Definition: processor.c:22
unsigned short USHORT
Definition: pedump.c:61
BOOLEAN NTAPI HalpDismissIrq13Level(IN KIRQL Irql, IN ULONG Irq, OUT PKIRQL OldIrql)
Definition: pic.c:982
ULONG_PTR KAFFINITY
Definition: compat.h:75
BOOLEAN NTAPI HalpDismissIrq07(IN KIRQL Irql, IN ULONG Irq, OUT PKIRQL OldIrql)
Definition: pic.c:853
_In_ PIO_STACK_LOCATION _Inout_ PFILE_OBJECT _Inout_ PVCB _Outptr_result_maybenull_ PDCB _In_ PDCB _In_ PDIRENT _In_ ULONG _In_ ULONG _In_ PUNICODE_STRING _In_ PACCESS_MASK DesiredAccess
Definition: create.c:4157
ULONG KSPIN_LOCK
Definition: env_spec_w32.h:72
unsigned int * PULONG
Definition: retypes.h:1
VOID __cdecl HalpRealModeStart(VOID)
UCHAR SlaveIrq0
Definition: halp.h:293
IDTUsageFlags HalpIDTUsageFlags[MAXIMUM_IDTVECTOR+1]
Definition: usage.c:19
NTSTATUS NTAPI HaliSetSystemInformation(IN HAL_SET_INFORMATION_CLASS InformationClass, IN ULONG BufferSize, IN OUT PVOID Buffer)
Definition: sysinfo.c:31
UCHAR Init
Definition: halp.h:271
INIT_FUNCTION VOID NTAPI HalpGetNMICrashFlag(VOID)
Definition: usage.c:571
Definition: halp.h:29
I8259_ISR I8259_IDR
Definition: halp.h:368
UCHAR Irq3
Definition: halp.h:358
#define BOOLEAN
Definition: pedump.c:73
#define OUT
Definition: typedefs.h:39
Definition: halp.h:204
union _TIMER_CONTROL_PORT_REGISTER * PTIMER_CONTROL_PORT_REGISTER
enum _I8259_ICW1_INTERVAL I8259_ICW1_INTERVAL
VOID HalpInitDma(VOID)
Definition: dma.c:121
VOID NTAPI HalpInitializePICs(IN BOOLEAN EnableInterrupts)
Definition: apic.c:445
unsigned int ULONG
Definition: retypes.h:1
PVOID NTAPI HalpMapPhysicalMemory64(IN PHYSICAL_ADDRESS PhysicalAddress, IN ULONG NumberPage)
Definition: misc.c:28
BOOLEAN(NTAPI * PHAL_DISMISS_INTERRUPT)(IN KIRQL Irql, IN ULONG Irq, OUT PKIRQL OldIrql)
Definition: halp.h:424
enum _I8259_EOI_MODE I8259_EOI_MODE
struct _HalAddressUsage * Next
Definition: halp.h:538
_TIMER_ACCESS_MODES
Definition: halp.h:136
UCHAR Irq13Level
Definition: halp.h:401
PKTRAP_FRAME TrapFrame
Definition: halp.h:20
_In_ FILTER_INFORMATION_CLASS InformationClass
Definition: fltkernel.h:1714
VOID __cdecl HalpHardwareInterruptLevel(VOID)
VOID NTAPI HalpInitializeLegacyPICs(VOID)
Definition: pic.c:18
UCHAR Master
Definition: halp.h:415
IN OUT PLONG IN OUT PLONG Addend IN OUT PLONG IN LONG Increment
Definition: CrNtStubs.h:42
VOID NTAPI HalpRegisterKdSupportFunctions(VOID)
Definition: bus.c:23
UCHAR Sbz
Definition: halp.h:342
INIT_FUNCTION VOID NTAPI HalpReportSerialNumber(VOID)
Definition: misc.c:33
UCHAR SlaveId
Definition: halp.h:304
ULONG Prefix
Definition: halp.h:27
UCHAR Reserved
Definition: halp.h:305
union _I8259_ICW2 * PI8259_ICW2
BOOLEAN HalpNMIInProgress
Definition: misc.c:22
int k
Definition: mpi.c:3369
VOID NTAPI HalpInitProcessor(IN ULONG ProcessorNumber, IN PLOADER_PARAMETER_BLOCK LoaderBlock)
Definition: halinit_apic.c:28
ULONG ACCESS_MASK
Definition: nt_native.h:40
#define MAXIMUM_IDTVECTOR
Definition: asm.h:277
UCHAR SlaveIrq1
Definition: halp.h:294
UCHAR Irq1
Definition: halp.h:356
VOID(__cdecl * PHAL_SW_INTERRUPT_HANDLER)(VOID)
Definition: halp.h:32
UCHAR Irq12Level
Definition: halp.h:400
union _I8259_ICW2 I8259_ICW2
BOOLEAN NTAPI HalpDismissIrq07Level(IN KIRQL Irql, IN ULONG Irq, OUT PKIRQL OldIrql)
Definition: pic.c:995
_I8259_ICW4_SYSTEM_MODE
Definition: halp.h:220