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 Explicitly zero SPRG0 before doing an...
details: https://anonhg.NetBSD.org/src/rev/d6ea38a9704a
branches: trunk
changeset: 372636:d6ea38a9704a
user: macallan <macallan%NetBSD.org@localhost>
date: Wed Dec 14 13:04:24 2022 +0000
description:
Explicitly zero SPRG0 before doing anything else - it's used to store a pointer
to struct cpuinfo, this way we can catch attempts to use it before it's set
up properly
diffstat:
sys/arch/macppc/macppc/locore.S | 5 ++++-
1 files changed, 4 insertions(+), 1 deletions(-)
diffs (19 lines):
diff -r 0af3bb63bd47 -r d6ea38a9704a sys/arch/macppc/macppc/locore.S
--- a/sys/arch/macppc/macppc/locore.S Wed Dec 14 12:31:15 2022 +0000
+++ b/sys/arch/macppc/macppc/locore.S Wed Dec 14 13:04:24 2022 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: locore.S,v 1.79 2021/02/26 02:18:56 thorpej Exp $ */
+/* $NetBSD: locore.S,v 1.80 2022/12/14 13:04:24 macallan Exp $ */
/*
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
@@ -92,6 +92,9 @@
mr %r13,%r6
mr %r14,%r7
+ li %r0,0
+ mtsprg0 %r0
+
bl _C_LABEL(ofwinit) /* init OF */
li %r0,0
Home |
Main Index |
Thread Index |
Old Index