Commit graph

48560 commits

Author SHA1 Message Date
Cameron Gutman 885910a88e [ACPI]
- The width parameter in AcpiOsReadPciConfiguration and AcpiOsWritePciConfiguration was in bits but we were treating it as a width in bytes
- This caused overreads, memory corruption, and crashes when these functions were called (VMWare was particularly picky about bad accesses to the PCI configuration space)
- A hack was (unknowingly) added which prevented some crashes but had a side-effect of causing the partial disruption of ACPI's PCI configuration space accesses while the others that went through wrote bad data to the PCI config space or corrupted kernel memory

svn path=/trunk/; revision=53880
2011-09-28 04:05:34 +00:00
Timo Kreuzer b60019815f [FREELDR]
Try to fix boot with rbuild

svn path=/trunk/; revision=53879
2011-09-27 23:58:47 +00:00
Timo Kreuzer 0972356c55 [FREELDR]
- Modify some memory types to match what windows uses
- Modify PcMemGetBiosMemoryMap, so that is crops free memory to page alignment, while extending non-free memory to page alignment. This way we don't loose small firmware descriptors like the one for the extended bios data area enumerated by the bios. Fixes a warning from win 2003 about not owned memory.
- Modify MempAddMemoryBlock to map LoaderFirmwarePermanent into kernel space like ntldr, but don't map page 0! ntldr doesn't do that either. Also map LoaderXIPRom.
- After generating memory descriptors from the page lookup table, add any descriptor from the bios memory table, that is higher than MmHigestPhysical address, so we don't loose high rom descriptors. Do not map beyond LoaderPagesSpanned.

svn path=/trunk/; revision=53878
2011-09-27 22:43:52 +00:00
Amine Khaldi bed4f24279 [CMAKE]
* Prefix with ccache only when compiling c/c++ objects.
* Show a note when ccache build is enabled.

svn path=/trunk/; revision=53877
2011-09-27 21:21:59 +00:00
Timo Kreuzer bf557a26c1 [FREELDR]
- copy ebp into REGS structure on Int386
- Write pointer and size of extended bios data area in physical page 0 location 0x740 and pointers to vga rom fonts in location 0x700. This is required by windows 2003's videoprt. Now freeldr is more Windows 2003 ready then ever!

svn path=/trunk/; revision=53876
2011-09-27 20:25:51 +00:00
Timo Kreuzer 5bfa5255bf [FREELDR]
Add ebp to the bios register set.

svn path=/trunk/; revision=53875
2011-09-27 19:29:52 +00:00
Thomas Faber 23b2b84ce7 [SHELL32_WINETEST]
- Fix MSVC build. This is a (partial) Winesync

svn path=/trunk/; revision=53874
2011-09-27 19:07:21 +00:00
Eric Kohl b8329db06a [APITESTS]
Add service tag tests.

Patch by Thomas Faber.

svn path=/trunk/; revision=53873
2011-09-27 13:06:33 +00:00
Eric Kohl 03bd308646 [SERVICES]
Assign a new Tag to new or changed services.

Patch by Thomas Faber!
See issue #6147 for more details.

svn path=/trunk/; revision=53872
2011-09-27 12:42:42 +00:00
Giannis Adamopoulos d3cccfe25f [shell32]
- Fix auto complete init method based on Wine. Autocomplete shell tests should no longer crash now.
- Brought to you by Claudiu Mihail.

svn path=/trunk/; revision=53871
2011-09-27 11:58:19 +00:00
Amine Khaldi 1b664f1b5f [NTOSKRNL]
* Fix CMake build...

svn path=/trunk/; revision=53870
2011-09-26 23:31:30 +00:00
Amine Khaldi 81eb1cb2fc [SHELL32]
* Implement CDefView::SetCurrentViewMode based on Wine, along with some other bugfixes. Shell32 shlview winetest doesn't crash anymore as a result.
* Brought to you by Claudiu Mihail.

