From 602d89ef273cdf38126b126f87245861ac80706d Mon Sep 17 00:00:00 2001 From: belliash Date: Tue, 27 Dec 2022 22:43:19 +0100 Subject: [PATCH] Fixes in HlIoPortInShort() and HlIoPortInLong() routines --- sdk/xtdk/amd64/hlfuncs.h | 6 +++--- sdk/xtdk/i686/hlfuncs.h | 6 +++--- xtoskrnl/hl/amd64/cpufunc.c | 10 +++++----- xtoskrnl/hl/i686/cpufunc.c | 10 +++++----- 4 files changed, 16 insertions(+), 16 deletions(-) diff --git a/sdk/xtdk/amd64/hlfuncs.h b/sdk/xtdk/amd64/hlfuncs.h index a86cd35..4d39b32 100644 --- a/sdk/xtdk/amd64/hlfuncs.h +++ b/sdk/xtdk/amd64/hlfuncs.h @@ -35,11 +35,11 @@ UCHAR HlIoPortInByte(IN USHORT Port); XTCDECL -UCHAR +USHORT HlIoPortInShort(IN USHORT Port); XTCDECL -UCHAR +ULONG HlIoPortInLong(IN USHORT Port); XTCDECL @@ -55,7 +55,7 @@ HlIoPortOutShort(IN USHORT Port, XTCDECL VOID HlIoPortOutLong(IN USHORT Port, - IN UINT Value); + IN ULONG Value); XTCDECL ULONG_PTR diff --git a/sdk/xtdk/i686/hlfuncs.h b/sdk/xtdk/i686/hlfuncs.h index b50a543..a4265e4 100644 --- a/sdk/xtdk/i686/hlfuncs.h +++ b/sdk/xtdk/i686/hlfuncs.h @@ -35,11 +35,11 @@ UCHAR HlIoPortInByte(IN USHORT Port); XTCDECL -UCHAR +USHORT HlIoPortInShort(IN USHORT Port); XTCDECL -UCHAR +ULONG HlIoPortInLong(IN USHORT Port); XTCDECL @@ -55,7 +55,7 @@ HlIoPortOutShort(IN USHORT Port, XTCDECL VOID HlIoPortOutLong(IN USHORT Port, - IN UINT Value); + IN ULONG Value); XTCDECL ULONG_PTR diff --git a/xtoskrnl/hl/amd64/cpufunc.c b/xtoskrnl/hl/amd64/cpufunc.c index 07f611e..ea4b0d9 100644 --- a/xtoskrnl/hl/amd64/cpufunc.c +++ b/xtoskrnl/hl/amd64/cpufunc.c @@ -114,10 +114,10 @@ HlIoPortInByte(IN USHORT Port) * @since XT 1.0 */ XTCDECL -UCHAR +USHORT HlIoPortInShort(IN USHORT Port) { - UCHAR Value; + USHORT Value; asm volatile("inw %1, %0" : "=a"(Value) : "Nd"(Port)); @@ -135,10 +135,10 @@ HlIoPortInShort(IN USHORT Port) * @since XT 1.0 */ XTCDECL -UCHAR +ULONG HlIoPortInLong(IN USHORT Port) { - UCHAR Value; + ULONG Value; asm volatile("inl %1, %0" : "=a"(Value) : "Nd"(Port)); @@ -209,7 +209,7 @@ HlIoPortOutShort(IN USHORT Port, XTCDECL VOID HlIoPortOutLong(IN USHORT Port, - IN UINT Value) + IN ULONG Value) { asm volatile("outl %0, %1" : diff --git a/xtoskrnl/hl/i686/cpufunc.c b/xtoskrnl/hl/i686/cpufunc.c index b8317ea..b0126cd 100644 --- a/xtoskrnl/hl/i686/cpufunc.c +++ b/xtoskrnl/hl/i686/cpufunc.c @@ -114,10 +114,10 @@ HlIoPortInByte(IN USHORT Port) * @since XT 1.0 */ XTCDECL -UCHAR +USHORT HlIoPortInShort(IN USHORT Port) { - UCHAR Value; + USHORT Value; asm volatile("inw %1, %0" : "=a"(Value) : "Nd"(Port)); @@ -135,10 +135,10 @@ HlIoPortInShort(IN USHORT Port) * @since XT 1.0 */ XTCDECL -UCHAR +ULONG HlIoPortInLong(IN USHORT Port) { - UCHAR Value; + ULONG Value; asm volatile("inl %1, %0" : "=a"(Value) : "Nd"(Port)); @@ -209,7 +209,7 @@ HlIoPortOutShort(IN USHORT Port, XTCDECL VOID HlIoPortOutLong(IN USHORT Port, - IN UINT Value) + IN ULONG Value) { asm volatile("outl %0, %1" :