# Trap Home Page

## RISC-V trap machinery

{% content-ref url="/pages/-M4f4umOXQLM--2dmp-H" %}
[What is trampoline](/build_a_os/traps-and-interrupts/untitled-3.md)
{% endcontent-ref %}

{% content-ref url="/pages/-M4f4uBfm2Ua8uXLmsWU" %}
[What is trapframe](/build_a_os/traps-and-interrupts/untitled-2.md)
{% endcontent-ref %}

## Traps from Kernel Space

{% content-ref url="/pages/-M4f9lIYgqvIMLdZRgLz" %}
[Traps from kernel space](/build_a_os/traps-and-interrupts/traps-from-kernel-space.md)
{% endcontent-ref %}

## Traps from User Space

{% content-ref url="/pages/-M1ITenaXBqQJbTySQCI" %}
[How system calls get into/out of the kernel](/build_a_os/traps-and-interrupts/untitled.md)
{% endcontent-ref %}

## How `exec` works

{% content-ref url="/pages/-M4fDUURc-qZ9I\_ytOp8" %}
[How exec() works](/build_a_os/traps-and-interrupts/how-exec-works.md)
{% endcontent-ref %}

## How fork works

{% content-ref url="/pages/-M4f9keh0yFllRNKArCm" %}
[How fork() works](/build_a_os/traps-and-interrupts/how-fork-works.md)
{% endcontent-ref %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://xiayingp.gitbook.io/build_a_os/traps-and-interrupts/trap-home-page.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
