Commit Graph
100 Commits
Author SHA1 Message Date
belliash fcfa575bff Implement HlReadTimeStampCounter() routine 2022-12-27 23:28:27 +01:00
belliash f46615f92c Implement HlInvalidateTlbEntry(), HlReadModelSpecificRegister() and HlWriteModelSpecificRegister() routines 2022-12-27 23:19:33 +01:00
belliash 938cd175c8 Export HlIoPortInShort(), HlIoPortInLong(), HlIoPortOutShort() and HlIoPortOutLong() routines 2022-12-27 22:48:10 +01:00
belliash 602d89ef27 Fixes in HlIoPortInShort() and HlIoPortInLong() routines 2022-12-27 22:43:19 +01:00
belliash 9828b23400 Implement HlIoPortInShort(), HlIoPortInLong(), HlIoPortOutShort() and HlIoPortOutLong() routines 2022-12-27 22:26:45 +01:00
belliash 5c5f0a6df9 Add missing routine documentation 2022-12-27 22:13:48 +01:00
belliash bffb93b58c Add missing calling convention 2022-12-27 22:05:46 +01:00
belliash 6d77ff42c5 Loop over halt; add missing calling convention 2022-12-27 20:12:59 +01:00
belliash 5b75d005a7 Implement HlClearInterruptFlag() and HlSetInterruptFlag() intrinsic routines 2022-12-27 18:54:01 +01:00
belliash 8f3a4aef60 Code formatting 2022-12-23 22:27:08 +01:00
belliash db1b47e50e Initialize CpuRegisters variable to silence a warning 2022-12-23 14:43:36 +01:00
belliash 93ad0b4ea0 Set valid calling convention for HAL routines 2022-12-23 14:41:11 +01:00
belliash 3ab1695968 Common routines for reading from and writing to CPU control registers 2022-12-23 14:30:52 +01:00
belliash 3e8bdfe9fe Add missing forward routines definitions 2022-12-23 00:09:33 +01:00
belliash df8de3f85f Add missing routines documentation 2022-12-22 23:41:19 +01:00
belliash 7496c7203d Add missing routines documentation 2022-12-22 23:29:16 +01:00
belliash 4d68b93ed3 Small code formatting and refactoring 2022-12-22 23:19:23 +01:00
belliash e9d30a0fd9 Add missing forward structures definitions 2022-12-22 22:58:52 +01:00
belliash 8b02fb6c3f Mostly update comments in PE/COFF module 2022-12-21 23:02:37 +01:00
belliash d158525659 Add missing documentation for BlCreateStack() routine 2022-12-21 22:34:59 +01:00
belliash 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
belliash dc2570ca8e Serial port should be working all the time, so announce that now booting the kernel 2022-12-21 20:52:53 +01:00
belliash cf828a6896 Fill in kernel initialization block 2022-12-21 20:04:20 +01:00
belliash 652e3293b1 Get rid of EfiImageHandle and EfiSystemTable in UEFI_FIRMWARE_INFORMATION 2022-12-20 23:08:28 +01:00
belliash 51886a05dd Get rid of boot services code after exiting boot services 2022-12-20 23:06:32 +01:00
belliash 7c38efc802 Update boot sequence and check PE/COFF image machine type compatibility 2022-12-20 19:11:15 +01:00
belliash edee9a8ec6 Rework BlGetMemoryMap() routine to use EFI_MEMORY_MAP structure; map EfiBootServicesData instead of EfiReservedMemoryType 2022-12-20 18:59:36 +01:00
belliash acda7aa37c Add EFI_MEMORY_MAP structure definition 2022-12-20 15:52:15 +01:00
belliash eb5998c58e Add a way to check PE/COFF image machine type 2022-12-20 15:37:13 +01:00
belliash 7bcdd8562d Several changes to EFI memory mapping
* Move EFI memory type conversion to separate routine
 * Never map VRAM
 * Map only pages not exceeding the lowest physical page
