mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-12-24 03:53:31 +00:00
2df59b2bd4
It seems like there was some merge error when first cleaning up and sharing this function. We have both an inline version of the function in include/tables_csum.h and a non-inline version in lib/tables_csum.c. Rework things so that we only have the non-inline version (due to number of calls, we should not inline this). Fixes:1befb38b86
("x86: Move table csum into separate file") Fixes:2b445e4d31
("x86: Move table csum into separate header") Cc: Alexander Graf <agraf@csgraf.de> Signed-off-by: Tom Rini <trini@konsulko.com>
54 lines
1.6 KiB
C
54 lines
1.6 KiB
C
/* SPDX-License-Identifier: GPL-2.0+ */
|
|
/*
|
|
* Copyright (C) 2015, Bin Meng <bmeng.cn@gmail.com>
|
|
*/
|
|
|
|
#ifndef _X86_TABLES_H_
|
|
#define _X86_TABLES_H_
|
|
|
|
#include <tables_csum.h>
|
|
|
|
#define ROM_TABLE_ADDR CONFIG_ROM_TABLE_ADDR
|
|
#define ROM_TABLE_END (CONFIG_ROM_TABLE_ADDR + CONFIG_ROM_TABLE_SIZE - 1)
|
|
|
|
#define ROM_TABLE_ALIGN 1024
|
|
|
|
/* SeaBIOS expects coreboot tables at address range 0x0000-0x1000 */
|
|
#define CB_TABLE_ADDR 0x800
|
|
|
|
/**
|
|
* table_fill_string() - Fill a string with pad in the configuration table
|
|
*
|
|
* This fills a string in the configuration table. It copies number of bytes
|
|
* from the source string, and if source string length is shorter than the
|
|
* required size to copy, pad the table string with the given pad character.
|
|
*
|
|
* @dest: where to fill a string
|
|
* @src: where to copy from
|
|
* @n: number of bytes to copy
|
|
* @pad: character to pad the remaining bytes
|
|
*/
|
|
void table_fill_string(char *dest, const char *src, size_t n, char pad);
|
|
|
|
/**
|
|
* write_tables() - Write x86 configuration tables
|
|
*
|
|
* This writes x86 configuration tables, including PIRQ routing table,
|
|
* Multi-Processor table and ACPI table. Whether a specific type of
|
|
* configuration table is written is controlled by a Kconfig option.
|
|
*
|
|
* Return: 0 if OK, -ENOSPC if table too large
|
|
*/
|
|
int write_tables(void);
|
|
|
|
/**
|
|
* write_pirq_routing_table() - Write PIRQ routing table
|
|
*
|
|
* This writes PIRQ routing table at a given address.
|
|
*
|
|
* @start: start address to write PIRQ routing table
|
|
* @return: end address of PIRQ routing table
|
|
*/
|
|
ulong write_pirq_routing_table(ulong start);
|
|
|
|
#endif /* _X86_TABLES_H_ */
|