Patchwork [carFl,mem] Reduce memory buffers v2

Submitter Tadas Slotkus
Date 2011-08-22 17:09:39
Message ID <1314032979.2850.68.camel@ts-laptop>
Download mbox | patch
Permalink /patch/3389/
State Bitrotted
Headers show


Tadas Slotkus - 2011-08-22 17:09:39
Hi all,

Sending version two of patches, which reduce memory usage for flashrom
in coreboot and deals with globals. 1-9 patches are the same as I sent
before (two header lines have changed automatically in each patchfile).

Now you may look at all patches. It should work with internal and dummy
programmers in normal OS. To work in coreboot ramstage/romstage requires
a lot of cleanups and workarounds as much features used in the code
aren't there supported (unless you are running it as a payload). Any
comments are apreciated.



From 64d62f5afb973d42cfdbe8d35f0b11885e525ef9 Mon Sep 17 00:00:00 2001
From: Tadas Slotkus <>
Date: Mon, 22 Aug 2011 16:29:37 +0300
Subject: [carFl mem 65/65] Kill exit() in enable_flash_ich_dc

Replace it by newly created return mechanism.

This patch is proposed for mainline:

Signed-off-by: Tadas Slotkus <>
 chipset_enable.c |    7 +++----
 1 files changed, 3 insertions(+), 4 deletions(-)

diff --git a/chipset_enable.c b/chipset_enable.c
index b00dd14..b461061 100644
--- a/chipset_enable.c
+++ b/chipset_enable.c
@@ -342,10 +342,7 @@  static int enable_flash_ich_dc(globals *g, struct pci_dev *dev, const char *name
 		msg_perr("Error: fwh_idsel= specified, but no value given.\n");
-		/* FIXME: Return failure here once internal_init() starts
-		 * to care about the return value of the chipset enable.
-		 */
-		exit(1);
+		return ERROR_FATAL;
@@ -467,6 +464,8 @@  static int enable_flash_ich_dc_spi(globals *g, struct pci_dev *dev, const char *
 	/* Enable Flash Writes */
 	ret = enable_flash_ich_dc(g, dev, name);
+	if (ret == ERROR_FATAL)
+		return ret;
 	/* Get physical address of Root Complex Register Block */
 	tmp = pci_read_long(dev, 0xf0) & 0xffffc000;