We can already restart reading the whole file if seeking backward,
and there is currently no more use case of backward seek.
By doing so, we gain 1MB of memory when using PXE.
We need the CDDB during the setup, so don't delete it for now.
The "proper" way for filling it is yet to be decided, Windows does that
from the data in txtsetup.sif file. Our final approach may be different
The version string cutoff started to happen when we switched from SVN
with its short revision number to git with the longer hashes.
0.4.7-dev-502-gc2c66af was the first git-only rev (2017-Oct-03)
This brings the dialogs layout closer to XP.
Also fixes some other truncations for specific languages.
And unifies the touched text controls sizes for all languages.
The credits have been moved to readme.txt where they are more present and
we can avoid having to groom all languages files each time we want to add
a new dev (and sysdm.cpl to grow each time). Less maintenance.
0.4.15-dev-1629-g9aa73da gcc 8.4.0 dbg RosBE2.2.1 I18N=all binary size
sysdm.cpl before: 925.696bytes after: 705.024bytes
readme.txt still fits into a single NTFS cluster afterwards with 3702bytes
- Use PnP storage class drivers
- Make partmgr an upper filter driver for Disk class
- Fill upper filters in txtsetup and usetup/devinst
- Add cdrom driver to the critical device database
CORE-6264
This gets "ReactOS" with Win2003 NT kernel + HAL boot a bit further.
(The "SystemPrefix" REG_DWORD value is part of license information in Win2000/XP/2003.)
at runtime from the boot selection menu or from FREELDR.INI.
CORE-17350, CORE-9023
For a proper override of the options by new user options, specify the
/SIFOPTIONSOVERRIDE switch in addition. Otherwise, user options are
merged with those retrieved from TXTSETUP.SIF, with priority given to
the former ones.
- Update the documentation for the 'ReactOSSetup' OS type in the
FREELDR.INI file template.
- Use a different prompt in the custom boot options editor for the
'ReactOSSetup' OS type, with adequate explanation.
- Get rid of the ReactOS-specific TXTSETUP.SIF 'DbgOsLoadOptions' value,
and use instead the Windows-compatible 'SetupDebugOptions' value that
is added to the other load options when debugging is to be enabled.
- Introduce a set of NtLdrGet(Next)Option(Ex) helpers that allow
retrieving respectively, the "next" option in an options string,
and retrieving a given named option in such an options string,
by correctly parsing that string.
Valid syntaxes:
/OPTION1 /OPTION2/OPTION3 OPTION4 /OPTION5(=...) ...
Options separators are slashes, or whitespace (space, tab), mandatory
if no slash is used, and otherwise optional.
- Use these functions wherever NT load options are being parsed.
- Simplify the parsing of /DEBUGPORT=... using these functions.
- When parsing the /HAL=... or /KERNEL=... options, only the first
encountered one is taken into account, any other ones are discarded.
- When parsing the other load options, only their first occurrences are
taken into account, any other repetitions are discarded.
* The NOPAE option overrides any previous PAE option.
* Any NOEXECUTE(=) option should override any previous
NOEXECUTE=ALWAYSOFF (or equivalently, EXECUTE) option.
This parameter is not needed since it's possible to determine, from
within this function, whether or not we are in Setup mode, by just
looking for the presence of a non NULL LoaderBlock->SetupLdrBlock.
Instead of messing around with a file in the source tree and risk commiting it
use cmake -DUNATTENDED_BOOTCD=yes to enable it, and use the UNATTENDED_BOOTCD_* cache variables to configure
CORE-17336
- Move Novosibirsk to GMT+07:00 (was GMT+06:00 previously).
- Move Magadan to GMT+11:00 (was GMT+10:00 previously).
- Add Omsk time zone GMT+06:00
- Add Tomsk time zone GMT+07:00
This font has been added in 383ea7d and then disabled from builds in 4cd2a93 due to regressions it was causing.
Also disable it in registry to not break NTLDR boot again.
It adds basic input support for:
- Standard Bus Mouse
- Standard InPort Mouse
- Logitech Bus Mouse
- Microsoft Bus Mouse
- Microsoft InPort Mouse
- NEC PC-98 Bus Mouse
Untested on PC/AT, but should work.
Converted from the XFree vga.bdf font.
This is needed for Vista+ x64 Winload. ReactOS x64 now boots with Vista x64 Winload out of the box (like Windows Server 2003 x64).
Tested with winload.exe from Vista x64 RTM (6.0.6000.16386) and winload.efi from Server 2008 x64 Beta 3 (6.0.6001.16497).
By sledge-hammer-reverting of
0.4.15-dev-689-g
7ffb6a09c3
and 0.4.15-dev-688-g
1234223f41
Sorry, but the negative impact for other devs and the
whole project are just unbearable.
Stuff got committed meanwhile even so I had to act.
The improvements may be reapplied later when the
negative consequences are under control.
Get rid of global properties and use a target-level properties instead
Limit temporary files by using cmake-generator expressions instead
Avoid function calls at the end configuration, use file(GENERATE) idiom instead
At line 263 a 'pop es' is missing before 'ret' in ReadCHS() function,
just like in the ReadLBA() function. CORE-17178
Co-authored-by: Dmitry Borisov <di.sean@protonmail.com>
- Make "ReactOS Server" the default product option again instead of "ReactOS Workstation".
- Write "Service Pack" info onto registry.
- Add ProductOption option to bootcd unattend.inf.
- Delete IDC_PRODUCT_SUITE and IDC_PRODUCT_TYPE controls.
CORE-17028
Also turn off debug messages to screen before setting up the CPU (To print a character to the screen on some ports the MMIO access should be executed, so it throws an exception).
CORE-16216
This prevents ReactOS asserting when 'My computer'
is opened, while it tries to send commands to floppy drive.
Many thanks to patches author Doug Lyons.
The regression was introduced by 0.4.13-dev-1081-g
eeff926ede
patch was committed to 0.4.13rls and 0.4.14rls as well.
Today it was committed to master as well, as
the initially planned investigation for the root cause
did still not happen and we can not afford the time
to retest and workaround this over and over again.
Thank god that Oleg Dubinskiy was still around to retest
this again and confirmed it can still happen, because
unlike initially, personally I was not able to reproduce it
today anymore!
Since every release was work-arounded, we did never
expose the bug in any final release.
According to PC-9801 Bible p. 50, divisor for PIT will become unsupported in some cases after having removed the fractional part. Replace 19200 value with 9600 which is supported by both 10 MHz and 8 MHz machines.
Remove RTC switch from configure.cmd, now MSVC runtime checks are
supposed to be enabled/disabled via CMake define (-DRUNTIME_CHECKS=1)
Prepare for adding more dynamic analysis options
which implements the required functionality.
ntdll and ntoskrnl now have a wrapper for this, with SEH.
This protects the function against malformed / bad images,
whilst still being able to use the code in freeldr et al.
Idea from Thomas.
CORE-14857
- Add missing allocation check in DetectApmBios()
- Check 'PM' signature in FindApmBios()
- Properly set machine type in hardware detection
- Set Component->Key value for hard drives
- Get rid of the unused XboxBeep()
- Cast Xbox LPC I/O ports to PUCHAR
- Improve shadow rendering with VGA font
- Include ntoskrnl.h in the proper order
- Add ARC-emulation support for NEC PC-98 series
- Add global definition for PC-98 port into CMakeLists.txt
- Add floppy verison of freeldr.ini for PC-98 CD boot
- Remove now unused i386rtl.c (and it doesn't contains RTL functions nowadays).
- Separate PC beep routines out into its own file.
- Also use delay function instead of BIOS interrupts.
- Improve as well the accuracy of KeStallExecutionProcessor() by using the same HW delay function.
This PR enables the developers to include the CJK standard fonts into ReactOS by adding them in Folder modules/optional. This feature is for test purpose only. You may not use the fonts illegally.
The embeddable font files are: mingliu.ttc, simsun.ttc, mssong.ttf, msgothic.ttc, msmincho.ttc, gulim.ttc and batang.ttc.
CORE-9619
- Changes in device detection code:
* Properly check device signature.
* Сorrectly reset the IDE controller.
* Remove check for device type code.
- Fix CD-ROM sector read issue:
* Changed ATAPI packet opcode to be more universal (Some devices may not have READ12 support).
* Always use 2048 bytes as sector size when reading the data from a disc.
* Modify WaitForFlags() to stop polling if the error bit was set.
* Changed timeout to 31 seconds (ATA default value).
- Add more informational messages in DEBUG mode.
- Fix invalid IDE register value.
- Fix registers names.
Tested by Stanislav Motylkov and Daniel Reimer on XQEMU and on real
hardware MS Xbox revision 1.3 with Philips DVD drive.
It has also been tested manually on PC with a SONY DVD drive.
CORE-16628 CORE-16216
Surprisingly this also happens to "fix" random "Invalid Opcode" exceptions in XQEMU.
(But I think it's more like a coincidence... --hbelusca)
CORE-16627 CORE-16216
The first part of PC-98 Port - https://reactos.org/wiki/PC-98
- Add FAT12 file system boot sector for NEC PC-98 series.
- Add a new build target for a PC-98 bootable floppy disk.
- Add a new sub-architecture into config.cmake.
* [FREELDR] Cache the drive geometry in the PcDiskReadLogicalSectorsCHS()
Speed up the loading time a bit.
* [FREELDR] Generalize the cache to all the geometry data + INT 13h extensions-supported status.
The data structure used is "PC_DISK_DRIVE".
- Adapt the associated functions;
- Make DiskGetExtendedDriveParameters() private to pcdisk.c
- Introduce PcDiskDriveNumberToDrive(), that is similar to the XBOX
function XboxDiskDriveNumberToDeviceUnit(), that retrieves a valid
pointer to the cached disk corresponding to the given BIOS DriveNumber.
If needed the cached data gets initialized.
- Make XboxDiskDriveNumberToDeviceUnit() simpler by just returning the
pointer to the corresponding drive, of NULL if there is none.
Co-authored-by: Hermès BÉLUSCA - MAÏTO <hermes.belusca-maito@reactos.org>
CORE-16220 CORE-16216
* Create a new driver.
* Use the functions from the library in xboxdisk.c
Driver now supports PC, Xbox and NEC PC-98.
Co-Authored-By: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Add AppliedDPI DWORD registry value 0x00000060 (96 DPI) into HKCU\Control Panel\Desktop\WindowMetrics registry key. For now it does nothing, since saving DPI registry settings is not implemented yet. It's required only for ViStart 8 to be started successfully (with MS VB6 Runtime installed and wshom.ocx replaced). CORE-13877
Update BIOS_MEMORY_MAP and PcMemGetBiosMemoryMap() from ACPI 6.2-A to ACPI 6.3.
Co-Authored-By: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
PR #2101 shows desktop.ini files on Desktop. I want to hide them.
- Add "ShowSuperHidden" setting to Explorer.
- Add SHCONTF_INCLUDESUPERHIDDEN flag.
- Support SHCONTF_INCLUDESUPERHIDDEN in Explorer.
CORE-10045
Add "Command Prompt here" menu item to the Right-click menu of normal folders and drives. Currently, this menu item doesn't work correctly because of the bug of pushd. CORE-12150
Triggered by a fix attempt by M.Harmstone in PR #1905.
- Introduce #defines and helper functions so as to initialize the
descriptors in a human-readable and tractable way, without magic values.
- Rework some comments.
- Document what the changes are in (Longhorn and) Vista+.
Data has been obtained through using the WinDbg command: dg 0x00 0xFF
(for example), that lists all the selectors from 0x00 to 0xFF included.
See https://docs.microsoft.com/en-us/windows-hardware/drivers/debugger/dg--display-selector-
for more details.
- Implement support for the "RDIMAGELENGTH" and "RDIMAGEOFFSET" boot
options. Fixes CORE-15432.
- Separate the initialization of the global gInitRamDiskBase /
gInitRamDiskSize variables from the FreeLdr command-line, and the
actual initialization of the internal variables of the RamDisk.
The latter are initialized via calls to RamDiskInitialize().
- Implement 'SeekRelative' mode in RamDiskSeek().
- Make RamDiskLoadVirtualFile() internal function that gets called by
RamDiskInitialize(), and we use the latter in the NT loader instead.
Basically it appeared that without this fix, the CPU was somehow residing
in an inconsistent state, that made it crash when a full 16-bit real-mode
to 32-bit protected mode transition occurred. (Encountered when trying
to load Linux, see problem description below.)
In that situation, Bochs reports that the CPU is in "compatibility mode".
The fix is based from information from Fig.1-6 "Operating Modes of the
AMD64 Architecture" (page 12) and Chapter 14 (pages 429-446) of the
"AMD64 Architecture Programmer’s Manual Volume 2: System Programming"
https://www.amd.com/system/files/TechDocs/24593.pdf
*** THE PROBLEM ***
When booting Linux using x86 FreeLdr everything goes well.
When trying to do the same using x64 FreeLdr, the Linux code (both the
boot sector, the setup sector and the main kernel contents) is all
correctly loaded and relocated in memory as in the x86 case. We then pass
control to the decompressing code that appears to succeed. However, once
it has finished and "Parsing ELF file..." step has been run, the next
step "Booting the kernel..." crashes with a CPU Triple-Fault.
This problem **DOES NOT HAPPEN** when booting from GRUB.
Log excerpt from Bochs:
<snip>
00089459736i[BIOS ] Booting from 07c0:0000
00089782775i[SER ] com1: FIFO enabled
00095994535i[BIOS ] int13_harddisk: function 41, unmapped device for ELDL=81
00095998517i[BIOS ] int13_harddisk: function 08, unmapped device for ELDL=81
00397139785i[BIOS ] KBD: unsupported int 16h function 03
00397143625i[BIOS ] *** int 15h function AX=e980, BX=0000 not yet supported!
00523008104e[CPU0 ] interrupt(long mode): vector must be within IDT table limits, IDT.limit = 0x0
00523008104e[CPU0 ] interrupt(long mode): vector must be within IDT table limits, IDT.limit = 0x0
00523008104i[CPU0 ] CPU is in compatibility mode (active)
00523008104i[CPU0 ] CS.mode = 32 bit
00523008104i[CPU0 ] SS.mode = 32 bit
00523008104i[CPU0 ] EFER = 0x00000500
00523008104i[CPU0 ] | RAX=00000000e0000011 RBX=0000000000000000
00523008104i[CPU0 ] | RCX=0000000000000000 RDX=0000000000000000
00523008104i[CPU0 ] | RSP=00000000004f8000 RBP=000000000082e003
00523008104i[CPU0 ] | RSI=0000000000099800 RDI=00000000c0611000
00523008104i[CPU0 ] | R8=0000000000109000 R9=0000000000009020
00523008104i[CPU0 ] | R10=00000000000007e3 R11=000000000000e958
00523008104i[CPU0 ] | R12=0000000000000000 R13=0000000000000000
00523008104i[CPU0 ] | R14=0000000000000000 R15=0000000000000000
00523008104i[CPU0 ] | IOPL=0 id vip vif ac vm RF nt of df if tf SF zf af PF cf
00523008104i[CPU0 ] | SEG sltr(index|ti|rpl) base limit G D
00523008104i[CPU0 ] | CS:0010( 0002| 0| 0) 00000000 ffffffff 1 1
00523008104i[CPU0 ] | DS:0018( 0003| 0| 0) 00000000 ffffffff 1 1
00523008104i[CPU0 ] | SS:0018( 0003| 0| 0) 00000000 ffffffff 1 1
00523008104i[CPU0 ] | ES:0018( 0003| 0| 0) 00000000 ffffffff 1 1
00523008104i[CPU0 ] | FS:0018( 0003| 0| 0) 00000000 ffffffff 1 1
00523008104i[CPU0 ] | GS:0018( 0003| 0| 0) 00000000 ffffffff 1 1
00523008104i[CPU0 ] | MSR_FS_BASE:0000000000000000
00523008104i[CPU0 ] | MSR_GS_BASE:0000000000000000
00523008104i[CPU0 ] | RIP=0000000000409327 (0000000000409327)
00523008104i[CPU0 ] | CR0=0xe0000011 CR2=0x0000000000409327
00523008104i[CPU0 ] | CR3=0x005b5000 CR4=0x000000a0
00523008104i[CPU0 ] 0x0000000000409327: (instruction unavailable) page not present
00523008104p[CPU0 ] >>PANIC<< exception(): 3rd (13) exception with no resolution
<snip>
- Introduce "Relocator16Boot()". So far its aim is just to correctly set
the CPU state (segments, registers, flags) to what is expected by a
given boot image before running it.
This function can be seen as the embryonic state of a future boot relocator
(see e.g. GRUB or SYSLINUX) that would also relocate the boot image at
the correct places. (Such feature is needed when boot images have to
be loaded in memory areas that cover where the boot loader is in memory.)
- Implement ChainLoadBiosBootSectorCode() around it.
- Replace BootOldLinuxKernel() and BootNewLinuxKernel() by a new
BootLinuxKernel() function (in assembly) that relocates the kernel
to a given position and then boot it, using Relocator16Boot().
Ideally the relocation should be done by a future boot relocator...
Implementation notes for Relocator16Boot():
===========================================
For setting the CPU state the function is based on a similar code as the
Int386() helper, namely it takes a pointer to REGS structure and pass
this information through the 32->16 bits call before setting the CPU state
in accordance.
New stack segment/pointer and code segment/pointer are also specified.
For passing these values through the 32->16 bits call the 16-bit BSS
memory offsets "BSS_CallbackReturn" and "BSS_RealModeEntry" (respectively)
are reused.
On Windows <= 2003 (and current ReactOS), this is the "InfName" value
in the "HKEY_LOCAL_MACHINE\CurrentControlSet\Control\BiosInfo\" key.
(The default file name found there is 'biosinfo.inf'.)
On Vista+, this is the "InfName" value in the
"HKEY_LOCAL_MACHINE\CurrentControlSet\Control\Errata\" key.
(The default file name found there is 'errata.inf'.)
For 1st-stage setup, the file is specified in the "InfName" value of
the "BiosInfo" section in the TXTSETUP.SIF file.
Co-authored-by: Hermès Bélusca-Maïto <hermes.belusca-maito@reactos.org>
Do not read the whole cluster chain for file on opening.
This removes restriction for opening files which span
within a large amount of clusters (>65k). That happened because
FrLdrTempAlloc cannot allocate more than about 256 KiB of memory.
Adjacent clusters for file are now read using one disk driver call.
Add localization for the file description of both XML and XSL file formats.
Please check for copypasta errors!
CORE-16390
Co-Authored-By: Stanislav Motylkov <x86corez@gmail.com>
According to the Advanced RISC Computing Specification v1.2, for partitions,
StartingAddress and EndingAddress are the start and end positions of the
partition in terms of byte offsets from the start of the disk.
CurrentAddress is the current offset into (i.e. relative to) the partition.
Fix also the FAT filesystem in accordance.
- FIXME fix: Retrieve the size of the disk in number of sectors in DiskOpen().
- Add extra validity checks in the DiskSeek() functions.
- Explicitly call PcDisk* functions in machpc.c and pcdisk.c, and
XboxDisk* functions in machxbox.c (the code in these files is not
called cross-platform).
CORE-16216 CORE-16248
- Modify DiskReportError() to use an internal "display counter", so that
imbricated DiskReportError(FALSE) ... DiskReportError(TRUE) can behave
as expected.
- Merge LoadAndBootDrive(), LoadAndBootPartition(),
LoadAndBootBootSector() into one LoadAndBootDevice() function + its
helpers (in progress...).
- "FrldrBootPath" -> "FrLdrBootPath";
- Get rid of GetFreeLoaderVersionString() and use FrLdrVersionString
directly instead;
- Rephrase some comments;
- Use RTL_NUMBER_OF();
- Reduce indent level in LoadOperatingSystem() and EditOperatingSystemEntry().
Bug fix:
- Fix DissectArcPath() for "ramdisk(0)" case.
- Move DiskStopFloppyMotor() calls into the implementations of
Boot(New)LinuxKernel() and Reboot() HW functions, and the explanation
comments in ChainLoadBiosBootSectorCode().
- Remove unneeded DiskStopFloppyMotor() dummies in ARM and PPC code.
- Use more adequate bitmask value to be sent to floppy's Digital Output
Register for shutting down its motor (based on OSDev & our floppy
controller driver).
- Add optional arguments BootDrive and BootPartition to
ChainLoadBiosBootSectorCode() so as not to modify explicitly the
FrldrBootDrive and FrldrBootPartition variables, that should remain
purely internal.
- Implement ChainLoadBiosBootSectorCode() for x64.
- Get rid of the machine-specific DiskGetBootPath(), and instead do its
job only once in the machine-specific InitializeBootDevices() (or in
MachInit() for PPC).
Cache the result of this operation into the globally-accessible
FrldrBootPath buffer. This avoids the unneeded calls to (Mach)DiskGetBootPath()
we used to do before.
Also remove the separate distinction between the PC and XBOX versions
of this functionality.
- Move the PC-specific DiskIsDriveRemovable() and DiskGetBootPath()
as well as the disk-IO-error functionality, back into the
corresponding PC-arch files.
- Simplify IniFileInitialize(), getting rid of IniOpenIniFile().
CORE-9023
FIXES:
======
- Fix parsing of the multiboot options string.
NOTE: They are not yet treated in a case-insensitive manner!
- Fix a bug in ArcOpen() so that it correctly skips the first path
separator (after the adapter-controller-peripheral ARC descriptors).
The path separator can be either a backslash or a slash (both are
allowed according to the specs); they were also already handled
correctly in other parts of the code.
- Fix DissectArcPath() so as to:
* **OPTIONALLY** (and not mandatorily!) return the path part that follows
the ARC adapter-controller-peripheral elements in the ARC path;
* make it correctly handle the (yes, optional!!) partition() part in the
ARC path, for the multi(x)disk(y)rdisk(z) cases.
ENHANCEMENTS:
=============
- Directly retrieve the default OS entry as we enumerate them and
build their list (i.e. merge the GetDefaultOperatingSystem() helper
within InitOperatingSystemList()).
- Directly use the opened 'FreeLoader' INI section via its ID in the
different functions that need it.
- Make the custom-boot and linux loaders honour the boot options they are
supposed to support (see FREELDR.INI documentation / template).
This includes the 'BootDrive' and 'BootPartition' (alternatively the ARC
'BootPath').
This also allows them to take into account the user-specified choices in the
FreeLdr custom-boot editors.
- Modify the FreeLdr custom-boot editors so as to correctly honour
the priorities of the boot options as specified in the FREELDR.INI
documentation / template.
- Use stack trick (union of structs) to reduce stack usage in the
FreeLdr custom-boot editors, because there are strings buffers that are
used in an alternate manner.
- Extract out from the editors the LoadOperatingSystem() calls, and
move it back into OptionMenuCustomBoot(), so that when this latter
function is called there is no risk of having a stack almost full.
- When building the ARC-compatible argument vector for the loaders, add
the mandatory "SystemPartition" path. This allows the loaders to NOT
call the machine-specific MachDiskGetBootPath() later on (this data is
indeed passed to them by the boot manager part of FreeLdr).
- Improve the FsOpenFile() helper so as to make it:
* return an adequate ARC_STATUS instead of a mere uninformative BOOLEAN;
* take open options, as well as a default path (optional) that would be
prepended to the file name in case the latter is a relative one.
- Make RamDiskLoadVirtualFile() return an actual descriptive ARC_STATUS
value, and make it take an optional default path (same usage as the one
in FsOpenFile() ).
+ Remove useless NTAPI .
- UiInitialize() and TuiTextToColor(), TuiTextToFillStyle(): load or
convert named settings into corresponding values using setting table and
a tight for-loop, instead of duplicating 10x the same parameter reading
logic.
- UiInitialize(): Open the "Display" INI section just once. Remove usage
of DisplayModeText[] buffer.
- UiShowMessageBoxesInSection() and UiShowMessageBoxesInArgv(): reduce
code indentation level.
ENHANCEMENTS for NT OS loader:
==============================
- Don't use MachDiskGetBootPath() but use instead the "SystemPartition"
value passed via the ARC argument vector by the boot manager
(+ validation checks). Use it as the "default path" when calling
FsOpenFile() or loading the ramdisk.
- Honour the FreeLdr-specific "Hal=" and "Kernel=" options by converting
them into NT standard "/HAL=" and "/KERNEL=" options in the boot
command line.
Note that if the latter ones are already present on the standard "Options="
option line, they would take precedence over those passed via the separate
"Hal=" and "Kernel=" FreeLdr-specific options.
Also add some documentation links to Geoff Chappell's website about
how the default HAL and KERNEL names are chosen depending on the
detected underlying platform on which the NT OS loader is running.
This fixes null pointer call bug, which was revealed in 85d44fc. Spotted by Mark Jansen. CORE-16216
Co-authored-by: Mark Jansen <mark.jansen@reactos.org>
Rename RosAudioSrv to AudioSrv in audio service itself and in all system components which are related to this, same as it done in Win2k3.
It allows MS DxDiag to detect the system audio service correctly, so it becomes possible to run DirectSound test properly with MS dsound.dll, although it works with some minor errors and only in older VirtualBox versions, ~ up to 5.1.38 (and in other emulators as well).
CORE-16307
- Create xbox.cmake based on legacy.cmake and pic.cmake
- Revive Xbox HAL files and add them to the build
- Fix boot with Xbox HAL, add missing parts from halinit_up.c
- Code style and debug logging improvements in pcibus.c
- Allow to choose Xbox HAL in usetup
CORE-16216
- Add some forgotten, or move some misplaced ArcClose() calls so as
to avoid leakages in failure paths. (Thanks to Serge Gautherie for
having caught some of them.)
- Simplify some code; remove unneeded casts; use string-safe functions.
- Factor out disk & partition opening in LoadAndBootPartition() and
LoadAndBootDrive() into a LoadAndBootPartitionOrDrive() helper.
- Use ARC paths and ArcOpen()/ArcRead() instead of calling the
machine-specific BIOS-oriented DiskGetPartitionEntry() and
MachDiskReadLogicalSectors() functions to open the disk/partition
and read their boot sectors.
- Don't forget to close the opened boot sector file in LoadAndBootBootSector().
- Add assertions for DiskReadBufferSize in PcMemFinalizeMemoryMap()
and EnumerateHarddisks().
- x86/amd64 only:
* Add a DisableA20 helper for disabling the A20 line, before rebooting
back, or chain-load a boot sector, into 16-bit world.
Also pulse the output port of the keyboard controller to clear out
its state after having set the state of the A20 line.
* In addition to disabling the A20 line when rebooting or chain-loading
a boot sector, reset the video back to 80x25 text mode.
- Reset the cursor position back to the origin when initializing or
terminating the TUI.
- Get rid of the FsCloseFile(), FsReadFile(), FsGetFileInformation(),
FsGetFileSize() and FsSetFilePointer() wrappers and use the ARC
functions directly instead. Make FsOpenFile() return an ARC file
descriptor ID of the correct type. Get rid of unused FS_* defines.
- Use TRACEs in the ***Mount() filesystem functions for diagnostics
purposes.
- Remove a leak in FatGetFatEntry(). Assign stuff via QuadPart where
possible in FatMount(). Remove an unused member in FAT_FILE_INFO.
- Reduce code indentation in BtrFsMount() and remove a leak there.
- Disable reading the "BootPath" parameter in the linux loader since
we don't use this parameter (yet??)
- EditBox: Display the initial contents of the text buffer.
This allows modifying already existing text in the passed buffer.
- Menu:
* Make both MenuHeader and MenuFooter optional (but the latter is
more "optional" than the former...).
* Allow passing a user-provided "Context" structure to the key-press
filter callback, and pass also the index of the menu item that has
been selected.
- Minor formatting fixes.
CORE-9023
- During loading and initialization of the list of operating systems
available in freeldr.ini, convert any legacy operating system entry
encountered -- they are like those in NTLDR's boot.ini file, i.e.:
ArcOsLoadPartition="LoadIdentifier" /List /of /Options
into a new operating system INI entry, like those used by default in
FreeLoader. This allows us to avoid treating this corner-case later in
different parts of the code. Also, the "BootType" value is now
determined there, only once.
- Convert the OS loaders entry-points to ARC-compatible ones, following
the "Advanced RISC Computing Specification, Version 1.2" specification
https://www.netbsd.org/docs/Hardware/Machines/ARC/riscspec.pdf
- Introduce helpers for retrieving options values from the argument vector
in a simple way.
- Simplify LoadOperatingSystem(), since now the "BootType" value has
been determined once while loading the list of OSes (see above) and
is well-defined there. Use the BuildArgvForOsLoader() helper to build
the ARC-compatible argument vector from the corresponding INI settings
for the selected operating system entry, and use it when calling the
corresponding OS loader.
- In the OS loaders, since we can now directly read the settings from
the argument vector (instead of using INI settings), we can avoid
using a bunch of fixed-size string buffers, and avoid potentially
failing IniOpenSection() calls as well.
- Simplify code in the Linux loader (and the RemoveQuotes() function).
- Add UiShowMessageBoxesInArgv() that acts on the "MessageBox=" settings
passed through the argument vector (equivalent to
UiShowMessageBoxesInSection() ).
- Use string-safe functions where needed (copy/concatenation/printf on
fixed-size buffers).
- Initialize BootPath and BootOptions buffers when fallback behaviour is not taken.
- Correctly skip all the understood whitespace (space & tabs) and the
quotes before reading the boot options when using the alternative syntax:
[Operating Systems]
section_name = "ReactOS" /bootoptions
Fixes the minor regression introduced in 370e8564 (r43875).
Add "Lucida Console" fonts. CORE-16264
- Add "Lucida Console" font by duplicating "DejaVu Sans Mono" font and renaming it.
- Delete some "Lucida Console" font substitutes.
- Add LICENSE file.
I used FontForge to rename it. Its family name is "Lucida Console". Its display name is "Lucida Console". Its font filename is lucon.ttf. The Underline Positions are hacked by adding an integer value for workaround of FontForge's bug.
Add "Times New Roman" fonts. CORE-16272
- Add "Times New Roman" and "Times New Roman Italic" fonts by duplicating "Liberation Serif" fonts and renaming them.
- Delete some "Times New Roman" font substitutes.
- Add LICENSE file.
I made these font files by using FontForge. Their family name is "Times New Roman". Their display names are "Times New Roman", "Times New Roman Bold", "Times New Roman Bold Italic" and "Times New Roman Italic". Their font filenames are times.ttf, timesbd.ttf, timesbi.ttf and timesi.ttf. The Underline Positions are hacked by adding an integer value for workaround of FontForge's bug.
Add "Courier New" fonts. CORE-16272
- Add "Courier New", "Courier New Bold", "Courier New Bold Italic" and "Courier New Italic" fonts by duplicating FreeMono fonts and renaming them.
- Delete some "Courier New" font substitutes.
- Add LICENSE file.
I made these font files by using FontForge. Their family name is "Courier New". Their display names are "Courier New", "Courier New Bold", "Courier New Bold Italic" and "Courier New Italic". Their font filenames are cour.ttf, courbd.ttf, courbi.ttf and couri.ttf. The Underline Positions are hacked by adding an integer value for workaround of FontForge's bug.
Add Arial fonts. CORE-16272
- Add "Arial", "Arial Bold", "Arial Bold Italic" and "Arial Italic" fonts by duplicating Liberation Sans fonts and renaming them.
- Disable some Arial font substitutes.
- Add LICENSE file.
I made these font files by using FontForge. Their family name is "Arial". Their display names are "Arial", "Arial Bold", "Arial Bold Italic" and "Arial Italic". Their font filenames are arial.ttf, arialbd.ttf, arialbi.ttf and ariali.ttf. The Underline Positions are hacked by adding an integer value for workaround of FontForge's bug.
- DiskGetFileInformation() should return relative addresses -- relative to the beginning of the "device" (partition, or disk) in question.
- FatXSearchDirectoryBufferForFile() should assign file attributes.
- Minor code style improvements in FatOpenVolume().
CORE-16216 CORE-16248
Co-authored-by: Victor Perevertkin <victor@perevertkin.ru>
- This allows to detect and dynamically handle different partitioning schemes.
- Implemented detection of MBR, GPT, Xbox-BRFR, and partitionless disks.
- Currently only MBR and Xbox-BRFR partitions are handled and tested.
CORE-9841 CORE-15768 CORE-16216 CORE-16248
Fixes GCC 8 warnings like:
boot/freeldr/freeldr/disk/scsiport.c:806:31: error: 'partition(0)' directive writing 12 bytes into a region of size between 1 and 64 [-Werror=format-overflow=]
sprintf(PartitionName, "%spartition(0)", ArcName);
^~~~~~~~~~~~
boot/freeldr/freeldr/disk/scsiport.c:806:5: note: 'sprintf' output between 13 and 76 bytes into a destination of size 64
sprintf(PartitionName, "%spartition(0)", ArcName);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
* [FREELDR] Abstract VGA BIOS specific code
WinLdrSetupSpecialDataPointers() uses INT 10h video interrupts, but they are not available on Xbox, so make them machine-specific.
CORE-16204 CORE-16210
* [FREELDR] Abstract getting extended BIOS data area
WinLdrSetupSpecialDataPointers() uses INT 15h AH=C1h to get extended BIOS data area, but it's not available on Xbox, so make it machine-specific.
CORE-16204 CORE-16210
Make floppy detection code machine-specific, because Xbox CMOS cannot be used to detect floppies. Based on a patch by Matt Borgerson.
CORE-16204 CORE-16207
Co-authored-by: Matt Borgerson <contact@mborgerson.com>
- Refactor and use PC memory map init functions
- This fixes filesystem detection and probably some other problems
Based on a patch by Matt Borgerson.
CORE-16204 CORE-16206
Co-authored-by: Matt Borgerson <contact@mborgerson.com>
By removing font substitution for 'Microsoft Sans Serif'.
Thanks to the patches author Katayama Hirofumi MZ.
This is a partial revert of the guilty rev
master guilty 0.4.13-dev-9-g
811faed421
RC guilty 0.4.12-RC-13-g
8d3def0529
VBox test result:
https://reactos.org/testman/compare.php?ids=68497,68499
The same fix has been applied before to 0.4.12-RC-44-g
ca0e00e8af
This allows users to have their own locally mapped DOS devices.
For instance, when a network drive is mapped, it is now mapped in the
user device maps and no longer in the global device map.
This avoids sharing mount points system wide whereas they shouldn't.
LUID mapped devices is the default W2K3 behavior.
Globally mapped devices can be restored by adding back this registry key.
https://twitter.com/HeisSpiter/status/1143615176450686976
CORE-16114
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>
This is linked to previous work done on DOS devices creation
in basesrv. If this DWORD is not set (or 0), DOS devices will
be created with an ACL that make the symlink readable by any
and modifiable by any.
With protection mode set, the symlink will be still readable by
any but not modifiable by anyone but the owner.
This should also affect some objects managed by session manager.
By default, on W2K3, that protection mode is set.
This will avoid triggering a FAT repair on
unclean FAT volumes.
If dosfstools.fsck works fine in Linux, its
usage on ReactOS triggers worse corruption
than unclean shutdown.
Given I've no time for debugging this, I
kill it off.
CORE-14638
unattend.inf only allows to add RunOnce entries, which are in theory only executed on the first boot after installation.
For almost a decade, this worked anyway to start regtest.cmd again after a ReactOS crash, because the registry and thus the deletion of the RunOnce entry wasn't stored on disk in case of a crash.
Thanks to Sylvain for the hint!
As Explorer processes the Run key right after RunOnce and therefore picks up regtest.cmd a second time during the first boot, exit the script just after adding the Run key.
Otherwise, rosautotest.exe would be started twice, with catastrophic results.
Eliminate some bugs about font enumeration. CORE-15755
- Add "Microsoft Sans Serif" font substitution.
- Fix and improve the treatment of the nominal font names.
- Split IntGetFontFamilyInfo function from NtGdiGetFontFamilyInfo.
- Add DoFontSystemUnittest function for font system unittest to GDI32.
- Call DoFontSystemUnittest function at CreateFontIndirectW first call.
- Enable "New Start Menu" control for all languages.
- Implement the "NoSimpleStartMenu" policy in shpolicy.c and its usage in explorer.
- Hide controls instead of disabling (as in Win XP/Vista).
This stub is responsible for providing the UUID seed to the kernel.
For now, it generates a purely random seed - MAC address support
is to be added.
Because it's purely random seed and local the machine (not tied
to the MAC address) it's made so that ExUuidCreate keeps returning
RPC_NT_UUID_LOCAL_ONLY. It won't fix failing test for now.
Nota: this service shouldn't exist as it. It should be implemented
though rpcss DLL for both rpcss service (network service) and
dcomlaunch service (local system service).
Because rpcss is EXE based and wine-synced for now, I prefered
stubbing a new service. This will have to be changed at some point.
- Localize error message and shell file extension description.
- Added Hebrew resources.
- Added Icon.
The icon is the Tango icon named "certificate". If anybody has a idea for more fitting icon please recommend it.
Follow up of #1343
CORE-15736
"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
By default, we still fallback to FAT if nothing asked, or if there
is an invalid input.
0 is FAT, 1 is BtrFS. This can be grown as soon as we add more IFS.
Adds the 'Red, White, and Blue' Color Scheme used by the Classic Theme and adds localization for all the color schemes into themeui.dll.
Translators, please check the language files for potential copypasta errors.
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
Purpose:
When doing a PXE BootCD installation, you may be left without networking, usb and a cd drive.
This adds an easy way to include a few or more files to the installation which are then present on the disk after the installation and which does not require any change to ReactOS source code/build script files (and no manual editing of boot/bootdata/packages/reactos.dff.in).
Proposed changes:
Adds a new modules/3rdparty folder which lets the files end up in C:\ReactOS\3rdParty ready for use.
- BOOTDATA: Use standard INF signature string, so that they can be
opened successfully using ReactOS' or Windows' setupapi.dll with
the INF_STYLE_WIN4 style.
- SETUPLIB: Use the correct INF_STYLE_* INF styles in SpInfOpenInfFile() calls.
- REACTOS : Switch thread locale to user-specified LocaleId when calling
SetupOpenInfFileW(), so that the correct localized strings are used.
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
This fixes optional modules being installed in places
that make no sense.
This also fixes auto installation of Gecko. Thus, this
fixes unattended setup of ReactOS for testbots.
CORE-15160
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"