Commit graph

29394 commits

Author SHA1 Message Date
ReactOS Portable Systems Group ac30a263d8 We now generate the correct ARM syscall stub code for system calls with IDs > 0x100.
We never call KfRaise/LowerIrql in portable code anymore, isntead, we use Ke.
We now have correctly defined IRQL routines for ARM, much more of the kernel builds as a result.

svn path=/trunk/; revision=32179
2008-02-07 07:10:13 +00:00
ReactOS Portable Systems Group 46c6129581 We don't define types which are usually documented on "real" NT platforms in the NDK aynmore, but instead in the ARMDDK.h. This also avoids many ndk-from-ddk cross-header issues.
Added x86-only guards around certain structures and functions which are non-portable. Also guarded certain inline functions.
Added some more ARM structures, and filled out the KPRCB.
Created ARM-specific headers when required.
We can now have a buildable ARM kernel, minus a couple of compile errors.

svn path=/trunk/; revision=32178
2008-02-07 06:40:42 +00:00
ReactOS Portable Systems Group d54c5304b2 We now only compile the ELF loader if _ELF_ is defined (both because this isn't a standard Windows feature, and because the current code is completely not portable with ARM)
svn path=/trunk/; revision=32177
2008-02-07 06:36:31 +00:00
ReactOS Portable Systems Group 2c43803e7a We now return failed in FrLdrMapImage if the file could not be read.
FreeLDR ARM now loads properly, however, we need to start building the ARM kernel and ARM boot drivers, otherwise their relocations will have byte offsets which will lead to alignment errors (on ARM relocaitons are DWORD-aligned).
Next steps are to get the kernel building, then the HAL, then bootvid/kdcom.

svn path=/trunk/; revision=32176
2008-02-07 05:25:37 +00:00
Filip Navara 9c1dc73ab3 Make HvIsCellAllocated working.
svn path=/trunk/; revision=32175
2008-02-07 03:32:47 +00:00
Timo Kreuzer dbfe16d4c3 make the table smaller
svn path=/trunk/; revision=32174
2008-02-07 02:36:20 +00:00
ReactOS Portable Systems Group 254e81c7ef There was no reason to have most of the i386Disk routines as i386-only routines, since they are quite generic and portable assuming MBR-based disks. GPT disks are another matter, but in either case, any architecture should support both, and that's the real distinction.
Made the ARM code use the shared disk routines, which allowed us to remove some hacks -> we now detect the boot/system volume just like on x86.
FreeLDR now loads NTOSKRNL.EXE on ARM.
Also made the DiskIsBootDeviceFloppy return FALSE for ramdisks.
Finally, note that the disk routines were still kept as Machine-specific routines in the Mach Table, so other architectures can still override them if they really need to (for example, the XBOX port overrides one of them for a specific XBOX hack).


svn path=/trunk/; revision=32173
2008-02-07 00:43:09 +00:00
Gregor Brunmar c9fee31613 * Fixed compiling of the native d3d9.dll
* Packed structures in d3d9types.h correctly to be compatible with Windows

svn path=/trunk/; revision=32172
2008-02-06 21:22:23 +00:00
ReactOS Portable Systems Group 2c11320128 Removed certain ARM Machine Callbacks which we shouldn't need at all until much later for SetupLDR.
Kept the ArmDisk ones though since they'll be needed for NAND boot, but improved the assertions.

svn path=/trunk/; revision=32171
2008-02-06 20:47:53 +00:00
ReactOS Portable Systems Group 5dfb41e641 We now report the correct sector start for the ramdisk -- the actual volume boot sector is at 0x63, not 0x00 which is the MBR.
FreeLDR now reads freeldr.ini correctly and continues all the way to hardware detection (ArmHwDetect)

svn path=/trunk/; revision=32170
2008-02-06 20:38:59 +00:00
ReactOS Portable Systems Group 336ca7d838 We now enable ramdisk support by calling RamDiskSwitchFromBios() to allow the ramdisk routines to take control of disk r/w.
Unlike the x86 virtual-ramdisk, the ramdisk here is also used as boot device, not only system device.
Current FreeLDR output:
    Booting FreeLDR...
    FreeLoader v3.0 for ARM
    Bootargs: rdbase=0x2000000 rdsize=0x1400000
    This file system has cluster sizes bigger than 64k.
    FreeLoader does not support this.
    Press any key


svn path=/trunk/; revision=32169
2008-02-06 19:15:46 +00:00
Johannes Anderwald 5a83b091b5 - apply changes from prev rev
svn path=/trunk/; revision=32168
2008-02-06 18:59:51 +00:00
Johannes Anderwald e20076c868 - partly fix AddConsoleAlias/GetConsoleAlias
- add hack for GetConsoleAliasW to circumvent CsrCaptureMessageBuffer is not working

svn path=/trunk/; revision=32167
2008-02-06 18:59:18 +00:00
Johannes Anderwald 5f2abd25fc - partly fix AddConsoleAlias/GetConsoleAlias
- add hack for GetConsoleAliasW to circumvent CsrCaptureMessageBuffer is not working

svn path=/trunk/; revision=32166
2008-02-06 18:57:40 +00:00
Colin Finck ba0c8c84e6 - Cast the OutputBuffer to a byte (UCHAR) array, not a ULONG array, so adding a byte offset to its address works as expected.
This fixes the extraction of any file, which is not the first file in the cabinet.
- I don't see a reason for reading the file name in 32 byte chunks in ReadString() instead of reading it completely in one call.
  As the previous algorithm was buggy for files longer than 32 characters, I read the file name string completely now.
  Cabman is now able to extract the "reactos.cab" it created itself without any problems :-)
