Kernel: Remove old ‘main id register accessorʼ for Aarch64

This commit is contained in:
konrad 2023-01-24 22:05:11 +01:00 committed by Andrew Kaster
parent a6526cd90c
commit 84e8d5f418
3 changed files with 0 additions and 56 deletions

View file

@ -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;
}
}

View file

@ -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;
};
}

View file

@ -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