ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
Loading...
Searching...
No Matches
ra8_fs_mount_t Struct Reference

Cached parse of one mounted FAT volume. More...

#include <ra8_fs_types.h>

Collaboration diagram for ra8_fs_mount_t:

Data Fields

ra8_fs_backend_t backend
 Block-device backend.
ra8_fs_type_t type
 FAT12 / FAT16 / FAT32.
uint32_t bytes_per_sector
 Sector size (BPB / VBR == backend).
uint32_t sectors_per_cluster
 BPB BPB_SecPerClus.
uint32_t reserved_sectors
 BPB BPB_RsvdSecCnt.
uint32_t num_fats
 BPB BPB_NumFATs.
uint32_t root_entries
 BPB BPB_RootEntCnt (FAT12/16).
uint64_t total_sectors
 BPB TotSec / exFAT VolumeLength.
uint32_t fat_size_sectors
 BPB BPB_FATSz16 / BPB_FATSz32.
uint32_t root_cluster
 BPB BPB_RootClus (FAT32 only).
uint64_t first_fat_lba
 Computed: first FAT sector.
uint64_t first_root_lba
 FAT12/16 fixed root-dir start.
uint64_t first_data_lba
 First sector of the data region.
uint32_t count_of_clusters
 Per MS spec: data_sectors / SPC.
uint64_t partition_base_lba
 MBR/GPT partition start (0 = superfloppy).
uint8_t in_use
 0 = slot free, 1 = mounted.
uint8_t exfat_upcase_ok
 exFAT: volume's up-case table is ours.

Detailed Description

Cached parse of one mounted FAT volume.

Populated by ra8_fs_mount() from the on-disk BPB. The struct is intentionally exposed so callers can statically allocate it; treat the fields as read-only.

Definition at line 244 of file ra8_fs_types.h.

Field Documentation

◆ backend

ra8_fs_backend_t ra8_fs_mount_t::backend

Block-device backend.

Definition at line 245 of file ra8_fs_types.h.

Referenced by internal_probe_locked(), priv_read_sector(), and priv_write_sector().

◆ bytes_per_sector

uint32_t ra8_fs_mount_t::bytes_per_sector

Sector size (BPB / VBR == backend).

Definition at line 247 of file ra8_fs_types.h.

Referenced by internal_exfat_parse(), internal_mount_probe_bps(), priv_bps(), priv_cluster_bytes(), priv_dir_eps(), and priv_parse_bpb_into_mount().

◆ count_of_clusters

◆ exfat_upcase_ok

uint8_t ra8_fs_mount_t::exfat_upcase_ok

exFAT: volume's up-case table is ours.

Definition at line 261 of file ra8_fs_types.h.

Referenced by priv_exfat_name_to_units(), and priv_exfat_upcase_verify().

◆ fat_size_sectors

uint32_t ra8_fs_mount_t::fat_size_sectors

BPB BPB_FATSz16 / BPB_FATSz32.

Definition at line 253 of file ra8_fs_types.h.

Referenced by internal_compute_geometry(), internal_exfat_parse(), internal_lba_is_cacheable(), priv_fat_set(), and priv_parse_bpb_into_mount().

◆ first_data_lba

uint64_t ra8_fs_mount_t::first_data_lba

First sector of the data region.

Definition at line 257 of file ra8_fs_types.h.

Referenced by internal_compute_geometry(), internal_exfat_parse(), and priv_cluster_to_lba().

◆ first_fat_lba

uint64_t ra8_fs_mount_t::first_fat_lba

Computed: first FAT sector.

Definition at line 255 of file ra8_fs_types.h.

Referenced by internal_compute_geometry(), internal_exfat_parse(), internal_lba_is_cacheable(), priv_fat_get(), and priv_fat_set().

◆ first_root_lba

uint64_t ra8_fs_mount_t::first_root_lba

FAT12/16 fixed root-dir start.

Definition at line 256 of file ra8_fs_types.h.

Referenced by internal_compute_geometry(), internal_dir_walk_init_root(), internal_exfat_parse(), and internal_fat_scan_fixed_root().

◆ in_use

uint8_t ra8_fs_mount_t::in_use

0 = slot free, 1 = mounted.

Definition at line 260 of file ra8_fs_types.h.

Referenced by fw_fs_ra8_vfs_init(), and priv_open_locked().

◆ num_fats

uint32_t ra8_fs_mount_t::num_fats

BPB BPB_NumFATs.

Definition at line 250 of file ra8_fs_types.h.

Referenced by internal_compute_geometry(), internal_exfat_parse(), priv_fat_set(), and priv_parse_bpb_into_mount().

◆ partition_base_lba

uint64_t ra8_fs_mount_t::partition_base_lba

MBR/GPT partition start (0 = superfloppy).

Definition at line 259 of file ra8_fs_types.h.

Referenced by internal_read_boot_sector(), priv_read_sector(), and priv_write_sector().

◆ reserved_sectors

uint32_t ra8_fs_mount_t::reserved_sectors

◆ root_cluster

uint32_t ra8_fs_mount_t::root_cluster

◆ root_entries

uint32_t ra8_fs_mount_t::root_entries

◆ sectors_per_cluster

◆ total_sectors

uint64_t ra8_fs_mount_t::total_sectors

BPB TotSec / exFAT VolumeLength.

Definition at line 252 of file ra8_fs_types.h.

Referenced by internal_compute_geometry(), internal_exfat_parse(), and priv_parse_bpb_into_mount().

◆ type


The documentation for this struct was generated from the following file: