Commit graph

778 commits

Author SHA1 Message Date
Serge Gautherie
9fd4378def
[BOOTDATA] hivesys.inf: Sort 5 NLS languages and locales (#8068)
- Remove '0414' redundant NLS Language. Addendum to 532d977 (r27709).
- Remove '0401' redundant NLS Language. Addendum to 3a88ebc (r63713).
- Sort '0845', '0c04' and '1004' NLS Locales

CORE-16766
2025-06-02 22:27:10 +02:00
Daniel Victor
bad53bf847
[FREELDR] Fix UEFI boot after FreeLoader split (#8069)
Add missing initialization of the module list and boot devices.
This makes UEFI boot work again after #7488 merge.

CORE-11954
2025-06-02 13:42:49 +03:00
Whindmar Saksit
d663eb4466
[SHELL32][CMD][SHLWAPI] Use the openas verb when invoking unknown file types (#7981)
CORE-20184
2025-05-30 18:46:24 +02:00
Whindmar Saksit
937954cf6c
[BROWSEUI][SHELL32][SHLWAPI][BOOTDATA] Implement and use IRegTreeOptions (#7255) 2025-05-20 16:59:02 +02:00
Mohammad Amin Mollazadeh
0fa49018cd
[FREELDR] Show a notice message when booting in debug mode (#7967)
Make FreeLoader print a notice message before it passes the control
to the kernel, if kernel-mode debugging is enabled via boot options.

This can be helpful for people who may forget that they're booting
in debug mode (the default boot option also for the bootcd) and they
need to attach a debugger for the boot process to continue.
2025-05-14 22:15:11 +02:00
Hervé Poussineau
dca369cf41 [WIN32SS:ENG] Rework EngpUpdateGraphicsDeviceList
- choose VGA adapter outside of driver initialization loop
- choose primary adapter outside of driver initialization loop
- link VGA adapter to primary adapter at the end
- only set DISPLAY_DEVICE_PRIMARY_DEVICE in this function

Also mark VgaSave driver as SystemStart instead of Disabled,
so it is available if main display driver doesn't work.
2025-05-12 18:24:55 +02:00
Hervé Poussineau
9b70d4380c [FREELDR] Allow empty RDPATH parameter
In that case, read the whole partition/disk, instead of the selected file.

CORE-14603
2025-04-27 23:49:21 +02:00
Whindmar Saksit
5a10ec60be
[EXPLORER][BROWSEUI][SHLWAPI][BOOTDATA][WIN32K] Support AppKeys and more WM_APPCOMMANDs (#7879)
Implements a couple of extra commands in IShellBrowser and adds support for the AppKeys fallback registry key (used when the foreground application does not handle the command).
2025-04-18 18:35:30 +02:00
Hermès Bélusca-Maïto
a3899d8151
[FREELDR:PC98] Don't do the HighRes check everytime a character is written with writechr (#4359)
And bring similar simplifications to the PC98 FAT12 bootsector.

Co-authored-by: Dmitry Borisov <di.sean@protonmail.com>
2025-04-08 15:50:43 +02:00
Adam Słaboń
d66ad21ee0
[FREELDR][INSTALL] Update the FreeLoader installation message (#7853)
Update the installfreeldr message in accordance with the changes in 3d516e71d3.
2025-04-02 00:06:12 +03:00
Justin Miller
177cbd81af Revert "[FREELDR] Pass the correct ACPI table for Windows (#7486)"
Sorry this is something I had to do, I should have investigated deeper
before approving it and that's on me so ill take this over and get this
done. and credit you once again. Thank you @ILauncherDev
This reverts commit 185225a5fc.
2025-03-28 07:20:45 +01:00
Daniel Victor
185225a5fc
[FREELDR] Pass the correct ACPI table for Windows (#7486)
JIRA issue: CORE-11954 and CORE-18969

This PR passes the real ACPI table instead of a hardcoded (PVOID)1.
2025-03-24 21:49:39 +01:00
Serge Gautherie
9ecd5fb6fe
[FREELDR] DisplayBootTimeOptions(): Simplify concatenation checks (#4058) 2025-03-24 20:14:04 +01:00
Dmitry Borisov
5fb6fad175
[FREELDR] iso.c: Remember the last directory that was accessed (#7734)
This patch reduces the number of sectors read by 709 (from 8788 to 8079)
2025-03-21 22:17:29 +01:00
Dmitry Borisov
564be44f45
[FREELDR] iso.c: Remove a redundant zero initialization of the FileName buffer (#7734)
The FileName buffer is NUL-terminated later on.
2025-03-21 22:17:11 +01:00
Dmitry Borisov
b931c51937
[FREELDR] iso.c: Avoid unnecessary zero-init and copy of the file info structure (#7734)
FileHandle gets initialized completely in IsoSearchDirectoryBufferForFile()

- Also mark some functions as static.
2025-03-21 22:15:54 +01:00
Dmitry Borisov
61ee431169
[FREELDR] iso.c: Cache the PVD information for ISO volumes (#7734)
This patch reduces the number of sectors read by 41 (from 8829 to 8788)
2025-03-21 22:15:43 +01:00
Katayama Hirofumi MZ
2ffc6d281b
[BOOTDATA] Follow-up of #7795; Modify NLS registry (#7799)
Follow-up of #7795. This affects
boot condition of es-CR, rm-CH,
ur-PK, fa-IR, vi-VN, ka-GE, bn-IN
and my-MM users.
EDIT: These languages are not
supported in
base/setup/usetup/
muilanguages.h yet.

JIRA issue: CORE-19496

Modify boot/bootdata/hivesys.inf t
o change the values of
HKEY_LOCAL_MACHINE\SYSTEM\
CurrentControlSet\Control\Nls\
Language and HKEY_LOCAL_MACHINE\SYSTEM\
CurrentControlSet\Control\Nls\
Locale registry keys.
2025-03-22 06:01:56 +09:00
Katayama Hirofumi MZ
4bc97ad145
[BOOTDATA] Arabic, Hong Kong, Singapore, come back! (#7795)
JIRA issue: CORE-19496
Modify boot/bootdata/hivesys.inf to change
the values of registry key HKEY_LOCAL_MACHINE\
SYSTEM\CurrentControlSet\Control\Nls\Locale.
2025-03-19 09:40:38 +09:00
Daniel Victor
19c1f5661f
[BOOTSECT][FREELDR] Fix wrong comment of conditional jump on ext.S and extldr.S (#7798) 2025-03-18 23:52:56 +01:00
Hermès Bélusca-Maïto
2e47094764
[SYSSETUP] Apply theming from unattend files very early on when booting the LiveCD or a new install (#7797)
Use a `[Shell]` section with `DefaultThemesOff` and `CustomDefaultThemeFile`
values, specifying respectively whether to use the classic theme or a
custom one, and the complete path to the custom .theme (or .msstyles) file.

These values are compatible with those documented in the
"MS Windows Preinstallation Reference" help file
of the Windows installation CD (DEPLOY.CAB\ref.chm)

[BOOTDATA] bootcd/unattend.inf: Use the Shell/CustomDefaultThemeFile value to specify which theme to use
2025-03-18 23:02:34 +01:00
Dmitry Borisov
787f81f3f5
[FREELDR] Refactor and optimize the IDE driver (#7728)
[DDK] Update IDENTIFY data and other ATA definitions.
Based on the MinGW header.

[FREELDR] Refactor and optimize the IDE driver.
Fix long-standing bugs, which have a negative impact on the boot stability.

- Make the driver more ATA specification compliant.
- Improve the speed of device detection.
- Remove inconsistent delays.
- Support modern hard drives with sector size greater than 512 bytes.
- Add basic error recovery.
- Move private definitions to a separate private header.
- Remove the useless AtaFree API method.
2025-03-18 21:56:25 +01:00
Daniel Victor
ddf55b3772
[BOOTSECT][FREELDR] Rewrite the Ext bootsector (#7544)
Rewrite the Ext bootsector because the older one was broken and had no compatibility with Ext4 extents.
Introduce a 3rd-stage bootsector for complex code.

CORE-14235

- Why was the previous bootsector broken?
  Because of hardcoded inode size, hardcoded freeldr base address, etc.

- Why is there a extldr.sys?
  The extldr.sys was introduced because the limited code space in the bootsector
  prevents adding new features, such as Ext4 full extents support.

- What is extldr.sys and What does it do?
  It is the helper file for the Ext bootsector and that is necessary for adding
  Ext4 support. It locates the freeldr.sys file, loads it into memory and runs it.
2025-03-18 21:53:47 +01:00
Timo Kreuzer
9a093ecbe9 [FREELDR] Fix menu display on VMware
When drawing the menu, the boot options should not be overwritten, but when clearing the screen, everything needs to be drawn, otherwise there will be uninitialized characters at the bottom. See CORE-20014.
2025-03-18 00:36:40 +02: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
Daniel Victor
afb96acfdd [FREELDR] Use the OFF(x) macro on realmode assembly files 2025-03-02 19:09:46 +01:00
Eric Kohl
da5192e622 [BOOTDATA][NETSHELL][INF] Improvements to the network setup
- Fix the network setup wizard start page.
- Add the ndisuio driver to the network setup.
- Remove the tcpip driver from the system setup.
2025-03-02 15:07:36 +01:00
Daniel Victor
56c8c8ab4f [FREELDR] Add Extents support 2025-02-20 19:28:41 +02:00
Daniel Victor
a980ad08b4 [FREELDR] Rewrite the header and reformat/adapt current code 2025-02-20 19:28:41 +02:00
Daniel Victor
1f3083be75 [FREELDR] Rename almost everything to Ext 2025-02-20 19:28:41 +02:00
Daniel Victor
d0dfb6cf6f [FREELDR] Rename the ext2.* to ext.* 2025-02-20 19:28:41 +02:00
Timo Kreuzer
a1a169fbe8 [FREELDR] Fix pc98 build 2025-02-04 16:45:48 +02:00
Timo Kreuzer
2b71c738b8 [ROSLOAD] Enable registry healing code for x64 2025-02-04 16:45:48 +02:00
Timo Kreuzer
e56911f66b [FREELDR] Implement loading of rosload as 2nd stage loader 2025-02-04 16:45:48 +02:00
Timo Kreuzer
adacd51a30 [FREELDR] Use StallExecutionProcessor instead of KeStallExecutionProcessor
The latter will only be available in rosload.exe.
2025-02-04 16:45:48 +02:00
Timo Kreuzer
17cf47df44 [ROSLOAD] Add rosload.exe target as 2nd stage loader 2025-02-04 16:45:48 +02:00
Timo Kreuzer
ebcf3f23aa [FREELDR] Remove ShowBootOptions from Menu code
This removes a dependency of UI code to boot options code by getting rid of a call to DisplayBootTimeOptions() from within the menu code.
Instead this is now handled by MainBootMenuKeyPressFilter.
2025-02-04 16:45:48 +02:00
Timo Kreuzer
9daef292e9 [FREELDR] Move MachInitializeBootDevices to BootMain 2025-02-04 16:45:48 +02:00
Timo Kreuzer
f81c1910ee [FREELDR] Export functions for a 2nd stage loader 2025-02-04 16:45:48 +02:00
Timo Kreuzer
2f9dde09e1 [FREELDR] Replace some macros/inline functions and global variables with functions
This allows to easily import them from a 2nd stage loader without having to bother about _declspec(dllimport)
2025-02-04 16:45:48 +02:00
Katayama Hirofumi MZ
fe11f7a2e5
[REACTOS] Refresh old URLs (#7632)
URLs are getting old. We have to
update URLs for documentation
purpose.
JIRA issue: CORE-19963
- Refresh old URLs.
- Add " (DEAD_LINK)" labels
  to dead links.
- Use MS Learn links rather
  than MSDN ones.
- Some dead links revived by
  Web Archive.
- Don't change Wine Tests
  and Wine Sync.
- Don't change 3rd party libraries.
- Don't append "redirected" labels.
2025-01-28 13:36:45 +09:00
Daniel Victor
d72864de95 [FREELDR] Fix wrong segment register at lgdt instruction in amd64.S 2025-01-20 08:34:44 +02:00
Hermès Bélusca-Maïto
ba342e1d14
[FREELDR] peloader.c: Minor code enhancements.
PeLdrCheckForLoadedDll():
- Use a for-loop to iterate over the linked list.
- Adjust few comments.
- Use SAL2 annotations.

PeLdrpCompareDllName():
- Make its input paramters const.
- Use SAL2 annotations.
2024-12-14 23:31:41 +01:00
Daniel Victor
34e76ade03 [FREELDR] Make it more compatible with w2k3 ini file 2024-12-11 07:18:34 +02:00
Thamatip Chitpong
4d9f67c79b [REACTOS] Rename ReactOS_LogOn.wav to ReactOS_Startup.wav
CORE-13951
2024-12-09 09:52:57 +07:00
Andrei Miloiu
6ec5f8841b
[FDEBUG] Update Romanian (ro-RO) translation (#7340) 2024-12-06 20:48:33 +01:00
Hermès Bélusca-Maïto
dfb43905bb
[FREELDR] peloader.c: Fix PE import binding (#7537)
Use the PE import table's OriginalFirstThunk array when scanning and
resolving imports during DLL binding.

It points to an array of pointer-sized IMAGE_THUNK_DATA structures
which describe the functions being imported. On the other hand, the
FirstThunk points to an array of pointers, whose initial values are
a copy of those pointed to by OriginalFirstThunk, but are replaced
by the actual function pointers determined at runtime, when a DLL
is loaded (see PeLdrpBindImportName() function).
If we were to use the FirstThunk array to find again later the imports
by name or ordinal, we would fail because these are replaced by the
addresses of the corresponding functions.

This fixes loading kdcom.dll from Windows XP x64 with FreeLDR when
testing on ReactOS x64.

```diff
 (freeldr\freeldr\lib\peloader.c:498) trace: PeLdrpScanImportAddressTable() ---- Calling PeLdrpBindImportName() in a loop
 (freeldr\freeldr\lib\peloader.c:501) trace: *** ThunkName->u1.AddressOfData = 00000000000070F0
 (freeldr\freeldr\lib\peloader.c:502) trace: *** ThunkData->u1.AddressOfData = 0000000000573780
 (freeldr\freeldr\lib\peloader.c:209) trace:   !!! ExportDirectory->NumberOfNames 1504
-(freeldr\freeldr\lib\peloader.c:210) trace:   !!! ImportHint 0 - ExportName 'CcCanIWrite' - ImportDataName ''
+(freeldr\freeldr\lib\peloader.c:210) trace:   !!! ImportHint 282 - ExportName 'HalPrivateDispatchTable' - ImportDataName 'HalPrivateDispatchTable'
 ....
-(freeldr\freeldr\lib\peloader.c:268) err: Did not find export ''!
-(freeldr\freeldr\lib\peloader.c:709) err: PeLdrpScanImportAddressTable() failed: ImportName = 'ntoskrnl.exe', DirectoryPath = 'multi(0)disk(0)rdisk(0)partition(2)\ReactOS\system32\'
```
('-': lines before the fix; '+': lines after the fix)

Code has been adapted based from the following functions:
ntdll/ldr/ldrpe.c!LdrpSnapThunk() and LdrpSnapIAT()
ntoskrnl/mm/ARM3/sysldr.c!MiSnapThunk() and MiResolveImageReferences()

References:
https://devblogs.microsoft.com/oldnewthing/20231129-00/?p=109077
https://devblogs.microsoft.com/oldnewthing/20231130-00/?p=109084
https://stackoverflow.com/questions/42413937/why-pe-need-original-first-thunkoft
2024-12-03 13:13:38 +01:00
Hermès Bélusca-Maïto
576fafbaf8
[FREELDR] peloader.c: Add SAL2 annotations for two import-resolving helpers (#7537)
Add annotations for PeLdrpBindImportName()
and PeLdrpScanImportAddressTable().
2024-12-03 13:13:26 +01:00
Hermès Bélusca-Maïto
ddd59f19ae
[FREELDR] peloader.c: Fix some traces 2024-12-03 12:32:08 +01:00
Václav Zouzalík
531c94a0c7
[THEMEUI][INF] Update German (de-DE) translation (#7489) 2024-11-18 21:24:57 +01:00