drivers/gpu/drm/nouveau/nvkm/nvfw/ls.c
Source file repositories/reference/linux-study-clean/drivers/gpu/drm/nouveau/nvkm/nvfw/ls.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/gpu/drm/nouveau/nvkm/nvfw/ls.c- Extension
.c- Size
- 7316 bytes
- Lines
- 181
- Domain
- Driver Families
- Bucket
- drivers/gpu
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
core/subdev.hnvfw/ls.h
Detected Declarations
function filesfunction nvfw_ls_descfunction nvfw_ls_desc_v1function nvfw_ls_desc_v2function nvfw_ls_hsbl_bin_hdrfunction nvfw_ls_hsbl_hdr
Annotated Snippet
#include <core/subdev.h>
#include <nvfw/ls.h>
static void
nvfw_ls_desc_head(struct nvkm_subdev *subdev,
const struct nvfw_ls_desc_head *hdr)
{
char *date;
nvkm_debug(subdev, "lsUcodeImgDesc:\n");
nvkm_debug(subdev, "\tdescriptorSize : %d\n",
hdr->descriptor_size);
nvkm_debug(subdev, "\timageSize : %d\n", hdr->image_size);
nvkm_debug(subdev, "\ttoolsVersion : 0x%x\n",
hdr->tools_version);
nvkm_debug(subdev, "\tappVersion : 0x%x\n", hdr->app_version);
date = kstrndup(hdr->date, sizeof(hdr->date), GFP_KERNEL);
nvkm_debug(subdev, "\tdate : %s\n", date);
kfree(date);
nvkm_debug(subdev, "\tbootloaderStartOffset: 0x%x\n",
hdr->bootloader_start_offset);
nvkm_debug(subdev, "\tbootloaderSize : 0x%x\n",
hdr->bootloader_size);
nvkm_debug(subdev, "\tbootloaderImemOffset : 0x%x\n",
hdr->bootloader_imem_offset);
nvkm_debug(subdev, "\tbootloaderEntryPoint : 0x%x\n",
hdr->bootloader_entry_point);
nvkm_debug(subdev, "\tappStartOffset : 0x%x\n",
hdr->app_start_offset);
nvkm_debug(subdev, "\tappSize : 0x%x\n", hdr->app_size);
nvkm_debug(subdev, "\tappImemOffset : 0x%x\n",
hdr->app_imem_offset);
nvkm_debug(subdev, "\tappImemEntry : 0x%x\n",
hdr->app_imem_entry);
nvkm_debug(subdev, "\tappDmemOffset : 0x%x\n",
hdr->app_dmem_offset);
nvkm_debug(subdev, "\tappResidentCodeOffset: 0x%x\n",
hdr->app_resident_code_offset);
nvkm_debug(subdev, "\tappResidentCodeSize : 0x%x\n",
hdr->app_resident_code_size);
nvkm_debug(subdev, "\tappResidentDataOffset: 0x%x\n",
hdr->app_resident_data_offset);
nvkm_debug(subdev, "\tappResidentDataSize : 0x%x\n",
hdr->app_resident_data_size);
}
const struct nvfw_ls_desc *
nvfw_ls_desc(struct nvkm_subdev *subdev, const void *data)
{
const struct nvfw_ls_desc *hdr = data;
int i;
nvfw_ls_desc_head(subdev, &hdr->head);
nvkm_debug(subdev, "\tnbOverlays : %d\n", hdr->nb_overlays);
for (i = 0; i < ARRAY_SIZE(hdr->load_ovl); i++) {
nvkm_debug(subdev, "\tloadOvl[%d] : 0x%x %d\n", i,
hdr->load_ovl[i].start, hdr->load_ovl[i].size);
}
nvkm_debug(subdev, "\tcompressed : %d\n", hdr->compressed);
return hdr;
}
const struct nvfw_ls_desc_v1 *
nvfw_ls_desc_v1(struct nvkm_subdev *subdev, const void *data)
{
const struct nvfw_ls_desc_v1 *hdr = data;
int i;
nvfw_ls_desc_head(subdev, &hdr->head);
nvkm_debug(subdev, "\tnbImemOverlays : %d\n",
hdr->nb_imem_overlays);
nvkm_debug(subdev, "\tnbDmemOverlays : %d\n",
hdr->nb_imem_overlays);
for (i = 0; i < ARRAY_SIZE(hdr->load_ovl); i++) {
nvkm_debug(subdev, "\tloadOvl[%2d] : 0x%x %d\n", i,
hdr->load_ovl[i].start, hdr->load_ovl[i].size);
}
nvkm_debug(subdev, "\tcompressed : %d\n", hdr->compressed);
return hdr;
}
const struct nvfw_ls_desc_v2 *
nvfw_ls_desc_v2(struct nvkm_subdev *subdev, const void *data)
Annotation
- Immediate include surface: `core/subdev.h`, `nvfw/ls.h`.
- Detected declarations: `function files`, `function nvfw_ls_desc`, `function nvfw_ls_desc_v1`, `function nvfw_ls_desc_v2`, `function nvfw_ls_hsbl_bin_hdr`, `function nvfw_ls_hsbl_hdr`.
- Atlas domain: Driver Families / drivers/gpu.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.