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

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

upstream/dynamips-0.2.6-RC5/dev_bootflash.c revision 6 by dpavlin, Sat Oct 6 16:09:07 2007 UTC upstream/dynamips-0.2.7-RC1/dev_bootflash.c revision 7 by dpavlin, Sat Oct 6 16:23:47 2007 UTC
# Line 1  Line 1 
1  /*  /*
2   * Cisco C7200 (Predator) Bootflash.   * Cisco router simulation platform.
3   * Copyright (c) 2006 Christophe Fillot.  All rights reserved.   * Copyright (c) 2006 Christophe Fillot.  All rights reserved.
4   *   *
5   * Intel Flash SIMM emulation (28F008SA/28F016SA)   * Intel Flash SIMM emulation (28F008SA/28F016SA)
# Line 25  Line 25 
25  #include <time.h>  #include <time.h>
26  #include <errno.h>  #include <errno.h>
27    
28  #include "mips64.h"  #include "cpu.h"
29    #include "vm.h"
30  #include "dynamips.h"  #include "dynamips.h"
31  #include "memory.h"  #include "memory.h"
32  #include "device.h"  #include "device.h"
# Line 47  struct bootflash_data { Line 48  struct bootflash_data {
48  /*  /*
49   * dev_bootflash_access()   * dev_bootflash_access()
50   */   */
51  void *dev_bootflash_access(cpu_mips_t *cpu,struct vdevice *dev,  void *dev_bootflash_access(cpu_gen_t *cpu,struct vdevice *dev,
52                             m_uint32_t offset,u_int op_size,u_int op_type,                             m_uint32_t offset,u_int op_size,u_int op_type,
53                             m_uint64_t *data)                             m_uint64_t *data)
54  {  {
# Line 57  void *dev_bootflash_access(cpu_mips_t *c Line 58  void *dev_bootflash_access(cpu_mips_t *c
58     if (op_type == MTS_READ)     if (op_type == MTS_READ)
59        cpu_log(cpu,dev->name,"read  access to offset = 0x%x, pc = 0x%llx "        cpu_log(cpu,dev->name,"read  access to offset = 0x%x, pc = 0x%llx "
60                "(stat=%u,cui_cmd=0x%x)\n",                "(stat=%u,cui_cmd=0x%x)\n",
61                offset,cpu->pc,d->status,d->cui_cmd);                offset,cpu_get_pc(cpu),d->status,d->cui_cmd);
62     else     else
63        cpu_log(cpu,dev->name,"write access to vaddr = 0x%x, pc = 0x%llx, "        cpu_log(cpu,dev->name,"write access to vaddr = 0x%x, pc = 0x%llx, "
64                "val = 0x%llx\n",offset,cpu->pc,*data);                "val = 0x%llx\n",offset,cpu_get_pc(cpu),*data);
65  #endif  #endif
66    
67     if (op_type == MTS_READ) {     if (op_type == MTS_READ) {
68          *data = 0;
69    
70        /* Read Array mode */        /* Read Array mode */
71        if (d->status == 0)        if (d->status == 0)
72           return(BPTR(d,offset));           return(BPTR(d,offset));

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

  ViewVC Help
Powered by ViewVC 1.1.26