[coreboot-gerrit] New patch to review for coreboot: Partly revert "lzma: Port size-checking ulzman() version to coreboot"

Paul Menzel (paulepanter@users.sourceforge.net) gerrit at coreboot.org
Wed Feb 24 00:08:42 CET 2016


Paul Menzel (paulepanter at users.sourceforge.net) just uploaded a new patch set to gerrit, which you can find at https://review.coreboot.org/13773

-gerrit

commit ab093aa310187554e040bb1c0fe0615cc66e5873
Author: Paul Menzel <paulepanter at users.sourceforge.net>
Date:   Wed Feb 24 00:03:27 2016 +0100

    Partly revert "lzma: Port size-checking ulzman() version to coreboot"
    
    This partly reverts a25b5d257dbfbff808b19bf8c48565435e6bef9d.
    
    Revert the change in `src/lib/lzmadecode.c` as it decreases the boot
    time to ramstage by 150 ms on the ASRock E350M1.
    
    There seems to be some special case with the flash ROM access. Until
    this has been figured out, revert the change.
    
    Change-Id: Icc480c41cda77526256ba1761b29a24def48400e
    Signed-off-by: Paul Menzel <paulepanter at users.sourceforge.net>
---
 src/lib/lzmadecode.c | 7 ++-----
 1 file changed, 2 insertions(+), 5 deletions(-)

diff --git a/src/lib/lzmadecode.c b/src/lib/lzmadecode.c
index fbf1596..ada7226 100644
--- a/src/lib/lzmadecode.c
+++ b/src/lib/lzmadecode.c
@@ -29,12 +29,9 @@
 #define kBitModelTotal (1 << kNumBitModelTotalBits)
 #define kNumMoveBits 5
 
-/* Use 32-bit reads whenever possible to avoid bad flash performance. Fall back
- * to byte reads for last 4 bytes since RC_TEST returns an error when BufferLim
- * is *reached* (not surpassed!), meaning we can't allow that to happen while
- * there are still bytes to decode from the algorithm's point of view. */
+/* Use 32-bit reads whenever possible to avoid bad flash performance.  */
 #define RC_READ_BYTE (look_ahead_ptr < 4 ? look_ahead.raw[look_ahead_ptr++] \
-		      : ((((uintptr_t) Buffer & 3) || ((SizeT) (BufferLim - Buffer) <= 4)) ? (*Buffer++) \
+		      : ((((uintptr_t) Buffer & 3) || ((SizeT) (BufferLim - Buffer) < 4)) ? (*Buffer++) \
 	   : ((look_ahead.dw = *(UInt32 *)Buffer), (Buffer += 4), (look_ahead_ptr = 1), look_ahead.raw[0])))
 
 #define RC_INIT2 Code = 0; Range = 0xFFFFFFFF; \



More information about the coreboot-gerrit mailing list