drivers/ras/amd/atl/prm.c

Source file repositories/reference/linux-study-clean/drivers/ras/amd/atl/prm.c

File Facts

System
Linux kernel
Corpus path
drivers/ras/amd/atl/prm.c
Extension
.c
Size
1306 bytes
Lines
54
Domain
Driver Families
Bucket
drivers/ras
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.

Dependency Surface

Detected Declarations

Annotated Snippet

struct norm_to_sys_param_buf {
	u64 norm_addr;
	u8 socket;
	u64 bank_id;
	void *out_buf;
} __packed;

unsigned long prm_umc_norm_to_sys_addr(u8 socket_id, u64 bank_id, unsigned long addr)
{
	struct norm_to_sys_param_buf p_buf;
	unsigned long ret_addr;
	int ret;

	p_buf.norm_addr = addr;
	p_buf.socket    = socket_id;
	p_buf.bank_id   = bank_id;
	p_buf.out_buf   = &ret_addr;

	ret = acpi_call_prm_handler(norm_to_sys_guid, &p_buf);
	if (!ret)
		return ret_addr;

	if (ret == -ENODEV)
		pr_debug("PRM module/handler not available\n");
	else
		pr_notice_once("PRM address translation failed\n");

	return ret;
}

Annotation

Implementation Notes