Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/macppc/macppc add comment to explain why we zero SP...



details:   https://anonhg.NetBSD.org/src/rev/bf4b4df2c0ff
branches:  trunk
changeset: 372664:bf4b4df2c0ff
user:      macallan <macallan%NetBSD.org@localhost>
date:      Sun Dec 18 01:16:05 2022 +0000

description:
add comment to explain why we zero SPRG0 here
NFC

diffstat:

 sys/arch/macppc/macppc/locore.S |  7 ++++++-
 1 files changed, 6 insertions(+), 1 deletions(-)

diffs (21 lines):

diff -r 8307f307ab2c -r bf4b4df2c0ff sys/arch/macppc/macppc/locore.S
--- a/sys/arch/macppc/macppc/locore.S   Sun Dec 18 01:10:57 2022 +0000
+++ b/sys/arch/macppc/macppc/locore.S   Sun Dec 18 01:16:05 2022 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.S,v 1.81 2022/12/18 01:10:57 macallan Exp $     */
+/*     $NetBSD: locore.S,v 1.82 2022/12/18 01:16:05 macallan Exp $     */
 
 /*
  * Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -92,6 +92,11 @@
        mr      %r13,%r6
        mr      %r14,%r7
 
+/* 
+ * Zero SPRG0 so we can catch usage of curcpu(), which just returns SPRG0,
+ * before it is set up properly. Console output uses locks now, which need
+ * working curcpu(), and macppc sets up its console *very* early.
+ */
 #ifdef DEBUG
        li      %r0,0
        mtsprg0 %r0



Home | Main Index | Thread Index | Old Index