svn path=/trunk/; revision=53869
2011-09-26 23:10:38 +00:00
Aleksey Bragin 3d1b20c1dc [NTOS]
- Introduce two MM_EMPTY_LIST definitions - one for PTE as a whole and one for MMPTE_LIST NextEntry field only and move them to the actual architecture specific headers.
- Implement special pool. This is a special (Capt. Obvious!) kernel pool which is used to catch overruns or underruns, freed memory access and perform additional validation for paged/nonpaged allocations access.

svn path=/trunk/; revision=53868
2011-09-26 21:57:40 +00:00
Amine Khaldi d8d714608b [SHELL32]
* Implement more functions based on Wine. By Claudiu Mihail.

svn path=/trunk/; revision=53867
2011-09-26 19:55:35 +00:00
Giannis Adamopoulos 58a5ac1564 [comctl32]
- Do not subclass user32 controls when themes are disabled.This is a temporary hack bacause it turns out that subclassing causes problems. When it is fixed this will be reverted. This change means that in order to make themes work properly, the user has to reboot after enabling.

svn path=/trunk/; revision=53866
2011-09-26 19:36:01 +00:00
Timo Kreuzer 78da5b4e0a [INSTALLFREELDR]
Add to cmake build (built on demand)

svn path=/trunk/; revision=53865
2011-09-26 19:04:02 +00:00
Timo Kreuzer b2a2d9d793 [FREELDR]
- Fix memory type for hal and referenced dlls
- Don't allocate the LPB, MADs and all the other stuff from the heap, instead allocate one block of memory for the LPB, extension, etc and strings (fits into one page) and another page for the MADs limit to 200 MADs, 1024 is way over the top)
- Map only those pages into kernel mode, that the kernel will need, this way we don't need to unmap anything later.

svn path=/trunk/; revision=53864
2011-09-26 16:06:19 +00:00
Amine Khaldi 6f431e5648 [SHELL32]
* Implemented CDefView::GetSpacing based on Wine. By Claudiu Mihail.

svn path=/trunk/; revision=53863
2011-09-26 15:43:19 +00:00
Dmitry Gorbachev b592d6cd16 [NTOSKRNL]
- Do not reference/dereference device node, but device object.
- Fix compiler warning.

svn path=/trunk/; revision=53862
2011-09-26 15:35:24 +00:00
Timo Kreuzer a7a2617223 [HAL]
- Fix a typo in HalpAllocPhysicalMemory, that caused the function to remove MADs that still had pages rather than removing those who are empty. Fixes an assertion on VMWare.
Kudos go to Kamil for tracking it down.
- Fix another bug in HalpAllocPhysicalMemory, where the size of the newly allocated MAD was set to the alignment value instead of the original MAD, this lead to conflicting MADs and possible reuse of hal memory by the kernel. This seems to fix a bugcheck 0x19 with halacpi.

svn path=/trunk/; revision=53861
2011-09-26 15:01:11 +00:00
Eric Kohl 2eb01ed674 [DISKPART]
Install diskpart.

svn path=/trunk/; revision=53860
2011-09-26 09:21:11 +00:00
Pierre Schweitzer f5465755dc [NTOSKRNL]
Fix FsRtlIs*InExpression() by (finally) implementing backtracking.
No regressions noticed regarding kmtest.
Also commented code.

svn path=/trunk/; revision=53859
2011-09-26 05:58:13 +00:00
Pierre Schweitzer d858435e44 [KMTEST]
Add more tests for FsRtlIs*InExpression()
Those are currently failing on ReactOS

svn path=/trunk/; revision=53858
2011-09-26 05:51:39 +00:00
Timo Kreuzer aac37d162e [FREELDR]
- Get rid of MmAllocateMemory, freeing about 1MB of low physical memory for the kernel
- verify that MmMarkPagesInLookupTable is not called with invalid page regions
- add maximum allocation to heap statistics

