mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 11:18:11 +00:00
Kernel: Move IO delay code to x86 architecture subdirectory
Many code patterns and hardware procedures rely on reliable delay in the microseconds granularity, and since they are using such delays which are valid cases, but should not rely on x86 specific code, we allow to determine in compile time the proper platform-specific code to use to invoke such delays.
This commit is contained in:
parent
cac72259d0
commit
84fbab6803
19 changed files with 96 additions and 54 deletions
|
@ -5,6 +5,7 @@
|
|||
*/
|
||||
|
||||
#include <AK/Singleton.h>
|
||||
#include <Kernel/Arch/Delay.h>
|
||||
#include <Kernel/Arch/x86/IO.h>
|
||||
#include <Kernel/Bus/PCI/API.h>
|
||||
#include <Kernel/Bus/PCI/IDs.h>
|
||||
|
@ -46,7 +47,7 @@ void GraphicsManagement::disable_vga_emulation_access_permanently()
|
|||
IO::out8(0x3c4, 1);
|
||||
u8 sr1 = IO::in8(0x3c5);
|
||||
IO::out8(0x3c5, sr1 | 1 << 5);
|
||||
IO::delay(1000);
|
||||
microseconds_delay(1000);
|
||||
m_vga_access_is_disabled = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue