|
struct | DISKFUNC |
| ============================================================================= More...
|
|
struct | DISKMEDIAINFO |
| This structure holds information on a medium. Objects with this structure are allocated by the kernel as a part of the DISK structure and are filled by a driver in the 'querymedia' callback. More...
|
|
struct | DISKCACHE |
| This structure represents the disk cache. To follow the old implementation, there are two distinct caches for a disk, one for "system" data,and the other for "application" data. More...
|
|
struct | DISK |
| This structure represents a disk device and its media for the kernel. This structure is allocated by the kernel in the 'disk_add' function, freed in the 'disk_dereference' function. More...
|
|
struct | PARTITION |
| This structure represents one partition for the kernel. This is a base template, the actual contents after common fields is determined by the file system code for this partition. More...
|
|
struct | PARTITION_TABLE_ENTRY |
| This is an external structure, it represents an entry in the partition table. More...
|
|
struct | GPTH |
| GUID Partition Table Header, UEFI 2.6, Table 18. More...
|
|
struct | GPE |
| GPT Partition Entry, UEFI 2.6, Table 19. More...
|
|
|
label | disk_list |
| The pseudo-item for the list of all DISK structures. Initialized to the empty list. More...
|
|
MUTEX | disk_list_mutex |
| This mutex guards all operations with the global list of DISK structures. More...
|
|
dd | partition_buffer_users |
| The function 'disk_scan_partitions' needs three sector-sized buffers for MBR, bootsector and fs-temporary sector data. It can not use the static buffers always, since it can be called for two or more disks in parallel. However, this case is not typical. We reserve three static 512-byte buffers and a flag that these buffers are currently used. If 'disk_scan_partitions' detects that the buffers are currently used, it allocates buffers from the heap. Also, the heap is used when sector size is other than 512. The flag is implemented as a global dword variable. When the static buffers are not used, the value is -1. When the static buffers are used, the value is normally 0 and temporarily can become greater. The function increments this value. If the resulting value is zero, it uses the buffers and decrements the value when the job is done. Otherwise, it immediately decrements the value and uses buffers from the heap, allocated in the beginning and freed in the end. More...
|
|
rb | mbr_buffer |
| The static buffers for MBR, bootsector and fs-temporary sector data. More...
|
|
rb | bootsect_buffer |
|
rb | fs_tmp_buffer |
|
label | disk_default_callbacks |
| This is the array of default implementations of driver callbacks. Same as DRIVERFUNC structure except for the first field; all functions must have the default implementations. More...
|
|
label | disk_add |
| This function registers a disk device. This includes: More...
|
|
label | disk_del |
| This function deletes a disk device from the global filesystem. This includes: More...
|
|
label | disk_dereference |
| This is an internal function which removes a previously obtained reference to the disk. If this is the last reference, this function lets the driver finalize all associated data, and afterwards frees the DISK structure. esi = pointer to DISK structure. More...
|
|
label | disk_media_dereference |
| This is an internal function which removes a previously obtained reference to the media. If this is the last reference, this function calls 'closemedia' callback to signal the driver that the processing has finished and it is safe to inform about a new media. esi = pointer to DISK structure. More...
|
|
label | disk_media_changed |
| This function is called by the driver and informs the kernel that the media has changed. If the media is non-removable, it is called exactly once immediately after 'disk_add' and once from 'disk_del'. Parameters: [esp+4] = handle of the disk, i.e. the pointer to the DISK structure. [esp+8] = new status of the media: zero = no media, nonzero = media inserted. More...
|
|
label | disk_call_driver |
| This function is a thunk for all functions of a disk driver. It checks whether the referenced function is implemented in the driver. If so, this function jumps to the function in the driver. Otherwise, it jumps to the default implementation. al = offset of function in the DISKFUNC structure; esi = pointer to the DISK structure; stack is the same as for the corresponding function except that the first parameter (void* userdata) is prepended automatically. More...
|
|
label | disk_default_querymedia |
| The default implementation of DISKFUNC.querymedia. More...
|
|
label | disk_default_read |
| The default implementation of DISKFUNC.read and DISKFUNC.write. More...
|
|
label | disk_default_write |
|
label | disk_default_close |
| The default implementation of DISKFUNC.close, DISKFUNC.closemedia and DISKFUNC.flush. More...
|
|
label | disk_default_closemedia |
|
label | disk_default_flush |
|
label | disk_default_adjust_cache_size |
| The default implementation of DISKFUNC.adjust_cache_size. More...
|
|
label | disk_scan_partitions |
| This is an internal function called from 'disk_media_changed' when a new media is detected. It creates the list of partitions for the media. If media is not partitioned, then the list consists of one partition which covers all the media. esi = pointer to the DISK structure. More...
|
|
dd | GPEA_len |
| Length of GPT Partition Entry Array in bytes. More...
|
|
label | is_protective_mbr |
| ecx = pointer to partition records array (MBR + 446) More...
|
|
label | is_partition_table_entry |
| This is an internal function called from disk_scan_partitions. It checks whether the entry pointed to by ecx is a valid entry of partition table. The entry is valid if the first byte is 0 or 80h, the first sector plus the length is less than twice the size of media. Multiplication by two is required since the size mentioned in the partition table can be slightly greater than the real size. More...
|
|
label | process_partition_table_entry |
| This is an internal function called from disk_scan_partitions. It processes the entry pointed to by ecx. If the entry is invalid, just ignore this entry. If the type is zero, just ignore this entry. If the type is one of types for extended partition, store the address of this partition as the new MBR in [esp+4]. Otherwise, add the partition to the list of partitions for this disk. We don't use the type from the entry to identify the file system; fs-specific checks do this more reliably. More...
|
|
type | irp |
|
- Check for extended partition. If extended, go to 6. Old Multiuser DOS secured: extended partition
More...
|
|
label | disk_detect_partition |
| This is an internal function called from disk_add_partition. It tries to recognize the file system on the partition and allocates the corresponding PARTITION structure with filesystem-specific fields. More...
|
|
dq | _start |
|
dq | _length |
|
dd | _disk |
|
label | default_fs_functions |
|
label | default_fs_functions_end |
|
label | dyndisk_handler |
| This function is called from file_system_lfn. This handler gets the control each time when fn 70 is called with unknown item of root subdirectory. in: esi = ebp -> path string out: if the handler processes path, it must not return in file_system_lfn, but instead pop return address and return directly to the caller otherwise simply return. More...
|
|
label | fs_dyndisk_next |
| This is a callback for enumerating partitions called from file_system_lfn.maindir in the case of inserted media. It just increments eax until DISK.NumPartitions reached and then cleans up. More...
|
|
label | fs_dyndisk_next_nomedia |
| This is a callback for enumerating partitions called from file_system_lfn.maindir in the case of missing media. In this case we create one pseudo-partition. More...
|
|
label | dyndisk_enum_root |
| This function is called from file_system_lfn. This handler is called when virtual root is enumerated and must return all items which can be handled by this. It is called several times, first time with eax=0 in: eax = 0 for first call, previously returned value for subsequent calls out: eax = 0 => no more items eax != 0 => buffer pointed to by edi contains name of item. More...
|
|
label | eject_disk_media |
| void fastcall eject_disk_media(const char* str, uint32_t code); for load/eject drive ecx -> asciiz string disk name (sd0, usbhd0) edx = code command(0 - LoadTray 1-EjectTray) More...
|
|
dd partition_buffer_users |
The function 'disk_scan_partitions' needs three sector-sized buffers for MBR, bootsector and fs-temporary sector data. It can not use the static buffers always, since it can be called for two or more disks in parallel. However, this case is not typical. We reserve three static 512-byte buffers and a flag that these buffers are currently used. If 'disk_scan_partitions' detects that the buffers are currently used, it allocates buffers from the heap. Also, the heap is used when sector size is other than 512. The flag is implemented as a global dword variable. When the static buffers are not used, the value is -1. When the static buffers are used, the value is normally 0 and temporarily can become greater. The function increments this value. If the resulting value is zero, it uses the buffers and decrements the value when the job is done. Otherwise, it immediately decrements the value and uses buffers from the heap, allocated in the beginning and freed in the end.
- Initial value
- -1
- Source
- blkdev/disk.inc:342