arch/parisc/kernel/firmware.c
Source file repositories/reference/linux-study-clean/arch/parisc/kernel/firmware.c
File Facts
- System
- Linux kernel
- Corpus path
arch/parisc/kernel/firmware.c- Extension
.c- Size
- 54612 bytes
- Lines
- 1958
- Domain
- Architecture Layer
- Bucket
- arch/parisc
- Inferred role
- Architecture Layer: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- CPU and platform-specific kernel glue: boot entry, traps, syscall entry, interrupts, page tables, context switch, and low-level barriers.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/stdarg.hlinux/delay.hlinux/init.hlinux/kernel.hlinux/module.hlinux/string.hlinux/spinlock.hasm/page.hasm/pdc.hasm/pdcpat.hasm/processor.h
Detected Declarations
struct narrow_stackstruct wide_stackfunction f_extendfunction convert_to_widefunction set_firmware_width_unlockedfunction set_firmware_widthfunction set_firmware_width_unlockedfunction set_firmware_widthfunction pdc_emergency_unlockfunction PDC_OKfunction PDC_OKfunction pdc_chassis_infofunction pdc_pat_chassis_send_logfunction pdc_chassis_dispfunction __pdc_cpu_rendezvousfunction pdc_cpu_rendezvous_lockfunction pdc_cpu_rendezvous_unlockfunction pdc_pat_get_PDC_entrypointfunction pdc_chassis_warnfunction pdc_coproc_cfg_unlockedfunction pdc_coproc_cfgfunction pdc_iodc_readfunction pdc_system_map_find_modsfunction pdc_system_map_find_addrsfunction pdc_model_infofunction ROMfunction pdc_model_versionsfunction pdc_model_cpuidfunction pdc_model_capabilitiesfunction pdc_model_platform_infofunction pdc_cache_infofunction pdc_spaceid_bitsfunction pdc_btlb_infofunction pdc_btlb_insertfunction pdc_btlb_purge_allfunction replacedfunction pdc_lan_station_idfunction pdc_stable_readfunction pdc_stable_writefunction pdc_stable_get_sizefunction pdc_stable_verify_contentsfunction pdc_stable_initializefunction arefunction pdc_pci_irt_sizefunction pdc_pci_irtfunction pdc_pci_config_readfunction pdc_pci_config_writefunction pdc_tod_read
Annotated Snippet
struct narrow_stack {
/* use int, not long which is 64 bits */
unsigned int arg13;
unsigned int arg12;
unsigned int arg11;
unsigned int arg10;
unsigned int arg9;
unsigned int arg8;
unsigned int arg7;
unsigned int arg6;
unsigned int arg5;
unsigned int arg4;
unsigned int arg3;
unsigned int arg2;
unsigned int arg1;
unsigned int arg0;
unsigned int frame_marker[8];
unsigned int sp;
/* in reality, there's nearly 8k of stack after this */
};
long real32_call(unsigned long fn, ...)
{
va_list args;
extern struct narrow_stack real_stack;
extern unsigned long real32_call_asm(unsigned int *,
unsigned int *,
unsigned int);
va_start(args, fn);
real_stack.arg0 = va_arg(args, unsigned int);
real_stack.arg1 = va_arg(args, unsigned int);
real_stack.arg2 = va_arg(args, unsigned int);
real_stack.arg3 = va_arg(args, unsigned int);
real_stack.arg4 = va_arg(args, unsigned int);
real_stack.arg5 = va_arg(args, unsigned int);
real_stack.arg6 = va_arg(args, unsigned int);
real_stack.arg7 = va_arg(args, unsigned int);
real_stack.arg8 = va_arg(args, unsigned int);
real_stack.arg9 = va_arg(args, unsigned int);
real_stack.arg10 = va_arg(args, unsigned int);
real_stack.arg11 = va_arg(args, unsigned int);
real_stack.arg12 = va_arg(args, unsigned int);
real_stack.arg13 = va_arg(args, unsigned int);
va_end(args);
return real32_call_asm(&real_stack.sp, &real_stack.arg0, fn);
}
#ifdef CONFIG_64BIT
/***************** 64-bit real-mode calls ***********/
struct wide_stack {
unsigned long arg0;
unsigned long arg1;
unsigned long arg2;
unsigned long arg3;
unsigned long arg4;
unsigned long arg5;
unsigned long arg6;
unsigned long arg7;
unsigned long arg8;
unsigned long arg9;
unsigned long arg10;
unsigned long arg11;
unsigned long arg12;
unsigned long arg13;
unsigned long frame_marker[2]; /* rp, previous sp */
unsigned long sp;
/* in reality, there's nearly 8k of stack after this */
};
long real64_call(unsigned long fn, ...)
{
va_list args;
extern struct wide_stack real64_stack;
extern unsigned long real64_call_asm(unsigned long *,
unsigned long *,
unsigned long);
va_start(args, fn);
real64_stack.arg0 = va_arg(args, unsigned long);
real64_stack.arg1 = va_arg(args, unsigned long);
real64_stack.arg2 = va_arg(args, unsigned long);
real64_stack.arg3 = va_arg(args, unsigned long);
real64_stack.arg4 = va_arg(args, unsigned long);
real64_stack.arg5 = va_arg(args, unsigned long);
real64_stack.arg6 = va_arg(args, unsigned long);
real64_stack.arg7 = va_arg(args, unsigned long);
real64_stack.arg8 = va_arg(args, unsigned long);
Annotation
- Immediate include surface: `linux/stdarg.h`, `linux/delay.h`, `linux/init.h`, `linux/kernel.h`, `linux/module.h`, `linux/string.h`, `linux/spinlock.h`, `asm/page.h`.
- Detected declarations: `struct narrow_stack`, `struct wide_stack`, `function f_extend`, `function convert_to_wide`, `function set_firmware_width_unlocked`, `function set_firmware_width`, `function set_firmware_width_unlocked`, `function set_firmware_width`, `function pdc_emergency_unlock`, `function PDC_OK`.
- Atlas domain: Architecture Layer / arch/parisc.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.