mirror of
https://github.com/reactos/reactos.git
synced 2024-09-30 14:37:45 +00:00
[HAL]
Implement HalStopProfileInterrupt and add required RTC register and flag definitions. svn path=/trunk/; revision=48866
This commit is contained in:
parent
d59da19b08
commit
8d574b3e5a
|
@ -19,8 +19,8 @@ UCHAR HalpCmosCenturyOffset;
|
|||
|
||||
/* PRIVATE FUNCTIONS *********************************************************/
|
||||
|
||||
FORCEINLINE
|
||||
UCHAR
|
||||
NTAPI
|
||||
HalpReadCmos(IN UCHAR Reg)
|
||||
{
|
||||
/* Select the register */
|
||||
|
@ -30,8 +30,8 @@ HalpReadCmos(IN UCHAR Reg)
|
|||
return READ_PORT_UCHAR(CMOS_DATA_PORT);
|
||||
}
|
||||
|
||||
FORCEINLINE
|
||||
VOID
|
||||
NTAPI
|
||||
HalpWriteCmos(IN UCHAR Reg,
|
||||
IN UCHAR Value)
|
||||
{
|
||||
|
|
|
@ -4,6 +4,7 @@
|
|||
* FILE: hal/halx86/generic/profil.c
|
||||
* PURPOSE: System Profiling
|
||||
* PROGRAMMERS: Alex Ionescu (alex.ionescu@reactos.org)
|
||||
* Eric Kohl
|
||||
*/
|
||||
|
||||
/* INCLUDES ******************************************************************/
|
||||
|
@ -15,14 +16,28 @@
|
|||
/* FUNCTIONS *****************************************************************/
|
||||
|
||||
/*
|
||||
* @unimplemented
|
||||
* @implemented
|
||||
*/
|
||||
VOID
|
||||
NTAPI
|
||||
HalStopProfileInterrupt(IN KPROFILE_SOURCE ProfileSource)
|
||||
{
|
||||
UNIMPLEMENTED;
|
||||
return;
|
||||
UCHAR StatusB;
|
||||
|
||||
/* Acquire the CMOS lock */
|
||||
HalpAcquireSystemHardwareSpinLock();
|
||||
|
||||
/* Read Status Register B */
|
||||
StatusB = HalpReadCmos(RTC_REGISTER_B);
|
||||
|
||||
/* Disable periodic interrupts */
|
||||
StatusB = StatusB & ~RTC_REG_B_PI;
|
||||
|
||||
/* Write new value into Status Register B */
|
||||
HalpWriteCmos(RTC_REGISTER_B, StatusB);
|
||||
|
||||
/* Release the CMOS lock */
|
||||
HalpReleaseCmosSpinLock();
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
@ -48,8 +48,11 @@ ATTRIB_NORETURN
|
|||
#define CMOS_CONTROL_PORT (PUCHAR)0x70
|
||||
#define CMOS_DATA_PORT (PUCHAR)0x71
|
||||
#define RTC_REGISTER_A 0x0A
|
||||
#define RTC_REG_A_UIP 0x80
|
||||
#define RTC_REGISTER_B 0x0B
|
||||
#define RTC_REG_A_UIP 0x80
|
||||
#define RTC_REG_B_PI 0x40
|
||||
#define RTC_REGISTER_C 0x0C
|
||||
#define RTC_REGISTER_D 0x0D
|
||||
#define RTC_REGISTER_CENTURY 0x32
|
||||
|
||||
/* Usage flags */
|
||||
|
@ -683,7 +686,7 @@ HaliHaltSystem(
|
|||
);
|
||||
|
||||
//
|
||||
// CMOS initialization
|
||||
// CMOS Routines
|
||||
//
|
||||
VOID
|
||||
NTAPI
|
||||
|
@ -691,6 +694,19 @@ HalpInitializeCmos(
|
|||
VOID
|
||||
);
|
||||
|
||||
UCHAR
|
||||
NTAPI
|
||||
HalpReadCmos(
|
||||
IN UCHAR Reg
|
||||
);
|
||||
|
||||
VOID
|
||||
NTAPI
|
||||
HalpWriteCmos(
|
||||
IN UCHAR Reg,
|
||||
IN UCHAR Value
|
||||
);
|
||||
|
||||
//
|
||||
// Spinlock for protecting CMOS access
|
||||
//
|
||||
|
|
Loading…
Reference in a new issue