Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 24 Jun 2021 05:27:25 GMT
From:      Colin Percival <cperciva@FreeBSD.org>
To:        src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org
Subject:   git: 0acc529dc35f - main - arm64: Disable early printf if TSLOG
Message-ID:  <202106240527.15O5RPHD000808@gitrepo.freebsd.org>

next in thread | raw e-mail | index | archive | help
The branch main has been updated by cperciva:

URL: https://cgit.FreeBSD.org/src/commit/?id=0acc529dc35f88836dbcbe75940954c75595b058

commit 0acc529dc35f88836dbcbe75940954c75595b058
Author:     Colin Percival <cperciva@FreeBSD.org>
AuthorDate: 2021-06-24 05:10:26 +0000
Commit:     Colin Percival <cperciva@FreeBSD.org>
CommitDate: 2021-06-24 05:10:26 +0000

    arm64: Disable early printf if TSLOG
    
    The warning message "ERROR loading DTB" (for systems without a device
    tree blob) is printed extremely early in the boot process -- among
    other things, before curthread or other pcpu data has been set up.
    Unfortunately, printf is instrumented with TSLOG, which cannot run
    quite this early.
    
    Wrap the printf in #ifndef TSLOG; the situations where the printf
    will be useful are not ones where TSLOG would be in use.
---
 sys/arm64/arm64/machdep.c | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/sys/arm64/arm64/machdep.c b/sys/arm64/arm64/machdep.c
index 82a77ce184d8..439656f57f6d 100644
--- a/sys/arm64/arm64/machdep.c
+++ b/sys/arm64/arm64/machdep.c
@@ -1101,7 +1101,9 @@ try_load_dtb(caddr_t kmdp)
 #endif
 
 	if (dtbp == (vm_offset_t)NULL) {
+#ifndef TSLOG
 		printf("ERROR loading DTB\n");
+#endif
 		return;
 	}
 



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?202106240527.15O5RPHD000808>