Hi,
I am running clean on the trunk and I am getting this error.
[CC] pnp_c.c
pnp_c.c: In function `PNP_GetVersion':
pnp_c.c:72: error: syntax error before '%' token
pnp_c.c:83: warning: use of cast expressions as lvalues is deprecated
make: *** [pnp_c.o] Error 1
My gcc is a cross-compiler 3.3.4
My pnp_c.c has the following at line 72
NdrGetBuffer(
(PMIDL_STUB_MESSAGE)&_StubMsg,
_StubMsg.BufferLength,
%_Handle);
Thanks
Steven
__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/
Hi,
is there a requirement for the serial port IRQ detection? This was also
part of my old sources but currently I simply don't know how to do it
inside the ReactOS serial driver.
BTW: How does the "serenum" stuff works?
Regards,
Mark
--- art yerkes <ayerkes(a)speakeasy.net> wrote:
> We need a convenient way to report a different version on a per application
> basis. I think there's some code to do this but I could not determine
> whether it works (despite several people telling me how to do it). While
> we're at it, can we verify that this code works and post a howto about
> reporting a specific windows version to an application?
I don't know much about it but it is supposed to be possible. There is a app compatiblity shell
extention that Thomas wrote that is supposed to do it under Windows. Anyone know if this really
works under ReactOS?
Thanks
Steven
__________________________________
Do you Yahoo!?
Make Yahoo! your home page
http://www.yahoo.com/r/hs
Hi,
I found some old sources from me where I detect the IRQ and the type
(8250, 16450, 16550, 16550A) of a COM port. I converted the type
detection sources to C.
The detection if there is a COM port at all is made by inverting all
bits of the LCR twice. All chips > 8250 have a scratch pad and all
16550A+ have a usable FIFO.
I attached the diff for reactos/drivers/dd/serial/legacy.c.
BTW: I'm sorry about it but my editor always changes TABs to spaces ...
Regards,
Mark
Index: drivers/dd/serial/legacy.c
===================================================================
--- drivers/dd/serial/legacy.c (revision 14202)
+++ drivers/dd/serial/legacy.c (working copy)
@@ -1,72 +1,101 @@
/* $Id:
*
* COPYRIGHT: See COPYING in the top level directory
* PROJECT: ReactOS kernel
* FILE: drivers/bus/serial/legacy.c
* PURPOSE: Legacy serial port enumeration
*
* PROGRAMMERS: Hervé Poussineau (poussine(a)freesurf.fr)
*/
#define NDEBUG
#include "serial.h"
+#define SER_TYPE_NONE 0
+#define SER_TYPE_8250 1
+#define SER_TYPE_16450 2
+#define SER_TYPE_16550 3
+#define SER_TYPE_16550A 4
+
+static BYTE
+DetectPortType(PUCHAR BaseAddress)
+{
+ BYTE Lcr, TestLcr;
+ BYTE OldScr, Scr5A, ScrA5;
+ BOOLEAN FifoEnabled;
+ BYTE NewFifoStatus;
+
+ Lcr = READ_PORT_UCHAR(SER_LCR(BaseAddress));
+ WRITE_PORT_UCHAR(BaseAddress, (BYTE) (Lcr ^ 0xFF));
+ TestLcr = (BYTE) (READ_PORT_UCHAR(SER_LCR(BaseAddress)) ^ 0xFF);
+ WRITE_PORT_UCHAR(BaseAddress, Lcr);
+
+ /* Accessing the LCR must work for a usable serial port */
+ if (TestLcr!=Lcr)
+ return SER_TYPE_NONE;
+
+ /* Ensure that all following accesses are done as required */
+ READ_PORT_UCHAR(SER_RBR(BaseAddress));
+ READ_PORT_UCHAR(SER_IER(BaseAddress));
+ READ_PORT_UCHAR(SER_IIR(BaseAddress));
+ READ_PORT_UCHAR(SER_LCR(BaseAddress));
+ READ_PORT_UCHAR(SER_MCR(BaseAddress));
+ READ_PORT_UCHAR(SER_LSR(BaseAddress));
+ READ_PORT_UCHAR(SER_MSR(BaseAddress));
+ READ_PORT_UCHAR(SER_SCR(BaseAddress));
+
+ /* Test scratch pad */
+ OldScr = READ_PORT_UCHAR(SER_SCR(BaseAddress));
+ WRITE_PORT_UCHAR(SER_SCR(BaseAddress), 0x5A);
+ Scr5A = READ_PORT_UCHAR(SER_SCR(BaseAddress));
+ WRITE_PORT_UCHAR(SER_SCR(BaseAddress), 0xA5);
+ ScrA5 = READ_PORT_UCHAR(SER_SCR(BaseAddress));
+ WRITE_PORT_UCHAR(SER_SCR(BaseAddress), OldScr);
+
+ /* When non-functional, we have a 8250 */
+ if (Scr5A!=0x5A || ScrA5!=0xA5)
+ return SER_TYPE_8250;
+
+ /* Test FIFO type */
+ FifoEnabled = (READ_PORT_UCHAR(SER_IIR(BaseAddress)) & 0x80)!=0;
+ WRITE_PORT_UCHAR(SER_FCR(BaseAddress), SR_FCR_ENABLE_FIFO);
+ NewFifoStatus = READ_PORT_UCHAR(SER_IIR(BaseAddress)) & 0xC0;
+ if (!FifoEnabled)
+ WRITE_PORT_UCHAR(SER_FCR(BaseAddress), 0);
+ switch (NewFifoStatus) {
+ case 0x00:
+ return SER_TYPE_16450;
+ case 0x80:
+ return SER_TYPE_16550;
+ }
+
+ /* FIFO is only functional for 16550A+ */
+ return SER_TYPE_16550A;
+}
+
static BOOLEAN
SerialDoesPortExist(PUCHAR BaseAddress)
{
- BOOLEAN Found;
- BYTE Mcr;
- BYTE Msr;
-
- Found = FALSE;
-
- /* save Modem Control Register (MCR) */
- Mcr = READ_PORT_UCHAR(SER_MCR(BaseAddress));
-
- /* enable loop mode (set Bit 4 of the MCR) */
- WRITE_PORT_UCHAR(SER_MCR(BaseAddress), 0x10);
-
- /* clear all modem output bits */
- WRITE_PORT_UCHAR(SER_MCR(BaseAddress), 0x10);
-
- /* read the Modem Status Register */
- Msr = READ_PORT_UCHAR(SER_MSR(BaseAddress));
-
- /*
- * the upper nibble of the MSR (modem output bits) must be
- * equal to the lower nibble of the MCR (modem input bits)
- */
- if ((Msr & 0xf0) == 0x00)
- {
- /* set all modem output bits */
- WRITE_PORT_UCHAR(SER_MCR(BaseAddress), 0x1f);
-
- /* read the Modem Status Register */
- Msr = READ_PORT_UCHAR(SER_MSR(BaseAddress));
-
- /*
- * the upper nibble of the MSR (modem output bits) must be
- * equal to the lower nibble of the MCR (modem input bits)
- */
- if ((Msr & 0xf0) == 0xf0)
- {
- /*
- * setup a resonable state for the port:
- * enable fifo and clear recieve/transmit buffers
- */
- WRITE_PORT_UCHAR(SER_FCR(BaseAddress),
- (SR_FCR_ENABLE_FIFO | SR_FCR_CLEAR_RCVR | SR_FCR_CLEAR_XMIT));
- WRITE_PORT_UCHAR(SER_FCR(BaseAddress), 0);
- READ_PORT_UCHAR(SER_RBR(BaseAddress));
- WRITE_PORT_UCHAR(SER_IER(BaseAddress), 0);
- Found = TRUE;
- }
- }
-
- /* restore MCR */
- WRITE_PORT_UCHAR(SER_MCR(BaseAddress), Mcr);
-
- return Found;
+ BYTE Type;
+
+ Type = DetectPortType(BaseAddress);
+ if (Type==SER_TYPE_NONE)
+ return FALSE;
+
+ if (Type==SER_TYPE_16550A) {
+ /*
+ * setup a resonable state for the port:
+ * enable fifo and clear recieve/transmit buffers
+ */
+ WRITE_PORT_UCHAR(SER_FCR(BaseAddress),
+ (SR_FCR_ENABLE_FIFO | SR_FCR_CLEAR_RCVR | SR_FCR_CLEAR_XMIT));
+ WRITE_PORT_UCHAR(SER_FCR(BaseAddress), 0);
+ }
+
+ READ_PORT_UCHAR(SER_RBR(BaseAddress));
+ WRITE_PORT_UCHAR(SER_IER(BaseAddress), 0);
+
+ return TRUE;
}
NTSTATUS
Hi,
Most of the dev team seems to be in agreement with bumping the reported version number to Win2k
but if anyone has any objections speak now or forever maintain a patch. I need Win2k to be
reported as the version number as many newer applications such as Office 2003 will not install
unless that is the latest version. If you find any places where a function, resource or anything
reports a value as NT4 or something ReactOS dependant please change it to match Windows 2000
behavior. Also I propose we just report Service Pack 4.
Thanks
Steven
__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/
Hi all
Currently when running a BootCD, if I ask to format the partition, I'm
told that the setup could not complete. This is on trunk, not sure
about the 0.2.6 build; can anyone confirm?
Thanks
Jason
This is the text of the final few seconds before the compilation ran out of
steam. The compiler is the standard MinGW32-gcc plus MinGW-g++, etc, in the
MinGW-3.1.0-1.exe package; the computer's a Compaq 4000 Deskpro; the OS is MS
Win95, bog-standard as far as I know.
Wesley Parish
C:/MINGW/include/c++/3.2.3/bits/stl_tree.h:1068: instantiated from
`std::_Rb_t
ree_iterator<_Val, _Val&, _Val*> std::_Rb_tree<_Key, _Val, _KeyOfValue,
_Compare
, _Alloc>::insert_unique(std::_Rb_tree_iterator<_Val, _Val&, _Val*>, const
_Val&
) [with _Key = String, _Val = std::pair<const String, ICON_ID>, _KeyOfValue =
st
d::_Select1st<std::pair<const String, ICON_ID> >, _Compare =
std::less<String>,
_Alloc = std::allocator<std::pair<const String, ICON_ID> >]'
C:/MINGW/include/c++/3.2.3/bits/stl_map.h:262: instantiated from
`std::_Rb_tre
e<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const _Key, _Tp>
>
, _Compare, _Alloc>::iterator std::map<_Key, _Tp, _Compare,
_Alloc>::insert(std:
:_Rb_tree<_Key, std::pair<const _Key, _Tp>, std::_Select1st<std::pair<const
_Key
, _Tp> >, _Compare, _Alloc>::iterator, const std::pair<const _Key, _Tp>&)
[with
_Key = String, _Tp = ICON_ID, _Compare = std::less<String>, _Alloc =
std::alloca
tor<std::pair<const String, ICON_ID> >]'
C:/MINGW/include/c++/3.2.3/bits/stl_map.h:225: instantiated from `_Tp&
std::ma
p<_Key, _Tp, _Compare, _Alloc>::operator[](const _Key&) [with _Key = String,
_Tp
= ICON_ID, _Compare = std::less<String>, _Alloc =
std::allocator<std::pair<cons
t String, ICON_ID> >]'
explorer.cpp:398: instantiated from here
C:/MINGW/include/c++/3.2.3/bits/stl_pair.h:88: invalid use of undefined type `
struct String'
utility/utility.h:737: forward declaration of `struct String'
make[1]: *** [explorer.o] Error 1
make: *** [explorer] Error 2
--
Clinersterton beademung, with all of love - RIP James Blish
-----
Mau e ki, he aha te mea nui?
You ask, what is the most important thing?
Maku e ki, he tangata, he tangata, he tangata.
I reply, it is people, it is people, it is people.
same problem here using trunk revision 14208.
tested on qemu using blank and already formated image.
--- Jason Filby <jason.filby(a)gmail.com> wrote:
> Hi all
>
> Currently when running a BootCD, if I ask to format the partition, I'm
> told that the setup could not complete. This is on trunk, not sure
> about the 0.2.6 build; can anyone confirm?
>
> Thanks
> Jason
Kind regards,
Usurp (aka Sylvain Petreolle)
humans are like computers,
yesterday the BIOS was all
- today its just a word
Hi,
I think the affects both the branch and the trunk. At the end of stage 2 setup I get a crash in
ntoskrnl: 319b and 6760c
According to my map.
8006760c <_NtAdjustPrivilegesToken@24+0xbc>
Is called in a few places and 319b is
/* Do the System Call */
call *%eax
80003199: ff d0 call *%eax
movl %eax, KTRAP_FRAME_EAX(%ebp)
8000319b: 89 45 44 mov %eax,0x44(%ebp)
Thanks
Steven
__________________________________
Do you Yahoo!?
Yahoo! Small Business - Try our new resources site!
http://smallbusiness.yahoo.com/resources/