Download fulltext - KTH DiVA
Transcript
88 CHAPTER 4. RAM DISK DRIVE PROTOTYPE EFI_BLOCK_WRITE function It needs the following arguments: • A pointer to the EFI_BLOCK_IO_PROTOCOL instance. • The id of the media in which the write operation has been requested. • The starting logical block address to write on the device. • A pointer to a data buffer where the data which is going to be written to the device is stored and the buffer’s size. It is used to write blocks. All the requested blocks are written, or an error is returned. It is implemented in the RAM Disk source code. EFI_BLOCK_FLUSH function Its only argument is a pointer to the EFI_BLOCK_IO_PROTOCOL instance. It is implemented in the RAM Disk source code. 4.5 4.5.1 Final RAM Disk driver prototype implementation Differences of the final prototype with the EFI Toolkit’s driver The final prototype uses the EFI Toolkit RAM Disk driver as a starting point. The mounted file system is a FAT16 file system. The driver is loaded with the rest of the components of the BIOS. Some messages about the status of the loading operation are printed in the standard output while it is loaded. The driver differs from the one which is present in the EFI Toolkit in several aspects: • The Toolkit’s driver is loaded using the functions present in the Toolkit’s libraries. The libraries are a simpler version of the Standard C libraries. They also include some UEFI functions. It would be difficult to include all these libraries in the BIOS. It would not be an optimal solution. Consequently, a version of nearly all the library functions needed by the RAM Disk driver was searched and found in the GEP BIOS available libraries which are allocated in the GEP BIOS ROM. There were also some functions which were not found in the BIOS. Therefore they were ported from the Toolkit’s libraries to the BIOS. Nevertheless, the number of these functions (as it will be shown in the following sections) is not big.