a1e22b8192
Drop 'include <string.h>' when it is not used and add it when it is missing. Also extra lines removed, or added just before local includes. Change-Id: Iccac4dbaa2dd4144fc347af36ecfc9747da3de20 Signed-off-by: Elyes HAOUAS <ehaouas@noos.fr> Reviewed-on: https://review.coreboot.org/c/coreboot/+/31966 Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Werner Zeh <werner.zeh@siemens.com> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
42 lines
1 KiB
C
42 lines
1 KiB
C
/*
|
|
* This file is part of the coreboot project.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License as published by
|
|
* the Free Software Foundation; version 2 of the License.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*/
|
|
|
|
#include <commonlib/helpers.h>
|
|
#include <console/console.h>
|
|
#include <program_loading.h>
|
|
#include <ip_checksum.h>
|
|
#include <symbols.h>
|
|
|
|
int payload_arch_usable_ram_quirk(uint64_t start, uint64_t size)
|
|
{
|
|
if (start < 1 * MiB && (start + size) <= 1 * MiB) {
|
|
printk(BIOS_DEBUG,
|
|
"Payload being loaded at below 1MiB without region being marked as RAM usable.\n");
|
|
return 1;
|
|
}
|
|
|
|
return 0;
|
|
}
|
|
|
|
void arch_prog_run(struct prog *prog)
|
|
{
|
|
__asm__ volatile (
|
|
#ifdef __x86_64__
|
|
"jmp *%%rdi\n"
|
|
#else
|
|
"jmp *%%edi\n"
|
|
#endif
|
|
|
|
:: "D"(prog_entry(prog))
|
|
);
|
|
}
|