mirror of
https://gitlab.os-k.eu/os-k-team/kvisc.git
synced 2023-08-25 14:05:46 +02:00
32 lines
956 B
C
32 lines
956 B
C
// The OS/K Team licenses this file to you under the MIT license.
|
|
// See the LICENSE file in the project root for more information.
|
|
|
|
#define IDT_SLOTS 1024
|
|
|
|
extern ulong **rfs;
|
|
extern size_t rfs_current_idx;
|
|
|
|
extern ulong idt[IDT_SLOTS];
|
|
extern bool idt_masked[IDT_SLOTS]; // delibarately masked by software
|
|
extern bool idt_handling[IDT_SLOTS]; // a handler is already running
|
|
|
|
enum
|
|
{
|
|
E_SHT, // Shutdown instruction
|
|
E_UDF, // Undefined behavior
|
|
E_ILL, // Ill-formed instruction
|
|
E_ACC, // Invalid memory access
|
|
E_SYS, // Supervisor only
|
|
E_DBF, // Double fault
|
|
E_IMP, // Not implemented
|
|
E_ALI, // Alignment error
|
|
E_STA, // Stack misalignment
|
|
E_STU, // Stack underflow
|
|
NEXCPTS
|
|
};
|
|
|
|
extern int dying;
|
|
|
|
void main_loop(void) __attribute__((__noreturn__));
|
|
void _except(ctx_t *, int, char *, ...) __attribute__((__noreturn__));
|