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