public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* [ECOS] HAL_READ_XXX_VECTOR and HAL_WRITE_XXX_VECTOR ?
@ 2000-08-08 19:57 Fabrice Gautier
  2000-08-09  3:45 ` Nick Garnett
  0 siblings, 1 reply; 4+ messages in thread
From: Fabrice Gautier @ 2000-08-08 19:57 UTC (permalink / raw)
  To: Ecos-List (E-mail)

Hi,

What are those two macros supposed to do?

Read/Write _count_ values from _register_  ?
or
Read/Write 1 value from _count_  registers (starting from _register_ ) ?

In the x86 context, the first would be something like 

while(i<_count_) outb(_register_,_value_[i]);

and the second

while(i<_count_) outb(_register_+_count_,_value_[i]);

Anyway: Where are those macros used ?

Thank you
A+
-- 
Fabrice Gautier
fabrice_gautier@sdesigns.com 





^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] HAL_READ_XXX_VECTOR and HAL_WRITE_XXX_VECTOR ?
  2000-08-08 19:57 [ECOS] HAL_READ_XXX_VECTOR and HAL_WRITE_XXX_VECTOR ? Fabrice Gautier
@ 2000-08-09  3:45 ` Nick Garnett
  0 siblings, 0 replies; 4+ messages in thread
From: Nick Garnett @ 2000-08-09  3:45 UTC (permalink / raw)
  To: ecos-discuss

Fabrice Gautier <Fabrice_Gautier@sdesigns.com> writes:

> Hi,
> 
> What are those two macros supposed to do?
> 

> Read/Write _count_ values from _register_  ?

> while(i<_count_) outb(_register_,_value_[i]);

This is the more useful definition for this since it will support
things like program IO on IDE.

> Anyway: Where are those macros used ?

Probably nowhere at present.


-- 
Nick Garnett, eCos Kernel Architect
Red Hat, Cambridge, UK

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] HAL_READ_XXX_VECTOR and HAL_WRITE_XXX_VECTOR ?
  2000-08-09 10:20 Fabrice Gautier
@ 2000-08-10  3:30 ` Nick Garnett
  0 siblings, 0 replies; 4+ messages in thread
From: Nick Garnett @ 2000-08-10  3:30 UTC (permalink / raw)
  To: ecos-discuss

Fabrice Gautier <Fabrice_Gautier@sdesigns.com> writes:

> > -----Original Message-----
> > From: Nick Garnett [ mailto:nickg@cygnus.co.uk ]
> > Subject: Re: [ECOS] HAL_READ_XXX_VECTOR and HAL_WRITE_XXX_VECTOR ?
> > 
> > > Hi,
> > > 
> > > What are those two macros supposed to do?
> > > 
> > 
> > > Read/Write _count_ values from _register_  ?
> > 
> > > while(i<_count_) outb(_register_,_value_[i]);
> > 
> > This is the more useful definition for this since it will support
> > things like program IO on IDE.
> 
> Yes, I agree, but strangely, it seems that the ARM implementation (wich is
> exactly the same for current i386) is otherwise. And what should the _step_
> argument in those macro be used for?

I suspect that the ARM and current i386 versions are just whatever the
default implementation turned out to be. 

The idea of the _step_ argument is to account for any gaps between
registers caused by bus or addressing alignment. For example, with a
64 bit bus registers may be mapped only every 8 bytes and not
consecutively. So we would set _step_ to 8. In the i386 case, this it
probably irrelevant and should just be ignored.

What we probably really need is two versions of the vector macros, one
that steps through an array of registers and one that just
reads/writes a single register repeatedly.

-- 
Nick Garnett, eCos Kernel Architect
Red Hat, Cambridge, UK

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [ECOS] HAL_READ_XXX_VECTOR and HAL_WRITE_XXX_VECTOR ?
@ 2000-08-09 10:20 Fabrice Gautier
  2000-08-10  3:30 ` Nick Garnett
  0 siblings, 1 reply; 4+ messages in thread
From: Fabrice Gautier @ 2000-08-09 10:20 UTC (permalink / raw)
  To: ecos-discuss

> -----Original Message-----
> From: Nick Garnett [ mailto:nickg@cygnus.co.uk ]
> Subject: Re: [ECOS] HAL_READ_XXX_VECTOR and HAL_WRITE_XXX_VECTOR ?
> 
> > Hi,
> > 
> > What are those two macros supposed to do?
> > 
> 
> > Read/Write _count_ values from _register_  ?
> 
> > while(i<_count_) outb(_register_,_value_[i]);
> 
> This is the more useful definition for this since it will support
> things like program IO on IDE.

Yes, I agree, but strangely, it seems that the ARM implementation (wich is
exactly the same for current i386) is otherwise. And what should the _step_
argument in those macro be used for?
 

> > Anyway: Where are those macros used ?
> 
> Probably nowhere at present.



Thanks

A+

-- 
Fabrice Gautier
fabrice_gautier@sdesigns.com 

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2000-08-10  3:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-08-08 19:57 [ECOS] HAL_READ_XXX_VECTOR and HAL_WRITE_XXX_VECTOR ? Fabrice Gautier
2000-08-09  3:45 ` Nick Garnett
2000-08-09 10:20 Fabrice Gautier
2000-08-10  3:30 ` Nick Garnett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).