linfeng
539ee3eaeb
fix(backtrace):Use more reasonable compile options ( #1056 )
...
* fix(backtrace):Use more reasonable compile options
* 调整代码,同时解决rust analyzer未能提示warning的问题
---------
Co-authored-by: longjin <longjin@DragonOS.org>
2024-11-25 16:28:05 +08:00
linfeng
081428c0d8
feat: update to new backtrace lib ( #1049 )
...
* feat: update to new backtrace lib
* feat: enable unwind for riscv64
---------
Co-authored-by: longjin <longjin@DragonOS.org>
2024-11-19 21:55:22 +08:00
LoGin
0f094e50de
fix: 修复了do execve 加载程序失败时,没能正确返回错误码给用户态的问题 ( #1042 )
...
* fix: 修复了do execve 加载程序失败时,没能正确返回错误码给用户态的问题
2024-11-12 14:01:26 +08:00
linfeng
7c28051e8c
chore: update toolchain version to 2024-11-05 ( #1031 )
...
* chore: update toolchain version to 2024-11-05
* update dragon reach to e945c217b3
* update dog to 6f2c0c8f12
---------
Co-authored-by: longjin <longjin@DragonOS.org>
2024-11-11 21:29:15 +08:00
LoGin
20c58101dd
fix: do_signal函数在处理SIG_KILL时,有一处pcb强引用未归零的问题 ( #1039 )
...
Signed-off-by: longjin <longjin@DragonOS.org>
2024-11-11 11:38:57 +08:00
codeironman
f5b2038871
ospp project (feature) add namespace overlayfs cgroup ( #949 )
...
## 开发进展:
## namespace
- pid_namespace 基本实现,基于pid_struct等数据结构实现隔离
- mnt_namespace 基本实现,挂载点的隔离通过不同的挂载树来实现
- usernamespace 作为支持性的namespace,目前受限实现全局静态
## overlayfs
- 实现若干个文件系统的叠加,在mount中传入多个路径作为多个fs的mount路径以及最后merge层的fs路径
- copy-up机制的,除最上层外其他层为只读层,满足写时拷贝,需要修改的时候copy到上层修改
- whiteout特殊文件,用于标记在下层需要被删除的文件用来掩盖需要删除的文件
## cgroups
- 目前cgroups还处于框架阶段,之后具体实现具体的内存、CPU等子系统
2024-10-31 00:50:34 +08:00
LoGin
a9e28e9ce9
fix: 临时修复键盘驱动与鼠标驱动冲突导致键盘无响应 ( #1014 )
...
暂时通过条件编译的方式解决. 目前认为是鼠标驱动问题,没有正确判断是不是自己的数据...
但是因为我们场景下,鼠标驱动几乎用不到,因此先条件编译屏蔽.
Signed-off-by: longjin <longjin@DragonOS.org>
2024-10-26 12:55:19 +08:00
linfeng
fae6e9ade4
feat(ebpf):[WIP] add eBPF support ( #948 )
...
* feat(kprobe): Add basic kprobe support for x86_64
* feat: add ebpf support (#912 )
- 实现bpf()一部分命令,包括几种基本map,相关的helper函数
- 实现部分perf相关的数据结构
- 暂时为文件实现简单mmap
- 实现一个使用kprobe统计syscall 调用次数的ebpf程序
对eBPF支持程度(基本):
- 简单的eBPF程序(没有指定特殊的Map)
- 使用内核已经实现的Map的eBPF程序
- 可以和kprobe配合使用
- 内核Map相关的接口定义已经实现,添加新的Map较为简单
不支持的功能:
- 区分不同的eBPF程序类型(Network/Cgroup)并限定可调用的helper函数集
- 与内核其它跟踪机制配合(tracepoint)
- 其它helper和Map
todo
- [ ] 修改mmap,需要讨论,因为这个和块缓存层相关
- [x] 添加文档
- [x] 修复可能的错误
- [x] 增加rbpf版本信息
* feat: add /sys/devices/system/cpu/possible file
* feat: add /sys/devices/system/cpu/online
2024-10-25 15:59:57 +08:00
LoGin
415e46ea47
build: Remove DragonOS_GCC And make CI use docker image ( #954 )
...
* build: 不再需要x86_64-elf-gcc的支持
* ci: 添加ci用的docker镜像
* 切换workflow到构建用的容器上
---------
Signed-off-by: longjin <longjin@DragonOS.org>
2024-10-10 00:59:50 +08:00
LoGin
59a6bcf6ae
feat: Add HVM boot support for x86_64 ( #953 )
...
Signed-off-by: longjin <longjin@DragonOS.org>
2024-10-09 21:36:18 +08:00
LoGin
d031d46fd9
feat: 添加serial console,支持non-graphic启动 ( #947 )
...
Signed-off-by: longjin <longjin@dragonos.org>
2024-10-01 11:35:48 +08:00
黄铭涛
28fe4ad2a0
feat(driver/net): 将网络设备注册到sysfs, 添加设备类属性文件 ( #919 )
2024-09-11 14:30:53 +08:00
LoGin
db7c782a9a
feat: 允许通过multiboot引导(直到acpi初始化报错) ( #914 )
2024-09-06 20:04:36 +08:00
LoGin
2b7818e80e
feat: 添加对内核引导协议的抽象 ( #913 )
...
* 添加multiboot header
* head.S传参增加bootloader类型
* feat: 添加引导加载协议的抽象,并为multiboot2实现这个抽象.
* 把framebuffer的映射地址改为从early ioremap和mmio pool分配
* riscv64能运行
2024-09-05 21:12:20 +08:00
MemoryShore
cf7f801e1d
feat(mm): 简单实现fat文件系统的文件映射 ( #840 )
...
- 添加文件映射相关接口,目前已简单实现fat文件系统的私有映射和共享映射
- 添加msync系统调用(由于当前未实现脏页自动回写,需要手动调用msync进行同步)
- 简单实现PageCache(暂时使用HashMap进行文件页号与页的映射)
- 添加新的PageFlags标志结构,原PageFlags改名为EntryFlags
- 参考linux使用protection_map映射表进行页面标志的获取
- 添加页面回收机制
- 添加页面回收内核线程
- 缺页中断使用的锁修改为irq_save; 添加脏页回写机制
- 修复do_cow_page死锁问题
- 访问非法地址时发送信号终止进程
- 修复重复插入反向vma表的错误
- 添加test_filemap文件映射测试程序
2024-09-05 00:35:27 +08:00
LoGin
dc9b4fea1b
fix: pipe 读取/写入阻塞时,无法kill进程的问题 ( #889 )
2024-08-27 13:01:11 +08:00
LoGin
703ce5a77c
fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。 ( #870 )
...
* fix: 修复由于升级到2024-07-23工具链之后,某些机器上面内核运行一直fault的问题。
2024-07-27 17:34:05 +08:00
LoGin
816ee5ae54
refactor: 删除过时的va-pa转换函数,改为统一使用MMArch ( #862 )
2024-07-26 00:27:35 +08:00
LoGin
bd70d2d1f4
chore: 将工具链更新到2024-07-23 ( #864 )
...
* chore: 将工具链更新到2024-07-23
2024-07-25 00:55:02 +08:00
黄铭涛
af097f9f4b
fix(time): modify update wall time ( #836 )
...
更改了时间子系统的update_wall_time函数,通过读取当前周期数,计算delta值进行更新,而不是通过传入delta值进行更新
2024-07-16 21:51:21 +08:00
linfeng
6f189d2743
feat(time): Add syscall support for utime* ( #838 )
...
* feat(vfs): Add syscall support for utime*
impl sys_utimensat
impl sys_utimes
add utimensat test
fix some warning
* fix(vfs): Verify pointer validity
* fix: remove bad cfg
2024-06-27 17:43:25 +08:00
MemoryShore
de199e3c86
feat(mm): 修复mmap未延迟分配内存的问题 ( #837 )
...
* 20240524 3:40
* 20240527 0010
* 修复mmap未延迟分配内存的问题
* Revert "Merge branch 'patch-add-file-mapping' into patch-fix-mmap"
This reverts commit 8eb687c60b43831d7e9614bca0af41e8f2175ae8, reversing
changes made to 33e9f0b34f9dc35a47757137a29605e51052a26e.
2024-05-28 20:06:23 +08:00
Mingtao Huang
bde08cded6
feat(driver/pci): 完善pci root结构体,增加portio的pci配置空间访问 ( #818 )
...
* feat(driver/pci): 完善pci root结构体,增加portio的pci配置空间访问
2024-05-16 17:47:01 +08:00
曾俊
2eab6dd743
feat(log): 将内核日志统一为新的logger ( #814 )
2024-05-16 17:25:23 +08:00
LoGin
236e88d5ef
fix(driver/apic_timer): 修复local apic timer初始化顺序导致的在某些云服务器上无法收到中断的bug ( #815 )
2024-05-14 02:50:58 +08:00
LoGin
0102d69fdd
feat:(riscv/intr) 实现riscv plic驱动,能处理外部中断 ( #799 )
...
* feat:(riscv/intr) 实现riscv plic驱动,能处理外部中断
- 实现riscv plic驱动,能处理外部中断
- 能收到virtio-blk的中断
- 实现fasteoi interrupt handler
2024-05-01 21:11:32 +08:00
LoGin
0722a06a09
fix: (riscv/timer): 修复riscv下没有更新墙上时钟以及没有处理软中断的bug ( #783 )
2024-04-28 19:40:09 +08:00
LoGin
942cf26b48
fix(riscv/process): 把riscv的调度时钟节拍率与HZ同步,并且修复切换到用户态的时候忘了在内核态关中断的bug ( #780 )
2024-04-28 16:49:40 +08:00
Mingtao Huang
dd8e74ef0d
feat(driver/acpi_pm): Implement ACPI PM Timer ( #772 )
...
* feat: Implement ACPI PM Timer
2024-04-28 13:25:12 +08:00
LoGin
f75cb0f8ed
refactor(process): 调整arch_switch_to_user函数,把riscv和x86_64的共用逻辑抽取出来。 ( #773 )
...
* refactor(process): Extract common logic for riscv and x86_64 in arch_switch_to_user to run_init_process
调整arch_switch_to_user函数,把riscv和x86_64的共用逻辑抽取出来。写成run_init_process函数,并且能够尝试运行多个不同的init程序,直到某个运行成功
2024-04-27 15:35:24 +08:00
LoGin
471d65cf15
feat(riscv): riscv下能够运行hello world用户程序 ( #770 )
...
* feat(riscv): riscv下能够运行hello world用户程序
2024-04-26 11:59:47 +08:00
LoGin
731bc2b32d
feat(virtio): riscv: 添加virtio-blk driver,并在riscv下能够正确挂载FAT32 ( #761 )
2024-04-23 17:19:54 +08:00
LoGin
e32effb150
feat(driver): 把virtio添加到sysfs ( #752 )
2024-04-22 15:11:47 +08:00
MemoryShore
a17651b14b
feat(mm): 实现缺页中断处理,支持页面延迟分配和写时拷贝,以及用户栈自动拓展 ( #715 )
...
* 实现缺页中断处理
* 完善页表拷贝逻辑
* 优化代码结构
* 完善缺页异常信息
* 修改大页映射逻辑
* 修正大页映射错误
* 添加缺页中断支持标志
* 实现用户栈自动拓展功能
2024-04-22 15:10:47 +08:00
LoGin
370472f728
pci: 添加pci root manager来管理pci root,并使得riscv能够正常扫描pci设备. ( #745 )
...
* pci: 添加pci root manager来管理pci root.
pci: 使得riscv能够正常扫描pci设备.
* doc: 添加注释
2024-04-21 11:27:36 +08:00
LoGin
2709e017d0
pci: 统一使用ecam root ( #744 )
2024-04-20 18:31:56 +08:00
GnoCiYeH
d623e90231
socket统一改用GlobalSocketHandle
,并且修复fcntl SETFD的错误 ( #730 )
...
* socket统一改用`GlobalSocketHandle`,并且修复fcntl SETFD的错误
---------
Co-authored-by: longjin <longjin@DragonOS.org>
2024-04-15 22:01:32 +08:00
Samuel Dai
1074eb34e7
feat(filesystem): 引入Umount系统调用 ( #719 )
...
* feat(filesystem): 引入Umount系统调用
* 将所有ENOSYS误用更正
* 修复了一个使同一个挂载点可以挂载2个文件系统的bug
* 统一注释,增强程序稳定性,统一接口。注意:Umount时在fatfs的路径要使用大写,此受限于当前文件系统设计。
2024-04-15 13:02:04 +08:00
LoGin
9621ab16ef
让riscv64能正常切换进程,并运行完所有的initcall ( #721 )
2024-04-14 20:39:20 +08:00
LoGin
f049d1af01
初始化riscv-sbi-timer ( #716 )
2024-04-12 14:46:47 +08:00
曾俊
3959e94df3
bugfix: 修复smp启动的时候,损坏0号核心的idle进程的内核栈的问题 ( #711 )
...
---------
Co-authored-by: longjin <longjin@DragonOS.org>
Co-authored-by: heyicong <heyicong@dragonos.org>
2024-04-10 19:00:32 +08:00
Jomo
6fc066ac11
实现SystemV共享内存 ( #690 )
...
* 实现SystemV共享内存
* 测试shm
* 添加测试程序
* 完善细节
* 修正shm的时间数据错误的问题
* fix: devfs的metadata权限为0x777的错误
---------
Co-authored-by: longjin <longjin@DragonOS.org>
2024-04-07 14:04:19 +08:00
LoGin
23ef2b33d1
riscv: 把内核编译target改为riscv64gc & 获取time csr的频率 & 修正浮点保存与恢复的汇编的问题 ( #699 )
...
* 1. 把内核编译target改为riscv64gc
2. fix: 修正浮点保存与恢复的汇编的问题
* riscv: 获取time csr的频率
2024-04-06 22:13:26 +08:00
GnoCiYeH
f0c87a897f
重写调度模块 ( #679 )
...
## PR:重写调度模块
---
### 完成的部分
- 实现cfs调度策略
- 搭建框架,后续功能可以迭代开发
- 目前能跑,未测试性能
### 需要后续接力的部分
- 实现组内调度(task_group)
- 实现跨核负载均衡(pelt算法)
- 接入sysfs,实现参数动态调节(sched_stat等)
- nice值以及priority等参数的设置及调优
2024-04-05 17:54:48 +08:00
LoGin
e8eab1ac82
riscv: copy-thread ( #696 )
2024-04-05 16:37:08 +08:00
Donkey Kane
b8ed38251d
修复jiffy时钟过快问题,启用gettimeofday测试,修改mount测试 ( #680 )
...
1. 把clock tick rate与hpet频率关联起来
2. 修复墙上时间同步错误的问题
3. 启用时间watch dog.
4. 修复时间流逝速度异常
---------
Co-authored-by: longjin <longjin@DragonOS.org>
2024-04-05 00:06:26 +08:00
LoGin
9b96c5b547
riscv64: switch process ( #678 )
...
* riscv64: switch process
* fixname
2024-03-31 22:53:01 +08:00
LoGin
da15231979
实现了rtc的抽象,并且把x86的cmos rtc接入到设备驱动模型 ( #674 )
...
* 实现了rtc的抽象,并且把x86的cmos rtc接入到设备驱动模型。
2024-03-28 00:28:13 +08:00
LoGin
401699735b
riscv: 进程管理初始化 ( #654 )
2024-03-23 16:25:56 +08:00
LoGin
b5b571e026
修复内核的clippy检查报错 ( #637 )
...
修复内核的clippy检查报错
---------
Co-authored-by: Samuel Dai <947309196@qq.com>
Co-authored-by: Donkey Kane <109840258+xiaolin2004@users.noreply.github.com>
Co-authored-by: themildwind <107623059+themildwind@users.noreply.github.com>
Co-authored-by: GnoCiYeH <heyicong@dragonos.org>
Co-authored-by: MemoryShore <105195940+MemoryShore@users.noreply.github.com>
Co-authored-by: 曾俊 <110876916+ZZJJWarth@users.noreply.github.com>
Co-authored-by: sun5etop <146408999+sun5etop@users.noreply.github.com>
Co-authored-by: hmt <114841534+1037827920@users.noreply.github.com>
Co-authored-by: laokengwt <143977175+laokengwt@users.noreply.github.com>
Co-authored-by: TTaq <103996388+TTaq@users.noreply.github.com>
Co-authored-by: Jomo <2512364506@qq.com>
Co-authored-by: Samuel Dai <samuka007@qq.com>
Co-authored-by: sspphh <112558065+sspphh@users.noreply.github.com>
2024-03-22 23:26:39 +08:00