MOS Source Code
Loading...
Searching...
No Matches
x86_platform.c File Reference
+ Include dependency graph for x86_platform.c:

Go to the source code of this file.

Classes

struct  frame_t
 

Macros

#define TRACE_FMT   " %-3d [" PTR_FMT "]: "
 

Functions

static u8 com1_buf[MOS_PAGE_SIZE__aligned (MOS_PAGE_SIZE)
 
static bool x86_keyboard_handler (u32 irq, void *data)
 
static bool x86_pit_timer_handler (u32 irq, void *data)
 
void x86_setup_lapic_timer ()
 
void x86_dump_stack_at (ptr_t this_frame, bool can_access_vmaps)
 
void platform_dump_current_stack (void)
 
void platform_dump_stack (platform_regs_t *regs)
 
void platform_startup_early ()
 
void platform_startup_setup_kernel_mm ()
 
void platform_startup_late ()
 

Variables

serial_console_t com1_console
 
serial_console_t com2_console
 
mos_platform_info_t *const platform_info = &x86_platform
 
mos_platform_info_t x86_platform = { .boot_console = &com1_console.con }
 
const acpi_rsdp_tacpi_rsdp = NULL
 

Macro Definition Documentation

◆ TRACE_FMT

#define TRACE_FMT   " %-3d [" PTR_FMT "]: "

Referenced by x86_dump_stack_at().

Function Documentation

◆ __aligned()

static u8 com1_buf[MOS_PAGE_SIZE] __aligned ( MOS_PAGE_SIZE )
static

◆ x86_keyboard_handler()

static bool x86_keyboard_handler ( u32 irq,
void * data )
static

Definition at line 67 of file x86_platform.c.

Referenced by platform_startup_late().

+ Here is the call graph for this function:

◆ x86_pit_timer_handler()

static bool x86_pit_timer_handler ( u32 irq,
void * data )
static

Definition at line 77 of file x86_platform.c.

Referenced by platform_startup_late().

+ Here is the call graph for this function:

◆ x86_setup_lapic_timer()

void x86_setup_lapic_timer ( )

Definition at line 86 of file x86_platform.c.

Referenced by platform_ap_entry(), and platform_startup_late().

+ Here is the call graph for this function:

◆ x86_dump_stack_at()

void x86_dump_stack_at ( ptr_t this_frame,
bool can_access_vmaps )

Definition at line 97 of file x86_platform.c.

Referenced by platform_dump_current_stack(), platform_dump_stack(), and platform_dump_thread_kernel_stack().

+ Here is the call graph for this function:

◆ platform_dump_current_stack()

void platform_dump_current_stack ( void )

Definition at line 181 of file x86_platform.c.

Referenced by try_handle_kernel_panics_at(), and x86_handle_exception().

+ Here is the call graph for this function:

◆ platform_dump_stack()

void platform_dump_stack ( platform_regs_t * regs)

Definition at line 188 of file x86_platform.c.

+ Here is the call graph for this function:

◆ platform_startup_early()

void platform_startup_early ( )

Definition at line 193 of file x86_platform.c.

+ Here is the call graph for this function:

◆ platform_startup_setup_kernel_mm()

void platform_startup_setup_kernel_mm ( )

Definition at line 219 of file x86_platform.c.

+ Here is the call graph for this function:

◆ platform_startup_late()

void platform_startup_late ( )

Definition at line 224 of file x86_platform.c.

+ Here is the call graph for this function:

Variable Documentation

◆ com1_console

serial_console_t com1_console
Initial value:
= {
.device = { .driver = &x86_serial_driver,
.driver_data = (void *) COM1,
.baudrate_divisor = BAUD_RATE_115200,
.char_length = CHAR_LENGTH_8,
.stop_bits = STOP_BITS_15_OR_2,
.parity = PARITY_EVEN },
.con = { .ops = &(console_ops_t){ .extra_setup = serial_console_setup },
.name = "serial_com1",
.read.buf = com1_buf,
.read.size = MOS_PAGE_SIZE,
.default_fg = LightBlue,
.default_bg = Black },
}
#define MOS_PAGE_SIZE
Definition autoconf.h:6
@ CONSOLE_CAP_READ
console supports read
Definition console.h:21
@ CONSOLE_CAP_EXTRA_SETUP
extra setup required
Definition console.h:20
@ LightBlue
Definition ansi_colors.h:28
@ Black
Definition ansi_colors.h:19
@ STOP_BITS_15_OR_2
Definition serial.h:32
@ CHAR_LENGTH_8
Definition serial.h:26
@ BAUD_RATE_115200
Definition serial.h:56
@ PARITY_EVEN
Definition serial.h:39
bool serial_console_setup(console_t *console)
const serial_driver_t x86_serial_driver
@ COM1

Definition at line 31 of file x86_platform.c.

Referenced by platform_startup_late().

◆ com2_console

serial_console_t com2_console
Initial value:
= {
.device = { .driver = &x86_serial_driver,
.driver_data = (void *) COM2,
.baudrate_divisor = BAUD_RATE_115200,
.char_length = CHAR_LENGTH_8,
.stop_bits = STOP_BITS_15_OR_2,
.parity = PARITY_EVEN },
.con = { .ops = &(console_ops_t){ .extra_setup = serial_console_setup },
.name = "serial_com2",
.read.buf = com2_buf,
.read.size = MOS_PAGE_SIZE,
.default_fg = LightBlue,
.default_bg = Black },
}
@ COM2

Definition at line 47 of file x86_platform.c.

Referenced by platform_startup_early().

◆ platform_info

mos_platform_info_t* const platform_info = &x86_platform

Definition at line 63 of file x86_platform.c.

Referenced by platform_startup_late().

◆ x86_platform

mos_platform_info_t x86_platform = { .boot_console = &com1_console.con }

Definition at line 64 of file x86_platform.c.

Referenced by madt_parse_table(), platform_startup_late(), and x86_setup_direct_map().

◆ acpi_rsdp

const acpi_rsdp_t* acpi_rsdp = NULL

Definition at line 65 of file x86_platform.c.

Referenced by platform_startup_late().