greatbridf
|
32b3c0c913
initial commit
|
2 months ago |
greatbridf
|
ca2ad4c427
Merge remote-tracking branch 'github/mm' into shiai-master
|
3 months ago |
shao
|
ab64258c5e
feat(pcp): improve per-cpus pages support
|
3 months ago |
greatbridf
|
a3f7ad83a1
Merge remote-tracking branch 'github/mm' into shiai-master
|
3 months ago |
shao
|
4e7bed8818
feat(pcp): add per-cpu pages support
|
3 months ago |
greatbridf
|
6f90bfbd38
Merge branch 'fix' into shiai-master
|
3 months ago |
greatbridf
|
f10251a691
feat: add sys_chmod, remove debug prints
|
3 months ago |
greatbridf
|
ac2cb64f02
feat: blank impl for getrusage and madvise
|
3 months ago |
greatbridf
|
e9ec2880b8
feat: temp. impl for sys_times, update sys_statx
|
3 months ago |
greatbridf
|
ee488bcb18
feat(syscall): temporary impl of getrlimit, vfork and sysinfo
|
3 months ago |
greatbridf
|
eaa6cda7db
style: remove unused warnings
|
3 months ago |
greatbridf
|
f5b4da3309
change(mm_list): separate mm_list from process on elf loading
|
3 months ago |
greatbridf
|
555b383d90
feat(syscall): add sys_pipe2
|
3 months ago |
greatbridf
|
a66b415fd7
feat(syscall): add sys_prlimit64
|
3 months ago |
greatbridf
|
780114025c
clean: remove some redundant types
|
3 months ago |
greatbridf
|
d5421e4f17
feat(fat32): support of long file names
|
3 months ago |
greatbridf
|
c561df82d2
chore: add build-img script for making images
|
3 months ago |
greatbridf
|
63a2aca6fb
feat: add temporary impl for prlimit64
|
3 months ago |
greatbridf
|
255b3636d7
fix(getcwd): do not copy to user directly
|
3 months ago |
greatbridf
|
321fbcac00
fix(ahci): minus 1 from PRDTEntry.len
|
3 months ago |
greatbridf
|
46beec348b
style(block): change idents
|
3 months ago |
greatbridf
|
d400fb8fdc
fix(setpgid): move the process to new pgroup
|
3 months ago |
greatbridf
|
17e60b5661
doc: update origin
|
3 months ago |
greatbridf
|
113ce48d38
doc: rename kernel name
|
3 months ago |
shao
|
833e7f9c75
docs: add doc about memory management and multi-arch support
|
3 months ago |
greatbridf
|
8a40ff8f6f
doc: add more testcases
|
3 months ago |
greatbridf
|
4c21fc6989
doc: update device_driver.md
|
3 months ago |
greatbridf
|
3c76def031
style(block): change idents
|
3 months ago |
greatbridf
|
f7441a1470
doc: add device_driver.md
|
3 months ago |
greatbridf
|
e8b3f94f91
doc: add doc for filesystem
|
3 months ago |
greatbridf
|
92cfd5ccee
doc: add problems and TODO part
|
3 months ago |
greatbridf
|
c2a8b82a50
doc: add task.md
|
3 months ago |
greatbridf
|
42eb4fbb73
chore: remove kvm accel for dists such as ubuntu
|
3 months ago |
greatbridf
|
aabe4b75b7
fix(setpgid): move the process to new pgroup
|
3 months ago |
greatbridf
|
e2c3fbd379
chore: update README.md, add docs
|
3 months ago |
greatbridf
|
afc4956f30
chore: rename project name
|
3 months ago |
greatbridf
|
bad164e483
remove some stale C++ code. extract more platform-dependent parts
|
3 months ago |
greatbridf
|
a7bcb9ce15
Merge branch 'buddy_refactor'
|
4 months ago |
greatbridf
|
29bc525d10
Merge branch 'process-rewrite'
|
4 months ago |
greatbridf
|
8f28dfb772
feat: impl Write for dyn Buffer
|
4 months ago |
shao
|
5b3f887a65
refactor: refactor page alloc in rust
|
4 months ago |
greatbridf
|
12dacd3fad
fix(c++build): disable mmx and sse
|
4 months ago |
greatbridf
|
66958893e5
rewrite: move Process, ProcessGroup, Session out of thread.rs
|
4 months ago |
greatbridf
|
e037208da1
fix(exit): skip checking whether the children have an init parent
|
4 months ago |
greatbridf
|
b8a282ecb6
fix(context): new version rustc says we should use naked_asm
|
4 months ago |
greatbridf
|
980f18bf51
fix: add smp boot option to qemu run
|
4 months ago |
greatbridf
|
4602c4d71c
Merge branch 'fix'
|
4 months ago |
greatbridf
|
e6365b41be
fix(page_fault): potential skipped free in page fault handler
|
4 months ago |
greatbridf
|
d161134335
chore: add tmux debug script in Makefile
|
4 months ago |
greatbridf
|
13f7fff46d
Merge branch 'multiarch'
|
4 months ago |
greatbridf
|
07cdd43e60
Merge branch 'smp'
|
4 months ago |
greatbridf
|
68afbfce01
feat: set ap cpus online in scheduler!
|
4 months ago |
greatbridf
|
742d1ef505
fix(buddy): hold global buddy lock for EVERYTHING
|
4 months ago |
shao
|
f048367b02
refactor: refactor better abstraction for context switch
|
4 months ago |
greatbridf
|
4d1ab3b719
feat: initialize ap cpus to a usable state
|
4 months ago |
greatbridf
|
44231d9217
fix(idle_task): disable irq when we use scheduler
|
4 months ago |
greatbridf
|
9aae18ed2e
fix: irq handlers should be unlocked when being handled
|
4 months ago |
greatbridf
|
fab09e80c7
feat: bootstrap cpus, assign a stack to each of them
|
4 months ago |
greatbridf
|
256aa9d443
feat: make TSS and GDT per cpu
|
4 months ago |
greatbridf
|
faa54c5e0a
fix(UserString): mark %al as clobbered
|
4 months ago |
greatbridf
|
29a3461810
feat: make CURRENT and IDLE_TASK per cpu
|
4 months ago |
greatbridf
|
cbceec6084
feat: add percpu variables
|
4 months ago |
greatbridf
|
bfcf57b9a0
prepare the memory layout for smp cpu init
|
4 months ago |
greatbridf
|
b016c589f6
rewrite(signal_list): provide better encapsulation
|
4 months ago |
greatbridf
|
e021390c95
fix(wait): generate corrent wstatus to handle stop signals
|
4 months ago |
greatbridf
|
0192745ef2
fix(scheduler): permit iwake called on Running threads
|
4 months ago |
greatbridf
|
d873af30d8
fix(UserString): register should be marked inout
|
4 months ago |
greatbridf
|
1977d04c21
fix(tty): some abnormal behavior in tty job control ops.
|
4 months ago |
greatbridf
|
6612cf8b21
fix: deadlocks that happens on task switches
|
4 months ago |
shao
|
6ecf5b4237
fix build bug in gblibc
|
4 months ago |
greatbridf
|
0295d3e954
fix: UserBuffer move CheckedUserPointer on fill called
|
4 months ago |
greatbridf
|
c6d416043e
fix terminal subsystem, print syscall debug info conditionally
|
4 months ago |
greatbridf
|
2c72c9ba77
fixes and updates, basically on mem and scheduler
|
4 months ago |
greatbridf
|
fca6223938
move interrupt and vm to rust
|
4 months ago |
greatbridf
|
a8adfd1dfc
chore: add READM.md
|
5 months ago |
greatbridf
|
b9756e3233
rewrite: some of the process part and syscalls
|
5 months ago |
greatbridf
|
7930b71762
feat: rewrite filearray with rust
|
5 months ago |
greatbridf
|
e35fd75836
fix(pipe_read): reads don't need to be atomic
|
5 months ago |
greatbridf
|
ae698248ee
[partial] feat: add sync stuffs
|
5 months ago |
greatbridf
|
f4128f04a0
Merge branch 'vfs-refactor'
|
6 months ago |
greatbridf
|
b67ed10025
feat: load huge kernel, new memory layout
|
6 months ago |
greatbridf
|
b94122a5fb
fix(buddy): create_zone with args like 12, 15
|
6 months ago |
greatbridf
|
1d5525f5c1
rewrite Dentry module with rust
|
6 months ago |
greatbridf
|
ea629feec9
rewrite(ahci): rewrite ahci module with rust
|
6 months ago |
greatbridf
|
b43277c46c
refactor: rewrite fs submodule with rust
|
6 months ago |
greatbridf
|
c3b20946d2
rewrite(e1000e): rewrite e1000e driver with rust
|
7 months ago |
greatbridf
|
1f7bed61dd
feat: rust support
|
7 months ago |
greatbridf
|
b92bb0270f
change(defs): i* should not be explicitly signed
|
7 months ago |
greatbridf
|
d12f42764e
fix(readdir): the third argument is unsupported
|
7 months ago |
greatbridf
|
f952057453
change(vector): emplace_back should return a ref
|
7 months ago |
greatbridf
|
3d37d43eb5
fix(types::list): erroneous get and remove
|
7 months ago |
greatbridf
|
d785937269
chore: change debugging settings
|
7 months ago |
greatbridf
|
58eb82d5b3
feat(driver): add e1000e driver
|
7 months ago |
greatbridf
|
d75905e322
change: improve module arch. and fix some bugs
|
7 months ago |
greatbridf
|
eedcf95ee9
chore(pretty-print): rewrite pretty printers
|
7 months ago |
greatbridf
|
538244e339
style: reformat all codes with new format
|
7 months ago |
greatbridf
|
eec5d5c283
chore: update .gitignore and CMakeLists.txt
|
7 months ago |
greatbridf
|
f88b4da3fd
change(gblibstdc++): use EBO for all stl classes
|
8 months ago |
greatbridf
|
e6c6d8f1b7
feat: use RAII to manage dentry pointers
|
8 months ago |
greatbridf
|
4e79226a6f
chore(debug): add dwarf data for ISR
|
8 months ago |
greatbridf
|
cafeec4a85
refactor: rewrite all dentry part of vfs
|
8 months ago |
greatbridf
|
4851662c29
change(vfs): move class vfs out
|
9 months ago |
greatbridf
|
4ec085b55c
fix(syscall): make getcwd return buf length filled
|
9 months ago |
greatbridf
|
4eb3d8228e
change(process): remove k_new_threadd
|
9 months ago |
greatbridf
|
6be43506e5
change(filearray): add filearray class
|
9 months ago |
greatbridf
|
80d0ee4dd2
fix(shared_ptr): operator= on derived class, swap
|
9 months ago |
greatbridf
|
23ec09cb64
fix: fifo, paging, tkill, preemptive kernel
|
9 months ago |
greatbridf
|
0b5c54c2cf
change(sched): move idle task out of ready queue
|
9 months ago |
greatbridf
|
e526dc0708
Merge branch 'long-mode' into vfs-refactor
|
9 months ago |
greatbridf
|
6c5408c96f
add schedstat, improve schedule algorithm
|
9 months ago |
greatbridf
|
4f18b18088
fix: tls_desc32 may not be correctly copied
|
9 months ago |
greatbridf
|
dd6a779790
fix hash_map
|
9 months ago |
greatbridf
|
753cb3d885
fix: getdents64 struct size
|
9 months ago |
greatbridf
|
62e0eaff42
fix temporary user_space_program/init
|
9 months ago |
greatbridf
|
b6b04e657d
works
|
9 months ago |
greatbridf
|
0d8f6f019b
fix: fat32 filesystem
|
9 months ago |
greatbridf
|
73ab9a9320
syscall
|
9 months ago |
greatbridf
|
dfcbe573b1
fix bugs, add serial module
|
9 months ago |
greatbridf
|
6734968dc6
fix
|
9 months ago |
greatbridf
|
cb243f2a67
align rsp to 16 bytes
|
9 months ago |
greatbridf
|
15dabfee26
fix some problems
|
9 months ago |
greatbridf
|
aab3befaf5
use layout regs when debugging
|
9 months ago |
greatbridf
|
ac083a7cf0
brand new mem subsystem
|
9 months ago |
greatbridf
|
4572e5ce46
remove keyboard drive, make serial module
|
10 months ago |
greatbridf
|
6f29d1acca
allocator
|
10 months ago |
greatbridf
|
a092424c56
slab and buddy allocator
|
10 months ago |
greatbridf
|
04c392fdc7
create page table, enter long mode
|
10 months ago |
greatbridf
|
6c586cfd98
feat(timer & syscall): add readv, change tick rate
|
10 months ago |
greatbridf
|
6674d1b5bb
change(mbr): read 64k more
|
10 months ago |
greatbridf
|
c4ce6874f5
fix(blk_allocator): update p_start properly
|
10 months ago |
greatbridf
|
2a7dde2f9e
feat(procfs): impl procfs and mount() syscall
|
10 months ago |
greatbridf
|
b4bb1feadf
rewrite(string): new string class
|
11 months ago |
greatbridf
|
635ea3e5ee
feat(llseek): llseek return file->seek
|
11 months ago |
greatbridf
|
2cb5366997
fix(vector): resize should check m_capacity
|
11 months ago |
greatbridf
|
bd0da59162
fix(lock): add lock_irq to avoid deadlocks
|
11 months ago |
greatbridf
|
970c203132
change(fat32): use map to store cluster buffer
|
11 months ago |
greatbridf
|
b12cf751c9
feat(syscall): impl MONOTONIC clock for gettime
|
11 months ago |
greatbridf
|
87949fe12a
feat(syscall): impl. symlink and readlink
|
11 months ago |
greatbridf
|
370949b19a
refactor(ahci, fat): make achi read 3kb a time
|
11 months ago |
greatbridf
|
95ee316d1b
fix(interrupt): send EOI to PIC2 for IRQ8-15
|
11 months ago |
greatbridf
|
1dacf49c2a
fix(lock): lock not properly locked
|
11 months ago |
greatbridf
|
7efa80fa12
feat: poll() and llseek() for busybox shell
|
11 months ago |
greatbridf
|
ad3ff833e5
refactor: rewrite thread and readyqueue
|
11 months ago |
greatbridf
|
1504e35835
change(syscall): kill unsupported syscall in place
|
11 months ago |
greatbridf
|
698266b865
feature(tty): support of tty termios
|
11 months ago |
greatbridf
|
b1b6d920f8
refactor: special node files and partprobe
|
11 months ago |
greatbridf
|
94f3cee3e5
refactor: move init script out of init_vfs
|
11 months ago |
greatbridf
|
dbda9e3578
refactor: divide vfs.hpp into four
|
11 months ago |
greatbridf
|
da84d0d39b
refactor: vfs
|
11 months ago |
greatbridf
|
f67d993913
remove: some redundant code
|
11 months ago |
greatbridf
|
e75d8437f5
feature(syscall): unlink and access
|
11 months ago |
greatbridf
|
cb12970934
feature(shared_ptr): add make_shared();
|
11 months ago |
greatbridf
|
059465cfd5
feature(hash_map): add begin() and end()
|
11 months ago |
greatbridf
|
56349fea2c
change(user-sh): suppress runcmd() warning
|
11 months ago |
greatbridf
|
f607aecdab
update: pretty print script
|
11 months ago |
greatbridf
|
eccb650472
chore: update Makefile.src, remove redundant files
|
11 months ago |
greatbridf
|
735b7988b3
fix: remove constexpr from some function decl.
|
11 months ago |
greatbridf
|
61eaa076d3
chore: check if we should probe fdisk path in conf.
|
11 months ago |
greatbridf
|
1c7a276b93
change(proclist): remove emplace from proclist;
|
11 months ago |
greatbridf
|
530db35b6a
feat(file): append to file
|
1 year ago |
greatbridf
|
c342508132
feat(syscall.open): add truncate support
|
1 year ago |
greatbridf
|
0c005d1b68
fix(dup2): newfd should not share flags(O_CLOEXEC) with oldfd
|
1 year ago |
greatbridf
|
c29afbde1d
feat(truncate): add it to syscall, vfs and tmpfs
|
1 year ago |
greatbridf
|
c7a6dee5eb
fix(ahci): copy minimum of cnt and sector size in read()
|
1 year ago |
greatbridf
|
4ac28ae9a7
feat(init): execute init script using busybox sh
|
1 year ago |
greatbridf
|
1cacb91f2b
feat(thead_local): save and load thread local area
|
1 year ago |
greatbridf
|
74c913f994
feat(syscall): implement sigaction
|
1 year ago |
greatbridf
|
e7f8d74f83
fix(rt_sigprocmask): SIG_UNBLOCK should invoke signals.unmask
|
1 year ago |
greatbridf
|
3aa82c2b13
feat(scheduler): support multi kernel stack frames
|
1 year ago |
greatbridf
|
b2d19e6ff6
change(mm): remove extra memory fences
|
1 year ago |
greatbridf
|
f998f5ec25
fix(port, kmods): make kmods aligned to 16bytes, make inl volatile
|
1 year ago |
greatbridf
|
6097ccb5cc
fix(fat32): read the whole fat table
|
1 year ago |
greatbridf
|
759eb73ba3
rewrite(allocator): locked version of kernel allocator
|
1 year ago |
greatbridf
|
0809eb0e7b
fix(filearr): allocate fd in dup2()
|
1 year ago |
greatbridf
|
d5070d823a
feat(syscall): mkdir
|
1 year ago |
greatbridf
|
496a4bb31f
feat(syscall): impl. partial gettid and wait4
|
1 year ago |
greatbridf
|
5926e83a34
feat(syscall): uname, getpgid, getuid, rt_sigaction(half works)
|
1 year ago |
greatbridf
|
20ed412b5a
fix(rbtree): rbtree copy
|
1 year ago |
greatbridf
|
fdb0052684
fix(signal): wakeup the threading on signals generated
|
1 year ago |
greatbridf
|
a52f58ffb4
feat(syscall): add rt_sigprocmask
|
1 year ago |
greatbridf
|
d53ea9f452
fix(usp-sh): fix pipecmd
|
1 year ago |
greatbridf
|
35cce41a09
fix(vfs): close pipes properly, prohibit sendfile64 used on non regular files
|
1 year ago |
greatbridf
|
5813062c00
Merge branch 'dev'
|
1 year ago |
greatbridf
|
41566272a6
fix(mmap): adjust file nullptr check
|
1 year ago |
greatbridf
|
d8a51c9d64
chore(make): update Makefile.src
|
1 year ago |
greatbridf
|
b4ec221a53
feat(ahci): add ahci controller driver
|
1 year ago |
greatbridf
|
12c41b087e
refactor(irq): new irq handling method
|
1 year ago |
greatbridf
|
46dc1ed418
fix(vfs): check whether a dentry is a directory before read and write
|
1 year ago |
greatbridf
|
880a7a1057
change(mbr): read 320KB
|
1 year ago |
greatbridf
|
0746c681e2
change(allocator): make all functions constexpr
|
1 year ago |
greatbridf
|
5cf3c5bd56
fix(vector): fix bugs, optimize memory allocation
|
1 year ago |
greatbridf
|
25e48c79a2
change(image): rename bb to busybox_
|
1 year ago |
greatbridf
|
8efa4a211a
feat(syscall): add sendfile64
|
1 year ago |
greatbridf
|
8123051e6a
feat(libstdc++): addr max and min
|
1 year ago |
greatbridf
|
4a42fe3956
refactor(vfs): rewrite struct file
|
1 year ago |
greatbridf
|
47934b45b5
feat(libstdc++): add shared_ptr
|
1 year ago |
greatbridf
|
9ca65a15e9
fix(inode_write): update inode size after writting
|
1 year ago |
greatbridf
|
6d321f5eac
feat(open): open() can now create new files
|
1 year ago |
greatbridf
|
b5faee6ded
feat(types::path): add types::path to handle paths
|
1 year ago |
greatbridf
|
0f9c6c4603
feat(syscall): add getdents64
|
1 year ago |
greatbridf
|
09fa92b097
feat(syscall): add fcntl64
|
1 year ago |
greatbridf
|
2656facbab
feat(syscall): add statx
|
1 year ago |
greatbridf
|
8576f82ca1
fix(mm.split): update file offset of newmm
|
1 year ago |
greatbridf
|
50b9527a09
feat(syscall): add mmap and munmap
|
1 year ago |
greatbridf
|
281050186a
feat(std::set): add template key version of lower_bound
|
1 year ago |
greatbridf
|
8115a79f02
feat(syscall): add brk
|
1 year ago |
greatbridf
|
4ee526a1aa
refactor(mm): some tweaks of mm and mm_list
|
1 year ago |
greatbridf
|
e991778937
fix(rbtree): fix rbtree rotate and set copy ctor
|
1 year ago |
greatbridf
|
915f90251e
feat(image): add busybox to mount image
|
1 year ago |
greatbridf
|
696aaa567c
feat(syscall): add clock_gettime64, getuid and prctl
|
1 year ago |
greatbridf
|
da4fc9c087
feat(syscall): add syscalls, change syscall ids
|
1 year ago |
greatbridf
|
3cf21d6082
feat(syscall): add set_thread_area
|
1 year ago |
greatbridf
|
423968a920
feat(vfs): support opening relative path
|
1 year ago |
greatbridf
|
1da64db368
feat(libstdc++): add priority_queue
|
1 year ago |
greatbridf
|
c98321cc3d
feat(libstdc++): add deduction guides and iter tools
|
1 year ago |
greatbridf
|
2355016228
feat(libstdc++): add vector
|
1 year ago |
greatbridf
|
fa48094702
fix(cmake): remove list.hpp
|
1 year ago |
greatbridf
|
719a421750
change(kernel): replace types::list with std::list
|
1 year ago |
greatbridf
|
1f1af196a0
feat(libstdc++): add std::list
|
1 year ago |
greatbridf
|
ae07552418
fix(rbtree): propagate... of allocator
|
1 year ago |
greatbridf
|
6f77e1dd82
fix(int14): save mmx registers
|
1 year ago |
greatbridf
|
61cd2982f9
change(vfs): move dentry dtors to hpp
|
1 year ago |
greatbridf
|
929a17f7a3
fix(ld): add sentry to prevent kernel too large
|
1 year ago |
greatbridf
|
8b90f07a34
change(vfs): readdir callback should pass by ref.
|
1 year ago |
greatbridf
|
a9b38d3154
change(types::alloc): alloc 8 bytes once at least
|
1 year ago |
greatbridf
|
4e0f5a1b06
fix(functional): larger _data for vtable
|
1 year ago |
greatbridf
|
5287b2b529
feat(rbtree): upper bound and lower bound
|
1 year ago |
greatbridf
|
247863ce35
refactor(thread): remove thdlist and some ctors
|
1 year ago |
greatbridf
|
0a7b5413a5
fix tuple and rbtree, simplify kernel process
|
1 year ago |
greatbridf
|
bc841ee42e
feat(libstdc++): add at and [] to map
|
1 year ago |
greatbridf
|
3893ba9cea
feat(libstdc++): add stl map
|
1 year ago |
greatbridf
|
feadee8506
feat(libstdc++): some more features of set
|
1 year ago |
greatbridf
|
3807ff3e32
feat(libstdc++): add stl set
|
1 year ago |
greatbridf
|
ec19ff3095
change(proclist): remove tty_idx
|
1 year ago |
greatbridf
|
07638e3531
change(kernel): remove types::pair
|
1 year ago |
greatbridf
|
5444b2ee83
feat(libstdc++): add pair
|
1 year ago |
greatbridf
|
15063be59a
fix(tuple): make tuple copy & move ctor. constexpr
|
1 year ago |
greatbridf
|
c4bd0eb20e
feat(libstdc++): tuple
|
1 year ago |
greatbridf
|
e1446fc737
style(process): use structured binding...
|
1 year ago |
greatbridf
|
e289c9a72b
feat(bitmap): change bm_ funcs to class bitmap
|
1 year ago |
greatbridf
|
188c55e96e
change(vector): change the behavior of resize
|
1 year ago |
greatbridf
|
94d7406520
fix(vector): does nothing if size() == n
|
1 year ago |
greatbridf
|
e9e2680a69
change(mem.cpp): use structured binding
|
1 year ago |
greatbridf
|
9fcf1ba7ba
feat(libstdc++): add bit_cast
|
1 year ago |
greatbridf
|
2d8ca9bdaa
fix(libstdc++): make deleted addressof const T*
|
1 year ago |
greatbridf
|
d5a5a44d02
feat(functional): add invoke_r
|
1 year ago |
greatbridf
|
400d5597f6
feat(tty): show control char on screen
|
1 year ago |
greatbridf
|
2e38e5e6de
fix(type_traits): fix decay
|
1 year ago |
greatbridf
|
2ba94b1ce9
feat(functional): c++ std::function
|
1 year ago |
greatbridf
|
20fa42c8e4
fix(type_traits): is_template_instance<>
|
1 year ago |
greatbridf
|
727c3c936a
refactor(gblibstdc++): add type_traits and utility
|
1 year ago |
greatbridf
|
7472cbe839
feat(gbstdlibc++): add gbstdlibc++ and utility
|
1 year ago |
greatbridf
|
4cf6746d1d
fix(tcsetpgrp): get ctrl tty by sid instead of pid
|
1 year ago |
greatbridf
|
5858a28309
fix(int14): preserve SSE registers
|
1 year ago |
greatbridf
|
225bbdf08a
fix(crt0): do not use parameters on the stack
|
1 year ago |
greatbridf
|
8dfd98cdb1
fix(mem): add memory fence to prevent reordering
|
1 year ago |
greatbridf
|
1baa59a2b2
style(lazybox): call main() recursively
|
1 year ago |
greatbridf
|
71c939840d
fix(elf): check before mmapping LOAD sections
|
1 year ago |
greatbridf
|
cef73c3edd
style(paccess): make paccess() inline
|
1 year ago |
greatbridf
|
f8670fcfce
fix(function): check size of FuncLike object
|
1 year ago |
greatbridf
|
b6dbdcae1e
fix(sh): ignore -Winfinity-recursion
|
1 year ago |
greatbridf
|
431d80298f
fix(stack_protector): move stack_chk_guard to libc
|
1 year ago |
greatbridf
|
cf416c45b5
feat(kill): add syscall kill()
|
2 years ago |
greatbridf
|
9483e98eca
fix(proclist::find()): check iter null
|
2 years ago |
greatbridf
|
769feae046
feat(gblibc): add umask()
|
2 years ago |
greatbridf
|
a4c5491f01
change(types): add mode_t
|
2 years ago |
greatbridf
|
5eee6fd14b
feat(gblibc): add gettimeofday()
|
2 years ago |
greatbridf
|
7e873a0e79
feat(gblibc): add stat()
|
2 years ago |
greatbridf
|
db73e41887
feat(gblibc): add fstat()
|
2 years ago |
greatbridf
|
64c1db8727
feat(gblibc): realloc
|
2 years ago |
greatbridf
|
2252c898bf
feat(gblibc): add strsignal()
|
2 years ago |
greatbridf
|
f17738319d
feat(gblibc): add strndup, strdup
|
2 years ago |
greatbridf
|
e9937eddbd
feat(environ): pass envs between procs
|
2 years ago |
greatbridf
|
b8bfecd56f
feat(gblibc): asprintf and vasprintf
|
2 years ago |
greatbridf
|
2298a86ef1
feat(gblibc): add ferror_unlocked
|
2 years ago |
greatbridf
|
405ef53f7a
feat(tty): clear read buf in default sig. handlers
|
2 years ago |
greatbridf
|
92f2e82f02
feat(gblibc): clearerr, ferror, feof
|
2 years ago |
greatbridf
|
1f9648b753
feat(gblibc): bsearch()
|
2 years ago |
greatbridf
|
e4159f941b
feat(gblibc): add qsort, rand, alloca
|
2 years ago |
greatbridf
|
5799cd8bfd
fix(ioctl): check whether file is /dev/console
|
2 years ago |
greatbridf
|
69803ca140
feat(gblibc): isatty()
|
2 years ago |
greatbridf
|
a3b9f3e011
feat(gblibc): add {ge,pu}tc_unlocked
|
2 years ago |
greatbridf
|
8eab661b1a
fix(gblibc): change NDINSERT and NDERASE to func
|
2 years ago |
greatbridf
|
8d8a8f7a1c
feat(gblibc): add fopen and move stdout
|
2 years ago |
greatbridf
|
652028e079
feat(gblibc): buffered io and printf
|
2 years ago |
greatbridf
|
1ce4b3415e
feat(gblibc): add malloc, brk, sbrk
|
2 years ago |
greatbridf
|
0c919f05e7
feat(gblibc): set errno for syscalls
|
2 years ago |
greatbridf
|
3bca251840
feat(gblibc): stderror()
|
2 years ago |
greatbridf
|
2d34baf675
feat(gblibc): add strstr()
|
2 years ago |
greatbridf
|
d67ccc411a
feat(gblibc): strcspn
|
2 years ago |
greatbridf
|
428d0d3321
feat(gblibc): add strcasecmp and strncasecmp
|
2 years ago |
greatbridf
|
f3ad9758aa
feat(gblibc): add __stack_chk_fail_local
|
2 years ago |
greatbridf
|
3e141f09b7
change(gblibc): move errno to gblibc
|
2 years ago |
greatbridf
|
7b059e1a11
feat(gblibc): add string.h and stdio.h funcs
|
2 years ago |
greatbridf
|
15f53c60ab
remove crt0 out of gblibc
|
2 years ago |
greatbridf
|
eaa4c84140
feat: vfs_open_proc for user space syscalls
|
2 years ago |
greatbridf
|
d3f2ae9dcf
Merge branch 'dev'
|
2 years ago |
greatbridf
|
f41f73a8b1
fix: mmaped pages of child procs may be empty
|
2 years ago |
greatbridf
|
b60840f419
change(mmap): remove _mmap
|
2 years ago |
greatbridf
|
8887ccd4ed
fix: set p bit of cow page whose refcount is 1
|
2 years ago |
greatbridf
|
1724d02506
fix(mm_list): set children mm's owner on moving
|
2 years ago |
greatbridf
|
8e1293cd43
feat: support fat32 lowercase filename
|
2 years ago |
greatbridf
|
c4c0936a8f
feat(gblibc): add ctype
|
2 years ago |
greatbridf
|
e32a680f5d
feat: getpid and getppid
|
2 years ago |
greatbridf
|
9d560da181
feat: tc{s,g}etpgrp
|
2 years ago |
greatbridf
|
427190bcbe
feat: setpgrp
|
2 years ago |
greatbridf
|
167dd07e9b
feat(pipe): send SIGPIPE on read end close
|
2 years ago |
greatbridf
|
760c462f77
feat(pipe): send EOF on write end close
|
2 years ago |
greatbridf
|
dd684f86df
style: remove unused params of syscall funcs
|
2 years ago |
greatbridf
|
ba8f40e69b
feat: read and write of pipes will wait for data
|
2 years ago |
greatbridf
|
1ff2137333
feat: replace evequeue by cond_var
|
2 years ago |
greatbridf
|
da154fd066
change: use schedule_noreturn() in syscall exit
|
2 years ago |
greatbridf
|
6ab99e3b3d
change: make schedule() return int. status
|
2 years ago |
greatbridf
|
ea0c108eea
change: use linux x86_64 syscall no.
|
2 years ago |
greatbridf
|
611384a51b
feat(pipe): add syscall pipe
|
2 years ago |
greatbridf
|
2c198376c8
fix(map): fix map swap
|
2 years ago |
greatbridf
|
72448d4099
change(syscall): check syscall_no in syscall.cpp
|
2 years ago |
greatbridf
|
c268e31f28
feat(dup): add syscall dup and dup2
|
2 years ago |
greatbridf
|
56bf9be365
chore(pretty-printer): show iterator
|
2 years ago |
greatbridf
|
5ca22c8baf
feat(init): open all three file descriptors
|
2 years ago |
greatbridf
|
913821be67
feat: set errno in syscall
|
2 years ago |
greatbridf
|
ca1a736d4f
feat: close() syscall and shell redirection
|
2 years ago |
greatbridf
|
2aa7013175
Merge branch 'tty' into dev
|
2 years ago |
greatbridf
|
feff857aaf
Merge branch 'signal' into tty
|
2 years ago |
greatbridf
|
04de266681
feat(signal): send SIGINT, SIGQUIT and SIGSTOP
|
2 years ago |
greatbridf
|
8fbf10ff42
feat: syscall entry stub
|
2 years ago |
greatbridf
|
300de58007
add sid and pgid
|
2 years ago |
greatbridf
|
3aaae12c07
add sigquit
|
2 years ago |
greatbridf
|
71010de5b0
immediately return from read on EOF
|
2 years ago |
greatbridf
|
79e34047f3
Merge branch 'dev' into tty
|
2 years ago |
greatbridf
|
69cc04e836
feat: gdb pretty printer
|
2 years ago |
greatbridf
|
533155f3ad
change: move def. of pid_t to gblibc
|
2 years ago |
greatbridf
|
29fd9b2493
dev: stash
|
2 years ago |
greatbridf
|
3f9c17ee90
Merge branch 'memory' into dev
|
2 years ago |
greatbridf
|
841e258a13
fix: free stage1 and kinit
|
2 years ago |
greatbridf
|
a3d94d13c1
fix: mark kstack as allocated
|
2 years ago |
greatbridf
|
0471ee9813
change: replace some _new with operator new
|
2 years ago |
greatbridf
|
48c771e1c8
fix: __alloc_raw_page may return used page
|
2 years ago |
greatbridf
|
304ecefefb
feat: move kernel to 0xc0000000
|
2 years ago |
greatbridf
|
210279a15b
change: check allocated memory in vector::resize
|
2 years ago |
greatbridf
|
082d9bd19a
fix(list): make _empty_list.begin() return end()
|
2 years ago |
greatbridf
|
b2aa149ae2
change stage1 start addr to 0x8000
|
2 years ago |
greatbridf
|
32369676cd
dev: load kernel to 0xc0000000
|
2 years ago |
greatbridf
|
9de7953c44
style(mem.cpp): mark addr range
|
2 years ago |
greatbridf
|
cb96ca109a
feat: free kinit memory
|
2 years ago |
greatbridf
|
bfcf1567b6
style: add sections
|
2 years ago |
greatbridf
|
a9e1f08cc6
style: kernel_main
|
2 years ago |
greatbridf
|
d8a3f66f7a
fix(vfs_open): check nullptr
|
2 years ago |
greatbridf
|
183ed5166f
feat: check O_DIRECTORY flag
|
2 years ago |
greatbridf
|
68b4a8d207
feat: add {open,read}dir and lazybox ls
|
2 years ago |
greatbridf
|
36654c55e7
style: add type conversion for getcwd
|
2 years ago |
greatbridf
|
1e8ced7113
feat(usp): add lazybox and pwd
|
2 years ago |
greatbridf
|
5cd3d7fd69
feat(syscall): add getcwd
|
2 years ago |
greatbridf
|
0be57320a7
feat(chdir): add syscall chdir
|
2 years ago |
greatbridf
|
83ae21d337
Merge branch 'fix-stdio' into dev
|
2 years ago |
greatbridf
|
bd41632d2d
fix(stdio): add vsnprintf for va_list
|
2 years ago |
greatbridf
|
f136d0c455
Merge branch 'libc' into dev
|
2 years ago |
greatbridf
|
5e8359fd6b
feat(elf): set .bss section zero
|
2 years ago |
greatbridf
|
b22ee32e67
Merge branch 'shell'
|
2 years ago |
greatbridf
|
5808eb0276
Merge branch 'master' into shell
|
2 years ago |
greatbridf
|
c0271b312e
Merge branch 'assert-checks'
|
2 years ago |
greatbridf
|
f4b2f9707d
Merge branch 'master' into assert-checks
|
2 years ago |
greatbridf
|
1cb6fa31ce
Merge branch 'fix-elf'
|
2 years ago |
greatbridf
|
bb5739aff8
fix(elf): fill zeros for memory not in the file
|
2 years ago |
greatbridf
|
468581437b
style: add some assert checks
|
2 years ago |
greatbridf
|
9eca5ea767
feat: port xv6 sh
|
2 years ago |
greatbridf
|
ab1d508e44
Merge branch 'mem-priv'
|
2 years ago |
greatbridf
|
61e15f9966
feat: kill user proc. on int6 and int13
|
2 years ago |
greatbridf
|
8cd5128366
feat: add freeze() and kill_current()
|
2 years ago |
greatbridf
|
edcbbf0ac5
Merge branch 'master' into mem-priv
|
2 years ago |
greatbridf
|
aa68b006d0
Merge branch 'libc'
|
2 years ago |
greatbridf
|
f8dda1c0bd
change: remove assert.h in kernel
|
2 years ago |
greatbridf
|
9c5570cfcf
chore: use C_CXX_FLAGS to save common flags
|
2 years ago |
greatbridf
|
80076fd773
Merge branch 'master' into libc
|
2 years ago |
greatbridf
|
6982ae33f9
Merge branch 'fix-kstack'
|
2 years ago |
greatbridf
|
38c7861ce7
fix(thd): subtract ptr by kstack size on freeing
|
2 years ago |
greatbridf
|
44be3910a1
fix(ldscript): make ctors align to 4 bytes
|
2 years ago |
greatbridf
|
a69cd63f14
change: replace _Noreturn to attr(noret)
|
2 years ago |
greatbridf
|
3e759fa4dd
feat: assert
|
2 years ago |
greatbridf
|
1446211242
feat: add std{in,out,err} macro def.
|
2 years ago |
greatbridf
|
9ada56e74b
Merge branch 'master' into libc
|
2 years ago |
greatbridf
|
24d92f5489
Merge branch 'kill'
|
2 years ago |
greatbridf
|
bc52f08bfe
feat(mm): kill user process on access to priv. mem
|
2 years ago |
greatbridf
|
bc87e8c44f
feat: move codes to kill proc into proclist kill()
|
2 years ago |
greatbridf
|
07c6dad04c
Merge branch 'fix-filearr'
|
2 years ago |
greatbridf
|
3b78bb6760
fix(files): files may be closed for multiple times
|
2 years ago |
greatbridf
|
39430cb4c3
Merge branch 'fix-map'
|
2 years ago |
greatbridf
|
734d075ade
fix(map): fix erase
|
2 years ago |
greatbridf
|
7c895c1ac3
Merge branch 'mac'
|
2 years ago |
greatbridf
|
8dbabbba51
Merge branch 'master' into mac
|
2 years ago |
greatbridf
|
95e561acf6
Merge branch 'fix-mm'
|
2 years ago |
greatbridf
|
4a36d3b820
fix(mm): mem leak when unmapping mem area and mm
|
2 years ago |
greatbridf
|
1dba142be9
chore: clear cmake default linker options
|
2 years ago |
greatbridf
|
4596fdcda2
chore(usp): move usp linker args into ldscript
|
2 years ago |
greatbridf
|
7438992327
fix: make pid_t type 'int'
|
2 years ago |
greatbridf
|
2106a9dbaf
Merge branch 'libc'
|
2 years ago |
greatbridf
|
d4122bd571
feat(posix): impl. posix interface, update usp
|
2 years ago |
greatbridf
|
521d554189
Merge branch 'master' into libc
|
2 years ago |
greatbridf
|
08b04e54c1
Merge branch 'fix-libstdc++-map'
|
2 years ago |
greatbridf
|
fa8c43ffc7
fix(libstdc++): map deleting elements
|
2 years ago |
greatbridf
|
f5cdd03c55
Merge branch 'fix-mmap'
|
2 years ago |
greatbridf
|
f6dff3e420
fix(mm): invlpg after unmapping mem areas
|
2 years ago |
greatbridf
|
90b868a5cf
feat(gblibc): set entry point to _start
|
2 years ago |
greatbridf
|
fc545e1710
chore: build user-space-program with cmake
|
2 years ago |
greatbridf
|
33e5982d79
change(cmake): link the kernel with cmake
|
2 years ago |
greatbridf
|
d44046d21c
feat(gblibc): separate libc from kernel code
|
2 years ago |
greatbridf
|
df785572f8
Merge branch 'getdents'
|
2 years ago |
greatbridf
|
c8ff5b072a
feat(syscall): add getdents
|
2 years ago |
greatbridf
|
0120d746b3
feat(map): add operator bool, fix find()
|
2 years ago |
greatbridf
|
f12a8f26ab
feat(c++): add std::function
|
2 years ago |
greatbridf
|
bd25366506
change(file): add ptr to parent in struct file
|
2 years ago |
greatbridf
|
b74163b1d5
Merge branch 'open_working' into open
|
2 years ago |
greatbridf
|
d3a2691a11
feat(tty): read from tty
|
2 years ago |
greatbridf
|
246de6198f
output less debug info in kernel_main
|
2 years ago |
greatbridf
|
551cec8c54
feat: bufferred tty reading
|
2 years ago |
greatbridf
|
5b120d25aa
rewrite tty with c++ classes
|
2 years ago |
greatbridf
|
3bb9a50d6a
add non copyable class
|
2 years ago |
greatbridf
|
23e86efdae
fix buffer constructor
|
2 years ago |
greatbridf
|
8326c982e1
adapt more parts to cpp
|
2 years ago |
greatbridf
|
c23b25c8eb
remove constexpr of ~mm_list()
|
2 years ago |
greatbridf
|
576ca427b0
limit vfs_read buffer size when doing system calls
|
2 years ago |
greatbridf
|
57bb3fc54e
stash 2
|
2 years ago |
greatbridf
|
95059ec7e0
stash 1
|
2 years ago |
greatbridf
|
248e32a46d
change(buffer): rename buffer.{c,h} to buffer.hpp
|
2 years ago |
greatbridf
|
79482631aa
feat(file): add file descriptors
|
2 years ago |
greatbridf
|
789d002b13
fix(hash_map): make find() const compatible
|
2 years ago |
greatbridf
|
edb5ac858c
fix(syscall_exit): remove all thds from ready list
|
2 years ago |
greatbridf
|
9caca574db
change(thread): add class thdlist
|
2 years ago |
greatbridf
|
e4b84ad3da
feat(c++): add is_template_instance
|
2 years ago |
greatbridf
|
c5a6be277a
change(process): use map for process list
|
2 years ago |
greatbridf
|
a1ddb6a031
feat(map): add template container map
|
2 years ago |
greatbridf
|
44a9b33979
feat(hash_map): move pair class out of hash_map
|
2 years ago |
greatbridf
|
f021bc88bb
change(vfs): make fs_root inline global var
|
2 years ago |
greatbridf
|
5619ebf4c1
Merge branch 'vfs_fix' into open
|
2 years ago |
greatbridf
|
5a58906104
change(vfs): only allocate children lists for dirs
|
2 years ago |
greatbridf
|
87883c5978
refactor(new): add _new and pnew for allocators
|
2 years ago |
greatbridf
|
0f4efff41e
fix(vfs): wrong comment of dentry flags
|
2 years ago |
greatbridf
|
f2dd3f8c06
fix(vfs): wrong comment of dentry flags
|
2 years ago |
greatbridf
|
9dfbab81c4
Merge branch 'process-classes'
|
2 years ago |
greatbridf
|
b8cc71517a
feat(ata): check buf_size in ata_read()
|
2 years ago |
greatbridf
|
6e4a649a55
feat(c++): add operator& to list iterators
|
2 years ago |
greatbridf
|
b120b34b82
feat(process): add class readyqueue
|
2 years ago |
greatbridf
|
1c4a86f31d
style(process.cpp): use _noreturn_crash()
|
2 years ago |
greatbridf
|
56756566e1
refactor(irq0): remove is_scheduler_ready
|
2 years ago |
greatbridf
|
0d8e0a0ef4
feat(proc): add class proclist
|
2 years ago |
greatbridf
|
f96fe8524c
fix(c++): fix move and forward
|
2 years ago |
greatbridf
|
d5aa6193eb
Merge branch 'fix-release'
|
2 years ago |
greatbridf
|
07d5acdffa
fix(scheduler): push pseudo ret.addr. of go_kernel
|
2 years ago |
greatbridf
|
47a3dcc803
fix(lock): wrong jmp label
|
2 years ago |
greatbridf
|
749f13d09d
fix(evtqueue): return front() by value
|
2 years ago |
greatbridf
|
3a9e9ef206
fix(assert): assert_likely is undefined in Release
|
2 years ago |
greatbridf
|
e73c206e52
Merge branch 'exec'
|
2 years ago |
greatbridf
|
1285e661c3
refactor(assert): move assert and breakpoint code
|
2 years ago |
greatbridf
|
e548724797
fix(a20): check a20 status without breaking code
|
2 years ago |
greatbridf
|
020f3cb5c6
Merge branch 'exit_and_wait' into exec
|
2 years ago |
greatbridf
|
b2586e331c
feat(syscall): impl. exit and wait syscall
|
2 years ago |
greatbridf
|
cd69b19fe7
fix(init): send kernel address to get exit code
|
2 years ago |
greatbridf
|
5d0c569a04
feat(stack-protector): protect stack overflowing
|
2 years ago |
greatbridf
|
fc29de6d6f
fix(mm): continue; in clear_user()
|
2 years ago |
greatbridf
|
7936499704
fix(sse): use cpu SandyBridge to enable SSE
|
2 years ago |
greatbridf
|
6953011b53
refactor(scheduling): switch ctx. with schedule()
|
2 years ago |
greatbridf
|
cebc24a3ae
feat(assert): check error with assert
|
2 years ago |
greatbridf
|
0cf0b4d4c3
feat(mm): make mm_list constexpr
|
2 years ago |
greatbridf
|
a3602de618
feat(mm): add mm_list class
|
2 years ago |
greatbridf
|
5e395c9d64
feat(containers): make destructors constexpr
|
2 years ago |
greatbridf
|
e3a4dc9d3a
feat(process): use lock guard for kthreadd
|
2 years ago |
greatbridf
|
569a73f635
fix(kthreadd): exec task in child proc
|
2 years ago |
greatbridf
|
9ddd370740
feat(elf): pass program arguments to elf loader
|
2 years ago |
greatbridf
|
c1d7c094e0
feat(lock): add lock_guards
|
2 years ago |
greatbridf
|
ddb1ca3b92
feat(mm): free raw pages
|
2 years ago |
greatbridf
|
cc9c4c4989
feat(user): add syscall wrappers
|
2 years ago |
greatbridf
|
f4fa88196f
style: simplify code
|
2 years ago |
greatbridf
|
f27f7ddade
fix(syscall): not releasing pg_lists on unmapping
|
2 years ago |
greatbridf
|
6a7579eae5
feat(syscall): exit with no resource release
|
2 years ago |
greatbridf
|
50d68c0ff9
change(debugging): crash when makeing breakpoints
|
2 years ago |
greatbridf
|
a68e15e75d
change(init): move init decl. to kernel_main.c
|
2 years ago |
greatbridf
|
3995b9ef2e
fix(elf): set up stack when loading elf files
|
2 years ago |
greatbridf
|
ea96c12385
Merge branch 'stl' into exit_and_wait
|
2 years ago |
greatbridf
|
a1cc77112e
chore(debugging): add pretty print script
|
2 years ago |
greatbridf
|
09e5da2aaa
fix(k_map): clear source page's 'a' bit
|
2 years ago |
greatbridf
|
0371ab9514
Merge branch 'mem_fix' into exec
|
2 years ago |
greatbridf
|
f992f91617
fix(lock): labels may be defined multiple times
|
2 years ago |
greatbridf
|
ffdfb9c093
fix(process): stacks of kthds are not mirrored
|
2 years ago |
greatbridf
|
74fa329672
feat: make compiler optimize likely branches
|
2 years ago |
greatbridf
|
362f149fcb
refactor(paging): move kernel pd and empty page
|
2 years ago |
greatbridf
|
16cb499967
fix(port): add asm volatile
|
2 years ago |
greatbridf
|
f10031fe36
fix(syscall): tell compiler it affects eax and edx
|
2 years ago |
greatbridf
|
03d4bfa86e
chore(mm): add TODO for mm_area mirroring
|
2 years ago |
greatbridf
|
943868c7f9
feat(mm): add k_unmap and dealloc_{pd, pt}
|
2 years ago |
greatbridf
|
d551a55a48
fix(page.refcount): alloc refcount in ident. area
|
2 years ago |
greatbridf
|
68a2a9fdd3
feat(c++): add PointerType, pnew
|
2 years ago |
greatbridf
|
ab67740b4f
fix(k_map): invalidate tlb cache when mapping cow
|
2 years ago |
greatbridf
|
673c784b88
fix(mmap): save mmap'ped file info when copying mm
|
2 years ago |
greatbridf
|
e3d5803469
optimize(mm): rename pptr_t, make funcs constexpr
|
2 years ago |
greatbridf
|
8af1356b08
style(mm): simplify code
|
2 years ago |
greatbridf
|
b656c201bf
fix(list): return end() when not found
|
2 years ago |
greatbridf
|
130a495df4
fIx(mm): make cow referred pages also cow
|
2 years ago |
greatbridf
|
03b2aadd9f
feat(concept): add concept Hasher and Allocator
|
2 years ago |
greatbridf
|
45ed1dda86
feat(containers): make operator== const
|
2 years ago |
greatbridf
|
ad0c8653da
chore(c++): compile with standard c++20
|
2 years ago |
greatbridf
|
2de03e53eb
fix(CMakeLists): set FDISK_BIN if not defined
|
2 years ago |
greatbridf
|
2eafad4b65
chore(configure): check and set FDISK_BIN
|
2 years ago |
greatbridf
|
34b3bf7644
feat(syscall): impl. exec() to load elf files
|
2 years ago |
greatbridf
|
3d716d00d5
Merge branch 'ata'
|
2 years ago |
greatbridf
|
6627cd11bd
Merge branch 'special-device-file' into ata
|
2 years ago |
greatbridf
|
3f508e8775
feat(fs): add fat32 filesystem
|
2 years ago |
greatbridf
|
a9363f3a4a
fix(mmap): correct mmap() definition
|
2 years ago |
greatbridf
|
148cec14b4
fix(mbr): read 128k
|
2 years ago |
greatbridf
|
4eca7c8ff6
fix(string): remove string custom constructors
|
2 years ago |
greatbridf
|
843b17eb68
fix(string): fix operator+=(const char) and back()
|
2 years ago |
greatbridf
|
1e81695c9a
feat(vector): add copy constructor
|
2 years ago |
greatbridf
|
b8d3768286
fix(vector): make operator= return *this
|
2 years ago |
greatbridf
|
14b037a6df
fix(hash_map): several fixes
|
2 years ago |
greatbridf
|
6bab50c7fe
feat(string): add operator==
|
2 years ago |
greatbridf
|
14c830a22c
feat(vector): add move assignment func.
|
2 years ago |
greatbridf
|
41b56ecb26
feat(c++): add remove_cv, decay
|
2 years ago |
greatbridf
|
8058928329
feat(vfs): make vfs a interface
|
2 years ago |
greatbridf
|
5e6a91193c
feat(hash): add string hash functions
|
2 years ago |
greatbridf
|
7c938ba933
feat(hash_map): impl. hash_map
|
2 years ago |
greatbridf
|
2ef440f8e1
change(vfs): use c++
|
2 years ago |
greatbridf
|
2dafb2999b
feat(make): use mtools to copy files into boot.img
|
2 years ago |
greatbridf
|
8da2920aa5
chore(configure): check whether mkfs.fat exists
|
2 years ago |
greatbridf
|
05cf4932d8
feat(vfs): add new struct special_node
|
2 years ago |
greatbridf
|
41aeb2dd0d
style(vfs): rename union special_node to node_t
|
2 years ago |
greatbridf
|
f9ba0231e8
change(ata): make identify() return a status value
|
2 years ago |
greatbridf
|
9b715713dc
fix(vfs): check if special node ops func exist
|
2 years ago |
greatbridf
|
23542e4786
change(boot.img): use 512MiB as the disk image size
|
2 years ago |
greatbridf
|
827b33c6cb
Merge branch 'disk-prepare' into special-device-file
|
2 years ago |
greatbridf
|
1a8bd33e17
chore(boot.img): create fat partition
|
2 years ago |
greatbridf
|
b5bd5dc2d7
chore(cmake): use cmds working on both platforms
|
2 years ago |
greatbridf
|
d6de8a08f0
feat(mbr): build mbr.bin separately
|
2 years ago |
greatbridf
|
ad07d066eb
fix(mmap): read mapped data from file[offset]
|
2 years ago |
greatbridf
|
0638ea3bec
Merge branch 'ata' into special-device-file
|
2 years ago |
greatbridf
|
95c4bb21cc
Merge branch 'mmap' into ata
|
2 years ago |
greatbridf
|
82cd10f0fc
feat(mmap): able to do memory maps in kernel space
|
2 years ago |
greatbridf
|
1356bd2e63
feat(ata): ata read sector by reading node 2,0
|
2 years ago |
greatbridf
|
e88af94e05
feat(node): impl. mknode
|
2 years ago |
greatbridf
|
462ec39241
feat(ata): impl. init. ata and read sectors
|
2 years ago |
greatbridf
|
9c72ff3f2c
feat(syscall): add syscall crash
|
2 years ago |
greatbridf
|
e929d98515
feat(port): add class port
|
2 years ago |
greatbridf
|
7348abf2a1
chore(gitignore): ignore vim swap files
|
2 years ago |
greatbridf
|
05ab779eda
feat(process): add k_new_thread
|
2 years ago |
greatbridf
|
941a9874cf
fix(lock): make lock type volatile
|
2 years ago |
greatbridf
|
6107790323
fix(kthdd): acquire the lock only on func not null
|
2 years ago |
greatbridf
|
710e9cf529
Merge branch 'kernel-thread' into user-space-program
|
2 years ago |
greatbridf
|
88add58cf5
feat(kernel_thread): impl. kernel_thread forking
|
2 years ago |
greatbridf
|
aa5b5749c4
feat(lock): impl. spin lock
|
2 years ago |
greatbridf
|
9b18576715
chore(cross-compile.cmake): gen. it in ./configure
|
2 years ago |
greatbridf
|
7add1ab9a3
feat(list): make node->next and prev node_type
|
2 years ago |
greatbridf
|
db7926548d
feat: create kernel thread
|
2 years ago |
greatbridf
|
ecd76edc09
feat(syscall): impl. fork
|
2 years ago |
greatbridf
|
aed24262ab
chore(configure): set hardware accel. type
|
2 years ago |
greatbridf
|
d50e70efaa
feat(syscall): impl. sleep
|
2 years ago |
greatbridf
|
904883c5e3
refactor: add context save and load functions
|
2 years ago |
greatbridf
|
e6dc019e17
feat: build and link user space programs
|
2 years ago |
greatbridf
|
9a6aa020d8
Merge branch 'syscall'
|
2 years ago |
greatbridf
|
0aaa529fd0
chore(Makefile): rename configure, add reconfigure
|
2 years ago |
greatbridf
|
b013728ac4
feat(syscall): impl. syscalls
|
2 years ago |
greatbridf
|
c5d37ef334
style: change struct to class, remove parentheses
|
2 years ago |
greatbridf
|
14d8c7760e
chore: update global_find script
|
2 years ago |
greatbridf
|
54740e3f8e
Merge branch 'macos-adaption'
|
2 years ago |
greatbridf
|
5020eb6f75
feat(Makefile): enable parallel build
|
2 years ago |
greatbridf
|
941ac209b9
fix(configure): suppress output and return 0
|
2 years ago |
greatbridf
|
896023acbf
fix(linker): old 'ctors' won't be called
|
2 years ago |
greatbridf
|
fc23e8cba2
chore: add configure script
|
2 years ago |
greatbridf
|
c6a8f96e74
feat(serial): input data echo
|
2 years ago |
greatbridf
|
0de053a20f
Merge branch 'process'
|
2 years ago |
greatbridf
|
b93a90442c
feat(mm): add constructor for class mm
|
2 years ago |
greatbridf
|
21c06ac7c9
feat(process): add constructor for class process
|
2 years ago |
greatbridf
|
975ac4c437
fix(list): check if ptr is null before releasing
|
2 years ago |
greatbridf
|
06e54f821f
feat(c++): rvalue_ref
|
2 years ago |
greatbridf
|
0d79b8eae9
feat(c++): impl. forward and move
|
2 years ago |
greatbridf
|
afe474b291
refactor(process): do not store segs. in process
|
2 years ago |
greatbridf
|
be01268409
feat(process): scheduling
|
2 years ago |
greatbridf
|
77f3523304
feat(process): use emplace_back
|
2 years ago |
greatbridf
|
93685f6053
fix(c++): template forwarding should use &&
|
2 years ago |
greatbridf
|
ffa995672b
feat(list, vector): impl. emplace_back
|
2 years ago |
greatbridf
|
5e5b8a16e0
feat(vector): impl. operator=
|
2 years ago |
greatbridf
|
58349d6b5c
refactor(list, vector): simplify def.
|
2 years ago |
greatbridf
|
dcfa27d1dc
feat(process): add struct thread
|
2 years ago |
greatbridf
|
c0158d5a7e
feat(list): clear, erase and operator=
|
2 years ago |
greatbridf
|
342ecc0e21
feat(process): enter user mode
|
2 years ago |
greatbridf
|
9ba4232b4c
feat(interrupt): align stack in ISR
|
2 years ago |
greatbridf
|
bfd97f6c89
Merge branch 'mem'
|
2 years ago |
greatbridf
|
90cc9522ab
refactor: 拆分mem和mm,对interrupt使用cpp
|
2 years ago |
greatbridf
|
f7bf58435d
fix(allocator): allocate wrong size
|
2 years ago |
greatbridf
|
010eeefb18
refactor(mem): use cpp
|
2 years ago |
greatbridf
|
d5f54a40c5
refactor: prohibit c++ global objects
|
2 years ago |
greatbridf
|
7741c9d172
Merge branch 'vfs'
|
2 years ago |
greatbridf
|
1e170f1028
feat(vfs_stat): handle / and directories
|
2 years ago |
greatbridf
|
4660803811
feat(vfs): query file stat
|
2 years ago |
greatbridf
|
7f67c01d7e
feat(string): pop(), back() etc.
|
2 years ago |
greatbridf
|
abed3286f0
fix(errno): add __cplusplus header
|
2 years ago |
greatbridf
|
78e4bbef4b
fix(list,vector): remove explicit of initializer
|
2 years ago |
greatbridf
|
32acbc5031
fix(vector): dealloc undefined ptr on vector init
|
2 years ago |
greatbridf
|
137583508c
fix(vector): wrong const back() type
|
2 years ago |
greatbridf
|
a1dfcee9b7
feat(string): impl. clear() and c_str()
|
2 years ago |
greatbridf
|
f581b0765b
feat(string): add string class
|
2 years ago |
greatbridf
|
86643b9091
fix(vector): end() return wrong position
|
2 years ago |
greatbridf
|
89a69a47e9
feat(vfs): impl. vfs_open to open file and dirs
|
2 years ago |
greatbridf
|
44395a727c
feat(stdio): impl. strncpy
|
2 years ago |
greatbridf
|
f1116ddf25
feat(list): impl. find()
|
2 years ago |
greatbridf
|
3fd580fe86
feat: find inode according to filename
|
2 years ago |
greatbridf
|
60d64c224c
refactor: write tmpfs with c++
|
2 years ago |
greatbridf
|
0d93ab9d36
fix: bss_addr type conversion
|
2 years ago |
greatbridf
|
9f1b0d0b7d
feat: vector and allocator improvement
|
2 years ago |
greatbridf
|
b103ac85fe
fix: use brace init. for mklink file entry
|
2 years ago |
greatbridf
|
b19b0323e6
feat: create tmpfs and impl. basic ops
|
2 years ago |
greatbridf
|
a0c10918b1
Merge branch 'new_mem_allocation'
|
2 years ago |
greatbridf
|
e083913ad7
refactor: move bss initialization to kernel_main
|
2 years ago |
greatbridf
|
1ae32368a5
fix: translate iden. mapped ptr in v_ptr_to_p_ptr
|
2 years ago |
greatbridf
|
33f97a35c3
Merge branch 'cross-compiling'
|
2 years ago |
greatbridf
|
bd83189b48
chore: separate qemu args
|
2 years ago |
greatbridf
|
fe614c21b5
fix: match the two type definitions of kernel_size
|
2 years ago |
greatbridf
|
f848946130
chore: empty cross compiling toolchain prefix
|
2 years ago |
greatbridf
|
a3403a2a44
chore: update compiling flags
|
2 years ago |
greatbridf
|
7e5a6e89c7
Merge branch 'paging'
|
2 years ago |
greatbridf
|
d9ed36797d
Merge branch 'dev' into paging
|
2 years ago |
greatbridf
|
30b511a13f
fix: map more pages for the heap
|
2 years ago |
greatbridf
|
2dccf820fa
fix: release mode sse bug
|
2 years ago |
greatbridf
|
d923498640
feat: copy on write
|
2 years ago |
greatbridf
|
1cc56a7e13
feat: memory initialization
|
2 years ago |
greatbridf
|
2eaf205b8a
memory allocation
|
2 years ago |
greatbridf
|
a9ffa8ad1a
fix: tty.h not using extern "C"
|
2 years ago |
greatbridf
|
f2dab67f6e
style: remove TODOs
|
2 years ago |
greatbridf
|
5c72b6b203
feat: init_paging: check errors
|
2 years ago |
greatbridf
|
f495739520
style: kernel_main.c include paths
|
2 years ago |
greatbridf
|
c4c0c61e6b
feat: page mapping
|
2 years ago |
greatbridf
|
b021d6d93d
fix: not disabling interrupt while setting up gdt
|
2 years ago |
greatbridf
|
7c311199cb
working on broken system
|
2 years ago |
greatbridf
|
2396f6a355
feat: allocate pages for page tables (BROKEN)
|
2 years ago |
greatbridf
|
4ad62d98cf
feat: move kernel to 0x100000
|
2 years ago |
greatbridf
|
12f53f49eb
feat: type bitmap
|
2 years ago |
greatbridf
|
69a9725e1f
feat: load kernel size
|
2 years ago |
greatbridf
|
0d6d8d95fd
chore: update Makefile for debugging and running
|
2 years ago |
greatbridf
|
7cb2030b14
feat: tty, memcpy and strlen
|
2 years ago |
greatbridf
|
177ff70411
feat: serial port read and write
|
2 years ago |
greatbridf
|
f1e064e225
fix: update loader read size
|
2 years ago |
greatbridf
|
3e52ddd462
fix: enable SSE to prevent crashes
|
2 years ago |
greatbridf
|
ed409420ad
chore: update Makefile to run with qemu
|
2 years ago |
greatbridf
|
29cbe96c11
chore: update .gitignore
|
2 years ago |
greatbridf
|
d7bbbc54d6
chore: export compile command for vim and etc.
|
2 years ago |
greatbridf
|
c6488b7839
chore: supress some warnings concerning types
|
3 years ago |
greatbridf
|
682a1ebb2d
feat: set new gdt and tss
|
3 years ago |
greatbridf
|
17a56ef31e
style: simplify kernel_main
|
3 years ago |
greatbridf
|
192da56cf8
Merge branch 'fix' into paging
|
3 years ago |
greatbridf
|
5c6f57e50f
fix: macos build problem
|
3 years ago |
greatbridf
|
06c0d7de96
feat: page fault handing
|
3 years ago |
greatbridf
|
934bbc12aa
fix: wrong cmake script (linker path)
|
3 years ago |
greatbridf
|
900b7a9f43
Merge branch 'macos-compiling' into paging
|
3 years ago |
greatbridf
|
68225b9fab
Merge remote-tracking branch 'origin/paging' into paging
|
3 years ago |
greatbridf
|
1a5b8ccba3
feat: cross compiling in macos
|
3 years ago |
greatbridf
|
5b08ce1baf
fix: change def of size_t
|
3 years ago |
greatbridf
|
e5736d17d8
feat: add user segments
|
3 years ago |
greatbridf
|
3ef0e3e514
feat: print 64bit hex numbers
|
3 years ago |
greatbridf
|
e6ad94fa10
feat: define ptr_t basing on cpu type
|
3 years ago |
greatbridf
|
8263290dfb
feat: map 0xc0000000 as kernel space
|
3 years ago |
greatbridf
|
7f1ca69928
feat: enable paging
|
3 years ago |
greatbridf
|
3a9982a94d
feat: initialize pd and pt
|
3 years ago |
greatbridf
|
12ac6c5230
change: move kernel loader dest
|
3 years ago |
greatbridf
|
42fb5927b1
feat: use full address space
|
3 years ago |
greatbridf
|
36c0bb6a52
feat: page directory and page table struct
|
3 years ago |
greatbridf
|
e0bd7ce1a4
feat: read mem_map from bios
|
3 years ago |
greatbridf
|
2ad7c01332
feat: macro printkf
|
3 years ago |
greatbridf
|
1298cee68d
feat: print long long decimals
|
3 years ago |
greatbridf
|
48978f5f74
feat: timer
|
3 years ago |
greatbridf
|
9bc1fa9db7
feat: vga support CR
|
3 years ago |
greatbridf
|
1be69f0785
feat: improved keyboard event handling
|
3 years ago |
greatbridf
|
cfba937af6
fix: minus size after erasing element
|
3 years ago |
greatbridf
|
127fbbd0af
fix: add const version of _size() for list
|
3 years ago |
greatbridf
|
cb4d47c312
feat: call c++ objects' constructors
|
3 years ago |
greatbridf
|
d8f7580096
feat: list::empty()
|
3 years ago |
greatbridf
|
acd56e0f93
feat: keycodes definitions
|
3 years ago |
greatbridf
|
c07460aae0
chore: gdb notes
|
3 years ago |
greatbridf
|
20c4330c5b
feat: list container
|
3 years ago |
greatbridf
|
17edec9339
feat: print pointer and improvements on stdio
|
3 years ago |
greatbridf
|
bf43fc164f
fix: vga vbuffer overflow
|
3 years ago |
greatbridf
|
b78d75811a
chore: add extern "C" to some headers
|
3 years ago |
greatbridf
|
f26f9d7c34
feat: add port number for keyboard
|
3 years ago |
greatbridf
|
d6716c631d
chore: use qemu for debugging
|
3 years ago |
greatbridf
|
8e0fa0e23a
fix: execute cli before setting idt
|
3 years ago |
greatbridf
|
b442fa0499
chore: generate symbol file and debug info
|
3 years ago |
greatbridf
|
91cf3e6e82
fix: change return value of snprintf to ssize_t
|
3 years ago |
greatbridf
|
a42cf01bcf
chore: format
|
3 years ago |
greatbridf
|
d1816c9600
change: disable stack protector
|
3 years ago |
greatbridf
|
989a1f40ec
some articles about memory allocation
|
4 years ago |
greatbridf
|
a2e73c829b
malloc documentation
|
4 years ago |
greatbridf
|
2de79572aa
k_free and split large memory blocks
|
4 years ago |
greatbridf
|
edd0a3e83a
split block
|
4 years ago |
greatbridf
|
f64531c224
k_malloc
|
4 years ago |
greatbridf
|
754f25b2f8
increase memory space used to 64m
|
4 years ago |
greatbridf
|
a501e2b69c
add errno
|
4 years ago |
greatbridf
|
723d523b13
generate symbol files
|
4 years ago |
greatbridf
|
043b189910
read 16k of kernel
|
4 years ago |
greatbridf
|
5e32772cc9
some docs about the interrupt handling
|
4 years ago |
greatbridf
|
2900526df3
speed up keyboard int handling
|
4 years ago |
greatbridf
|
1b903a6424
use ring_buf to save scan codes
|
4 years ago |
greatbridf
|
96db07236f
snprintf print hex numbers
|
4 years ago |
greatbridf
|
12a1f4b207
fix stdio print negative number
|
4 years ago |
greatbridf
|
cdd34f456e
handle int 13
|
4 years ago |
greatbridf
|
e2cabea44b
add c defs of hlt cli sti
|
4 years ago |
greatbridf
|
bea738fe10
ring buffer
|
4 years ago |
greatbridf
|
6ec402e085
print init idt success info
|
4 years ago |
greatbridf
|
27d1d87806
vga buffer looped mode
|
4 years ago |
greatbridf
|
468c2091c4
receive keyboard data
|
4 years ago |
greatbridf
|
13f90ef413
make vdi
|
4 years ago |
greatbridf
|
1f23172be8
initialize idt
|
4 years ago |
greatbridf
|
bc404e29af
align stack
|
4 years ago |
greatbridf
|
959bc32960
clear screen on boot
|
4 years ago |
greatbridf
|
a9fb75786b
fix: update CMakeLists.txt
|
4 years ago |
greatbridf
|
b69d4d795d
add size.h and types.h
|
4 years ago |
greatbridf
|
aedae45086
change vga_printk definitions
|
4 years ago |
greatbridf
|
387a79a16e
break point
|
4 years ago |
greatbridf
|
bb030a6eb6
detect memroy
|
4 years ago |
greatbridf
|
a55ce6a3d1
vga printk supports \n
|
4 years ago |
greatbridf
|
bf6f14732c
snprintf
|
4 years ago |
greatbridf
|
c19661f79e
size_t
|
4 years ago |
greatbridf
|
747c03148f
make virtualbox vdi
|
4 years ago |
greatbridf
|
9c71c66e88
halt system
|
4 years ago |
greatbridf
|
7cb648b8c6
get memory size info
|
4 years ago |
greatbridf
|
52ebd67efd
explicitly convert string pointer type
|
4 years ago |
greatbridf
|
bbbc09c442
use stdint
|
4 years ago |
greatbridf
|
6d4c446ddf
printk and put char
|
4 years ago |
greatbridf
|
17b272f978
add pragma once
|
4 years ago |
greatbridf
|
1b7348b670
check a20
|
4 years ago |
greatbridf
|
6b2fab4ef6
introcude c
|
4 years ago |
greatbridf
|
ac64b6b352
docs
|
4 years ago |
greatbridf
|
7b880566be
protected mode
|
4 years ago |
greatbridf
|
84095c6cd7
read from disk
|
4 years ago |
greatbridf
|
bbb2dbc19b
128 bytes stack
|
4 years ago |
greatbridf
|
09590c450d
update .gitignore
|
4 years ago |
greatbridf
|
cb2c39a5dc
initial commit
|
4 years ago |