Commit Graph

425 Commits

Author SHA1 Message Date
4fe325f3e1 Update the copyright notice 2019-04-28 05:55:53 +02:00
01d20287e7 Also include <sys/mman.h> 2019-04-28 05:55:42 +02:00
f19786c2e9 Update the copyright notice 2019-04-28 05:54:37 +02:00
907d6a8abc Implement brk() 2019-04-28 05:54:26 +02:00
7bf67b74ff Initialize the heap with the Multiboot information 2019-04-28 05:51:52 +02:00
d19b7b0bd9 Update the copyright notice 2019-04-28 03:42:31 +02:00
55b6d38a41 Return errors for munmap(NULL) 2019-04-28 03:42:15 +02:00
c23fc60a39 Also check for errors from mprotect() 2019-04-28 03:39:54 +02:00
728c969398 Code cleanup 2019-04-28 03:38:09 +02:00
31b7c2b709 Be specific about ELF in error messages 2019-04-28 03:08:28 +02:00
8bf1fd510f Allocate memory for ELF sections as needed 2019-04-28 03:08:28 +02:00
2ff52015c4 Code cleanup 2019-04-28 02:21:26 +02:00
8eae43ef73 Check the version of ELF modules 2019-04-28 02:17:52 +02:00
07db57ce71 Add support for offsets when checking signatures 2019-04-28 02:17:31 +02:00
9835d047aa Substract the virtual address for relocations 2019-04-27 18:20:24 +02:00
3722889d66 Fix jumping into 32-bit kernels 2019-04-27 18:06:45 +02:00
b7418ac857 Move the static variables to the bottom 2019-04-27 18:05:51 +02:00
f528f1d438 Register some dependencies 2019-04-27 17:59:01 +02:00
8154b38075 Code cleanup 2019-04-27 17:58:44 +02:00
5bafe58b5e Place multiboot_boot_kernel{32,64}() in the text section 2019-04-27 06:05:50 +02:00
c9665c692b Unify the error codes in the loader and kernel 2019-04-27 04:20:48 +02:00
976077afa0 Unify the debugging messages in the loader and kernel 2019-04-27 04:20:48 +02:00
508a3ed502 Update the copyright notice 2019-04-27 04:08:28 +02:00
7dc450371e Unify messages in the default loader and kernel 2019-04-27 04:07:43 +02:00
b5cc973c26 Parse the command-line arguments in uLoader too 2019-04-27 04:05:24 +02:00
4e6cef3810 Update the copyright notice 2019-04-27 04:04:37 +02:00
98bf8172fd Constify 2019-04-27 04:04:29 +02:00
81e34bc223 Do not crash on puts(NULL) 2019-04-24 00:47:24 +02:00
9262e27ba9 Import a debugging macro in the loader as well 2019-04-24 00:46:47 +02:00
9c5dbba449 Let _exit() obtain the error code from main() 2019-04-24 00:46:06 +02:00
adb81dc00d Use the base and stack registers in the loader too 2019-04-24 00:45:30 +02:00
5c97f4f2e5 Update the copyright notice 2019-04-24 00:42:38 +02:00
9f0d413acd Add a comment 2019-04-24 00:42:29 +02:00
20b295dc2a Update the copyright notice 2019-04-16 00:20:34 +02:00
6535b3b3d7 Set the loader name for DeforaOS uLoader 2019-04-16 00:20:13 +02:00
15c6b0ad15 Update the copyright notice 2019-04-16 00:06:39 +02:00
b1aa85495a Remove trailing whitespaces 2019-04-16 00:06:07 +02:00
234de67376 Test for argv to be terminated 2019-04-16 00:03:34 +02:00
d00b0840d5 Parse the command-line arguments 2019-04-16 00:03:03 +02:00
90a004791b Add a comment 2019-04-16 00:00:57 +02:00
3dc3f1d360 Update the copyright notice 2019-04-15 23:18:39 +02:00
a77ffcd71a Import a debugging routine for strings 2019-04-15 23:18:39 +02:00
683ba83191 Import a script to generate ISO images 2019-03-27 03:56:58 +01:00
461d26c140 Always return integers in mprotect() 2019-03-27 02:52:43 +01:00
c51c10b78f Enforce W^X in mprotect() as well 2019-03-27 02:42:49 +01:00
a86a774ce8 Add support for MAP_FIXED
This results in a no-op really though.
2019-03-27 02:40:15 +01:00
cff7b5e62f Ignore MAP_{PRIVATE,SHARED} in mmap()
Only one process is expected to exist at any one time.
2019-03-27 02:35:26 +01:00
623b71f0bf Update the copyright notice 2019-02-20 16:01:00 +01:00
f679f1a73d Let the output be more consistent 2019-02-20 16:00:40 +01:00
50e487adb8 Consider century leap years 2018-09-21 02:01:42 +03:00
1c4f927fdd Avoid multiplications while obtaining the time 2018-09-21 02:01:07 +03:00
1b44719632 Expose the kernel driver definitions 2018-09-18 01:58:43 +02:00
24ba28ce24 Update a comment 2018-09-17 02:17:50 +02:00
81da023bc9 Initialize the display before the console
This will be useful when the console driver will be adapted to displays.
2018-09-17 01:55:03 +02:00
300e4897f1 Register missing includes, files and directories
This fixes "make distcheck".
2018-09-17 01:06:11 +02:00
f42e325785 Generate C code in OBJDIR
This should allow merging in the project without breaking "make dist"
after "make distclean".

