This is the mail archive of the ecos-discuss@sources.redhat.com mailing list for the eCos project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Small change to hal_if.c:hal_ctrlc_check fixed my eth


Gary,

I am behind a firewall, so I can't do a CVS diff, however, here is a diff
against the CVS sources of a few days ago, should make the change obvious.
(hal/common/current/src/hal_if.c is my modified source)

Alex

$ diff -c hal/common/current/src/hal_if.c
//d/ecos-orig/packages/hal/common/current/src/hal_if.c
*** hal/common/current/src/hal_if.c     Wed Feb 14 11:12:32 2001
---file://d/ecos-orig/packages/hal/common/current/src/hal_if.c   Sat Dec 23
00:37:28 2000

***************
*** 447,453 ****
          isr_ret = CYGACC_COMM_IF_DBG_ISR(*chan, &ctrlc, vector, data);
          if (ctrlc)
              cyg_hal_user_break( (CYG_ADDRWORD
*)hal_saved_interrupt_state );
!         return ctrlc;
      }
      return false;
  }
--- 447,453 ----
          isr_ret = CYGACC_COMM_IF_DBG_ISR(*chan, &ctrlc, vector, data);
          if (ctrlc)
              cyg_hal_user_break( (CYG_ADDRWORD
*)hal_saved_interrupt_state );
!         return true;
      }
      return false;
  }
----- Original Message -----
From: "Gary Thomas" <gthomas@cambridge.redhat.com>
To: "Alex Brown" <agb@cea.com.au>
Cc: <ecos-discuss@sourceware.cygnus.com>
Sent: Wednesday, February 14, 2001 11:01 AM
Subject: RE: [ECOS] Small change to hal_if.c:hal_ctrlc_check fixed my eth


> Can you send a patch (to make it easier to see what you changed)?
> Just do 'cvs diff -u hal/common/current/src/hal_if.c'
>
> On 13-Feb-2001 Alex Brown wrote:
> > Hi
> >
> > I had to make the following change the
> > hal\common\current\src\hal_if.c:hal_ctrlc_check() in order to get
ethernet
> > debugging on my custom MPC860 based board.
> >
> > Before this change, the hal_ctrlc_check would steal all ethernet
interrupts
> > and the TCP/IP stack would not get any data is the application was
started
> > via GDB. (I am using redboot and my RAM image uses the stubs in redboot)
> >
> > Now ethernet debugging works perfectly.
> >
> > I am doing something wrong with my configuration to require this ?
> >
> > Modified code follows:
> >
> > cyg_bool
> > hal_ctrlc_check(CYG_ADDRWORD vector, CYG_ADDRWORD data)
> > {
> >     hal_virtual_comm_table_t* chan = CYGACC_CALL_IF_DEBUG_PROCS();
> >     int gdb_vector = -1;
> >     int isr_ret, ctrlc = 0;
> >
> >     // This check only to avoid crash on older stubs in case of
unhandled
> >     // interrupts. It is a bit messy, but required in a transition
period.
> >     if (CYGNUM_CALL_IF_TABLE_VERSION+1 == CYGACC_CALL_IF_VERSION()) {
> >         gdb_vector = CYGACC_COMM_IF_CONTROL(*chan,
> > __COMMCTL_DBG_ISR_VECTOR);
> >     }
> >     if (vector == gdb_vector) {
> >         isr_ret = CYGACC_COMM_IF_DBG_ISR(*chan, &ctrlc, vector, data);
> >         if (ctrlc)
> >             cyg_hal_user_break( (CYG_ADDRWORD
*)hal_saved_interrupt_state );
> >         return ctrlc; // <- CHANGE HERE!! this used to be "return true;"
> >     }
> >     return false;
> > }
> >
> > Alex Brown
> > agb@cea.com.au
>
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]