MCPcopy Create free account
hub / github.com/HelenOS/helenos / install_handler

Function install_handler

kernel/arch/arm32/src/exception.c:66–82  ·  view source on GitHub ↗

Updates specified exception vector to jump to given handler. * * Addresses of handlers are stored in memory following exception vectors. */

Source from the content-addressed store, hash-verified

64 * Addresses of handlers are stored in memory following exception vectors.
65 */
66static void install_handler(unsigned handler_addr, unsigned *vector)
67{
68 /*
69 * Relative address (related to exc. vector) of the word
70 * where handler's address is stored
71 */
72 volatile uint32_t handler_address_ptr = EXC_VECTORS_SIZE -
73 PREFETCH_OFFSET;
74
75 /* Make it LDR instruction and store at exception vector */
76 *vector = handler_address_ptr | LDR_OPCODE;
77 smc_coherence(vector, 4);
78
79 /* Store handler's address */
80 *(vector + EXC_VECTORS) = handler_addr;
81
82}
83
84/** Software Interrupt handler.
85 *

Callers 1

Calls 1

smc_coherenceFunction · 0.70

Tested by

no test coverage detected