Sol Boucher (solb(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10132
-gerrit
commit 0ed528ee525b479430bf87ed879f25f8449c377a
Author: Sol Boucher <solb(a)chromium.org>
Date: Tue May 5 18:25:18 2015 -0700
cbfstool: Simplify the common buffer_splice() function's interface
Previously, this function allowed one to pass a size of 0 in order to
indicate that the entire buffer should be copied. However, the
semantics of calling it this way were non-obvious: The desired
behavior was clear when the offset was also 0, but what was the
expected outcome when the offset was nonzero, since carrying over the
original size in this case would be an error? In fact, it turns out
that it always ignored the provided offset when the size was zero.
This commit eliminates all special handling of 0; thus, the resulting
buffer is exactly as large as requested, even if it's degenerate.
Since the only consumer that actually called the function with a size
of 0 was buffer_clone(), no other files required changes.
Change-Id: I1baa5dbaa7ba5bd746e8b1e08816335183bd5d2d
Signed-off-by: Sol Boucher <solb(a)chromium.org>
---
util/cbfstool/common.h | 14 +++++---------
1 file changed, 5 insertions(+), 9 deletions(-)
diff --git a/util/cbfstool/common.h b/util/cbfstool/common.h
index f364ea1..78ec40a 100644
--- a/util/cbfstool/common.h
+++ b/util/cbfstool/common.h
@@ -86,23 +86,19 @@ static inline void buffer_init(struct buffer *b, char *name, void *data,
b->size = size;
}
-/* Splice a buffer into another buffer. If size is zero the entire buffer
- * is spliced while if size is non-zero the buffer is spliced starting at
- * offset for size bytes. Note that it's up to caller to bounds check.
- */
+/* Splice a buffer into another buffer. Note that it's up to the caller to
+ * bounds check the offset and size. */
static inline void buffer_splice(struct buffer *dest, const struct buffer *src,
size_t offset, size_t size)
{
buffer_init(dest, src->name, src->data, src->size);
- if (size != 0) {
- dest->data += offset;
- buffer_set_size(dest, size);
- }
+ dest->data += offset;
+ buffer_set_size(dest, size);
}
static inline void buffer_clone(struct buffer *dest, const struct buffer *src)
{
- buffer_splice(dest, src, 0, 0);
+ buffer_splice(dest, src, 0, src->size);
}
static inline void buffer_seek(struct buffer *b, size_t size)
Sol Boucher (solb(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10131
-gerrit
commit 22d3d0cad4c3c790782bb7ca1b77f4cbd6b1eeed
Author: Sol Boucher <solb(a)chromium.org>
Date: Tue May 5 20:35:26 2015 -0700
cbfstool: Eliminate useless cbfs_image_create() local variable
The only operation performed on this struct turned out to be sizeof...
Change-Id: I619db60ed2e7ef6c196dd2600dc83bad2fdc6a55
Signed-off-by: Sol Boucher <solb(a)chromium.org>
---
util/cbfstool/cbfs_image.c | 9 ++++-----
1 file changed, 4 insertions(+), 5 deletions(-)
diff --git a/util/cbfstool/cbfs_image.c b/util/cbfstool/cbfs_image.c
index 3df291a..16dc3dc 100644
--- a/util/cbfstool/cbfs_image.c
+++ b/util/cbfstool/cbfs_image.c
@@ -191,7 +191,6 @@ int cbfs_image_create(struct cbfs_image *image,
uint32_t header_offset,
uint32_t entries_offset)
{
- struct cbfs_header header;
struct cbfs_file *entry;
int32_t *rel_offset;
uint32_t cbfs_len;
@@ -200,8 +199,8 @@ int cbfs_image_create(struct cbfs_image *image,
DEBUG("cbfs_image_create: bootblock=0x%x+0x%zx, "
"header=0x%x+0x%zx, entries_offset=0x%x\n",
- bootblock_offset, bootblock->size,
- header_offset, sizeof(header), entries_offset);
+ bootblock_offset, bootblock->size, header_offset,
+ sizeof(image->header), entries_offset);
// This attribute must be given in order to prove that this module
// correctly preserves certain CBFS properties. See the block comment
@@ -245,9 +244,9 @@ int cbfs_image_create(struct cbfs_image *image,
bootblock->size);
// Prepare header
- if (header_offset + sizeof(header) > size - sizeof(int32_t)) {
+ if (header_offset + sizeof(image->header) > size - sizeof(int32_t)) {
ERROR("Header (0x%x+0x%zx) exceed ROM size (0x%zx)\n",
- header_offset, sizeof(header), size);
+ header_offset, sizeof(image->header), size);
return -1;
}
image->header.magic = CBFS_HEADER_MAGIC;
the following patch was just integrated into master:
commit b2aee6f2e7c61ae87ddfdab00c22775313603981
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Tue May 5 22:47:00 2015 +0200
vboot2: Replace hard coded 'fallback' prefix with Kconfig variable
Change-Id: I9cbdf06f4d0956b5374915f8af7501c6f75b4687
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Reviewed-on: http://review.coreboot.org/10113
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi(a)google.com>
See http://review.coreboot.org/10113 for details.
-gerrit
the following patch was just integrated into master:
commit b4a6ca96c01e1312784a4c9b6961697e846b7b00
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Thu Apr 30 11:38:13 2015 +0200
imgtec/pistachio: Add comment on the unusual memory layout
To avoid having to dig up the constraints again, document
the memory layout right in memlayout.ld.
Change-Id: I298cc880ae462f5b197ab2f64beb2f0e0d9f5a7d
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
Reviewed-on: http://review.coreboot.org/10039
Tested-by: build bot (Jenkins)
Reviewed-by: Patrick Georgi <pgeorgi(a)google.com>
See http://review.coreboot.org/10039 for details.
-gerrit
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10039
-gerrit
commit c6cc20cad3eac18a6f968906a975b11afcb66f94
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Thu Apr 30 11:38:13 2015 +0200
imgtec/pistachio: Add comment on the unusual memory layout
To avoid having to dig up the constraints again, document
the memory layout right in memlayout.ld.
Change-Id: I298cc880ae462f5b197ab2f64beb2f0e0d9f5a7d
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
---
src/soc/imgtec/pistachio/include/soc/memlayout.ld | 5 ++++-
1 file changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/soc/imgtec/pistachio/include/soc/memlayout.ld b/src/soc/imgtec/pistachio/include/soc/memlayout.ld
index e9f6c59..bc67447 100644
--- a/src/soc/imgtec/pistachio/include/soc/memlayout.ld
+++ b/src/soc/imgtec/pistachio/include/soc/memlayout.ld
@@ -42,7 +42,10 @@ SECTIONS
PRERAM_CBFS_CACHE(0x1a00e000, 72K)
SRAM_END(0x1a020000)
- /* Bootblock executes out of KSEG0 and sets up the identity mapping. */
+ /* Bootblock executes out of KSEG0 and sets up the identity mapping.
+ * This is identical to SRAM above, and thus also limited 64K and
+ * needs to avoid conflicts with items set up above.
+ */
BOOTBLOCK(0x9a000000, 20K)
/*
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10129
-gerrit
commit e615e795fe9ed4d03ada89677c58748161196ee1
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Thu May 7 12:30:06 2015 +0200
secmon: Add some missing files
secmon is referring to uart's default_baudrate() and
various coreboot version strings.
Change-Id: I40a8d1979146058409a814d94ea24de83ee4d634
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
---
src/drivers/uart/Makefile.inc | 1 +
src/lib/Makefile.inc | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/drivers/uart/Makefile.inc b/src/drivers/uart/Makefile.inc
index c4feb9a..cdd5fd5 100644
--- a/src/drivers/uart/Makefile.inc
+++ b/src/drivers/uart/Makefile.inc
@@ -1,6 +1,7 @@
romstage-y += util.c
ramstage-y += util.c
bootblock-y += util.c
+secmon-y += util.c
smm-$(CONFIG_DEBUG_SMI) += util.c
# Add the driver, only one can be enabled. The driver files may
diff --git a/src/lib/Makefile.inc b/src/lib/Makefile.inc
index ef4e2aa..1d0851f 100644
--- a/src/lib/Makefile.inc
+++ b/src/lib/Makefile.inc
@@ -139,6 +139,7 @@ bootblock-y += version.c
romstage-y += version.c
ramstage-y += version.c
smm-y += version.c
+secmon-y += version.c
$(obj)/lib/version.bootblock.o : $(obj)/build.h
$(obj)/lib/version.romstage.o : $(obj)/build.h
Patrick Georgi (pgeorgi(a)google.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/10128
-gerrit
commit 7aeb5f574668c0a4be746ba0aa2e766acad7a804
Author: Patrick Georgi <pgeorgi(a)chromium.org>
Date: Thu May 7 12:29:13 2015 +0200
nvidia/tegra132: we write tables in ramstage
So that's more precise than "anything non-pre-ram".
Change-Id: I21db536a5ea704c4b087f57d0b761dd3fdf43e3e
Signed-off-by: Patrick Georgi <pgeorgi(a)chromium.org>
---
src/soc/nvidia/tegra132/uart.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/soc/nvidia/tegra132/uart.c b/src/soc/nvidia/tegra132/uart.c
index 386eaf9..2055c46 100644
--- a/src/soc/nvidia/tegra132/uart.c
+++ b/src/soc/nvidia/tegra132/uart.c
@@ -146,7 +146,7 @@ void uart_tx_flush(int idx)
tegra132_uart_tx_flush(uart_ptr);
}
-#ifndef __PRE_RAM__
+#if ENV_RAMSTAGE
void uart_fill_lb(void *data)
{
struct lb_serial serial;