- Simplify CreateSimpleCabinet() a bit

svn path=/trunk/; revision=32165
2008-02-06 18:30:15 +00:00
ReactOS Portable Systems Group f20598a976 We now support ArmDiskGetBootVolume for ramdisk only, later revisions will support NAND boot as well.
The ramdisk parameter parsing had several bugs which were fixed, including support for hex parameters and using proper return values from strstr.
We also rewrote command line parsing to be much simpler. It was very broken, modifying the memory contents of the command line -- this wouldn't work on systems where the command line is stored in ROM unless a copy is first made. It also broke ram disk parameters by modifying whitespaces to NULL chars for purposes of reading its own parameters, but did not put the whitespace back, terminating the command line early.
Finally, we now have an integrated ramdisk parameter parsing with the new command line code.

svn path=/trunk/; revision=32164
2008-02-06 18:27:53 +00:00
Dmitry Chapyshev bd50edb2a5 - Import atl.dll from Wine
- Add atl to bootcd

svn path=/trunk/; revision=32163
2008-02-06 17:29:28 +00:00
ReactOS Portable Systems Group 1e5a0b3061 We now return memory map.
We added a new member to the ARM board configuration block that specifies the number of memory map entries.
Board boot loaders are responsible for sending the base and size of all DRAM and FLASH banks. FLASH banks should be marked as Reserved so we don't try using them as RAM.

svn path=/trunk/; revision=32162
2008-02-06 15:47:02 +00:00
Dmitry Chapyshev 4980e5f7eb - Add vga font for cp437
svn path=/trunk/; revision=32161
2008-02-06 15:36:29 +00:00
Dmitry Chapyshev a0841bec8b - Fix formatting for ras.h, rasdlg.h and rasapi.h
- Add raseapif.h header file

svn path=/trunk/; revision=32160
2008-02-06 15:29:45 +00:00
Dmitry Chapyshev 8d342df2a5 - Import tapi32.dll from Wine
- Add more defines and structures to tapi.h
- Add tapi32 to bootcd

svn path=/trunk/; revision=32159
2008-02-06 15:23:40 +00:00
Daniel Reimer 5d50f3a918 Update German RC File
svn path=/trunk/; revision=32158
2008-02-06 12:20:34 +00:00
Dmitry Chapyshev 109672cf30 - Add more dialogs
- Add disable all controls functions
- Add icons

