/[dynamips]/upstream/dynamips-0.2.7-RC1/dev_pcmcia_disk.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 /upstream/dynamips-0.2.7-RC1/dev_pcmcia_disk.c

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

upstream/dynamips-0.2.6-RC5/dev_pcmcia_disk.c revision 6 by dpavlin, Sat Oct 6 16:09:07 2007 UTC upstream/dynamips-0.2.7-RC1/dev_pcmcia_disk.c revision 7 by dpavlin, Sat Oct 6 16:23:47 2007 UTC
# Line 1  Line 1 
1  /*  /*
2   * Cisco C7200 (Predator) simulation platform.   * Cisco router simulation platform.
3   * Copyright (c) 2006 Christophe Fillot.  All rights reserved.   * Copyright (c) 2006 Christophe Fillot.  All rights reserved.
4   *   *
5   * PCMCIA ATA Flash emulation.   * PCMCIA ATA Flash emulation.
# Line 15  Line 15 
15  #include <sys/stat.h>  #include <sys/stat.h>
16  #include <fcntl.h>  #include <fcntl.h>
17    
18  #include "mips64.h"  #include "cpu.h"
19    #include "vm.h"
20  #include "dynamips.h"  #include "dynamips.h"
21  #include "memory.h"  #include "memory.h"
22  #include "device.h"  #include "device.h"
# Line 361  static void ata_handle_cmd(struct pcmcia Line 362  static void ata_handle_cmd(struct pcmcia
362  /*  /*
363   * dev_pcmcia_disk_access_0()   * dev_pcmcia_disk_access_0()
364   */   */
365  void *dev_pcmcia_disk_access_0(cpu_mips_t *cpu,struct vdevice *dev,  void *dev_pcmcia_disk_access_0(cpu_gen_t *cpu,struct vdevice *dev,
366                                 m_uint32_t offset,u_int op_size,u_int op_type,                                 m_uint32_t offset,u_int op_size,u_int op_type,
367                                 m_uint64_t *data)                                 m_uint64_t *data)
368  {  {
# Line 374  void *dev_pcmcia_disk_access_0(cpu_mips_ Line 375  void *dev_pcmcia_disk_access_0(cpu_mips_
375     if (op_type == MTS_READ) {     if (op_type == MTS_READ) {
376        cpu_log(cpu,d->dev.name,        cpu_log(cpu,d->dev.name,
377                "reading offset 0x%5.5x at pc=0x%llx (size=%u)\n",                "reading offset 0x%5.5x at pc=0x%llx (size=%u)\n",
378                offset,cpu->pc,op_size);                offset,cpu_get_pc(cpu),op_size);
379     } else {     } else {
380        cpu_log(cpu,d->dev.name,        cpu_log(cpu,d->dev.name,
381                "writing offset 0x%5.5x, data=0x%llx at pc=0x%llx (size=%u)\n",                "writing offset 0x%5.5x, data=0x%llx at pc=0x%llx (size=%u)\n",
382                offset,*data,cpu->pc,op_size);                offset,*data,cpu_get_pc(cpu),op_size);
383     }     }
384  #endif  #endif
385    
# Line 455  void *dev_pcmcia_disk_access_0(cpu_mips_ Line 456  void *dev_pcmcia_disk_access_0(cpu_mips_
456  /*  /*
457   * dev_pcmcia_disk_access_1()   * dev_pcmcia_disk_access_1()
458   */   */
459  void *dev_pcmcia_disk_access_1(cpu_mips_t *cpu,struct vdevice *dev,  void *dev_pcmcia_disk_access_1(cpu_gen_t *cpu,struct vdevice *dev,
460                                 m_uint32_t offset,u_int op_size,u_int op_type,                                 m_uint32_t offset,u_int op_size,u_int op_type,
461                                 m_uint64_t *data)                                 m_uint64_t *data)
462  {  {
# Line 618  vm_obj_t *dev_pcmcia_disk_init(vm_instan Line 619  vm_obj_t *dev_pcmcia_disk_init(vm_instan
619     free(d);     free(d);
620     return NULL;     return NULL;
621  }  }
622    
623    /* Get the device associated with a PCMCIA disk object */
624    struct vdevice *dev_pcmcia_disk_get_device(vm_obj_t *obj)
625    {
626       struct pcmcia_disk_data *d;
627    
628       if (!obj || !(d = obj->data))
629          return NULL;
630    
631       return(&d->dev);
632    }

Legend:
Removed from v.6  
changed lines
  Added in v.7

  ViewVC Help
Powered by ViewVC 1.1.26