Share via


What’s New in the x86 BIOS Boot Loader for Windows Embedded CE 6.0 R2

1/5/2010

The following features and updates are included in the x86 BIOS Boot Loader for Windows Embedded CE 6.0 R2.

These features assume that you included support for x86 microprocessors when you installed Platform Builder. If you did not, reinstall Platform Builder and include support for x86 microprocessors.

Disk Partitioning Utility

DiskPart, a new disk partitioning utility has been included in this release of DiskPart is an example utility to partition a disk, and to write the metadata on the disk from which you want to boot a Windows Embedded CE image. It also shows examples of data and code for accessing extended FAT partitions in Windows Embedded CE 6.0 R2.

DiskPart is included in source format, and is located in the %_WINCEROOT%\Platform\CEPC\Src\Bootloader\Utilities\Diskpart directory.

For more information about how to use the DiskPart utility, see DiskPart Utility.

Source Code Changes

To enable Windows Embedded CE to boot from a FAT32 or an Extended FAT File System (ExFAT) partition, the boot sector and boot loader source code was modified to recognize the new file systems.

Ee478356.collapse(en-US,WinEmbedded.60).gifBoot Sector

The boot sector is written completely in x86 assembly language. Because the processor runs in real mode when this code executes, everything must be 16-bit code, and must fit into a very small address range. Because the additional code needed to support FAT12, FAT16, FAT32, and ExFAT together is so large, the boot sector source code for each supported file system has been separated into different programs. This means there is one boot sector for each file system.

The main difference between the file systems is in reading the BIOS parameter block (BPB). This is a file system-specific part of metadata that is used to find the root directory for each of these file systems.

The following shows specific changes to the boot sector:

  • BPB has been extended to support FAT32 and ExFAT.
  • Separated the floppy disk code to a separate directory.
  • Added extended BIOS-read functions to the hard disk code. This enables systems to read beyond 8.4 GB of disk space.
  • Modified code to locate the root directory and the first data sector for FAT32 and ExFAT.
  • Updated GetBSect.scr with the new location of the starting code and the new size of the file because of changes in the BPB. This is used to assemble the boot sector so that the BIOS can execute it correctly.
  • These changes enable the boot loader to locate the boot data on the larger partitions in FAT32 and ExFAT file systems.

Ee478356.collapse(en-US,WinEmbedded.60).gifBoot Loader

When the boot loader is first loaded into memory, it is still running in 16-bit mode and restrained to a very small size. Therefore, the boot loader code separates into different programs for each file system. Because the code is in the C language instead of assembly, it uses a base library that is the common code used by all the boot loaders. Only the file system-specific code is separate.

The following list shows specific changes to the boot loader:

  • The utility functions such as IsDataCluster and IsRsvdCluster changed to use required data values to access FAT32 and exFAT partitions, instead of FAT12 and FAT16. These use different data values.
  • The boot loader checks the BPB variable FATType, in the structure g_FatParms, for the correct value during execution. However, the value is no longer stored for later use.
  • Modified FsOpenFile to search through the whole root directory, instead of a fixed number of directory entries.
  • The entry size of the FAT element has been increased to 4 bytes for FAT32 and ExFAT. It remains 12 bits FAT12 and 2 bytes for FAT16.
  • Included support for extended BIOS read functions.
  • These changes enable the boot loader to access data on the larger partitions in FAT32 and ExFAT file systems.

Source Code Directory Structure Changes

Because the source code has been broken up by file system type, the directory structure has been modified.

Ee478356.collapse(en-US,WinEmbedded.60).gifBoot Sector

As of Windows Embedded CE 6.0 R2, the boot sector code is located in the following files:

%WINCEROOT%\Platform\CEPC\Src\Bootloader\Biosloader\Bootsector\<file system>\bsect.asm

%WINCEROOT%\Platform\CEPC\Src\Bootloader\Biosloader\Bootsector\<file system>\getbsect.scr

Ee478356.collapse(en-US,WinEmbedded.60).gifBoot Loader

As of Windows Embedded CE 6.0 R2, the boot loader code is located in separate directories for floppy disk support, and hard disk support. The floppy disk code is located in the %WINCEROOT%\Platform\CEPC\Src\Bootloader\Biosloader\Loader\Floppy directory, and the hard disk code is located in the %WINCEROOT%\Platform\CEPC\Src\Bootloader\Biosloader\Loader\Fixed\<file system> directory.

See Also

Concepts

x86 BIOS Boot Loader
x86 BSPs
Boot Sector

Other Resources

Developing a Boot Loader
File Systems and Storage Management Reference
FAT File System