mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 21:47:43 +00:00
Kernel/aarch64: Fix build after #17842
This commit is contained in:
parent
475bac89e1
commit
906abbdf53
2 changed files with 3 additions and 3 deletions
|
@ -70,7 +70,7 @@ UNMAP_AFTER_INIT KernelRng::KernelRng()
|
||||||
} else {
|
} else {
|
||||||
// Fallback to TimeManagement as entropy
|
// Fallback to TimeManagement as entropy
|
||||||
dmesgln("KernelRng: Using bad entropy source TimeManagement");
|
dmesgln("KernelRng: Using bad entropy source TimeManagement");
|
||||||
auto current_time = static_cast<u64>(TimeManagement::the().now().to_milliseconds());
|
auto current_time = static_cast<u64>(TimeManagement::now().milliseconds_since_epoch());
|
||||||
for (size_t i = 0; i < pool_count * reseed_threshold; ++i) {
|
for (size_t i = 0; i < pool_count * reseed_threshold; ++i) {
|
||||||
add_random_event(current_time, i % 32);
|
add_random_event(current_time, i % 32);
|
||||||
current_time *= 0x574au;
|
current_time *= 0x574au;
|
||||||
|
|
|
@ -233,7 +233,7 @@ UnixDateTime TimeManagement::boot_time()
|
||||||
return RTC::boot_time();
|
return RTC::boot_time();
|
||||||
#elif ARCH(AARCH64)
|
#elif ARCH(AARCH64)
|
||||||
// FIXME: Return correct boot time
|
// FIXME: Return correct boot time
|
||||||
return Duration::from_seconds(0);
|
return UnixDateTime::epoch();
|
||||||
#else
|
#else
|
||||||
# error Unknown architecture
|
# error Unknown architecture
|
||||||
#endif
|
#endif
|
||||||
|
@ -461,7 +461,7 @@ UNMAP_AFTER_INIT bool TimeManagement::probe_and_set_aarch64_hardware_timers()
|
||||||
m_seconds_since_boot = seconds_since_boot;
|
m_seconds_since_boot = seconds_since_boot;
|
||||||
m_ticks_this_second = ticks_this_second;
|
m_ticks_this_second = ticks_this_second;
|
||||||
|
|
||||||
timespec_add(m_epoch_time, { (time_t)(delta_ns / 1000000000), (long)(delta_ns % 1000000000) }, m_epoch_time);
|
m_epoch_time += Duration::from_nanoseconds(delta_ns);
|
||||||
|
|
||||||
m_update1.store(update_iteration + 1, AK::MemoryOrder::memory_order_release);
|
m_update1.store(update_iteration + 1, AK::MemoryOrder::memory_order_release);
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue