Commit graph

220 commits

Author SHA1 Message Date
Hermès Bélusca-Maïto 10bff42ab6 Remove redundant extra terminating ';' in all of our C code.
svn path=/trunk/; revision=70690
2016-02-04 20:42:07 +00:00
Hermès Bélusca-Maïto f16214d4ed [BOOTVID]: CORE-10777 #comment Sync the Plan-9 font to ARM bootvid. Addendum to r70508.
svn path=/trunk/; revision=70509
2016-01-06 17:39:08 +00:00
Amine Khaldi 678997dfe9 [BOOTVID] Use plan 9 8x13 font from Markus Kuhn. Patch by Roy Tam. CORE-10777
svn path=/trunk/; revision=70508
2016-01-06 15:43:24 +00:00
Colin Finck 471c9fdae6 [BOOTVID]
Change the Blue Screen Font hardcoded into bootvid.dll to the Open Source "Anonymous Pro" font, which makes a nice 8x13 font.
Blue Screens now look like this: http://fs5.directupload.net/images/160106/ehv6245t.png

[BOOTVID_FONT_GENERATOR]
In case you find an even better font, you now have a nice little tool to test that font and generate the corresponding FontData array for bootvid.

svn path=/trunk/; revision=70507
2016-01-06 09:31:53 +00:00
Hermès Bélusca-Maïto f4e200b907 [KDCOM]
For MSVC builds (using KDCOM kd64 WinDbg protocol): Bail out for droppable packets after a given number of retries, if no debugger is attached (list of droppable packets can be found in http://articles.sysprogs.org/kdvmware/kdcom.shtml section "KDCOM protocol", subsection "Droppable packets").
CORE-10541 #resolve #comment Finally fixed in revision r70417!
CORE-7106

svn path=/trunk/; revision=70417
2015-12-25 18:43:16 +00:00
Hermès Bélusca-Maïto 716992c8c7 [KDCOM]
Do not use the "LoaderBlock->u.I386.CommonDataArea;" hack to use FreeLdr's DbgPrint function inside KDCOM, for the simple reason that while it works when KDCOM just initializes, the memory area where FreeLdr's DbgPrint function is, gets erased when ReactOS is running. As a result, all attempts to call the DbgPrint function when tracing something in KDCOM at the end of life of ReactOS, just fails lamentably (it hangs).
We therefore cannot rely on external code to provide us with DbgPrint. Instead, implement a very simple DbgPrint function inside KDCOM, as done by KDGDB.
The KD serial port serving for debugging KDCOM is chosen dynamically amongst the other free COM ports.

This needs to be also fixed in KDVM.

[KDGDB]
Instead of hardcoding the KD serial port number serving for debugging KDGDB, determine it dynamically amongst the other free COM ports.

svn path=/trunk/; revision=70405
2015-12-20 16:21:59 +00:00
Timo Kreuzer 06165f05bd [CMAKE]
Exclude some modules from ARM build

svn path=/trunk/; revision=67733
2015-05-14 22:31:12 +00:00
Timo Kreuzer 04cbcf8063 [CMAKE/BOOTDATA]
Implement support for decentralized registry inf files.
This is done with the new add_registry_inf() cmake function, which takes one or more inf files, which are then converted to UTF-16 and merged into a single registry.inf, which is then used to create the livecd hives and imported by usetup. Move the registry entries for some drivers out of hivesys.inf into separate files next to the driver.

svn path=/trunk/; revision=66952
2015-03-29 11:38:05 +00:00
Thomas Faber e7f2f6a078 [ACPI]
- Use more sensible pool tags
[NULL]
- Use pool tagging

svn path=/trunk/; revision=66920
2015-03-27 17:20:03 +00:00
Timo Kreuzer 526eda105e [KDVBOX]
Fix amd64 build

svn path=/trunk/; revision=66283
2015-02-15 11:13:30 +00:00
Amine Khaldi 117b0daf21 [KDVBOX] Properly handle the ASM source file.
svn path=/trunk/; revision=65814
2014-12-23 19:01:02 +00:00
Timo Kreuzer 69512e2d9b [KDVBOX]
Implement a virtualkd compatible kernel debugger transport DLL. I started this, because I didn't manage to get the original one working, but it turned out, the original one works, you only need to use the correct virtualkd version. Anyway, it's there now. A virtualkd version that works with VBox 4.3.16+ can be found here: http://forum.sysprogs.com/viewtopic.php?f=4&t=3370 or here: http://public.avast.com/~hnanicek/VirtualKd.zip
The folder is called kdvm, since I thought about adding support for VMWare as well, but here the original one probably works as well.
Also fix my email address in some files.

svn path=/trunk/; revision=65813
2014-12-23 17:48:16 +00:00
Hermès Bélusca-Maïto 9f24fbfec9 Partial merge of condrv_restructure branch r65657.
svn path=/trunk/; revision=65660
2014-12-14 22:57:49 +00:00
Hermès Bélusca-Maïto 1b2bbd97fa [KERNEL32][BEEP]
Int32x32To64 used with unsigned input values will cause unintentional sign extension. There is a lot of code in ROS that is still not fixed!!
Fixes BEEP sound. See also r64020, CORE-8502 and CORE-8505 for more details.
CORE-8505 #comment CsrCaptureTimeout and BEEP code fixed.

svn path=/trunk/; revision=65325
2014-11-08 16:35:05 +00:00
Amine Khaldi 2bdcf8789d [CMAKE]
* Make the minimum required version 2.8.
* Remove redundant psdk dependencies.
* Tidy up CMake files.

svn path=/trunk/; revision=64795
2014-10-17 23:28:29 +00:00
Amine Khaldi 0854129ae9 [KDCOM]
* Use set_module_type() instead of combining set_entrypoint() and set_image_base().

svn path=/trunk/; revision=64781
2014-10-17 11:12:03 +00:00
Jérôme Gardou 4e9593f906 [CMAKE]
- Introduce the kerneldll module type (like kernelmodedriver, but ending with .dll) and use it in various places
 - vfatx.dll whould in fact be a native DLL

svn path=/trunk/; revision=64526
2014-10-04 20:25:57 +00:00
Jérôme Gardou de914f2aed [KDGDB]
- As pid and tid 0 have a special meaning in GDB, use off-by-one thread and process ID when communicating with it
 - Properly read registers and memory from foreign thread and processes. (This time it was tested and proved to work reliably. __writecr3 ftw!)
 - Loop the list of processes and threads when trying to find them from ID, as PsLookupProessByThreadId and friends can't be used since we can be at any IRQL.
 - Add a few more debug prints to help diagnosing problems.
CORE-8531

svn path=/trunk/; revision=64166
2014-09-15 22:05:21 +00:00
Jérôme Gardou 6087abc76f [KDGDB]
- Fix an embarassing works-for-me but uncommited cast.
 - Add support for reading registers and memory from foreign threads. Highly experimental and nearly untested, use at your own risk.

svn path=/trunk/; revision=64156
2014-09-14 22:50:10 +00:00
Jérôme Gardou 31965e9804 [KDGDB]
- Always pass down the result of gdb_receive_packet up to KD, so that it knows when a breakin packet was received. (CTRL-C) now works!
 - Generalize the use of the Send <-> ManipulateState callbacks for a better code reading.
 - Get the exception context as soon as it is thrown (instead of playing with the PRCB)
 - Improve the way we attach to GDB: on the first KD call, we set KdContext->ControlCPending so that KD throws an exception. That way we can first initialize our KD stuff, and then quietly attach to GDB
 - Implement the 'p' (get one register) GDB request.
GDB is now much more reliable.

svn path=/trunk/; revision=64154
2014-09-14 20:45:30 +00:00
Jérôme Gardou dcade423c6 [KDGDB]
- It can happen that GDB issues something else than qsThreadInfo after qfThreadInfo
 - Properly clean up the callbacks after handling a custom Send/ManipulateState loop

svn path=/trunk/; revision=64146
2014-09-14 14:28:05 +00:00
Jérôme Gardou 38ca96eb96 [KDGDB]
- Improve the 'm' (read memory) gdb request

svn path=/trunk/; revision=64145
2014-09-14 14:27:58 +00:00
Jérôme Gardou 50d072fe6a [KDGDB]
- Add support for the qfThreadInfo GDB request

svn path=/trunk/; revision=64144
2014-09-14 14:27:44 +00:00
Jérôme Gardou 1bbea7c093 [KDGDB]
- Add a callback mechanism permitting to "simulate" KD send <-> receive loop without having to actually communicate to GDB
 - Use that to update the program counter when cont'ing a breakpoint
Now cont'ing an assertion failure is possible, since we actually get beyond the int 3 instruction

svn path=/trunk/; revision=64127
2014-09-12 20:23:08 +00:00
Jérôme Gardou 9cc2b4e75c [KDGDB]
- introduce KDGDB, a KDCOM-like DLL, wrapping the KD protocol and the GDB remote protocol together.
It is not fully functional, but for now it permits source-level debugging in some modules. More will be added as I feel the need and find the time to work a bit more on it. (That is, unless an angel comes and resume the work)
To use it, set GDB and _WINKD_ to TRUE in your CMakeCache.txt. Using separate debug symbols is also a good idea.

svn path=/trunk/; revision=64121
2014-09-11 20:55:42 +00:00
Timo Kreuzer e5134bc5e0 [SPEC2DEF] Add support for ARM asm stub generation
[HALARM] Add a dummy CMakeLists.txt
[BOOTVID] Fix ARM compilation

svn path=/trunk/; revision=64039
2014-09-05 20:07:53 +00:00
Hermès Bélusca-Maïto 4948419f9f [BOOTVID]
- Synchronize correctly arm/bootdata.c with i386, as it was done previously.
- Code formatting: whitespace fixes, add braces/brackets and spaces where needed; comments styling.
- Correctly put braces for casts and around macro parameters.
- Add some IN/OUT.
- Fix parameter names of a function.

[INBV]
- Fix parameter names of two functions.

svn path=/trunk/; revision=64017
2014-08-31 23:00:29 +00:00
Timo Kreuzer df0efd5556 [DDK/XDK/NTOSKRNL/DRIVERS]
Fix incompatible definition of a number of NTOSKRNL data imports. These imports are declared in MS DDK in a way that is usually not how you would declare data imports. The proper way of doing it is using _DECLSPEC_INTRIN_TYPE(dllimport) or in this case NTKERNELAPI, which will cause the compiler to directly dereference the __imp__FooBar symbol. MS has declared some of these variables directly as pointers without using dllimport. This works with MS DDK, since it's import libraries contain aliases (like _FooBar) to the import symbols (__imp__FooBar). Neither MS LINK nor DLLTOOL create these aliases in the import libs, which is good, since hacks like these are dangerous. To make the original declarations work without using macros (which can conflict with other things, like for example the KdDebuggerEnabled member in KUSER_SHARED_DATA) these aliases have to be generated differently. Luckily both MSVC and GCC support a pragma that does exactly this. Fix the incompatible use in our drivers and the broen(!) use of KdDebuggerEnabled in kdcom (which was writing a PBOOLEAN value (FALSE == 0 == NULL, so no warning) into the location that is really a BOOLEAN, possibly overwriting other data. Finally get rid of a number of hacks in ntoskrnl, where prefixed versions were used to not conflict with the DDK definitions.

svn path=/trunk/; revision=63247
2014-05-11 23:11:16 +00:00
Pierre Schweitzer 984e312a11 [NMIDEBUG]
Properly declare with FORCEINLINE

svn path=/trunk/; revision=63150
2014-05-04 09:42:28 +00:00
Pierre Schweitzer 43c58abe03 [BOOTVID]
Properly declare with FORCEINLINE

svn path=/trunk/; revision=63149
2014-05-04 09:41:58 +00:00
Hermès Bélusca-Maïto b819608ed8 Create a branch for console restructuration work.
svn path=/branches/condrv_restructure/; revision=63104
2014-05-02 14:13:40 +00:00
Amine Khaldi a4a1fab753 [DRIVERS]
* Prepare the CMake scripts for PCH.
CORE-7716

svn path=/trunk/; revision=62077
2014-02-09 17:28:01 +00:00
Amine Khaldi 71f408a887 [DRIVERS]
* Add header guards to the main headers.
CORE-7716

svn path=/trunk/; revision=62006
2014-02-06 11:18:34 +00:00
Amine Khaldi cf290173f4 [KDCOM]
* Remove one time inclusions from the main header and put them back where they belong.
* Improve header inclusions.
CORE-7716

svn path=/trunk/; revision=61853
2014-01-27 22:23:24 +00:00
Amine Khaldi 268afe1faf [CONDRV]
* Remove one time inclusions from the main header and put them back where they belong.
* Improve header inclusions.
CORE-7716

svn path=/trunk/; revision=61852
2014-01-27 12:29:29 +00:00
Hermès Bélusca-Maïto beed0625d8 [BEEP]: Convert to LONGLONG before doing the multiplication (or: use our macro Int32x32To64): avoids overflows.
svn path=/trunk/; revision=61848
2014-01-27 00:30:12 +00:00
Amine Khaldi ae7c4bf21d [BOOTVID]
* Remove one time inclusions from the main header and put them back where they belong.
* Improve header inclusions.
CORE-7716

svn path=/trunk/; revision=61841
2014-01-26 20:24:59 +00:00
Amine Khaldi f7e37445bc [KDCOM]
* Do not include debug.h into the main header.
CORE-7716

svn path=/trunk/; revision=61485
2014-01-01 22:24:17 +00:00
Amine Khaldi a645e8a623 [DRIVERS]
* Improve resource files.
CORE-7637

svn path=/trunk/; revision=61132
2013-11-28 22:19:35 +00:00
Hermès Bélusca-Maïto 795ebaa8b8 [FREELDR-KDCOM-KDBG]
Fix debugging issues.

svn path=/trunk/; revision=59921
2013-08-31 15:01:50 +00:00
Alex Ionescu 57ec941f0f [KDCOM]: Also adhere to new standard.
svn path=/trunk/; revision=59773
2013-08-18 17:51:56 +00:00
Hermès Bélusca-Maïto fd86dd4500 [CONDRV]
- Hey Arch! You're displaying Major function codes, not IOCTL codes. Also, remove unnecessary casts (coming from some old code), and a use-after free.
- Add some memory helpers.

svn path=/trunk/; revision=59448
2013-07-07 15:57:48 +00:00
Hermès Bélusca-Maïto 2f99c45433 [CONDRV]
Initial commit of the ReactOS Console Driver.
For the moment, it's just able to load/unload, creating a "controller" device
and being able to DPRINT1 lots of messages when you try to access to it.

svn path=/trunk/; revision=59447
2013-07-07 15:15:10 +00:00
Hermès Bélusca-Maïto 91ef640fe5 Merge my current work done on the kd++ branch:
- FreeLdr is able now to load personalized Kernel Debugger Transport DLLs by reading at the kernel command line and interpreting the /DEBUGPORT=xxx entry (--> loads KDxxx.DLL dll in \SystemRoot\System32\).
  Therefore we can not only load the "default" kdcom.dll, but also 3rd-party ones such as kdbazis.dll from VirtualKD (from revision 58902).
- The GCC-compiled-only version of kdcom, containing legacy COM code, was removed and put directly along KDBG. It remains only a stub / template for future kdcom-like dlls. The MSVC-version remains untouched.
- Make those functions ^ use directly the CPORTLIB library.

svn path=/trunk/; revision=58974
2013-05-09 13:12:58 +00:00
Amine Khaldi 689682751e [BEEP]
* Properly mark some unreferenced parameters as such.
[AFD]
* Properly fix a debug print specifier.

svn path=/trunk/; revision=58968
2013-05-08 11:55:37 +00:00
Hermès Bélusca-Maïto e1ef078741 Create this branch to work on loading of different Kernel-Debugger DLL providers, and see whether it is possible to move KDBG from ntoskrnl to a new DLL called, say, KDROSDBG.DLL.
The idea then would be to have the following behaviour (when specifying the following options in the kernel command line):

/DEBUGPORT=COMi --> load KDCOM.DLL and use COMi port (i == 1,2,3,4) if possible.
/DEBUGPORT=FOO  --> load KDFOO.DLL (useful for KDUSB.DLL, KD1394.DLL, KDBAZIS.DLL for VirtualKD, etc...)
/DEBUGPORT=ROSDBG:[COMi|SCREEN|FILE|GDB|...] --> load KDROSDBG.DLL which contains the ROS kernel debugger, and use COMi or SCREEN or... as output port.

svn path=/branches/kd++/; revision=58883
2013-04-28 13:26:45 +00:00
Hermès Bélusca-Maïto ec77a7ee25 [KDCOM]
Add resource files for KDCOM and compile them.

svn path=/trunk/; revision=58876
2013-04-27 21:46:02 +00:00
Hermès Bélusca-Maïto 1707c78bfe [KDCOM]
Formatting change only (requested by Timo).

svn path=/trunk/; revision=58835
2013-04-23 00:48:49 +00:00
Hermès Bélusca-Maïto 1fda00d683 [KDCOM]
- Use stdlib.h header instead of declaring the atol function's prototype (caught by Jérôme).
- Clarify the loop in KdpSendPacket (by Timo).
NOTE: I also noticed that it was not this loop-change that fixed reconnection (see commit message of r58823), but one of the changes of revision r58822 (certainly the one in the KdpReceiveByte function) (ironically I said "Seems to fix..." since I noticed that change of behaviour when I was trying to play with the code in KdpSendPacket with modifications of r58822, but I didn't notice that in fact it happened with changes of r58822. It is only today that I constated that, during a revert of r58823 + test + a remark from Timo).

svn path=/trunk/; revision=58834
2013-04-23 00:41:45 +00:00
Hermès Bélusca-Maïto b56283a15f [KDCOM]
- Code reorganization: put all the port control functions together.
- Little simplifications of some functions (from CORE-7106).

svn path=/trunk/; revision=58825
2013-04-22 00:28:16 +00:00