This currently requires GCC though (for "-include").
2018-09-17 00:59:20 +02:00
c101f525d0 Let each architecture initialize its own platform 2018-09-17 00:38:35 +02:00
c9e099f0c2 Generate platform code from configuration 2018-09-16 17:29:08 +02:00
4139059c02 Avoid a couple divisions in the kernel
This helps compiling the kernel on NetBSD/amd64.
2018-08-25 02:00:21 +02:00
f139e583a8 Fix "make dist" 2018-08-23 21:44:49 +02:00
1c83f25941 Add get{pid,ppid}() 2018-08-23 21:44:34 +02:00
d14a72fd1d Update some dependencies 2018-08-23 02:09:24 +02:00
2085957927 Also mention QEMU's debug console I/O port 2018-08-23 01:56:06 +02:00
26c8bb115c Link every executable binary with crt{i,n}.o 2018-08-22 02:30:22 +02:00
d5d96defdd Allow year 2000 to have 366 days as it did 2018-08-14 19:05:16 +02:00
34dec8f44a Optimize a loop away 2018-08-14 19:05:00 +02:00
7a372859b8 Avoid signedness issues in a comparison 2018-08-13 23:27:57 +02:00
d3fbcb0886 Rework the epoch calculation 2018-08-13 23:21:42 +02:00
b0f8c18858 Avoid a couple compilation warnings 2018-08-09 03:02:06 +02:00
2a7370468a Minor optimization 2018-08-09 02:48:21 +02:00
47f78af238 Minor optimization 2018-08-09 02:47:16 +02:00
d337ec5e10 Divide with constants when possible
This may also help optimize a division away.
2018-08-09 02:13:27 +02:00
46275340ad Use crt{begin,end}.o again
This is instead of crt{begin,end}S.o. It seems to work fine with the
regular toolchain from NetBSD, and should help when building with
cross-compilers.
2018-08-09 02:07:31 +02:00
4a94984f78 Reduce the diff with DeforaOS libc 2018-08-04 02:25:40 +02:00
1e03411484 Import fixes for memory allocation from DeforaOS libc 2018-08-04 01:58:43 +02:00
c24f2d44a1 Code cleanup 2018-08-04 01:58:39 +02:00
295b7b4afe Always print to a valid console 2018-08-03 03:03:44 +02:00
bbca21b808 Code cleanup 2018-08-03 03:03:35 +02:00
4f8536876a Always use clock drivers with a valid instance 2018-08-03 02:17:38 +02:00
7af49989ec Do not compile _multiboot_start when not used 2018-08-03 01:53:06 +02:00
c7944c91da Code cleanup 2018-08-03 01:51:07 +02:00
018cdae162 Import realloc() in libuKernel 2018-08-02 23:38:41 +02:00
b5f0cf9f88 Avoid a few compilation warnings 2018-08-02 23:16:23 +02:00
447dcd6494 Code cleanup 2018-07-27 03:20:58 +02:00
2927b26d74 Separate the bus code from the VGA display driver 2018-07-27 03:15:40 +02:00
0b8a38ca45 Fix building the UART console driver 2018-07-21 05:30:43 +02:00
b6f3407b7d Import missing file 2018-07-21 05:23:53 +02:00
e16d7923ec Consider VGA and VESA as display drivers 2018-07-21 05:20:45 +02:00
c833a991c4 Remove unused header 2018-07-21 03:47:28 +02:00
a56ae53260 Define and use a few more constants 2018-07-21 03:50:59 +02:00
9f7b7dd810 Remove explicit casts 2018-07-21 03:50:59 +02:00
f23e59a8cb Add support for '\r' on VGA displays 2018-07-21 03:50:59 +02:00
c70d1748ba Add the usual base addresses for further serial ports 2018-07-19 02:04:51 +02:00
94d410d834 Unify the search path for includes 2018-07-17 14:37:55 +02:00
3b08127954 Expose CMOS bus commands to potential users 2018-07-17 13:38:47 +02:00
fcbbdfa986 Describe and use one more constant 2018-07-17 13:33:41 +02:00
0ca35efa15 Describe and use more constants 2018-07-17 02:16:59 +02:00
96398850bc Code cleanup 2018-07-17 02:12:03 +02:00
4ffeb920c2 Substract 1970 to the date guessed for the Epoch 2018-07-17 02:08:16 +02:00
513623335e Convert the date obtained to decimal if necessary 2018-07-17 02:06:13 +02:00
8901252c74 Code cleanup 2018-07-17 02:02:07 +02:00
f0834c0d76 Keep errno when devices fail to attach 2018-07-16 02:00:01 +02:00
7a20a906ad Remove debugging information 2018-07-16 01:38:58 +02:00
00069745d9 Improve the messages when initializing drivers 2018-07-16 01:40:49 +02:00
c2c5d522cd Add commands to enable or disable NMI
NMI stands for Non Maskable Interrupts.
2018-07-16 01:40:49 +02:00
f41d41e6e3 Change the order of arguments when getting the time 2018-07-16 01:40:43 +02:00
b6e22cac7f Remove the CMOS weekday register
It is apparently notoriously unreliable, and should not be used.
2018-07-16 01:40:11 +02:00
90c7f9eb0e Add a delay when reading from the CMOS bus 2018-07-16 01:40:11 +02:00
e935772f91 Code cleanup 2018-07-16 01:40:11 +02:00
2e71212695 Code cleanup 2018-07-15 23:37:33 +02:00
582a537575 Enable interrupts again 2018-07-15 05:49:05 +02:00
b5e6e07701 Set the IDT more like the GDT
This makes its initialization easier.
2018-07-15 05:46:34 +02:00
655e39736c Code cleanup 2018-07-15 03:58:31 +02:00
f59ea7131e Do not enable interrupts yet
This requires an interrupt handler to be configured first.
2018-07-15 03:56:00 +02:00
9a4e58760f Initialize the PIC 2018-07-15 03:55:08 +02:00
1d5a7a558b Initialize the clock 2018-07-15 03:54:42 +02:00
9480761ca2 Import a driver for the 8259a PIC
This is specific to Intel x86 platforms.
Not tested yet.
2018-07-15 03:47:33 +02:00
702497e79b Also build the PIC framework helper 2018-07-15 03:44:15 +02:00
758a0673a4 Compare the results obtained for consistency 2018-07-15 03:43:02 +02:00
915ab5828d Check if the clock data is available 2018-07-15 03:40:47 +02:00
c6672662af Code cleanup 2018-07-15 03:38:36 +02:00
644d3ce68e Code cleanup 2018-07-15 03:36:53 +02:00
bc9aaf9fc8 Code cleanup 2018-07-15 03:36:28 +02:00
164fc9c5d5 Let bus drivers handle custom commands 2018-07-15 03:35:59 +02:00
67f9ed2698 Add iowait() to the I/O port operations 2018-07-15 03:34:25 +02:00
5f4514de4f Import a framework to program PICs 2018-07-15 01:21:54 +02:00
3f044e4d09 Register a missing dependency on src/arch/i386/intr.S 2018-07-15 01:09:04 +02:00
9465401609 Move the CMOS clock constants to a dedicated file 2018-07-15 01:07:38 +02:00
f96504400a Code cleanup 2018-07-15 01:07:12 +02:00
b2d68c57b5 Do not ship stdio.c twice 2018-07-15 00:52:35 +02:00
cf919577c7 Use the relocatable versions of crt{begin,end}.o 2018-07-06 01:35:38 +02:00
7ace62c040 Let configure handle $(OBJDIR) for crt{begin,end}.o
This should be the appropriate way now that configure uses $(OBJDIR) by
default for non-phony commands.
2018-07-06 01:33:52 +02:00
2052b79c37 Avoid a compilation warning 2018-06-25 02:18:55 +02:00
d890ba8541 Correct some dependencies 2018-06-25 02:24:05 +02:00
e5bc6ea415 Import a crude CMOS clock driver
This still does not work though.
2018-06-25 02:23:40 +02:00
2e9b282606 Import missing file 2018-06-25 01:04:52 +02:00
08c1c42390 Code cleanup 2018-06-25 01:03:00 +02:00
edc3e1a83c Add a destructor to console drivers 2018-06-25 01:02:49 +02:00
a9ec1310f4 Constify 2018-06-25 01:02:11 +02:00
aff1004829 Code cleanup 2018-06-25 01:00:57 +02:00
af1af88c21 Code cleanup 2018-06-24 16:21:36 +02:00
a0b876e70b Code cleanup 2018-06-24 13:39:03 +02:00
d1cd8f96cc Send kernel messages to the error stream 2018-06-24 03:28:00 +02:00
e8cb79a6a5 Let the boot messages be slightly clearer 2018-06-24 03:26:44 +02:00
ce05b955bb Add support for mmap() in the loader
This is required when relocating the kernel.
2018-06-24 03:20:10 +02:00
09bdd96f2d Initialize the CMOS bus driver in the kernel
Unfortunately this code currently has to be added in the loader, without
it being strictly necessary.
2018-06-24 03:20:10 +02:00
d541a1984c Register the CMOS bus driver 2018-06-24 03:20:10 +02:00
31df610b47 Import an initial driver for the CMOS 2018-06-24 03:20:10 +02:00
175f908c86 Import an initial framework to manage interrupts 2018-06-24 03:20:10 +02:00
fca52ca94f Check the program header for consistency 2018-06-24 03:20:10 +02:00