Sanity check the environment variable first.
This commit is contained in:
parent
2f776ce02e
commit
649a7beb38
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: arcemu.c,v 1.14 2007/05/10 17:27:05 rumble Exp $ */
|
||||
/* $NetBSD: arcemu.c,v 1.15 2007/05/10 17:45:58 rumble Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2004 Steve Rumble
|
||||
|
@ -29,7 +29,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: arcemu.c,v 1.14 2007/05/10 17:27:05 rumble Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: arcemu.c,v 1.15 2007/05/10 17:45:58 rumble Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -111,7 +111,7 @@ arcemu_init(const char **env)
|
|||
{
|
||||
switch (arcemu_identify()) {
|
||||
case MACH_SGI_IP12:
|
||||
arcemu_ip12_init(env);
|
||||
arcemu_ip12_init(ARCEMU_IP12_ENVOK(env) ? env : NULL);
|
||||
break;
|
||||
|
||||
default:
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: arcemu.h,v 1.8 2007/05/10 17:27:06 rumble Exp $ */
|
||||
/* $NetBSD: arcemu.h,v 1.9 2007/05/10 17:45:58 rumble Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 2004 Steve Rumble
|
||||
|
@ -59,6 +59,10 @@ static void * arcemu_ip12_GetMemoryDescriptor(void *mem);
|
|||
static void arcemu_ip12_eeprom_read(void);
|
||||
static void arcemu_ip12_putc(dev_t, int);
|
||||
|
||||
#define ARCEMU_IP12_ENVOK(_x) \
|
||||
(MIPS_PHYS_TO_KSEG1((_x)) >= 0xa0380000 && \
|
||||
MIPS_PHYS_TO_KSEG1((_x)) < 0xa0400000)
|
||||
|
||||
/* ARCBIOS Component Tree. Represented in linear fashion. */
|
||||
static struct arcbios_component ip12_tree[] = {
|
||||
{ COMPONENT_CLASS_ProcessorClass, COMPONENT_TYPE_CPU,
|
||||
|
|
Loading…
Reference in New Issue