Hobrla, a developer on the Windows CE Embedded BSP (board support package) team, begins by taking a look at the architecture of the x86 KITL. At the lowest level, he writes, there is the driver code that supports a NIC (network interface card). This code implements the functions in the OAL_KITL_ETH_DRIVER structure.
Because x86 supports a PCI bus, there may be multiple supported chips, such as the RTL8139 chip or NE2000 compatible chips, among others. Each NIC will have its own OAL_KITL_ETH_DRIVER structure, which plugs into a larger structure known as SUPPORTED_NIC. The latter lists all of the drivers the platform supports, according to Hobrla.
The SUPPORTED_NIC structure is compiled into a library (oal_kitl_x86.lib) that a bootloader and KITL will link with, the post continues. At device boot time, the bootloader reads the PCI Config space and finds network-class devices with a PCI Vendor ID that matches one in the SUPPORTED_NIC list.
If it can't find such a device, Hobrla adds, it will check the Adapter Type in the SUPPORTED_NIC list and match it against the default adapter type that's compiled into the bootloader. Once it finds a match, it will use the driver to download the OS image and then begin execution at the OS level.
The remainder of the post describes how to perform operations such as creating a OAL_KITL_ETH_DRIVER structure that supports a new NIC, then pointing the bootloader and KITL implementations so they link with a new driver list.
At the end of the process, it's possible to rebuild the BSP. Then, according to the author, the resultant bootloader and OS image will support the new NIC.
To read Hobrla's post, "Adding and removing KITL drivers in x86 BSPs," visit the CE Base Team blog,
here.
Related stories: