mirror of
https://github.com/reactos/reactos.git
synced 2025-04-25 16:10:29 +00:00
[HALX86] Set the NMI disable flag when accessing CMOS registers
An NMI while accessing the CMOS can leave it in an undefined state. NMIs are used on x64 SMP for CPU freeze in the debugger.
This commit is contained in:
parent
94fc56c038
commit
2c057d9bc1
1 changed files with 4 additions and 4 deletions
|
@ -24,8 +24,8 @@ UCHAR
|
|||
NTAPI
|
||||
HalpReadCmos(IN UCHAR Reg)
|
||||
{
|
||||
/* Select the register */
|
||||
WRITE_PORT_UCHAR(CMOS_CONTROL_PORT, Reg);
|
||||
/* Select the register (0x80 to disable NMIs) */
|
||||
WRITE_PORT_UCHAR(CMOS_CONTROL_PORT, 0x80 | Reg);
|
||||
|
||||
/* Query the value */
|
||||
return READ_PORT_UCHAR(CMOS_DATA_PORT);
|
||||
|
@ -37,8 +37,8 @@ NTAPI
|
|||
HalpWriteCmos(IN UCHAR Reg,
|
||||
IN UCHAR Value)
|
||||
{
|
||||
/* Select the register */
|
||||
WRITE_PORT_UCHAR(CMOS_CONTROL_PORT, Reg);
|
||||
/* Select the register (0x80 to disable NMIs) */
|
||||
WRITE_PORT_UCHAR(CMOS_CONTROL_PORT, 0x80 | Reg);
|
||||
|
||||
/* Write the value */
|
||||
WRITE_PORT_UCHAR(CMOS_DATA_PORT, Value);
|
||||
|
|
Loading…
Reference in a new issue