Commit Graph

285 Commits

Author SHA1 Message Date
d8403d01f5
Verify kernel and boot loader compatibility 2023-11-22 17:22:57 +01:00
1eecad21db
Implement HlReadApicRegister() and HlWriteApicRegister() routines for basic APIC support 2023-11-20 15:26:03 +01:00
0c3268acd1
Export registers read/write related routines 2023-11-19 00:46:51 +01:00
12f946c92d
Fixes to I/O registers related routines 2023-11-19 00:39:52 +01:00
71d0608643
Implement ArGetStackPointer() routine 2023-11-19 00:09:16 +01:00
1a932468a2
Add some DPC related stubs 2023-11-16 14:53:54 +01:00
ec4a0fcb70
Add missing KepRetireDpcList() routine forward reference 2023-11-15 23:19:20 +01:00
5b6f3b0244
Mark user mode threads as not yet supported 2023-11-15 20:41:28 +01:00
35aa26e0e9
Add missing documentation comment block 2023-11-15 15:50:33 +01:00
5d27473bb0
Fix i686 build 2023-11-15 15:34:04 +01:00
d35dd4fce3
Save processor state during kernel initialization 2023-11-15 15:00:38 +01:00
ccd0514416
Implement more CPU-related routines 2023-11-15 14:52:18 +01:00
fc85e0674b
Let KeGetCurrentProcessorControlBlock() use CurrentPrcb field and correct comments 2023-11-13 15:36:50 +01:00
1d9a79736a
Allow to postpone thread startup 2023-11-11 16:30:53 +01:00
641b34b119
Fixes in i686 version of KepInitializeThreadContext() 2023-11-08 16:06:01 +01:00
362eefc2b3
Fixes in AMD64 version of KepInitializeThreadContext() to get rid of PageFault exception 2023-11-07 15:34:49 +01:00
91ce0f9947
Compensate missing return address, which is a 4-byte on i686 and an 8-byte on amd64 2023-11-05 20:07:13 +01:00
ba833422b0
Implement ExCompleteRundownProtection() and ExReInitializeRundownProtection() routines and add stub for ExWaitForRundownProtectionRelease() 2023-11-05 09:50:04 +01:00
02f35dbd8c
Try to allocate new stack for a thread if needed 2023-11-03 16:04:10 +01:00
a6c3924b56
Initialize Idle thread for i686 architecture 2023-11-03 15:29:01 +01:00
63f8dbc59b
Initialize CPU power structures, idle process and idle thread 2023-11-02 23:07:11 +01:00
2621cb6d8a
Turn atomic routines architecture independent 2023-10-29 21:43:05 +01:00
783a4a2aa0
Finish PoInitializeProcessorControlBlock() routine implementation 2023-10-29 20:14:10 +01:00
aa17be6eb3
Implement KeSetTargetProcessorDpc() routine 2023-10-29 19:59:21 +01:00
be7981f614
Implement KeInitializeThreadedDpc() and export it together with KeInitializeDpc() 2023-10-29 19:45:45 +01:00
a359c9b2e8
Keep only atomic routines 2023-10-29 18:22:11 +01:00
3f2baa5b50
Rename RtlInterlockedDecrementLongPtr() to follow routines naming convention 2023-10-29 12:21:19 +01:00
cf7c467637
Implement RtlInterlockedExchangePointer() routine 2023-10-29 11:48:31 +01:00
6d63750fc2
Rename KepArchInitialize() routine to KepInitializeMachine() 2023-10-29 10:38:23 +01:00
f05a262da2
Cleanup XTDK and XTOSKRNL headers 2023-10-29 09:58:47 +01:00
841a6b304b
Cleanup KE subsystem headers 2023-10-29 09:14:46 +01:00
798e4c1d22
Cleanup MM subsystem headers 2023-10-29 00:52:05 +02:00
600c86949b
Cleanup RTL subsystem headers 2023-10-29 00:14:01 +02:00
4ea54859f2
Add missing HL routine definitions 2023-10-28 23:36:21 +02:00
ad15c55a39
Cleanup AR subsystem headers 2023-10-28 23:35:34 +02:00
598b34acf7
AR subsystem is architecture dependant, thus there should be no generic routines 2023-10-28 23:08:08 +02:00
d55946c3cf
Cleanup HL subsystem headers 2023-10-28 22:56:04 +02:00
3f520c8e0f
Rename xtoskrnl headers 2023-10-28 22:35:33 +02:00
a2e3e3d9a9
Compile rundown routines 2023-10-28 01:37:27 +02:00
7f8618d2c0
Export ExAcquireRundownProtection(), ExInitializeRundownProtection() and ExReleaseRundownProtection() kernel routines 2023-10-28 00:02:18 +02:00
6f5e7f63f3
Include xtver.h to access version related definitions 2023-10-27 15:43:37 +02:00
4e553b5570
Remove unused variables to satisfy compiler 2023-10-27 15:37:31 +02:00
f549ca54a1
Implement I/O registers related routines 2023-04-05 00:04:11 +02:00
358b20f1a1
Reorder routines 2023-04-04 22:35:06 +02:00
4073b1589d
Rename endian conversion routines to match naming convention 2023-04-04 21:02:14 +02:00
d5dd87b889
Add initial kernel panic mechanism 2023-03-23 22:34:28 +01:00
2827bb400f
Implement ExAcquireRundownProtection() and ExReleaseRundownProtection() routines 2023-03-18 11:11:06 +01:00
1f8026db2f
Implement RtlInterlockedCompareExchangePointer() and RtlInterlockedDecrementLongPtr() atomic routines 2023-03-17 18:06:53 +01:00
934dba37a1
Initial kernel events support 2023-03-17 16:46:18 +01:00
e0778d0a12
Introduce kernel executive 2023-03-16 23:40:38 +01:00
e6b64b741a
Initialize thread context for i686 2023-03-15 23:05:18 +01:00
e05366815a
NpxFrame is filled with zeroes, so there is no need to set all these stuff 2023-03-15 22:48:26 +01:00
5677719038
Initialize thread context for AMD64 2023-03-14 17:37:20 +01:00
8f653c47dc
Initial Deferred Procedure Call (DPC) support 2023-03-05 22:56:16 +01:00
c5a9253ea8
Implement ArLoadLocalDescriptorTable() routine 2023-03-02 23:04:36 +01:00
dfae0b4727
Implement ArSetGdtEntryBase() routine 2023-03-02 22:51:57 +01:00
9f311db9fc
Describe PO subsystem 2023-03-02 19:27:52 +01:00
e81fb68357
Initial support processor idle functionality 2023-03-02 16:25:41 +01:00
d57cdba56c
Remove undefined extra token from the end of #include directive 2023-02-27 20:18:50 +01:00
e41de62dab
Implement ArYieldProcessor() routine 2023-02-27 17:28:20 +01:00
286fc76577
First attempt on SEH usage; currently this does not take an effect due to missing exception dispatcher 2023-02-26 22:08:02 +01:00
2f1c5a22a5
Add __C_specific_handler() and _except_handler3() stubs allowing to use '__try {} __except() {}' (SEH) constructions 2023-02-25 23:01:13 +01:00
57dee5c535
Reorder parameters in KeInitializeThread() 2023-02-24 22:29:38 +01:00
9c74aafe3d
Initial implementation of process initialization 2023-02-24 19:52:20 +01:00
c4d1f1cd0d
Initial implementation of the thread initialization 2023-02-23 20:11:21 +01:00
cbca1e21c6
Add missing forward reference to KeInitializeThread() 2023-02-21 22:49:13 +01:00
88c17982e4
Thread initialization stub 2023-02-21 22:30:56 +01:00
757ab280f7
Declare variable at the beginning of routine 2023-02-21 19:22:53 +01:00
d427ca20fb
Always include xtos.h in kernel sources 2023-02-20 00:21:52 +01:00
9a27d52efe
Correct typo 2023-02-18 00:07:12 +01:00
3354075900
Initial Asynchronous Procedure Call (APC) support 2023-02-18 00:04:51 +01:00
08405e7bdc
Ad more routines for semaphores support 2023-02-17 09:40:18 +01:00
03bae53fb9
Export semaphore, spinlock and timer initialization routines 2023-02-16 22:33:54 +01:00
ccaa28399a
Initial semaphores support 2023-02-16 19:29:36 +01:00
525cc116ee
Update description 2023-02-16 19:27:01 +01:00
98884516a1
Implement KeInitializeSpinLock() routine 2023-02-16 18:34:46 +01:00
b2456fd18a
Implement kernel timer initialization routines 2023-02-16 17:56:35 +01:00
92a461d1e0
Add notes for MM 2023-02-15 23:44:10 +01:00
9ea1be96db
Implement MmZeroPages() routine 2023-02-15 20:48:48 +01:00
b1c2b209e3
Implement RtlGetStackLimits() routine 2023-02-15 20:12:58 +01:00
28b760b089
Add stubs for allocating and freeing kernel stacks 2023-02-14 22:35:16 +01:00
d8bc45e3bb
Move HL related global variables into separate file 2023-02-13 23:41:24 +01:00
050f24f877
Implement routines for atomically work with linked lists 2023-02-13 22:36:03 +01:00
9e5fb84412
More routines for performing atomic bitwise AND/OR/XOR operations 2023-02-12 23:11:23 +01:00
5a86d61b78
Implement routines for performing atomic operations 2023-02-12 22:46:58 +01:00
b43afac326
Cleanup definitions in kernel headers 2023-02-11 22:26:13 +01:00
e4fa9bdead
CurrentPrcb is needed here 2023-02-10 17:29:18 +01:00
d72002187d
Partially implement ArpIdentifyProcessor() 2023-02-10 17:23:47 +01:00
e645cf664c
Set process and thread information in processor control block 2023-02-09 17:30:24 +01:00
47f399e987
Set current process and thread in processor control block 2023-02-09 00:02:45 +01:00
c4a52938d2
Implement KeGetCurrentThread() routine 2023-02-08 23:58:24 +01:00
9132c47cd9
Initial process and thread related structures 2023-02-08 23:40:58 +01:00
929d3dfae7
Implement KeGetCurrentProcessorBlock() and KeGetCurrentProcessorControlBlock() routines for both amd64 and i686 2023-02-08 16:39:05 +01:00
d8c68ed003
Add endian conversion routines 2023-02-08 16:33:57 +01:00
a32e18b237
Implement ArReadFSDualWord() routine 2023-02-07 23:19:22 +01:00
75c519a70c
Use more generic name for this macro use pointer used behind it will point to kernel debugger after it gets initialized 2023-02-07 19:37:44 +01:00
67768ae7a3
Mark ArpIdentifyProcessor() as unimplemented 2023-02-06 16:15:24 +01:00
9c7d961c5a
Architecture specific initialization after processor init is done 2023-02-06 15:53:11 +01:00
385f0e6de0
Not all AMD64 CPUs support large pages and global pages, unfortunately 2023-02-05 22:14:47 +01:00
76f22fbdc4
Initialize segments and processor registers for i686 architecture 2023-02-05 15:45:22 +01:00
911903d0eb
Add missing routine description 2023-02-05 10:08:49 +01:00
d6aac59199
Let kernel initialize stack on it's own without relying on boot loader 2023-02-05 09:55:59 +01:00
0b743a5f26
Add stub routine for identifying processor 2023-02-05 00:42:30 +01:00
c6cadbd655
Initialize MXCSR register 2023-02-05 00:30:12 +01:00
5eaf7d63a3
Initialize Page Attribute Table 2023-02-05 00:14:34 +01:00
55cdae7c83
Initialize AMD64 processor registers 2023-02-04 23:40:03 +01:00
f181215341
Initialize segment registers 2023-02-04 00:17:07 +01:00
f37722b6e6
Distinguish ProcessorBlock and ProcessorControlBlock 2023-02-03 19:28:03 +01:00
b90f37dad4
Fill in Interrupt Descriptor Table (IDT) 2023-02-03 18:40:10 +01:00
648ad1636a
Cleanup TSS initialization code 2023-02-03 18:27:50 +01:00
269214ed34
Another improvements to GDT 2023-02-03 18:00:37 +01:00
a49d0804ce
Add trap handlers for both i686 and amd64 2023-02-02 23:31:32 +01:00
404f2f85c6
Cleanup the Interrupt Stack Table 2023-02-01 23:47:57 +01:00
7fc1f04cd0
TSS entry is already put into GDT table, just initialize it 2023-02-01 23:37:12 +01:00
cbd21ced39
Use a size of the structure, not a pointer 2023-02-01 22:38:36 +01:00
dc1a94b982
This is 'Processor Block' 2023-02-01 22:02:07 +01:00
3522539d4b
Initialize Interrupt Descriptor Table (IDT) 2023-02-01 21:56:17 +01:00
1ef205d47b
Initialize DoubleFault and NonMaskableInterrupt TSS entries 2023-02-01 20:36:40 +01:00
e2813bcdaa
Fix entries in Global Descriptor Table (GDT) 2023-02-01 20:24:55 +01:00
892c9eca86
Do not hardcode I/O map base 2023-01-30 22:38:41 +01:00
a761d3125a
Architecture specific initialization prior to processor structures initialization 2023-01-30 20:34:05 +01:00
6f068513cd
Initial processor block initialization 2023-01-30 19:07:05 +01:00
bca7ac41b8
Initialize boot CPU structures inside kernel on i686 architecture 2023-01-29 10:54:52 +01:00
7ac434cb99
Move architecture specific globals to external header, as ex. there is no GDT on ARM 2023-01-29 09:48:59 +01:00
ae60753e33
Add missing source files for i686 architecture 2023-01-29 00:52:05 +01:00
7bf4a9ab8d
Initialize boot CPU structures inside kernel on AMD64 2023-01-29 00:45:17 +01:00
8733a23b20
Include kernel top header 2023-01-29 00:34:34 +01:00
757560ffeb
Do not use EFI RunTime Services in kernel as they are not mapped correctly 2023-01-29 00:32:52 +01:00
9cd9a1eafa
Correct typos 2023-01-29 00:25:25 +01:00
27e2fdf4f2
Introduce architecture library as new kernel subsystem and move selected routines into new subsystem 2023-01-28 10:34:55 +01:00
d5f9b20b51
Import kernel readme 2023-01-27 22:59:53 +01:00
e94e50b5d9
Implement HlLoadInterruptDescriptorTable() intrinsics for loading IDT 2023-01-26 20:08:57 +01:00
b57e79aa7f
Proceed with architecture specific initialization 2023-01-25 19:37:13 +01:00
8da38af489
Rename KepInitializeBootStructures() to KepInitializeStack() 2023-01-25 19:28:12 +01:00
3c3e93afc7
Save kernel initialization block earlier 2023-01-25 18:45:08 +01:00
707dc37868
Fix type of Source parameter in HlLoadSegment() routine 2023-01-24 23:08:48 +01:00
35aa514f95
Implement HlLoadSegment() intrinsics routine 2023-01-24 19:27:18 +01:00
d3d8d144a0
Implement HlLoadGlobalDescriptorTable() intrinsic 2023-01-23 20:13:51 +01:00
adc6677c9d
Code formatting 2023-01-23 20:04:32 +01:00
c81b858757
Implement HlReadGSQuadWord() intrinsic 2023-01-23 19:59:54 +01:00
f20ab3e52e
Implement HlLoadTaskRegister() for loading TSS segment selector into task register 2023-01-23 15:26:35 +01:00
9cbe2d458c
Initial support for EFI framebuffer 2023-01-23 15:26:35 +01:00
fb60625abc
Add more intrinsic routines 2023-01-13 22:32:45 +01:00
12b8c5f539
Switch kernel stack and move boot structures initialization into separate routine 2023-01-08 10:35:49 +01:00
3caca6e1bf
Set kernel subsystem to XT_NATIVE_KERNEL 2023-01-06 19:25:21 +01:00
f2b51ff69c
Code formatting 2023-01-05 22:45:52 +01:00
3131aac7a9
Move serial ports I/O address to architecture specific header 2023-01-05 15:58:36 +01:00
5730e8692e
Reorganisation of KeStartXtSystem() routine and early debug printing 2023-01-04 23:08:59 +01:00
c5a7d0fe05
Improvements in COM port support 2023-01-02 16:14:00 +01:00
94e9fa1293
Allow to provide custom COM port address 2022-12-29 23:44:52 +01:00