Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc/sparc Make sure that e.g. myetheraddr() has a...



details:   https://anonhg.NetBSD.org/src/rev/4cf6dc99a68c
branches:  trunk
changeset: 504366:4cf6dc99a68c
user:      pk <pk%NetBSD.org@localhost>
date:      Wed Feb 28 14:45:23 2001 +0000

description:
Make sure that e.g. myetheraddr() has a valid idprom pointer as soon as
possible on sun4, since it may be used before the clock attaches.

diffstat:

 sys/arch/sparc/sparc/cpu.c |  9 +++++++--
 1 files changed, 7 insertions(+), 2 deletions(-)

diffs (26 lines):

diff -r 39d547762a87 -r 4cf6dc99a68c sys/arch/sparc/sparc/cpu.c
--- a/sys/arch/sparc/sparc/cpu.c        Wed Feb 28 14:11:25 2001 +0000
+++ b/sys/arch/sparc/sparc/cpu.c        Wed Feb 28 14:45:23 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: cpu.c,v 1.110 2001/01/21 07:48:30 christos Exp $ */
+/*     $NetBSD: cpu.c,v 1.111 2001/02/28 14:45:23 pk Exp $ */
 
 /*
  * Copyright (c) 1996
@@ -748,10 +748,15 @@
        struct module_info *mp;
        int     node;
 {
+       extern struct idprom *idprom;
+       /*
+        * XXX - for e.g. myetheraddr(), which in sun4 can be called
+        *       before the clock attaches.
+        */
+       idprom = &sun4_idprom_store;
 
        getidprom(&sun4_idprom_store, sizeof(struct idprom));
        switch (sun4_idprom_store.id_machine) {
-       /* XXX: don't know about Sun4 types */
        case ID_SUN4_100:
                sc->cpu_type = CPUTYP_4_100;
                sc->classlvl = 100;



Home | Main Index | Thread Index | Old Index