arch/x86/include/asm/debugreg.h
Source file repositories/reference/linux-study-clean/arch/x86/include/asm/debugreg.h
File Facts
- System
- Linux kernel
- Corpus path
arch/x86/include/asm/debugreg.h- Extension
.h- Size
- 4465 bytes
- Lines
- 198
- Domain
- Architecture Layer
- Bucket
- arch/x86
- Inferred role
- Architecture Layer: implementation source
- Status
- source 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.
Dependency Surface
linux/bug.hlinux/percpu.huapi/asm/debugreg.hasm/cpufeature.hasm/msr.h
Detected Declarations
function native_get_debugregfunction native_set_debugregfunction hw_breakpoint_disablefunction hw_breakpoint_activefunction local_db_savefunction local_db_restorefunction amd_set_dr_addr_maskfunction get_debugctlmsrfunction update_debugctlmsr
Annotated Snippet
static inline void amd_set_dr_addr_mask(unsigned long mask, unsigned int dr) { }
static inline unsigned long amd_get_dr_addr_mask(unsigned int dr)
{
return 0;
}
#endif
static inline unsigned long get_debugctlmsr(void)
{
unsigned long debugctlmsr = 0;
#ifndef CONFIG_X86_DEBUGCTLMSR
if (boot_cpu_data.x86 < 6)
return 0;
#endif
rdmsrq(MSR_IA32_DEBUGCTLMSR, debugctlmsr);
return debugctlmsr;
}
static inline void update_debugctlmsr(unsigned long debugctlmsr)
{
#ifndef CONFIG_X86_DEBUGCTLMSR
if (boot_cpu_data.x86 < 6)
return;
#endif
wrmsrq(MSR_IA32_DEBUGCTLMSR, debugctlmsr);
}
#endif /* _ASM_X86_DEBUGREG_H */
Annotation
- Immediate include surface: `linux/bug.h`, `linux/percpu.h`, `uapi/asm/debugreg.h`, `asm/cpufeature.h`, `asm/msr.h`.
- Detected declarations: `function native_get_debugreg`, `function native_set_debugreg`, `function hw_breakpoint_disable`, `function hw_breakpoint_active`, `function local_db_save`, `function local_db_restore`, `function amd_set_dr_addr_mask`, `function get_debugctlmsr`, `function update_debugctlmsr`.
- Atlas domain: Architecture Layer / arch/x86.
- 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.