Jacob Garber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33049
Change subject: drivers/intel/fsp1_1: Exit cleanly if FSP not found
......................................................................
drivers/intel/fsp1_1: Exit cleanly if FSP not found
Instead of dereferencing a null pointer, print a nice message and exit
cleanly if the FSP isn't found in the CBFS.
Change-Id: I761e7febc7cec5bd2ef3af214bc51777ee5c313d
Signed-off-by: Jacob Garber <jgarber1(a)ualberta.ca>
Found-by: Coverity CID 1401467
---
M src/drivers/intel/fsp1_1/car.c
1 file changed, 6 insertions(+), 9 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/49/33049/1
diff --git a/src/drivers/intel/fsp1_1/car.c b/src/drivers/intel/fsp1_1/car.c
index 34b2518..194406b 100644
--- a/src/drivers/intel/fsp1_1/car.c
+++ b/src/drivers/intel/fsp1_1/car.c
@@ -159,19 +159,16 @@
{
/* Need to locate the current FSP_INFO_HEADER. The cache-as-ram
* is still enabled. We can directly access work buffer here. */
- FSP_INFO_HEADER *fih;
struct prog fsp = PROG_INIT(PROG_REFCODE, "fsp.bin");
console_init();
- if (prog_locate(&fsp)) {
- fih = NULL;
- printk(BIOS_ERR, "Unable to locate %s\n", prog_name(&fsp));
- } else {
- /* This leaks a mapping which this code assumes is benign as
- * the flash is memory mapped CPU's address space. */
- fih = find_fsp((uintptr_t)rdev_mmap_full(prog_rdev(&fsp)));
- }
+ if (prog_locate(&fsp))
+ die_with_post_code(POST_INVALID_CBFS, "Unable to locate fsp.bin");
+
+ /* This leaks a mapping which this code assumes is benign as
+ * the flash is memory mapped CPU's address space. */
+ FSP_INFO_HEADER *fih = find_fsp((uintptr_t)rdev_mmap_full(prog_rdev(&fsp)));
cache_as_ram_stage_main(fih);
--
To view, visit https://review.coreboot.org/c/coreboot/+/33049
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I761e7febc7cec5bd2ef3af214bc51777ee5c313d
Gerrit-Change-Number: 33049
Gerrit-PatchSet: 1
Gerrit-Owner: Jacob Garber <jgarber1(a)ualberta.ca>
Gerrit-MessageType: newchange
Jacob Garber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33134
Change subject: mb/sifive/hifive-unleashed: Check for errors in fixup_fdt
......................................................................
mb/sifive/hifive-unleashed: Check for errors in fixup_fdt
It is possible that cbfs_boot_map_with_leak() and malloc() could fail,
so detect those conditions and print error messages if they do.
Change-Id: I34951da0b73028c4c89446cb1779a72422997325
Signed-off-by: Jacob Garber <jgarber1(a)ualberta.ca>
Found-by: Coverity CID 1399147
---
M src/mainboard/sifive/hifive-unleashed/fixup_fdt.c
1 file changed, 11 insertions(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/34/33134/1
diff --git a/src/mainboard/sifive/hifive-unleashed/fixup_fdt.c b/src/mainboard/sifive/hifive-unleashed/fixup_fdt.c
index ea58e02..6c42fc8 100644
--- a/src/mainboard/sifive/hifive-unleashed/fixup_fdt.c
+++ b/src/mainboard/sifive/hifive-unleashed/fixup_fdt.c
@@ -86,6 +86,11 @@
/* load flat dt from cbfs */
fdt_rom = cbfs_boot_map_with_leak("fallback/DTB", CBFS_TYPE_RAW, NULL);
+ if (fdt_rom == NULL) {
+ printk(BIOS_ERR, "Unable to load fallback/DTB from CBFS\n");
+ return;
+ }
+
/* Expand DT into a tree */
tree = fdt_unflatten(fdt_rom);
@@ -95,6 +100,12 @@
/* convert the tree to a flat dt */
void *dt = malloc(dt_flat_size(tree));
+
+ if (dt == NULL) {
+ printk(BIOS_ERR, "Unable to allocate memory for flat device tree\n");
+ return;
+ }
+
dt_flatten(tree, dt);
/* update HLS */
--
To view, visit https://review.coreboot.org/c/coreboot/+/33134
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I34951da0b73028c4c89446cb1779a72422997325
Gerrit-Change-Number: 33134
Gerrit-PatchSet: 1
Gerrit-Owner: Jacob Garber <jgarber1(a)ualberta.ca>
Gerrit-MessageType: newchange
Jacob Garber has uploaded this change for review. ( https://review.coreboot.org/c/coreboot/+/33156
Change subject: mb/google/poppy/variants/nami: Add fallthrough comment
......................................................................
mb/google/poppy/variants/nami: Add fallthrough comment
This fallthrough is intentional (see commit 2257a35862 - Perform PL2
setting for syndra), so add a comment to make that explicit.
Change-Id: I57fe1e08f59aed12544cd2a71f1e0464f432f03b
Signed-off-by: Jacob Garber <jgarber1(a)ualberta.ca>
Found-by: Coverity CID 1397063
---
M src/mainboard/google/poppy/variants/nami/mainboard.c
1 file changed, 1 insertion(+), 0 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/56/33156/1
diff --git a/src/mainboard/google/poppy/variants/nami/mainboard.c b/src/mainboard/google/poppy/variants/nami/mainboard.c
index cc87136..2387017 100644
--- a/src/mainboard/google/poppy/variants/nami/mainboard.c
+++ b/src/mainboard/google/poppy/variants/nami/mainboard.c
@@ -252,6 +252,7 @@
case SKU_6_SYNDRA:
case SKU_7_SYNDRA:
pl2_id = PL2_ID_SONA_SYNDRA;
+ /* fallthrough */
case SKU_0_VAYNE:
case SKU_1_VAYNE:
case SKU_2_VAYNE:
--
To view, visit https://review.coreboot.org/c/coreboot/+/33156
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I57fe1e08f59aed12544cd2a71f1e0464f432f03b
Gerrit-Change-Number: 33156
Gerrit-PatchSet: 1
Gerrit-Owner: Jacob Garber <jgarber1(a)ualberta.ca>
Gerrit-MessageType: newchange
Hello Julius Werner, Angel Pons, Arthur Heymans,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/33127
to review the following change.
Change subject: nb/intel/haswell/gma: Drop NGI remnant
......................................................................
nb/intel/haswell/gma: Drop NGI remnant
The native graphics init option was replaced with libgfxinit.
Change-Id: I62569b70186b7b068effdadc4b39b3c09ddb7188
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
---
M src/northbridge/intel/haswell/gma.c
1 file changed, 0 insertions(+), 8 deletions(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/27/33127/1
diff --git a/src/northbridge/intel/haswell/gma.c b/src/northbridge/intel/haswell/gma.c
index 607fab7..ca446e2 100644
--- a/src/northbridge/intel/haswell/gma.c
+++ b/src/northbridge/intel/haswell/gma.c
@@ -236,14 +236,6 @@
{
gtt_write(HSW_PWR_WELL_CTL1, HSW_PWR_WELL_ENABLE);
gtt_poll(HSW_PWR_WELL_CTL1, HSW_PWR_WELL_STATE, HSW_PWR_WELL_STATE);
-
- /* In the native graphics case, we've got about 20 ms.
- * after we power up the AUX channel until we can talk to it.
- * So get that going right now. We can't turn on the panel, yet, just VDD.
- */
- if (CONFIG(MAINBOARD_DO_NATIVE_VGA_INIT)) {
- gtt_write(PCH_PP_CONTROL, PCH_PP_UNLOCK| EDP_FORCE_VDD | PANEL_POWER_RESET);
- }
}
static void gma_pm_init_pre_vbios(struct device *dev)
--
To view, visit https://review.coreboot.org/c/coreboot/+/33127
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I62569b70186b7b068effdadc4b39b3c09ddb7188
Gerrit-Change-Number: 33127
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-MessageType: newchange
Hello Julius Werner, Angel Pons, Arthur Heymans,
I'd like you to do a code review. Please visit
https://review.coreboot.org/c/coreboot/+/33126
to review the following change.
Change subject: nb/intel/snb: Don't run VGA oprom when libgfxinit is enabled
......................................................................
nb/intel/snb: Don't run VGA oprom when libgfxinit is enabled
This was likely an oversight when libgfxinit got its own Kconfig
symbols.
Change-Id: I647551719b332b5b734720ae4ee0619bbfcbed8c
Signed-off-by: Nico Huber <nico.h(a)gmx.de>
---
M src/northbridge/intel/sandybridge/gma.c
1 file changed, 1 insertion(+), 1 deletion(-)
git pull ssh://review.coreboot.org:29418/coreboot refs/changes/26/33126/1
diff --git a/src/northbridge/intel/sandybridge/gma.c b/src/northbridge/intel/sandybridge/gma.c
index 1005288..19df8d4 100644
--- a/src/northbridge/intel/sandybridge/gma.c
+++ b/src/northbridge/intel/sandybridge/gma.c
@@ -626,7 +626,7 @@
/* Init graphics power management */
gma_pm_init_pre_vbios(dev);
- if (!CONFIG(MAINBOARD_DO_NATIVE_VGA_INIT))
+ if (!CONFIG(MAINBOARD_USE_LIBGFXINIT))
/* PCI Init, will run VBIOS */
pci_dev_init(dev);
--
To view, visit https://review.coreboot.org/c/coreboot/+/33126
To unsubscribe, or for help writing mail filters, visit https://review.coreboot.org/settings
Gerrit-Project: coreboot
Gerrit-Branch: master
Gerrit-Change-Id: I647551719b332b5b734720ae4ee0619bbfcbed8c
Gerrit-Change-Number: 33126
Gerrit-PatchSet: 1
Gerrit-Owner: Nico Huber <nico.h(a)gmx.de>
Gerrit-Reviewer: Angel Pons <th3fanbus(a)gmail.com>
Gerrit-Reviewer: Arthur Heymans <arthur(a)aheymans.xyz>
Gerrit-Reviewer: Julius Werner <jwerner(a)chromium.org>
Gerrit-MessageType: newchange