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

Subversion Repositories or1k

[/] [or1k/] [trunk/] [gdb-5.0/] [gdb/] [remote-or1k.c] - Diff between revs 113 and 115

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

Rev 113 Rev 115
Line 329... Line 329...
or1k_init (args)
or1k_init (args)
     char *args;
     char *args;
{
{
  struct cleanup *old_cleanups = make_cleanup (or1k_set_undefined_cleanups, NULL);
  struct cleanup *old_cleanups = make_cleanup (or1k_set_undefined_cleanups, NULL);
  int i;
  int i;
 
  unsigned int tmp;
 
 
  /* What is this code doing here?  I don't see any way it can happen, and
  /* What is this code doing here?  I don't see any way it can happen, and
     it might mean or1k_initializing didn't get cleared properly.
     it might mean or1k_initializing didn't get cleared properly.
     So I'll make it a warning.  */
     So I'll make it a warning.  */
 
 
Line 348... Line 349...
    current_or1k_target->to_init (args);
    current_or1k_target->to_init (args);
 
 
  /* Determine implementation configuration.  */
  /* Determine implementation configuration.  */
  or1k_implementation.VR = or1k_read_spr_reg (VR_SPRNUM);
  or1k_implementation.VR = or1k_read_spr_reg (VR_SPRNUM);
  or1k_implementation.UPR = or1k_read_spr_reg (UPR_SPRNUM);
  or1k_implementation.UPR = or1k_read_spr_reg (UPR_SPRNUM);
 
  /* Determine number of gpr_regs.  */
 
  tmp = or1k_read_spr_reg (CPUCFGR_SPRNUM);
 
  or1k_implementation.num_gpr_regs = ((tmp >> 4) & 1)?(16):(32);
 
  /* Is any vector or floating point support present? */
 
  or1k_implementation.vf_present = ((tmp >> 7) & 7) != 0;
 
  or1k_implementation.num_vfpr_regs = (or1k_implementation.vf_present)?(32):(0);
 
 
  /* Determine max number of supported matchpoints.  */
  /* Determine max number of supported matchpoints.  */
  or1k_implementation.num_matchpoints = 2;
  tmp = or1k_read_spr_reg (DCFGR_SPRNUM);
 
  or1k_implementation.num_matchpoints = tmp & 7;
  or1k_implementation.num_used_matchpoints = 0;
  or1k_implementation.num_used_matchpoints = 0;
  or1k_implementation.num_gpr_regs = 32;
  or1k_implementation.has_counters = tmp & 4 == 1;
  /*!!! FINISH */
 
 
 
 
 
  /* Is implementation supported? */
  /* Is implementation supported? */
 
 
  /* First we should have system and debug groups implemented. */
  /* First we should have system and debug groups implemented. */
  if (or1k_implementation.VR & (1 << SPR_SYSTEM_GROUP) == 0)
  if (or1k_implementation.VR & (1 << SPR_SYSTEM_GROUP) == 0)
    error ("System group should be available in the or1k implementation.");
    error ("System group should be available in the or1k implementation.");
  if (or1k_implementation.VR & (1 << SPR_DEBUG_GROUP) == 0)
  if (or1k_implementation.VR & (1 << SPR_DEBUG_GROUP) == 0)
    error ("Debug group should be available in the or1k implementation.");
    error ("Debug group should be available in the or1k implementation.");
 
  if (or1k_implementation.has_counters)
 
    warning ("Counters not supported.");
 
 
  /* Delete break, watch, catch points.  */
  /* Delete break, watch, catch points.  */
  for(i = 0; i < NUM_MATCHPOINTS; i++)
  for(i = 0; i < NUM_MATCHPOINTS; i++)
    or1k_write_spr_reg (DCR0_SPRNUM + i, 0);
    or1k_write_spr_reg (DCR0_SPRNUM + i, 0);
 
 

powered by: WebSVN 2.1.0

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