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

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

upstream/dynamips-0.2.6-RC5/dev_nvram.c revision 6 by dpavlin, Sat Oct 6 16:09:07 2007 UTC upstream/dynamips-0.2.7-RC1/dev_nvram.c revision 7 by dpavlin, Sat Oct 6 16:23:47 2007 UTC
# Line 1  Line 1 
1  /*  /*
2   * Cisco C7200 (Predator) NVRAM with Calendar Module.   * Cisco router simulation platform.
3   * Copyright (c) 2005,2006 Christophe Fillot.  All rights reserved.   * Copyright (c) 2005,2006 Christophe Fillot.  All rights reserved.
4   *   *
5   * Dallas DS1216 chip emulation:   * Dallas DS1216 chip emulation:
# Line 18  Line 18 
18  #include <time.h>  #include <time.h>
19  #include <errno.h>  #include <errno.h>
20    
21  #include "mips64.h"  #include "cpu.h"
22    #include "vm.h"
23  #include "dynamips.h"  #include "dynamips.h"
24  #include "memory.h"  #include "memory.h"
25  #include "device.h"  #include "device.h"
# Line 44  static m_uint8_t u8_to_bcd(m_uint8_t val Line 45  static m_uint8_t u8_to_bcd(m_uint8_t val
45  }  }
46    
47  /* Get the current time (p.8) */  /* Get the current time (p.8) */
48  static m_uint64_t get_current_time(cpu_mips_t *cpu)  static m_uint64_t get_current_time(cpu_gen_t *cpu)
49  {  {
50     m_uint64_t res;     m_uint64_t res;
51     struct tm *tmx;     struct tm *tmx;
# Line 67  static m_uint64_t get_current_time(cpu_m Line 68  static m_uint64_t get_current_time(cpu_m
68  /*  /*
69   * dev_nvram_access()   * dev_nvram_access()
70   */   */
71  void *dev_nvram_access(cpu_mips_t *cpu,struct vdevice *dev,  void *dev_nvram_access(cpu_gen_t *cpu,struct vdevice *dev,
72                         m_uint32_t offset,u_int op_size,u_int op_type,                         m_uint32_t offset,u_int op_size,u_int op_type,
73                         m_uint64_t *data)                         m_uint64_t *data)
74  {  {
# Line 75  void *dev_nvram_access(cpu_mips_t *cpu,s Line 76  void *dev_nvram_access(cpu_mips_t *cpu,s
76    
77  #if DEBUG_ACCESS  #if DEBUG_ACCESS
78     if (op_type == MTS_READ)     if (op_type == MTS_READ)
79        cpu_log(cpu,dev->name,"read  access to offset = 0x%x, pc = 0x%llx\n",        cpu_log(cpu,dev->name,"read  access to offset=0x%x, pc=0x%llx\n",
80                offset,cpu->pc);                offset,cpu_get_pc(cpu));
81     else     else
82        cpu_log(cpu,dev->name,"write access to vaddr = 0x%x, pc = 0x%llx, "        cpu_log(cpu,dev->name,
83                "val = 0x%llx\n",offset,cpu->pc,*data);                "write access to vaddr=0x%x, pc=0x%llx, val=0x%llx\n",
84                  offset,cpu_get_pc(cpu),*data);
85  #endif  #endif
86    
87     switch(offset) {     switch(offset) {

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

  ViewVC Help
Powered by ViewVC 1.1.26