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