mirror of
https://github.com/ARM-software/arm-trusted-firmware.git
synced 2025-04-23 13:36:05 +00:00

This patch adds the foundation for a platform-independent coreboot support library that can be shared by all platforms that boot BL31 from coreboot (acting as BL2). It adds code to parse the "coreboot table", a data structure that coreboot uses to communicate different kinds of information to later-stage firmware and certain OS drivers. As a first small use case for this information, allow platforms to access the serial console configuration used by coreboot, removing the need to hardcode base address and divisors and allowing Trusted Firmware to benefit from coreboot's user configuration (e.g. which UART to pick and which baud rate to use). Change-Id: I2bfb39cd2609ce6640b844ab68df6c9ae3f28e9e Signed-off-by: Julius Werner <jwerner@chromium.org>
24 lines
571 B
C
24 lines
571 B
C
/*
|
|
* Copyright (c) 2017, ARM Limited and Contributors. All rights reserved.
|
|
*
|
|
* SPDX-License-Identifier: BSD-3-Clause
|
|
*/
|
|
|
|
#ifndef __COREBOOT_H__
|
|
#define __COREBOOT_H__
|
|
|
|
#include <types.h>
|
|
|
|
typedef struct {
|
|
uint32_t type; /* always 2 (memory-mapped) on ARM */
|
|
uint32_t baseaddr;
|
|
uint32_t baud;
|
|
uint32_t regwidth; /* in bytes, i.e. usually 4 */
|
|
uint32_t input_hertz;
|
|
uint32_t uart_pci_addr; /* unused on current ARM systems */
|
|
} coreboot_serial_t;
|
|
extern coreboot_serial_t coreboot_serial;
|
|
|
|
void coreboot_table_setup(void *base);
|
|
|
|
#endif /* __COREBOOT_H__ */
|