migrate substitution keywords to SVN
[reactos.git] / reactos / hal / halx86 / generic / sysbus.c
1 /* $Id$
2 *
3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
5 * FILE: ntoskrnl/hal/sysbus.c
6 * PURPOSE: System bus handler functions
7 * PROGRAMMER: Eric Kohl (ekohl@rz-online.de)
8 * UPDATE HISTORY:
9 * 09/04/2000 Created
10 */
11
12 /* INCLUDES *****************************************************************/
13
14 #include <ddk/ntddk.h>
15 #include <bus.h>
16 #include <halirq.h>
17
18 #define NDEBUG
19 #include <internal/debug.h>
20
21
22 /* FUNCTIONS ****************************************************************/
23
24 ULONG STDCALL
25 HalpGetSystemInterruptVector(PVOID BusHandler,
26 ULONG BusNumber,
27 ULONG BusInterruptLevel,
28 ULONG BusInterruptVector,
29 PKIRQL Irql,
30 PKAFFINITY Affinity)
31 {
32 ULONG Vector = IRQ2VECTOR(BusInterruptVector);
33 *Irql = VECTOR2IRQL(Vector);
34 *Affinity = 0xFFFFFFFF;
35 return Vector;
36 }
37
38
39 BOOLEAN STDCALL
40 HalpTranslateSystemBusAddress(PBUS_HANDLER BusHandler,
41 ULONG BusNumber,
42 PHYSICAL_ADDRESS BusAddress,
43 PULONG AddressSpace,
44 PPHYSICAL_ADDRESS TranslatedAddress)
45 {
46 ULONG BaseAddress = 0;
47
48 if (*AddressSpace == 0)
49 {
50 /* memory space */
51
52 }
53 else if (*AddressSpace == 1)
54 {
55 /* io space */
56
57 }
58 else
59 {
60 /* other */
61 return FALSE;
62 }
63
64 TranslatedAddress->QuadPart = BusAddress.QuadPart + BaseAddress;
65
66 return TRUE;
67 }
68
69 /* EOF */