Commit Graph

922 Commits

Author SHA1 Message Date
Daniel Victor
54422db2b8 [FREELDR] Fix UEFI IA-32 boot (#8886)
The PAE flag might be enabled on some x86-32 UEFI platforms, causing a crash in the kernel.
```
Assertion C:\reactos-master\reactos\ntoskrnl\mm\ARM3\miarm.h(971): PointerPte->u.Hard.Valid == 0
nt!MI_WRITE_VALID_PTE+0x28:
822d1d08 cd2c            int     2Ch
```

Tested using qemu with `OVMF32_CODE_4M.fd` firmware, and with 32bit UEFI in VMware.
2026-04-30 23:56:19 +02:00
Hermès Bélusca-Maïto
bac97c58e2 [FREELDR] Rework the contents of the FreeLoader setup, custom-boot, and NT advanced boot options menus
- Make the menu contents more dynamic; inspired by PR #8871 by Ahmed Arif.

- advopts.c: Double-relicense ntldropts.c/h to GPL-2.0-or-later or MIT,
  as most of the code in this file has been rewritten for years now.

- options.c (FreeLoader setup options menu):
  Double-relicense options.c/h to GPL-2.0-or-later or MIT, as most
  of the code in this file has been rewritten since commit 9ff4e4b9ef.
2026-04-28 23:23:25 +02:00
Hermès Bélusca-Maïto
925d227faa [FREELDR:NTLDR] Move NtLdrUpdateLoadOptions() to ntldropts.c and rename it to NtLdrUpdateOptions()
Also:
- Update SAL annotations to SAL2;
- Double-relicense ntldropts.c/h to GPL-2.0-or-later or MIT.
2026-04-28 23:23:24 +02:00
Hermès Bélusca-Maïto
b2e33f26eb [REACTOS] Merge our bootcd and livecd into an all-in-one ReactOS BootCD (#7313)
CORE-9069, CORE-13525, RELEASE-11

This new BootCD contains the functionality of both the original bootcd
(text-mode 1st-stage installer) and the livecd (that will include the
1st-stage GUI installer later).
Our separate livecd ISOs become obsolete, and this completely removes
the need for the so-called "hybridcd" ISO.

Some details:

- The "hybridcd" build target is completely removed, since now the new
  BootCD *is* basically what we used to call "hybridcd".

- The "livecd" build target is kept so far (to minimize the code changes),
  but internally I start to refer to it as "LiveImage", and is reduced
  to a minimum.

  A minimal non-bootable "liveimg.iso" is built (but currently not
  included within the BootCD). Its purpose will be to implement the
  "ReactOS Live" functionality as a RAMDISK.
  (We currently don't support other file formats apart from ISO and
  flat disk for a RAMDISK).

  The "ReactOS Live" (non-RAMDISK) is implemented by adding to the
  BootCD file tree the files from the LiveImage.
  These files add two root directories, "Profiles" and "reactos"
  (which is the SystemRoot for the non-ramdisk LiveImage).

- The minimal text-mode ReactOS installation used for the 1st-stage
  installer, including USETUP itself, and the executable for the
  1st-stage GUI installer and the reactos.cab (installation source),
  are moved to the root directory called "i386" (ideally, one directory
  per architecture).

- The "bootcdregtest" target, i.e. the ISOs we feed our testbots with,
  are left untouched, i.e. they are only constituted of the 1st-stage
  text-mode installation only, but placed in a per-architecture root
  directory ("i386", etc. as for the bootcd).

- Remove the ACPI APIC/SMP entries from bootcd.ini. They will be made
  available via the Advanced Boot Options F8 menu in Debug builds, for
  testing purposes only, in a subsequent commit.

This commit is based upon an older SVN one:
svn path=/branches/setup_improvements/; revision=75273
2026-04-28 23:11:10 +02:00
Hermès Bélusca-Maïto
16e6da0e96 [FREELDR:SETUPLDR] Add the missing known platform-specific SourcePaths where TXTSETUP.SIF can be found
And slightly improve the search loop.

- Unconditionally look into the root directory as well, in order to cover
  all possible boot disk layouts in case someone customizes the ReactOS
  boot media layout.

- Improve the `InfOpenFile()` call error handling, in order to show the
  erroneous line _iff_ the call failed because of a wrong syntax in
  TXTSETUP.SIF . Distinguish it from a failure because the file doesn't
  exist in the source path being tested (in which case, no error is shown).
2026-04-28 23:11:09 +02:00
Hermès Bélusca-Maïto
4dc1ea6c8f [BOOTDATA] Move the legide.sys entry in txtsetup.sif into the x86-specific section
The legide.sys driver, introduced in commit ae2827f481, is compiled *ONLY*
for the x86 platform (not x64 nor the others) as specified in commit 7d33f7503b.
Fix the file installation copy by moving its entry into the x86-specific section.

Addendum to commit 7174935d73 (PR #8888). CORE-17256
2026-04-28 23:07:42 +02:00
Carl J. Bialorucki
7174935d73 [BOOTDATA] Fix legide.sys load on boot (#8888)
After merging the new ATA driver, FreeLdr complains about not being able
to load legide.sys. Fix that by adding legide.sys driver to txtsetup.sif
so FreeLoader can load it.

Addendum to ae2827f481. CORE-17256
2026-04-22 10:28:38 +03:00
Dmitry Borisov
7d33f7503b [UNIATA] Disable the driver and enable the new ATA stack
Also fix descriptions for devices 1166:0241 and 1166:0242.
See https://bugzilla.kernel.org/show_bug.cgi?id=10424 and
aeb74914ef

CORE-17256
2026-04-21 15:01:22 -05:00
Timo Kreuzer
420a4bc9cb [FREELDR] Add NlsLeadByteInfo to rtl/nlsboot.c 2026-04-21 13:13:33 +00:00
Hermès Bélusca-Maïto
a2269ef7f9 [BOOTDATA] hivesys.inf: "OsLoaderPath" and "SystemPartition" shouldn't be pre-hardcoded
These two registry values, stored in `HKEY_LOCAL_MACHINE\SYSTEM\Setup`,
are generated at runtime by the kernel; they are based on the current
values of: `LoaderBlock->NtHalPathName` and `LoaderBlock->ArcBootDeviceName`
respectively.

In particular, hardcoding `SystemPartition` to a default value
"\Device\Harddisk0\Partition1" , would be as random as hardcoding it
to anything else, since nothing justifies that there exists a partition
on the first harddisk, and if there is one, nothing guarantees that it
is one that was used to boot the operating system... Especially when
booting a LiveCD!
2026-04-16 17:43:40 +02:00
Hermès Bélusca-Maïto
e2c92c0ffb [FREELDR] Switch partition interface to using the more generic PARTITION_INFORMATION
instead of the MBR-specific PARTITION_TABLE_ENTRY structure.

Simplify also some aspects of the code:

- for MBR code, avoid copying around partition entries, but use
  pointers instead;

- more generally, use the actual disk sector size instead of guessing,
  and pass it to the partition interface routines.
2026-04-15 18:19:20 +02:00
Hermès Bélusca-Maïto
c479bf81ff [FREELDR] Remove internal/hal.h include from main header 2026-04-15 13:46:40 +02:00
Hermès Bélusca-Maïto
9baf0933fb [FREELDR:NTLDR] Improve LoaderBlock ArcBootDeviceName determination; correctly set ArcHalDeviceName
- `ArcBootDeviceName`: Given a theoretically valid ARC boot path
  of the form:
    `multi(0)disk(0)rdisk(0)partition(2)ReactOS\\weird)name`
  correctly determine `ArcBootDeviceName` to be:
    `multi(0)disk(0)rdisk(0)partition(2)`
  and `SystemRoot` to be what follows it:
    `ReactOS\\weird)name`

  Usual paths like: `multi(0)disk(0)rdisk(0)partition(2)\\ReactOS`
  are still correctly handled, of course.

- The `ArcHalDeviceName` path is the ARC path to the system partition,
  where the firmware started the bootloader from. For historical reasons
  it's called Arc **HAL**, because on older (and non-x86) Windows versions
  the HAL was to be placed next to the OS loader in the system partition,
  while the rest of the OS (kernel, etc.) was placed elsewhere.

  So, in order to correctly set `ArcHalDeviceName`, pass the determined
  SystemPartition all the way down to `WinLdrInitializePhase1()`.
2026-04-09 22:42:24 +02:00
Hermès Bélusca-Maïto
7fc926974f [FREELDR:NTLDR] Enable EMS support on all platforms
Set the `HeadlessLoaderBlock` for all platforms, since headless support
is platform-independent. Addendum to commit ea93b886df.
2026-04-09 21:15:53 +02:00
Hermès Bélusca-Maïto
7779fb4459 [FREELDR] Retrieve and store the disk GUID signature if the disk is GPT partitioned (#8843)
For fixed-disks (i.e. not floppy nor CD-ROM), check in `disk.c!DiskInitialize()`
whether the disk being enumerated is GPT. If so, retrieve its disk GUID.
Pass this information to `AddReactOSArcDiskInfo()` when filling the ARC
disk information block, which sets the `IsGpt` and `GptSignature` members
of the `ARC_DISK_SIGNATURE` structure accordingly.

Debugging output example, where the first disk (0x80) is MBR, while the
second (0x81) is GPT:
```
(freeldr\disk\disk.c:100) err: DiskInitialize(0x80, 'multi(0)disk(0)rdisk(0)', Type: 25)
(freeldr\disk\disk.c:125) err: Signature: 163fbb9d
(freeldr\disk\disk.c:134) err: Checksum: 47699104
(freeldr\disk\disk.c:137) err: IsPartitionValid: TRUE
(freeldr\disk\disk.c:100) err: DiskInitialize(0x81, 'multi(0)disk(0)rdisk(1)', Type: 25)
(freeldr\disk\disk.c:125) err: Signature: 0
(freeldr\disk\disk.c:134) err: Checksum: 9cb5ff90
(freeldr\disk\disk.c:137) err: IsPartitionValid: TRUE
(freeldr\disk\disk.c:157) err: Disk 0x81 is GPT, DiskGuid: {1e4e8972-e026-4d5f-b213-7be3f2fad3f8}
```

----

This fixes the BSOD 0x7B `INACCESSIBLE_BOOT_DEVICE` that happens when
trying to boot a ReactOS installation present in a partition on a GPT
partitioned disk.

In the kernel IO manager:
`IopCreateArcNamesDisk()`, invoked by `IopCreateArcNames()`, tries to
map the list of disks dynamically detected by the boot disk drivers
with those detected by the bootloader, by matching their disk signatures.

- The signatures of the disks detected by the boot disk drivers are
  obtained when querying their drive layout and partition table (which
  also tells whether the disk is MBR or GPT partitioned);

- while the signatures of the disks detected by the bootloader are
  enumerated in the `LoaderBlock->ArcDiskInformation->DiskSignatureListHead`
  linked-list (inside `ARC_DISK_SIGNATURE` structures).

The routine compares the disk signatures by invoking `IopVerifyDiskSignature()`,
which, depending on whether the disk is MBR or GPT (as reported in the
drive layout), compares the signature with that of `ARC_DISK_SIGNATURE`
`Signature` (for MBR) or `GptSignature` (for GPT) structure members.

In case the boot disk turns out to not be mapped -- which was the case
until now if it was GPT-partitioned -- then the `IopMarkBootPartition()`
routine invoked later, wouldn't be able to find and open the boot disk,
and would trigger the BSOD 0x7B, as the result.
2026-04-08 20:56:38 +02:00
Hermès Bélusca-Maïto
00ed55bcba [FREELDR:UEFI] Move GPT partition support into a separate module... (#8843)
so that it can be used for other platforms.
Based upon suggestions by Daniel Victor (@iLauncherDev).

partition.c: Double-license GPL-2.0-or-later and MIT
2026-04-08 20:51:43 +02:00
Hermès Bélusca-Maïto
1490f34da2 [FREELDR] partition.c: Split the MBR and Xbox (BRFR) code into separate files (#8843)
No actual code changes.
Based upon suggestions by Daniel Victor (@iLauncherDev).
2026-04-08 20:42:15 +02:00
Daniel Victor
bad308a34d [FREELDR] Add assembly helpers for the original Xbox (#8722)
This fixes boot regression on Xbox, introduced in 3964c936cb.

A new `call writestr` on early boot leads to `writechr` helper call,
which uses INT 10h BIOS service. This ends up in early boot crash,
as the original Xbox doesn't have VGA BIOS, nor the BIOS Data Area.

Fix the problem by adding Xbox-specific assembly helpers.

CORE-16216, CORE-19882
2026-04-08 19:08:44 +03:00
Hermès Bélusca-Maïto
03de1f932f [FREELDR:NTLDR] Fix build following commit 9ff4e4b9ef 2026-04-04 22:34:53 +02:00
Hermès Bélusca-Maïto
bf26ae38a5 [FREELDR] Make FreeLoader a bit more usable even if FREELDR.INI is missing
CORE-9023

In case FREELDR.INI is missing, or there are no operating systems listed
and available (either the corresponding section is missing, or is empty),
fall back to the FreeLoader Setup and Configuration F2 menu, that allows
performing a minimal number of operations (enabling FreeLoader debugging;
doing a custom boot... and more to come!)

Fix also a bug in `InitOperatingSystemList()`, that would allow
allocating an empty list with zero items. Now it returns NULL if
no operating systems are found.

Default to the Minimal text UI instead of the fullfledged one, if no
"MinimalUI" option can be found in FREELDR.INI (or if the INI is missing).
2026-04-04 22:19:18 +02:00
Hermès Bélusca-Maïto
9ff4e4b9ef [FREELDR][NTLDR] Move the ReactOS/NT-specific advanced boot menu to its separate file
CORE-9023

Make also the advanced boot menu depend on the operating system type.
It can be opened by pressing F8, or F5, as in the Windows' bootloader.

The FreeLoader-specific options are moved to a separate menu,
accessible via the F2 key from the main menu.

Work-in-progress: display the boot options that correspond to the
currently-selected boot entry.
2026-04-04 22:15:58 +02:00
Hermès Bélusca-Maïto
1ac657ed0e [FREELDR:NTLDR] Normalize the boot options as soon as possible, and fix the algorithm
Use `NtLdrGetNextOption()` to loop over each individual option and move
it to its proper place. This automatically trims any '/' option
separator, including repeated ones and whitespaces, and allow for
straightforward replacement with one single space.
2026-04-04 21:46:29 +02:00
Hermès Bélusca-Maïto
e87a74f131 [FREELDR] LaunchSecondStageLoader(): Always return ESUCCESS if rosload.exe started correctly...
instead of returning an erroneous value, since the rosload.exe entry point
`RunLoader()` doesn't return any value. This allows exiting from rosload.exe
and NOT having the `LaunchSecondStageLoader()` returning 0, for example,
which would then be interpreted as an error condition and showing the
"Unable to load second stage loader." error box.
2026-04-04 21:46:28 +02:00
Hermès Bélusca-Maïto
56481e1b8d [FREELDR:ARCH] Modularize the disk registration code (#8736) 2026-04-02 17:36:10 +02:00
Hermès Bélusca-Maïto
d2cbec0b5f [FREELDR:ARCH] Fix minor bugs; condense XboxDiskInit() a bit (#8732)
- `AtaInit()` returns the number of detected ATA devices. Therefore,
  when iterating over them, go from index 0 to the count _minus_ 1,
  in `Pc98InitializeBootDevices()` and in `XboxDiskInit()`.

- Initialize `DiskDrive->Type` to `DRIVE_TYPE_HDD` for detected SCSI
  hard-disk drives in `pc98disk.c!InitScsiDrive()`.

- Rearrange `XboxDiskInit()` and reduce its indentation level.
2026-04-02 17:23:39 +02:00
Hermès Bélusca-Maïto
62d71ebbd3 [FREELDR:ARCH] hwide.c: Don't rely on DEVICE_UNIT P; to be at the beginning of the HW_DEVICE_UNIT structure (#8732) 2026-04-02 17:20:20 +02:00
Hermès Bélusca-Maïto
9f42210478 [FREELDR:ARCH] Modularize the DiskError() functionality (#8732)
Move the `DiskReportError()` and `DiskError()` routines into the
`freeldr/disk/disk.c` file, reviving it as a collection of disk
devices helpers (and more in the future).

The architecture-specific disk modules only define the error code mapping
`DiskGetErrorCodeString()` function, that is then used by `DiskError()`.
2026-04-02 17:17:01 +02:00
Hermès Bélusca-Maïto
c25c527c25 [FREELDR:ARCH] Simplify DetectPciBios() (#8732)
- Let it take a `MachFindPciBios` parameter, similar to the
  `GET_SERIAL_PORT MachGetSerialPort` parameter of `DetectSerialPorts()`.

- Remove the `FindPciBios` global.
- Reduce indentation level.
2026-04-02 17:16:54 +02: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
Ahmed Arif
5b7a4c948c [FREELDR] Tune MiniTUI progress bar colors (#8828)
If NTLDR_PROGRESSBAR is not defined, use Vista+ style TUI for progress bars in Freeldr. Also, add some macros to improve readability.
2026-04-02 13:04:14 +02:00
Ahmed Arif
9a7f64a0c6 [FREELDR:UEFI] Add BGRT logo support and center it on the loading screen (#8820)
* [FREELDR][UEFI] Add BGRT logo support and center it on the loading screen
* [FREELDR][UEFI] Rework BGRT support and localize ACPI definitions
* [FREELDR][UEFI] Handle signed BGRT BMP height explicitly
* [FREELDR][UEFI] Use shared ACPI BGRT definitions

---------

Co-authored-by: Ahmed ARIF <arif.ing@outlook.com>
2026-04-02 11:35:09 +02:00
Ahmed Arif
b34a1f15df [FREELDR:UEFI] Fix amd64 assembly calling convention and GDT reload (#8698)
- Fix #GP crash on UEFI x64 boot caused by `call ExecuteLoaderCleanly[rip]` and `mov rax, UefiExitBootServices[rip]; call rax` generating indirect calls that read function code bytes as a pointer.

- Reload CS and data segments after `lgdt` to avoid #GP from stale UEFI selectors (e.g. CS=0x38) exceeding the new GDT limit.
2026-03-26 19:36:14 +01:00
Hermès Bélusca-Maïto
62deebac2d [FREELDR:NTLDR] Try to auto-detect which bootvid module to load at boot time (#8720)
Detect whether we run on XBOX or PC98 (on x86 builds), or on (U)EFI or on
a BIOS-based PC, or whether a generic linear framebuffer mode is used, in
order to choose the correct bootvid module to load, based from a predefined
file names list (ideally it should be derived from txtsetup.sif...).

Supersedes PR #8701.

Use `KeFindConfiguration*Entry()` to spelunk the hardware configuration
tree in the NT loader module.

Alternatively, allow the user to override the choice with a new `BOOTVID=`
boot option. In any case, if the selected bootvid module failed to be loaded,
silently fall back to the default bootvid.dll file. The fallback is done
by just letting the PE loader resolve the necessary exports from hal.dll
and ntoskrnl.exe.
2026-03-22 20:16:15 +01:00
Hermès Bélusca-Maïto
6c532e771e [FREELDR][KDCOM][KDGDB] Allow specifying the serial port address in the DEBUGPORT option
This is the same feature as the one that already exists in the
NTOS:KD!kdmain.c module used by the in-kernel KDBG debugger
(GCC builds), first introduced in commit 4ce30245de (r54473),
and documented at:
https://reactos.org/wiki/Debugging#Changing_the_serial_port_address

This feature is useful if one uses a PCI, PCIe, PCMCIA, or ExpressCard
serial card on real hardware (these cards are used e.g. with laptops
without a built-in serial port), or with AMT serial over LAN.
After determining the serial port I/O address (say, 0xCC00), specify
the debug port as follows:

/DEBUGPORT=COM:0xCC00

instead of the usual syntax: /DEBUGPORT=COMn (n an integer).

The same syntax can be used for debugging FreeLoader as well: in the
FREELDR.INI file, add a "Debug" line in the "FREELOADER" section,
as follows:

```
[FREELOADER]
Debug=/DEBUG /DEBUGPORT=COM:0xCC00 /BAUDRATE=115200
```

----

NOTE for KDCOM/KDGDB:

Since `strtoul()` is used, but isn't exported by ntoskrnl, link against
the "strtol" static library that has been introduced in commit d317d4fbcc
(r71481).
2026-03-21 00:10:21 +01:00
Hermès Bélusca-Maïto
f77fcc15ff [FREELDR:INI] Remove trailing whitespace from parsed INI key name
Leading whitespace was already skipped in the code.
2026-03-21 00:06:30 +01:00
Hermès Bélusca-Maïto
8e8cd2e1f6 [FREELDR:INI] inifile.h/parse.c: Formatting; use PCSTR where applicable 2026-03-21 00:06:28 +01:00
Hermès Bélusca-Maïto
956d9f7973 [FREELDR][KDCOM][KDGDB][KDVM][NTOS:KD] Don't overrun the command-line when parsing "DEBUGPORT"
Don't loop past the end of the command-line buffer, if the command-line
terminates with a lone "DEBUGPORT" without any extra parameter following.
For example: "some things   DEBUGPORT  "
2026-03-21 00:06:20 +01:00
Hermès Bélusca-Maïto
c4d60756dd [FREELDR][KDCOM][KDGDB][NTOS:KD] Some code "nits"
- Don't hardcode constant string lengths.

- Use `_strnicmp()` -- Ideally we shouldn't have to unconditionally upcase
  the global kernel command-line string to perform substrings comparisons.

- Cast `atol()` returned value to `ULONG`.
2026-03-19 22:49:29 +01:00
Hermès Bélusca-Maïto
4d0642b67f [FREELDR][KDCOM][KDGDB][NTOS:KD] Minor code comments enhancements 2026-03-19 22:14:00 +01:00
Hermès Bélusca-Maïto
b1a31610ac [FREELDR][KDCOM][KDGDB] Remove deprecated "IRQ" debugger command-line option
- The "IRQ" debugger option was introduced in commit 5a6adb4f13 (r2546).
  It was used by the in-kernel GDB stub, to manually wire an interrupt
  handler `GspBreakIn()` to allow the debugger to break into the system
  when a command is received on the GDB serial port.

  Side-remark:
  The hooking was done via `HalGetInterruptVector()` + `IoConnectInterrupt()`,
  but only at phase 1 initialization when the memory manager was up, which
  can be "late" enough during system boot initialization.
  Instead of using `IoConnectInterrupt()`, one could have used explicit
  `KeInitializeInterrupt()` + `KeConnectInterrupt()` calls that would
  have worked much earlier in the boot stage.

- This functionality was soon after disabled in commit c804ca06be (r2946)
  in the GDB stub (see `ntoskrnl/kd/gdbstub.c!KdGdbStubInit()`), never
  to be re-enabled again.
  It was removed completely in commit e160c0fb26 (r14799).

- Since ReactOS was (until recently) always debugged locally using the
  in-kernel KDBG debugger, break-in was done with TAB-K keypress,
  intercepted by the keyboard driver that triggered a `DbgBreakPoint()`,
  thus no break-in via serial port interrupt was necessary.

- Remote debugger break-in detection, which is the standard method that
  is used when remote-debugging using KD transport DLLs and WinDbg, was
  introduced in commit 12e7593f24 (r25984). As with the rest of debugger
  communication and as done on Windows, detection is done by polling the
  serial port at certain times, namely in the `KeUpdateSystemTime()`
  kernel procedure periodically invoked by the timer interrupt.
  This break-in detection was then erroneously removed in commit bf8b9467dc
  (r45140), and reinstated in commit 014b23b9a (r56194).

- Parsing of this "IRQ" option was copy-pasted in other modules (FreeLoader,
  KDCOM, and KDGDB), even though it was never used. The parsing was then
  removed in KDBG itself in commit 95faf65ebf, but left in the other
  modules... until now!
2026-03-19 21:52:14 +01:00
Hermès Bélusca-Maïto
6a56468731 [BOOTDATA] Reorganize the mkisofs ISO boot-related options, making them modular (#4425)
CORE-11954, CORE-16216, CORE-17518, CORE-17604, CORE-17977

The mkisofs options are quite long and repetitive (mostly duplicated 4 times
for the current 4 different ISO targets), and are also hard to read (i.e.
which group of options go together).

Reorganize the mkisofs ISO boot-related options in different thematic sets
and make them modular too. This also allow to conditionally add/remove ISO
boot entries for different platforms, for example:
- BIOS-based PC builds (only x86/x64) get the BIOS bootsector (excluded from IA64 and ARM32/64);
- EFI-based architectures get the EFI boot entry.

Based on a suggestion by Mark Jansen (see PR #4407).
Dedicated to Justin Miller ;)
2026-03-18 20:19:26 +01:00
Daniel Victor
b0bd092c0d [FREELDR] Make ASSERT bugcheck on failure (#8730)
Show a bugcheck with message showing where and why the ASSERT failed.
2026-03-17 16:24:14 +01:00
Hermès Bélusca-Maïto
f63df20bd4 [FREELDR:NTLDR] Fix GCC build
Addendum to commit ea93b886df.
2026-03-16 20:25:44 +01:00
Hermès Bélusca-Maïto
ea93b886df [FREELDR:NTLDR] Compile EMS support on all platforms
EMS support isn't platform-specific, so we can compile it everywhere
(as this is already done for the kernel and the SAC driver).

The only platform-specific code currently existing is the retrieval of
the system GUID, which is done on BIOS-based PC by reading the SMBIOS
table in the low-MB ROM region, but should be done differently on other
platforms. Add a compile-time warning for this.
2026-03-16 20:04:45 +01:00
Hermès Bélusca-Maïto
9833d3d8c8 [FREELDR][NTOS:INBV] Simplify headless-support initialization code
Also address few observations made by Serge Gautherie in PR #7885.
2026-03-16 18:42:57 +01:00
Hermès Bélusca-Maïto
50cb29ad4a [FREELDR][NTOS:INBV] SAL2-annotate headless-support functions 2026-03-16 16:49:53 +01:00
Hermès Bélusca-Maïto
3012af5e30 [CPORTLIB][FREELDR][KD][NTOS] Move duplicated UART settings into a common header 2026-03-16 16:18:43 +01:00
Dmitry Borisov
1cec553ed1 [FREELDR:PC98] Refactor PC-98 disk access routines (#8546)
- Fix incorrect IDE controller ownership leading to strange and inconsistent behavior during boot.
- Fix a mismatch between the type and flags of the drive.
- Remove obsolete definitions.
- Use SAL2 annotations.

CORE-17977
2026-03-09 14:04:35 +01:00
Hermès Bélusca-Maïto
fb22bd74c6 [FREELDR:NTLDR] Pass the LoadOrderListHead list to LoadModule() instead of the full version-specific LoaderBlock 2026-03-08 19:52:04 +01:00
Hermès Bélusca-Maïto
4235244ac9 [FREELDR] Move the NTLDR-specific files from the generic CMakeLists file to rosload/uefi.cmake
The UEFI build doesn't use rosload.exe yet, thus some duplication still
exists. This will be cleaned up in the future.
2026-03-08 19:52:03 +01:00