1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-28 10:17:34 +00:00
serenity/Kernel/Arch/aarch64/RPi/InterruptController.h
Ben Wiederhake c25bef59aa Kernel: Repair build for aarch64
This broke in 6fd478b6ce due to
insufficient testing on my part. Sorry!
2023-01-05 19:47:07 +01:00

40 lines
1.1 KiB
C++

/*
* Copyright (c) 2022, Timon Kruiper <timonkruiper@gmail.com>
*
* SPDX-License-Identifier: BSD-2-Clause
*/
#pragma once
#include <AK/StringView.h>
#include <AK/Types.h>
#include <Kernel/Arch/aarch64/IRQController.h>
namespace Kernel::RPi {
struct InterruptControllerRegisters;
// This class implements the simple Interrupt Controller found in the BCM2837. (RPi3)
// A description of this device can be found at chapter 7 (Interrupts) of the manual:
// https://github.com/raspberrypi/documentation/files/1888662/BCM2837-ARM-Peripherals.-.Revised.-.V2-1.pdf (RPi3)
class InterruptController : public IRQController {
public:
InterruptController();
private:
virtual void enable(GenericInterruptHandler const&) override;
virtual void disable(GenericInterruptHandler const&) override;
virtual void eoi(GenericInterruptHandler const&) const override;
virtual u64 pending_interrupts() const override;
virtual StringView model() const override
{
return "Raspberry Pi Interrupt Controller"sv;
}
InterruptControllerRegisters volatile* m_registers;
};
}