MCPcopy Create free account
hub / github.com/F-Stack/f-stack / remove_userlocal_code

Function remove_userlocal_code

freebsd/mips/mips/cpu.c:78–86  ·  view source on GitHub ↗

* Patch cpu_switch() by removing the UserLocal register code at the end. * For MIPS hardware that don't support UserLocal Register Implementation * we remove the instructions that update this register which may cause a * reserved instruction exception in the kernel. */

Source from the content-addressed store, hash-verified

76 * reserved instruction exception in the kernel.
77 */
78static void
79remove_userlocal_code(uint32_t *cpu_switch_code)
80{
81 uint32_t *instructp;
82
83 instructp = cpu_switch_code;
84 instructp[0] = _JR_RA;
85 instructp[1] = _NOP;
86}
87
88/*
89 * Attempt to identify the MIPS CPU as much as possible.

Callers 1

mips_get_identityFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected