Aaron Durbin (adurbin(a)chromium.org) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/12785
-gerrit
commit eb4cdf5ecd4d4654485d2bf3447e12956d5956ff
Author: Patrick Georgi <pgeorgi(a)google.com>
Date: Tue Dec 15 10:09:55 2015 +0100
cbfs: Add type ids for empty files
We will soon need to handle empty files.
BUG=chromium:445938
BRANCH=tot
TEST=none
Change-Id: Ia72a4bff7d9bb36f6a6648c3dd89e86593d80761
Signed-off-by: Patrick Georgi <pgeorgi(a)google.com>
---
src/commonlib/include/commonlib/cbfs_serialized.h | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
diff --git a/src/commonlib/include/commonlib/cbfs_serialized.h b/src/commonlib/include/commonlib/cbfs_serialized.h
index edef551..679ff07 100644
--- a/src/commonlib/include/commonlib/cbfs_serialized.h
+++ b/src/commonlib/include/commonlib/cbfs_serialized.h
@@ -62,6 +62,8 @@
Users are welcome to use any other value for their
components */
+#define CBFS_TYPE_DELETED 0x00000000
+#define CBFS_TYPE_DELETED2 0xffffffff
#define CBFS_TYPE_STAGE 0x10
#define CBFS_TYPE_PAYLOAD 0x20
#define CBFS_TYPE_OPTIONROM 0x30
@@ -130,7 +132,7 @@ struct cbfs_file {
char magic[8];
uint32_t len;
uint32_t type;
- uint32_t checksum;
+ uint32_t attributes_offset;
uint32_t offset;
} __attribute__((packed));
Martin Roth (martinroth(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/12781
-gerrit
commit 9ba3b934b670e678639f2931399bdf2aaad70713
Author: Martin Roth <martinroth(a)google.com>
Date: Mon Dec 21 13:14:58 2015 -0700
soc/intel/fsp_baytrail: Make sure i2c bus is < 7
Baytrail has I2c Busses 0 to 6, so is supposed to error out
if the I2c driver is called with 7 or greater. Due to an off-by-one
error it could be called with bus 7.
Fixes coverity warning:
CID 1287074 (#1 of 1): Out-of-bounds read (OVERRUN)
3. overrun-local: Overrunning array base_adr of 7 4-byte elements at
element index 7 (byte offset 28) using index bus (which evaluates to 7).
Change-Id: I7caec60298cf27bd669796e0e05e4a896f92befd
Signed-off-by: Martin Roth <martinroth(a)google.com>
---
src/soc/intel/fsp_baytrail/i2c.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/soc/intel/fsp_baytrail/i2c.c b/src/soc/intel/fsp_baytrail/i2c.c
index 6cf07a4..c6c8f65 100644
--- a/src/soc/intel/fsp_baytrail/i2c.c
+++ b/src/soc/intel/fsp_baytrail/i2c.c
@@ -102,7 +102,7 @@ int i2c_init(unsigned bus)
I2C6_MEM_BASE};
char *base_ptr;
/* Ensure the desired device is valid */
- if (bus > ARRAY_SIZE(base_adr)) {
+ if (bus >= ARRAY_SIZE(base_adr)) {
printk(BIOS_ERR, "I2C: Only I2C controllers 0...6 are available.\n");
return I2C_ERR;
}
Martin Roth (martinroth(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/12780
-gerrit
commit e1014e11dda88c7d21cde78dceccff9d67a4aa68
Author: Martin Roth <martinroth(a)google.com>
Date: Mon Dec 21 13:01:45 2015 -0700
drivers/intel/fsp1_0/fsp_util.c: Fix indentation
- Also update post code comment to keep under 80 characters.
Change-Id: Id0fd0ee5660f2628fe33188855bebb6e3eea8d2e
Signed-off-by: Martin Roth <martinroth(a)google.com>
---
src/drivers/intel/fsp1_0/fsp_util.c | 9 +++++----
1 file changed, 5 insertions(+), 4 deletions(-)
diff --git a/src/drivers/intel/fsp1_0/fsp_util.c b/src/drivers/intel/fsp1_0/fsp_util.c
index 85ee9a9..a3fef2d 100644
--- a/src/drivers/intel/fsp1_0/fsp_util.c
+++ b/src/drivers/intel/fsp1_0/fsp_util.c
@@ -214,10 +214,11 @@ void print_fsp_info(void) {
if (fsp_header_ptr == NULL)
fsp_header_ptr = (void *)find_fsp();
- if ((u32)fsp_header_ptr < 0xff) {
- post_code(0x4F); /* output something in case there is no serial */
- die("Can't find the FSP!\n");
- }
+
+ if ((u32)fsp_header_ptr < 0xff) {
+ post_code(0x4F); /* post code in case there is no serial */
+ die("Can't find the FSP!\n");
+ }
if (FspHobListPtr == NULL) {
FspHobListPtr = (void*)*((u32*) cbmem_find(CBMEM_ID_HOB_POINTER));
Martin Roth (martinroth(a)google.com) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/12779
-gerrit
commit 80e09cbb309bc8afaadf5af11e2b16225de818ba
Author: Martin Roth <martinroth(a)google.com>
Date: Mon Dec 21 12:51:40 2015 -0700
cpu/allwinner/a10: Fix I2c speed calculation
Looking at the A10 datasheet, N should go in bits 2:0, but
was being cleared by shifting it left by three bits, then
anding it with 7.
Fixes coverity warning:
CID 1241888 (#1 of 1): Wrong operator used (CONSTANT_EXPRESSION_RESULT)
operator_confusion: (n << 3) & (7U /* 7 << 0 */) is always 0 regardless
of the values of its operands. This occurs as the bitwise second operand
of '|'.
Change-Id: I17e71a73adf37a62607e8e5865b1da749d7278aa
Signed-off-by: Martin Roth <martinroth(a)google.com>
---
src/cpu/allwinner/a10/twi.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/cpu/allwinner/a10/twi.h b/src/cpu/allwinner/a10/twi.h
index c5f2974..3dbb302 100644
--- a/src/cpu/allwinner/a10/twi.h
+++ b/src/cpu/allwinner/a10/twi.h
@@ -39,7 +39,7 @@ enum twi_status {
#define TWI_CLK_M_MASK (0xf << 3)
#define TWI_CLK_M(m) (((m - 1) << 3) & TWI_CLK_M_MASK)
#define TWI_CLK_N_MASK (0x7 << 0)
-#define TWI_CLK_N(n) (((n) << 3) & TWI_CLK_N_MASK)
+#define TWI_CLK_N(n) ((n) & TWI_CLK_N_MASK)
struct a1x_twi {
u32 addr; /**< 0x00: Slave address */