Isaac Christensen (isaac.christensen(a)se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6640
-gerrit
commit d07eadaa366fa34065a6b815b6863371ca8fa9bf
Author: Stefan Reinauer <reinauer(a)chromium.org>
Date: Tue Sep 10 11:02:58 2013 -0700
armv7: mark EABI compatibility symbols as used
These symbols are not used anywhere in our C code, so
when using GCC's link time optimization feature they
will be dropped even though they're needed by libgcc.
Hence we need to mark them as used so GCC does not stumble
and fall over its own guts.
Change-Id: Ib2e9ea2610b57ab8244d5b699dd56025a4f08a01
Signed-off-by: Stefan Reinauer <reinauer(a)google.com>
Reviewed-on: https://chromium-review.googlesource.com/168773
(cherry picked from commit 416ffc880bcf4122b5430fbd9d9547c83886af2f)
Signed-off-by: Isaac Christensen <isaac.christensen(a)se-eng.com>
---
src/arch/armv7/eabi_compat.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/src/arch/armv7/eabi_compat.c b/src/arch/armv7/eabi_compat.c
index c063c85..0c79cd5 100644
--- a/src/arch/armv7/eabi_compat.c
+++ b/src/arch/armv7/eabi_compat.c
@@ -12,7 +12,7 @@
#include <console/console.h>
/* FIXME(dhendrix): prototypes added for assembler */
-int raise (int signum);
+int raise (int signum) __attribute__((used));
int raise (int signum)
{
printk(BIOS_CRIT, "raise: Signal # %d caught\n", signum);
@@ -20,12 +20,12 @@ int raise (int signum)
}
/* Dummy function to avoid linker complaints */
-void __aeabi_unwind_cpp_pr0(void);
+void __aeabi_unwind_cpp_pr0(void) __attribute__((used));
void __aeabi_unwind_cpp_pr0(void)
{
};
-void __aeabi_unwind_cpp_pr1(void);
+void __aeabi_unwind_cpp_pr1(void) __attribute__((used));
void __aeabi_unwind_cpp_pr1(void)
{
};
Isaac Christensen (isaac.christensen(a)se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6639
-gerrit
commit ab3d3e4a1fec338b306b6cfbe5f133c4e4437890
Author: Stefan Reinauer <reinauer(a)chromium.org>
Date: Wed Sep 11 10:24:11 2013 -0700
ARMv7: drop dead code from Makefile.inc
This commented out code is a left over from x86.
Change-Id: Ice806000c73d5a068962914d067d4de7b3d75f45
Signed-off-by: Stefan Reinauer <reinauer(a)google.com>
Reviewed-on: https://chromium-review.googlesource.com/168961
Reviewed-by: Ronald Minnich <rminnich(a)chromium.org>
Reviewed-by: David Hendrix <dhendrix(a)chromium.org>
(cherry picked from commit 9d700cf35d2283a088e704c0ebd34e6f58f54993)
Signed-off-by: Isaac Christensen <isaac.christensen(a)se-eng.com>
---
src/arch/armv7/Makefile.inc | 6 ------
1 file changed, 6 deletions(-)
diff --git a/src/arch/armv7/Makefile.inc b/src/arch/armv7/Makefile.inc
index 048d364..f633644 100644
--- a/src/arch/armv7/Makefile.inc
+++ b/src/arch/armv7/Makefile.inc
@@ -119,12 +119,6 @@ romstage-srcs += $(objgenerated)/crt0.s
ldscripts =
ldscripts += $(src)/arch/armv7/romstage.ld
-#crt0s += $(src)/cpu/arm/fpu_enable.inc
-# FIXME: CONFIG_NEON or something similar for ARM?
-#ifeq ($(CONFIG_SSE),y)
-#crt0s += $(src)/cpu/arm/sse_enable.inc
-#endif
-
crt0s += $(cpu_incs)
crt0s += $(cpu_incs-y)
Isaac Christensen (isaac.christensen(a)se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6637
-gerrit
commit 59951f8c8b0b09e4444a987a86c9fd2391f61995
Author: Stefan Reinauer <reinauer(a)chromium.org>
Date: Tue Sep 10 10:58:28 2013 -0700
console: conditionally include console in bootblock
Right now some console specific objects are included
in the bootblock even if CONFIG_BOOTBLOCK_CONSOLE is
disabled while others are not. Make all of them conditional
and also fix a preprocessor misuse in bootblock_simple.c
and a stray (useless) die() in the Exynos wakeup code that
made inclusion of those files necessary.
Change-Id: Ia7f9d17654466f199b0e13afbdc9e14c9706530f
Signed-off-by: Stefan Reinauer <reinauer(a)google.com>
Reviewed-on: https://chromium-review.googlesource.com/168772
Reviewed-by: David Hendrix <dhendrix(a)chromium.org>
(cherry picked from commit 855da1f07b52898c7edcaffe5baabe9d485bbd83)
Signed-off-by: Isaac Christensen <isaac.christensen(a)se-eng.com>
---
src/console/Makefile.inc | 2 +-
src/cpu/samsung/exynos5250/wakeup.c | 4 ++--
src/cpu/samsung/exynos5420/wakeup.c | 4 ++--
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/src/console/Makefile.inc b/src/console/Makefile.inc
index 435d704..c72c60b 100644
--- a/src/console/Makefile.inc
+++ b/src/console/Makefile.inc
@@ -13,7 +13,7 @@ romstage-y += die.c
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += vtxprintf.c printk.c
bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += init.c console.c
-bootblock-y += die.c
+bootblock-$(CONFIG_BOOTBLOCK_CONSOLE) += die.c
$(obj)/console/init.smm.o : $(obj)/build.h
$(obj)/console/init.ramstage.o : $(obj)/build.h
diff --git a/src/cpu/samsung/exynos5250/wakeup.c b/src/cpu/samsung/exynos5250/wakeup.c
index 5764c83..02f2ccd 100644
--- a/src/cpu/samsung/exynos5250/wakeup.c
+++ b/src/cpu/samsung/exynos5250/wakeup.c
@@ -28,8 +28,8 @@ void wakeup(void)
power_init(); /* Ensure ps_hold_setup() for early wakeup. */
power_exit_wakeup();
- /* Should never return. */
- die("Failed to wake up.\n");
+ /* Should never return. If we do, reset. */
+ power_reset();
}
int get_wakeup_state(void)
diff --git a/src/cpu/samsung/exynos5420/wakeup.c b/src/cpu/samsung/exynos5420/wakeup.c
index af7ef73..9d3f065 100644
--- a/src/cpu/samsung/exynos5420/wakeup.c
+++ b/src/cpu/samsung/exynos5420/wakeup.c
@@ -31,8 +31,8 @@ void wakeup(void)
dcache_mmu_disable();
icache_invalidate_all();
power_exit_wakeup();
- /* Should never return. */
- die("Failed to wake up.\n");
+ /* Should never return. If we do, reset. */
+ power_reset();
}
int get_wakeup_state(void)
Isaac Christensen (isaac.christensen(a)se-eng.com) just uploaded a new patch set to gerrit, which you can find at http://review.coreboot.org/6636
-gerrit
commit 2f775137ac4649247165375a805081be37f58d5f
Author: Duncan Laurie <dlaurie(a)chromium.org>
Date: Thu Sep 12 13:27:15 2013 -0700
libpayload: usbmsc: Split transfers into 64KB chunks
Add a new function to split transfer requests into chunks of
64KB in order to be as compatible as possible with devices that
choke when sent large transfer requests.
Change-Id: Id11990bd149af14af5535de4af47bda21d1ab51e
Signed-off-by: Duncan Laurie <dlaurie(a)chromium.org>
Reviewed-on: https://chromium-review.googlesource.com/169170
Reviewed-by: Julius Werner <jwerner(a)chromium.org>
(cherry picked from commit 4c413b007aa23da830877127dd556c4c38b43042)
Signed-off-by: Isaac Christensen <isaac.christensen(a)se-eng.com>
---
payloads/libpayload/drivers/usb/usbmsc.c | 48 +++++++++++++++++++++++++++++++-
1 file changed, 47 insertions(+), 1 deletion(-)
diff --git a/payloads/libpayload/drivers/usb/usbmsc.c b/payloads/libpayload/drivers/usb/usbmsc.c
index 2d28fbd..0259b8d 100644
--- a/payloads/libpayload/drivers/usb/usbmsc.c
+++ b/payloads/libpayload/drivers/usb/usbmsc.c
@@ -125,6 +125,9 @@ usb_msc_destroy (usbdev_t *dev)
const int DEV_RESET = 0xff;
const int GET_MAX_LUN = 0xfe;
+/* Many USB3 devices do not work with large transfer requests.
+ * Limit the request size to 64KB chunks to ensure maximum compatibility. */
+const int MAX_CHUNK_BYTES = 1024 * 64;
const unsigned int cbw_signature = 0x43425355;
const unsigned int csw_signature = 0x53425355;
@@ -363,7 +366,7 @@ readwrite_blocks_512 (usbdev_t *dev, int start, int n,
* @return 0 on success, 1 on failure
*/
int
-readwrite_blocks (usbdev_t *dev, int start, int n, cbw_direction dir, u8 *buf)
+readwrite_chunk (usbdev_t *dev, int start, int n, cbw_direction dir, u8 *buf)
{
cmdblock_t cb;
memset (&cb, 0, sizeof (cb));
@@ -382,6 +385,49 @@ readwrite_blocks (usbdev_t *dev, int start, int n, cbw_direction dir, u8 *buf)
!= MSC_COMMAND_OK ? 1 : 0;
}
+/**
+ * Reads or writes a number of sequential blocks on a USB storage device
+ * that is split into MAX_CHUNK_BYTES size requests.
+ *
+ * As it uses the READ(10) SCSI-2 command, it's limited to storage devices
+ * of at most 2TB. It assumes sectors of 512 bytes.
+ *
+ * @param dev device to access
+ * @param start first sector to access
+ * @param n number of sectors to access
+ * @param dir direction of access: cbw_direction_data_in == read,
+ * cbw_direction_data_out == write
+ * @param buf buffer to read into or write from.
+ * Must be at least n*sectorsize bytes
+ * @return 0 on success, 1 on failure
+ */
+int
+readwrite_blocks (usbdev_t *dev, int start, int n, cbw_direction dir, u8 *buf)
+{
+ int chunk_size = MAX_CHUNK_BYTES / MSC_INST(dev)->blocksize;
+ int chunk;
+
+ /* Read as many full chunks as needed. */
+ for (chunk = 0; chunk < (n / chunk_size); chunk++) {
+ if (readwrite_chunk (dev, start + (chunk * chunk_size),
+ chunk_size, dir,
+ buf + (chunk * MAX_CHUNK_BYTES))
+ != MSC_COMMAND_OK)
+ return 1;
+ }
+
+ /* Read any remaining partial chunk at the end. */
+ if (n % chunk_size) {
+ if (readwrite_chunk (dev, start + (chunk * chunk_size),
+ n % chunk_size, dir,
+ buf + (chunk * MAX_CHUNK_BYTES))
+ != MSC_COMMAND_OK)
+ return 1;
+ }
+
+ return 0;
+}
+
/* Only request it, we don't interpret it.
On certain errors, that's necessary to get devices out of
a special state called "Contingent Allegiance Condition" */