<long explanation>
There was a function called MmAllocateMemory, what was commented as "// Temporary forwarder..." since January 2008. This function allocated one page of memory and marked it as LoaderOsLoaderHeap. This function was used by the fat filesystem code (and linuxboot.c) which allocated and freed memory in small chunks all the time. Since MmFreeMemory() is not implemented at all (obviously someone removed it) we were allocating one full page for allocations as small as 8 bytes and never free them. This accumulated to a total of 240 pages, almost 1MB, split into into 14 chunks. This memory was never freed by the kernel (the kernel keeps the loader heap memory for some reason) and fragmented the low memory region.
Remove MmAllocateMemory completely and replace references in the fat code with MmHeapAlloc. The maximum heap usage after this was 184 KB, heap size is 4MB. 
</long explanation>

svn path=/trunk/; revision=53857
2011-09-25 19:19:50 +00:00
Amine Khaldi b1da30c092 [ACTPRXY]
* Enclose midl-incompatible declarations as widl-only. Fixes actxprxy MSVC build.

svn path=/trunk/; revision=53856
2011-09-25 16:28:58 +00:00
Giannis Adamopoulos dc6c2f8e88 [user32_apitest]
- In TrackMouseEvent tests, use mouse_event function to move the mouse cause this causes low level hooks to be called and SetCursorPos doesn't
- Test low level mouse hooks for TrackMouseEvent
- Test ways to block WM_MOUSEHOVER and WM_MOUSELEAVE. This is useful to detect where each message is generated
- clean up the code a bit by adding FLUSH_MESSAGES macro that checks for expected message queue status and flushes the message queue

svn path=/trunk/; revision=53855
2011-09-25 16:05:09 +00:00
Dmitry Gorbachev c334575fcd [Explorer]
Link with libmingw32.

svn path=/trunk/; revision=53854
2011-09-25 16:02:29 +00:00
Dmitry Gorbachev 5be9321dae [NTOSKRNL]
Disable mouse when reading from keyboard port.

svn path=/trunk/; revision=53853
2011-09-25 16:02:14 +00:00
Dmitry Gorbachev e66ae73d2b [PSDK]
Remove duplicate lines, noticed by sharpsighted forum people.

svn path=/trunk/; revision=53852
2011-09-25 16:01:44 +00:00
Rafal Harabien 3b040dbb1e [SYSDM] - Improve polish translation of virtual memory dialog
svn path=/trunk/; revision=53851
2011-09-25 12:15:01 +00:00
Eric Kohl fc001348ab [SERVICES]
- Silence debug messages.
- Fix typos.
- Add missing database locks.
- RControlService: Return ERROR_INVALID_PARAMETER on illegal control code.

svn path=/trunk/; revision=53850
2011-09-25 12:07:52 +00:00
Rafal Harabien c8e41d9f48 [SYSDM]
- Don't give UINT to printf if %I64u is used
- Minor improvements
See issue #6501 for more details.

svn path=/trunk/; revision=53849
2011-09-25 11:29:45 +00:00
Rafal Harabien c3d6d99666 [FREELDR]
- Improve tracing
- Fix memory corruption caused by marking pages outside of page lookup table (when table is allocated only free pages was counted but MmMarkPagesInLookupTable was used for all types of memory like firmware). Fixes bugcheck in ACPI HAL which happened for me

svn path=/trunk/; revision=53848
2011-09-25 11:07:27 +00:00
Timo Kreuzer fcb42db05d [NTOSKRNL]
- also disable "MTRR support detected but not yet taken advantage of"

svn path=/trunk/; revision=53847
2011-09-25 09:16:10 +00:00
Timo Kreuzer 6caabd812a [NTOSKRNL]
- Undo disabling of systemcalls, which was disabled in r53646 for testing purpose.
- Sillence "Support for SYSENTER detected." debug print, since its the normal case, only keep the disabled and not present cases.
- Silence "xxx support detected but not yet taken advantage of" debug prints. CPU features are already reported and there is no point in printing every single feature we do not support.
- Invert if/else in KiRestoreFastSyscallReturnState

