2 Copyright © 2017, The AROS Development Team. All rights reserved.
8 #include <aros/libcall.h>
9 #include <aros/asmcall.h>
10 #include <exec/execbase.h>
11 #include <exec/lists.h>
13 #include "kernel_base.h"
14 #include "kernel_intern.h"
15 #include "kernel_debug.h"
16 #include "kernel_globals.h"
20 int core_APICErrorHandle(struct ExceptionContext
*regs
, struct KernelBase
*KernelBase
, void *HandlerData2
)
23 struct PlatformData
*pdata
= KernelBase
->kb_PlatformData
;
24 struct APICData
*apicData
= pdata
->kb_APIC
;
25 IPTR __LAPICBase
= apicData
->lapicBase
;
27 // IN order to read APIC_ESR register one has to first write it with anything (zero is fine)
28 // This forces update of the contents and new error codes may be read
29 APIC_REG(__LAPICBase
, APIC_ESR
) = error_code
;
30 error_code
= APIC_REG(__LAPICBase
, APIC_ESR
);
32 bug("[KERNEL] %s: APIC Error interrupt! Error code=%08x\n", __func__
, error_code
);
37 int core_APICSpuriousHandle(struct ExceptionContext
*regs
, struct KernelBase
*KernelBase
, void *HandlerData2
)
39 bug("[KERNEL] %s: APIC Spurious interrupt!\n", __func__
);