Commit Graph

300 Commits

Author SHA1 Message Date
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
f8d2ccc0d0
Add more debugging macros 2023-02-06 16:10:32 +01:00
707c92e08a
Boot loader no longer needs to do anything related to the stack 2023-02-05 10:03:21 +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
f37722b6e6
Distinguish ProcessorBlock and ProcessorControlBlock 2023-02-03 19:28:03 +01:00
269214ed34
Another improvements to GDT 2023-02-03 18:00:37 +01:00
19f34d4b17
Cleanup the code 2023-02-02 19:42:57 +01:00
715f875c4f
Set alignment and packing properly 2023-02-02 17:01:18 +01:00
2e2b01742a
Definitions for setting structures alignment and packing 2023-02-02 15:47:21 +01:00
73fc7607cd
There is no need to specify alignment of the structure in the forward reference 2023-02-02 15:37:57 +01:00
dc1a94b982
This is 'Processor Block' 2023-02-01 22:02:07 +01:00
21fbe6febe
Add IDT related definitions 2023-02-01 20:14:10 +01:00
5bbda188c6
IDT access levels and gate types 2023-02-01 00:51:13 +01:00
9a1e9b1084
Define TSS offsets 2023-01-30 23:43:10 +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
ebe6792f2b
Add MSR (Model Specific Registers) values 2023-01-30 17:59:00 +01:00
ce4e590347
Add missing forward declaration of ArInitializeProcessor() routine 2023-01-29 00:57:06 +01:00
900e71459a
Add missing x86 descriptor sizes 2023-01-29 00:54:36 +01:00
7bf4a9ab8d
Initialize boot CPU structures inside kernel on AMD64 2023-01-29 00:45:17 +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
e94e50b5d9
Implement HlLoadInterruptDescriptorTable() intrinsics for loading IDT 2023-01-26 20:08:57 +01:00
3ad3149f80
Add descriptor structure definition 2023-01-25 17:42:35 +01:00
bfc9db8b6d
Unify KGDTENTRY and KIDTENTRY between architectures as much as possible 2023-01-25 17:35:03 +01:00
3ee759cc27
i686 Interrupt request levels definitions 2023-01-25 17:18:27 +01:00
7bd67d6210
Add GDT and Segments related definitions for i686 2023-01-25 17:13:24 +01:00
a366de618f
AMD64 Interrupt request levels definitions 2023-01-25 17:08:42 +01:00
8f348c3954
Add GDT and Segments related definitions for AMD64 2023-01-25 17:05:15 +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
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
145fc17271
Pass framebuffer pitch information to the kernel 2023-01-18 20:15:41 +01:00
1a93c198ed
Add missing forward reference to _LOADER_GRAPHICS_INFORMATION_BLOCK structure 2023-01-16 19:51:19 +01:00
605597262c
Initial version of EFI framebuffer module, currently support only GOP 2023-01-16 18:41:25 +01:00
e3f0782053
Add enumeration of efi supported graphics protocols 2023-01-16 00:10:44 +01:00
5d74fb2bb5
Add UGA related structures 2023-01-16 00:03:35 +01:00
fb60625abc
Add more intrinsic routines 2023-01-13 22:32:45 +01:00
21abe0553a
Code formatting 2023-01-11 15:39:36 +01:00
beed5e0b51
More architecture specific definitions 2023-01-11 15:29:43 +01:00
025e05013d
Partially revert last changes 2023-01-10 22:51:38 +01:00
bac7af8a33
Cleanup data types 2023-01-09 23:07:21 +01:00
6255165f10
Add missing EFI enumeration lists forward references 2023-01-08 09:31:40 +01:00
fd6e273d8a
Add missing forward references 2023-01-07 23:44:00 +01:00
ca1d7ddfe8
Basic context, frames and exceptions definitions 2023-01-07 23:36:50 +01:00
f74ba62f24
Add GDT, IDT and TSS related structures 2023-01-07 13:33:16 +01:00
b22a76e3c4
Add XT native kernel subsystem to the PE/COFF image support 2023-01-06 16:16:26 +01:00
674e69da0e
Cleanup useless externals 2023-01-05 23:38:58 +01:00
712de4e4e4
XTDK contains headers uniquely identified 2023-01-05 23:28:43 +01:00
3250ad67aa
Rename header file 2023-01-05 23:09:54 +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
b7e5f1b5c1
Use CR constants instead of hardcoded values 2023-01-04 16:33:28 +01:00
a5b3350559
Add _M128 structure definition 2023-01-04 16:16:17 +01:00
b22303003c
Add architecture name 2023-01-03 16:28:14 +01:00
d8f2135ac6
Add more PCI(E) related definitions 2023-01-02 23:59:32 +01:00
c5a7d0fe05
Improvements in COM port support 2023-01-02 16:14:00 +01:00
e8e7d7b905
Add missing forward declaration 2023-01-02 16:11:50 +01:00
4c031f4075
Add I/O related type definitions 2023-01-02 16:10:43 +01:00
94e9fa1293
Allow to provide custom COM port address 2022-12-29 23:44:52 +01:00
e6a7918bac
Fix release build 2022-12-28 23:28:49 +01:00
dec021b1ec
Reorganize early debug printing; initialize kernel stacks when needed 2022-12-28 23:11:35 +01:00
9dc0e60f28
We support EFI-enabled systems only and such machines should support PAE, so there is no need for XTLDR to support non-PAE x86 hardware 2022-12-28 15:57:03 +01:00
fcfa575bff
Implement HlReadTimeStampCounter() routine 2022-12-27 23:28:27 +01:00
f46615f92c
Implement HlInvalidateTlbEntry(), HlReadModelSpecificRegister() and HlWriteModelSpecificRegister() routines 2022-12-27 23:19:33 +01:00
602d89ef27
Fixes in HlIoPortInShort() and HlIoPortInLong() routines 2022-12-27 22:43:19 +01:00
9828b23400
Implement HlIoPortInShort(), HlIoPortInLong(), HlIoPortOutShort() and HlIoPortOutLong() routines 2022-12-27 22:26:45 +01:00
bffb93b58c
Add missing calling convention 2022-12-27 22:05:46 +01:00
5b75d005a7
Implement HlClearInterruptFlag() and HlSetInterruptFlag() intrinsic routines 2022-12-27 18:54:01 +01:00
8f3a4aef60
Code formatting 2022-12-23 22:27:08 +01:00
93ad0b4ea0
Set valid calling convention for HAL routines 2022-12-23 14:41:11 +01:00
3ab1695968
Common routines for reading from and writing to CPU control registers 2022-12-23 14:30:52 +01:00
3e8bdfe9fe
Add missing forward routines definitions 2022-12-23 00:09:33 +01:00
e9d30a0fd9
Add missing forward structures definitions 2022-12-22 22:58:52 +01:00
6c4496f839
KERNEL_STACK_SIZE should be expressed in bytes as the name suggests, calculate number of pages where needed 2022-12-21 22:24:16 +01:00
652e3293b1
Get rid of EfiImageHandle and EfiSystemTable in UEFI_FIRMWARE_INFORMATION 2022-12-20 23:08:28 +01:00
7c38efc802
Update boot sequence and check PE/COFF image machine type compatibility 2022-12-20 19:11:15 +01:00
acda7aa37c
Add EFI_MEMORY_MAP structure definition 2022-12-20 15:52:15 +01:00
eb5998c58e
Add a way to check PE/COFF image machine type 2022-12-20 15:37:13 +01:00
03ebd3d273
Add missing EFI memory definitions 2022-12-13 15:49:44 +01:00
9f4db475bb
Implement HlHalt() intrinsic routine and add basic definitions for kernel services 2022-12-11 23:09:35 +01:00
0572b208f1
Add full paging support for AMD64 and i686 architectures, including PAE support 2022-12-11 20:14:04 +01:00
324a88cc01
Implement HlCpuId() routine and corresponding structures for issueing CPUID instruction 2022-12-11 17:40:56 +01:00
900e86c9da
Create new stack and then boot XTOS, export more routines with the loader protocol 2022-12-07 20:34:16 +01:00
93fa2aed67
Implement BlMapVirtualMemory() routine for recursive mapping 2022-12-06 23:32:31 +01:00
3876414a48
Implement BlAddVirtualMemoryMapping() and BlInitializeVirtualMemory() routines 2022-12-06 17:49:00 +01:00
6b2f34f287
Store physical address as well in the image context 2022-12-04 22:46:33 +01:00
b89121fded
Implement routines for accessing and manipulating CPU control registers 2022-12-02 23:03:42 +01:00
b275caf161
Implement RtlRemoveEntryList() routine 2022-11-28 23:00:20 +01:00
131275e788
Import loader structures definitions 2022-11-15 20:16:23 +01:00
df5eab737b
Add PE/COFF image characteristics 2022-11-15 20:14:28 +01:00
3125a25617
Add three most important linked lists into the kernel initialization block 2022-11-15 19:54:02 +01:00
e37e5b97af
Initial version of the kernel initialization block, needed to start the kernel 2022-11-12 23:17:44 +01:00
b03c9c2a25
Further PE/COFF module improvements 2022-11-12 12:37:49 +01:00
60c56c4462
Firmware dependent XT structures 2022-11-12 12:21:08 +01:00
c2b720fbd8
Add missing PE subsystem 2022-11-07 23:16:48 +01:00
f0868b91ec
Initial XTOS boot protocol support 2022-11-07 20:21:07 +01:00
c8f99ad6ed
Initial PE/COFF support for loading image files 2022-11-06 19:59:38 +01:00
bef6b5a589
Import ExectOS ASCII logo 2022-11-01 19:54:08 +01:00
72ec6819a6
Fixes and optimizations in PE/COFF structures 2022-11-01 19:11:12 +01:00
2d5986b514
Add universal (both 32bit and 64bit) PECOFF_IMAGE_NT_HEADERS 2022-10-31 10:08:09 +01:00
3412f97fe4
Missing FileInfo protocol GUID 2022-10-30 22:26:16 +01:00
b1c08e4a9f
Implement RtlStringLength() and RtlStringToWideString() routines 2022-10-25 23:45:12 +02:00
1296b44ae0
Add executable image (PE/COFF) structures and definitions 2022-10-19 16:30:21 +02:00
ade2d189ae
Add EFI configuration tables GUIDs 2022-10-17 15:39:25 +02:00
da37ceaa0f
Add missing global variable guid 2022-10-11 23:25:25 +02:00
b21f9c199f
Add missing EFI end device path subtypes 2022-10-02 14:05:37 +02:00
67acacf528
Use SIZE_T for length limiter 2022-09-26 23:02:38 +02:00
a0f359bcf7
Implement RtlWideStringConcatenate() routine 2022-09-26 17:26:00 +02:00
c7f53e193a
Implement RtlWideStringLength() routine 2022-09-26 16:53:58 +02:00
109c24f389
Initial support for xtldr modules and bootloader protocol 2022-09-17 00:14:09 +02:00
33ff15e1db
Add EFI XT protocols GUIDs 2022-09-06 17:55:07 +02:00
41f1aee6e3
Implemented RtlCompareMemory() for better compatibility with NT and made use of it in RtlSameMemory(), implemented RtlFillMemory(), RtlMoveMemory(), RtlSetMemory() and RtlZeroMemory() as well 2022-09-06 17:51:44 +02:00
d56b10f252
Various fixes to the existing routines:
* Export RtlWideStringTokenize()
 * Allow to compare whole strings in RtlWideStringCompare() when no length specified
 * RtlSameMemory() returns boolean now
 * Source bytes can be constant value in RtlCopyMemory()
