diff options
author | wpaul <wpaul@FreeBSD.org> | 2004-02-09 19:13:58 +0000 |
---|---|---|
committer | wpaul <wpaul@FreeBSD.org> | 2004-02-09 19:13:58 +0000 |
commit | 5e5b84d04c94f245fb4d84e7ce86a68560071891 (patch) | |
tree | 74c566f835659e6daa7ef78ae55b5d736b6eb64c /sys | |
parent | a763f85517d648d1f84c9ca2113fb49a72d098cd (diff) | |
download | FreeBSD-src-5e5b84d04c94f245fb4d84e7ce86a68560071891.zip FreeBSD-src-5e5b84d04c94f245fb4d84e7ce86a68560071891.tar.gz |
Add stub implementations of KfLowerIrql() and KfRaiseIrql() (both of
which are _fastcall).
Diffstat (limited to 'sys')
-rw-r--r-- | sys/compat/ndis/subr_hal.c | 56 |
1 files changed, 40 insertions, 16 deletions
diff --git a/sys/compat/ndis/subr_hal.c b/sys/compat/ndis/subr_hal.c index c324d3f..972508f 100644 --- a/sys/compat/ndis/subr_hal.c +++ b/sys/compat/ndis/subr_hal.c @@ -80,6 +80,8 @@ __stdcall static uint8_t hal_lock(/*kspin_lock * */void); __stdcall static void hal_unlock(/*kspin_lock *, uint8_t*/void); __stdcall static uint8_t hal_irql(void); __stdcall static uint64_t hal_perfcount(uint64_t *); +__stdcall static uint8_t hal_raise_irql(/*uint8_t*/ void); +__stdcall static void hal_lower_irql(/*uint8_t*/ void); __stdcall static void dummy (void); extern struct mtx_pool *ndis_mtxpool; @@ -245,6 +247,26 @@ hal_perfcount(freq) return((uint64_t)ticks); } +__stdcall static uint8_t +hal_raise_irql(/*irql*/ void) +{ + uint8_t irql; + + __asm__ __volatile__ ("" : "=c" (irql)); + + return(0); +} + +__stdcall static void +hal_lower_irql(/*irql*/ void) +{ + uint8_t irql; + + __asm__ __volatile__ ("" : "=c" (irql)); + + return; +} + __stdcall static void dummy() { @@ -253,23 +275,25 @@ static void dummy() } image_patch_table hal_functbl[] = { - { "KeStallExecutionProcessor", (FUNC)hal_stall_exec_cpu }, - { "WRITE_PORT_ULONG", (FUNC)hal_writeport_ulong }, - { "WRITE_PORT_USHORT", (FUNC)hal_writeport_ushort }, - { "WRITE_PORT_UCHAR", (FUNC)hal_writeport_uchar }, - { "WRITE_PORT_BUFFER_ULONG", (FUNC)hal_writeport_buf_ulong }, - { "WRITE_PORT_BUFFER_USHORT", (FUNC)hal_writeport_buf_ushort }, - { "WRITE_PORT_BUFFER_UCHAR", (FUNC)hal_writeport_buf_uchar }, - { "READ_PORT_ULONG", (FUNC)hal_readport_ulong }, - { "READ_PORT_USHORT", (FUNC)hal_readport_ushort }, - { "READ_PORT_UCHAR", (FUNC)hal_readport_uchar }, - { "READ_PORT_BUFFER_ULONG", (FUNC)hal_readport_buf_ulong }, - { "READ_PORT_BUFFER_USHORT", (FUNC)hal_readport_buf_ushort }, - { "READ_PORT_BUFFER_UCHAR", (FUNC)hal_readport_buf_uchar }, - { "KfAcquireSpinLock", (FUNC)hal_lock }, - { "KfReleaseSpinLock", (FUNC)hal_unlock }, - { "KeGetCurrentIrql", (FUNC)hal_irql }, + { "KeStallExecutionProcessor", (FUNC)hal_stall_exec_cpu }, + { "WRITE_PORT_ULONG", (FUNC)hal_writeport_ulong }, + { "WRITE_PORT_USHORT", (FUNC)hal_writeport_ushort }, + { "WRITE_PORT_UCHAR", (FUNC)hal_writeport_uchar }, + { "WRITE_PORT_BUFFER_ULONG", (FUNC)hal_writeport_buf_ulong }, + { "WRITE_PORT_BUFFER_USHORT", (FUNC)hal_writeport_buf_ushort }, + { "WRITE_PORT_BUFFER_UCHAR", (FUNC)hal_writeport_buf_uchar }, + { "READ_PORT_ULONG", (FUNC)hal_readport_ulong }, + { "READ_PORT_USHORT", (FUNC)hal_readport_ushort }, + { "READ_PORT_UCHAR", (FUNC)hal_readport_uchar }, + { "READ_PORT_BUFFER_ULONG", (FUNC)hal_readport_buf_ulong }, + { "READ_PORT_BUFFER_USHORT", (FUNC)hal_readport_buf_ushort }, + { "READ_PORT_BUFFER_UCHAR", (FUNC)hal_readport_buf_uchar }, + { "KfAcquireSpinLock", (FUNC)hal_lock }, + { "KfReleaseSpinLock", (FUNC)hal_unlock }, + { "KeGetCurrentIrql", (FUNC)hal_irql }, { "KeQueryPerformanceCounter", (FUNC)hal_perfcount }, + { "KfLowerIrql", (FUNC)hal_lower_irql }, + { "KfRaiseIrql", (FUNC)hal_raise_irql }, /* * This last entry is a catch-all for any function we haven't |