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: i386 pc target device driver



Hi, maybe I can help--

On Fri, 28 Jul 2000, pyxue wrote:

>         First, can I use bios interrupt?  In i386 code platform.inc I find
> that int13 is used to get the size of ram. While when I use int16 to get
> the data of keyboard, I meet the SIGSENV, segmention error. I try this
> both in the vectros.S and my application, the same result.

This isn't possible in the current version of the HAL.  The BIOS expects
to run in real mode (16-bit segments and offsets--backward compatibility
mode), but eCos runs in Protected (32-bit offsets--the simple way which
'C' pointers work) mode.  We called the BIOS to find out the size of RAM
*before* switching to protected mode; once we've switched, the BIOS is off
limits.  The common solution is to provide a 'virtual x86' mode, which is
supported in the '386, but enabling this opens a really huge can of worms.  
You might post the specific routines that you're interested in, as I
imagine that a much better solution than switching memory modes is to
incorporate an already exisiting device driver from Linux instead.

>         Second, I find I can't set break point in some places, such as
> cyg_hal_invoke_constructors.

It's important to check to see if the breakpoint stub (and the interrupt
vectors themselves) are set up at the time the breakpoint is
invoked...  While I haven't looked at it, I'd guess that the constructors
are called before the stub is installed...  and I'm guessing that this
needs to be discussed before any code is changed.

Hope this helps...
-patrick



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