Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
31 commits
Select commit Hold shift + click to select a range
9362ebc
新版内存管理的Arch部分。(尚未完成x8664的初始化部分) (#213)
fslongjin Mar 27, 2023
af8d319
添加bump分配器 (#215)
kkkkkong Mar 28, 2023
8c3b57a
新增页表、页表项的抽象;将内存分配器移动到mm/allocator文件夹下 (#218)
fslongjin Mar 31, 2023
b422e0e
Merge master into patch-refactor-mm (#231)
fslongjin Apr 6, 2023
a341e9e
Add page mapper and page flush (#232)
fslongjin Apr 8, 2023
f978bfc
伙伴分配器 (#233)
kkkkkong Apr 9, 2023
5b5c6d4
merge master into patch-refactor-mm (#239)
fslongjin Apr 12, 2023
1e86fca
新增kernel mapper,以及从multiboot2获取内存信息 (#240)
fslongjin Apr 14, 2023
a6bfa0a
添加slab分配器(#246)
kkkkkong Apr 19, 2023
66f8e52
修改printk,使得kdebug等宏,不会进行堆内存分配。
fslongjin Apr 28, 2023
ff74615
Merge pull request #256 from fslongjin/patch-mm-adjust-printk
kkkkkong Apr 28, 2023
6477493
Merge branch master into patch-refactor-mm (#257)
fslongjin Apr 28, 2023
6acb5e9
把master的最新修改合并到refactor-mm上(#259)
kkkkkong May 9, 2023
bf587b6
完成vma的代码编写(尚未实现匿名页反向映射) (#260)
fslongjin May 9, 2023
a8c20ba
添加创建页表的函数 (#261)
fslongjin May 13, 2023
117af58
Merge master into patch refactor mm (#269)
fslongjin May 24, 2023
116c2a5
添加buddy预留页的仿真计算程序 (#270)
fslongjin May 26, 2023
07f124b
Patch merge master into mm 230530 (#275)
fslongjin May 30, 2023
a925f7f
增加mmap、munmap、mprotect (#276)
fslongjin Jun 6, 2023
d6dfe66
完成ELF加载器的代码 (#280)
fslongjin Jun 14, 2023
000904c
重写execve系统调用 (#281)
fslongjin Jun 18, 2023
6f1397e
添加新的buddy分配器 (#284)
kkkkkong Jul 8, 2023
763aa0d
让kernel mapper能正常工作,部分模块能初始化(尚未能完成全部模块初始化) (#292)
fslongjin Jul 14, 2023
068d720
Patch merge master into mm 0715 (#293)
fslongjin Jul 15, 2023
1ea3a56
调整代码以使得新的内存管理能与原有代码共同工作。 (#294)
fslongjin Jul 19, 2023
1f3d2ab
修复buddy的一些bug (#296)
fslongjin Jul 20, 2023
f505345
内存管理修复bug (#297)
fslongjin Jul 20, 2023
67b2ad1
内存管理:删除调试日志 & 编写文档 & bugfix: 修复sys_gettimeofday对timezone参数的处理的bug (#298)
fslongjin Jul 21, 2023
bb24367
0721:将主分支合并入内存管理重构分支 (#300)
fslongjin Jul 21, 2023
6e4b55e
Merge branch 'master' into patch-refactor-mm
fslongjin Jul 21, 2023
599c713
1.修正文档错别字
fslongjin Jul 21, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -174,7 +174,8 @@
"sleep.h": "c",
"net.h": "c",
"lz4.h": "c",
"cmd_test.h": "c"
"cmd_test.h": "c",
"cmpxchg.h": "c"
},
"C_Cpp.errorSquiggles": "enabled",
"esbonio.sphinx.confDir": "",
Expand Down
12 changes: 11 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -61,14 +61,24 @@ clean:
cd .. ;\
done

.PHONY: ECHO
ECHO:
@echo "$@"

cppcheck-xml:
cppcheck kernel user --platform=unix64 --std=c11 -I user/libs/ -I=kernel/ --force -j $(NPROCS) --xml 2> cppcheck.xml

cppcheck:
cppcheck kernel user --platform=unix64 --std=c11 -I user/libs/ -I=kernel/ --force -j $(NPROCS)

docs: ECHO
bash -c "cd docs && make html && cd .."

clean-docs:
bash -c "cd docs && make clean && cd .."

gdb:
gdb -n -x tools/.gdbinit
rust-gdb -n -x tools/.gdbinit

# 写入磁盘镜像
write_diskimage:
Expand Down
15 changes: 10 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
# DragonOS

## 打造完全自主可控的数字化未来!

---

**Languages** 中文|[English](README_EN.md)

 
Expand All @@ -18,6 +22,8 @@

- 项目文档 **[docs.DragonOS.org](https://docs.dragonos.org)**

- **了解开发动态、开发任务,请访问DragonOS的zulip社群**: [https://DragonOS.zulipchat.com](https://DragonOS.zulipchat.com)

- 开源论坛 **[bbs.DragonOS.org](https://bbs.dragonos.org)**

- 软件镜像站 **[mirrors.DragonOS.org](https://mirrors.DragonOS.org)**
Expand All @@ -42,19 +48,18 @@

## 如何加入?

  如果你愿意加入我们,你可以查看GitHub仓库的Project面板,选择近期已规划的功能,对他们进行完善。
  如果你愿意加入我们,你可以访问DragonOS的zulip社群,了解开发动态、开发任务: [https://DragonOS.zulipchat.com](https://DragonOS.zulipchat.com)

  或者,你也可以带着你的创意与想法,和社区的小伙伴一起讨论,为DragonOS创造一些新的功能。
  你也可以带着你的创意与想法,和社区的小伙伴一起讨论,为DragonOS创造一些新的功能。

## 如何与社区建立联系?

  你可以发邮件给Maintainer: longjin,邮件地址是 [[email protected]](mailto:[email protected]) 。

  或者是加入我们的开发交流QQ群:**115763565**

  对于正式问题的讨论,我们建议在论坛[bbs.DragonOS.org](https://bbs.dragonos.org/)上的对应板块,使用正式的语言发帖讨论。亦或者是在本仓库的issue下提出问题。
  对于正式问题的讨论,我们建议在 **[DragonOS的zulip社群](https://DragonOS.zulipchat.com)** 上的对应板块,使用正式的语言发帖讨论。亦或者是在本仓库的issue下提出问题。

  在发帖的同时,可以把帖子转发到交流QQ群,这样能使得问题的交流更加高效,也便于问题的归档。

## 贡献者名单

Expand All @@ -68,7 +73,7 @@

## 赞助

  DragonOS是一个公益性质的开源项目,但是它的发展离不开资金的支持,如果您愿意的话,可以通过 ** [赞助 - DragonOS](https://dragonos.org/?page_id=37) ** ,从而促进这个项目的发展。所有的赞助者的名单都会被公示。您的每一分赞助,都会为DragonOS的发展作出贡献!
  DragonOS是一个公益性质的开源项目,但是它的发展离不开资金的支持,如果您愿意的话,可以通过 **[赞助 - DragonOS](https://dragonos.org/?page_id=37)** ,从而促进这个项目的发展。所有的赞助者的名单都会被公示。您的每一分赞助,都会为DragonOS的发展作出贡献!

### 赞助的资金都会被用到哪里?

Expand Down
8 changes: 4 additions & 4 deletions README_EN.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@

- Home Page **[DragonOS.org](https://dragonos.org)**
- Documentation **[docs.DragonOS.org](https://docs.dragonos.org)**
- **To learn about development dynamics and development tasks, please visit DragonOS's zulip community:** [https://DragonOS.zulipchat.com](https://DragonOS.zulipchat.com)
- BBS **[bbs.DragonOS.org](https://bbs.dragonos.org)**
- Software mirror website **[mirrors.DragonOS.org](https://mirrors.DragonOS.org)**
- QQ group **115763565**
Expand All @@ -31,7 +32,7 @@

## How to join DragonOS ?

  If you are willing to join us, you can check the project panel of the GitHub repo, select the recently planned functions, and improve them.
  If you are willing to join us, you can visit DragonOS's zulip community, learn about development dynamics and development tasks: [https://DragonOS.zulipchat.com](https://DragonOS.zulipchat.com)

  Or, you can also bring your ideas, discuss with community members, and create some new functions for DragonOS.

Expand All @@ -41,9 +42,8 @@

  Or join our development exchange QQ group: **115763565**

  For the discussion of formal issues, we suggest that they be discussed in the forum [BBS.Dragonos.org](https://bbs.dragonos.org/) In the corresponding section of the, use formal language to post for discussion. Or ask questions under the issue of the warehouse.
  For the discussion of formal issues, we recommend that you use the official language to post on the corresponding section of **[DragonOS's zulip community](https://DragonOS.zulipchat.com)**. Or you can post questions under the issue of this repository.

  While posting, you can forward the post to the communication QQ group, which can make the communication of problems more efficient and facilitate the archiving of problems.

## List of contributors

Expand All @@ -58,7 +58,7 @@ Maintainer longjin's Email:[email protected]

## Reward

  DragonOS is an open source public welfare project, but its development cannot be separated from the support of funds. If you want, you can visit ** [Sponsor - DragonOS](https://dragonos.org/?page_id=37) ** , so as to promote the development of this project. The list of all sponsors will be published. Every bit of your sponsorship will contribute to the development of DragonOS!
  DragonOS is an open source public welfare project, but its development cannot be separated from the support of funds. If you want, you can visit **[Sponsor - DragonOS](https://dragonos.org/?page_id=37)** , so as to promote the development of this project. The list of all sponsors will be published. Every bit of your sponsorship will contribute to the development of DragonOS!

### Where will the sponsorship funds be used?

Expand Down
Binary file removed docs/Multiboot2 Specification version 2.0.pdf
Binary file not shown.
40 changes: 39 additions & 1 deletion docs/community/contact/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,50 @@
与社区建立联系
====================================

联系方式
-------------------------

社区公共邮箱:[email protected]

DragonOS负责人: longjin
DragonOS社区负责人: longjin

工作邮箱: [email protected]

开发交流QQ群: 115763565

DragonOS官网: https://DragonOS.org

了解开发动态、开发任务,请访问DragonOS的zulip社群: https://DragonOS.zulipchat.com


赞助及捐赠
-------------------------

DragonOS是一个开源项目,我们欢迎任何形式的赞助和捐赠,您的捐赠将用于DragonOS的开发和维护,以及社区的运营。

您可以通过以下方式赞助和捐赠:

- 访问DragonOS官网 https://DragonOS.org ,点击页面右上角的“赞助”按钮,进行捐赠
- 联系社区负责人,沟通具体的赞助方式等。

财务及捐赠信息公开
-------------------------

DragonOS社区的捐赠信息将按年进行公开。赞助商、赞助者信息将在收到赞助后,15天内进行公开。

社区管理、财务及法务主体
-------------------------

DragonOS社区的管理、财务及法务主体为:灵高计算机系统(广州)有限公司。

我们是一家开源公司,我们坚信,开源能为我国将来的IT,打下更好的基础。我们也通过其他业务创收,投入到DragonOS的研发之中。

公司负责DragonOS社区的运营、财务、法务事项处理工作。

地址:广东省广州市番禺区小谷围街广州大学城华南理工大学大学城校区

邮件:[email protected]

官网:https://ringotek.com.cn


5 changes: 4 additions & 1 deletion docs/introduction/build_system.md
Original file line number Diff line number Diff line change
Expand Up @@ -233,7 +233,10 @@ make run-docker
- Docker编译,并写入磁盘镜像,: `make docker`
- Docker编译,写入磁盘镜像,并在QEMU中运行: `make run-docker`
- 不编译,直接从已有的磁盘镜像启动: `make qemu`
- 清理编译产生的文件: `make clean`
- 编译文档: `make docs` (需要手动安装sphinx以及docs下的`requirements.txt`中的依赖)
- 清理文档: `make clean-docs`

:::{note}
如果您需要在vnc中运行DragonOS,请在上述命令后加上`-vnc`后缀。如:`make run-vnc`
:::
:::
24 changes: 18 additions & 6 deletions docs/introduction/features.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,10 +12,14 @@

### 内存管理

- [x] 页分配器
- [x] slab分配器
- [x] 页帧分配器
- [x] 小对象分配器
- [x] VMA
- [x] MMIO地址空间自动分配
- [x] 页面映射器
- [x] 硬件抽象层
- [x] 独立的用户地址空间管理机制
- [x] C接口兼容层

### 多核

Expand All @@ -31,6 +35,7 @@
- [x] exec
- [x] 进程睡眠(支持高精度睡眠)
- [x] kthread机制
- [x] 可扩展二进制加载器

#### 同步原语

Expand All @@ -43,7 +48,10 @@
### 调度

- [x] CFS调度器
- [x] 实时调度器(FIFO、RR)
- [x] 单核调度
- [x] 多核调度
- [x] 负载均衡

### IPC

Expand All @@ -56,7 +64,8 @@
- [x] fat12/16/32
- [x] Devfs
- [x] RamFS
- [x] procfs
- [x] Procfs
- [x] Sysfs

### 异常及中断处理

Expand Down Expand Up @@ -95,7 +104,7 @@
- [x] ACPI 高级电源配置模块
- [x] IDE硬盘
- [x] AHCI硬盘
- [x] PCI
- [x] PCI、PCIe总线
- [x] XHCI(usb3.0)
- [x] ps/2 键盘
- [x] ps/2 鼠标
Expand All @@ -107,6 +116,8 @@
- [x] VirtIO网卡
- [x] x87FPU
- [x] TTY终端
- [x] 浮点处理器


## 用户层

Expand All @@ -121,9 +132,9 @@
- [x] 基于字符串匹配的解析
- [x] 基本的几个命令

### 驱动程序
### Http Server

- [x] ps/2键盘用户态驱动
- 使用C编写的简单的Http Server,能够运行静态网站。

## 软件移植

Expand All @@ -132,3 +143,4 @@
- [x] gmp 6.2.1 [https://github.com/DragonOS-Community/gmp-6.2.1](https://github.com/DragonOS-Community/gmp-6.2.1)
- [x] mpfr 4.1.1 [https://github.com/DragonOS-Community/mpfr](https://github.com/DragonOS-Community/mpfr)
- [x] mpc 1.2.1 [https://github.com/DragonOS-Community/mpc](https://github.com/DragonOS-Community/mpc)
- [x] relibc [https://github.com/DragonOS-Community/relibc](https://github.com/DragonOS-Community/relibc)
4 changes: 3 additions & 1 deletion docs/introduction/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,11 @@ DragonOS简介

DragonOS龙操作系统(以下简称“DragonOS”)是一个面向服务器领域的,从0开发内核及用户态环境,并提供Linux兼容性的64位操作系统。它使用Rust与C语言进行编写,并正在逐步淘汰原有的C代码,以在将来提供更好的安全性与可靠性。

**我们致力于打造完全自主可控的数字化未来!**

DragonOS的目标是,构建一个完全独立自主的、开源的、高性能及高可靠性的服务器操作系统,为国家数字基础设施建设提供完全独立自主的底层核心动力。

作为一个社区驱动的开源操作系统,为了促进其发展,避免让其遭受一些不遵守开源协议的商业公司的侵权,我们决定使用GPLv2协议开放源代码,以严格的开源协议来保护DragonOS。
作为一个社区驱动的开源操作系统,为了促进开源社区建设,并避免让其遭受一些不遵守开源协议的商业公司的侵权,我们决定使用GPLv2协议开放源代码,以严格的开源协议来保护DragonOS。

你可能对DragonOS中已经实现了哪些功能感兴趣,您可以转到这里::ref:`功能特性 <_genreal_features>`

Expand Down
15 changes: 0 additions & 15 deletions docs/kernel/core_api/allocate-memory.md

This file was deleted.

13 changes: 0 additions & 13 deletions docs/kernel/core_api/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,16 +13,3 @@
data_structures
casting
softirq

内存管理
===================

这里快速讲解了如何在DragonOS中分配、使用内存。以便您能快速的了解这个模块。

详细的内存管理模块的文档请参见::ref:`memory_management_module`

.. toctree::
:maxdepth: 1

allocate-memory
mm-api
Loading