linux/drivers/firmware/efi/earlycon.c

// SPDX-License-Identifier: GPL-2.0
/*
 * Copyright (C) 2013 Intel Corporation; author Matt Fleming
 */

#include <linux/console.h>
#include <linux/efi.h>
#include <linux/font.h>
#include <linux/io.h>
#include <linux/kernel.h>
#include <linux/serial_core.h>
#include <linux/screen_info.h>
#include <linux/string.h>

#include <asm/early_ioremap.h>

static const struct console *earlycon_console __initdata;
static const struct font_desc *font;
static u16 cur_line_y, max_line_y;
static u32 efi_x_array[1024];
static u32 efi_x, efi_y;
static u64 fb_base;
static bool fb_wb;
static void *efi_fb;

/*
 * EFI earlycon needs to use early_memremap() to map the framebuffer.
 * But early_memremap() is not usable for 'earlycon=efifb keep_bootcon',
 * memremap() should be used instead. memremap() will be available after
 * paging_init() which is earlier than initcall callbacks. Thus adding this
 * early initcall function early_efi_map_fb() to map the whole EFI framebuffer.
 */
static int __init efi_earlycon_remap_fb(void)
{}
early_initcall(efi_earlycon_remap_fb);

static int __init efi_earlycon_unmap_fb(void)
{}
late_initcall(efi_earlycon_unmap_fb);

static __ref void *efi_earlycon_map(unsigned long start, unsigned long len)
{}

static __ref void efi_earlycon_unmap(void *addr, unsigned long len)
{}

static void efi_earlycon_clear_scanline(unsigned int y)
{}

static void efi_earlycon_scroll_up(void)
{}

static void efi_earlycon_write_char(u32 *dst, unsigned char c, unsigned int h)
{}

static void
efi_earlycon_write(struct console *con, const char *str, unsigned int num)
{}

static bool __initdata fb_probed;

void __init efi_earlycon_reprobe(void)
{}

static int __init efi_earlycon_setup(struct earlycon_device *device,
				     const char *opt)
{}
EARLYCON_DECLARE();