Implementing the OEMKitlInit Function (Windows CE 5.0)

Send Feedback

The following list shows the suggested tasks for the OEMKitlInit function.

To implement the OEMKitlInit function

  • Locate the KITL NIC, typically through driver globals. The KITL NIC is usually the same NIC used by the boot loader for download operations.

  • Assign function pointers to the correct EDBG NIC driver functions. If the necessary EDBG driver is not provided, you will need to create your own. The following code example shows how you can assign function pointers to an EDBG NIC driver.

    pfnEDbgInit           = NE2000Init;
    pfnEDbgInitDMA        = NULL;
    pfnEDbgEnableInts     = NE2000EnableInts;
    pfnEDbgDisableInts    = NE2000DisableInts;
    pfnEDbgGetPendingInts = NE2000GetPendingInts;
    pfnEDbgGetFrame       = NE2000GetFrame;
    pfnEDbgSendFrame      = NE2000SendFrame;
    pfnEDbgReadEEPROM     = NE2000ReadEEPROM;
    pfnEDbgWriteEEPROM    = NE2000WriteEEPROM;
    pfnEDbgSetOptions     = NE2000SetOptions;
    pfnCurrentPacketFilter= Ne2000CurrentPacketFilter;
    pfnMulticastList      = NE2000MulticastList;
    
  • Include the library in the %_WINCEROOT%\Platform\<Hardware Platform Name>\Src\Kernel\Kernkitl sources file to satisfy the linker if any KITL driver support is required.

  • Initialize the DMA buffers for the NIC, if required, and then initialize the NIC by calling the pfnEdbgInitDMABuffer or pfnEdbgInit, or both, function pointers. The NIC initialization function takes a NIC address and returns a MAC value for the NIC, which should be stored in the driver globals.

  • Create a unique device name, which will be used as a handle by Platform Builder.

    Note   The device name must be the same as the one used by the boot loader.

  • Obtain an IP address from a DHCP server using the EbootGetDHCPAddr function or through a static IP address. If you are obtaining the IP address from a DHCP server, include Eboot.lib in the Kernel\Kernkitl sources file.

  • Initialize the KITL Ethernet transport code by calling the KitlEtherInit function. If the call succeeds, fill out the KITLTRANSPORT structure.

  • Implement the following OEM Ethernet functions:

During the call to OEMKitlInit, you provide the following information that the kernel will need to support KITL high-level functionality:

  • Complete the KITLTRANSPORT structure that describes what services to start on boot
  • Determine whether it is a cold boot
  • Provide the name of the device
  • Provide an interrupt number for interrupt based devices
  • Provide the window size for default services
  • Provide the size of the frame header specific to your transport
  • Provide the size of the frame trailer specific to your transport
  • Provide the size of the physical buffer for default services
  • Provide function pointers to the transport-specific functions described above

When the kernel returns from OEMInit, it tries to initialize the KITL interrupt by calling the TransportEnableInt member of the KITLTRANSPORT structure. TransportEnableInt is also called when a device resumes from a suspended state.

See Also

How to Develop an OEM Adaptation Layer | Adding KITL Initialization Code

Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.