none
Include eboot support for a ethernet in CEPC RRS feed

  • Question

  • We have a Micrel KS8841 Ethernet on our x86 board. We got the CE 6.0 driver source from the vendor but without much documentation. In the driver zip file there is a folder called "Eboot Support" inside which I see the following files:

    ks884x.c

    ks884x.h

    sources

    makefile

    I would like to include the eboot support for this Ethernet in my CEPC BSP. What are the steps to do that? I already have a OSDesign created based on the CEPC BSP.

    Thanks.

    Monday, November 8, 2010 6:38 PM

All replies

  • Hi,

    not sure what exactly your vendor meant, but you can look through some folders and then give them a try with this Micrel eboot support files they gave you.

    First, look into their sources file. Do they build a lib ? If so, then try the following way.

    Start from C:\WINCE600\PLATFORM\<your platform>\SRC\BOOTLOADER\EBOOT folder. Look at sources file. Do you see something like

    ...

    TARGETLIBS=\
               $(_PLATCOMMONLIB)\$(_CPUINDPATH)\oal_blcommon.lib      \
    ...

               $(_TARGETPLATROOT)\lib\$(_CPUINDPATH)\Micrel KS8841.lib     \
    ...

    If not, then create the following folder

    C:\WINCE600\PLATFORM\<your platform>\SRC\DRIVERS\Micrel KS8841

    and then copy the files they gave you there. Next modify upper level DIRS file to include this new folder in build. Last change your Sources for Eboot to link to thisMicrel KS8841. lib.

    I may be wrong, since it is difficult to tell without actually looking into vendor specific files.

     

    Best regards

    SergeiR

    Tuesday, November 9, 2010 10:49 PM
  • Hi,

    So I was able to make some progress with the EBOOT. I was able to build a debug library from the source file (ks884x.c). Also I had declare the prototypes of the functions in ks8841.h. Upon building the OS Desgin when I try to boot from EBOOT.bin I get the following error message:

     

    Microsoft Windows CE Bootloader Common Library Version 1.4 Built Nov 12 2010 13:18:08
    Microsoft Windows CE Ethernet Bootloader 3.7 for CE/PC (Nov 12 2010)
    Boot Args @ 0x1FFF00 and ucLoaderFlags is 1
    PCI Device Configurations (1 PCI bus(es) present)...
    ========================================================
    Bus, Device, Function = 0, 9, 0
    Vendor ID, Device ID = 0x16C6, 0x8841
    Base Class, Subclass = 2, 0 => NETWORK_CTLR
    Interrupt = 11
    BaseAddress[0] = 0xE2010000 (Memory)
    =======================================================
    Bus, Device, Function = 0, 14, 0
    Vendor ID, Device ID = 0x8086, 0x1078
    Base Class, Subclass = 2, 0 => NETWORK_CTLR Interrupt = 11
    BaseAddress[0] = 0xE2020000 (Memory)
    BaseAddress[1] = 0xE2040000 (Memory)
    BaseAddress[2] = 0xF800 (I/O)
    ========================================================
    InitKitlNIC: Searching for PCI Ethernet NIC (dwIrq = 0, dwIoBase = 0, dwDfltType = 1.
    InitKitlNIC: Found PCI Ethernet NIC (type = 10, IRQ=11, IOBase=0xE2010000).
    Micrel KS8841 SH 32-bit 1.0.0 (Mar 14, 2006)
    Returned MAC Address:00:00:00:00:00:00
    System ready!
    Preparing for download...
    OEMPreDownload ucLoaderFlags is 0
    x86KitlCreateName: Using Device Name 'CEPCRT'
    Using device name: CEPCRT
    Hit ENTER within 3 seconds to enter static IP address!InitDHCP():: Calling ProcessDH)
    ProcessDHCP()::DHCP_INIT
    !OEMEthSendFrame failure, retry 1
    !OEMEthSendFrame failure, retry 2
    !OEMEthSendFrame failure, retry 3
    !OEMEthSendFrame failure, retry 4
    EbootDHCPRetransmit()::Error On SendUDP() Call
    SendDHCP()::Error On DHCPRetransmit() Call
    ProcessDHCP()::DHCP_INIT::SendDHCP(DHCP_DISCOVER) Error
    InitDHCP() Error - First DHCP Option isn't the message type
    Error On InitDHCP() Call
    Any ideas what's wrong? I have checked the hardware and nothing is wrong with it. Also I noticed that the vendor (Micrel) did not implemented the KS884xInitDMA function into ks884x.c. Could that be the problem?

     

    Friday, November 12, 2010 10:37 PM
  • Hello,

    your build of eboot was successful and it looks good to me, except MAC addresss is reported as all zeroes. Should there be a valid one instead ? EEPROM was not read ?

    Regarding DMA_init I cannot tell, perhaps yes if they use DMA in bootloader to send ethernet frames. If so then you need to initalize DMA prior to using it, and if vendor didn't implement it then you will have to, or ask vendor about it.

    Regards

    SergeiR

    Monday, November 15, 2010 8:16 AM
  • Thanks SergeiR, however my major concern is the following failure messages:

     

    !OEMEthSendFrame failure, retry 1       
    !OEMEthSendFrame failure, retry 2       
    !OEMEthSendFrame failure, retry 3       
    !OEMEthSendFrame failure, retry 4       
    EbootDHCPRetransmit()::Error On SendUDP() Call     
    SendDHCP()::Error On DHCPRetransmit() Call      
    ProcessDHCP()::DHCP_INIT::SendDHCP(DHCP_DISCOVER) Error    
    InitDHCP() Error - First DHCP Option isn't the message type    
    Error On InitDHCP() Call        

     

    The reason I raised question about DMA buffer is because I thought the above SendFrame error messages might be because of that. Also is the failure to get the MAC address a non-trivial issues to continue debugging further?


    Monday, November 15, 2010 7:03 PM
  • Hi,

    I don't really know much about internals of  Micrel KS8841. So I cannot advise how easy or how difficult would be to fix incorrect MAC address problem. But it is the one I would start with first. Once done, then look into DMA issue.

    Hope this helps

    SergeiR

    Monday, November 15, 2010 8:59 PM