Commit graph

8 commits

Author SHA1 Message Date
Hermès Bélusca-Maïto
d03fc32e7d
[MINIHAL] Remove unneeded files from compilation. 2023-06-20 18:39:01 +02:00
Hermès Bélusca-Maïto
94c25baf85
[HAL][HALARM] The HAL should only use KPCR.
And why the ARM HAL uses KPCR::InterruptRoutine, a field only defined
in *powerpc*/ketypes.h, is beyond me, but OK...

See Timo vs. Alex discussion, explaining that KIPCR is a ReactOS-only
thing: https://reactos.org/archives/public/ros-dev/2008-August/010549.html
2022-05-08 17:21:44 +02:00
Dmitry Borisov
b36018ff26
[HALPC98] Add Hardware Abstraction Layer for NEC PC-98 series (#3002) 2020-07-25 15:31:02 +02:00
Stanislav Motylkov
fa1ec0a2ed
[BOOTVID][HALXBOX] Implement boot video driver for Xbox (#2774)
Also make HalpBiosDisplayReset() function always return FALSE,
because we don't have a BIOS on Xbox.

CORE-16216 CORE-16219
2020-05-17 19:18:32 +03:00
Serge Gautherie
fdc787c11d [HALX86] Remove a now useless ASSERT() (#2089)
By construction now the assertion will always be verified.
Addendum to 5887b170.
2019-11-25 18:29:03 +01:00
Hermès Bélusca-Maïto
5887b17005
[HALX86] Fix the "ASSERT(j < 32);" problem in HalpStoreAndClearIopm() encountered from time to time.
CORE-11921 CORE-13715

(Regression introduced by commit 2e1b82cf, r44841.)

In some cases the number of valid (!= 0xFFFF) entries in the IOPM can be
larger than the assumed size (32) of the entries cache. The maximum
possible number of entries is equal to IOPM_SIZE / sizeof(USHORT).

A way to reproduce the problem is as follows: start ReactOS in debugging
mode using '/DEBUG /DEBUGPORT=SCREEN' . Then manage to break into the
debugger exactly during the execution of Ke386CallBios() triggered by
display initialization (for example in my case, while a video driver was
being initialized via the HwInitialize() call done by videoport inside
IntVideoPortDispatchOpen() ).

When this happens, a "concurrent" execution between Ke386CallBios() and
the HAL function HalpStoreAndClearIopm() takes place. This is due to the
fact that when entering the debugger in SCREEN mode, the following
call-chain holds:
InbvResetDisplay() -> VidResetDisplay() -> HalResetDisplay() ->
HalpBiosDisplayReset() -> HalpSetupRealModeIoPermissionsAndTask() ->
HalpStoreAndClearIopm().

However, the code of Ke386CallBios() has reset the IOPM contents with
all zeroes instead of 0xFFFF, and this triggers the caching of all the
entries of the IOPM by HalpStoreAndClearIopm(), whose number is greater
than the wrongly assumed number of '32'.

As Thomas explained to me, "Windows supports [the maximum number of IOPM entries],
it just makes a full copy of the table instead of this indexed partial copy."

And I agree that this overengineered so-called "optimization" committed
in 2e1b82cf contributed in introducing an unnecessary bug and making the
code less clear. Also it makes the IOPM cache larger than the necessary
size by twice as much. Finally, Ke386CallBios() also caches IOPM entries
before doing a 16-bit call, and obviously uses the more straightforward
way of doing a direct copy of the IOPM table (using RtlCopyMemory()).

I wonder what kind of "optimization" this tried to achieve, knowing that
we are not doing like thousands of 32->16bit BIOS interrupt calls per second
in ReactOS...
2019-11-25 00:41:55 +01:00
Hermès Bélusca-Maïto
00cb464d9d
[HALX86] Trailing whitespace fixes only. 2019-11-25 00:41:55 +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
Renamed from reactos/hal/halx86/generic/bios.c (Browse further)