From 61197aa4f04767d1b31c9eabcae6a09ef69be6dc Mon Sep 17 00:00:00 2001 From: eeh Date: Thu, 24 Aug 2000 22:00:04 +0000 Subject: [PATCH] Add workaround for E250s. --- sys/arch/sparc64/sparc64/ofw_machdep.c | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/sys/arch/sparc64/sparc64/ofw_machdep.c b/sys/arch/sparc64/sparc64/ofw_machdep.c index 11a4984ff839..11943c0a2faa 100644 --- a/sys/arch/sparc64/sparc64/ofw_machdep.c +++ b/sys/arch/sparc64/sparc64/ofw_machdep.c @@ -1,4 +1,4 @@ -/* $NetBSD: ofw_machdep.c,v 1.11 2000/06/26 19:41:20 pk Exp $ */ +/* $NetBSD: ofw_machdep.c,v 1.12 2000/08/24 22:00:04 eeh Exp $ */ /* * Copyright (C) 1996 Wolfgang Solfrank. @@ -507,12 +507,24 @@ prom_get_msgbuf(len, align) cell_t phys_lo; } args; paddr_t addr; + int rooth; + int is_e250 = 1; + + /* E250s tend to have buggy PROMs that break on test-method */ + if ((rooth = OF_finddevice("/chosen")) != -1) { + char name[80]; + + if ((OF_getprop(rooth, "name", &name, sizeof(name))) != -1) { + if (strcmp(name, "SUNW,Ultra-250")) + is_e250 = 0; + } + } if (memh == -1 && ((memh = get_memory_handle()) == -1)) { prom_printf("prom_get_msgbuf: cannot get memh\r\n"); return -1; } - if (OF_test("test-method") == 0) { + if (!is_e250 && (OF_test("test-method") == 0)) { if (OF_test_method(memh, "SUNW,retain") != 0) { args.name = ADR2CELL(&"call-method"); args.nargs = 5;