svn path=/trunk/; revision=53846
2011-09-25 09:12:26 +00:00
Rafal Harabien b0aeafc91e - Commit forgotten file...
svn path=/trunk/; revision=53845
2011-09-24 20:01:04 +00:00
Rafal Harabien cdbf35509d [MKHIVE] - Get all INF files from command line instead of using hardcoded names
[CMAKE] - Use new mkhive syntax and fix livecd hives dependences
[RBUILD] - Use new mkhive syntax

svn path=/trunk/; revision=53844
2011-09-24 19:59:56 +00:00
Dmitry Gorbachev 951066d094 [BUGCODES]
Bug check code 0x5d is UNSUPPORTED_PROCESSOR.

[NTOSKRNL]
Use it.

svn path=/trunk/; revision=53843
2011-09-24 18:13:57 +00:00
Aleksey Bragin 6bed73a4e1 [BUGCODES]
- Add SPECIAL_POOL_DETECTED_MEMORY_CORRUPTION definition.

svn path=/trunk/; revision=53842
2011-09-24 17:33:54 +00:00
Dmitry Gorbachev 7253e6bc9d [FREELDR]
Add FREELDR_MEMORY_DESCRIPTOR structure using TYPE_OF_MEMORY instead of 
MEMORY_TYPE. Use it in place of MEMORY_DESCRIPTOR. Undo r53837 changes.

svn path=/trunk/; revision=53841
2011-09-24 17:25:29 +00:00
Amine Khaldi 4ab9552831 [FREELDR/SETUPLDR]
* Add _dbg versions of freeldr_pe and setupldr_pe per Dmitry's request. They retain debug info, and they're compiled on-demand (not included in the normal build).

svn path=/trunk/; revision=53840
2011-09-24 16:08:37 +00:00
Eric Kohl 388f99e67e [SMSS]
Fix wrong behavior of the "native applications startup at boot time" feature in SMSS.

Modifications:
- Added missing buffer allocation checks.
- Check for presence of default path.
- Minor clean-ups.
- Fix bad indentation/coding style.

Original patch by Hermès BÉLUSCA.
See issue #6180 for more details.

svn path=/trunk/; revision=53839
2011-09-24 15:12:52 +00:00
Timo Kreuzer adaa2b8e63 [NTOSKRNL]
- Cleanup amd64 mm.h header
- Call MiScanMemoryDescriptors earlier, since it doesn't depend on anything except the loader block.
- MiComputeColorInformation() and the calculation of the pfn database size are portable, so move them out of MiInitMachineDependent

svn path=/trunk/; revision=53838
2011-09-24 14:22:13 +00:00
Dmitry Gorbachev 62b3a707c7 [FREELDR]
Compare with constants of right type.

svn path=/trunk/; revision=53837
2011-09-24 13:39:14 +00:00
Dmitry Gorbachev 8a0fec1a86 [User32]
Check return value of DIB_GetBitmapInfo.

svn path=/trunk/; revision=53836
2011-09-24 13:37:24 +00:00
Giannis Adamopoulos 0c34695bab [user32_apitest]
- Add one more small test for WM_SYSTIMER

svn path=/trunk/; revision=53835
2011-09-24 12:22:21 +00:00
Kamil Hornicek 1db290c144 another try to fix cmake build
svn path=/trunk/; revision=53834
2011-09-24 12:16:04 +00:00
Cameron Gutman 815184cde3 [ACPI]
- Reduce debug spam
- Report critical initialization failure

svn path=/trunk/; revision=53833
2011-09-24 12:05:43 +00:00
Giannis Adamopoulos aa39ad7260 [user32_apitest.exe]
- Fix gcc build

svn path=/trunk/; revision=53832
2011-09-24 12:05:14 +00:00
Cameron Gutman c21792df52 [HAL]
- Report table lookup failures
- Report supported ACPI version

svn path=/trunk/; revision=53831
2011-09-24 12:01:48 +00:00