[coreboot-gerrit] New patch to review for coreboot: cpu/amd/car/post_cache_as_ram: Avoid trailing spaces

Paul Menzel (paulepanter@users.sourceforge.net) gerrit at coreboot.org
Sat Nov 7 09:32:48 CET 2015


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

-gerrit

commit ad60be0507c485c0ab90cc619665401f7402f3d7
Author: Paul Menzel <paulepanter at users.sourceforge.net>
Date:   Sat Nov 7 09:15:06 2015 +0100

    cpu/amd/car/post_cache_as_ram: Avoid trailing spaces
    
    Looking at the coreboot console logs there are sometimes trailing
    whitespaces in the output, for example, if writing `Done` was not
    possible.
    
    Adapt the code, that spaces are only added when needed.
    
    Change-Id: Ia0af493ab62b6fab24e8a2629cf5fd67329e0af7
    Signed-off-by: Paul Menzel <paulepanter at users.sourceforge.net>
---
 src/cpu/amd/car/post_cache_as_ram.c | 24 ++++++++++++------------
 1 file changed, 12 insertions(+), 12 deletions(-)

diff --git a/src/cpu/amd/car/post_cache_as_ram.c b/src/cpu/amd/car/post_cache_as_ram.c
index 49b9ee3..ae73b24 100644
--- a/src/cpu/amd/car/post_cache_as_ram.c
+++ b/src/cpu/amd/car/post_cache_as_ram.c
@@ -32,20 +32,20 @@ static size_t backup_size(void)
 
 static void memcpy_(void *d, const void *s, size_t len)
 {
-	print_car_debug(" Copy [%08x-%08x] to [%08x - %08x] ... ",
+	print_car_debug(" Copy [%08x-%08x] to [%08x - %08x] ...",
 		(uint32_t) s, (uint32_t) (s + len - 1), (uint32_t) d, (uint32_t) (d + len - 1));
 	memcpy(d, s, len);
 }
 
 static void memset_(void *d, int val, size_t len)
 {
-	print_car_debug(" Fill [%08x-%08x] ... ", (uint32_t) d, (uint32_t) (d + len - 1));
+	print_car_debug(" Fill [%08x-%08x] ...", (uint32_t) d, (uint32_t) (d + len - 1));
 	memset(d, val, len);
 }
 
 static int memcmp_(void *d, const void *s, size_t len)
 {
-	print_car_debug(" Compare [%08x-%08x] with [%08x - %08x] ... ",
+	print_car_debug(" Compare [%08x-%08x] with [%08x - %08x] ...",
 		(uint32_t) s, (uint32_t) (s + len - 1), (uint32_t) d, (uint32_t) (d + len - 1));
 	return memcmp(d, s, len);
 }
@@ -61,13 +61,13 @@ static void prepare_romstage_ramstack(void *resume_backup_memory)
 	}
 	memset_((void *)(CONFIG_RAMTOP - backup_top), 0, backup_top);
 
-	print_car_debug("Done\n");
+	print_car_debug(" Done\n");
 }
 
 static void prepare_ramstage_region(void *resume_backup_memory)
 {
 	size_t backup_top = backup_size();
-	print_car_debug("Prepare ramstage memory region... ");
+	print_car_debug("Prepare ramstage memory region...");
 
 	if (resume_backup_memory) {
 		memcpy_(resume_backup_memory, (void *) CONFIG_RAMBASE, HIGH_MEMORY_SAVE - backup_top);
@@ -76,7 +76,7 @@ static void prepare_ramstage_region(void *resume_backup_memory)
 		memset_((void*)0, 0, CONFIG_RAMTOP - backup_top);
 	}
 
-	print_car_debug("Done\n");
+	print_car_debug(" Done\n");
 }
 
 /* Disable Erratum 343 Workaround, see RevGuide for Fam10h, Pub#41322 Rev 3.33 */
@@ -121,18 +121,18 @@ void post_cache_as_ram(void)
 	size_t car_size = car_data_size();
 	void *migrated_car = (void *)(CONFIG_RAMTOP - car_size);
 
-	print_car_debug("Copying data from cache to RAM... ");
+	print_car_debug("Copying data from cache to RAM...");
 	memcpy_(migrated_car, &_car_data_start[0], car_size);
-	print_car_debug("Done\n");
+	print_car_debug(" Done\n");
 
-	print_car_debug("Verifying data integrity in RAM... ");
+	print_car_debug("Verifying data integrity in RAM...");
 	if (memcmp_(migrated_car, &_car_data_start[0], car_size) == 0)
-		print_car_debug("Done\n");
+		print_car_debug(" Done\n");
 	else
-		print_car_debug("FAILED\n");
+		print_car_debug(" FAILED\n");
 
 	/* New stack grows right below migrated_car. */
-	print_car_debug("Switching to use RAM as stack... ");
+	print_car_debug("Switching to use RAM as stack...");
 	cache_as_ram_switch_stack(migrated_car);
 
 	/* We do not come back. */



More information about the coreboot-gerrit mailing list