MonkOS  v0.1
A simple 64-bit operating system (x86_64)
cpu_inl.h File Reference

x86 CPU-specific function implementations – inline assembly. More...

#include <core.h>

Go to the source code of this file.

Functions

__forceinline void cpuid (uint32_t code, registers4_t *regs)
 
__forceinline uint64_t rdmsr (uint32_t id)
 
__forceinline void wrmsr (uint32_t id, uint64_t value)
 
__forceinline uint8_t io_inb (uint16_t port)
 
__forceinline void io_outb (uint16_t port, uint8_t value)
 
__forceinline uint16_t io_inw (uint16_t port)
 
__forceinline void io_outw (uint16_t port, uint16_t value)
 
__forceinline uint32_t io_ind (uint16_t port)
 
__forceinline void io_outd (uint16_t port, uint32_t value)
 
__forceinline void set_pagetable (uint64_t paddr)
 
__forceinline void invalidate_page (void *vaddr)
 
__forceinline void enable_interrupts ()
 
__forceinline void disable_interrupts ()
 
__forceinline void halt ()
 
__forceinline void invalid_opcode ()
 
__forceinline void fatal ()
 

Detailed Description

x86 CPU-specific function implementations – inline assembly.

Definition in file cpu_inl.h.

Function Documentation

__forceinline void cpuid ( uint32_t  code,
registers4_t regs 
)

Definition at line 17 of file cpu_inl.h.

Referenced by syscall_init().

__forceinline uint64_t rdmsr ( uint32_t  id)

Definition at line 27 of file cpu_inl.h.

Referenced by syscall_init().

__forceinline void wrmsr ( uint32_t  id,
uint64_t  value 
)

Definition at line 38 of file cpu_inl.h.

Referenced by syscall_init().

__forceinline uint8_t io_inb ( uint16_t  port)

Definition at line 47 of file cpu_inl.h.

Referenced by isr_keyboard(), update_buffer_offset(), and update_cursor().

__forceinline void io_outb ( uint16_t  port,
uint8_t  value 
)

Definition at line 59 of file cpu_inl.h.

Referenced by isr_keyboard(), isr_timer(), timer_init(), update_buffer_offset(), and update_cursor().

__forceinline uint16_t io_inw ( uint16_t  port)

Definition at line 69 of file cpu_inl.h.

__forceinline void io_outw ( uint16_t  port,
uint16_t  value 
)

Definition at line 81 of file cpu_inl.h.

__forceinline uint32_t io_ind ( uint16_t  port)

Definition at line 91 of file cpu_inl.h.

Referenced by read().

__forceinline void io_outd ( uint16_t  port,
uint32_t  value 
)

Definition at line 103 of file cpu_inl.h.

Referenced by read().

__forceinline void set_pagetable ( uint64_t  paddr)

Definition at line 113 of file cpu_inl.h.

Referenced by page_init(), and pagetable_activate().

__forceinline void invalidate_page ( void *  vaddr)

Definition at line 124 of file cpu_inl.h.

Referenced by pagetable_destroy(), and remove_pte().

__forceinline void enable_interrupts ( )

Definition at line 134 of file cpu_inl.h.

Referenced by kmain().

__forceinline void disable_interrupts ( )

Definition at line 140 of file cpu_inl.h.

Referenced by hang().

__forceinline void halt ( )

Definition at line 146 of file cpu_inl.h.

Referenced by command_run(), hang(), and keycode_run().

__forceinline void invalid_opcode ( )

Definition at line 152 of file cpu_inl.h.

Referenced by syscall_init().