Commit Graph
100 Commits
Author SHA1 Message Date
belliash 605597262c Initial version of EFI framebuffer module, currently support only GOP 2023-01-16 18:41:25 +01:00
belliash 289316b43b Print hexadecimal values in uppercase 2023-01-16 15:55:38 +01:00
belliash e3f0782053 Add enumeration of efi supported graphics protocols 2023-01-16 00:10:44 +01:00
belliash 5d74fb2bb5 Add UGA related structures 2023-01-16 00:03:35 +01:00
belliash 87d8300c6a Remove no longer needed EfiLoaderStack global variable 2023-01-15 18:54:31 +01:00
belliash 9a52be5ab9 Print a reason why module failed to load 2023-01-15 18:53:09 +01:00
belliash 0c3e18fd86 Once BlGetMemoryMap() is called, it cannot allocate or free memory, otherwise key gets invalidated 2023-01-15 18:50:12 +01:00
belliash 0461d975e0 Check ExitBootServices() status code 2023-01-15 16:52:02 +01:00
belliash fb60625abc Add more intrinsic routines 2023-01-13 22:32:45 +01:00
belliash bff460a879 Print COM port address properly 2023-01-11 23:29:27 +01:00
belliash 7496fa324e Map EfiLoaderData as some UEFI implementations might need this before kernel take over control 2023-01-11 23:26:54 +01:00
belliash 42c3d4eff7 Fix NULL pointer 2023-01-11 23:16:44 +01:00
belliash 21abe0553a Code formatting 2023-01-11 15:39:36 +01:00
belliash beed5e0b51 More architecture specific definitions 2023-01-11 15:29:43 +01:00
belliash 350df87bcc Do not start services as this only slows down boot process significantly 2023-01-10 22:55:40 +01:00
belliash 025e05013d Partially revert last changes 2023-01-10 22:51:38 +01:00
belliash bac7af8a33 Cleanup data types 2023-01-09 23:07:21 +01:00
belliash 12b8c5f539 Switch kernel stack and move boot structures initialization into separate routine 2023-01-08 10:35:49 +01:00
belliash 6255165f10 Add missing EFI enumeration lists forward references 2023-01-08 09:31:40 +01:00
belliash fd6e273d8a Add missing forward references 2023-01-07 23:44:00 +01:00
belliash ca1d7ddfe8 Basic context, frames and exceptions definitions 2023-01-07 23:36:50 +01:00
belliash f74ba62f24 Add GDT, IDT and TSS related structures 2023-01-07 13:33:16 +01:00
belliash cdef64d1e6 Update shields 2023-01-07 10:02:37 +01:00
belliash 3caca6e1bf Set kernel subsystem to XT_NATIVE_KERNEL 2023-01-06 19:25:21 +01:00
belliash 3f54c9b37e Allow to set XT subsystem when producing binaries 2023-01-06 16:18:04 +01:00
belliash b22a76e3c4 Add XT native kernel subsystem to the PE/COFF image support 2023-01-06 16:16:26 +01:00
belliash 674e69da0e Cleanup useless externals 2023-01-05 23:38:58 +01:00
belliash 712de4e4e4 XTDK contains headers uniquely identified 2023-01-05 23:28:43 +01:00
belliash 3250ad67aa Rename header file 2023-01-05 23:09:54 +01:00
belliash f2b51ff69c Code formatting 2023-01-05 22:45:52 +01:00
belliash 2920c1042a Suppress error caused by including recursively when building a preamble 2023-01-05 19:55:17 +01:00
belliash 3131aac7a9 Move serial ports I/O address to architecture specific header 2023-01-05 15:58:36 +01:00
belliash 5730e8692e Reorganisation of KeStartXtSystem() routine and early debug printing 2023-01-04 23:08:59 +01:00
belliash b7e5f1b5c1 Use CR constants instead of hardcoded values 2023-01-04 16:33:28 +01:00
belliash a5b3350559 Add _M128 structure definition 2023-01-04 16:16:17 +01:00
belliash f19afbddb7 Do not create new bootloader stack as it is not needed any longer and kernel will use its own stack 2023-01-03 23:04:11 +01:00
belliash b22303003c Add architecture name 2023-01-03 16:28:14 +01:00
belliash bb95223501 Implement BlActivateSerialControllerIO() routine for activating I/O space access on PCI(E) serial controllers 2023-01-03 00:10:24 +01:00
belliash d8f2135ac6 Add more PCI(E) related definitions 2023-01-02 23:59:32 +01:00
belliash c91708034b Correct comments 2023-01-02 18:06:54 +01:00
belliash c5a7d0fe05 Improvements in COM port support 2023-01-02 16:14:00 +01:00
belliash e8e7d7b905 Add missing forward declaration 2023-01-02 16:11:50 +01:00
belliash 4c031f4075 Add I/O related type definitions 2023-01-02 16:10:43 +01:00
belliash b6b25ed04d Initialize serial port only debugging enabled 2023-01-01 19:20:34 +01:00
belliash 94e9fa1293 Allow to provide custom COM port address 2022-12-29 23:44:52 +01:00
belliash feabac2d98 Set XTOS NT compatibility version 2022-12-29 22:39:39 +01:00
belliash 58527ce5cb Set correct image version 2022-12-29 22:37:39 +01:00
belliash 7f21e4f19c Dump EFI memory mappings 2022-12-29 17:09:44 +01:00
belliash 6a27ea140b Print xtldr debug messages only when debugging enabled 2022-12-28 23:30:03 +01:00
belliash e6a7918bac Fix release build 2022-12-28 23:28:49 +01:00
belliash dec021b1ec Reorganize early debug printing; initialize kernel stacks when needed 2022-12-28 23:11:35 +01:00
belliash 75ac59f48a Fix DEBUG/RELEASE building options 2022-12-28 17:15:21 +01:00
belliash 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
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