2 * hal.dll implementation
4 * Copyright (C) 2007 Chris Wulff
6 * This library is free software; you can redistribute it and/or
7 * modify it under the terms of the GNU Lesser General Public
8 * License as published by the Free Software Foundation; either
9 * version 2.1 of the License, or (at your option) any later version.
11 * This library is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 * Lesser General Public License for more details.
16 * You should have received a copy of the GNU Lesser General Public
17 * License along with this library; if not, write to the Free Software
18 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
22 #include "wine/port.h"
27 #define WIN32_NO_STATUS
31 #include "ddk/ntddk.h"
32 #include "wine/debug.h"
34 WINE_DEFAULT_DEBUG_CHANNEL(ntoskrnl
);
37 #define DEFINE_FASTCALL1_ENTRYPOINT( name ) \
38 __ASM_STDCALL_FUNC( name, 4, \
42 "jmp " __ASM_NAME("__regs_") #name __ASM_STDCALL(4))
43 #define DEFINE_FASTCALL2_ENTRYPOINT( name ) \
44 __ASM_STDCALL_FUNC( name, 8, \
49 "jmp " __ASM_NAME("__regs_") #name __ASM_STDCALL(8))
53 #ifdef DEFINE_FASTCALL1_ENTRYPOINT
54 DEFINE_FASTCALL1_ENTRYPOINT( ExAcquireFastMutex
)
55 VOID WINAPI DECLSPEC_HIDDEN
__regs_ExAcquireFastMutex(PFAST_MUTEX FastMutex
)
57 VOID WINAPI
ExAcquireFastMutex(PFAST_MUTEX FastMutex
)
60 FIXME("%p: stub\n", FastMutex
);
63 #ifdef DEFINE_FASTCALL1_ENTRYPOINT
64 DEFINE_FASTCALL1_ENTRYPOINT( ExReleaseFastMutex
)
65 VOID WINAPI DECLSPEC_HIDDEN
__regs_ExReleaseFastMutex(PFAST_MUTEX FastMutex
)
67 VOID WINAPI
ExReleaseFastMutex(PFAST_MUTEX FastMutex
)
70 FIXME("%p: stub\n", FastMutex
);
73 #ifdef DEFINE_FASTCALL1_ENTRYPOINT
74 DEFINE_FASTCALL1_ENTRYPOINT( ExTryToAcquireFastMutex
)
75 BOOLEAN WINAPI DECLSPEC_HIDDEN
__regs_ExTryToAcquireFastMutex(PFAST_MUTEX FastMutex
)
77 BOOLEAN WINAPI
ExTryToAcquireFastMutex(PFAST_MUTEX FastMutex
)
80 FIXME("(%p) stub\n", FastMutex
);
84 #ifdef DEFINE_FASTCALL1_ENTRYPOINT
85 DEFINE_FASTCALL1_ENTRYPOINT( KfAcquireSpinLock
)
86 KIRQL WINAPI DECLSPEC_HIDDEN
__regs_KfAcquireSpinLock(PKSPIN_LOCK SpinLock
)
88 KIRQL WINAPI
KfAcquireSpinLock(PKSPIN_LOCK SpinLock
)
91 FIXME( "(%p) stub!\n", SpinLock
);
97 #ifdef DEFINE_FASTCALL1_ENTRYPOINT
98 DEFINE_FASTCALL1_ENTRYPOINT( KfLowerIrql
)
99 VOID WINAPI DECLSPEC_HIDDEN
__regs_KfLowerIrql(KIRQL NewIrql
)
101 VOID WINAPI
KfLowerIrql(KIRQL NewIrql
)
104 FIXME( "(%u) stub!\n", NewIrql
);
108 #ifdef DEFINE_FASTCALL1_ENTRYPOINT
109 DEFINE_FASTCALL1_ENTRYPOINT( KfRaiseIrql
)
110 KIRQL WINAPI DECLSPEC_HIDDEN
__regs_KfRaiseIrql(KIRQL NewIrql
)
112 KIRQL WINAPI
KfRaiseIrql(KIRQL NewIrql
)
115 FIXME( "(%u) stub!\n", NewIrql
);
121 #ifdef DEFINE_FASTCALL2_ENTRYPOINT
122 DEFINE_FASTCALL2_ENTRYPOINT( KfReleaseSpinLock
)
123 VOID WINAPI DECLSPEC_HIDDEN
__regs_KfReleaseSpinLock(PKSPIN_LOCK SpinLock
, KIRQL NewIrql
)
125 VOID WINAPI
KfReleaseSpinLock(PKSPIN_LOCK SpinLock
, KIRQL NewIrql
)
128 FIXME( "(%p %u) stub!\n", SpinLock
, NewIrql
);
131 ULONG WINAPI
HalGetBusData(BUS_DATA_TYPE BusDataType
, ULONG BusNumber
, ULONG SlotNumber
, PVOID Buffer
, ULONG Length
)
133 FIXME("(%u %u %u %p %u) stub!\n", BusDataType
, BusNumber
, SlotNumber
, Buffer
, Length
);
134 /* Claim that there is no such bus */
138 ULONG WINAPI
HalGetBusDataByOffset(BUS_DATA_TYPE BusDataType
, ULONG BusNumber
, ULONG SlotNumber
, PVOID Buffer
, ULONG Offset
, ULONG Length
)
140 FIXME("(%u %u %u %p %u %u) stub!\n", BusDataType
, BusNumber
, SlotNumber
, Buffer
, Offset
, Length
);
141 /* Claim that there is no such bus */
145 BOOLEAN WINAPI
HalTranslateBusAddress(INTERFACE_TYPE InterfaceType
, ULONG BusNumber
, PHYSICAL_ADDRESS BusAddress
,
146 PULONG AddressSpace
, PPHYSICAL_ADDRESS TranslatedAddress
)
148 FIXME("(%d %d %s %p %p) stub!\n", InterfaceType
, BusNumber
,
149 wine_dbgstr_longlong(BusAddress
.QuadPart
), AddressSpace
, TranslatedAddress
);
153 KIRQL WINAPI
KeGetCurrentIrql(VOID
)
159 UCHAR WINAPI
READ_PORT_UCHAR(UCHAR
*port
)
161 FIXME("(%p) stub!\n", port
);
165 ULONG WINAPI
READ_PORT_ULONG(ULONG
*port
)
167 FIXME("(%p) stub!\n", port
);
171 void WINAPI
WRITE_PORT_UCHAR(UCHAR
*port
, UCHAR value
)
173 FIXME("(%p %d) stub!\n", port
, value
);
176 void WINAPI
WRITE_PORT_ULONG(ULONG
*port
, ULONG value
)
178 FIXME("(%p %d) stub!\n", port
, value
);