mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-22 15:40:19 +00:00
91da264a4c
MSI(x) interrupts need to reserve IRQs so that it can be programmed by the device. Add an API to reserve contiguous ranges of interrupt handlers so that it can used by PCI devices that use MSI(x) mechanism. This API needs to be implemented by aarch64 architecture.
27 lines
620 B
C++
27 lines
620 B
C++
/*
|
|
* Copyright (c) 2022, Timon Kruiper <timonkruiper@gmail.com>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Platform.h>
|
|
#include <AK/Types.h>
|
|
|
|
#if ARCH(X86_64)
|
|
# include <Kernel/Arch/x86_64/Interrupts.h>
|
|
#endif
|
|
|
|
namespace Kernel {
|
|
|
|
class GenericInterruptHandler;
|
|
|
|
GenericInterruptHandler& get_interrupt_handler(u8 interrupt_number);
|
|
void register_generic_interrupt_handler(u8 number, GenericInterruptHandler&);
|
|
void unregister_generic_interrupt_handler(u8 number, GenericInterruptHandler&);
|
|
ErrorOr<u8> reserve_interrupt_handlers(u8 number_of_irqs);
|
|
|
|
void initialize_interrupts();
|
|
|
|
}
|