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]
Other format: [Raw text]

Re: HAL_*_STRING


On Wed, 2005-06-15 at 11:28 -0300, Leandro Fanzone wrote:
> Hello,
>          I'm using ecos 2.0 under x86, and tried to use the HAL_*_STRING 
> macros, both for reading and writing. They don't work properly; the 
> assembly output shows that they lack the rep instruction preceding the 
> insb/outsb instructions. So the macros would be:
> 
> #define HAL_READ_UINT8_STRING( _register_, _buf_, _count_)      \
> CYG_MACRO_START                                                 \
>     asm volatile ( "rep insb"                                       \
>                    :                                            \
>                    : "c" (_count_), "d"(_register_), "D"(_buf_) \
>         );                                                      \
> CYG_MACRO_END
> 
> #define HAL_WRITE_UINT8_STRING( _register_, _buf_, _count_)     \
> CYG_MACRO_START                                                 \
>     asm volatile ( "rep outsb"                                      \
>                    :                                            \
>                    : "c" (_count_), "d"(_register_), "S"(_buf_) \
>         );                                                      \
> CYG_MACRO_END
> 
> The same thing for the 16 bit and 32 bit versions.
> Regards,

These macros are only defined as a matter of reference (and then only
by a few HALs since they are not used by the kernel).  In any case,
it makes sense to correct them.

Could you send a proper patch for this to ecos-patches@sourceware.org,
please?  Include the changes for all versions (8/16/32).

Thanks

-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


-- 
Before posting, please read the FAQ: http://ecos.sourceware.org/fom/ecos
and search the list archive: http://ecos.sourceware.org/ml/ecos-discuss


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