OpenCores
URL https://opencores.org/ocsvn/openrisc/openrisc/trunk

Subversion Repositories openrisc

[/] [openrisc/] [trunk/] [bootloaders/] [orpmon/] [cmds/] [load.c] - Diff between revs 175 and 246

Go to most recent revision | Show entire file | Details | Blame | View Log

Rev 175 Rev 246
Line 1... Line 1...
#include "common.h"
#include "common.h"
#include "support.h"
#include "support.h"
#include "flash.h"
#include "flash.h"
#include "net.h"
#include "net.h"
#include "uart.h"
#include "uart.h"
#include "spr_defs.h"
#include "spr-defs.h"
 
 
#ifndef MAX_IMAGES
#ifndef MAX_IMAGES
#define MAX_IMAGES 20
#define MAX_IMAGES 20
#endif
#endif
 
 
Line 590... Line 590...
  unsigned long * p2 = (unsigned long*) function;
  unsigned long * p2 = (unsigned long*) function;
  for(i=0;i<length_words;i++)
  for(i=0;i<length_words;i++)
    p1[i] = p2[i];
    p1[i] = p2[i];
}
}
 
 
 
// DC disable command in cpu.c
 
extern int dc_disable_cmd(int argc, char *argv[]);
 
 
int tboot_cmd (int argc, char *argv[])
int tboot_cmd (int argc, char *argv[])
{
{
  int copied;
  int copied;
  unsigned int num = 0xffffffff, addr = 0x0;
  unsigned int num = 0xffffffff, addr = 0x0;
  extern int tx_next;
  extern int tx_next;
Line 610... Line 613...
    num = strtoul(argv[0], 0, 0);
    num = strtoul(argv[0], 0, 0);
    printf("num %d\n", num);
    printf("num %d\n", num);
    break;
    break;
  }
  }
 
 
  //  global.src_addr = (unsigned long)0x0;
  // Disable data cache if present
 
  if (mfspr(SPR_SR) & SPR_SR_DCE)
 
    {
 
      printf("Disabling data cache\n");
 
      dc_disable_cmd(0, 0);
 
    }
 
 
 
  // Kick off copy
  copied =NetLoop(TFTP);
  copied =NetLoop(TFTP);
  if (copied <= 0) {
  if (copied <= 0) {
    printf("tboot: error while getting the image '%s'", tftp_filename);
    printf("tboot: error while getting the image '%s'", tftp_filename);
    return -1;
    return -1;
  }
  }

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.