coreboot
coreboot is an Open Source project aimed at replacing the proprietary BIOS found in most computers.
uart.c
Go to the documentation of this file.
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 
3 #include <types.h>
4 #include <console/uart.h>
5 #include <boot/coreboot_tables.h>
6 
7 static uint8_t *buf = (void *)0;
8 uintptr_t uart_platform_base(unsigned int idx)
9 {
10  return (uintptr_t) buf;
11 }
12 
13 void uart_init(unsigned int idx)
14 {
15 }
16 
17 unsigned char uart_rx_byte(unsigned int idx)
18 {
19  return 0;
20 }
21 
22 void uart_tx_byte(unsigned int idx, unsigned char data)
23 {
24 
25 }
26 
27 void uart_tx_flush(unsigned int idx)
28 {
29 }
30 
31 void uart_fill_lb(void *data)
32 {
33  struct lb_serial serial;
34 
36  serial.baseaddr = 0;
37  serial.baud = 115200;
38  serial.regwidth = 1;
39  serial.input_hertz = uart_platform_refclk();
40  serial.uart_pci_addr = CONFIG_UART_PCI_ADDR;
41  lb_add_serial(&serial, data);
42 
44 }
#define LB_TAG_CONSOLE_SERIAL8250MEM
#define LB_SERIAL_TYPE_MEMORY_MAPPED
void lb_add_console(uint16_t consoletype, void *data)
void lb_add_serial(struct lb_serial *serial, void *data)
unsigned int serial
Definition: edid.c:52
static uint8_t * buf
Definition: uart.c:7
void uart_init(unsigned int idx)
Definition: uart.c:13
void uart_tx_flush(unsigned int idx)
Definition: uart.c:27
uintptr_t uart_platform_base(unsigned int idx)
Definition: uart.c:8
unsigned char uart_rx_byte(unsigned int idx)
Definition: uart.c:17
void uart_fill_lb(void *data)
Definition: uart.c:31
void uart_tx_byte(unsigned int idx, unsigned char data)
Definition: uart.c:22
unsigned int uart_platform_refclk(void)
Definition: uart.c:85
unsigned long uintptr_t
Definition: stdint.h:21
unsigned char uint8_t
Definition: stdint.h:8