mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-29 12:49:08 +00:00
As there is no need for a Prekernel on aarch64, the Prekernel code was moved into Kernel itself. The functionality remains the same. SERENITY_KERNEL_AND_INITRD in run.sh specifies a kernel and an inital ramdisk to be used by the emulator. This is needed because aarch64 does not need a Prekernel and the other ones do.
47 lines
741 B
C++
47 lines
741 B
C++
/*
|
|
* Copyright (c) 2021, Nico Weber <thakis@chromium.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Types.h>
|
|
|
|
namespace Prekernel {
|
|
|
|
struct TimerRegisters;
|
|
|
|
class Timer {
|
|
public:
|
|
static Timer& the();
|
|
|
|
u64 microseconds_since_boot();
|
|
|
|
enum class ClockID {
|
|
Reserved = 0,
|
|
EMMC = 1,
|
|
UART = 2,
|
|
ARM = 3,
|
|
CORE = 4,
|
|
V3D = 5,
|
|
H264 = 6,
|
|
ISP = 7,
|
|
SDRAM = 8,
|
|
PIXEL = 9,
|
|
PWM = 10,
|
|
HEVC = 11,
|
|
EMMC2 = 12,
|
|
M2MC = 13,
|
|
PIXEL_BVB = 14,
|
|
};
|
|
u32 set_clock_rate(ClockID, u32 rate_hz, bool skip_setting_turbo = true);
|
|
|
|
private:
|
|
Timer();
|
|
|
|
TimerRegisters volatile* m_registers;
|
|
};
|
|
|
|
}
|