summaryrefslogtreecommitdiffstats
path: root/src/mainboard/sifive/hifive-unleashed/romstage.c
blob: d0d9a13a4fa530e24e619e406509ca297a4df9ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
/* SPDX-License-Identifier: GPL-2.0-only */
/* This file is part of the coreboot project. */

#include <cbmem.h>
#include <console/console.h>
#include <console/streams.h>
#include <console/uart.h>
#include <program_loading.h>
#include <soc/clock.h>
#include <soc/sdram.h>

void main(void)
{
	console_init();

	/* TODO: Follow Section 6.3 (FSBL) of the FU540 manual */

	clock_init();

	// re-initialize UART
	if (CONFIG(CONSOLE_SERIAL))
		uart_init(CONFIG_UART_FOR_CONSOLE);

	sdram_init();

	cbmem_initialize_empty();

	run_ramstage();
}