91bfdf826cf536f8e05e779541e0a2118a0128f5
[reactos.git] / reactos / hal / halx86 / generic / isa.c
1 /* $Id$
2 *
3 * COPYRIGHT: See COPYING in the top level directory
4 * PROJECT: ReactOS kernel
5 * FILE: ntoskrnl/hal/isa.c
6 * PURPOSE: Interfaces to the ISA bus
7 * PROGRAMMER: David Welch (welch@mcmail.com)
8 * UPDATE HISTORY:
9 * 05/06/98: Created
10 */
11
12 /* INCLUDES ***************************************************************/
13
14 #include <hal.h>
15 #define NDEBUG
16 #include <debug.h>
17
18 /* FUNCTIONS *****************************************************************/
19
20 BOOL HalIsaProbe(VOID)
21 /*
22 * FUNCTION: Probes for an ISA bus
23 * RETURNS: True if detected
24 * NOTE: Since ISA is the default we are called last and always return
25 * true
26 */
27 {
28 DbgPrint("Assuming ISA bus\n");
29
30 /*
31 * Probe for plug and play support
32 */
33 return(TRUE);
34 }
35
36
37 BOOLEAN STDCALL
38 HalpTranslateIsaBusAddress(PBUS_HANDLER BusHandler,
39 ULONG BusNumber,
40 PHYSICAL_ADDRESS BusAddress,
41 PULONG AddressSpace,
42 PPHYSICAL_ADDRESS TranslatedAddress)
43 {
44 BOOLEAN Result;
45
46 Result = HalTranslateBusAddress(PCIBus,
47 BusNumber,
48 BusAddress,
49 AddressSpace,
50 TranslatedAddress);
51 if (Result != FALSE)
52 return Result;
53
54 Result = HalTranslateBusAddress(Internal,
55 BusNumber,
56 BusAddress,
57 AddressSpace,
58 TranslatedAddress);
59 return Result;
60 }
61
62 ULONG STDCALL
63 HalpGetIsaInterruptVector(PVOID BusHandler,
64 ULONG BusNumber,
65 ULONG BusInterruptLevel,
66 ULONG BusInterruptVector,
67 PKIRQL Irql,
68 PKAFFINITY Affinity)
69 {
70 ULONG Vector = IRQ2VECTOR(BusInterruptVector);
71 *Irql = VECTOR2IRQL(Vector);
72 *Affinity = 0xFFFFFFFF;
73 return Vector;
74 }
75 /* EOF */