17 unsigned long high_table_pointer;
19 #define MAX_PIRQ_TABLE_SIZE (4 * 1024)
24 rom_table_end =
ALIGN_UP(rom_table_end, 1024);
31 if (high_table_pointer) {
32 unsigned long new_high_table_pointer;
33 new_high_table_pointer =
37 if (new_high_table_pointer > (high_table_pointer
41 new_high_table_pointer - high_table_pointer);
49 unsigned long high_table_pointer;
51 #define MAX_MP_TABLE_SIZE (4 * 1024)
56 rom_table_end =
ALIGN_UP(rom_table_end, 1024);
60 if (high_table_pointer) {
61 unsigned long new_high_table_pointer;
65 if (new_high_table_pointer > (high_table_pointer
70 new_high_table_pointer - high_table_pointer);
78 unsigned long high_table_pointer;
79 const size_t max_acpi_size = CONFIG_MAX_ACPI_TABLE_SIZE_KB *
KiB;
97 if (high_table_pointer) {
98 unsigned long acpi_start = high_table_pointer;
99 unsigned long new_high_table_pointer;
101 rom_table_end =
ALIGN_UP(rom_table_end, 16);
103 if (new_high_table_pointer > (high_table_pointer
107 new_high_table_pointer - high_table_pointer);
112 while (acpi_start < new_high_table_pointer) {
122 if (acpi_start < new_high_table_pointer) {
135 rom_table_end =
ALIGN_UP(rom_table_end, 1024);
138 return rom_table_end;
143 unsigned long high_table_pointer;
145 #define MAX_SMBIOS_SIZE (4 * KiB)
149 if (high_table_pointer) {
150 unsigned long new_high_table_pointer;
152 new_high_table_pointer =
154 rom_table_end =
ALIGN_UP(rom_table_end, 16);
155 memcpy((
void *)rom_table_end, (
void *)high_table_pointer,
159 if (new_high_table_pointer > (high_table_pointer
163 new_high_table_pointer - high_table_pointer);
165 unsigned long new_rom_table_end;
170 rom_table_end =
ALIGN_UP(new_rom_table_end, 16);
173 return rom_table_end;
180 #define FORWARDING_TABLE_ADDR ((uintptr_t)0x500)
186 unsigned long rom_table_end = 0xf0000;
189 if (
CONFIG(GENERATE_PIRQ_TABLE))
193 if (
CONFIG(GENERATE_MP_TABLE))
196 if (
CONFIG(HAVE_ACPI_TABLES))
199 if (
CONFIG(GENERATE_SMBIOS_TABLES))
unsigned long write_acpi_tables(unsigned long start)
void arch_write_tables(uintptr_t coreboot_table)
void bootmem_arch_add_ranges(void)
void * memcpy(void *dest, const void *src, size_t n)
unsigned long smbios_write_tables(unsigned long current)
#define MAX_PIRQ_TABLE_SIZE
static unsigned long write_pirq_table(unsigned long rom_table_end)
static unsigned long write_mptable(unsigned long rom_table_end)
static unsigned long write_smbios_table(unsigned long rom_table_end)
static unsigned long write_acpi_table(unsigned long rom_table_end)
static uintptr_t forwarding_table
#define FORWARDING_TABLE_ADDR
#define MAX_MP_TABLE_SIZE
void bootmem_add_range(uint64_t start, uint64_t size, const enum bootmem_type tag)
void * cbmem_add(u32 id, u64 size)
#define printk(level,...)
size_t write_coreboot_forwarding_table(uintptr_t entry, uintptr_t target)
#define BIOS_DEBUG
BIOS_DEBUG - Verbose output.
#define BIOS_ERR
BIOS_ERR - System in incomplete state.
unsigned long write_smp_table(unsigned long addr)
unsigned long write_pirq_routing_table(unsigned long start)
int memcmp(const void *s1, const void *s2, size_t n)
typedef void(X86APIP X86EMU_intrFuncs)(int num)