33 .driver_data = (
void *)
COM1,
39 .name =
"serial_com1",
44 .default_bg =
Black },
49 .driver_data = (
void *)
COM2,
55 .name =
"serial_com2",
60 .default_bg =
Black },
73 pr_info(
"Keyboard scancode: %x", scancode);
101 const bool do_mapped_check =
current_cpu->mm_context;
104 pr_warn(
" no mm context available, mapping checks are disabled (early-boot panic?)");
108 pr_emerg(
" mm lock is already held, stack trace may be corrupted");
111 for (
u32 i = 0; frame; i++)
113#define TRACE_FMT " %-3d [" PTR_FMT "]: "
130 else if (frame == frame->
bp)
139 else if (frame->
ip == 0)
144 else if (frame->
ip < 1
KB)
148 else if (can_access_vmaps)
154 if (vmap && vmap->
io)
178 pr_info(
"-- end of stack trace");
184 __asm__(
"mov %%rbp, %0" :
"=r"(frame));
204#if MOS_DEBUG_FEATURE(x86_startup)
207#define do_print_cpu_feature(feature) \
208 if (cpu_has_feature(CPU_FEATURE_##feature)) \
209 pr_cont(" " #feature);
212#undef do_print_cpu_feature
226 pr_dinfo2(x86_startup,
"Parsing ACPI tables...");
235 pr_dinfo2(x86_startup,
"Searching for RSDP in EBDA...");
239 pr_dinfo2(x86_startup,
"Searching for RSDP in BIOS memory region...");
251 pr_dinfo2(x86_startup,
"Initializing APICs...");
void acpi_parse_rsdt(const acpi_rsdp_t *rsdp)
const acpi_rsdp_t * acpi_find_rsdp(ptr_t start, size_t size)
void x86_unblock_aps(void)
should_inline void ioapic_enable_interrupt(u32 irq, u32 lapic_id)
void lapic_set_timer(u32 initial_count)
should_inline u8 lapic_get_id(void)
#define MOS_ASSERT_X(cond, msg,...)
#define MOS_PATH_MAX_LENGTH
void console_register(console_t *con)
@ CONSOLE_CAP_READ
console supports read
@ CONSOLE_CAP_EXTRA_SETUP
extra setup required
void x86_cpu_initialise_caps(void)
void x86_cpu_setup_xsave_area(void)
#define FOR_ALL_CPU_FEATURES(M)
void x86_init_percpu_gdt()
void x86_init_percpu_tss()
void x86_init_percpu_idt(void)
vmap_t * vmap_obtain(mm_context_t *mmctx, ptr_t vaddr, size_t *out_offset)
Get the vmap object for a virtual address.
ptr_t mm_get_phys_addr(mm_context_t *ctx, ptr_t vaddr)
pmm_region_t * pmm_find_reserved_region(ptr_t needle)
Find a region in the physical memory manager.
void interrupt_handler_register(u32 irq, irq_serve_t handler, void *data)
Register an interrupt handler.
void io_get_name(const io_t *io, char *buf, size_t size)
void x86_paging_setup(void)
#define mos_panic(fmt,...)
should_inline u8 port_inb(u16 port)
#define pr_info2(fmt,...)
#define pr_emerg(fmt,...)
#define pr_dinfo2(feat, fmt,...)
bool rtc_irq_handler(u32 irq, void *data)
void reschedule(void)
reschedule.
bool serial_console_setup(console_t *console)
bool serial_console_irq_handler(u32 irq, void *data)
const serial_driver_t x86_serial_driver
should_inline bool spinlock_is_locked(const spinlock_t *lock)
#define spinlock_acquire(lock)
#define spinlock_release(lock)