Commit Graph

92 Commits

Author SHA1 Message Date
d7552f1dce Fix race condition in HlComPortReadLsr
The static local variable RingFlag in HlComPortReadLsr caused shared state across multiple calls and ports, leading to race conditions and incorrect behavior.
2025-08-06 09:01:47 +02:00
da3e039a05 Use correct address when clearing COM port buffer
The code was reading from Port->Address to clear the RBR before the field was initialized.
2025-07-20 14:53:04 +02:00
2e7793dc2b Implement HlpGetCpuApicId() routine 2024-07-22 23:31:20 +02:00
2c5b680426 Implement HlpSendIpi() routine 2024-07-22 23:23:55 +02:00
626ece8046 HlReadApicRegister() should return and HlWriteApicRegister() should take ULONGLONG value 2024-07-16 22:36:45 +02:00
088940424d Fix data types and rename some fields to avoid confusion 2024-07-16 16:28:12 +02:00
7abd0f3017 Revert unintentional change 2024-07-14 12:13:56 +02:00
f8519ec09d Rename HlpAcpiSystemInfo global variable to HlpSystemInfo 2024-07-14 12:11:39 +02:00
3bda67be0a Basic ACPI system info initialization code for traversing MADT tables 2024-07-13 21:08:58 +02:00
f52c50242a Correct comment 2024-07-09 22:57:02 +02:00
3f10e1b59e Fix page fault when trying to find ACPI table 2024-07-09 22:47:26 +02:00
47219585d4 Fix pointer operation overflow 2024-07-09 22:40:32 +02:00
e46f2e6116 Ensure that table header is not set before attempting to find ACPI table 2024-07-09 22:36:40 +02:00
906e09fd9f Refactor COM port support, to get rid of global variables in library 2024-06-12 18:02:29 +02:00
2f16f4f613 Traverse Local x2APIC structures to find all processors 2024-06-07 23:05:12 +02:00
f36b59c961 Store processor identities in system info structure 2024-06-07 20:19:56 +02:00
86bc2042e5 Cleanup XTDK headers 2024-06-06 23:09:03 +02:00
658cb2d3c8 Get system information based on the ACPI (currently only number of CPUs) 2024-06-06 22:05:32 +02:00
829fc49aac Fix ACPI cache causing some undefined behavior 2024-06-06 21:52:41 +02:00
92e861ebae Cleanup APIC related headers 2024-06-06 21:50:20 +02:00
4212453cf5 Fix APIC initialization code 2024-06-06 16:49:08 +02:00
ef65bceccd Initialize legacy PIC and mask all interrupts 2024-06-05 16:08:54 +02:00
b061c87fc9 Fix routines with no prototype using XTAPI calling convention compiler warnings 2024-06-04 21:41:16 +02:00
8a4caba26f Fix routine with no prototype using XTAPI calling convention compiler warning 2024-06-04 21:39:10 +02:00
76e1fc6099 Enable hardware layer initialization code 2024-06-04 21:36:09 +02:00
7b29897efb Initialize ACPI Timer 2024-06-04 21:04:09 +02:00
7704e5d399 Initial kernel ACPI support 2024-06-04 16:24:13 +02:00
94a40501d4 Mask APIC ICR0 and disable APIC interrupts for initialization time by raising APIC TPR 2024-05-24 23:39:06 +02:00
2103b2dafd Make sure frame buffer is initialized before drawing 2024-05-18 16:57:38 +02:00
d2014a5e82 Use HlpRGBColor() internally 2024-05-17 23:29:03 +02:00
41bc673694 Initialize framebuffer device based on a system resource provided by boot loader 2024-05-17 22:37:42 +02:00
086d9ed7e2 Rename source file with fb-related stuff 2024-05-13 15:55:39 +02:00
78424385fc Convert RGB colors to FrameBuffer format 2024-05-13 08:51:27 +02:00
e311cad8f7 Allow to clear framebuffer screen with any, custom background color 2024-05-12 22:43:06 +02:00
c34b6ff6c1 Take CPU number from processor block 2024-05-08 21:59:18 +02:00
f66e9aea9e Store CPU number and mask interrupts in processor block 2024-05-07 16:21:38 +02:00
ac0b8ab36a Allow to specify CPU number when initializing (A)PIC 2024-05-07 16:16:49 +02:00
40e0dd8c5e Mask LVTERR first to prevent local APIC errors 2024-05-05 15:24:17 +02:00
bb44caee31 Implement HlPutCharacter() routine 2024-03-10 17:02:30 +01:00
cb4292dccf Allow to use custom framebuffer fonts 2024-03-10 10:02:30 +01:00
a4d9e6dd8e Optimize HlClearScreen() routine 2024-03-09 15:50:05 +01:00
a4c22ab5e8 Improvements to FrameBuffer support 2024-03-09 15:07:33 +01:00
c70d2e2afa Routines with no prototype cannot use XTAPI calling convention 2024-02-20 16:37:57 +01:00
77bc796769 Implement HlClearApicErrors() and HlSendEoi() routines, change HlDisableLegacyPic() calling convention 2024-02-09 15:11:14 +01:00
31b8cd8d3d Update HlDisablePic() description 2023-11-29 22:43:57 +01:00
Jozef Nagy
c8a54e602b Disable legacy 8259 PIC before enabling APIC
Reviewed-on: xt-sys/exectos#5
Reviewed-by: Rafal Kupiec <belliash@noreply.codingworkshop.git>
Co-authored-by: Jozef Nagy <schkwve@gmail.com>
Co-committed-by: Jozef Nagy <schkwve@gmail.com>
2023-11-29 20:07:16 +01:00
9aafa63617 Move CPU and PIC support into common for i686 and amd64 place 2023-11-29 18:26:46 +01:00
f6c621c2a6 Basic processor initialization code 2023-11-28 22:31:39 +01:00
d4ee87fd62 Fix function prototype 2023-11-28 15:39:32 +01:00
d17b06a180 Register interrupt handlers once the APIC initialization is done 2023-11-28 14:20:23 +01:00