441cd769ab21eabfd5d55010bdce33b3a98f2502
[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 #define NDEBUG
15 #include <hal.h>
16
17 /* FUNCTIONS *****************************************************************/
18
19 BOOL HalIsaProbe(VOID)
20 /*
21 * FUNCTION: Probes for an ISA bus
22 * RETURNS: True if detected
23 * NOTE: Since ISA is the default we are called last and always return
24 * true
25 */
26 {
27 DbgPrint("Assuming ISA bus\n");
28
29 /*
30 * Probe for plug and play support
31 */
32 return(TRUE);
33 }
34
35
36 BOOLEAN STDCALL
37 HalpTranslateIsaBusAddress(PBUS_HANDLER BusHandler,
38 ULONG BusNumber,
39 PHYSICAL_ADDRESS BusAddress,
40 PULONG AddressSpace,
41 PPHYSICAL_ADDRESS TranslatedAddress)
42 {
43 BOOLEAN Result;
44
45 Result = HalTranslateBusAddress(PCIBus,
46 BusNumber,
47 BusAddress,
48 AddressSpace,
49 TranslatedAddress);
50 if (Result != FALSE)
51 return Result;
52
53 Result = HalTranslateBusAddress(Internal,
54 BusNumber,
55 BusAddress,
56 AddressSpace,
57 TranslatedAddress);
58 return Result;
59 }
60
61 ULONG STDCALL
62 HalpGetIsaInterruptVector(PVOID BusHandler,
63 ULONG BusNumber,
64 ULONG BusInterruptLevel,
65 ULONG BusInterruptVector,
66 PKIRQL Irql,
67 PKAFFINITY Affinity)
68 {
69 ULONG Vector = IRQ2VECTOR(BusInterruptVector);
70 *Irql = VECTOR2IRQL(Vector);
71 *Affinity = 0xFFFFFFFF;
72 return Vector;
73 }
74 /* EOF */