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: hal_vsr_table for i386.


Fabrice Gautier <Fabrice_Gautier@sdesigns.com> writes:

> Hi,
> 
> Currently, in the i386 hal (and in all the other archs) hal_vsr_table is
> defined as a:
> CYG_ADDRESS  hal_vsr_table[CYGNUM_HAL_VSR_COUNT]
> 
> But this doesn't match the reality of the VSR table which for the i386 has
> 64bit entries.
> 
> Does it matter a lot if hal_vsr_table has another type than the current one?
> Or Is it better if this structure is kept as is, and maintened up to date
> with the table really used by the CPU?
> 

The VSR table should still be just simple address entries. It's the
IDT that has 64bit entries. If you want to use the IDT as the VSR
table, then don't call it the VSR table at all. The way in which the
HAL maps incoming exceptions into VSRs should be invisisble to the
rest of the code.

Actually, thinking about it, using the IDT as the VSR table is
probably a bad idea. The i386 architecture has no way of finding out
what the cause of an exception was other than the address of the code
called from the IDT. Hence each IDT table slot needs to point to a
piece of code that pushes a vector number on the stack and then calls
the VSR, just like the code in plf_stub.c currently does.


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

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