mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-05 17:16:04 +00:00
Kernel: Separate NonMaskableInterruptDisabler into its own file
This is for the upcoming change to make InterruptDisabler class work for the aarch64 build.
This commit is contained in:
parent
9413fe9fe5
commit
ea9cf8b6ab
Notes:
sideshowbarker
2024-07-17 10:31:26 +09:00
Author: https://github.com/FireFox317
Commit: ea9cf8b6ab
Pull-request: https://github.com/SerenityOS/serenity/pull/14146
Reviewed-by: https://github.com/ADKaster
Reviewed-by: https://github.com/BertalanD
Reviewed-by: https://github.com/Hendiadyoin1
Reviewed-by: https://github.com/nico ✅
3 changed files with 29 additions and 13 deletions
|
@ -35,17 +35,4 @@ private:
|
|||
u32 m_flags;
|
||||
};
|
||||
|
||||
class NonMaskableInterruptDisabler {
|
||||
public:
|
||||
NonMaskableInterruptDisabler()
|
||||
{
|
||||
IO::out8(0x70, IO::in8(0x70) | 0x80);
|
||||
}
|
||||
|
||||
~NonMaskableInterruptDisabler()
|
||||
{
|
||||
IO::out8(0x70, IO::in8(0x70) & 0x7F);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
||||
|
|
28
Kernel/Arch/x86/NonMaskableInterruptDisabler.h
Normal file
28
Kernel/Arch/x86/NonMaskableInterruptDisabler.h
Normal file
|
@ -0,0 +1,28 @@
|
|||
/*
|
||||
* 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);
|
||||
}
|
||||
};
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue