HomeFreeBSD

kinst: replace KINST_TRAMP_INIT

Description

kinst: replace KINST_TRAMP_INIT

The current implementation of KINST_TRAMP_INIT is working only on amd64,
where the breakpoint instruction is one byte long, which might not be
the case for other architectures (e.g in RISC-V it's either 2 or 4
bytes). This patch introduces two machine-dependent constants,
KINST_TRAMP_FILL_PATTERN and KINST_TRAMP_FILL_SIZE, which hold the fill
instruction and the size of that instruction in bytes respectively.

Reviewed by: markj
Approved by: markj (mentor)
Sponsored by: The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D39504

Details

Provenance
christosAuthored on May 23 2023, 1:58 PM
Reviewer
markj
Differential Revision
D39504: kinst: replace KINST_TRAMP_INIT
Parents
rG940e6d36de1e: riscv: Print less CPU info
Branches
Unknown
Tags
Unknown