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

Go to the source code of this file.

Macros

#define UART0_IRQ   10
 

Functions

static u8 uart_buf[MOS_PAGE_SIZE__aligned (MOS_PAGE_SIZE)
 
static bool riscv64_uart_setup (console_t *con)
 
void platform_startup_early ()
 
void platform_startup_setup_kernel_mm ()
 
void platform_startup_late ()
 

Variables

static mos_platform_info_t riscv64_platform_info
 
mos_platform_info_t *const platform_info = &riscv64_platform_info
 
static serial_console_t uart_console
 

Macro Definition Documentation

◆ UART0_IRQ

#define UART0_IRQ   10

Referenced by platform_startup_late().

Function Documentation

◆ __aligned()

static u8 uart_buf[MOS_PAGE_SIZE] __aligned ( MOS_PAGE_SIZE )
static

◆ riscv64_uart_setup()

static bool riscv64_uart_setup ( console_t * con)
static

Definition at line 19 of file riscv64_platform.c.

+ Here is the call graph for this function:

◆ platform_startup_early()

void platform_startup_early ( )

Definition at line 47 of file riscv64_platform.c.

Referenced by mos_start_kernel().

◆ platform_startup_setup_kernel_mm()

void platform_startup_setup_kernel_mm ( )

Definition at line 60 of file riscv64_platform.c.

Referenced by mos_start_kernel().

+ Here is the call graph for this function:

◆ platform_startup_late()

void platform_startup_late ( )

Definition at line 79 of file riscv64_platform.c.

Referenced by mos_start_kernel().

+ Here is the call graph for this function:

Variable Documentation

◆ riscv64_platform_info

static mos_platform_info_t riscv64_platform_info
static
Initial value:
= {
.boot_console = &uart_console.con,
}
static serial_console_t uart_console

Definition at line 14 of file riscv64_platform.c.

◆ platform_info

◆ uart_console

serial_console_t uart_console
static
Initial value:
= {
.ops = &(console_ops_t){ .extra_setup = riscv64_uart_setup },
.default_bg = Black,
.default_fg = LightBlue,
.read.buf = uart_buf,
.read.size = MOS_PAGE_SIZE,
.name = "riscv_uart1" },
.device = { .baudrate_divisor = BAUD_RATE_115200,
.char_length = CHAR_LENGTH_8,
.parity = PARITY_NONE,
.stop_bits = STOP_BITS_1,
.driver = &riscv64_uart_driver,
.driver_data = NULL },
}
#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
#define NULL
Definition pb_syshdr.h:46
static bool riscv64_uart_setup(console_t *con)
@ STOP_BITS_1
Definition serial.h:31
@ CHAR_LENGTH_8
Definition serial.h:26
@ BAUD_RATE_115200
Definition serial.h:56
@ PARITY_NONE
Definition serial.h:37
const serial_driver_t riscv64_uart_driver
Definition uart_driver.c:33

Definition at line 27 of file riscv64_platform.c.

Referenced by platform_startup_late().