"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.
- 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.
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.
- 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.
- 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.
[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.
* [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
* 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
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
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
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
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
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"
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
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.
- 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".
[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.
- 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.