mirror of
https://github.com/SerenityOS/serenity
synced 2024-10-14 20:03:29 +00:00
Kernel: Remove old ‘main id register accessorʼ for Aarch64
This commit is contained in:
parent
a6526cd90c
commit
84e8d5f418
|
@ -1,19 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Nico Weber <thakis@chromium.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <Kernel/Arch/aarch64/MainIdRegister.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
MainIdRegister::MainIdRegister()
|
||||
{
|
||||
unsigned int mrs;
|
||||
asm volatile("mrs %x0, MIDR_EL1"
|
||||
: "=r"(mrs));
|
||||
m_value = mrs;
|
||||
}
|
||||
|
||||
}
|
|
@ -1,36 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Nico Weber <thakis@chromium.org>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
class MainIdRegister {
|
||||
public:
|
||||
MainIdRegister();
|
||||
|
||||
enum Implementer {
|
||||
ArmLimited = 0x41,
|
||||
};
|
||||
unsigned implementer() const { return (m_value >> 24) & 0xFF; }
|
||||
unsigned variant() const { return (m_value >> 20) & 0xF; }
|
||||
unsigned architecture() const { return (m_value >> 16) & 0xF; }
|
||||
|
||||
enum PartNum {
|
||||
RaspberryPi1 = 0xB76,
|
||||
RaspberryPi2 = 0xC07,
|
||||
RaspberryPi3 = 0xD03,
|
||||
RaspberryPi4 = 0xD08,
|
||||
};
|
||||
unsigned part_num() const { return (m_value >> 4) & 0xFFF; }
|
||||
|
||||
unsigned revision() const { return m_value & 0xF; }
|
||||
|
||||
private:
|
||||
unsigned int m_value;
|
||||
};
|
||||
|
||||
}
|
|
@ -460,7 +460,6 @@ elseif("${SERENITY_ARCH}" STREQUAL "aarch64")
|
|||
Arch/aarch64/InterruptManagement.cpp
|
||||
Arch/aarch64/Interrupts.cpp
|
||||
Arch/aarch64/kprintf.cpp
|
||||
Arch/aarch64/MainIdRegister.cpp
|
||||
Arch/aarch64/PageDirectory.cpp
|
||||
Arch/aarch64/Panic.cpp
|
||||
Arch/aarch64/Processor.cpp
|
||||
|
|
Loading…
Reference in a new issue