diff --git a/sys/arch/sun3/stand/libsa/libsa.h b/sys/arch/sun3/stand/libsa/libsa.h index c81e15471e5c..4dca2470519b 100644 --- a/sys/arch/sun3/stand/libsa/libsa.h +++ b/sys/arch/sun3/stand/libsa/libsa.h @@ -1,4 +1,4 @@ -/* $NetBSD: libsa.h,v 1.4 1998/06/29 20:03:14 gwr Exp $ */ +/* $NetBSD: libsa.h,v 1.5 1999/03/04 07:56:41 gwr Exp $ */ /* * This file defines the API for libsa.a @@ -39,7 +39,7 @@ extern char *prom_bootfile; extern int prom_boothow; /* sun3.c */ -void sun3_etheraddr __P((u_char *ea)); +void sun3_getidprom __P((u_char *ea)); /* version.c */ extern char version[]; diff --git a/sys/arch/sun3/stand/libsa/sun3.c b/sys/arch/sun3/stand/libsa/sun3.c index 4737d314f9fa..d41b2db8b765 100644 --- a/sys/arch/sun3/stand/libsa/sun3.c +++ b/sys/arch/sun3/stand/libsa/sun3.c @@ -1,4 +1,4 @@ -/* $NetBSD: sun3.c,v 1.2 1998/02/05 04:57:16 gwr Exp $ */ +/* $NetBSD: sun3.c,v 1.3 1999/03/04 07:56:41 gwr Exp $ */ /*- * Copyright (c) 1998 The NetBSD Foundation, Inc. @@ -49,6 +49,7 @@ #define set_segmap sun3_set_segmap #include +#include #include #include @@ -258,13 +259,22 @@ set_segmap(va, sme) set_control_byte(va, sme); } +/* + * Copy the IDPROM contents into the passed buffer. + * The caller (idprom.c) will do the checksum. + */ void -sun3_etheraddr(u_char *ea) +sun3_getidprom(u_char *dst) { - vm_offset_t ca; /* control space address */ + vm_offset_t src; /* control space address */ + int len, x; - for (ca = 2; ca < 8; ca++) - *ea++ = get_control_byte(ca); + src = IDPROM_BASE; + len = sizeof(struct idprom); + do { + x = get_control_byte(src++); + *dst++ = x; + } while (--len > 0); } /*****************************************************************