mirror of
https://github.com/fergalmoran/ladybird.git
synced 2026-01-05 16:14:38 +00:00
Kernel: Replace Prekernel::halt with Processor::halt in aarch64 build
This allows us to get rid of one more Prekernel file.
This commit is contained in:
committed by
Linus Groh
parent
acc9be9f7d
commit
e80d8d697c
@@ -11,6 +11,4 @@ namespace Prekernel {
|
||||
void drop_to_exception_level_1();
|
||||
void init_prekernel_page_tables();
|
||||
|
||||
[[noreturn]] void halt();
|
||||
|
||||
}
|
||||
|
||||
@@ -1,21 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2021, James Mintram <me@jamesrm.com>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <Kernel/Arch/aarch64/Prekernel/Prekernel.h>
|
||||
|
||||
#include <Kernel/Arch/aarch64/ASM_wrapper.h>
|
||||
#include <Kernel/Arch/aarch64/RPi/UART.h>
|
||||
|
||||
namespace Prekernel {
|
||||
|
||||
[[noreturn]] void halt()
|
||||
{
|
||||
for (;;) {
|
||||
asm volatile("wfi");
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
@@ -13,7 +13,7 @@ start:
|
||||
// Let only core 0 continue, put other cores to sleep.
|
||||
mrs x13, MPIDR_EL1
|
||||
and x13, x13, 0xff
|
||||
cbnz x13, _ZN9Prekernel4haltEv
|
||||
cbnz x13, _ZN6Kernel9Processor4haltEv
|
||||
|
||||
// Let stack start before .text for now.
|
||||
// 512 kiB (0x80000) of stack are probably not sufficient, especially once we give the other cores some stack too,
|
||||
|
||||
@@ -32,4 +32,11 @@ void Processor::initialize(u32 cpu)
|
||||
|
||||
g_current_processor = this;
|
||||
}
|
||||
|
||||
[[noreturn]] void Processor::halt()
|
||||
{
|
||||
for (;;)
|
||||
asm volatile("wfi");
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@@ -143,10 +143,7 @@ public:
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
[[noreturn]] static void halt()
|
||||
{
|
||||
for (;;) { }
|
||||
}
|
||||
[[noreturn]] static void halt();
|
||||
};
|
||||
|
||||
}
|
||||
|
||||
@@ -102,7 +102,7 @@ extern "C" [[noreturn]] void __stack_chk_fail();
|
||||
|
||||
void __stack_chk_fail()
|
||||
{
|
||||
Prekernel::halt();
|
||||
Kernel::Processor::halt();
|
||||
}
|
||||
|
||||
using namespace Kernel;
|
||||
|
||||
@@ -400,7 +400,6 @@ else()
|
||||
set(PREKERNEL_SOURCES
|
||||
Arch/aarch64/Prekernel/Aarch64_asm_utils.S
|
||||
Arch/aarch64/Prekernel/boot.S
|
||||
Arch/aarch64/Prekernel/PrekernelCommon.cpp
|
||||
Arch/aarch64/Prekernel/PrekernelExceptions.cpp
|
||||
Arch/aarch64/Prekernel/PrekernelMMU.cpp
|
||||
|
||||
|
||||
Reference in New Issue
Block a user