Commit graph

112 commits

Author SHA1 Message Date
Victor Perevertkin 12542f271d
[FREELDR] Fix Release build 2019-06-26 00:56:21 +03:00
Yaroslav Kibysh f37fb1f7f8
[FREELDR] Always change video mode back to text-mode before starting up ReactOS.
CORE-16116

- This allows getting the /NOGUIBOOT mode working correctly, as the latter
  expects text-mode. Then, usetup (via BLUE driver) will change to a
  different text-mode, or, GUI boot will change (via BOOTVID) to VGA
  640*480 16-color.

- Always hide the VGA cursor.

- Remove also the deprecated boolean "Setup" in the *PrepareForReactOS()
  functions.

Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
2019-06-25 02:32:09 +02:00
Hermès Bélusca-Maïto 2e1f594d5e
[FREELDR] Add some missing UiDrawBackdrop() calls. 2019-04-22 19:33:20 +02:00
Timo Kreuzer f9a967b2ae [REACTOS] Fix misc 64 bit issues 2019-04-13 14:07:50 +02:00
Jérôme Gardou 157a509a0f [CMAKE] Also set blank DEFINE_SYMBOL property for freeldr helpers 2019-04-06 17:43:38 +02:00
Adam Słaboń 7047aa80ef [TRANSLATION] Polish translation update
Polish translation update for calc, fltmc, magnify, notepad, osk, sndvol32, usetup, fdebug, appwiz, mmsys, sysdm, acppage, ziplfdr, browseui, cryptui, jscript, shell32, themeui and inf. Added translation for cyrptext, vcdcontroltool, and (not yet complete) getuname.
2019-04-05 10:34:10 +02:00
Hervé Poussineau a15160cd45 [FREELDR] Prevent a warning in Xbox memory initialization 2019-04-01 11:38:32 +02:00
Michael Fritscher 4928e800a6 [FREELDR] PXE: Fix network packet size
1024 bytes should fit into a single network packet. CORE-15706
2019-02-19 16:04:20 +01:00
Hermès Bélusca-Maïto 7d0cd6e937
[FREELDR][SDK:CMAKE] Move the `MSVC "linker script" file' functionality out of FreeLdr's cmake file and place it in the dedicated files instead. 2019-02-10 00:43:31 +01:00
Oleksandr Shaposhnikov a5c5ba17e5 [FREELDR] Fix VSSolution configuring and build
"configure.cmd VSSolution" was failing due to add_asm_files macro
 expansion. It was using the same 'freeldr_linker_file' variable name
 as a temporary filename base twice. This patch uses '_target'
 parameter to make those variable names differ.
2019-02-10 00:25:04 +01:00
Andrew Cook d8e92b5a0a Merge pull request #1335 from ariscop/CMP0065
Fixes for upstream cmake
2019-02-03 12:57:20 +01:00
Hermès Bélusca-Maïto 8077da05e0
[FREELDR] Remove unneeded ASSUME line. 2019-01-31 23:51:00 +01:00
Mark Jansen 71e13274ee [FREELDR] Fix msvc boot (#1329)
CORE-15700
2019-01-31 23:42:20 +01:00
Hermès Bélusca-Maïto 6b1e1df5c9
[FREELDR] Re-integrate the ASM files (and corresponding C code) in MSVC builds, that were previously compiled just for GCC builds. (#1224)
- Multiboot support added back in FreeLdr MSVC builds so that it can be
  booted using e.g. GRUB. See CORE-15563.

- Re-introduce the disk drive mapper code.
2019-01-27 00:51:26 +01:00
Hermès Bélusca-Maïto ed83552229
[FREELDR] Introduce a MSVC "linker script" file that centralizes the commands for defining section-limit symbols, and the ordering and merging of PE sections, and the necessary CMake code to use it. (#1224)
As the MSVC linker alone doesn't permit such control, the file uses
ASM language (C can alternatively be used), together with extra linker
command-line switches.

It is pre-processed 3 times: first for generating the ASM code, second
for the C code and the third time for generating the linker response
file.

In our case, the ASM code defines the __bss_start__ and __bss_end__
symbols that allow us to find the limits of the .bss section (which is
by the way automatically appended to the .data section by the MSVC linker).
The C code is used to specify the list of linker switches that can be
passed through the `#pragma comment(linker, ...)' directive (the can be
alternatively specified in the linker response section).
Finally the linker response section contains all the linker switches
that cannot be specified with the `#pragma comment(linker, ...)'
directive.

Using all this we can recycle the BSS initialization code, that has been
written originally for GCC only, also for the MSVC builds.

Also, remove the outdated .text16 section merging.
2019-01-27 00:51:25 +01:00
Hermès Bélusca-Maïto aaee856cea
[FREELDR] Minor code maintenance.
- Whitespace;

- Explicitly use string pooling (option "/GF"), so that even if it's
  used globally in the main ReactOS CMAKE file or not, we still have it
  there, because we are quite size-constrained;

- Rename the source lists (OK, we understand it's _COMMON_ ...);
- Remove redundant double inclusion of linuxboot.c;
- In the 'freeldr_common' static library, compile the ASM code first.
2019-01-27 00:51:19 +01:00
Hermès Bélusca-Maïto d272866550
[FREELDR] Minor code formatting; constify some non-mutable data. 2019-01-06 18:42:01 +01:00
Luo Yufan 95564d5e30 [TRANSLATION] Update Chinese translation. (#1223)
[CLIPBRD][SOLITAIRE][RAPPS][REGEDIT][WINHLP32][WORDPAD][FDEBUG][SYSDM][BROWSEUI][DEVMGR][IEFRAME][OLEDLG][SHELL32][SYSSETUP][INF][WINFILE][NTVDM][USER32]
2019-01-07 00:35:11 +09:00
Hermès Bélusca-Maïto 5053f1f571
[FREELDR] Simplify code by using a AddReactOSArcDiskInfo() helper, and few extra additions.
- Introduce the AddReactOSArcDiskInfo() helper to get rid of the
  duplicated reactos_arc_disk_info usage scattered amongst different
  files.

- GetHarddiskInformation(): If we cannot read the disk that has been
  enumerated by the BIOS, return a default identifier string.

- GetHarddiskInformation(): The last character of the disk identifier
  string corresponds to whether its MBR is "valid"/has the 0xAA55
  signature (use 'A') or whether it's not (use 'X'). Tested on Windows.

- Split PcInitializeBootDevices() in two: the first part of this
  function that enumerates hard disks from the BIOS is now moved into
  EnumerateHarddisks().

- The 'ValidPartitionTable' field of the ARC disk signature records must
  be initialized with correct value that is specified in the different
  AddReactOSArcDiskInfo() calls.
2019-01-05 19:39:32 +01:00
David Quintana 01e5cb0c04
Resource file strings cleanup (#581)
[CMDUTILS/AT] Fix missing translation strings in certain files.
[NOTEPAD] Fix SUBLANG code to brazillian.
[RAPPS] Fix missing translation strings in certain files.
[FDEBUG] Fix translation string ID.
[CPL/INPUT] Fix missing translation strings in certain files.
[ACPPAGE] Fix incorrect resource IDs.
[NETSHELL] Fix incorrect resource IDs.
[DEVMGR] Fix missing translation strings in certain files.
[LSASRV] Fix missing translation strings in certain files.
[RASDLG] Fix missing translation strings in certain files.
[SHELL32] Fix missing translation strings and incorrect resource IDs.
[TAPIUI] Fix missing translation strings in certain files.
[WINFILE] Fix incorrect resource IDs.
[NTVDM] Fix missing translation strings in certain files.
[USERSRV] Fix missing translation strings in certain files.
[BROWSEUI] One more missing string.
[FLTMC] Fix missing translation strings in certain files.

Detected using the TransDiffer tool (early alpha).
This doesn't include everything anymore, but I wanted to get the PR out of the way.
2019-01-05 15:44:16 +01:00
Timo Kreuzer cfd1647914
[REACTOS] Fix misc 64 bit issues (#783)
* [WIN32K] Fix handle calculation in DbgGdiHTIntegrityCheck
* [NOTEPAD] Fix MSVC warnings
* [PSDK] Simplify *PROC definitions in windef.h
* [VIDEOPRT] Don't try to use NtVdmControl on x64
* [FREELDR] Fix some macros
* [CRT] Make qsort 64 bit compatible
* [NTOS] Use #ifndef _WIN64 instead of #ifdef _M_IX86 around C_ASSERTs
* [FAST486] Fix 64 bit warnings and change DWORD to ULONG, so it can be used in kernel mode
* [APPHELP_APITEST] Fix 64 bit issue
2019-01-05 10:50:11 +01:00
Hermès Bélusca-Maïto 6d5a7b1ce3
[FREELDR] Explicitly call RamDiskInitialize() in RamDiskLoadVirtualFile(). 2018-12-30 15:26:44 +01: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
Hermès Bélusca-Maïto dd11f4c34b
[FREELDR] Add FreeLdr debug tool GUI program, and FreeLdr command-line installer to the bootcd. 2018-12-10 00:27:58 +01:00
Luo Yufan 39a478d17b [TRANSLATION] Update Simplified Chinese translation. (#1096) 2018-12-05 16:50:05 +01:00
Hermès Bélusca-Maïto f8d3f9de29
[FREELDR] Check for any user keypress in menu even when the timeout is zero.
Before taking any default action if there is no timeout, check whether
the supplied key filter callback function may handle a specific user
keypress. If it does, the menu timeout is cancelled.

This allows e.g. handling F8 press for displaying boot options even when
the timeout is zero.

CORE-14046
2018-11-25 17:09:19 +01:00
Luo Yufan a2819679ec [TRANSLATION] Update Simplified Chinese translation. (#1057) 2018-11-23 16:24:47 +01:00
Ercan Ersoy 89090b1618 [FDEBUG][OSK][WINHLP32] Turkish translations update. (#1022) 2018-11-08 18:52:56 +01:00
Hermès Bélusca-Maïto c34fc6329f
[FREELDR] Silence a debug print. 2018-10-28 18:17:33 +01:00
Hermès Bélusca-Maïto 0b2b53b9c3
[FREELDR] Adjust WinLdrInitSystemHive() and its callers to load at startup either the regular SYSTEM hive, or the SETUPREG.HIV setup system hive.
We now run the 1st-stage setup with a regular system hive, similarly to
what's done for the LiveCD, or for a regular ROS installation.
The ExpInTextModeSetup hacks I previously removed are now completely unneeded.

svn path=/branches/setup_improvements/; revision=74762
2018-10-25 00:40:05 +02:00
Hermès Bélusca-Maïto 5e705d0683
[FREELDR] Small code re-organization for the "ntldr" sub-module.
Split the "main" winldr.h header into the one containing global code
that actually doesn't really depend on the "windows" NT loader part,
and one that actually concerns code just for the NT Loader.
The latter goes into "ntldr".

svn path=/branches/setup_improvements/; revision=74743
2018-10-25 00:40:04 +02:00
Extravert-ir d0e29db1cb [FREELDR] Fix MSVC warnings C4146 (#863) 2018-09-16 16:14:07 +02:00
Katayama Hirofumi MZ 31019e8c0c [TRANSLATION] Update Romanian translation (#851)
Translation from Stefan Fulea.
CORE-15023
2018-09-14 11:04:36 +02:00
Victor Perevertkin 3b69eee7a6 [FREELDR][BTRFS] Implemented BTRFS support in Free Loader. Now it supports case-insensitive path lookup, symlink folowing and reading uncompressed files.
Volume boot record is also implemented, it supports reading BTRFS tree structures with upto 64k node size.
This support required to change all path in Free Loader to lowercase for better performance.
CORE-13769
2018-08-20 08:26:56 +02:00
Timo Kreuzer 81a9ce44e9
[FREELDR] Don't insert a driver into the BootDriver list twice (#755)
This happened for the livecd, where the cdfs driver was inserted twice - once since it is the driver for the boot device, and the 2nd time, because it was specified in the registry - which was then initialized twice by the kernel, leading to a name conflict when trying to create another device object, which resulted in the newly created device object to be dereferenced again and the driver unloaded. This can be seen from the debug message "(ntoskrnl\mm\ARM3\sysldr.c:955) Leaking driver: cdfs.sys"
2018-08-18 16:41:30 +02:00
Timo Kreuzer 6da93539a9
[FREELDR] Fix calculation of page lookup table (#761)
On x64 we only map 1GB of pages, so adjust MM_MAX_PAGE accordingly and also respect that value when searching for the best location of the page lookup table.
CORE-11048 #resolve
2018-08-18 12:16:33 +02:00
Serge Gautherie 7d6bda16c6
[REACTOS] Improve how some ASSERTMSG() message values are printed: enforce ending "\n".
NB: Not touching calls in "third-party" code: class and classpnp.
2018-08-08 22:03:45 +02:00
Serge Gautherie 97d3b3ce33
[REACTOS] RtlAssert(): use "%lu" as LineNumber format. 2018-08-08 21:24:07 +02:00
Timo Kreuzer 6dcf3c29e0 [FREELDR] Fix 64 bit issues 2018-08-04 19:19:34 +02:00
Victor Perevertkin 2ae1675208 [ASM] Fixed ".double" macro in asm.inc.
GAS uses ".double" symbol for declaring floating-point constants and
".quad" symbol for declaring 64-bit numbers.
This is not compatible with our macro for MASM and introduces bugs.
Now 64-bit constants are supposed to be declared using ".quad" macro.
2018-07-15 23:25:23 +02:00
Serge Gautherie c1d0d409e7 [FREELDR] PcMemGetBiosMemoryMap(): Add a default handling of entry with "EA.ErrorLog = 1". CORE-14150
This FIXME is meant as a reminder/help to actually use this data.
2018-07-01 12:03:50 +02:00
Serge Gautherie a0313c750f [FREELDR] pcmem.c: Improve output strings. No functional changes. CORE-13332
- Plus: Add missing email address in 74f92c3d86.
- Remove superfluous blank lines.
- Add 2 TRACE("FunctionName()\n").
- Use "0x%llx", not "%lu", for BaseAddress and Length. (Copypasta in my recent commits.)
- Add "0x" to 1 "%p" and 1 "%lx".
2018-07-01 12:03:50 +02:00
Thomas Faber f6dea8b734
[CMAKE] Avoid some uses of the LOCATION target property. CORE-14509 2018-03-30 20:28:20 +02:00
Thomas Faber 76c2045434
[FREELDR] Reduce the timeout during serial mouse detection. CORE-14280 2018-02-05 11:49:12 +01:00
Thomas Faber 4d811a2f97
[FREELDR] Remove unnecessary checks. CORE-14280 2018-02-05 11:49:10 +01:00
Thomas Faber 79ea0ae09e
[FREELDR] Display an additional status message for hardware detection. CORE-14280 2018-02-05 11:49:07 +01:00
Serge Gautherie 50afbd48d4 [FREELDR] FreeLdr debug.h does not care about NDEBUG. (#201)
- Remove all "#define NDEBUG".
2018-01-26 23:34:21 +00:00
Serge Gautherie b5a7765068 [FREELDR] i386vid.c: Downgrade/Improve 3 false ERR() to WARN(). CORE-13496
Silence harmless errors, which can be reported at every boot.
2018-01-26 23:11:52 +02:00
Erdem Ersoy ba3f074320 [TRANSLATIONS] Update the email address and add a note in the Turkish translation document (#271) 2018-01-07 22:09:42 +01:00
Katayama Hirofumi MZ e9d8fa57c3
[TRANSLATION][BASE][FDEBUG][MODULES][WIN32SS] Use correct font name in Chinese resources, CORE-9566 (#227).
Localized resources should use the correct Traditional/Simplified Chinese fonts
that are most suitable for UI and compatible with Windows.
2017-12-29 01:51:06 +01:00
Serge Gautherie 74f92c3d86 CORE-13332. PcMemGetBiosMemoryMap(): Update ACPI (Extended Attributes) support. (#143)
[FREELDR] Update ACPI (Extended Attributes) support in PcMemGetBiosMemoryMap()
CORE-13332

* PcMemGetBiosMemoryMap(): Add Extended Attributes set and check for entry validity and default handling of unexpected case. 

* pcbios.h: Rename superceded BIOS_MEMORY_MAP.Reserved. Adapt existing code to new ACPI 6.2-A definitions.

* pcbios.h: Update BIOS_MEMORY_TYPE and BIOS_MEMORY_MAP to ACPI 6.2-A from 1.0+.

* PcMemGetBiosMemoryMap(): Misc fixes, no functional changes.
*Create PcMemCheckUsableMemorySize(), to split unrelated code out.
*Fix a copypasta in 2 output strings from ba9a1c3abb.
*Improve output readability of TRACE("ECX ...", ...).
*Move a TRACE("\n").
*Improve code style a bit.
2017-12-27 11:09:20 +01:00
Amine Khaldi 9397f280c3 [FREELDR] The work done in r70692 overlooked the need to update the PCH lists of source files as well.
- We use this as a chance to also update the CMake file in terms of consistency.
- The clang-cl build applies the /Os flag on all the source files that are now using the PCH too.
2017-12-09 14:18:43 +01:00
Amine Khaldi 09c06a2f45 [CLANG-CL] Initial commit that allows us to compile ReactOS with clang-cl. 2017-11-23 14:09:57 +01:00
Serge Gautherie 1456310503
[FREELDR] PcMemGetBiosMemoryMap(): Add checks for entry sizes and bare handling of error case. CORE-13332 2017-11-18 21:54:14 +01:00
Serge Gautherie ba9a1c3abb
[FREELDR] Additional safety checks for PcMemGetBiosMemoryMap. CORE-13332
Cast MAX_BIOS_DESCRIPTORS to explicit ULONG from implicit int.
Comment/Add checks for PcMemoryMap/PcBiosMemoryMap arrays being full and bare handling of error cases.
2017-11-03 14:38:57 +01:00
Thomas Faber fe3eb29287
[REACTOS][FDEBUG] Remove unnecessary DLGPROC casts. 2017-11-03 13:57:46 +01:00
Serge Gautherie 9b1e056e8f [FREELDR] Discard empty entries in PcMemGetBiosMemoryMap. CORE-13332
Improve a TRACE() from f588de2e79.
2017-10-11 13:20:15 +02:00
Colin Finck 950c86fb4c Fix remaining text file line endings in the tree. (#18)
Based on https://stackoverflow.com/a/1511273

Also enforce CRLF for all *.xml files in our tree, because they are distributed with ReactOS.
2017-10-06 15:00:36 +02:00
Serge Gautherie 55ae20931f [FREELDR] Properly check for end-of-memory-map entries when skipping ranges smaller than page size.
CORE-12881

Signed-off-by: Timo Kreuzer <timo.kreuzer@reactos.org>
2017-10-05 19:19:42 +02:00
Serge Gautherie 274ace05b2 [FREELDR] Add 64 bit alignment macros (ULONGLONG_ALIGN_UP/DOWN_BY) for aligning physical addresses that can be larger than 4GB and the default macros truncate to ULONG_PTR.
CORE-12881

Signed-off-by: Timo Kreuzer <timo.kreuzer@reactos.org>
2017-10-05 19:19:42 +02:00
Serge Gautherie f588de2e79 [FREELDR] Improve trace prints in pcmem.c, no logical changes
CORE-12881

Signed-off-by: Timo Kreuzer <timo.kreuzer@reactos.org>
2017-10-05 19:19:42 +02: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