Save the old irql in ExTryToAcquireFastMutex.
[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 <hal.h>
15 #define NDEBUG
16 #include <debug.h>
17
18
19 /* FUNCTIONS ****************************************************************/
20
21 ULONG STDCALL
22 HalpGetSystemInterruptVector(PVOID BusHandler,
23 ULONG BusNumber,
24 ULONG BusInterruptLevel,
25 ULONG BusInterruptVector,
26 PKIRQL Irql,
27 PKAFFINITY Affinity)
28 {
29 ULONG Vector = IRQ2VECTOR(BusInterruptVector);
30 *Irql = VECTOR2IRQL(Vector);
31 *Affinity = 0xFFFFFFFF;
32 return Vector;
33 }
34
35
36 BOOLEAN STDCALL
37 HalpTranslateSystemBusAddress(PBUS_HANDLER BusHandler,
38 ULONG BusNumber,
39 PHYSICAL_ADDRESS BusAddress,
40 PULONG AddressSpace,
41 PPHYSICAL_ADDRESS TranslatedAddress)
42 {
43 ULONG BaseAddress = 0;
44
45 if (*AddressSpace == 0)
46 {
47 /* memory space */
48
49 }
50 else if (*AddressSpace == 1)
51 {
52 /* io space */
53
54 }
55 else
56 {
57 /* other */
58 return FALSE;
59 }
60
61 TranslatedAddress->QuadPart = BusAddress.QuadPart + BaseAddress;
62
63 return TRUE;
64 }
65
66 /* EOF */