Commit graph

43148 commits

Author SHA1 Message Date
Timo Kreuzer
5dd4d18e01 [FREELDR]
- In the fat bootsector, don't clobber ax, it contains the number of first cluster of freeldr.sys and is used by the fathelper code.
- Fix jump code in the fathelper code, like in the other bootsectors.
- Now booting from fat partitions (looks like that's what sysreg does) works again. It's safe under the condition that the cluster size is at least 4352 bytes, which is true for harddisks of sizes bigger than 272MB. Booting from smaller fat disks, like floppy breaks when freeldr.sys gets fragmented, which should rarely happen.

svn path=/trunk/; revision=48177
2010-07-22 03:29:25 +00:00
Sir Richard
c30930d3ec [NTOS]: MiRosTakeOverPebTebRanges now creates a small ~1MB ARM3 memory range on top of the ReactOS per-process VA. This does a couple of things: First of all, it changes the default PEB address to another static address. Still not dynamic like it will be soon, but at least it changes it a bit so we can test if anything breaks due to that. It also likewise changes the addresses of the TEBs (Shifted down by 1MB, basically). Finally, it blocks off that part of address space, which nobody should be using now, to see if anyone does indeed touch it.
[NTOS]: Knowing if this change causes issues will help later in determining regressions due to TEB/PEBs mapped as VADs by ARM3, and regressions simply due to the change in VA layout.
[NTOS]: When implemented, the VAD mapping for PEB/TEB will only use that ~1MB, which yes, will limit ReactOS processes to each have only 256 threads. That is obviously a temporary limitation, one I doubt we'll even hit, but I'm putting it out here so you know.

svn path=/trunk/; revision=48176
2010-07-22 03:22:43 +00:00
Sir Richard
d403f0ffd4 [NTOS]: Learn to build User PTEs as well, with MI_MAKE_HARDWARE_PTE_USER.
[NTOS]: MI_MAKE_HARDWARE_PTE becomes MI_MAKE_HARDWARE_PTE_KERNEL, since it assumed this. MI_MAKE_HARDWARE_PTE is now a "generic" you can use when you don't know what the PTE should be. It uses MiDetermineUserGlobalMask to set the right bits.
[NTOS]: Add two more helpers: MI_IS_PAGE_TABLE_ADDRESS and MI_IS_SYSTEM_PAGE_TABLE_ADDDRESS. One is in the symbols, the other I made up to make things clearer.
[NTOS]: MiResolveDemandZeroFault now knnows how to resolve user-demand-zero-faults.
[NTOS]: Implement MiZeroPfn to do the actual zeroing during user-demand-zero-faults (also later for VAD faults).

svn path=/trunk/; revision=48175
2010-07-22 02:20:27 +00:00
Sir Richard
7c3bc09fa1 [NTOS]: Add missing definitions, should fix build.
svn path=/trunk/; revision=48174
2010-07-22 02:10:43 +00:00
Sir Richard
40e4bc04b5 This patch introduces a highly-shareable version of AVL trees both for RTL usage and for ARM3's MM_AVL_TABLE/MMADDRESS_NODE structures used by VADs on Windows (and soon, ReactOS):
[RTL]: Uncouple generic table from AVL table implementation into its own avltable.c
[RTL]: Get rid of "Austin" and fix prototypes of AVL table functions.
[RTL]: Re-implement AVL table functions, sharing as much code as possible with the SPLAY tree implementation which is pretty decent. Lookup, insert, enumeration are implemented, but not delete.
[RTL]: Make large part of the RTL AVL package into its own "support" file that can work both with MMADDRESS_NODE and RTL_BALANCED_LINKS structures. The former is used by ARM3 for VADs.
[NTOS]: Implement basic VAD AVL tree routines (Insert, LookupEmpty, GetPrevious, CheckForConflict, Locate). This is enough to insert VADs, find a free address range, and locate a VAD by address. No delete yet
Thanks to Timo Kreuzer for some clever definitions, Knuth for his genius, several online C implementations for ideas, the HPI kernel blog for insight on how Windows does it, and others.

svn path=/trunk/; revision=48173
2010-07-22 01:41:45 +00:00
Sir Richard
23e18538f1 [NDK]: Add all the definitions regarding VADs.
svn path=/trunk/; revision=48172
2010-07-22 01:41:20 +00:00
Sir Richard
1ceb6d5850 [NDK]: Add missing RTL AVL Tree definitions, when used by user-mode applications.
svn path=/trunk/; revision=48171
2010-07-22 01:09:43 +00:00
Amine Khaldi
94896e3157 [PSDK]
- Forgot to commit this.

svn path=/trunk/; revision=48170
2010-07-21 23:47:33 +00:00
Amine Khaldi
281e92894d [DDK/NDIS]
- Group some related definitions.
- Remove some duplicated NDIS_MINIPORT_MAJOR_VERSION/NDIS_MINIPORT_MINOR_VERSION combinations.
- Add some missing NDIS_LEGACY_DRIVER guards.
- _ANONYMOUS_UNION -> __MINGW_EXTENSION
- Update NDIS_PROCESSOR_TYPE and NDIS_INTERFACE_TYPE.
- Guard NDIS_GENERIC_OBJECT with NDIS_SUPPORT_NDIS6.
- Add missing NDIS_WAN_GET_STATS, NdisAllocateGenericObject, NdisFreeGenericObject, fPACKET_WRAPPER_RESERVED and NDIS_FLAGS_* definitions.
- PNDIS_PACKET_POOL : HANDLE -> NDIS_HANDLE.
- Improve MEDIA_SPECIFIC_INFORMATION
- Some minor formatting.

svn path=/trunk/; revision=48169
2010-07-21 23:32:51 +00:00
Timo Kreuzer
b03d6b06cd [RBUILD]
Generate an RSP rule for the bootloader, this fixes "input line too long" error reported by tower.

svn path=/trunk/; revision=48168
2010-07-21 23:17:12 +00:00
Jérôme Gardou
efc09eb443 update README.WINE
svn path=/trunk/; revision=48167
2010-07-21 21:28:31 +00:00
Amine Khaldi
ec46e3cec9 [DDK/NDIS]
- Add missing ntstatus.h inclusion.
- Group some related definitions.
- Add several missing ones.

svn path=/trunk/; revision=48165
2010-07-21 19:12:14 +00:00
Sir Richard
f9444f0c52 [NTOS]: Handle faults on user-mode addresses, from user-mode processes, if they are owned by ARM3, so they can be forwarded to the VAD fault handler.
svn path=/trunk/; revision=48164
2010-07-21 18:09:31 +00:00
Sir Richard
e6cdd4d0fd [NTOS]: If the memory area is owned by ARM3, and it's being freed, don't touch the pages, just unlink it and free the memory. This is useful for MAREAs being used by ARM3 to protect pieces of address space from the Ros Mm Allocator, but when we don't want it to start playing with our pages. When we do free those MAREAs, keep it away!
svn path=/trunk/; revision=48163
2010-07-21 17:58:09 +00:00
Amine Khaldi
ce8b9f4fcb [CRT]
- Improve NULL definition.

svn path=/trunk/; revision=48162
2010-07-21 17:26:00 +00:00
Timo Kreuzer
f0daba18dd [CRT]
- Add a number of amd64 specific math functions
- add generic c versions of cos and sin
- Remove leading underscores from amd64 symbols

svn path=/trunk/; revision=48161
2010-07-21 16:03:44 +00:00
Timo Kreuzer
6c98c1057f [GDIPLUS]
On amd64 builds link gdiplus to crt

svn path=/trunk/; revision=48160
2010-07-21 15:55:51 +00:00
Gabriel Ilardi
11a32bcc42 [DESK]
- Implement theme quick preview. Patch by Katayama Hirofumi.

See issue #5525 for more details.

svn path=/trunk/; revision=48159
2010-07-21 12:20:18 +00:00
Timo Kreuzer
8d8f884623 [MINGW]
Remove broken _fmode declaration

svn path=/trunk/; revision=48158
2010-07-21 03:22:27 +00:00
Timo Kreuzer
147a7b6fc9 [stdlib.h]
- Improve definition of __mb_cur_max and related
- properly handle _M_CEE_PURE

svn path=/trunk/; revision=48157
2010-07-21 02:55:59 +00:00
Timo Kreuzer
398f20dacd [NTDLL]
Add _setjmp, _setjmpex and longjmp exports on amd64

svn path=/trunk/; revision=48156
2010-07-21 02:53:24 +00:00
Timo Kreuzer
240c411b7d [RSYM64]
Silence annoying error messages

svn path=/trunk/; revision=48155
2010-07-21 02:52:37 +00:00
Timo Kreuzer
0b2826db83 [MINGW]
link mingw_common to oldnames and ntdll

svn path=/trunk/; revision=48154
2010-07-21 02:04:49 +00:00
Timo Kreuzer
0bb23409ed [ATAPI]
Link to libcntpr to resolve memmove

svn path=/trunk/; revision=48153
2010-07-21 01:07:19 +00:00
Timo Kreuzer
d7f170a4ee [setjmp.h]
Add mingw_getsp as inline function

svn path=/trunk/; revision=48152
2010-07-21 00:31:14 +00:00
Timo Kreuzer
0711c75539 [CRT]
- Add amd64 versions of setjmp / longjmp
- Add amd64 versions of chkstk_asm.s, seh.s to libcntpr

svn path=/trunk/; revision=48151
2010-07-21 00:26:51 +00:00
Timo Kreuzer
d7e775596d [FREELDR]
- Unify rbuild rule for freeldr, except for ppc, which uses elfexecutable

svn path=/trunk/; revision=48149
2010-07-20 21:38:58 +00:00
Timo Kreuzer
6e137a3c50 [BZIP2]
- remove hal from libs
- convert to spec

svn path=/trunk/; revision=48148
2010-07-20 21:29:48 +00:00
Eric Kohl
924ee8d9ef [FORMATTING]
No code changes.

svn path=/trunk/; revision=48146
2010-07-20 20:48:11 +00:00
Timo Kreuzer
a9b1042fdf [NTOSKRNL/FREELDR]
Add amd64 linker scripts

svn path=/trunk/; revision=48144
2010-07-20 19:38:22 +00:00
Amine Khaldi
3f25e73244 [MINGW-W64]
- Wrap MSVC intrinsics onto GCC builtins.
- Mark 'cookie' as an __UNUSED_PARAM.
- Tighten up _WIN64 conditioning.

svn path=/trunk/; revision=48143
2010-07-20 19:20:37 +00:00
Amine Khaldi
d0588d0064 [MINGW-W64]
- MSVC compatibility fixes.

svn path=/trunk/; revision=48142
2010-07-20 19:18:03 +00:00
Amine Khaldi
fc502885bc [FORMATTING]
- No functionality change.

svn path=/trunk/; revision=48141
2010-07-20 19:15:30 +00:00
Timo Kreuzer
154520a060 [ACCESS]
WRC doesn't like (x+x+x+2+x+x+x+x+x+x), use (x+x+x+x+x+x+x+x+x+2) instead. To figure out the reason is left as an exercise for the reader.

svn path=/trunk/; revision=48140
2010-07-20 19:10:02 +00:00
Timo Kreuzer
bd8190afa7 [EVENTVWR]
Add missing newline at end of file

svn path=/trunk/; revision=48139
2010-07-20 18:32:28 +00:00
Sylvain Petreolle
2bb936ad97 Remove BOM from UTF-8 rc files.
svn path=/trunk/; revision=48138
2010-07-20 16:37:22 +00:00
Amine Khaldi
88db16e943 [HEADERS]
- Make the header inclusion MSVC compatible.
- compstui now compiles with MSVC.

svn path=/trunk/; revision=48137
2010-07-20 15:51:44 +00:00
Timo Kreuzer
96353a5721 [FREELDR]
- Update isobtrt.asm to handle new PE bootloader, should fix bootcdregtest
- Disable debugging in isoboot.asm

svn path=/trunk/; revision=48136
2010-07-20 15:45:53 +00:00
Amine Khaldi
bc9f1e46f1 [HEADERS]
- Make the header inclusion MSVC compatible.
- localspl now compiles with MSVC.

svn path=/trunk/; revision=48135
2010-07-20 14:15:51 +00:00
Amine Khaldi
357f79fba6 [HEADERS]
- Make the header inclusion MSVC compatible.

svn path=/trunk/; revision=48134
2010-07-20 14:11:43 +00:00
Amine Khaldi
a92f03aea3 [MINGW-W64]
- Group MSVC related definitions.

svn path=/trunk/; revision=48133
2010-07-20 13:04:56 +00:00
Amine Khaldi
8d15da936a [ACPI]
- Define WIN32 when compiling with MSVC

svn path=/trunk/; revision=48132
2010-07-20 12:11:17 +00:00
Amine Khaldi
5be505d1b4 [MINGW-W64]
- Define WIN32_LEAN_AND_MEAN.
- Include stdlib.h for _winmajor.

svn path=/trunk/; revision=48131
2010-07-20 12:10:10 +00:00
Amine Khaldi
dfd1480154 [MINGW-W64]
- reactos.diff was pushed upstream, so it's not needed anymore.
- Add a missing section.
- Include sect_attribs.h into tlssup.c

svn path=/trunk/; revision=48130
2010-07-20 10:14:07 +00:00
Timo Kreuzer
280df5a49b [CMD]
Remove BOMs from rc files. Let me know if something's wrong with that.

svn path=/trunk/; revision=48129
2010-07-20 04:22:04 +00:00
Timo Kreuzer
ba97a937c2 [RBUILD]
For amd64 builds, invoke wrc directly, instead of using gcc to preprocess the files. The reason is that newer gcc versions (like 4.5.0) don't support multiline continuation  (backslash-newline) except for preprocessor directives, but that breaks wine resource strings. This might have to be done for i386 builds too, sooner or later.

svn path=/trunk/; revision=48128
2010-07-20 03:01:57 +00:00
Timo Kreuzer
0228d0009e [wine/commctrl.h]
Don't use #include_next, instead imclude psdk/commctrl.h

svn path=/trunk/; revision=48127
2010-07-20 02:53:55 +00:00
Timo Kreuzer
d2f3e93b11 [sdkddkver.h]
Add UL suffix to some constants.

svn path=/trunk/; revision=48126
2010-07-20 02:52:40 +00:00
Timo Kreuzer
a3d974ee28 [rpcndr.h]
Add a tag to NDR_SCONTEXT struct. MS headers don't have it, but gcc 4.5.x requires it, because without the tag, the struct would be from an unnamed namespace and can't be shared by different compilation units in C++. Yeah whatever...

svn path=/trunk/; revision=48125
2010-07-19 23:47:00 +00:00
Timo Kreuzer
2a5f6261a5 [FREELDR]
Convert freeldr and setupldr to PE format.
Previously freeldr was a raw binary file, which made handling by the bootsector very easy, but it disqualified it from proper debugging with gdb using symbols. This is possible with having unstripped PE files.
As we don't have any space to do proper PE loading from the bootsector (I already had to trim some strings to get enough space for the new jump code), we need to make sure, that the PE file doesn't contain a .bss section, which is achieved by a linker script. The next thing is to make sure, we don't have any symbols in the output file, because they would make freeldr too big to be loaded into memory and they are useless anyway. On the other hand we like to keep the symbols in the .nostrip.sys files if requested, as this is the primary purpose. This is in theory not a problem, as we could simply strip the file at the end, but binutils throw a monkey wrench in our plans: both strip and objcopy disrespect the file alignment and create unaligned sections, that don't naturally match their VAs. This is solved by hacking rbuild to do invoke ld 2 times, one time without and one time with the symbols (if requested).
Now the bootsectors also got some changes: instead of jumping to the loading address (0x8000) they get the address of the entry point from the image optional header. This is slightly simplified, by assuming the NtHeader begins at offset 0xE0. This finally allows source level debugging of freeldr with gdb.

svn path=/trunk/; revision=48124
2010-07-19 23:18:31 +00:00