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: Re: Romboot in i386 (continued) - comms. problems


>>Try looking in the file ".../hal/i386/pcmb/current/src/pcmb_serial.c"
>>You'll see that the FIFOs are explicitly *not* turned on.  You
>>can experiment
>>with that code a bit and see what works for you.
>>

Yes - that's what I've been referring to. Apologies for my lack of clarity.

What I was trying to say was that the FIFOs are not enabled in the
following code snippet (from pcmb_serial.c)

static void
cyg_hal_plf_serial_init_channel(void* __ch_data)
{
    cyg_uint16 base = ((channel_data_t*)__ch_data)->base;

    HAL_WRITE_UINT8(base+CYG_DEV_IER, 0);
    HAL_WRITE_UINT8(base+CYG_DEV_IER, 0);
    HAL_WRITE_UINT8(base+CYG_DEV_MCR, 0);

    HAL_WRITE_UINT8(base+CYG_DEV_LCR, SIO_LCR_DLAB);
    HAL_WRITE_UINT8(base+CYG_DEV_DLL, CYG_DEVICE_SERIAL_BAUD_LSB);
    HAL_WRITE_UINT8(base+CYG_DEV_DLM, CYG_DEVICE_SERIAL_BAUD_MSB);
    // 8-1-no parity.
    HAL_WRITE_UINT8(base+CYG_DEV_LCR, SIO_LCR_WLS0 | SIO_LCR_WLS1);

//    HAL_WRITE_UINT8(base+CYG_DEV_FCR, 0x07);  // Enable & clear FIFO
}

They aren't *disabled* either - so the FIFOs aren't necessarily disabled.
Only an issue
if you have a couple of different loader programs chaining each other as we
do here.

I take your point that I can enable the FIFOs and add code to the handler to
deal with this.
However, to support FIFOs I need to buffer up the incoming characters on
each
cyg_hal_plf_serial_getc_nonblock() call.

I'm happy enough to do this but I'd prefer to just reuse the existing eCos
16x5x code
rather than putting something new together. I just wondered if this was
likely to prove
a problem ? Particularly if there is something difficult about the i386
protected mode
setup of which I am unaware...

Regards,

 Alex




_____________________________________________________________________
This message has been checked for all known viruses by UUNET delivered 
through the MessageLabs Virus Control Centre. For further information visit
http://www.uk.uu.net/products/security/virus/


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