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