2020-02-22 19:59:42 +02:00
|
|
|
/*
|
|
|
|
|
* Copyright (c) 2020, Liav A. <liavalb@hotmail.co.il>
|
|
|
|
|
*
|
2021-04-22 01:24:48 -07:00
|
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
2020-02-22 19:59:42 +02:00
|
|
|
*/
|
|
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
|
|
#include <AK/String.h>
|
|
|
|
|
#include <AK/Types.h>
|
2021-03-07 21:28:28 +01:00
|
|
|
#include <Kernel/Arch/x86/CPU.h>
|
2020-02-22 19:59:42 +02:00
|
|
|
#include <Kernel/Interrupts/GenericInterruptHandler.h>
|
|
|
|
|
|
|
|
|
|
namespace Kernel {
|
|
|
|
|
class UnhandledInterruptHandler final : public GenericInterruptHandler {
|
|
|
|
|
public:
|
|
|
|
|
explicit UnhandledInterruptHandler(u8 interrupt_vector);
|
|
|
|
|
virtual ~UnhandledInterruptHandler();
|
|
|
|
|
|
2020-03-09 16:24:29 +02:00
|
|
|
virtual void handle_interrupt(const RegisterState&) override;
|
2020-02-22 19:59:42 +02:00
|
|
|
|
2020-05-16 16:49:24 +12:00
|
|
|
[[noreturn]] virtual bool eoi() override;
|
2020-02-22 19:59:42 +02:00
|
|
|
|
2020-03-05 19:13:55 +02:00
|
|
|
virtual HandlerType type() const override { return HandlerType::UnhandledInterruptHandler; }
|
|
|
|
|
virtual const char* purpose() const override { return "Unhandled Interrupt Handler"; }
|
2021-02-23 20:42:32 +01:00
|
|
|
virtual const char* controller() const override { VERIFY_NOT_REACHED(); }
|
2020-02-22 19:59:42 +02:00
|
|
|
|
2020-02-23 14:14:01 +02:00
|
|
|
virtual size_t sharing_devices_count() const override { return 0; }
|
2020-02-22 19:59:42 +02:00
|
|
|
virtual bool is_shared_handler() const override { return false; }
|
|
|
|
|
virtual bool is_sharing_with_others() const override { return false; }
|
|
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
};
|
|
|
|
|
}
|