mirror of
https://github.com/RGBCube/serenity
synced 2025-05-18 20:05:06 +00:00

We move QEMU and VirtualBox shutdown sequences to a separate file, as well as moving the i8042 reboot code sequence too to another file. This allows us to abstract specific methods from the power state node code of the SysFS filesystem, to allow other architectures to put their methods there too in the future.
19 lines
337 B
C++
19 lines
337 B
C++
/*
|
|
* Copyright (c) 2022, Liav A. <liavalb@hotmail.co.il>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#include <AK/Format.h>
|
|
#include <Kernel/Arch/x86/IO.h>
|
|
#include <Kernel/Arch/x86/common/I8042Reboot.h>
|
|
|
|
namespace Kernel {
|
|
|
|
void i8042_reboot()
|
|
{
|
|
dbgln("attempting reboot via KB Controller...");
|
|
IO::out8(0x64, 0xFE);
|
|
}
|
|
|
|
}
|