svn path=/trunk/; revision=32157
2008-02-06 11:36:37 +00:00
Hervé Poussineau a0acd67f71 Fix typo
svn path=/trunk/; revision=32155
2008-02-06 10:37:21 +00:00
Ged Murphy 73f2103105 fix indentation
svn path=/trunk/; revision=32154
2008-02-06 10:34:03 +00:00
Aleksey Bragin dbc44341a9 - Make i8042Flush flush both output and input buffers.
- Make i8042Flush apply only KBD_OBF flag (applying MOU_OBF leads to an infinite loop trying to flush the buffer).
- Fix a bug in i8042Write, where instead of waiting by polling a PollingIterations times (~10000), it was using ResendIterations (=3), thus giving 8042 very small chance of processing the data.
- Make i8042BasicDetect resend CTRL_SELF_TEST sequence, if controller asks so. Maximum resend iterations are limited by ResendIterations variable.
- Reinsert debug-messages hack, since this is an early-loading driver, and it's not possible to break in to KDBG to change debug filter values.
- As a result, keyboard and mouse work on real hardware again.
See issue #3036 for more details.

svn path=/trunk/; revision=32153
2008-02-06 09:46:38 +00:00
ReactOS Portable Systems Group 75172afb72 We implemented console support (through serial port), for the current board types supported (Feroceon, using UART 16550).
We added a new ClockRate member to the ARM Board Block structure.
We now print out the FreeLDR header after initialization to give some output to the user that we are alive.
Started putting shared stuff in headers.
Fixed copy/paste leftovers from file headers (wrong file names, implementation details, author).

svn path=/trunk/; revision=32151
2008-02-06 07:32:47 +00:00
ReactOS Portable Systems Group 233107aabb We now make sure to build with the static version of libgcc. Previously, this resulted in FreeLDR having an import table and trying to import a .DLL file -- not a very wise attempt.
svn path=/trunk/; revision=32150
2008-02-06 07:19:13 +00:00
Timo Kreuzer 90a6601c3e - use intrinsic interlocked functions
- add a function to get a full stackbacktrace including usermode

svn path=/trunk/; revision=32149
2008-02-06 05:09:26 +00:00
ReactOS Portable Systems Group c759455e9e Implement a proper ARM startup routine. We disable the FIQ and IRQ lines, then disable and flush D and I caches, set up a temporary boot stack, and call ArmInit.
In ArmInit we define the structure that a compatible bootloader has to send us and currently make some assertions on it, before dropping into the common, portable, freeldr startup (BootMain).
This would be the place where we would want to setup UART0 for serial support later on, as well as TIMER0.
In MachInit, we now define the required ARM routines we'll need, all which simply loop for now.
Also fix a bug in RamDiskInit, which could do reads from NULL pointers.


svn path=/trunk/; revision=32148
2008-02-06 04:48:22 +00:00
Timo Kreuzer c3253b0df9 Windows doesn't store a hbrBack, when creating a window
svn path=/trunk/; revision=32147
2008-02-06 04:01:02 +00:00
Timo Kreuzer d03dd0d4f6 use syscolor brush for menu background, fixes a brush leak.
svn path=/trunk/; revision=32146
2008-02-06 00:43:15 +00:00
Colin Finck 8de349c343 - Move each VGA font file to a new "media/vgafonts" directory and convert all PSF fonts to BIN files.
- Add a line to the autogenerated Makefile for Boot-CDs, which creates a "vgafonts.cab" file from the binary fonts at build time.
- Change blue.sys to read the fonts from the "vgafonts.cab" file instead of the "vgafont.bin" (ZIP format) file.
  I dropped support for PSF fonts in blue.sys, because with the vgafontedit app, we can easily convert PSF fonts to BIN fonts now.
  If someone still needs this format in blue.sys, I can reimplement it.

svn path=/trunk/; revision=32145
2008-02-05 19:31:05 +00:00
Dmitry Chapyshev 54409710c6 - Fix typo
svn path=/trunk/; revision=32144
2008-02-05 19:27:03 +00:00
Colin Finck 7c3b17b7b0 Fix the usetup text screen (broken in r32135)
svn path=/trunk/; revision=32143
2008-02-05 19:22:14 +00:00
Daniel Reimer f74b6fd4f4 Move and rename all rc files of rosapps according to our standards.
svn path=/trunk/; revision=32142
2008-02-05 17:00:30 +00:00
Daniel Reimer 03ef60712e Fix whatever TortoiseSVN made wrong here again... Build fixed
svn path=/trunk/; revision=32141
2008-02-05 16:33:47 +00:00
Daniel Reimer 93c2742e8a Bug 3037: Rosapps polish translation patch (olaf_siejka@o2.pl)
Bug 3038: Ukrainian translation update (temarez@yandex.ru)
RC Files resorting like in the Bug reports before these will be done later this day.

