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