From 288adc68db99698be2550b1e4ff2cd03ad64cffa Mon Sep 17 00:00:00 2001 From: sekiya Date: Sat, 2 Oct 2004 03:11:14 +0000 Subject: [PATCH] ARCS on 64-bit platforms uses 64-bit pointers. This now works on my Octane. --- sys/dev/arcbios/arcbios.c | 10 +-- sys/dev/arcbios/arcbios.h | 128 +++++++++++++++++++------------------- 2 files changed, 69 insertions(+), 69 deletions(-) diff --git a/sys/dev/arcbios/arcbios.c b/sys/dev/arcbios/arcbios.c index 7373a59cfb1e..a57506463cf0 100644 --- a/sys/dev/arcbios/arcbios.c +++ b/sys/dev/arcbios/arcbios.c @@ -1,4 +1,4 @@ -/* $NetBSD: arcbios.c,v 1.7 2003/03/06 07:59:37 rafal Exp $ */ +/* $NetBSD: arcbios.c,v 1.8 2004/10/02 03:11:14 sekiya Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -37,7 +37,7 @@ */ #include -__KERNEL_RCSID(0, "$NetBSD: arcbios.c,v 1.7 2003/03/06 07:59:37 rafal Exp $"); +__KERNEL_RCSID(0, "$NetBSD: arcbios.c,v 1.8 2004/10/02 03:11:14 sekiya Exp $"); #include @@ -81,7 +81,7 @@ arcbios_init(vaddr_t pblkva) struct arcbios_sysid *sid; ARCBIOS_SPB = (struct arcbios_spb *) pblkva; - + switch (ARCBIOS_SPB->SPBSignature) { case ARCBIOS_SPB_SIGNATURE: case ARCBIOS_SPB_SIGNATURE_1: @@ -196,7 +196,7 @@ arcbios_component_id_copy(struct arcbios_component *node, int arcbios_cngetc(dev_t dev) { - uint32_t count; + unsigned long count; char c; (*ARCBIOS->Read)(ARCBIOS_STDIN, &c, 1, &count); @@ -206,7 +206,7 @@ arcbios_cngetc(dev_t dev) void arcbios_cnputc(dev_t dev, int c) { - uint32_t count; + unsigned long count; char ch = c; (*ARCBIOS->Write)(ARCBIOS_STDOUT, &ch, 1, &count); diff --git a/sys/dev/arcbios/arcbios.h b/sys/dev/arcbios/arcbios.h index 1bda4a1d334d..a983beb3de23 100644 --- a/sys/dev/arcbios/arcbios.h +++ b/sys/dev/arcbios/arcbios.h @@ -1,4 +1,4 @@ -/* $NetBSD: arcbios.h,v 1.5 2004/04/10 19:32:53 pooka Exp $ */ +/* $NetBSD: arcbios.h,v 1.6 2004/10/02 03:11:14 sekiya Exp $ */ /*- * Copyright (c) 2001 The NetBSD Foundation, Inc. @@ -85,21 +85,21 @@ * 4.2.2: System Parameter Block */ struct arcbios_spb { - uint32_t SPBSignature; - uint32_t SPBLength; + paddr_t SPBSignature; + paddr_t SPBLength; uint16_t Version; uint16_t Revision; void *RestartBlock; void *DebugBlock; void *GEVector; void *UTLBMissVector; - uint32_t FirmwareVectorLength; + paddr_t FirmwareVectorLength; void *FirmwareVector; - uint32_t PrivateVectorLength; + paddr_t PrivateVectorLength; void *PrivateVector; - uint32_t AdapterCount; - uint32_t AdapterType; - uint32_t AdapterVectorLength; + paddr_t AdapterCount; + paddr_t AdapterType; + paddr_t AdapterVectorLength; void *AdapterVector; }; @@ -115,10 +115,10 @@ struct arcbios_component { uint32_t Flags; uint16_t Version; uint16_t Revision; - uint32_t Key; - uint32_t AffinityMask; - uint32_t ConfigurationDataSize; - uint32_t IdentifierLength; + unsigned long Key; + unsigned long AffinityMask; + unsigned long ConfigurationDataSize; + unsigned long IdentifierLength; char *Identifier; }; @@ -284,8 +284,8 @@ struct arcbios_sysid { */ struct arcbios_mem { uint32_t Type; - uint32_t BasePage; - uint32_t PageCount; + paddr_t BasePage; + paddr_t PageCount; }; #if defined(sgimips) @@ -327,22 +327,22 @@ struct arcbios_dsp_stat { * ARC firmware vector */ struct arcbios_fv { - uint32_t (*Load)( + paddr_t (*Load)( char *, /* image to load */ - uint32_t, /* top address */ - uint32_t, /* entry address */ - uint32_t *); /* low address */ + paddr_t, /* top address */ + paddr_t, /* entry address */ + paddr_t *); /* low address */ - uint32_t (*Invoke)( - uint32_t, /* entry address */ - uint32_t, /* stack address */ - uint32_t, /* argc */ + paddr_t (*Invoke)( + paddr_t, /* entry address */ + paddr_t, /* stack address */ + paddr_t, /* argc */ char **, /* argv */ char **); /* envp */ - uint32_t (*Execute)( + paddr_t (*Execute)( char *, /* image path */ - uint32_t, /* argc */ + paddr_t, /* argc */ char **, /* argv */ char **); /* envp */ @@ -375,7 +375,7 @@ struct arcbios_fv { void *(*GetParent)( void *); /* component */ - uint32_t (*GetConfigurationData)( + paddr_t (*GetConfigurationData)( void *, /* configuration data */ void *); /* component */ @@ -383,13 +383,13 @@ struct arcbios_fv { void *, /* component */ void *); /* new component */ - uint32_t (*DeleteComponent)( + paddr_t (*DeleteComponent)( void *); /* component */ - uint32_t (*GetComponent)( + paddr_t (*GetComponent)( char *); /* path */ - uint32_t (*SaveConfiguration)(void); + paddr_t (*SaveConfiguration)(void); void *(*GetSystemId)(void); @@ -399,75 +399,75 @@ struct arcbios_fv { void *reserved1; #else void (*Signal)( - uint32_t, /* signal number */ + paddr_t, /* signal number */ void *); /* handler */ #endif void *(*GetTime)(void); - uint32_t (*GetRelativeTime)(void); + paddr_t (*GetRelativeTime)(void); - uint32_t (*GetDirectoryEntry)( - uint32_t, /* file ID */ + paddr_t (*GetDirectoryEntry)( + paddr_t, /* file ID */ void *, /* directory entry */ - uint32_t, /* length */ - uint32_t *); /* count */ + paddr_t, /* length */ + paddr_t *); /* count */ - uint32_t (*Open)( + paddr_t (*Open)( char *, /* path */ - uint32_t, /* open mode */ - uint32_t *); /* file ID */ + paddr_t, /* open mode */ + paddr_t *); /* file ID */ - uint32_t (*Close)( - uint32_t); /* file ID */ + paddr_t (*Close)( + paddr_t); /* file ID */ - uint32_t (*Read)( - uint32_t, /* file ID */ + paddr_t (*Read)( + paddr_t, /* file ID */ void *, /* buffer */ - uint32_t, /* length */ - uint32_t *); /* count */ + paddr_t, /* length */ + paddr_t *); /* count */ - uint32_t (*GetReadStatus)( - uint32_t); /* file ID */ + paddr_t (*GetReadStatus)( + paddr_t); /* file ID */ - uint32_t (*Write)( - uint32_t, /* file ID */ + paddr_t (*Write)( + paddr_t, /* file ID */ void *, /* buffer */ - uint32_t, /* length */ - uint32_t *); /* count */ + paddr_t, /* length */ + paddr_t *); /* count */ - uint32_t (*Seek)( - uint32_t, /* file ID */ + paddr_t (*Seek)( + paddr_t, /* file ID */ int64_t *, /* offset */ - uint32_t); /* whence */ + paddr_t); /* whence */ - uint32_t (*Mount)( + paddr_t (*Mount)( char *, /* path */ - uint32_t); /* operation */ + paddr_t); /* operation */ char *(*GetEnvironmentVariable)( char *); /* variable */ - uint32_t (*SetEnvironmentVariable)( + paddr_t (*SetEnvironmentVariable)( char *, /* variable */ char *); /* contents */ - uint32_t (*GetFileInformation)( - uint32_t, /* file ID */ + paddr_t (*GetFileInformation)( + paddr_t, /* file ID */ void *); /* XXX */ - uint32_t (*SetFileInformation)( - uint32_t, /* file ID */ - uint32_t, /* XXX */ - uint32_t); /* XXX */ + paddr_t (*SetFileInformation)( + paddr_t, /* file ID */ + paddr_t, /* XXX */ + paddr_t); /* XXX */ void (*FlushAllCaches)(void); #if !defined(sgimips) - uint32_t (*TestUnicode)( - uint32_t, /* file ID */ + paddr_t (*TestUnicode)( + paddr_t, /* file ID */ uint16_t); /* unicode character */ void *(*GetDisplayStatus)( - uint32_t); /* file ID */ + paddr_t); /* file ID */ #endif };