svn path=/trunk/; revision=32140
2008-02-05 15:50:59 +00:00
Colin Finck ed5e6ac231 - Handle the different slashes correctly, also in combination (like "../..\*.txt") by using the ConvertPath() function
- Only compare file names, not the whole pathes, in the Unix code path using MatchFileNamePattern
- Small change to the Usage text

svn path=/trunk/; revision=32139
2008-02-05 15:31:12 +00:00
Colin Finck faa96fba14 - Don't set a fixed size for the application name, allocate the needed memory dynamically using AllocAndLoadString
- Small fixes to the german translation

svn path=/trunk/; revision=32138
2008-02-05 15:12:35 +00:00
Dmitry Chapyshev fe7fff143c - Add Russian translation
- Move application title to resources

svn path=/trunk/; revision=32137
2008-02-05 14:50:02 +00:00
ReactOS Portable Systems Group 8a8e8285a9 On ARM, it seems first = "true" parsing doesn't actually work in .rbuild files -- the object is not properly placed in the beginning of the FreeLDR text section.
As a workaround, a special "startup" section is now used to contain the boot.s code, and a linker flag is used to set this section as the entrypoint section at 0x8000.
FreeLDR for ARM now links properly, with _start at 0x8000.


svn path=/trunk/; revision=32136
2008-02-05 11:15:59 +00:00
ReactOS Portable Systems Group b9ad8e61be Fix a couple of problems with FreeLDR portability.
beep is now MachBeep since the code is not portable.
A variety of portable PE loading routines were in arch/loader.c for no reason. These are now in reactos/imageldr.c. arch/loader.c now only contains the architecture-specific ReactOS initialization code.
AcpiPresent was used on all builds, even though it's a non-portable x86-only flag. Now, ACPI detection itself, if present, will set the appropriate ACPI flag directly in the loader blog, so other architectures don't have to worry about exporting AcpiPresent;
DiskStopFloppyMotor is only relevant to x86, as is preparing for Video. MachVideoPrepareForReactOS has therefore been replaced by MachPrepareForReactOS as a generic pre-boot preparation routine.
Implemented MachPrepareForReactOS across current architectures to preserve functionality.


svn path=/trunk/; revision=32135
2008-02-05 11:13:17 +00:00
ReactOS Portable Systems Group 81cd907fc7 Implement ARM version of DbgBreakPoint in the RTL. We do a bkpt with a special value of 3 (to be as close as possible to x86 int 3).
Fix NtCurrentTeb definition for ARM. We will expose the KPCR to user-mode much like KUSER_SHARED_DATA on x86 (this is how ARM-CE and NT-MIPS do it) and link the TEB there.


svn path=/trunk/; revision=32134
2008-02-05 11:08:34 +00:00
Gregor Brunmar d796fed021 Fixed an infinite loop in IDirect3D::GetAdapterIdentifier()
svn path=/trunk/; revision=32133
2008-02-05 06:37:48 +00:00
ReactOS Portable Systems Group 525c69f0c1 Build FreeLDR for ARM.
We merely provide a _start entrypoint stub and two stub architecture files with no functions implemented.
We also supply the proper ARM configuration settings in the .rbuild files, and add the necessary headers.
FreeLDR can now be compiled (along with rossym, libcntptr, rtl and cmlib) but it will not link until the actual ARM code is implemented.

svn path=/trunk/; revision=32132
2008-02-05 03:06:20 +00:00
ReactOS Portable Systems Group 57ad1f5f20 Add basic arm target support to the build system.
Reactos-arm.rbuild uses the same settings as the x86 version, but defines _ARM_ and __arm__ instead. _M_ARM is already defined by the compiler.
Add ARM system call stub support to ncitool. We are currently using a SWI 0x2E to achieve this.
Add ARM support to winnt.h.
Add a preliminary intrin_arm.h
Add ketypes.h and mmtypes.h for ARM in the NDK. For now these are mostly stubs to allow compiling to work.
Add ARM support to winddk.h.
Fix some broken x86-only assumptions in the NDK.
Add config-arm-template.rbuild. By defauilt we build for armv5te (armv4 and v5 are supported, not v6).
Set ROS_ARCH=arm to switch to ARM. Set ROS_PREFIX to an appropriate MinGW-32 ARM PE crosscompiler.