2022-09-05 15:17:12 +02:00
a7d07e7ecb
Integrate xtklib with the kernel 2022-08-30 23:23:02 +02:00
6ef36cbd26
Add macros for defining signatures built from ASCII characters 2022-08-30 21:56:55 +02:00
f03b79ee2f
Implement BlGetVolumeDevicePath() and BlpDissectVolumeArcPath() 2022-08-22 20:09:50 +02:00
6d135ce209
Define system-wide GUID structure 2022-08-22 18:31:04 +02:00
8a23f6ba0e
Unify capsule naming convensions and add EFI_BLOCK_DEVICE_DATA structure 2022-08-19 23:42:04 +02:00
73f4538a62
Boolean cannot be used in EFI, because specification says it is of UINT8 (UCHAR), while XT specifies BOOLEAN as enumerated type 2022-08-16 11:38:24 +02:00
ea2de4d5a1
Add missing forward reference and missing fields to the EFI_BLOCK_DEVICE structure 2022-08-15 19:24:47 +02:00
72a235fb27
Add ramdisk device path id 2022-08-15 19:17:19 +02:00
780038901e
Add missing device path types and block device structure 2022-08-15 19:09:14 +02:00
e6aaa1a83c
Mark serial port as fully initialized and always check that before printing anything to the serial console 2022-08-10 17:56:41 +02:00
fa8fa99d6f
Add XT status codes used by xtklib 2022-08-09 16:49:14 +02:00
319e4eaade
Import XT kernel mode library 2022-08-09 16:44:30 +02:00
15502d8be5
Reorder forward references 2022-08-02 15:25:19 +02:00
9788f37cf8
Network and PXE related structures 2022-08-02 08:20:40 +02:00
4bead0ead0
Put all structures forward references into single place 2022-08-01 15:03:26 +02:00
f5b85a72e7
Network interface identifier protocol and missing definitions 2022-08-01 12:47:45 +02:00
4afc8e1cbf
EFI file system structures 2022-08-01 08:57:58 +02:00
66e0f0cba4
Support for universal asynchronous receiver-transmitter (UART) port 2022-07-31 23:55:16 +02:00
231938766c
GPT & MBR EFI support 2022-07-31 23:29:53 +02:00
9ba3c6a348
More EFI protocols and fix formatting 2022-07-31 23:16:36 +02:00
5615440df5
Add EFI console extension protocol 2022-07-31 18:54:00 +02:00
4d49c37447
Add EFI Capsule Block Descriptor structure 2022-07-31 18:38:19 +02:00
c6da867996
Some fixes to EFI routines forward references 2022-07-31 14:48:30 +02:00
e686206b84
EFI PCI I/O protocol related structures 2022-07-31 13:39:50 +02:00
a8d1fab287
Add missing forward references and correct formatting 2022-07-31 12:57:18 +02:00
dbded1e5e4
Add EFI device path structures 2022-07-31 12:05:40 +02:00
d1fff10c15
Add basic EFI-related structures 2022-07-31 10:54:03 +02:00
35f2c67138
Basic XT structures 2022-07-29 16:31:59 +02:00
0fb2c6875a
Do not use DWORD in kernel mode 2022-07-29 16:23:08 +02:00
c2eea0e6b5
Add EFI-related status codes and definitions 2022-07-29 08:49:52 +02:00
075c4650cf
Add union definition 2022-07-29 08:16:44 +02:00
3da8106c02
Import basic part of XTDK 2022-07-28 17:02:15 +02:00