mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 10:57:34 +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:
parent
acc9be9f7d
commit
e80d8d697c
7 changed files with 10 additions and 30 deletions
|
@ -11,6 +11,4 @@ namespace Prekernel {
|
||||||
void drop_to_exception_level_1();
|
void drop_to_exception_level_1();
|
||||||
void init_prekernel_page_tables();
|
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.
|
// Let only core 0 continue, put other cores to sleep.
|
||||||
mrs x13, MPIDR_EL1
|
mrs x13, MPIDR_EL1
|
||||||
and x13, x13, 0xff
|
and x13, x13, 0xff
|
||||||
cbnz x13, _ZN9Prekernel4haltEv
|
cbnz x13, _ZN6Kernel9Processor4haltEv
|
||||||
|
|
||||||
// Let stack start before .text for now.
|
// 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,
|
// 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;
|
g_current_processor = this;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[[noreturn]] void Processor::halt()
|
||||||
|
{
|
||||||
|
for (;;)
|
||||||
|
asm volatile("wfi");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -143,10 +143,7 @@ public:
|
||||||
VERIFY_NOT_REACHED();
|
VERIFY_NOT_REACHED();
|
||||||
}
|
}
|
||||||
|
|
||||||
[[noreturn]] static void halt()
|
[[noreturn]] static void halt();
|
||||||
{
|
|
||||||
for (;;) { }
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,7 +102,7 @@ extern "C" [[noreturn]] void __stack_chk_fail();
|
||||||
|
|
||||||
void __stack_chk_fail()
|
void __stack_chk_fail()
|
||||||
{
|
{
|
||||||
Prekernel::halt();
|
Kernel::Processor::halt();
|
||||||
}
|
}
|
||||||
|
|
||||||
using namespace Kernel;
|
using namespace Kernel;
|
||||||
|
|
|
@ -400,7 +400,6 @@ else()
|
||||||
set(PREKERNEL_SOURCES
|
set(PREKERNEL_SOURCES
|
||||||
Arch/aarch64/Prekernel/Aarch64_asm_utils.S
|
Arch/aarch64/Prekernel/Aarch64_asm_utils.S
|
||||||
Arch/aarch64/Prekernel/boot.S
|
Arch/aarch64/Prekernel/boot.S
|
||||||
Arch/aarch64/Prekernel/PrekernelCommon.cpp
|
|
||||||
Arch/aarch64/Prekernel/PrekernelExceptions.cpp
|
Arch/aarch64/Prekernel/PrekernelExceptions.cpp
|
||||||
Arch/aarch64/Prekernel/PrekernelMMU.cpp
|
Arch/aarch64/Prekernel/PrekernelMMU.cpp
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue