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.