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