6547e251ab399f204f6afdb445cf04292017f865
[reactos.git] / reactos / hal / hal / hal.c
1 /* $Id$
2 *
3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
5 * FILE: hal/hal.c
6 * PURPOSE: Hardware Abstraction Layer DLL
7 * PROGRAMMER: Casper S. Hornstrup (chorns@users.sourceforge.net)
8 * REVISION HISTORY:
9 * 01-08-2001 CSH Created
10 */
11
12 /* INCLUDES ******************************************************************/
13
14 #include <ddk/ntddk.h>
15 #include <ndk/halfuncs.h>
16 #include <ndk/kdfuncs.h>
17
18 #define NDEBUG
19 #include <debug.h>
20
21 /* DATA **********************************************************************/
22
23 ULONG KdComPortInUse = 0;
24
25 /* FUNCTIONS *****************************************************************/
26
27 NTSTATUS
28 NTAPI
29 DriverEntry(
30 PDRIVER_OBJECT DriverObject,
31 PUNICODE_STRING RegistryPath)
32 {
33 UNIMPLEMENTED;
34
35 return STATUS_SUCCESS;
36 }
37
38
39 VOID
40 FASTCALL
41 ExAcquireFastMutex(
42 PFAST_MUTEX FastMutex)
43 {
44 UNIMPLEMENTED;
45 }
46
47
48 VOID
49 FASTCALL
50 ExReleaseFastMutex(
51 PFAST_MUTEX FastMutex)
52 {
53 UNIMPLEMENTED;
54 }
55
56
57 BOOLEAN FASTCALL
58 ExTryToAcquireFastMutex(
59 PFAST_MUTEX FastMutex)
60 {
61 UNIMPLEMENTED;
62
63 return TRUE;
64 }
65
66
67 VOID
68 NTAPI
69 HalAcquireDisplayOwnership(
70 PHAL_RESET_DISPLAY_PARAMETERS ResetDisplayParameters)
71 {
72 UNIMPLEMENTED;
73 }
74
75
76 NTSTATUS
77 NTAPI
78 HalAdjustResourceList(
79 PCM_RESOURCE_LIST Resources)
80 {
81 UNIMPLEMENTED;
82
83 return STATUS_SUCCESS;
84 }
85
86
87 BOOLEAN
88 NTAPI
89 HalAllProcessorsStarted(VOID)
90 {
91 UNIMPLEMENTED;
92
93 return TRUE;
94 }
95
96
97 NTSTATUS
98 NTAPI
99 HalAllocateAdapterChannel(
100 PADAPTER_OBJECT AdapterObject,
101 PWAIT_CONTEXT_BLOCK WaitContextBlock,
102 ULONG NumberOfMapRegisters,
103 PDRIVER_CONTROL ExecutionRoutine)
104 {
105 UNIMPLEMENTED;
106
107 return STATUS_SUCCESS;
108 }
109
110
111 PVOID
112 NTAPI
113 HalAllocateCommonBuffer(
114 PADAPTER_OBJECT AdapterObject,
115 ULONG Length,
116 PPHYSICAL_ADDRESS LogicalAddress,
117 BOOLEAN CacheEnabled)
118 {
119 UNIMPLEMENTED;
120
121 return NULL;
122 }
123
124
125 NTSTATUS
126 NTAPI
127 HalAssignSlotResources(
128 PUNICODE_STRING RegistryPath,
129 PUNICODE_STRING DriverClassName,
130 PDRIVER_OBJECT DriverObject,
131 PDEVICE_OBJECT DeviceObject,
132 INTERFACE_TYPE BusType,
133 ULONG BusNumber,
134 ULONG SlotNumber,
135 PCM_RESOURCE_LIST *AllocatedResources)
136 {
137 UNIMPLEMENTED;
138
139 return TRUE;
140 }
141
142
143 BOOLEAN
144 NTAPI
145 HalBeginSystemInterrupt (ULONG Vector,
146 KIRQL Irql,
147 PKIRQL OldIrql)
148 {
149 UNIMPLEMENTED;
150
151 return TRUE;
152 }
153
154
155 VOID
156 NTAPI
157 HalCalibratePerformanceCounter(
158 ULONG Count)
159 {
160 UNIMPLEMENTED;
161 }
162
163
164 BOOLEAN
165 NTAPI
166 HalDisableSystemInterrupt(
167 ULONG Vector,
168 KIRQL Irql)
169 {
170 UNIMPLEMENTED;
171
172 return TRUE;
173 }
174
175
176 VOID
177 NTAPI
178 HalDisplayString(
179 PCH String)
180 {
181 UNIMPLEMENTED;
182 }
183
184
185 BOOLEAN
186 NTAPI
187 HalEnableSystemInterrupt(
188 ULONG Vector,
189 KIRQL Irql,
190 KINTERRUPT_MODE InterruptMode)
191 {
192 UNIMPLEMENTED;
193
194 return TRUE;
195 }
196
197
198 VOID
199 NTAPI
200 HalEndSystemInterrupt(
201 KIRQL Irql,
202 ULONG Unknown2)
203 {
204 UNIMPLEMENTED;
205 }
206
207
208 BOOLEAN
209 NTAPI
210 HalFlushCommonBuffer(
211 ULONG Unknown1,
212 ULONG Unknown2,
213 ULONG Unknown3,
214 ULONG Unknown4,
215 ULONG Unknown5)
216 {
217 UNIMPLEMENTED;
218
219 return TRUE;
220 }
221
222
223 VOID
224 NTAPI
225 HalFreeCommonBuffer(
226 PADAPTER_OBJECT AdapterObject,
227 ULONG Length,
228 PHYSICAL_ADDRESS LogicalAddress,
229 PVOID VirtualAddress,
230 BOOLEAN CacheEnabled)
231 {
232 UNIMPLEMENTED;
233 }
234
235
236 PADAPTER_OBJECT
237 NTAPI
238 HalGetAdapter(
239 PDEVICE_DESCRIPTION DeviceDescription,
240 PULONG NumberOfMapRegisters)
241 {
242 UNIMPLEMENTED;
243
244 return (PADAPTER_OBJECT)NULL;
245 }
246
247
248 ULONG
249 NTAPI
250 HalGetBusData(
251 BUS_DATA_TYPE BusDataType,
252 ULONG BusNumber,
253 ULONG SlotNumber,
254 PVOID Buffer,
255 ULONG Length)
256 {
257 UNIMPLEMENTED;
258
259 return 0;
260 }
261
262
263 ULONG
264 NTAPI
265 HalGetBusDataByOffset(
266 BUS_DATA_TYPE BusDataType,
267 ULONG BusNumber,
268 ULONG SlotNumber,
269 PVOID Buffer,
270 ULONG Offset,
271 ULONG Length)
272 {
273 UNIMPLEMENTED;
274
275 return 0;
276 }
277
278
279 BOOLEAN
280 NTAPI
281 HalGetEnvironmentVariable(
282 PCH Name,
283 PCH Value,
284 USHORT ValueLength)
285 {
286 UNIMPLEMENTED;
287
288 return FALSE;
289 }
290
291
292 ULONG
293 NTAPI
294 HalGetInterruptVector(
295 INTERFACE_TYPE InterfaceType,
296 ULONG BusNumber,
297 ULONG BusInterruptLevel,
298 ULONG BusInterruptVector,
299 PKIRQL Irql,
300 PKAFFINITY Affinity)
301 {
302 UNIMPLEMENTED;
303
304 return 0;
305 }
306
307
308 VOID
309 NTAPI
310 HalHandleNMI(
311 ULONG Unused)
312 {
313 UNIMPLEMENTED;
314 }
315
316
317 BOOLEAN
318 NTAPI
319 HalInitSystem(
320 ULONG BootPhase,
321 PLOADER_PARAMETER_BLOCK LoaderBlock)
322 {
323 UNIMPLEMENTED;
324
325 return TRUE;
326 }
327
328
329 VOID
330 NTAPI
331 HalInitializeProcessor(
332 ULONG ProcessorNumber,
333 PVOID ProcessorStack)
334 {
335 UNIMPLEMENTED;
336 }
337
338
339 BOOLEAN
340 NTAPI
341 HalMakeBeep(
342 ULONG Frequency)
343 {
344 UNIMPLEMENTED;
345
346 return TRUE;
347 }
348
349
350 VOID
351 NTAPI
352 HalProcessorIdle(VOID)
353 {
354 UNIMPLEMENTED;
355 }
356
357
358 BOOLEAN
359 NTAPI
360 HalQueryDisplayOwnership(VOID)
361 {
362 UNIMPLEMENTED;
363
364 return FALSE;
365 }
366
367
368 VOID
369 NTAPI
370 HalQueryDisplayParameters(
371 OUT PULONG DispSizeX,
372 OUT PULONG DispSizeY,
373 OUT PULONG CursorPosX,
374 OUT PULONG CursorPosY)
375 {
376 UNIMPLEMENTED;
377 }
378
379
380 VOID
381 NTAPI
382 HalQueryRealTimeClock(
383 PTIME_FIELDS Time)
384 {
385 UNIMPLEMENTED;
386 }
387
388
389 ULONG
390 NTAPI
391 HalReadDmaCounter(
392 PADAPTER_OBJECT AdapterObject)
393 {
394 UNIMPLEMENTED;
395
396 return 0;
397 }
398
399
400 VOID
401 NTAPI
402 HalReleaseDisplayOwnership(VOID)
403 {
404 UNIMPLEMENTED;
405 }
406
407 VOID
408 NTAPI
409 HalReportResourceUsage(VOID)
410 {
411 UNIMPLEMENTED;
412 }
413
414
415 VOID
416 NTAPI
417 HalRequestIpi(
418 ULONG Unknown)
419 {
420 UNIMPLEMENTED;
421 }
422
423
424 VOID
425 FASTCALL
426 HalRequestSoftwareInterrupt(
427 KIRQL Request)
428 {
429 UNIMPLEMENTED;
430 }
431
432
433 VOID
434 NTAPI
435 HalReturnToFirmware(
436 FIRMWARE_REENTRY Action)
437 {
438 UNIMPLEMENTED;
439 }
440
441
442 ULONG
443 NTAPI
444 HalSetBusData(
445 BUS_DATA_TYPE BusDataType,
446 ULONG BusNumber,
447 ULONG SlotNumber,
448 PVOID Buffer,
449 ULONG Length)
450 {
451 UNIMPLEMENTED;
452
453 return 0;
454 }
455
456
457 ULONG
458 NTAPI
459 HalSetBusDataByOffset(
460 BUS_DATA_TYPE BusDataType,
461 ULONG BusNumber,
462 ULONG SlotNumber,
463 PVOID Buffer,
464 ULONG Offset,
465 ULONG Length)
466 {
467 UNIMPLEMENTED;
468
469 return 0;
470 }
471
472
473 VOID
474 NTAPI
475 HalSetDisplayParameters(
476 ULONG CursorPosX,
477 ULONG CursorPosY)
478 {
479 UNIMPLEMENTED;
480 }
481
482
483 BOOLEAN
484 NTAPI
485 HalSetEnvironmentVariable(
486 PCH Name,
487 PCH Value)
488 {
489 UNIMPLEMENTED;
490
491 return TRUE;
492 }
493
494
495 VOID
496 NTAPI
497 HalSetRealTimeClock(
498 PTIME_FIELDS Time)
499 {
500 UNIMPLEMENTED;
501 }
502
503
504 BOOLEAN
505 NTAPI
506 HalStartNextProcessor(
507 ULONG Unknown1,
508 ULONG Unknown2)
509 {
510 UNIMPLEMENTED;
511
512 return TRUE;
513 }
514
515
516 ULONG
517 FASTCALL
518 HalSystemVectorDispatchEntry(
519 ULONG Unknown1,
520 ULONG Unknown2,
521 ULONG Unknown3)
522 {
523 UNIMPLEMENTED;
524
525 return 0;
526 }
527
528
529 BOOLEAN
530 NTAPI
531 HalTranslateBusAddress(
532 INTERFACE_TYPE InterfaceType,
533 ULONG BusNumber,
534 PHYSICAL_ADDRESS BusAddress,
535 PULONG AddressSpace,
536 PPHYSICAL_ADDRESS TranslatedAddress)
537 {
538 UNIMPLEMENTED;
539
540 return TRUE;
541 }
542
543
544 VOID
545 NTAPI
546 IoAssignDriveLetters(
547 PLOADER_PARAMETER_BLOCK LoaderBlock,
548 PSTRING NtDeviceName,
549 PUCHAR NtSystemPath,
550 PSTRING NtSystemPathString)
551 {
552 UNIMPLEMENTED;
553 }
554
555
556 BOOLEAN
557 NTAPI
558 IoFlushAdapterBuffers(
559 PADAPTER_OBJECT AdapterObject,
560 PMDL Mdl,
561 PVOID MapRegisterBase,
562 PVOID CurrentVa,
563 ULONG Length,
564 BOOLEAN WriteToDevice)
565 {
566 UNIMPLEMENTED;
567
568 return TRUE;
569 }
570
571
572 VOID
573 NTAPI
574 IoFreeAdapterChannel(
575 PADAPTER_OBJECT AdapterObject)
576 {
577 UNIMPLEMENTED;
578 }
579
580
581 VOID
582 NTAPI
583 IoFreeMapRegisters(
584 PADAPTER_OBJECT AdapterObject,
585 PVOID MapRegisterBase,
586 ULONG NumberOfMapRegisters)
587 {
588 UNIMPLEMENTED;
589 }
590
591
592 PHYSICAL_ADDRESS
593 NTAPI
594 IoMapTransfer(
595 PADAPTER_OBJECT AdapterObject,
596 PMDL Mdl,
597 PVOID MapRegisterBase,
598 PVOID CurrentVa,
599 PULONG Length,
600 BOOLEAN WriteToDevice)
601 {
602 PHYSICAL_ADDRESS Address;
603
604 UNIMPLEMENTED;
605
606 Address.QuadPart = 0;
607
608 return Address;
609 }
610
611
612 BOOLEAN
613 NTAPI
614 KdPortGetByte(
615 PUCHAR ByteRecieved)
616 {
617 UNIMPLEMENTED;
618
619 return TRUE;
620 }
621
622
623 BOOLEAN
624 NTAPI
625 KdPortGetByteEx(
626 PKD_PORT_INFORMATION PortInformation,
627 PUCHAR ByteRecieved)
628 {
629 UNIMPLEMENTED;
630
631 return TRUE;
632 }
633
634
635 BOOLEAN
636 NTAPI
637 KdPortInitialize(
638 PKD_PORT_INFORMATION PortInformation,
639 ULONG Unknown1,
640 ULONG Unknown2)
641 {
642 UNIMPLEMENTED;
643
644 return TRUE;
645 }
646
647
648 BOOLEAN
649 NTAPI
650 KdPortInitializeEx(
651 PKD_PORT_INFORMATION PortInformation,
652 ULONG Unknown1,
653 ULONG Unknown2)
654 {
655 UNIMPLEMENTED;
656
657 return TRUE;
658 }
659
660
661 BOOLEAN
662 NTAPI
663 KdPortPollByte(
664 PUCHAR ByteRecieved)
665 {
666 UNIMPLEMENTED;
667
668 return TRUE;
669 }
670
671
672 BOOLEAN
673 NTAPI
674 KdPortPollByteEx(
675 PKD_PORT_INFORMATION PortInformation,
676 PUCHAR ByteRecieved)
677 {
678 UNIMPLEMENTED;
679
680 return TRUE;
681 }
682
683
684 VOID
685 NTAPI
686 KdPortPutByte(
687 UCHAR ByteToSend)
688 {
689 UNIMPLEMENTED;
690 }
691
692
693 VOID
694 NTAPI
695 KdPortPutByteEx(
696 PKD_PORT_INFORMATION PortInformation,
697 UCHAR ByteToSend)
698 {
699 UNIMPLEMENTED;
700 }
701
702
703 VOID
704 NTAPI
705 KdPortRestore(VOID)
706 {
707 UNIMPLEMENTED;
708 }
709
710
711 VOID
712 NTAPI
713 KdPortSave(VOID)
714 {
715 UNIMPLEMENTED;
716 }
717
718
719 BOOLEAN
720 NTAPI
721 KdPortDisableInterrupts()
722 {
723 UNIMPLEMENTED;
724
725 return FALSE;
726 }
727
728
729 BOOLEAN
730 NTAPI
731 KdPortEnableInterrupts()
732 {
733 UNIMPLEMENTED;
734
735 return FALSE;
736 }
737
738 #undef KeAcquireSpinLock
739 VOID
740 NTAPI
741 KeAcquireSpinLock(
742 PKSPIN_LOCK SpinLock,
743 PKIRQL OldIrql)
744 {
745 UNIMPLEMENTED;
746 }
747
748
749 KIRQL
750 FASTCALL
751 KeAcquireSpinLockRaiseToSynch(
752 PKSPIN_LOCK SpinLock)
753 {
754 UNIMPLEMENTED;
755
756 return 0;
757 }
758
759
760 VOID
761 FASTCALL
762 KeAcquireInStackQueuedSpinLock(
763 IN PKSPIN_LOCK SpinLock,
764 IN PKLOCK_QUEUE_HANDLE LockHandle
765 )
766 {
767 UNIMPLEMENTED;
768 }
769
770
771 VOID
772 FASTCALL
773 KeReleaseInStackQueuedSpinLock(
774 IN PKLOCK_QUEUE_HANDLE LockHandle
775 )
776 {
777 UNIMPLEMENTED;
778 }
779
780 VOID
781 NTAPI
782 KeFlushWriteBuffer(VOID)
783 {
784 UNIMPLEMENTED;
785 }
786
787 #undef KeGetCurrentIrql
788 KIRQL
789 NTAPI
790 KeGetCurrentIrql(VOID)
791 {
792 UNIMPLEMENTED;
793
794 return (KIRQL)0;
795 }
796
797 #undef KeLowerIrql
798 VOID
799 NTAPI
800 KeLowerIrql(
801 KIRQL NewIrql)
802 {
803 UNIMPLEMENTED;
804 }
805
806
807 LARGE_INTEGER
808 NTAPI
809 KeQueryPerformanceCounter(
810 PLARGE_INTEGER PerformanceFreq)
811 {
812 LARGE_INTEGER Value;
813
814 UNIMPLEMENTED;
815
816 Value.QuadPart = 0;
817
818 return Value;
819 }
820
821 #undef KeRaiseIrql
822 VOID
823 NTAPI
824 KeRaiseIrql(
825 KIRQL NewIrql,
826 PKIRQL OldIrql)
827 {
828 UNIMPLEMENTED;
829 }
830
831
832 KIRQL
833 NTAPI
834 KeRaiseIrqlToDpcLevel(VOID)
835 {
836 UNIMPLEMENTED;
837
838 return (KIRQL)0;
839 }
840
841
842 KIRQL
843 NTAPI
844 KeRaiseIrqlToSynchLevel(VOID)
845 {
846 UNIMPLEMENTED;
847
848 return (KIRQL)0;
849 }
850
851 #undef KeReleaseSpinLock
852 VOID
853 NTAPI
854 KeReleaseSpinLock(
855 PKSPIN_LOCK SpinLock,
856 KIRQL NewIrql)
857 {
858 UNIMPLEMENTED;
859 }
860
861
862 VOID
863 NTAPI
864 KeStallExecutionProcessor(
865 ULONG Microseconds)
866 {
867 UNIMPLEMENTED;
868 }
869
870
871 KIRQL
872 FASTCALL
873 KfAcquireSpinLock(
874 PKSPIN_LOCK SpinLock)
875 {
876 UNIMPLEMENTED;
877
878 return (KIRQL)0;
879 }
880
881
882 VOID
883 FASTCALL
884 KfLowerIrql(
885 KIRQL NewIrql)
886 {
887 UNIMPLEMENTED;
888 }
889
890
891 KIRQL
892 FASTCALL
893 KfRaiseIrql(
894 KIRQL NewIrql)
895 {
896 UNIMPLEMENTED;
897
898 return (KIRQL)0;
899 }
900
901
902 VOID
903 FASTCALL
904 KfReleaseSpinLock(
905 PKSPIN_LOCK SpinLock,
906 KIRQL NewIrql)
907 {
908 UNIMPLEMENTED;
909 }
910
911
912 VOID
913 NTAPI
914 READ_PORT_BUFFER_UCHAR(
915 PUCHAR Port,
916 PUCHAR Buffer,
917 ULONG Count)
918 {
919 UNIMPLEMENTED;
920 }
921
922
923 VOID
924 NTAPI
925 READ_PORT_BUFFER_ULONG(
926 PULONG Port,
927 PULONG Buffer,
928 ULONG Count)
929 {
930 UNIMPLEMENTED;
931 }
932
933
934 VOID
935 NTAPI
936 READ_PORT_BUFFER_USHORT(
937 PUSHORT Port,
938 PUSHORT Buffer,
939 ULONG Count)
940 {
941 UNIMPLEMENTED;
942 }
943
944
945 UCHAR
946 NTAPI
947 READ_PORT_UCHAR(
948 PUCHAR Port)
949 {
950 UNIMPLEMENTED;
951
952 return 0;
953 }
954
955
956 ULONG
957 NTAPI
958 READ_PORT_ULONG(
959 PULONG Port)
960 {
961 UNIMPLEMENTED;
962
963 return 0;
964 }
965
966
967 USHORT
968 NTAPI
969 READ_PORT_USHORT(
970 PUSHORT Port)
971 {
972 UNIMPLEMENTED;
973
974 return 0;
975 }
976
977
978 VOID
979 NTAPI
980 WRITE_PORT_BUFFER_UCHAR(
981 PUCHAR Port,
982 PUCHAR Buffer,
983 ULONG Count)
984 {
985 UNIMPLEMENTED;
986 }
987
988
989 VOID
990 NTAPI
991 WRITE_PORT_BUFFER_USHORT(
992 PUSHORT Port,
993 PUSHORT Buffer,
994 ULONG Count)
995 {
996 UNIMPLEMENTED;
997 }
998
999
1000 VOID
1001 NTAPI
1002 WRITE_PORT_BUFFER_ULONG(
1003 PULONG Port,
1004 PULONG Buffer,
1005 ULONG Count)
1006 {
1007 UNIMPLEMENTED;
1008 }
1009
1010
1011 VOID
1012 NTAPI
1013 WRITE_PORT_UCHAR(
1014 PUCHAR Port,
1015 UCHAR Value)
1016 {
1017 UNIMPLEMENTED;
1018 }
1019
1020 VOID
1021 NTAPI
1022 WRITE_PORT_ULONG(
1023 PULONG Port,
1024 ULONG Value)
1025 {
1026 UNIMPLEMENTED;
1027 }
1028
1029 VOID
1030 NTAPI
1031 WRITE_PORT_USHORT(
1032 PUSHORT Port,
1033 USHORT Value)
1034 {
1035 UNIMPLEMENTED;
1036 }
1037
1038 /* EOF */