diff options
author | Paul Menzel <paulepanter@users.sourceforge.net> | 2015-11-07 09:15:06 +0100 |
---|---|---|
committer | Martin Roth <martinroth@google.com> | 2015-11-21 03:41:04 +0100 |
commit | 42b6265035a58bae254b701ec2a8fcc7d1ebb4a2 (patch) | |
tree | 4cbd2fde1724fa8f4ec7d80bce372f5f8496f483 /src/cpu/amd | |
parent | 4aac08afecd51eb7f3e776d3422767dba0d49030 (diff) | |
download | coreboot-42b6265035a58bae254b701ec2a8fcc7d1ebb4a2.tar.xz |
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@users.sourceforge.net>
Reviewed-on: http://review.coreboot.org/12357
Tested-by: build bot (Jenkins)
Reviewed-by: Martin Roth <martinroth@google.com>
Diffstat (limited to 'src/cpu/amd')
-rw-r--r-- | src/cpu/amd/car/post_cache_as_ram.c | 24 |
1 files 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 26e611c8a8..2c11777449 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 */ @@ -129,18 +129,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. */ |