Module Name:    src
Committed By:   macallan
Date:           Sun Dec 18 01:16:05 UTC 2022

Modified Files:
        src/sys/arch/macppc/macppc: locore.S

Log Message:
add comment to explain why we zero SPRG0 here
NFC


To generate a diff of this commit:
cvs rdiff -u -r1.81 -r1.82 src/sys/arch/macppc/macppc/locore.S

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/macppc/macppc/locore.S
diff -u src/sys/arch/macppc/macppc/locore.S:1.81 src/sys/arch/macppc/macppc/locore.S:1.82
--- src/sys/arch/macppc/macppc/locore.S:1.81	Sun Dec 18 01:10:57 2022
+++ src/sys/arch/macppc/macppc/locore.S	Sun Dec 18 01:16:05 2022
@@ -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 @@ __start:
 	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

Reply via email to