svn path=/trunk/; revision=32131
2008-02-05 02:58:28 +00:00
ReactOS Portable Systems Group 3be034d2ce The Windows headers include a file called ioaccess.h in the ddk folder, which exposes various READ/WRITE_PORT/REGISTER_ routines as inlined macros for various architectures (PPC, MIPS, AMD64, IA64, X86), making use of the MSVC compiler-intrinsics (inp, outp, etc). Since ReactOS already has those intrinscs implemented, we've also created an ioaccess.h w32api header file which makes use of them.
We can now remove the portio.h and portio.c files in FreeLDR, since there's no more need to duplicate this code.
Additionally, this can be also done with the PPC port of FreeLDR or any other architecture, since it doesn't require per-architecture support in FreeLDR anymore -- only the underlying intrinsics in intrin.h must be implemented (note that for PPC, MIPS and ARM, the notion of a port doesn't even exist -- those functions map to register-reading functions, where register basically means memory).


svn path=/trunk/; revision=32130
2008-02-05 02:40:08 +00:00
ReactOS Portable Systems Group 74e7cbf5b8 --- FIXED COMMIT LOG FOR r32128. NO CHANGES IN THIS REVISION ---
Implement ramdisk support for FreeLDR (ramdisk.c and ramdisk.h). The implementation is portable across all architectures.
We also define a virual ramdisk file (hardcoded name is reactos.img, on the boot volume) for testing ramdisk support on architectures without native ramdisk support (such as x86). This could be further extended to allow network booting as a ramdisk at a later time, but is now primarly for test purposes.
We introduce two new FreeLDR command-line parameters that should be sent by non-x86 firmware: rdbase and rdsize, and a new freeldr.ini ARC path: ramdisk(0) -- this is compatible with Windows.
For compatibility and status output, we use 8MB chunks for reading virtual ramdisk files (a dot is displayed for each additional 8MB chunk).
Finally, for code-reuse, the ramdisk implementation will "steal" the BIOS support routines in the arch-vtable and replace them with simple memcpy wrappers. To the disk/filesystem routines in FreeLDR, they think they are reading from the BIOS (or other firmware), but instead, the sector reads are coming from memory).
For now, only FAT ramdisks have been tested, and a sector size of 512 bytes is implied. We also disable the FAT block cache since it wouldn't make much sense to cache RAM.
*** Note that kernel ramdisk support is missing, so once the kernel attempts to load drivers from the boot device (ramdisk(0)), it will panic. This is currently non an issue on non-x86 builds since the kernel won't get that far for a while.


svn path=/trunk/; revision=32129
2008-02-05 01:39:22 +00:00
ReactOS Portable Systems Group 0e6d37fe00 Implement ramdisk support for FreeLDR (ramdisk.c and ramdisk.h). The implementation is portable across all architectures.
We also define a virual ramdisk file (hardcoded name is reactos.img, on the boot volume) for testing ramdisk support on architectures without native ramdisk support (such as x86). This could be $
We introduce two new FreeLDR command-line parameters that should be sent by non-x86 firmware: rdbase and rdsize, and a new freeldr.ini ARC path: ramdisk(0) -- this is compatible with Windows.
For compatibility and status output, we use 8MB chunks for reading virtual ramdisk files (a dot is displayed for each additional 8MB chunk).
Finally, for code-reuse, the ramdisk implementation will "steal" the BIOS support routines in the arch-vtable and replace them with simple memcpy wrappers. To the disk/filesystem routines in Fre$
For now, only FAT ramdisks have been tested, and a sector size of 512 bytes is implied. We also disable the FAT block cache since it wouldn't make much sense to cache RAM.
$lds since the kernel won't get that far for a while.


svn path=/trunk/; revision=32128
2008-02-05 01:29:49 +00:00