linux/arch/x86/kernel/early_printk.c

// SPDX-License-Identifier: GPL-2.0
#include <linux/console.h>
#include <linux/kernel.h>
#include <linux/init.h>
#include <linux/string.h>
#include <linux/screen_info.h>
#include <linux/usb/ch9.h>
#include <linux/pci_regs.h>
#include <linux/pci_ids.h>
#include <linux/errno.h>
#include <linux/pgtable.h>
#include <asm/io.h>
#include <asm/processor.h>
#include <asm/fcntl.h>
#include <asm/setup.h>
#include <xen/hvc-console.h>
#include <asm/pci-direct.h>
#include <asm/fixmap.h>
#include <linux/usb/ehci_def.h>
#include <linux/usb/xhci-dbgp.h>
#include <asm/pci_x86.h>

/* Simple VGA output */
#define VGABASE

static int max_ypos =, max_xpos =;
static int current_ypos =, current_xpos;

static void early_vga_write(struct console *con, const char *str, unsigned n)
{}

static struct console early_vga_console =;

/* Serial functions loosely based on a similar package from Klaus P. Gerlicher */

static unsigned long early_serial_base =;  /* ttyS0 */

#define XMTRDY

#define DLAB

#define TXR
#define RXR
#define IER
#define IIR
#define FCR
#define LCR
#define MCR
#define LSR
#define MSR
#define DLL
#define DLH

static unsigned int io_serial_in(unsigned long addr, int offset)
{}

static void io_serial_out(unsigned long addr, int offset, int value)
{}

static unsigned int (*serial_in)(unsigned long addr, int offset) =;
static void (*serial_out)(unsigned long addr, int offset, int value) =;

static int early_serial_putc(unsigned char ch)
{}

static void early_serial_write(struct console *con, const char *s, unsigned n)
{}

static __init void early_serial_hw_init(unsigned divisor)
{}

#define DEFAULT_BAUD

static __init void early_serial_init(char *s)
{}

#ifdef CONFIG_PCI
static void mem32_serial_out(unsigned long addr, int offset, int value)
{}

static unsigned int mem32_serial_in(unsigned long addr, int offset)
{}

/*
 * early_pci_serial_init()
 *
 * This function is invoked when the early_printk param starts with "pciserial"
 * The rest of the param should be "[force],B:D.F,baud", where B, D & F describe
 * the location of a PCI device that must be a UART device. "force" is optional
 * and overrides the use of an UART device with a wrong PCI class code.
 */
static __init void early_pci_serial_init(char *s)
{}
#endif

static struct console early_serial_console =;

static void early_console_register(struct console *con, int keep_early)
{}

static int __init setup_early_printk(char *buf)
{}

early_param();