mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 14:15:08 +00:00

This is for the upcoming change to make InterruptDisabler class work for the aarch64 build.
28 lines
446 B
C++
28 lines
446 B
C++
/*
|
|
* Copyright (c) 2018-2021, Andreas Kling <kling@serenityos.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Types.h>
|
|
|
|
#include <Kernel/Arch/x86/IO.h>
|
|
|
|
namespace Kernel {
|
|
|
|
class NonMaskableInterruptDisabler {
|
|
public:
|
|
NonMaskableInterruptDisabler()
|
|
{
|
|
IO::out8(0x70, IO::in8(0x70) | 0x80);
|
|
}
|
|
|
|
~NonMaskableInterruptDisabler()
|
|
{
|
|
IO::out8(0x70, IO::in8(0x70) & 0x7F);
|
|
}
|
|
};
|
|
|
|
}
|