Commit Graph

161 Commits

Author SHA1 Message Date
Mathieu Maret
8a53ecfecd VGA: could be configured from MBI 2021-10-25 21:29:02 +02:00
Mathieu Maret
8ff10c938c Improve print information from mbi 2021-10-18 20:39:08 +02:00
Mathieu Maret
ddc0c4c84a Wrap IRQ with ASM 2021-10-08 11:24:02 +02:00
mathieu
f9d8a4ad29 Merge pull request 'ata' (#2) from ata into master
Reviewed-on: http://git.mathux.org/mathieu/matos/pulls/2
2021-10-06 13:50:10 +02:00
Mathieu Maret
19714126d1 ATA add write and some test 2021-10-06 10:45:03 +02:00
Mathieu Maret
a47783ed9c fix ATA disk and controller detection 2021-10-05 21:59:36 +02:00
Mathieu Maret
9c36f3afa2 Add zalloc 2021-10-04 21:20:16 +02:00
Mathieu Maret
f2e32cc0fd Add ATA 2021-10-03 23:19:00 +02:00
mathieu
1222c0b998 Merge branch 'master' into areaIntegration 2021-10-01 22:21:31 +02:00
Mathieu Maret
8edaa8646f link slab allocator to areaAlloc 2021-10-01 22:21:11 +02:00
Mathieu Maret
a96f72b0af Add alternative memcpy implementation 2021-09-15 21:58:06 +02:00
Mathieu Maret
10d42721e9 Add read_cycle_counter 2021-09-15 21:51:58 +02:00
Mathieu Maret
31aaf10635 bootstrap alloc and area 2021-08-09 14:55:47 +02:00
Mathieu Maret
8bb6cdbad4 Complete details about first 1MB reserved 2021-06-09 22:23:33 +02:00
Mathieu Maret
865d3b811e Rename memDesc to phyMemDesc 2021-04-10 21:53:03 +02:00
Mathieu Maret
4887984322 Thinner phy page pre-booking 2021-04-10 00:24:02 +02:00
Mathieu Maret
b077d54e7f WIP: implement basic of alloc area 2021-04-07 16:34:37 +02:00
Mathieu Maret
a2d2e1de60 Check malloc return value 2021-04-07 16:34:37 +02:00
Mathieu Maret
4a61d7f3b7 memDesc: change ref as unsigned 2021-02-10 21:15:35 +01:00
Mathieu Maret
3b7543064d alloc: simplify full usage 2021-01-26 08:45:13 +01:00
Mathieu Maret
5ab68d8197 Various cleaning 2021-01-25 20:05:38 +01:00
Mathieu Maret
ede53ae4f9 VGA renaming 2021-01-25 14:00:06 +01:00
Mathieu Maret
3f4fb9e952 add asprintf 2021-01-25 10:17:19 +01:00
Mathieu Maret
bea3449b11 Implement vsnprintf and use it 2021-01-24 23:51:21 +01:00
Mathieu Maret
b305653aac Fix klibc return values 2021-01-24 22:20:43 +01:00
Mathieu Maret
73b721dbc1 Add some mem stat 2021-01-23 21:51:00 +01:00
Mathieu Maret
c3d345bb87 Add 64bit printf 2021-01-23 21:21:13 +01:00
Mathieu Maret
8309174f1a Get mem mapping from bootloader 2021-01-23 00:47:06 +01:00
Mathieu Maret
77b495e382 Fix naming and mem bottom 2021-01-22 23:10:07 +01:00
Mathieu Maret
a254a7cd71 Fix allocation of too big size 2021-01-16 22:43:43 +01:00
Mathieu Maret
9815cc062f Multiple page allocation 2020-08-28 22:40:21 +02:00
Mathieu Maret
ba9e0f1bff protect slub access from multithread 2020-08-21 00:35:33 +02:00
Mathieu Maret
c71b0135cf add wq[Init|Free] 2020-08-20 23:41:36 +02:00
Mathieu Maret
5b933a82d3 Implement timeout on wait_queue
fix #1
2020-08-20 23:41:12 +02:00
Mathieu Maret
9c6c4f3470 Fix typo 2020-08-16 00:24:59 +02:00
Mathieu Maret
6922f6dfa4 improve wait_queue api 2020-08-15 23:31:35 +02:00
Mathieu Maret
0f200d1911 Add mutex implementation 2020-07-08 23:08:50 +02:00
Mathieu Maret
1230d738a6 Add %p for printf 2020-07-08 23:03:05 +02:00
Mathieu Maret
5de1c54b61 Move sleep Thread to test 2020-07-06 17:21:49 +02:00
Mathieu Maret
319f197fcd Fix scheduler with sleeping task 2020-05-03 23:13:17 +02:00
Mathieu Maret
b1e6bc1aab Fix initial thread status 2020-05-03 23:11:45 +02:00
Mathieu Maret
4b3f928f67 kthreadMsleep implementation wip 2020-05-03 14:45:26 +02:00
Mathieu Maret
f7525f9e76 Xsec to jiffies convertion 2020-04-30 23:16:41 +02:00
Mathieu Maret
c65c7bb7b0 More more stuff in arch subdir 2020-04-29 23:07:01 +02:00
Mathieu Maret
e51314ffac organize by arch 2020-04-27 23:45:38 +02:00
Mathieu Maret
6c3a03a4bc Implement Jiffies 2020-04-27 23:26:22 +02:00
Mathieu Maret
3b97d0307d Style: harmonize formatting
Thanks to: "clang-format -i -style=file **/*.{c,h}"
2020-04-27 00:14:51 +02:00
Mathieu Maret
6cfc8e1c2f kthread: formatting 2020-04-24 23:40:19 +02:00
Mathieu Maret
c7feb31c22 Add default exception handler 2020-04-24 23:39:56 +02:00
Mathieu Maret
dafaba7407 kthread implement yield 2020-04-24 23:35:57 +02:00
Mathieu Maret
b2d3cd62ca alloc: fix free in full slab 2020-04-24 23:28:11 +02:00
Mathieu Maret
0c389afa8f Harmonize kthread func naming 2020-04-24 13:42:47 +02:00
Mathieu Maret
59a8d3b582 Exception handler can access their ID 2020-04-23 23:59:57 +02:00
Mathieu Maret
de14e795d6 kthread: implement exit 2020-04-23 23:40:16 +02:00
Mathieu Maret
c1b13bc3f4 Improve log at boot 2020-04-23 23:38:20 +02:00
Mathieu Maret
2c0f54926d Initial kthread implementation 2020-04-23 14:49:42 +02:00
Mathieu Maret
5141044c06 use popal/pushal for context switch
Should take fewer clock nd save esp
2020-04-22 17:31:37 +02:00
Mathieu Maret
79c1fda419 Some defintion improvments 2020-04-22 16:54:30 +02:00
Mathieu Maret
a19f4cb609 Set PIT IRQ in main
complete interrupt_frame struct and formatting
2020-04-22 16:52:54 +02:00
Mathieu Maret
389452ec3f printf: also write on serial 2019-05-17 09:57:14 +02:00
Mathieu Maret
ca22696b29 klibc: put printf inside (instead of vga.h) 2019-05-17 09:35:23 +02:00
Mathieu Maret
13f1dc7878 Multiboot: display mmap and mod informations
sample code from https://www.gnu.org/software/grub/manual/multiboot/html_node/kernel_002ec.html#kernel_002ec
have issue (c.f. https://forum.osdev.org/viewtopic.php?t=30318)
2019-05-16 23:24:54 +02:00
Mathieu Maret
3bca737990 Add context switch
This is taken from SOS
2019-05-15 23:22:28 +02:00
Mathieu Maret
03c74c68d6 Fix headers 2019-05-15 23:20:03 +02:00
Mathieu Maret
340ae6a4d0 alloc: fix some naming. alloc up to page_size 2019-04-17 23:46:56 +02:00
Mathieu Maret
06c8562a80 alloc: reduce slabEntry size 2019-04-17 23:13:46 +02:00
Mathieu Maret
b3d38d8c9c alloc: split slab and slabEntry definition 2019-04-17 18:07:19 +02:00
Mathieu Maret
f2b0edc5a3 alloc: fix new slab allocation 2019-04-17 12:48:24 +02:00
Mathieu Maret
f90b9bd3fd alloc: fix indent 2019-04-17 12:06:54 +02:00
Mathieu Maret
8cf50c9a6e implement memcmp 2019-04-16 10:19:36 +02:00
Mathieu Maret
3f258485b9 implement free 2019-04-15 23:09:09 +02:00
Mathieu Maret
698490800f Alloc: selfContaining is optionnal 2019-04-15 22:49:10 +02:00
Mathieu Maret
f1b3895473 Alloc: could be initialized in random way
fix ENO usage
2019-04-15 21:35:47 +02:00
Mathieu Maret
6c91272fc2 alloc: slub implemented with list 2019-04-14 15:56:48 +02:00
Mathieu Maret
e03f0c0d78 Add test
Add test for alloc and add asert statement
2019-04-11 23:08:59 +02:00
Mathieu Maret
7def058cf4 Add slab allocator 2019-04-11 22:34:20 +02:00
Mathieu Maret
df1fa005b3 stack: add comments 2019-01-09 16:20:06 +01:00
Mathieu Maret
0e6a80f6e5 klibc: add some helper 2018-11-22 17:41:18 +01:00
Mathieu Maret
432d8801e1 Complete pagefault handler 2018-11-20 17:43:19 +01:00
Mathieu Maret
8108c8f3ab klibc: add string related func 2018-11-20 17:03:57 +01:00
Mathieu Maret
e998fec795 stack_trace try to get function arguments 2018-11-19 13:57:07 +01:00
Mathieu Maret
27293c805c Add more info about segfault 2018-11-16 15:00:31 +01:00
Mathieu Maret
085857a900 Add backtrace function 2018-11-16 14:47:21 +01:00
Mathieu Maret
50fa9b7d24 implement %x in printf 2018-11-16 10:34:03 +01:00
Mathieu Maret
ac64b124da paging: fix free unused pte 2018-11-15 22:53:27 +01:00
Mathieu Maret
146a06f0e6 wip: add blinking cursor 2018-11-14 18:03:11 +01:00
Mathieu Maret
4bbe08d8f5 Add count for allocated and mapped page 2018-11-14 14:28:06 +01:00
Mathieu Maret
56a16b9ea5 Add empty pagefault handler 2018-11-13 18:02:47 +01:00
Mathieu Maret
32f1a8ba9d Fix Paging Mapping
New PT entry should be set unsing the Vaddr, not the Paddr
2018-11-13 14:49:32 +01:00
Mathieu Maret
8f5c68efaf Fix flag usage 2018-11-13 10:37:28 +01:00
Mathieu Maret
a120647ecb TOFIX: implement testing for paging 2018-11-12 23:07:59 +01:00
Mathieu Maret
4a5f5674ce implement paging map and unmap 2018-11-12 23:02:27 +01:00
Mathieu Maret
63ce78205a Add errno.h 2018-11-12 23:02:27 +01:00
Mathieu Maret
fd153e305d fix self test 2018-11-12 18:06:46 +01:00
Mathieu Maret
18be89ebfe Basic MMU usage 2018-11-11 23:04:23 +01:00
Mathieu Maret
92f48d1851 more helping macro from linux 2018-11-09 22:36:45 +01:00
Mathieu Maret
4043eb50f7 mem: align upper bound on PAGE_SIZE
stole some macro from linux kernel
2018-11-09 22:32:21 +01:00
Mathieu Maret
93c8c87285 Add types.h to distinguish physical/virt mem 2018-11-09 21:50:08 +01:00
Mathieu Maret
149b197a65 mem: implement ref to physical page 2018-11-09 17:07:39 +01:00
Mathieu Maret
a7b6139f06 fix page alloc
And add some test for it
2018-11-09 16:30:42 +01:00