From 93ad0b4ea0d13963ff4d1488073d711a4b41915a Mon Sep 17 00:00:00 2001 From: belliash Date: Fri, 23 Dec 2022 14:41:11 +0100 Subject: [PATCH] Set valid calling convention for HAL routines --- sdk/xtdk/amd64/hlfuncs.h | 18 +++++++++--------- sdk/xtdk/i686/hlfuncs.h | 18 +++++++++--------- xtoskrnl/hl/amd64/cpufunc.c | 18 +++++++++--------- xtoskrnl/hl/i686/cpufunc.c | 18 +++++++++--------- 4 files changed, 36 insertions(+), 36 deletions(-) diff --git a/sdk/xtdk/amd64/hlfuncs.h b/sdk/xtdk/amd64/hlfuncs.h index ea46016..77f8eb8 100644 --- a/sdk/xtdk/amd64/hlfuncs.h +++ b/sdk/xtdk/amd64/hlfuncs.h @@ -18,30 +18,30 @@ extern ULONG ComPortAddress[]; /* HAL library routines forward references */ -XTAPI +XTCDECL BOOLEAN HlCpuId(IN OUT PCPUID_REGISTERS Registers); -XTAPI +XTCDECL VOID HlHalt(); -XTAPI +XTCDECL UCHAR HlIoPortInByte(IN USHORT Port); -XTAPI +XTCDECL VOID HlIoPortOutByte(IN USHORT Port, IN UCHAR Data); -XTAPI +XTCDECL ULONG_PTR -HlReadControlRegister(USHORT ControlRegister); +HlReadControlRegister(IN USHORT ControlRegister); -XTAPI +XTCDECL VOID -HlWriteControlRegister(USHORT ControlRegister, - UINT_PTR Value); +HlWriteControlRegister(IN USHORT ControlRegister, + IN UINT_PTR Value); #endif /* __XTDK_AMD64_HLFUNCS_H */ diff --git a/sdk/xtdk/i686/hlfuncs.h b/sdk/xtdk/i686/hlfuncs.h index cb33dff..c7f4727 100644 --- a/sdk/xtdk/i686/hlfuncs.h +++ b/sdk/xtdk/i686/hlfuncs.h @@ -18,30 +18,30 @@ extern ULONG ComPortAddress[]; /* HAL library routines forward references */ -XTAPI +XTCDECL BOOLEAN HlCpuId(IN OUT PCPUID_REGISTERS Registers); -XTAPI +XTCDECL VOID HlHalt(); -XTAPI +XTCDECL UCHAR HlIoPortInByte(IN USHORT Port); -XTAPI +XTCDECL VOID HlIoPortOutByte(IN USHORT Port, IN UCHAR Data); -XTAPI +XTCDECL ULONG_PTR -HlReadControlRegister(USHORT ControlRegister); +HlReadControlRegister(IN USHORT ControlRegister); -XTAPI +XTCDECL VOID -HlWriteControlRegister(USHORT ControlRegister, - UINT_PTR Value); +HlWriteControlRegister(IN USHORT ControlRegister, + IN UINT_PTR Value); #endif /* __XTDK_I686_HLFUNCS_H */ diff --git a/xtoskrnl/hl/amd64/cpufunc.c b/xtoskrnl/hl/amd64/cpufunc.c index 1d1440f..6023be4 100644 --- a/xtoskrnl/hl/amd64/cpufunc.c +++ b/xtoskrnl/hl/amd64/cpufunc.c @@ -19,7 +19,7 @@ * * @since XT 1.0 */ -XTAPI +XTCDECL BOOLEAN HlCpuId(IN OUT PCPUID_REGISTERS Registers) { @@ -58,7 +58,7 @@ HlCpuId(IN OUT PCPUID_REGISTERS Registers) * * @since XT 1.0 */ -XTAPI +XTCDECL VOID HlHalt() { @@ -78,7 +78,7 @@ HlHalt() * * @since XT 1.0 */ -XTAPI +XTCDECL UCHAR HlIoPortInByte(IN USHORT Port) { @@ -102,7 +102,7 @@ HlIoPortInByte(IN USHORT Port) * * @since XT 1.0 */ -XTAPI +XTCDECL VOID HlIoPortOutByte(IN USHORT Port, IN UCHAR Value) @@ -123,9 +123,9 @@ HlIoPortOutByte(IN USHORT Port, * * @since XT 1.0 */ -XTAPI +XTCDECL ULONG_PTR -HlReadControlRegister(USHORT ControlRegister) +HlReadControlRegister(IN USHORT ControlRegister) { ULONG_PTR Value; @@ -189,10 +189,10 @@ HlReadControlRegister(USHORT ControlRegister) * * @since XT 1.0 */ -XTAPI +XTCDECL VOID -HlWriteControlRegister(USHORT ControlRegister, - UINT_PTR Value) +HlWriteControlRegister(IN USHORT ControlRegister, + IN UINT_PTR Value) { /* Write a value into specified control register */ switch(ControlRegister) diff --git a/xtoskrnl/hl/i686/cpufunc.c b/xtoskrnl/hl/i686/cpufunc.c index 8b05cc7..ddc17c5 100644 --- a/xtoskrnl/hl/i686/cpufunc.c +++ b/xtoskrnl/hl/i686/cpufunc.c @@ -19,7 +19,7 @@ * * @since XT 1.0 */ -XTAPI +XTCDECL BOOLEAN HlCpuId(IN OUT PCPUID_REGISTERS Registers) { @@ -58,7 +58,7 @@ HlCpuId(IN OUT PCPUID_REGISTERS Registers) * * @since XT 1.0 */ -XTAPI +XTCDECL VOID HlHalt() { @@ -78,7 +78,7 @@ HlHalt() * * @since XT 1.0 */ -XTAPI +XTCDECL UCHAR HlIoPortInByte(IN USHORT Port) { @@ -102,7 +102,7 @@ HlIoPortInByte(IN USHORT Port) * * @since XT 1.0 */ -XTAPI +XTCDECL VOID HlIoPortOutByte(IN USHORT Port, IN UCHAR Value) @@ -123,9 +123,9 @@ HlIoPortOutByte(IN USHORT Port, * * @since XT 1.0 */ -XTAPI +XTCDECL ULONG_PTR -HlReadControlRegister(USHORT ControlRegister) +HlReadControlRegister(IN USHORT ControlRegister) { ULONG_PTR Value; @@ -183,10 +183,10 @@ HlReadControlRegister(USHORT ControlRegister) * * @since XT 1.0 */ -XTAPI +XTCDECL VOID -HlWriteControlRegister(USHORT ControlRegister, - UINT_PTR Value) +HlWriteControlRegister(IN USHORT ControlRegister, + IN UINT_PTR Value) { /* Write a value into specified control register */ switch(ControlRegister)