This is the mail archive of the ecos-patches@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]
Other format: [Raw text]

Re: RealTek 8139 driver, 2. revision


Hi Eric,

Just curious :-)

Line number 1173 of if_8139.c <revision 3>:


#ifdef CYGPKG_DEVS_ETH_RLTK_8139_SOFTWARE_CACHE_COHERENCY HAL_DCACHE_INVALIDATE(&rltk8139_info->rx_ring[rx_pos], sizeof(cyg_uint32)); #endif

/*
* The 8139 prepends each packet with a 32 bit packet header that
* contains a 16 bit length and 16 bit status field, in little-endian
* byte order.
*/
header = HAL_LE32TOC(*((volatile cyg_uint32 *)CYGARC_UNCACHED_ADDRESS(&rltk8139_info->rx_ring[rx_pos])));




Here,
1st line of code:
Invalidates the Dcache line for ?header? info <so that, if someone reads it later on; A Dcache line fill will occur & then read out from the Dcache>.


2nd line of code:
Reads the ?header? info directly from the memory & not the cache. So, even if Dcache line invalidate (1st line of code) is not there; this would work fine. Am I right?


So, is the 1st line (Dcache line invalidate) intended to solve cache coherency problem for later access to header info. from the Dcache. Or am I missing something here?

Thanks & Cheers,
-Mike.

_________________________________________________________________
<b>MSN 8:</b> Get 6 months for $9.95/month. http://join.msn.com/?page=dept/dialup



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