mb/sifive: Add HiFive Unleashed mainboard

Change-Id: I52ef2da9148809923c90178a00ba94babba8d2f8
Signed-off-by: Jonathan Neuschäfer <j.neuschaefer@gmx.net>
Reviewed-on: https://review.coreboot.org/25790
Tested-by: build bot (Jenkins) <no-reply@coreboot.org>
Reviewed-by: Ronald G. Minnich <rminnich@gmail.com>
This commit is contained in:
Jonathan Neuschäfer 2018-04-19 16:23:55 +02:00 committed by Patrick Georgi
parent 55b46454bc
commit 1c09cfa37b
10 changed files with 162 additions and 0 deletions

View File

@ -0,0 +1,16 @@
if VENDOR_SIFIVE
choice
prompt "Mainboard model"
source "src/mainboard/sifive/*/Kconfig.name"
endchoice
source "src/mainboard/sifive/*/Kconfig"
config MAINBOARD_VENDOR
string
default "SiFive"
endif # VENDOR_SIFIVE

View File

@ -0,0 +1,2 @@
config VENDOR_SIFIVE
bool "SiFive"

View File

@ -0,0 +1,33 @@
# This file is part of the coreboot project.
#
# Copyright (C) 2018 Jonathan Neuschäfer
#
# 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.
if BOARD_SIFIVE_HIFIVE_UNLEASHED
config BOARD_SPECIFIC_OPTIONS # dummy
def_bool y
select SOC_SIFIVE_FU540
select BOARD_ROMSIZE_KB_32768
config MAINBOARD_DIR
string
default sifive/hifive-unleashed
config MAX_CPUS
int
default 4
config MAINBOARD_PART_NUMBER
string
default "HiFive Unleashed"
endif

View File

@ -0,0 +1,2 @@
config BOARD_SIFIVE_HIFIVE_UNLEASHED
bool "HiFive Unleashed"

View File

@ -0,0 +1,18 @@
# This file is part of the coreboot project.
#
# Copyright (C) 2018 Jonathan Neuschäfer
#
# 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.
romstage-y += romstage.c
bootblock-y += memlayout.ld
romstage-y += memlayout.ld
ramstage-y += memlayout.ld

View File

@ -0,0 +1,6 @@
Category: eval
ROM package: SOIC-16
ROM protocol: SPI
ROM socketed: n
Flashrom support: n
Board URL: https://www.crowdsupply.com/sifive/hifive-unleashed

View File

@ -0,0 +1,16 @@
# This file is part of the coreboot project.
#
# Copyright (C) 2018 Jonathan Neuschäfer
#
# 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.
chip soc/sifive/fu540
device cpu_cluster 0 on end
end

View File

@ -0,0 +1,27 @@
/*
* This file is part of the coreboot project.
*
* Copyright (C) 2018 Jonathan Neuschäfer
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* 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 <device/device.h>
#include <bootblock_common.h>
#include <timestamp.h>
static void mainboard_enable(device_t dev)
{
}
struct chip_operations mainboard_ops = {
.name = CONFIG_MAINBOARD_PART_NUMBER,
.enable_dev = mainboard_enable,
};

View File

@ -0,0 +1,16 @@
/*
* This file is part of the coreboot project.
*
* Copyright (C) 2018 Jonathan Neuschäfer
*
* 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 <soc/memlayout.ld>

View File

@ -0,0 +1,26 @@
/*
* This file is part of the coreboot project.
*
* Copyright (C) 2013 Google, Inc.
*
* This software is licensed under the terms of the GNU General Public
* License version 2, as published by the Free Software Foundation, and
* may be copied, distributed, and modified under those terms.
*
* 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 <console/console.h>
#include <program_loading.h>
void main(void)
{
console_init();
/* TODO: Follow Section 6.3 (FSBL) of the FU540 manual */
run_ramstage();
}