These functions will allow us to remove hardcodes, as long as we can verify the qemu and lowrisc targets implement the configstring correctly. Hence, for the most part, we'll start with mainboard changes first. Define a new config variable, CONFIG_RISCV_CONFIGSTRING, which has a default value that works on all existing systems but which can be changed as needed for a new SOC or mainboard. Change-Id: I7dd3f553d3e61f1c49752fb04402b134fdfdf979 Signed-off-by: Ronald G. Minnich <rminnich@gmail.com> Reviewed-on: https://review.coreboot.org/17256 Tested-by: build bot (Jenkins) Reviewed-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
43 lines
1.1 KiB
C
43 lines
1.1 KiB
C
/*
|
|
* This file is part of the coreboot project.
|
|
*
|
|
* Copyright 2013 Google Inc.
|
|
*
|
|
* 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 <program_loading.h>
|
|
#include <vm.h>
|
|
#include <arch/encoding.h>
|
|
#include <rules.h>
|
|
#include <console/console.h>
|
|
#include <commonlib/configstring.h>
|
|
|
|
void arch_prog_run(struct prog *prog)
|
|
{
|
|
void (*doit)(void *) = prog_entry(prog);
|
|
void riscvpayload(const char *configstring, void *payload);
|
|
const char *config = configstring();
|
|
|
|
if (ENV_RAMSTAGE && prog_type(prog) == PROG_PAYLOAD) {
|
|
printk(BIOS_SPEW, "Config string: '%s'\n", config);
|
|
initVirtualMemory();
|
|
printk(BIOS_SPEW, "OK, let's go\n");
|
|
riscvpayload(config, doit);
|
|
}
|
|
|
|
doit(prog_entry_arg(prog));
|
|
}
|
|
|
|
int arch_supports_bounce_buffer(void)
|
|
{
|
|
return 0;
|
|
}
|