[kernel] Let endpoints get interrupt notifications
- Add a tag field to all endpoint messages, which doubles as a notification field - Add a endpoint_bind_irq syscall to enable an endpoint to listen for interrupt notifications. This mechanism needs to change. - Add a temporary copy of the serial port code to nulldrv, and let it take responsibility for COM2
This commit is contained in:
@@ -10,16 +10,30 @@ typedef uint64_t j6_koid_t;
|
||||
/// Syscalls return status as this type
|
||||
typedef uint64_t j6_status_t;
|
||||
|
||||
/// Handles are references and capabilities to other objects
|
||||
typedef uint32_t j6_handle_t;
|
||||
|
||||
/// Some objects have signals, which are a bitmap of 64 possible signals
|
||||
typedef uint64_t j6_signal_t;
|
||||
|
||||
/// The rights of a handle/capability are a bitmap of 64 possible rights
|
||||
typedef uint64_t j6_rights_t;
|
||||
/// The first word of IPC messages are the tag. Tags with the high bit
|
||||
/// set are reserved for the system.
|
||||
typedef uint64_t j6_tag_t;
|
||||
|
||||
#define j6_handle_invalid 0xffffffff
|
||||
#define j6_tag_system_flag 0x8000000000000000
|
||||
|
||||
/// If all high bits except the last 16 are set, then the tag represents
|
||||
/// an IRQ.
|
||||
#define j6_tag_irq_base 0xffffffffffff0000
|
||||
#define j6_tag_is_irq(x) (((x) & j6_tag_irq_base) == j6_tag_irq_base)
|
||||
#define j6_tag_from_irq(x) ((x) | j6_tag_irq_base)
|
||||
#define j6_tag_to_irq(x) ((x) & ~j6_tag_irq_base)
|
||||
|
||||
/// Handles are references and capabilities to other objects. The least
|
||||
/// significant 32 bits are an identifier, and the most significant 32
|
||||
/// bits are a bitmask of capabilities this handle has on that object.
|
||||
typedef uint64_t j6_handle_t;
|
||||
|
||||
#define j6_handle_rights_shift 4
|
||||
#define j6_handle_id_mask 0xffffffffull
|
||||
#define j6_handle_invalid 0xffffffffull
|
||||
|
||||
/// A process' initial data structure for communicating with the system
|
||||
struct j6_process_init
|
||||
|
||||
Reference in New Issue
Block a user