/[dynamips]/upstream/dynamips-0.2.6-RC3/dev_remote.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.6-RC3/dev_remote.c

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

upstream/dynamips-0.2.6-RC2/dev_remote.c revision 3 by dpavlin, Sat Oct 6 16:05:34 2007 UTC upstream/dynamips-0.2.6-RC3/dev_remote.c revision 4 by dpavlin, Sat Oct 6 16:06:49 2007 UTC
# Line 26  Line 26 
26  #include "vm.h"  #include "vm.h"
27  #include "dev_c7200.h"  #include "dev_c7200.h"
28  #include "dev_c3600.h"  #include "dev_c3600.h"
29    #include "dev_c2691.h"
30    #include "dev_c3725.h"
31    #include "dev_c3745.h"
32    
33  #define DEBUG_ACCESS 0  #define DEBUG_ACCESS 0
34    
# Line 46  void *dev_remote_control_access(cpu_mips Line 49  void *dev_remote_control_access(cpu_mips
49                                  m_uint64_t *data)                                  m_uint64_t *data)
50  {  {
51     struct remote_data *d = dev->priv_data;     struct remote_data *d = dev->priv_data;
52     struct vdevice *nvram_dev;     struct vdevice *storage_dev;
53     size_t len;     size_t len;
54    
55     if (op_type == MTS_READ)     if (op_type == MTS_READ)
# Line 176  void *dev_remote_control_access(cpu_mips Line 179  void *dev_remote_control_access(cpu_mips
179        /* NVRAM address */        /* NVRAM address */
180        case 0x044:        case 0x044:
181           if (op_type == MTS_READ) {           if (op_type == MTS_READ) {
182              if ((nvram_dev = dev_get_by_name(cpu->vm,"nvram")))              if ((storage_dev = dev_get_by_name(cpu->vm,"nvram")))
183                 *data = nvram_dev->phys_addr;                 *data = storage_dev->phys_addr;
184    
185                if ((storage_dev = dev_get_by_name(cpu->vm,"ssa")))
186                   *data = storage_dev->phys_addr;
187           }           }
188           break;           break;
189    
# Line 188  void *dev_remote_control_access(cpu_mips Line 194  void *dev_remote_control_access(cpu_mips
194                 case VM_TYPE_C3600:                 case VM_TYPE_C3600:
195                    *data = VM_C3600(cpu->vm)->nm_iomem_size;                    *data = VM_C3600(cpu->vm)->nm_iomem_size;
196                    break;                    break;
197                   case VM_TYPE_C2691:
198                      *data = VM_C2691(cpu->vm)->nm_iomem_size;
199                      break;
200                   case VM_TYPE_C3725:
201                      *data = VM_C3725(cpu->vm)->nm_iomem_size;
202                      break;
203                   case VM_TYPE_C3745:
204                      *data = VM_C3745(cpu->vm)->nm_iomem_size;
205                      break;
206                 default:                 default:
207                    *data = 0;                    *data = 0;
208              }              }

Legend:
Removed from v.3  
changed lines
  Added in v.4

  ViewVC Help
Powered by ViewVC 1.1.26