d97e342c88abdf1ccc81f9ca84aac81986e815f0
[reactos.git] / hal / halx86 / 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 <ddk/ntddk.h>
15 #include <bus.h>
16
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   *Irql = PROFILE_LEVEL - BusInterruptVector;
71   *Affinity = 0xFFFFFFFF;
72   return BusInterruptVector;
73 }
74 /* EOF */