Kernel/riscv64: Make the kernel compilable using GCC

This commit adds all necessary includes, so all functions are properly
declared.
PCI.cpp is moved to PCI/Initializer.cpp, as that matches the header
path.
This commit is contained in:
Sönke Holz 2023-12-12 17:17:05 +01:00 committed by Andrew Kaster
parent 4cd1e4d69e
commit 2b44c4c3f7
Notes: sideshowbarker 2024-07-17 07:43:05 +09:00
5 changed files with 6 additions and 2 deletions

View file

@ -4,6 +4,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <Kernel/Arch/DebugOutput.h>
#include <Kernel/Library/Assertions.h>
namespace Kernel {

View file

@ -7,6 +7,8 @@
#include <AK/Error.h>
#include <AK/Types.h>
#include <Kernel/Arch/CPU.h>
#include <Kernel/Arch/Interrupts.h>
#include <Kernel/Arch/TrapFrame.h>
#include <Kernel/Interrupts/GenericInterruptHandler.h>

View file

@ -4,6 +4,7 @@
* SPDX-License-Identifier: BSD-2-Clause
*/
#include <Kernel/Bus/PCI/Initializer.h>
#include <Kernel/Library/Assertions.h>
namespace Kernel::PCI {

View file

@ -172,7 +172,7 @@ public:
RISCV64::CSR::SATP satp() const
{
return {
return RISCV64::CSR::SATP {
.PPN = m_directory_table->paddr().get() >> PADDR_PPN_OFFSET,
.ASID = 0,
.MODE = RISCV64::CSR::SATP::Mode::Sv39,

View file

@ -522,7 +522,7 @@ elseif("${SERENITY_ARCH}" STREQUAL "riscv64")
Arch/riscv64/Interrupts.cpp
Arch/riscv64/PageDirectory.cpp
Arch/riscv64/Panic.cpp
Arch/riscv64/PCI.cpp
Arch/riscv64/PCI/Initializer.cpp
Arch/riscv64/PowerState.cpp
Arch/riscv64/pre_init.cpp
Arch/riscv64/Processor.cpp