|
ra8-firmware 0.1.0
Bare-metal firmware for the Renesas RA8 family (RA8D2 / RA8P1)
|
Cross-TU prototypes for the GPT partition locators. More...
Go to the source code of this file.
Functions | |
| ra8_err_t | priv_gpt_locate_volume (const ra8_fs_mount_t *m, uint64_t *out_base) |
| Locate the first mountable partition on a GPT disk (auto-select). | |
| ra8_err_t | priv_gpt_locate_partition (const ra8_fs_mount_t *m, uint8_t index, uint64_t *out_base) |
| Locate a GPT partition chosen by entry-array index. | |
Cross-TU prototypes for the GPT partition locators.
The two entry points ra8_fs_fat_gpt.c offers the mount path: locate the first mountable partition on a GPT disk, and locate one by entry index. Split out as a themed sub-header (like the exFAT stream and directory seams) rather than grown onto the alphabetical prototype headers, which sit against the source-size cap.
Definition in file ra8_fs_fat_gpt_internal.h.
| ra8_err_t priv_gpt_locate_partition | ( | const ra8_fs_mount_t * | m, |
| uint8_t | index, | ||
| uint64_t * | out_base ) |
Locate a GPT partition chosen by entry-array index.
Reads the header geometry via ::priv_gpt_read_geom, bounds-checks index against the (clamped) entry count, reads the sector holding that entry, and validates it via ::priv_gpt_entry_select.
| [in,out] | m | Mount whose backend supplies the sectors. |
| [in] | index | Zero-based GPT entry-array index. |
| [out] | out_base | Receives the selected partition's first LBA. |
| k_ra8_ok | out_base holds the volume base. |
| k_ra8_err_out_of_range | index is past the entry count. |
| k_ra8_err_not_found | The selected entry is empty. |
| k_ra8_err_not_supported | Entry-array geometry, or an entry LBA, this backend cannot address. |
| k_ra8_err_validation_failed | No header, or a malformed entry. |
| k_ra8_err_* | Backend read failure. |
out_base is non-NULL. out_base holds a non-zero LBA. Definition at line 317 of file ra8_fs_fat_gpt.c.
References g_fs_scratch, internal_gpt_entry_select(), internal_gpt_read_geom(), k_gpt_entry_bytes, k_ra8_err_out_of_range, k_ra8_ok, priv_bps(), and priv_read_sector().
Referenced by internal_locate_indexed().
| ra8_err_t priv_gpt_locate_volume | ( | const ra8_fs_mount_t * | m, |
| uint64_t * | out_base ) |
Locate the first mountable partition on a GPT disk (auto-select).
Reads the header geometry via ::priv_gpt_read_geom, then scans the entries via ::priv_gpt_scan_entries (Microsoft Basic Data preferred, else the first allocated entry of any type).
| [in,out] | m | Mount whose backend supplies the sectors. |
| [out] | out_base | Receives the chosen partition's first LBA. |
| k_ra8_ok | out_base holds the volume base. |
| k_ra8_err_validation_failed | No "EFI PART" header at LBA 1. |
| k_ra8_err_not_supported | Non-standard entry size or array LBA. |
| k_ra8_err_* | Backend read failure or no entry found. |
out_base is non-NULL. out_base holds a non-zero LBA. Definition at line 263 of file ra8_fs_fat_gpt.c.
References internal_gpt_read_geom(), internal_gpt_scan_entries(), and k_ra8_ok.
Referenced by internal_read_boot_sector().