branch update for HEAD-2003021201
[reactos.git] / hal / halx86 / 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
17
18 /* FUNCTIONS ****************************************************************/
19
20 ULONG STDCALL
21 HalpGetSystemInterruptVector(PVOID BusHandler,
22                              ULONG BusNumber,
23                              ULONG BusInterruptLevel,
24                              ULONG BusInterruptVector,
25                              PKIRQL Irql,
26                              PKAFFINITY Affinity)
27 {
28    *Irql = PROFILE_LEVEL - BusInterruptVector;
29    *Affinity = 0xFFFFFFFF;
30    return BusInterruptVector;
31 }
32
33
34 BOOLEAN STDCALL
35 HalpTranslateSystemBusAddress(PBUS_HANDLER BusHandler,
36                               ULONG BusNumber,
37                               PHYSICAL_ADDRESS BusAddress,
38                               PULONG AddressSpace,
39                               PPHYSICAL_ADDRESS TranslatedAddress)
40 {
41    ULONG BaseAddress = 0;
42
43    if (*AddressSpace == 0)
44      {
45         /* memory space */
46
47      }
48    else if (*AddressSpace == 1)
49      {
50         /* io space */
51
52      }
53    else
54      {
55         /* other */
56         return FALSE;
57      }
58
59    TranslatedAddress->QuadPart = BusAddress.QuadPart + BaseAddress;
60
61    return TRUE;
62 }
63
64 /* EOF */