2022-12-19 22:50:03 +01:00
belliash 6871291c9a Basic steps in XTOS boot protocol 2022-12-14 22:17:17 +01:00
belliash 8b9c6780d5 Code formatting 2022-12-13 22:37:47 +01:00
belliash b2b6cd7e0f Add targets for testing ExectOS inside QEMU VM 2022-12-13 20:07:15 +01:00
belliash 03ebd3d273 Add missing EFI memory definitions 2022-12-13 15:49:44 +01:00
belliash 0b9f398761 Tell the linker that ExectOS can handle addresses larger than 2GB 2022-12-11 23:31:19 +01:00
belliash 9f4db475bb Implement HlHalt() intrinsic routine and add basic definitions for kernel services 2022-12-11 23:09:35 +01:00
belliash 0572b208f1 Add full paging support for AMD64 and i686 architectures, including PAE support 2022-12-11 20:14:04 +01:00
belliash 324a88cc01 Implement HlCpuId() routine and corresponding structures for issueing CPUID instruction 2022-12-11 17:40:56 +01:00
belliash 2b679c11d4 Fix a bug in BlAddVirtualMemoryMapping() routine causing PF (Page Fault) on systems with more than 3GB of RAM 2022-12-11 13:56:40 +01:00
belliash 8beb7c13ec Implement BlCreateStack() for i686 architecture 2022-12-07 23:01:59 +01:00
belliash 42c762ddf8 Add missing stub for i686 builds 2022-12-07 22:07:41 +01:00
belliash 900e86c9da Create new stack and then boot XTOS, export more routines with the loader protocol 2022-12-07 20:34:16 +01:00
belliash d50fb7c37d Implement BlCreateStack() 2022-12-07 19:46:36 +01:00
belliash 43c16d054d Use PVOID instead of HARDWARE_PTE to allow different variable types for different architectures 2022-12-07 18:54:21 +01:00
belliash 93fa2aed67 Implement BlMapVirtualMemory() routine for recursive mapping 2022-12-06 23:32:31 +01:00
belliash 3876414a48 Implement BlAddVirtualMemoryMapping() and BlInitializeVirtualMemory() routines 2022-12-06 17:49:00 +01:00
belliash 2f03f84a20 Move memory related routines to a separate file and implement BlGetMemoryMap() routine 2022-12-05 20:08:18 +01:00
belliash 6b2f34f287 Store physical address as well in the image context 2022-12-04 22:46:33 +01:00
belliash b89121fded Implement routines for accessing and manipulating CPU control registers 2022-12-02 23:03:42 +01:00
belliash b275caf161 Implement RtlRemoveEntryList() routine 2022-11-28 23:00:20 +01:00
belliash cba4a065ba Add missing comments 2022-11-23 20:51:40 +01:00
belliash 519df2ad11 Allow to set VirtualAddress of loaded module 2022-11-23 20:34:20 +01:00
belliash 2cb2328f45 Initial XtpLoadModule() implementation 2022-11-17 22:44:53 +01:00
belliash 0db01053ab Code formatting 2022-11-16 20:06:52 +01:00
belliash 5ec08cb84a Implement PeGetSubSystem() routine 2022-11-16 15:03:33 +01:00
belliash 9f43ad06af Implement PeRelocateImage() routine 2022-11-15 23:31:35 +01:00
belliash 131275e788 Import loader structures definitions 2022-11-15 20:16:23 +01:00
belliash df5eab737b Add PE/COFF image characteristics 2022-11-15 20:14:28 +01:00
belliash 3125a25617 Add three most important linked lists into the kernel initialization block 2022-11-15 19:54:02 +01:00
belliash ee9f2df6a6 Properly relocate PE/COFF image 2022-11-15 00:19:21 +01:00
belliash fd4e9ffe63 Fix compiler warning for 32bit build, use proper data types 2022-11-14 17:58:53 +01:00
belliash e37e5b97af Initial version of the kernel initialization block, needed to start the kernel 2022-11-12 23:17:44 +01:00
belliash 2dd7b09fbb Make sure PE image is executable 2022-11-12 19:16:00 +01:00
belliash b03c9c2a25 Further PE/COFF module improvements 2022-11-12 12:37:49 +01:00
belliash 60c56c4462 Firmware dependent XT structures 2022-11-12 12:21:08 +01:00
belliash c2b720fbd8 Add missing PE subsystem 2022-11-07 23:16:48 +01:00
belliash 5c5c6b7a5e Initiate boot up sequence 2022-11-07 20:41:21 +01:00
belliash f0868b91ec Initial XTOS boot protocol support 2022-11-07 20:21:07 +01:00
belliash 3c6136811b Use shorter and more readable variable names 2022-11-07 20:06:19 +01:00
belliash 9aa6d6913a Store ARC name as well as system path 2022-11-07 15:53:50 +01:00
belliash 66713ba461 Print more accurate message 2022-11-07 15:51:27 +01:00
belliash 2f16a8534c Code cleanup 2022-11-06 20:03:49 +01:00
belliash c8f99ad6ed Initial PE/COFF support for loading image files 2022-11-06 19:59:38 +01:00
belliash 4a364212de Fix 4KB pages allocation 2022-11-05 21:59:55 +01:00
belliash bef6b5a589 Import ExectOS ASCII logo 2022-11-01 19:54:08 +01:00
belliash 24fac8208b Update OVMF variables 2022-11-01 19:51:14 +01:00
belliash 72ec6819a6 Fixes and optimizations in PE/COFF structures 2022-11-01 19:11:12 +01:00
belliash 2d5986b514 Add universal (both 32bit and 64bit) PECOFF_IMAGE_NT_HEADERS 2022-10-31 10:08:09 +01:00
belliash 3412f97fe4 Missing FileInfo protocol GUID 2022-10-30 22:26:16 +01:00
belliash f5e9bd11f1 Implement BlEfiMemoryAllocatePages() and BlEfiMemoryFreePages() for manipulating memory pages 2022-10-30 22:24:21 +01:00
belliash b29162841c Get rid of BlEfiDirectorySeparator() routine and allow GetVolumeDevicePath() to store ARC name 2022-10-30 12:21:09 +01:00
belliash c09b121178 Rework BlEfiDirectorySeparator(), now it operates on wide strings 2022-10-26 22:11:42 +02:00
belliash 30bc0c3cb7 Install kernel under boot directory 2022-10-26 20:30:39 +02:00
belliash b1c08e4a9f Implement RtlStringLength() and RtlStringToWideString() routines 2022-10-25 23:45:12 +02:00
belliash 0ead750489 Remove useless forward reference 2022-10-25 23:21:58 +02:00
belliash 861251f41a Add routines for opening and closing volumes to the loader protocol 2022-10-25 23:17:23 +02:00
belliash 26884a436b Implement BlEfiDirectorySeparator() routine for setting correct EFI directory separator 2022-10-25 23:12:09 +02:00
belliash 727825572a Print XTLDR version 2022-10-23 22:36:12 +02:00
belliash d6cc283519 Add missing IN/OUT indicators 2022-10-23 22:20:17 +02:00
belliash 8473150b26 Rename parameters 2022-10-23 22:18:45 +02:00
belliash 5869aa985a Quick code refactor for further modules development 2022-10-20 18:19:34 +02:00
belliash 37a37c225f Small code refactoring 2022-10-20 15:58:50 +02:00
belliash 1296b44ae0 Add executable image (PE/COFF) structures and definitions 2022-10-19 16:30:21 +02:00
belliash 6c576f95c4 Rename module entry point 2022-10-19 14:55:31 +02:00
belliash 984b4b83a1 This is no longer needed 2022-10-18 18:47:49 +02:00
belliash 27f0b3b362 Correct typo 2022-10-18 18:46:46 +02:00
belliash 6f9ad1ac9f Add missing code documentation 2022-10-18 15:45:12 +02:00
belliash f8a120a24c Allow BlGetXtLoaderProtocol() routine to store loader protocol in a specified variable 2022-10-18 15:44:21 +02:00
belliash 96a848b498 Add missing routine declaration 2022-10-17 22:47:46 +02:00
belliash 1b310e46f8 Print firmware information, not only secure boot status 2022-10-17 22:42:06 +02:00