Compare commits
8 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
8c9ed25419 | ||
|
|
7fb94e9524 | ||
|
|
288a5c6802 | ||
|
|
f44128934e | ||
|
|
97344b18e7 | ||
|
|
66ca67a04f | ||
|
|
d8a97112e7 | ||
|
|
8e24ff9568 |
@@ -534,9 +534,6 @@ coreboot test.py:
|
||||
allow_failure: true
|
||||
tags: [ 'lab' ]
|
||||
script:
|
||||
- if [[ -z "${SJG_LAB}" ]]; then
|
||||
exit 0;
|
||||
fi
|
||||
# Environment:
|
||||
# SRC - source tree
|
||||
# OUT - output directory for builds
|
||||
@@ -579,10 +576,11 @@ pcduino3_nano:
|
||||
ROLE: pcduino3_nano
|
||||
<<: *lab_dfn
|
||||
|
||||
samus:
|
||||
variables:
|
||||
ROLE: samus
|
||||
<<: *lab_dfn
|
||||
# samus has a hardware failure 30-Nov-24
|
||||
#samus:
|
||||
# variables:
|
||||
# ROLE: samus
|
||||
# <<: *lab_dfn
|
||||
|
||||
link:
|
||||
variables:
|
||||
@@ -634,25 +632,28 @@ rpi3z:
|
||||
ROLE: rpi3z
|
||||
<<: *lab_dfn
|
||||
|
||||
bbb:
|
||||
variables:
|
||||
ROLE: bbb
|
||||
<<: *lab_dfn
|
||||
# bbb has a hardware failure 30-Nov-24
|
||||
#bbb:
|
||||
# variables:
|
||||
# ROLE: bbb
|
||||
# <<: *lab_dfn
|
||||
|
||||
kevin:
|
||||
variables:
|
||||
ROLE: kevin
|
||||
<<: *lab_dfn
|
||||
|
||||
pine64:
|
||||
variables:
|
||||
ROLE: pine64
|
||||
<<: *lab_dfn
|
||||
# pine64 has a hardware failure 30-Nov-24
|
||||
#pine64:
|
||||
# variables:
|
||||
# ROLE: pine64
|
||||
# <<: *lab_dfn
|
||||
|
||||
c4:
|
||||
variables:
|
||||
ROLE: c4
|
||||
<<: *lab_dfn
|
||||
# c4 needs binman supported added, so signing works
|
||||
#c4:
|
||||
# variables:
|
||||
# ROLE: c4
|
||||
# <<: *lab_dfn
|
||||
|
||||
rpi4:
|
||||
variables:
|
||||
|
||||
@@ -24,7 +24,9 @@ int arch_cpu_init(void)
|
||||
int ret;
|
||||
|
||||
#if CONFIG_IS_ENABLED(HANDOFF) && IS_ENABLED(CONFIG_USE_HOB)
|
||||
gd->arch.hob_list = handoff_get();
|
||||
struct spl_handoff *ho = gd->spl_handoff;
|
||||
|
||||
gd->arch.hob_list = ho->arch.hob_list;
|
||||
#endif
|
||||
ret = x86_cpu_reinit_f();
|
||||
|
||||
|
||||
@@ -59,7 +59,7 @@ int dram_init(void)
|
||||
#endif
|
||||
} else {
|
||||
#if CONFIG_IS_ENABLED(HANDOFF)
|
||||
struct spl_handoff *ho = handoff_get();
|
||||
struct spl_handoff *ho = gd->spl_handoff;
|
||||
|
||||
if (!ho) {
|
||||
log_debug("No SPL handoff found\n");
|
||||
@@ -82,7 +82,7 @@ phys_addr_t board_get_usable_ram_top(phys_size_t total_size)
|
||||
return gd->ram_size;
|
||||
|
||||
#if CONFIG_IS_ENABLED(HANDOFF)
|
||||
struct spl_handoff *ho = handoff_get();
|
||||
struct spl_handoff *ho = gd->spl_handoff;
|
||||
|
||||
log_debug("usable_ram_top = %lx\n", ho->arch.usable_ram_top);
|
||||
|
||||
|
||||
6
cmd/sb.c
6
cmd/sb.c
@@ -15,10 +15,8 @@ static int do_sb_handoff(struct cmd_tbl *cmdtp, int flag, int argc,
|
||||
char *const argv[])
|
||||
{
|
||||
#if CONFIG_IS_ENABLED(HANDOFF)
|
||||
struct spl_handoff *handoff = handoff_get();
|
||||
|
||||
if (handoff)
|
||||
printf("SPL handoff magic %lx\n", handoff->arch.magic);
|
||||
if (gd->spl_handoff)
|
||||
printf("SPL handoff magic %lx\n", gd->spl_handoff->arch.magic);
|
||||
else
|
||||
printf("SPL handoff info not received\n");
|
||||
|
||||
|
||||
@@ -56,6 +56,7 @@ static struct tag_name {
|
||||
{ BLOBLISTT_INTEL_VBT, "Intel Video-BIOS table" },
|
||||
{ BLOBLISTT_SMBIOS_TABLES, "SMBIOS tables for x86" },
|
||||
{ BLOBLISTT_VBOOT_CTX, "Chrome OS vboot context" },
|
||||
{ BLOBLISTT_CONTROL_FDT, "Control FDT" },
|
||||
|
||||
/* BLOBLISTT_PROJECT_AREA */
|
||||
{ BLOBLISTT_U_BOOT_SPL_HANDOFF, "SPL hand-off" },
|
||||
|
||||
@@ -305,6 +305,17 @@ static int setup_mon_len(void)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int setup_spl_handoff(void)
|
||||
{
|
||||
#if CONFIG_IS_ENABLED(HANDOFF)
|
||||
gd->spl_handoff = bloblist_find(BLOBLISTT_U_BOOT_SPL_HANDOFF,
|
||||
sizeof(struct spl_handoff));
|
||||
debug("Found SPL hand-off info %p\n", gd->spl_handoff);
|
||||
#endif
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
__weak int arch_cpu_init(void)
|
||||
{
|
||||
return 0;
|
||||
@@ -880,6 +891,7 @@ static const init_fnc_t init_sequence_f[] = {
|
||||
initf_bootstage, /* uses its own timer, so does not need DM */
|
||||
event_init,
|
||||
bloblist_maybe_init,
|
||||
setup_spl_handoff,
|
||||
#if defined(CONFIG_CONSOLE_RECORD_INIT_F)
|
||||
console_record_init,
|
||||
#endif
|
||||
|
||||
@@ -5,7 +5,6 @@
|
||||
* Copyright 2018 Google, Inc
|
||||
*/
|
||||
|
||||
#include <bloblist.h>
|
||||
#include <handoff.h>
|
||||
#include <asm/global_data.h>
|
||||
|
||||
@@ -39,14 +38,3 @@ void handoff_load_dram_banks(struct spl_handoff *ho)
|
||||
bd->bi_dram[i].size = ho->ram_bank[i].size;
|
||||
}
|
||||
}
|
||||
|
||||
struct spl_handoff *handoff_get(void)
|
||||
{
|
||||
struct spl_handoff *handoff;
|
||||
|
||||
handoff = bloblist_find(BLOBLISTT_U_BOOT_SPL_HANDOFF,
|
||||
sizeof(struct spl_handoff));
|
||||
debug("Found SPL hand-off info %p\n", handoff);
|
||||
|
||||
return handoff;
|
||||
}
|
||||
|
||||
@@ -137,10 +137,10 @@ If `OF_BOARD` is selected by Kconfig, a board-specific routine will provide the
|
||||
devicetree at runtime, for example if an earlier bootloader stage creates
|
||||
it and passes it to U-Boot.
|
||||
|
||||
If `BLOBLIST` is selected by Kconfig, the devicetree may come from a bloblist
|
||||
passed from a previous stage, if present.
|
||||
If CONFIG_OF_BLOBLIST is defined, the devicetree comes from a bloblist passed
|
||||
from a previous stage.
|
||||
|
||||
If `SANDBOX` is selected by Kconfig, then it will be read from a file on
|
||||
If CONFIG_SANDBOX is defined, then it will be read from a file on
|
||||
startup. Use the -d flag to U-Boot to specify the file to read, -D for the
|
||||
default and -T for the test devicetree, used to run sandbox unit tests.
|
||||
|
||||
|
||||
@@ -8,7 +8,6 @@
|
||||
#include <dm.h>
|
||||
#include <dt-structs.h>
|
||||
#include <errno.h>
|
||||
#include <handoff.h>
|
||||
#include <log.h>
|
||||
#include <malloc.h>
|
||||
#include <mapmem.h>
|
||||
@@ -1468,7 +1467,7 @@ static int rk3399_clk_probe(struct udevice *dev)
|
||||
init_clocks = true;
|
||||
#elif CONFIG_IS_ENABLED(HANDOFF)
|
||||
if (!(gd->flags & GD_FLG_RELOC)) {
|
||||
if (!handoff_get())
|
||||
if (!(gd->spl_handoff))
|
||||
init_clocks = true;
|
||||
}
|
||||
#endif
|
||||
|
||||
@@ -433,8 +433,6 @@ static int regulator_post_bind(struct udevice *dev)
|
||||
const char *property = "regulator-name";
|
||||
|
||||
uc_pdata = dev_get_uclass_plat(dev);
|
||||
uc_pdata->always_on = dev_read_bool(dev, "regulator-always-on");
|
||||
uc_pdata->boot_on = dev_read_bool(dev, "regulator-boot-on");
|
||||
|
||||
/* Regulator's mandatory constraint */
|
||||
uc_pdata->name = dev_read_string(dev, property);
|
||||
@@ -446,21 +444,13 @@ static int regulator_post_bind(struct udevice *dev)
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
if (!regulator_name_is_unique(dev, uc_pdata->name)) {
|
||||
debug("'%s' of dev: '%s', has nonunique value: '%s\n",
|
||||
property, dev->name, uc_pdata->name);
|
||||
return -EINVAL;
|
||||
}
|
||||
if (regulator_name_is_unique(dev, uc_pdata->name))
|
||||
return 0;
|
||||
|
||||
/*
|
||||
* In case the regulator has regulator-always-on or
|
||||
* regulator-boot-on DT property, trigger probe() to
|
||||
* configure its default state during startup.
|
||||
*/
|
||||
if (uc_pdata->always_on || uc_pdata->boot_on)
|
||||
dev_or_flags(dev, DM_FLAG_PROBE_AFTER_BIND);
|
||||
debug("'%s' of dev: '%s', has nonunique value: '%s\n",
|
||||
property, dev->name, uc_pdata->name);
|
||||
|
||||
return 0;
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static int regulator_pre_probe(struct udevice *dev)
|
||||
@@ -483,6 +473,8 @@ static int regulator_pre_probe(struct udevice *dev)
|
||||
-ENODATA);
|
||||
uc_pdata->max_uA = dev_read_u32_default(dev, "regulator-max-microamp",
|
||||
-ENODATA);
|
||||
uc_pdata->always_on = dev_read_bool(dev, "regulator-always-on");
|
||||
uc_pdata->boot_on = dev_read_bool(dev, "regulator-boot-on");
|
||||
uc_pdata->ramp_delay = dev_read_u32_default(dev, "regulator-ramp-delay",
|
||||
0);
|
||||
uc_pdata->force_off = dev_read_bool(dev, "regulator-force-boot-off");
|
||||
|
||||
@@ -167,6 +167,14 @@ config OF_INITIAL_DTB_READONLY
|
||||
If initial DTB for DT control is read-only (e.g. points to
|
||||
memory-mapped flash memory), then set this option.
|
||||
|
||||
config OF_BLOBLIST
|
||||
bool "DTB is provided by a bloblist"
|
||||
help
|
||||
Select this to read the devicetree from the bloblist. This allows
|
||||
using a bloblist to transfer the devicetree between U-Boot phases.
|
||||
The devicetree is stored in the bloblist by an early phase so that
|
||||
U-Boot can read it.
|
||||
|
||||
config OF_BOARD
|
||||
bool "Provided by the board (e.g a previous loader) at runtime"
|
||||
default y if SANDBOX || OF_HAS_PRIOR_STAGE
|
||||
|
||||
@@ -400,6 +400,12 @@ struct global_data {
|
||||
*/
|
||||
struct bloblist_hdr *bloblist;
|
||||
#endif
|
||||
#if CONFIG_IS_ENABLED(HANDOFF)
|
||||
/**
|
||||
* @spl_handoff: SPL hand-off information
|
||||
*/
|
||||
struct spl_handoff *spl_handoff;
|
||||
#endif
|
||||
#if defined(CONFIG_TRANSLATION_OFFSET)
|
||||
/**
|
||||
* @translation_offset: optional translation offset
|
||||
|
||||
@@ -1191,8 +1191,7 @@ int fdtdec_resetup(int *rescan);
|
||||
*
|
||||
* The existing devicetree is available at gd->fdt_blob
|
||||
*
|
||||
* @err: 0 on success, -EEXIST if the devicetree is already correct, or other
|
||||
* internal error code if we fail to setup a DTB
|
||||
* @err internal error code if we fail to setup a DTB
|
||||
* @returns new devicetree blob pointer
|
||||
*/
|
||||
void *board_fdt_blob_setup(int *err);
|
||||
|
||||
@@ -31,13 +31,6 @@ void handoff_save_dram(struct spl_handoff *ho);
|
||||
void handoff_load_dram_size(struct spl_handoff *ho);
|
||||
void handoff_load_dram_banks(struct spl_handoff *ho);
|
||||
|
||||
/**
|
||||
* handoff_get() - Get the SPL handoff information
|
||||
*
|
||||
* Return: Pointer to SPL handoff if received, else NULL
|
||||
*/
|
||||
struct spl_handoff *handoff_get(void);
|
||||
|
||||
/**
|
||||
* handoff_arch_save() - Save arch-specific info into the handoff area
|
||||
*
|
||||
|
||||
@@ -137,7 +137,6 @@ int binman_init(void)
|
||||
{
|
||||
int ret;
|
||||
|
||||
return 0;
|
||||
binman = malloc(sizeof(struct binman_info));
|
||||
if (!binman)
|
||||
return log_msg_ret("space for binman", -ENOMEM);
|
||||
|
||||
53
lib/fdtdec.c
53
lib/fdtdec.c
@@ -1666,35 +1666,23 @@ static void setup_multi_dtb_fit(void)
|
||||
|
||||
int fdtdec_setup(void)
|
||||
{
|
||||
int ret = -ENOENT;
|
||||
int ret;
|
||||
|
||||
/*
|
||||
* If allowing a bloblist, check that first. There was discussion about
|
||||
* adding an OF_BLOBLIST Kconfig, but this was rejected.
|
||||
*
|
||||
* The necessary test is whether the previous phase passed a bloblist,
|
||||
* not whether this phase creates one.
|
||||
*/
|
||||
if (CONFIG_IS_ENABLED(BLOBLIST) &&
|
||||
(xpl_prev_phase() != PHASE_TPL ||
|
||||
!IS_ENABLED(CONFIG_TPL_BLOBLIST))) {
|
||||
/* The devicetree is typically appended to U-Boot */
|
||||
if (CONFIG_IS_ENABLED(OF_BLOBLIST)) {
|
||||
ret = bloblist_maybe_init();
|
||||
if (!ret) {
|
||||
gd->fdt_blob = bloblist_find(BLOBLISTT_CONTROL_FDT, 0);
|
||||
if (gd->fdt_blob) {
|
||||
gd->fdt_src = FDTSRC_BLOBLIST;
|
||||
log_debug("Devicetree is in bloblist at %p\n",
|
||||
gd->fdt_blob);
|
||||
ret = 0;
|
||||
} else {
|
||||
log_debug("No FDT found in bloblist\n");
|
||||
ret = -ENOENT;
|
||||
}
|
||||
if (ret)
|
||||
return ret;
|
||||
gd->fdt_blob = bloblist_find(BLOBLISTT_CONTROL_FDT, 0);
|
||||
if (!gd->fdt_blob) {
|
||||
printf("Not FDT found in bloblist\n");
|
||||
bloblist_show_list();
|
||||
return -ENOENT;
|
||||
}
|
||||
}
|
||||
|
||||
/* Otherwise, the devicetree is typically appended to U-Boot */
|
||||
if (ret) {
|
||||
gd->fdt_src = FDTSRC_BLOBLIST;
|
||||
bloblist_show_list();
|
||||
log_debug("Devicetree is in bloblist at %p\n", gd->fdt_blob);
|
||||
} else {
|
||||
if (IS_ENABLED(CONFIG_OF_SEPARATE)) {
|
||||
gd->fdt_blob = fdt_find_separate();
|
||||
gd->fdt_src = FDTSRC_SEPARATE;
|
||||
@@ -1702,15 +1690,14 @@ int fdtdec_setup(void)
|
||||
gd->fdt_blob = dtb_dt_embedded();
|
||||
gd->fdt_src = FDTSRC_EMBED;
|
||||
}
|
||||
}
|
||||
|
||||
/* Allow the board to override the fdt address. */
|
||||
if (IS_ENABLED(CONFIG_OF_BOARD)) {
|
||||
gd->fdt_blob = board_fdt_blob_setup(&ret);
|
||||
if (!ret)
|
||||
/* Allow the board to override the fdt address. */
|
||||
if (IS_ENABLED(CONFIG_OF_BOARD)) {
|
||||
gd->fdt_blob = board_fdt_blob_setup(&ret);
|
||||
if (ret)
|
||||
return ret;
|
||||
gd->fdt_src = FDTSRC_BOARD;
|
||||
else if (ret != -EEXIST)
|
||||
return ret;
|
||||
}
|
||||
}
|
||||
|
||||
/* Allow the early environment to override the fdt address */
|
||||
|
||||
@@ -186,7 +186,8 @@ int dm_test_power_regulator_set_enable_if_allowed(struct unit_test_state *uts)
|
||||
|
||||
/* Get BUCK1 - always on regulator */
|
||||
platname = regulator_names[BUCK1][PLATNAME];
|
||||
ut_asserteq(-EALREADY, regulator_autoset_by_name(platname, &dev_autoset));
|
||||
ut_asserteq(-EALREADY,
|
||||
regulator_autoset_by_name(platname, &dev_autoset));
|
||||
ut_assertok(regulator_get_by_platname(platname, &dev));
|
||||
|
||||
/* Try disabling always-on regulator */
|
||||
@@ -288,7 +289,8 @@ static int dm_test_power_regulator_autoset(struct unit_test_state *uts)
|
||||
* Expected output state: uV=1200000; uA=200000; output enabled
|
||||
*/
|
||||
platname = regulator_names[BUCK1][PLATNAME];
|
||||
ut_asserteq(-EALREADY, regulator_autoset_by_name(platname, &dev_autoset));
|
||||
ut_asserteq(-EALREADY,
|
||||
regulator_autoset_by_name(platname, &dev_autoset));
|
||||
|
||||
/* Check, that the returned device is proper */
|
||||
ut_assertok(regulator_get_by_platname(platname, &dev));
|
||||
|
||||
Reference in New Issue
Block a user