28 Commits
Author SHA1 Message Date
Dmitry Borisov 6eaae6d729 [HAL] Make HalpCalibrateStallExecution discardable
- Discard the RTC interrupt handler for MSVC builds. Unfortunately GAS doesn't have such a feature
- Remove the unused systimer.S file from MiniHAL compilation
2026-04-15 10:52:11 +03:00
Ahmed Arif 229f7891a1 [FREELDR][HAL] Skip x86 BIOS emulator on UEFI boots (#8827)
Skip x86 BIOS emulator initialization on EFI boots by having FreeLdr populate EFI boot state in the loader block and making HAL consume it.

This keeps BIOS behavior unchanged while avoiding legacy BIOS/INT10 setup in the EFI path and preventing early EFI boot failures caused by entering the BIOS emulator path at all.
2026-04-02 13:37:43 +02:00
Dmitry Borisov 3bc4f3447f [BOOT][HAL] Fix BCD conversion macros (#8574)
- BCD_INT / INT_BCD: Evaluate macro parameter only once
- Remove the stdcall calling convention from PC-98 HAL private functions
2026-01-12 16:40:21 +03:00
Dmitry Borisov 029e53ddb5 [MINIHAL] Minor improvements (#7398)
* [FREELDR] Mark noreturn functions

* [FREELDR] Compile hw debugging support code only in debug builds

- Make BREAKPOINT() portable

* [FREELDR] Consolidate identical names into a single string

* [FREELDR] Use intrinsics for string I/O operations on x86 and x64

Stop them being pulled in from a static minihal library

* [MINIHAL] Exclude unnecessary portio dependency
2025-03-11 10:30:14 +03:00
Timo Kreuzer 5ebd478325 [NTOS][HAL:APIC] Call HalBegin/EndSystemInterrupt from clock handler 2024-12-16 16:21:44 +02:00
Timo Kreuzer 1f647e4479 [HAL] Remove KiEoiHelper hack 2024-12-16 16:21:44 +02:00
Timo Kreuzer 79aaee6aac [HALX86] Implement the clock IPI handler 2024-03-02 07:56:27 +01:00
Justin Miller 3306a16e84 [HALX86] Fix SYNCH_LEVEL differences between UP and SMP in HAL (#5874)
First step to fixing the multiprocessor kernel when booting on a single core.
2024-01-20 06:26:59 -08:00
Justin Miller 516ccad340 [NTOS:KE][HALX86] Implement AP startup code (#5879)
Co-authored-by: Victor Perevertkin <[email protected]>

Introduce the initial changes needed to get other processors up and into kernel mode. 
This only supports x86 as of now but is the first real step towards using other system processors.
2023-11-19 15:51:33 -08:00
Adam Słaboń ce2d4740a6 [SDK][HAL] Enable x86Bios on x86 (#5454)
This will be needed for compatibility with x86 Windows Vista/7 videoprt.sys builds.
Might be also useful in future for platforms (x86 , ...) where V86 mode is not available or buggy.

CORE-11954, CORE-18185
2023-07-20 21:44:44 +02:00
Dmitry Borisov 6f4be52a1c [HALX86] Print the correct size of the BAR in HalpDebugPciDumpBus()
Reference: https://wiki.osdev.org/PCI#Address_and_size_of_the_BAR

To determine the amount of address space needed by a PCI device,
you must save the original value of the BAR, write a value
of all 1's to the register, then read it back.

Note: 64-bit BARs are not supported yet.
2022-05-26 16:40:17 +03:00
Timo Kreuzer a0fb02f7f3 [HAL] Fix build with CONFIG_SMP 2021-06-19 12:17:18 +02:00
Jérôme Gardou 3adf450867 [REACTOS] Addendum to 5c7ce4475e - Fix MSVC 2015 build
Put data into PAGEDATA or INITDATA sections
Keep section declaration for prototypes

CORE-17540
2021-05-12 11:04:29 +02:00
40bb3786b6 [HALX86] Implement HalQueryAMLIIllegalIOPortAddresses case in HaliQuerySystemInformation
CORE-17359

Co-authored-by: Stanislav Motylkov <[email protected]>
Co-authored-by: Oleg Dubinskiy <[email protected]>
2020-11-14 15:18:37 +01:00
Timo Kreuzer c5a700fd06 [HAL:X64] Fix/improve the BIOS interface
* Call HalInitializeBios both in phase 0 and 1
* In phase 0 allocate some physical memory, instead of using arbitrary hardcoded pages, that then end up as page tables and get filled with VESA tables
2020-11-07 18:46:20 +01:00
Victor Perevertkin 5c7ce4475e [REACTOS] Cleanup INIT and some PAGE section allocations
- Change INIT_FUNCTION and INIT_SECTION to CODE_SEG("INIT") and DATA_SEG("INIT") respectively
- Remove INIT_FUNCTION from function prototypes
- Remove alloc_text pragma calls as they are not needed anymore
2020-11-02 21:45:31 +03:00
Dmitry Borisov b36018ff26 [HALPC98] Add Hardware Abstraction Layer for NEC PC-98 series (#3002) 2020-07-25 15:31:02 +02:00
Dmitry Borisov 17c5fb8866 [HALXBOX] Fix clock drift (#2889)
Add a new rollover table for Original Xbox (base frequency is 1.125000 MHz).
This fixes potential time issues in kernel and drivers.

CORE-16216
2020-06-03 02:14:16 +03:00
Dmitry Borisov 18ae48ce51 [HALX86] Move PC/AT hardware definitions to a separate file (#2406)
This makes it easier for other ports.
2020-03-06 19:54:16 +01:00
disean e5c0052466 [HAL][FREELDR] Fix system timer oscillator frequency on a Xbox (#2245)
See https://xboxdevwiki.net/Porting_an_Operating_System_to_the_Xbox_HOWTO#Timer_Frequency
2020-01-14 18:47:36 +01:00
Timo Kreuzer 9ab3246d43 [HAL] Implement amd64 BIOS call support
The code uses FAST486 to emulate the BIOS code.
2019-08-15 14:13:54 +02:00
Timo Kreuzer 71fefa32db [NDK][NTOS] Add global definition of INIT_FUNCTION/INIT_SECTION (#779)
* Add an NDK header to define INIT_FUNCTION/INIT_SECTION globally
* Use _declspec(allocate(x)) and _declspec(code_seg(x)) on MSVC versions that support it
* Use INIT_FUNCTION on functions only and INIT_SECTION on data only (required by MSVC)
* Place INIT_FUNCTION before the return type (required by MSVC)
* Make sure declarations and implementations share the same modifiers (required by MSVC)
* Add a global linker option to suppress warnings about defined but unused INIT section
* Merge INIT section into .text in freeldr
2018-12-30 12:19:11 +01:00
Denis Malikov 4ea570975c [HAL] Add NT6-compatible version of HalpMapPhysicalMemory64 and HalpUnmapVirtualAddress 2018-08-05 10:14:57 +02:00
Thomas Faber b4453242f7 [HAL] Eliminate tail calls from HalpDispatchInterrupt[2]. CORE-14076 2018-02-18 13:06:42 +01:00
Ivan Labutin 5ae2750467 [HAL] Implement APIC-based profiling for x64. 2018-02-15 12:45:29 +01:00
Timo Kreuzer 5311c57b5f [HAL] Use 64 bits for physical addresses. 2017-12-17 19:01:52 +01:00
Colin Finck 361b6e39e3 [HALX86] Deduplicate initialization of legacy PICs and remove EOI in I/O APIC initialization, which causes an unexpected interrupt 2017-12-17 09:51:37 +01:00
Colin Finck c2c66aff7d Git conversion: Make reactos the root directory, move rosapps, rostests, wallpapers into modules, and delete rossubsys. 2017-10-03 07:45:34 +00:00