X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=common%2Fcmd_log.c;h=57ef48461a537b12228ab830fe27db794d8c51c7;hb=d9b94f28a442b0013caef99de084d7b72e2d4607;hp=8132570773fc77e4946362497f74e09178330ddc;hpb=d1cbe85b084ce543ba0b09def03a1b20940e6c03;p=oweals%2Fu-boot.git diff --git a/common/cmd_log.c b/common/cmd_log.c index 8132570773..57ef48461a 100644 --- a/common/cmd_log.c +++ b/common/cmd_log.c @@ -74,22 +74,28 @@ static unsigned long *ext_logged_chars; void logbuff_init_ptrs (void) { DECLARE_GLOBAL_DATA_PTR; + unsigned long *ext_tag; + unsigned long post_word; char *s; log_buf = (unsigned char *)(gd->bd->bi_memsize-LOGBUFF_LEN); - ext_log_start = (unsigned long *)(log_buf)-3; + ext_tag = (unsigned long *)(log_buf)-4; + ext_log_start = (unsigned long *)(log_buf)-3; ext_log_size = (unsigned long *)(log_buf)-2; ext_logged_chars = (unsigned long *)(log_buf)-1; + post_word = post_word_load(); #ifdef CONFIG_POST /* The post routines have setup the word so we can simply test it */ - if (post_word_load () & POST_POWERON) { + if (post_word_load () & POST_COLDBOOT) { logged_chars = log_size = log_start = 0; + *ext_tag = LOGBUFF_MAGIC; } #else /* No post routines, so we do our own checking */ - if (post_word_load () != LOGBUFF_MAGIC) { + if (post_word != LOGBUFF_MAGIC) { logged_chars = log_size = log_start = 0; post_word_store (LOGBUFF_MAGIC); + *ext_tag = LOGBUFF_MAGIC; } #endif /* Initialize default loglevel if present */ @@ -162,12 +168,8 @@ int do_log (cmd_tbl_t *cmdtp, int flag, int argc, char *argv[]) if (strcmp(argv[1],"append") == 0) { /* Log concatenation of all arguments separated by spaces */ for (i=2; i - append to the logbuffer\n"