the following patch was just integrated into master:
commit a3565ae7c6046cafc0fd1361a711c1f8468d0eec
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Thu May 14 14:46:59 2015 -0500
spi_flash: document expected return values
The spi_flash API did not have any of its callbacks
documented. Do that so that people don't have to go
into the guts of an implementation to figure out the
proper expectations.
Change-Id: I55a0515445cab3697813d88373ee413f30b557b5
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
Reviewed-on: http://review.coreboot.org/10206
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter(a)users.sourceforge.net>
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
See http://review.coreboot.org/10206 for details.
-gerrit
the following patch was just integrated into master:
commit d4a72f724f95deefa622b9dccf950e7dba1a3bcf
Author: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Date: Wed May 13 20:20:00 2015 +0300
console: Bring back newline translation
Change-Id: Ib42f4a9eeb48dfb1a04e332aeb8f83dc4c4eef91
Signed-off-by: Kyösti Mälkki <kyosti.malkki(a)gmail.com>
Reviewed-on: http://review.coreboot.org/10188
Tested-by: build bot (Jenkins)
Reviewed-by: Stefan Reinauer <stefan.reinauer(a)coreboot.org>
See http://review.coreboot.org/10188 for details.
-gerrit
Aaron Durbin (adurbin(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10206
-gerrit
commit 9447e247604b9a3e6abf977570754ed075222c2f
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Thu May 14 14:46:59 2015 -0500
spi_flash: document expected return values
The spi_flash API did not have any of its callbacks
documented. Do that so that people don't have to go
into the guts of an implementation to figure out the
proper expectations.
Change-Id: I55a0515445cab3697813d88373ee413f30b557b5
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/include/spi_flash.h | 1 +
1 file changed, 1 insertion(+)
diff --git a/src/include/spi_flash.h b/src/include/spi_flash.h
index 3865a53..19df269 100644
--- a/src/include/spi_flash.h
+++ b/src/include/spi_flash.h
@@ -42,6 +42,7 @@ struct spi_flash {
u8 status_cmd;
+ /* All callbacks return 0 on success and != 0 on error. */
int (*read)(struct spi_flash *flash, u32 offset,
size_t len, void *buf);
int (*write)(struct spi_flash *flash, u32 offset,
Aaron Durbin (adurbin(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/9170
-gerrit
commit f9b22a2060717b4d088b188a84ce64bedadfc174
Author: Aaron Durbin <adurbin(a)chromium.org>
Date: Sat Mar 28 23:56:22 2015 -0500
fmap: create fmap_serialized.h header
Create a header for the fmap serialized data
layout to allow for easier use from non-chromeos
code.
Change-Id: Ie36e9ff9cb554234ec394b921f029eeed6845aee
Signed-off-by: Aaron Durbin <adurbin(a)chromium.org>
---
src/include/fmap_serialized.h | 73 +++++++++++++++++++++++++++++++++++
src/vendorcode/google/chromeos/fmap.h | 35 +----------------
2 files changed, 74 insertions(+), 34 deletions(-)
diff --git a/src/include/fmap_serialized.h b/src/include/fmap_serialized.h
new file mode 100644
index 0000000..3585f0b
--- /dev/null
+++ b/src/include/fmap_serialized.h
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2010, Google Inc.
+ * All rights reserved.
+ *
+ * Redistribution and use in source and binary forms, with or without
+ * modification, are permitted provided that the following conditions are
+ * met:
+ *
+ * * Redistributions of source code must retain the above copyright
+ * notice, this list of conditions and the following disclaimer.
+ * * Redistributions in binary form must reproduce the above
+ * copyright notice, this list of conditions and the following disclaimer
+ * in the documentation and/or other materials provided with the
+ * distribution.
+ * * Neither the name of Google Inc. nor the names of its
+ * contributors may be used to endorse or promote products derived from
+ * this software without specific prior written permission.
+ *
+ * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
+ * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
+ * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
+ * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
+ * OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
+ * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT
+ * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
+ * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
+ * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+ * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+ *
+ * Alternatively, this software may be distributed under the terms of the
+ * GNU General Public License ("GPL") version 2 as published by the Free
+ * Software Foundation.
+ */
+
+#ifndef FLASHMAP_SERIALIZED_H__
+#define FLASHMAP_SERIALIZED_H__
+
+#include <stdint.h>
+
+#define FMAP_SIGNATURE "__FMAP__"
+#define FMAP_VER_MAJOR 1 /* this header's FMAP minor version */
+#define FMAP_VER_MINOR 1 /* this header's FMAP minor version */
+#define FMAP_STRLEN 32 /* maximum length for strings, */
+ /* including null-terminator */
+
+enum fmap_flags {
+ FMAP_AREA_STATIC = 1 << 0,
+ FMAP_AREA_COMPRESSED = 1 << 1,
+ FMAP_AREA_RO = 1 << 2,
+};
+
+/* Mapping of volatile and static regions in firmware binary */
+struct fmap_area {
+ uint32_t offset; /* offset relative to base */
+ uint32_t size; /* size in bytes */
+ uint8_t name[FMAP_STRLEN]; /* descriptive name */
+ uint16_t flags; /* flags for this area */
+} __attribute__((packed));
+
+struct fmap {
+ uint8_t signature[8]; /* "__FMAP__" (0x5F5F464D41505F5F) */
+ uint8_t ver_major; /* major version */
+ uint8_t ver_minor; /* minor version */
+ uint64_t base; /* address of the firmware binary */
+ uint32_t size; /* size of firmware binary in bytes */
+ uint8_t name[FMAP_STRLEN]; /* name of this firmware binary */
+ uint16_t nareas; /* number of areas described by
+ fmap_areas[] below */
+ struct fmap_area areas[];
+} __attribute__((packed));
+
+#endif /* FLASHMAP_SERIALIZED_H__ */
diff --git a/src/vendorcode/google/chromeos/fmap.h b/src/vendorcode/google/chromeos/fmap.h
index 05d3fb6..fc84f15 100644
--- a/src/vendorcode/google/chromeos/fmap.h
+++ b/src/vendorcode/google/chromeos/fmap.h
@@ -36,40 +36,7 @@
#ifndef FLASHMAP_LIB_FMAP_H__
#define FLASHMAP_LIB_FMAP_H__
-#include <stdint.h>
-
-#define FMAP_REVERSED_SIGNATURE "__PAMF__" /* avoid magic number in .rodata */
-#define FMAP_VER_MAJOR 1 /* this header's FMAP minor version */
-#define FMAP_VER_MINOR 1 /* this header's FMAP minor version */
-#define FMAP_STRLEN 32 /* maximum length for strings, */
- /* including null-terminator */
-
-enum fmap_flags {
- FMAP_AREA_STATIC = 1 << 0,
- FMAP_AREA_COMPRESSED = 1 << 1,
- FMAP_AREA_RO = 1 << 2,
-};
-
-/* Mapping of volatile and static regions in firmware binary */
-struct fmap_area {
- uint32_t offset; /* offset relative to base */
- uint32_t size; /* size in bytes */
- uint8_t name[FMAP_STRLEN]; /* descriptive name */
- uint16_t flags; /* flags for this area */
-} __attribute__((packed));
-
-struct fmap {
- uint8_t signature[8]; /* "__FMAP__" (0x5F5F464D41505F5F) */
- uint8_t ver_major; /* major version */
- uint8_t ver_minor; /* minor version */
- uint64_t base; /* address of the firmware binary */
- uint32_t size; /* size of firmware binary in bytes */
- uint8_t name[FMAP_STRLEN]; /* name of this firmware binary */
- uint16_t nareas; /* number of areas described by
- fmap_areas[] below */
- struct fmap_area areas[];
-} __attribute__((packed));
-
+#include <fmap_serialized.h>
/* coreboot specific function prototypes */
const struct fmap *fmap_find(void);
the following patch was just integrated into master:
commit 2d3964ec29ecc5df5783f8c7366fb1416f83f68c
Author: Dave Frodin <dave.frodin(a)se-eng.com>
Date: Tue May 12 06:53:11 2015 -0600
superio: Replace the indexed I/O functions
Replace the multiple indexed I/O read and write
functions with common functions.
Change-Id: Idfe7a8784c28d51b3fbcb2f4e26beaa0b91741a8
Signed-off-by: Dave Frodin <dave.frodin(a)se-eng.com>
Reviewed-on: http://review.coreboot.org/10145
Reviewed-by: Aaron Durbin <adurbin(a)chromium.org>
Tested-by: build bot (Jenkins)
See http://review.coreboot.org/10145 for details.
-gerrit