- Get MP hal and Generic HAL to build too.
[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 <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 PVOID
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(ULONG ProcessorNumber,
346 PLOADER_PARAMETER_BLOCK LoaderBlock)
347 {
348 UNIMPLEMENTED;
349 }
350
351
352 BOOLEAN
353 NTAPI
354 HalMakeBeep(
355 ULONG Frequency)
356 {
357 UNIMPLEMENTED;
358
359 return TRUE;
360 }
361
362
363 VOID
364 NTAPI
365 HalProcessorIdle(VOID)
366 {
367 UNIMPLEMENTED;
368 }
369
370
371 BOOLEAN
372 NTAPI
373 HalQueryDisplayOwnership(VOID)
374 {
375 UNIMPLEMENTED;
376
377 return FALSE;
378 }
379
380
381 VOID
382 NTAPI
383 HalQueryDisplayParameters(
384 OUT PULONG DispSizeX,
385 OUT PULONG DispSizeY,
386 OUT PULONG CursorPosX,
387 OUT PULONG CursorPosY)
388 {
389 UNIMPLEMENTED;
390 }
391
392
393 VOID
394 NTAPI
395 HalQueryRealTimeClock(
396 PTIME_FIELDS Time)
397 {
398 UNIMPLEMENTED;
399 }
400
401
402 ULONG
403 NTAPI
404 HalReadDmaCounter(
405 PADAPTER_OBJECT AdapterObject)
406 {
407 UNIMPLEMENTED;
408
409 return 0;
410 }
411
412
413 VOID
414 NTAPI
415 HalReleaseDisplayOwnership(VOID)
416 {
417 UNIMPLEMENTED;
418 }
419
420 VOID
421 NTAPI
422 HalReportResourceUsage(VOID)
423 {
424 UNIMPLEMENTED;
425 }
426
427
428 VOID
429 NTAPI
430 HalRequestIpi(
431 ULONG Unknown)
432 {
433 UNIMPLEMENTED;
434 }
435
436
437 VOID
438 FASTCALL
439 HalRequestSoftwareInterrupt(
440 KIRQL Request)
441 {
442 UNIMPLEMENTED;
443 }
444
445
446 VOID
447 NTAPI
448 HalReturnToFirmware(
449 FIRMWARE_REENTRY Action)
450 {
451 UNIMPLEMENTED;
452 }
453
454
455 ULONG
456 NTAPI
457 HalSetBusData(
458 BUS_DATA_TYPE BusDataType,
459 ULONG BusNumber,
460 ULONG SlotNumber,
461 PVOID Buffer,
462 ULONG Length)
463 {
464 UNIMPLEMENTED;
465
466 return 0;
467 }
468
469
470 ULONG
471 NTAPI
472 HalSetBusDataByOffset(
473 BUS_DATA_TYPE BusDataType,
474 ULONG BusNumber,
475 ULONG SlotNumber,
476 PVOID Buffer,
477 ULONG Offset,
478 ULONG Length)
479 {
480 UNIMPLEMENTED;
481
482 return 0;
483 }
484
485
486 VOID
487 NTAPI
488 HalSetDisplayParameters(
489 ULONG CursorPosX,
490 ULONG CursorPosY)
491 {
492 UNIMPLEMENTED;
493 }
494
495
496 BOOLEAN
497 NTAPI
498 HalSetEnvironmentVariable(
499 PCH Name,
500 PCH Value)
501 {
502 UNIMPLEMENTED;
503
504 return TRUE;
505 }
506
507
508 VOID
509 NTAPI
510 HalSetRealTimeClock(
511 PTIME_FIELDS Time)
512 {
513 UNIMPLEMENTED;
514 }
515
516
517 BOOLEAN
518 NTAPI
519 HalStartNextProcessor(
520 ULONG Unknown1,
521 ULONG Unknown2)
522 {
523 UNIMPLEMENTED;
524
525 return TRUE;
526 }
527
528
529 ULONG
530 FASTCALL
531 HalSystemVectorDispatchEntry(
532 ULONG Unknown1,
533 ULONG Unknown2,
534 ULONG Unknown3)
535 {
536 UNIMPLEMENTED;
537
538 return 0;
539 }
540
541
542 BOOLEAN
543 NTAPI
544 HalTranslateBusAddress(
545 INTERFACE_TYPE InterfaceType,
546 ULONG BusNumber,
547 PHYSICAL_ADDRESS BusAddress,
548 PULONG AddressSpace,
549 PPHYSICAL_ADDRESS TranslatedAddress)
550 {
551 UNIMPLEMENTED;
552
553 return TRUE;
554 }
555
556
557 VOID
558 NTAPI
559 IoAssignDriveLetters(
560 PLOADER_PARAMETER_BLOCK LoaderBlock,
561 PSTRING NtDeviceName,
562 PUCHAR NtSystemPath,
563 PSTRING NtSystemPathString)
564 {
565 UNIMPLEMENTED;
566 }
567
568
569 BOOLEAN
570 NTAPI
571 IoFlushAdapterBuffers(
572 PADAPTER_OBJECT AdapterObject,
573 PMDL Mdl,
574 PVOID MapRegisterBase,
575 PVOID CurrentVa,
576 ULONG Length,
577 BOOLEAN WriteToDevice)
578 {
579 UNIMPLEMENTED;
580
581 return TRUE;
582 }
583
584
585 VOID
586 NTAPI
587 IoFreeAdapterChannel(
588 PADAPTER_OBJECT AdapterObject)
589 {
590 UNIMPLEMENTED;
591 }
592
593
594 VOID
595 NTAPI
596 IoFreeMapRegisters(
597 PADAPTER_OBJECT AdapterObject,
598 PVOID MapRegisterBase,
599 ULONG NumberOfMapRegisters)
600 {
601 UNIMPLEMENTED;
602 }
603
604
605 PHYSICAL_ADDRESS
606 NTAPI
607 IoMapTransfer(
608 PADAPTER_OBJECT AdapterObject,
609 PMDL Mdl,
610 PVOID MapRegisterBase,
611 PVOID CurrentVa,
612 PULONG Length,
613 BOOLEAN WriteToDevice)
614 {
615 PHYSICAL_ADDRESS Address;
616
617 UNIMPLEMENTED;
618
619 Address.QuadPart = 0;
620
621 return Address;
622 }
623
624
625 BOOLEAN
626 NTAPI
627 KdPortGetByte(
628 PUCHAR ByteRecieved)
629 {
630 UNIMPLEMENTED;
631
632 return TRUE;
633 }
634
635
636 BOOLEAN
637 NTAPI
638 KdPortGetByteEx(
639 PKD_PORT_INFORMATION PortInformation,
640 PUCHAR ByteRecieved)
641 {
642 UNIMPLEMENTED;
643
644 return TRUE;
645 }
646
647
648 BOOLEAN
649 NTAPI
650 KdPortInitialize(
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 KdPortInitializeEx(
664 PKD_PORT_INFORMATION PortInformation,
665 ULONG Unknown1,
666 ULONG Unknown2)
667 {
668 UNIMPLEMENTED;
669
670 return TRUE;
671 }
672
673
674 BOOLEAN
675 NTAPI
676 KdPortPollByte(
677 PUCHAR ByteRecieved)
678 {
679 UNIMPLEMENTED;
680
681 return TRUE;
682 }
683
684
685 BOOLEAN
686 NTAPI
687 KdPortPollByteEx(
688 PKD_PORT_INFORMATION PortInformation,
689 PUCHAR ByteRecieved)
690 {
691 UNIMPLEMENTED;
692
693 return TRUE;
694 }
695
696
697 VOID
698 NTAPI
699 KdPortPutByte(
700 UCHAR ByteToSend)
701 {
702 UNIMPLEMENTED;
703 }
704
705
706 VOID
707 NTAPI
708 KdPortPutByteEx(
709 PKD_PORT_INFORMATION PortInformation,
710 UCHAR ByteToSend)
711 {
712 UNIMPLEMENTED;
713 }
714
715
716 VOID
717 NTAPI
718 KdPortRestore(VOID)
719 {
720 UNIMPLEMENTED;
721 }
722
723
724 VOID
725 NTAPI
726 KdPortSave(VOID)
727 {
728 UNIMPLEMENTED;
729 }
730
731
732 BOOLEAN
733 NTAPI
734 KdPortDisableInterrupts()
735 {
736 UNIMPLEMENTED;
737
738 return FALSE;
739 }
740
741
742 BOOLEAN
743 NTAPI
744 KdPortEnableInterrupts()
745 {
746 UNIMPLEMENTED;
747
748 return FALSE;
749 }
750
751 #undef KeAcquireSpinLock
752 VOID
753 NTAPI
754 KeAcquireSpinLock(
755 PKSPIN_LOCK SpinLock,
756 PKIRQL OldIrql)
757 {
758 UNIMPLEMENTED;
759 }
760
761
762 KIRQL
763 FASTCALL
764 KeAcquireSpinLockRaiseToSynch(
765 PKSPIN_LOCK SpinLock)
766 {
767 UNIMPLEMENTED;
768
769 return 0;
770 }
771
772
773 VOID
774 FASTCALL
775 KeAcquireInStackQueuedSpinLock(
776 IN PKSPIN_LOCK SpinLock,
777 IN PKLOCK_QUEUE_HANDLE LockHandle
778 )
779 {
780 UNIMPLEMENTED;
781 }
782
783
784 VOID
785 FASTCALL
786 KeReleaseInStackQueuedSpinLock(
787 IN PKLOCK_QUEUE_HANDLE LockHandle
788 )
789 {
790 UNIMPLEMENTED;
791 }
792
793 VOID
794 NTAPI
795 KeFlushWriteBuffer(VOID)
796 {
797 UNIMPLEMENTED;
798 }
799
800 #undef KeGetCurrentIrql
801 KIRQL
802 NTAPI
803 KeGetCurrentIrql(VOID)
804 {
805 UNIMPLEMENTED;
806
807 return (KIRQL)0;
808 }
809
810 #undef KeLowerIrql
811 VOID
812 NTAPI
813 KeLowerIrql(
814 KIRQL NewIrql)
815 {
816 UNIMPLEMENTED;
817 }
818
819
820 LARGE_INTEGER
821 NTAPI
822 KeQueryPerformanceCounter(
823 PLARGE_INTEGER PerformanceFreq)
824 {
825 LARGE_INTEGER Value;
826
827 UNIMPLEMENTED;
828
829 Value.QuadPart = 0;
830
831 return Value;
832 }
833
834 #undef KeRaiseIrql
835 VOID
836 NTAPI
837 KeRaiseIrql(
838 KIRQL NewIrql,
839 PKIRQL OldIrql)
840 {
841 UNIMPLEMENTED;
842 }
843
844
845 KIRQL
846 NTAPI
847 KeRaiseIrqlToDpcLevel(VOID)
848 {
849 UNIMPLEMENTED;
850
851 return (KIRQL)0;
852 }
853
854
855 KIRQL
856 NTAPI
857 KeRaiseIrqlToSynchLevel(VOID)
858 {
859 UNIMPLEMENTED;
860
861 return (KIRQL)0;
862 }
863
864 #undef KeReleaseSpinLock
865 VOID
866 NTAPI
867 KeReleaseSpinLock(
868 PKSPIN_LOCK SpinLock,
869 KIRQL NewIrql)
870 {
871 UNIMPLEMENTED;
872 }
873
874
875 VOID
876 NTAPI
877 KeStallExecutionProcessor(
878 ULONG Microseconds)
879 {
880 UNIMPLEMENTED;
881 }
882
883
884 KIRQL
885 FASTCALL
886 KfAcquireSpinLock(
887 PKSPIN_LOCK SpinLock)
888 {
889 UNIMPLEMENTED;
890
891 return (KIRQL)0;
892 }
893
894
895 VOID
896 FASTCALL
897 KfLowerIrql(
898 KIRQL NewIrql)
899 {
900 UNIMPLEMENTED;
901 }
902
903
904 KIRQL
905 FASTCALL
906 KfRaiseIrql(
907 KIRQL NewIrql)
908 {
909 UNIMPLEMENTED;
910
911 return (KIRQL)0;
912 }
913
914
915 VOID
916 FASTCALL
917 KfReleaseSpinLock(
918 PKSPIN_LOCK SpinLock,
919 KIRQL NewIrql)
920 {
921 UNIMPLEMENTED;
922 }
923
924
925 VOID
926 NTAPI
927 READ_PORT_BUFFER_UCHAR(
928 PUCHAR Port,
929 PUCHAR Buffer,
930 ULONG Count)
931 {
932 UNIMPLEMENTED;
933 }
934
935
936 VOID
937 NTAPI
938 READ_PORT_BUFFER_ULONG(
939 PULONG Port,
940 PULONG Buffer,
941 ULONG Count)
942 {
943 UNIMPLEMENTED;
944 }
945
946
947 VOID
948 NTAPI
949 READ_PORT_BUFFER_USHORT(
950 PUSHORT Port,
951 PUSHORT Buffer,
952 ULONG Count)
953 {
954 UNIMPLEMENTED;
955 }
956
957
958 UCHAR
959 NTAPI
960 READ_PORT_UCHAR(
961 PUCHAR Port)
962 {
963 UNIMPLEMENTED;
964
965 return 0;
966 }
967
968
969 ULONG
970 NTAPI
971 READ_PORT_ULONG(
972 PULONG Port)
973 {
974 UNIMPLEMENTED;
975
976 return 0;
977 }
978
979
980 USHORT
981 NTAPI
982 READ_PORT_USHORT(
983 PUSHORT Port)
984 {
985 UNIMPLEMENTED;
986
987 return 0;
988 }
989
990
991 VOID
992 NTAPI
993 WRITE_PORT_BUFFER_UCHAR(
994 PUCHAR Port,
995 PUCHAR Buffer,
996 ULONG Count)
997 {
998 UNIMPLEMENTED;
999 }
1000
1001
1002 VOID
1003 NTAPI
1004 WRITE_PORT_BUFFER_USHORT(
1005 PUSHORT Port,
1006 PUSHORT Buffer,
1007 ULONG Count)
1008 {
1009 UNIMPLEMENTED;
1010 }
1011
1012
1013 VOID
1014 NTAPI
1015 WRITE_PORT_BUFFER_ULONG(
1016 PULONG Port,
1017 PULONG Buffer,
1018 ULONG Count)
1019 {
1020 UNIMPLEMENTED;
1021 }
1022
1023
1024 VOID
1025 NTAPI
1026 WRITE_PORT_UCHAR(
1027 PUCHAR Port,
1028 UCHAR Value)
1029 {
1030 UNIMPLEMENTED;
1031 }
1032
1033 VOID
1034 NTAPI
1035 WRITE_PORT_ULONG(
1036 PULONG Port,
1037 ULONG Value)
1038 {
1039 UNIMPLEMENTED;
1040 }
1041
1042 VOID
1043 NTAPI
1044 WRITE_PORT_USHORT(
1045 PUSHORT Port,
1046 USHORT Value)
1047 {
1048 UNIMPLEMENTED;
1049 }
1050
1051 /* EOF */