/[gxemul]/trunk/src/devices/dev_i80321.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_i80321.c

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

revision 41 by dpavlin, Mon Oct 8 16:22:11 2007 UTC revision 42 by dpavlin, Mon Oct 8 16:22:32 2007 UTC
# Line 25  Line 25 
25   *  SUCH DAMAGE.   *  SUCH DAMAGE.
26   *   *
27   *   *
28   *  $Id: dev_i80321.c,v 1.21 2007/04/28 09:19:52 debug Exp $   *  $Id: dev_i80321.c,v 1.23 2007/06/15 19:11:15 debug Exp $
29   *   *
30   *  Intel i80321 (ARM) core functionality.   *  COMMENT: Intel i80321 (ARM) core functionality
31   *   *
32   *      o)  Interrupt controller   *      o)  Interrupt controller
33   *      o)  Timer   *      o)  Timer
# Line 284  ret: Line 284  ret:
284    
285  DEVINIT(i80321)  DEVINIT(i80321)
286  {  {
287          struct i80321_data *d = malloc(sizeof(struct i80321_data));          struct i80321_data *d;
288          uint32_t memsize = devinit->machine->physical_ram_in_mb * 1048576;          uint32_t memsize = devinit->machine->physical_ram_in_mb * 1048576;
289          uint32_t base;          uint32_t base;
290          char tmpstr[300];          char tmpstr[300];
         int i;  
291          struct cpu *cpu = devinit->machine->cpus[devinit->          struct cpu *cpu = devinit->machine->cpus[devinit->
292              machine->bootstrap_cpu];              machine->bootstrap_cpu];
293            int i;
294    
295          if (d == NULL) {          CHECK_ALLOCATION(d = malloc(sizeof(struct i80321_data)));
                 fprintf(stderr, "out of memory\n");  
                 exit(1);  
         }  
296          memset(d, 0, sizeof(struct i80321_data));          memset(d, 0, sizeof(struct i80321_data));
297    
298          /*  Connect to the CPU interrupt pin:  */          /*  Connect to the CPU interrupt pin:  */
# Line 354  DEVINIT(i80321) Line 351  DEVINIT(i80321)
351          d->timer = timer_add(d->hz, tmr0_tick, d);          d->timer = timer_add(d->hz, tmr0_tick, d);
352    
353          machine_add_tickfunction(devinit->machine, dev_i80321_tick,          machine_add_tickfunction(devinit->machine, dev_i80321_tick,
354              d, TICK_SHIFT, 0.0);              d, TICK_SHIFT);
355    
356          devinit->return_ptr = d->pci_bus;          devinit->return_ptr = d->pci_bus;
357    

Legend:
Removed from v.41  
changed lines
  Added in v.42

  ViewVC Help
Powered by ViewVC 1.1.26