/[gxemul]/trunk/src/devices/dev_sgi_ip30.c
This is repository of my old source code which isn't updated any more. Go to git.rot13.org for current projects!
ViewVC logotype

Diff of /trunk/src/devices/dev_sgi_ip30.c

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 18 by dpavlin, Mon Oct 8 16:19:11 2007 UTC revision 22 by dpavlin, Mon Oct 8 16:19:37 2007 UTC
# Line 1  Line 1 
1  /*  /*
2   *  Copyright (C) 2004-2005  Anders Gavare.  All rights reserved.   *  Copyright (C) 2004-2006  Anders Gavare.  All rights reserved.
3   *   *
4   *  Redistribution and use in source and binary forms, with or without   *  Redistribution and use in source and binary forms, with or without
5   *  modification, are permitted provided that the following conditions are met:   *  modification, are permitted provided that the following conditions are met:
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *     *  
27   *   *
28   *  $Id: dev_sgi_ip30.c,v 1.18 2005/10/26 14:37:04 debug Exp $   *  $Id: dev_sgi_ip30.c,v 1.20 2006/01/01 13:17:17 debug Exp $
29   *     *  
30   *  SGI IP30 stuff.   *  SGI IP30 stuff.
31   *   *
# Line 60  void dev_sgi_ip30_tick(struct cpu *cpu, Line 60  void dev_sgi_ip30_tick(struct cpu *cpu,
60  /*  /*
61   *  dev_sgi_ip30_access():   *  dev_sgi_ip30_access():
62   */   */
63  int dev_sgi_ip30_access(struct cpu *cpu, struct memory *mem,  DEVICE_ACCESS(sgi_ip30)
         uint64_t relative_addr, unsigned char *data, size_t len,  
         int writeflag, void *extra)  
64  {  {
65          struct sgi_ip30_data *d = (struct sgi_ip30_data *) extra;          struct sgi_ip30_data *d = (struct sgi_ip30_data *) extra;
66          uint64_t idata = 0, odata = 0;          uint64_t idata = 0, odata = 0;
# Line 153  int dev_sgi_ip30_access(struct cpu *cpu, Line 151  int dev_sgi_ip30_access(struct cpu *cpu,
151  /*  /*
152   *  dev_sgi_ip30_2_access():   *  dev_sgi_ip30_2_access():
153   */   */
154  int dev_sgi_ip30_2_access(struct cpu *cpu, struct memory *mem,  DEVICE_ACCESS(sgi_ip30_2)
         uint64_t relative_addr, unsigned char *data, size_t len,  
         int writeflag, void *extra)  
155  {  {
156          struct sgi_ip30_data *d = (struct sgi_ip30_data *) extra;          struct sgi_ip30_data *d = (struct sgi_ip30_data *) extra;
157          uint64_t idata = 0, odata = 0;          uint64_t idata = 0, odata = 0;
# Line 208  int dev_sgi_ip30_2_access(struct cpu *cp Line 204  int dev_sgi_ip30_2_access(struct cpu *cp
204  /*  /*
205   *  dev_sgi_ip30_3_access():   *  dev_sgi_ip30_3_access():
206   */   */
207  int dev_sgi_ip30_3_access(struct cpu *cpu, struct memory *mem,  DEVICE_ACCESS(sgi_ip30_3)
         uint64_t relative_addr, unsigned char *data, size_t len,  
         int writeflag, void *extra)  
208  {  {
209          struct sgi_ip30_data *d = (struct sgi_ip30_data *) extra;          struct sgi_ip30_data *d = (struct sgi_ip30_data *) extra;
210          uint64_t idata = 0, odata = 0;          uint64_t idata = 0, odata = 0;
# Line 273  int dev_sgi_ip30_3_access(struct cpu *cp Line 267  int dev_sgi_ip30_3_access(struct cpu *cp
267  /*  /*
268   *  dev_sgi_ip30_4_access():   *  dev_sgi_ip30_4_access():
269   */   */
270  int dev_sgi_ip30_4_access(struct cpu *cpu, struct memory *mem,  DEVICE_ACCESS(sgi_ip30_4)
         uint64_t relative_addr, unsigned char *data, size_t len,  
         int writeflag, void *extra)  
271  {  {
272          struct sgi_ip30_data *d = (struct sgi_ip30_data *) extra;          struct sgi_ip30_data *d = (struct sgi_ip30_data *) extra;
273          uint64_t idata = 0, odata = 0;          uint64_t idata = 0, odata = 0;
# Line 319  int dev_sgi_ip30_4_access(struct cpu *cp Line 311  int dev_sgi_ip30_4_access(struct cpu *cp
311  /*  /*
312   *  dev_sgi_ip30_5_access():   *  dev_sgi_ip30_5_access():
313   */   */
314  int dev_sgi_ip30_5_access(struct cpu *cpu, struct memory *mem,  DEVICE_ACCESS(sgi_ip30_5)
         uint64_t relative_addr, unsigned char *data, size_t len,  
         int writeflag, void *extra)  
315  {  {
316          struct sgi_ip30_data *d = (struct sgi_ip30_data *) extra;          struct sgi_ip30_data *d = (struct sgi_ip30_data *) extra;
317          uint64_t idata = 0, odata = 0;          uint64_t idata = 0, odata = 0;
# Line 369  struct sgi_ip30_data *dev_sgi_ip30_init( Line 359  struct sgi_ip30_data *dev_sgi_ip30_init(
359    
360          memory_device_register(mem, "sgi_ip30_1", baseaddr,          memory_device_register(mem, "sgi_ip30_1", baseaddr,
361              DEV_SGI_IP30_LENGTH, dev_sgi_ip30_access, (void *)d,              DEV_SGI_IP30_LENGTH, dev_sgi_ip30_access, (void *)d,
362              MEM_DEFAULT, NULL);              DM_DEFAULT, NULL);
363          memory_device_register(mem, "sgi_ip30_2", 0x10000000,          memory_device_register(mem, "sgi_ip30_2", 0x10000000,
364              0x10000, dev_sgi_ip30_2_access, (void *)d, MEM_DEFAULT, NULL);              0x10000, dev_sgi_ip30_2_access, (void *)d, DM_DEFAULT, NULL);
365          memory_device_register(mem, "sgi_ip30_3", 0x1f000000,          memory_device_register(mem, "sgi_ip30_3", 0x1f000000,
366              0x10000, dev_sgi_ip30_3_access, (void *)d, MEM_DEFAULT, NULL);              0x10000, dev_sgi_ip30_3_access, (void *)d, DM_DEFAULT, NULL);
367          memory_device_register(mem, "sgi_ip30_4", 0x1f600000,          memory_device_register(mem, "sgi_ip30_4", 0x1f600000,
368              0x10000, dev_sgi_ip30_4_access, (void *)d, MEM_DEFAULT, NULL);              0x10000, dev_sgi_ip30_4_access, (void *)d, DM_DEFAULT, NULL);
369          memory_device_register(mem, "sgi_ip30_5", 0x1f6c0000,          memory_device_register(mem, "sgi_ip30_5", 0x1f6c0000,
370              0x10000, dev_sgi_ip30_5_access, (void *)d, MEM_DEFAULT, NULL);              0x10000, dev_sgi_ip30_5_access, (void *)d, DM_DEFAULT, NULL);
371    
372          machine_add_tickfunction(machine, dev_sgi_ip30_tick, d, 16);          machine_add_tickfunction(machine, dev_sgi_ip30_tick, d, 16);
373    

Legend:
Removed from v.18  
changed lines
  Added in v.22

  ViewVC Help
Powered by ViewVC 1.1.26