mirror of
https://github.com/reactos/reactos.git
synced 2024-12-27 01:24:38 +00:00
[HALX86] Implement HalpcGetCmosData and HalpcSetCmosData.
This commit is contained in:
parent
0c16bcd4e8
commit
7e1510eb9c
3 changed files with 60 additions and 50 deletions
|
@ -101,10 +101,11 @@ HalpGetCmosData(
|
|||
|
||||
ULONG
|
||||
NTAPI
|
||||
HalpSetCmosData(IN ULONG BusNumber,
|
||||
IN ULONG SlotNumber,
|
||||
IN PVOID Buffer,
|
||||
IN ULONG Length)
|
||||
HalpSetCmosData(
|
||||
_In_ ULONG BusNumber,
|
||||
_In_ ULONG SlotNumber,
|
||||
_In_reads_bytes_(Length) PVOID Buffer,
|
||||
_In_ ULONG Length)
|
||||
{
|
||||
PUCHAR Ptr = (PUCHAR)Buffer;
|
||||
ULONG Address = SlotNumber;
|
||||
|
|
|
@ -427,17 +427,15 @@ HalpGetCmosData(
|
|||
_In_ ULONG BusNumber,
|
||||
_In_ ULONG SlotNumber,
|
||||
_Out_writes_bytes_(Length) PVOID Buffer,
|
||||
_In_ ULONG Length
|
||||
);
|
||||
_In_ ULONG Length);
|
||||
|
||||
ULONG
|
||||
NTAPI
|
||||
HalpSetCmosData(
|
||||
IN ULONG BusNumber,
|
||||
IN ULONG SlotNumber,
|
||||
IN PVOID Buffer,
|
||||
IN ULONG Length
|
||||
);
|
||||
_In_ ULONG BusNumber,
|
||||
_In_ ULONG SlotNumber,
|
||||
_In_reads_bytes_(Length) PVOID Buffer,
|
||||
_In_ ULONG Length);
|
||||
|
||||
CODE_SEG("INIT")
|
||||
VOID
|
||||
|
@ -584,24 +582,22 @@ HalpNoBusData(
|
|||
ULONG
|
||||
NTAPI
|
||||
HalpcGetCmosData(
|
||||
IN PBUS_HANDLER BusHandler,
|
||||
IN PBUS_HANDLER RootHandler,
|
||||
IN ULONG SlotNumber,
|
||||
IN PVOID Buffer,
|
||||
IN ULONG Offset,
|
||||
IN ULONG Length
|
||||
);
|
||||
_In_ PBUS_HANDLER BusHandler,
|
||||
_In_ PBUS_HANDLER RootHandler,
|
||||
_In_ ULONG SlotNumber,
|
||||
_Out_writes_bytes_(Length) PVOID Buffer,
|
||||
_In_ ULONG Offset,
|
||||
_In_ ULONG Length);
|
||||
|
||||
ULONG
|
||||
NTAPI
|
||||
HalpcSetCmosData(
|
||||
IN PBUS_HANDLER BusHandler,
|
||||
IN PBUS_HANDLER RootHandler,
|
||||
IN ULONG SlotNumber,
|
||||
IN PVOID Buffer,
|
||||
IN ULONG Offset,
|
||||
IN ULONG Length
|
||||
);
|
||||
_In_ PBUS_HANDLER BusHandler,
|
||||
_In_ PBUS_HANDLER RootHandler,
|
||||
_In_ ULONG SlotNumber,
|
||||
_In_reads_bytes_(Length) PVOID Buffer,
|
||||
_In_ ULONG Offset,
|
||||
_In_ ULONG Length);
|
||||
|
||||
BOOLEAN
|
||||
NTAPI
|
||||
|
|
|
@ -1,45 +1,58 @@
|
|||
/*
|
||||
* PROJECT: ReactOS HAL
|
||||
* LICENSE: GPL - See COPYING in the top level directory
|
||||
* FILE: hal/halx86/legacy/bus/cmosbus.c
|
||||
* PURPOSE:
|
||||
* PROGRAMMERS: Stefan Ginsberg (stefan.ginsberg@reactos.org)
|
||||
* PROJECT: ReactOS HAL
|
||||
* LICENSE: GPL-2.0-or-later (https://spdx.org/licenses/GPL-2.0-or-later)
|
||||
* PURPOSE: CMOS bus data handlers
|
||||
* COPYRIGHT: Copyright 2023 Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
|
||||
*/
|
||||
|
||||
/* INCLUDES *******************************************************************/
|
||||
|
||||
#include <hal.h>
|
||||
#define NDEBUG
|
||||
#include <debug.h>
|
||||
|
||||
/* GLOBALS ********************************************************************/
|
||||
|
||||
/* PRIVATE FUNCTIONS **********************************************************/
|
||||
|
||||
ULONG
|
||||
NTAPI
|
||||
HalpcGetCmosData(IN PBUS_HANDLER BusHandler,
|
||||
IN PBUS_HANDLER RootHandler,
|
||||
IN ULONG SlotNumber,
|
||||
IN PVOID Buffer,
|
||||
IN ULONG Offset,
|
||||
IN ULONG Length)
|
||||
HalpcGetCmosData(
|
||||
_In_ PBUS_HANDLER BusHandler,
|
||||
_In_ PBUS_HANDLER RootHandler,
|
||||
_In_ ULONG SlotNumber,
|
||||
_Out_writes_bytes_(Length) PVOID Buffer,
|
||||
_In_ ULONG Offset,
|
||||
_In_ ULONG Length)
|
||||
{
|
||||
UNIMPLEMENTED_DBGBREAK("CMOS GetData\n");
|
||||
return 0;
|
||||
UNREFERENCED_PARAMETER(RootHandler);
|
||||
|
||||
/* CMOS reads do not support offsets */
|
||||
if (Offset != 0)
|
||||
return 0;
|
||||
|
||||
return HalpGetCmosData(BusHandler->BusNumber,
|
||||
SlotNumber,
|
||||
Buffer,
|
||||
Length);
|
||||
}
|
||||
|
||||
ULONG
|
||||
NTAPI
|
||||
HalpcSetCmosData(IN PBUS_HANDLER BusHandler,
|
||||
IN PBUS_HANDLER RootHandler,
|
||||
IN ULONG SlotNumber,
|
||||
IN PVOID Buffer,
|
||||
IN ULONG Offset,
|
||||
IN ULONG Length)
|
||||
HalpcSetCmosData(
|
||||
_In_ PBUS_HANDLER BusHandler,
|
||||
_In_ PBUS_HANDLER RootHandler,
|
||||
_In_ ULONG SlotNumber,
|
||||
_In_reads_bytes_(Length) PVOID Buffer,
|
||||
_In_ ULONG Offset,
|
||||
_In_ ULONG Length)
|
||||
{
|
||||
UNIMPLEMENTED_DBGBREAK("CMOS SetData\n");
|
||||
return 0;
|
||||
UNREFERENCED_PARAMETER(RootHandler);
|
||||
|
||||
/* CMOS writes do not support offsets */
|
||||
if (Offset != 0)
|
||||
return 0;
|
||||
|
||||
return HalpSetCmosData(BusHandler->BusNumber,
|
||||
SlotNumber,
|
||||
Buffer,
|
||||
Length);
|
||||
}
|
||||
|
||||
/* EOF */
|
||||
|
|
Loading…
Reference in a new issue