> For the complete documentation index, see [llms.txt](https://richardweiyang-2.gitbook.io/kernel-exploring/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://richardweiyang-2.gitbook.io/kernel-exploring/00-reference/03-kernel_doc.md).

# 内核自带文档

内核自带文档在源代码的Documents目录里。

这里面可以说是浩如烟海了。。。但是说实话程序员一般不喜欢写文档，很多内容估计没有及时维护已经过时了。不过就算是过时也是很好的学习资料。

## 文档制作

另外这里要说一下文档的制作。因为现在文档用了rst格式，所以直接用编辑器看不是很友好。最好制作一下文档。

这里说一下如何制作html格式的文档。

```
# make htmldocs
```

完成后文档就在Documentations/output目录下了。

不过这么制作的文档内容太多了，我们可以指定一下文档目录，限制一下制作范围。

比如只制作mm相关的文档，可以执行：

```
# make SPHINXDIRS=mm htmldocs
```

这样会快很多。


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## 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, and the optional `goal` query parameter:

```
GET https://richardweiyang-2.gitbook.io/kernel-exploring/00-reference/03-kernel_doc.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

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.
