ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2025
May
April
March
February
January
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
December 2010
----- 2025 -----
May 2025
April 2025
March 2025
February 2025
January 2025
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
20 participants
369 discussions
Start a n
N
ew thread
[akhaldi] 50037: [CMAKE] - Update some base addresses to adapt to new binary sizes. Thanks to Roel for his help.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Dec 16 14:35:26 2010 New Revision: 50037 URL:
http://svn.reactos.org/svn/reactos?rev=50037&view=rev
Log: [CMAKE] - Update some base addresses to adapt to new binary sizes. Thanks to Roel for his help. Modified: branches/cmake-bringup/baseaddress.cmake Modified: branches/cmake-bringup/baseaddress.cmake URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/baseaddress.cmake…
============================================================================== --- branches/cmake-bringup/baseaddress.cmake [iso-8859-1] (original) +++ branches/cmake-bringup/baseaddress.cmake [iso-8859-1] Thu Dec 16 14:35:26 2010 @@ -100,7 +100,6 @@ set(baseaddress_opengl32 0x6b390000) set(baseaddress_secur32 0x6b3a0000) set(baseaddress_smdll 0x6b3b0000) -set(baseaddress_urlmon 0x6b3c0000) set(baseaddress_serialui 0x6b3d0000) set(baseaddress_hlink 0x6c6e0000) set(baseaddress_deskmon 0x6d400000) @@ -165,8 +164,6 @@ set(baseaddress_kbsdll 0x74720000) set(baseaddress_quartz 0x747d0000) set(baseaddress_userenv 0x74850000) -set(baseaddress_syssetup 0x74a10000) -set(baseaddress_ws2_32 0x74aa0000) set(baseaddress_powrprof 0x74ad0000) set(baseaddress_msxml3 0x74ae0000) set(baseaddress_printui 0x74b40000) @@ -184,10 +181,7 @@ set(baseaddress_localspl 0x75b80000) set(baseaddress_cryptnet 0x75e60000) set(baseaddress_rpcrt4 0x76000000) -set(baseaddress_shlwapi 0x76100000) set(baseaddress_inetcomm 0x76140000) -set(baseaddress_comctl32 0x76170000) -set(baseaddress_comdlg32 0x76230000) set(baseaddress_winsta 0x762f0000) set(baseaddress_imm32 0x76320000) set(baseaddress_d3d8thk 0x76340000) @@ -243,18 +237,23 @@ set(baseaddress_olepro32 0x77b20000) set(baseaddress_activeds 0x77cb0000) set(baseaddress_advapi32 0x77dc0000) -set(baseaddress_user32 0x77e50000) -set(baseaddress_gdi32 0x77f70000) set(baseaddress_dnsapi 0x77fb0000) set(baseaddress_msvcrt 0x78000000) set(baseaddress_msvcrt20 0x78500000) set(baseaddress_msvcrt40 0x78700000) set(baseaddress_mscoree 0x79000000) set(baseaddress_fusion 0x79040000) -set(baseaddress_kernel32 0x7c700000) set(baseaddress_ntdll 0x7c900000) +set(baseaddress_kernel32 0x7ca10000) +set(baseaddress_user32 0x7cbf0000) +set(baseaddress_gdi32 0x7cdd0000) +set(baseaddress_comctl32 0x7ce60000) +set(baseaddress_comdlg32 0x7d010000) +set(baseaddress_shlwapi 0x7d110000) +set(baseaddress_urlmon 0x7d1e0000) +set(baseaddress_ws2_32 0x7d2f0000) +set(baseaddress_syssetup 0x7d340000) set(baseaddress_query 0x7d9a0000) set(baseaddress_hhctrl 0x7e410000) set(baseaddress_sxs 0x7e690000) set(baseaddress_beepmidi 0x7ef00000) -set(baseaddress_freetype 0x7f000000)
14 years, 4 months
1
0
0
0
[janderwald] 50036: [AUDIO-BRINGUP] - Implement SwDispatchPower
by janderwald@svn.reactos.org
Author: janderwald Date: Thu Dec 16 11:56:12 2010 New Revision: 50036 URL:
http://svn.reactos.org/svn/reactos?rev=50036&view=rev
Log: [AUDIO-BRINGUP] - Implement SwDispatchPower Modified: branches/audio-bringup/drivers/ksfilter/swenum/swenum.c Modified: branches/audio-bringup/drivers/ksfilter/swenum/swenum.c URL:
http://svn.reactos.org/svn/reactos/branches/audio-bringup/drivers/ksfilter/…
============================================================================== --- branches/audio-bringup/drivers/ksfilter/swenum/swenum.c [iso-8859-1] (original) +++ branches/audio-bringup/drivers/ksfilter/swenum/swenum.c [iso-8859-1] Thu Dec 16 11:56:12 2010 @@ -18,8 +18,56 @@ IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { - - UNIMPLEMENTED; + NTSTATUS Status, PnpStatus; + BOOLEAN ChildDevice; + PIO_STACK_LOCATION IoStack; + PDEVICE_OBJECT PnpDeviceObject = NULL; + + /* get current stack location */ + IoStack = IoGetCurrentIrpStackLocation(Irp); + + /* check if the device object is a child device */ + Status = KsIsBusEnumChildDevice(DeviceObject, &ChildDevice); + + /* get bus enum pnp object */ + PnpStatus = KsGetBusEnumPnpDeviceObject(DeviceObject, &PnpDeviceObject); + + /* check for success */ + if (!NT_SUCCESS(Status) || !NT_SUCCESS(PnpStatus)) + { + /* start next power irp */ + PoStartNextPowerIrp(Irp); + + /* just complete the irp */ + Irp->IoStatus.Status = STATUS_SUCCESS; + + /* complete the irp */ + IoCompleteRequest(Irp, IO_NO_INCREMENT); + + /* done */ + return STATUS_SUCCESS; + } + + if (IoStack->MinorFunction == IRP_MN_SET_POWER || IoStack->MinorFunction == IRP_MN_QUERY_POWER) + { + /* fake success */ + Irp->IoStatus.Status = STATUS_SUCCESS; + } + + if (!ChildDevice) + { + /* forward to pnp device object */ + PoStartNextPowerIrp(Irp); + + /* skip current location */ + IoSkipCurrentIrpStackLocation(Irp); + + /* done */ + return PoCallDriver(PnpDeviceObject, Irp); + } + + /* start next power irp */ + PoStartNextPowerIrp(Irp); /* just complete the irp */ Irp->IoStatus.Status = STATUS_SUCCESS; @@ -29,7 +77,6 @@ /* done */ return STATUS_SUCCESS; - } NTSTATUS
14 years, 4 months
1
0
0
0
[janderwald] 50035: [AUDIO-BRINGUP] - Fix several bugs in SwDispatchPnp routine - Routine did not complete requests, when KsServiceBusEnumPnpRequest successfully handled the request - Software bus ...
by janderwald@svn.reactos.org
Author: janderwald Date: Thu Dec 16 11:10:45 2010 New Revision: 50035 URL:
http://svn.reactos.org/svn/reactos?rev=50035&view=rev
Log: [AUDIO-BRINGUP] - Fix several bugs in SwDispatchPnp routine - Routine did not complete requests, when KsServiceBusEnumPnpRequest successfully handled the request - Software bus driver did not handle resource lists irps - Software bus driver did not support querying pnp device state - Software bus driver leaked the irp for IOCTL_SWENUM_GET_BUS_ID requests in SwDispatchDeviceControl - Software bus driver is now successfully initializes in XP and audio devices are present Modified: branches/audio-bringup/drivers/ksfilter/swenum/swenum.c Modified: branches/audio-bringup/drivers/ksfilter/swenum/swenum.c URL:
http://svn.reactos.org/svn/reactos/branches/audio-bringup/drivers/ksfilter/…
============================================================================== --- branches/audio-bringup/drivers/ksfilter/swenum/swenum.c [iso-8859-1] (original) +++ branches/audio-bringup/drivers/ksfilter/swenum/swenum.c [iso-8859-1] Thu Dec 16 11:10:45 2010 @@ -43,6 +43,9 @@ PIO_STACK_LOCATION IoStack; PDEVICE_OBJECT PnpDeviceObject = NULL; + /* get current stack location */ + IoStack = IoGetCurrentIrpStackLocation(Irp); + /* check if the device object is a child device */ Status = KsIsBusEnumChildDevice(DeviceObject, &ChildDevice); @@ -55,10 +58,30 @@ return Status; } + DPRINT1("SwDispatchPnp ChildDevice %u Request %x\n", ChildDevice, IoStack->MinorFunction); + /* let ks handle it */ Status = KsServiceBusEnumPnpRequest(DeviceObject, Irp); - if (!NT_SUCCESS(Status)) + /* check if the request was for a pdo */ + if (!ChildDevice) + { + if (Status != STATUS_NOT_SUPPORTED) + { + /* store result */ + Irp->IoStatus.Status = Status; + } + + /* complete request */ + IoCompleteRequest(Irp, IO_NO_INCREMENT); + + /* done */ + return Status; + } + + DPRINT1("SwDispatchPnp KsServiceBusEnumPnpRequest Status %x\n", Status); + + if (NT_SUCCESS(Status)) { /* invalid request or not supported */ Irp->IoStatus.Status = Status; @@ -69,6 +92,8 @@ /* get bus enum pnp object */ Status = KsGetBusEnumPnpDeviceObject(DeviceObject, &PnpDeviceObject); + DPRINT1("SwDispatchPnp KsGetBusEnumPnpDeviceObject Status %x\n", Status); + /* check for success */ if (!NT_SUCCESS(Status)) { @@ -89,11 +114,49 @@ /* delete the device */ IoDeleteDevice(DeviceObject); } - - /* skip current location */ - IoSkipCurrentIrpStackLocation(Irp); - /* call the pnp device object */ - return IoCallDriver(PnpDeviceObject, Irp); + else + { + if (IoStack->MinorFunction == IRP_MN_QUERY_RESOURCES || IoStack->MinorFunction == IRP_MN_QUERY_RESOURCE_REQUIREMENTS) + { + /* no resources required */ + Irp->IoStatus.Information = 0; + Irp->IoStatus.Status = STATUS_SUCCESS; + + /* skip current location */ + IoSkipCurrentIrpStackLocation(Irp); + + /* call the pnp device object */ + return IoCallDriver(PnpDeviceObject, Irp); + } + + if (IoStack->MajorFunction == IRP_MN_QUERY_PNP_DEVICE_STATE) + { + /* device cannot be disabled */ + Irp->IoStatus.Information |= PNP_DEVICE_NOT_DISABLEABLE; + Irp->IoStatus.Status = STATUS_SUCCESS; + + /* skip current location */ + IoSkipCurrentIrpStackLocation(Irp); + + /* call the pnp device object */ + return IoCallDriver(PnpDeviceObject, Irp); + } + + if (Status == STATUS_NOT_SUPPORTED) + { + /* skip current location */ + IoSkipCurrentIrpStackLocation(Irp); + + /* call the pnp device object */ + return IoCallDriver(PnpDeviceObject, Irp); + } + } + + /* complete the request */ + Irp->IoStatus.Status = Status; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + + return Status; } NTSTATUS @@ -149,7 +212,7 @@ IN PIRP Irp) { PIO_STACK_LOCATION IoStack; - NTSTATUS Status = STATUS_SUCCESS; + NTSTATUS Status; /* get current stack location */ IoStack = IoGetCurrentIrpStackLocation(Irp); @@ -158,16 +221,25 @@ { /* install interface */ Status = KsInstallBusEnumInterface(Irp); + DPRINT1("SwDispatchDeviceControl IOCTL_SWENUM_INSTALL_INTERFACE %x\n", Status); } else if (IoStack->Parameters.DeviceIoControl.IoControlCode == IOCTL_SWENUM_REMOVE_INTERFACE) { /* remove interface */ Status = KsRemoveBusEnumInterface(Irp); + DPRINT1("SwDispatchDeviceControl IOCTL_SWENUM_REMOVE_INTERFACE %x\n", Status); + } else if (IoStack->Parameters.DeviceIoControl.IoControlCode == IOCTL_SWENUM_GET_BUS_ID) { /* get bus id */ - return KsGetBusEnumIdentifier(Irp); + Status = KsGetBusEnumIdentifier(Irp); + DPRINT1("SwDispatchDeviceControl IOCTL_SWENUM_GET_BUS_ID %x\n", Status); + } + else + { + DPRINT1("SwDispatchDeviceControl Unknown IOCTL %x\n", IoStack->Parameters.DeviceIoControl.IoControlCode); + Status = STATUS_INVALID_PARAMETER; } /* store result */ @@ -192,6 +264,8 @@ /* check if the device object is a child device */ Status = KsIsBusEnumChildDevice(DeviceObject, &ChildDevice); + + DPRINT1("SwDispatchCreate %x\n", Status); /* check for success */ if (NT_SUCCESS(Status)) @@ -205,6 +279,7 @@ } /* perform the create request */ Status = KsServiceBusEnumCreateRequest(DeviceObject, Irp); + DPRINT1("SwDispatchCreate %x\n", Status); } /* check the irp is pending */ @@ -246,7 +321,6 @@ PDEVICE_OBJECT FunctionalDeviceObject; DPRINT1("SWENUM AddDevice\n"); - DbgBreakPoint(); /* create the device */ Status = IoCreateDevice(DriverObject, sizeof(KSDEVICE_HEADER), NULL, FILE_DEVICE_BUS_EXTENDER, 0, FALSE, &FunctionalDeviceObject); @@ -307,7 +381,6 @@ DriverObject->MajorFunction[IRP_MJ_SYSTEM_CONTROL] = SwDispatchSystemControl; DPRINT1("SWENUM loaded\n"); - DbgBreakPoint(); return STATUS_SUCCESS; }
14 years, 4 months
1
0
0
0
[janderwald] 50034: [AUDIO-BRINGUP] - Trying to activate the software bus driver. Needs more work
by janderwald@svn.reactos.org
Author: janderwald Date: Thu Dec 16 09:09:43 2010 New Revision: 50034 URL:
http://svn.reactos.org/svn/reactos?rev=50034&view=rev
Log: [AUDIO-BRINGUP] - Trying to activate the software bus driver. Needs more work Modified: branches/audio-bringup/boot/bootdata/hivesys_i386.inf branches/audio-bringup/boot/bootdata/packages/reactos.dff branches/audio-bringup/boot/bootdata/txtsetup.sif branches/audio-bringup/drivers/ksfilter/directory.rbuild branches/audio-bringup/drivers/ksfilter/swenum/swenum.c branches/audio-bringup/media/inf/machine.inf Modified: branches/audio-bringup/boot/bootdata/hivesys_i386.inf URL:
http://svn.reactos.org/svn/reactos/branches/audio-bringup/boot/bootdata/hiv…
============================================================================== --- branches/audio-bringup/boot/bootdata/hivesys_i386.inf [iso-8859-1] (original) +++ branches/audio-bringup/boot/bootdata/hivesys_i386.inf [iso-8859-1] Thu Dec 16 09:09:43 2010 @@ -1254,6 +1254,11 @@ HKLM,"SYSTEM\CurrentControlSet\Services\Packet","ImagePath",0x00020000,"system32\drivers\packet.sys" HKLM,"SYSTEM\CurrentControlSet\Services\Packet","Start",0x00010001,0x00000004 HKLM,"SYSTEM\CurrentControlSet\Services\Packet","Type",0x00010001,0x00000001 + +; Software BUS Driver +HKLM,"SYSTEM\CurrentControlSet\Services\SWENUM","ErrorControl",0x00010001,0x00000001 +HKLM,"SYSTEM\CurrentControlSet\Services\SWENUM","Group",0x00000000,"Boot Bus +HKLM,"SYSTEM\CurrentControlSet\Services\SWENUM","Tag",0x00010001,0x00000002 ; PCI Bus driver HKLM,"SYSTEM\CurrentControlSet\Services\Pci","ErrorControl",0x00010001,0x00000001 Modified: branches/audio-bringup/boot/bootdata/packages/reactos.dff URL:
http://svn.reactos.org/svn/reactos/branches/audio-bringup/boot/bootdata/pac…
============================================================================== --- branches/audio-bringup/boot/bootdata/packages/reactos.dff [iso-8859-1] (original) +++ branches/audio-bringup/boot/bootdata/packages/reactos.dff [iso-8859-1] Thu Dec 16 09:09:43 2010 @@ -514,6 +514,7 @@ drivers\input\sermouse\sermouse.sys 2 drivers\ksfilter\ks\ks.sys 2 +drivers\ksfilter\swenum\swenum.sys 2 ;drivers\multimedia\bdasup\bdasup.sys 2 drivers\network\afd\afd.sys 2 Modified: branches/audio-bringup/boot/bootdata/txtsetup.sif URL:
http://svn.reactos.org/svn/reactos/branches/audio-bringup/boot/bootdata/txt…
============================================================================== --- branches/audio-bringup/boot/bootdata/txtsetup.sif [iso-8859-1] (original) +++ branches/audio-bringup/boot/bootdata/txtsetup.sif [iso-8859-1] Thu Dec 16 09:09:43 2010 @@ -36,6 +36,7 @@ l_intl.nls=,,,,,,,,,,,,2 ntfs.sys=,,,,,,,,,,,,4 pci.sys=,,,,,,,,,,,,4 +swenum.sys=,,,,,,,,,,,,4 scsiport.sys=,,,,,,x,,,,,,4 fastfat.sys=,,,,,,x,,,,,,4 ramdisk.sys=,,,,,,x,,,,,,4 @@ -47,11 +48,13 @@ *PNP0C08 = acpi ;PCI\CC_0601 = isapnp PCI\CC_0604 = pci +ROOT\SWENUM = swenum [BootBusExtenders.Load] acpi = acpi.sys pci = pci.sys isapnp = isapnp.sys +swenum = swenum.sys [Cabinets] Cabinet=reactos.cab Modified: branches/audio-bringup/drivers/ksfilter/directory.rbuild URL:
http://svn.reactos.org/svn/reactos/branches/audio-bringup/drivers/ksfilter/…
============================================================================== --- branches/audio-bringup/drivers/ksfilter/directory.rbuild [iso-8859-1] (original) +++ branches/audio-bringup/drivers/ksfilter/directory.rbuild [iso-8859-1] Thu Dec 16 09:09:43 2010 @@ -4,8 +4,8 @@ <directory name="ks"> <xi:include href="ks/ks.rbuild" /> </directory> - <!--<directory name="swenum"> + <directory name="swenum"> <xi:include href="swenum/swenum.rbuild" /> - </directory>--> + </directory> </group> Modified: branches/audio-bringup/drivers/ksfilter/swenum/swenum.c URL:
http://svn.reactos.org/svn/reactos/branches/audio-bringup/drivers/ksfilter/…
============================================================================== --- branches/audio-bringup/drivers/ksfilter/swenum/swenum.c [iso-8859-1] (original) +++ branches/audio-bringup/drivers/ksfilter/swenum/swenum.c [iso-8859-1] Thu Dec 16 09:09:43 2010 @@ -245,6 +245,9 @@ NTSTATUS Status; PDEVICE_OBJECT FunctionalDeviceObject; + DPRINT1("SWENUM AddDevice\n"); + DbgBreakPoint(); + /* create the device */ Status = IoCreateDevice(DriverObject, sizeof(KSDEVICE_HEADER), NULL, FILE_DEVICE_BUS_EXTENDER, 0, FALSE, &FunctionalDeviceObject); @@ -303,7 +306,8 @@ DriverObject->MajorFunction[IRP_MJ_DEVICE_CONTROL] = SwDispatchDeviceControl; DriverObject->MajorFunction[IRP_MJ_SYSTEM_CONTROL] = SwDispatchSystemControl; - + DPRINT1("SWENUM loaded\n"); + DbgBreakPoint(); return STATUS_SUCCESS; } Modified: branches/audio-bringup/media/inf/machine.inf URL:
http://svn.reactos.org/svn/reactos/branches/audio-bringup/media/inf/machine…
============================================================================== Binary files - no diff available.
14 years, 4 months
1
0
0
0
[akhaldi] 50033: [CMAKE] - Arty: Add usermode addresses translation support. WIP.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Wed Dec 15 23:37:54 2010 New Revision: 50033 URL:
http://svn.reactos.org/svn/reactos?rev=50033&view=rev
Log: [CMAKE] - Arty: Add usermode addresses translation support. WIP. Modified: branches/cmake-bringup/lib/rossym/delete.c branches/cmake-bringup/lib/rossym/dwarf.h branches/cmake-bringup/lib/rossym/dwarfinfo.c branches/cmake-bringup/lib/rossym/dwarfopen.c branches/cmake-bringup/lib/rossym/dwarfpc.c branches/cmake-bringup/lib/rossym/fromfile.c branches/cmake-bringup/lib/rossym/initum.c branches/cmake-bringup/lib/rossym/pe.c branches/cmake-bringup/lib/rossym/zwfile.c branches/cmake-bringup/ntoskrnl/kdbg/kdb_symbols.c Modified: branches/cmake-bringup/lib/rossym/delete.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/delete…
============================================================================== --- branches/cmake-bringup/lib/rossym/delete.c [iso-8859-1] (original) +++ branches/cmake-bringup/lib/rossym/delete.c [iso-8859-1] Wed Dec 15 23:37:54 2010 @@ -22,11 +22,6 @@ VOID RosSymDelete(PROSSYM_INFO RosSymInfo) { - int i; - for (i = 0; i < RosSymInfo->pe->nsections; i++) { - RtlFreeAnsiString(ANSI_NAME_STRING(&RosSymInfo->pe->sect[i])); - } - RosSymFreeMem(RosSymInfo->pe->sect); dwarfclose(RosSymInfo); } Modified: branches/cmake-bringup/lib/rossym/dwarf.h URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/dwarf.…
============================================================================== --- branches/cmake-bringup/lib/rossym/dwarf.h [iso-8859-1] (original) +++ branches/cmake-bringup/lib/rossym/dwarf.h [iso-8859-1] Wed Dec 15 23:37:54 2010 @@ -252,7 +252,7 @@ uchar framebase; uchar friend; uchar highpc; - uchar entrypc; + uchar entrypc; uchar identifiercase; uchar import; uchar inlined; @@ -315,7 +315,7 @@ DwarfVal framebase; ulong friend; ulong highpc; - ulong entrypc; + ulong entrypc; ulong identifiercase; ulong import; ulong inlined; Modified: branches/cmake-bringup/lib/rossym/dwarfinfo.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/dwarfi…
============================================================================== --- branches/cmake-bringup/lib/rossym/dwarfinfo.c [iso-8859-1] (original) +++ branches/cmake-bringup/lib/rossym/dwarfinfo.c [iso-8859-1] Wed Dec 15 23:37:54 2010 @@ -366,7 +366,7 @@ { DwarfAttrFrameBase, OFFSET(framebase), TBlock|TConstant }, { DwarfAttrFriend, OFFSET(friend), TReference }, { DwarfAttrHighpc, OFFSET(highpc), TAddress }, - { DwarfAttrEntrypc, OFFSET(entrypc), TAddress }, + { DwarfAttrEntrypc, OFFSET(entrypc), TAddress }, { DwarfAttrIdentifierCase, OFFSET(identifiercase), TConstant }, { DwarfAttrImport, OFFSET(import), TReference }, { DwarfAttrInline, OFFSET(inlined), TConstant }, Modified: branches/cmake-bringup/lib/rossym/dwarfopen.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/dwarfo…
============================================================================== --- branches/cmake-bringup/lib/rossym/dwarfopen.c [iso-8859-1] (original) +++ branches/cmake-bringup/lib/rossym/dwarfopen.c [iso-8859-1] Wed Dec 15 23:37:54 2010 @@ -40,6 +40,7 @@ return d; err: + DPRINT("Failed to open dwarf\n"); free(d->abbrev.data); free(d->aranges.data); free(d->frame.data); Modified: branches/cmake-bringup/lib/rossym/dwarfpc.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/dwarfp…
============================================================================== --- branches/cmake-bringup/lib/rossym/dwarfpc.c [iso-8859-1] (original) +++ branches/cmake-bringup/lib/rossym/dwarfpc.c [iso-8859-1] Wed Dec 15 23:37:54 2010 @@ -50,7 +50,7 @@ { uchar *prog, *opcount, *end, *dirs; ulong off, unit, len, vers, x, start, lastline; - int i, first, op, a, l, quantum, isstmt, linebase, linerange, opcodebase, nf; + int i, first, firstline, op, a, l, quantum, isstmt, linebase, linerange, opcodebase, nf; char *files, *s; DwarfBuf b; DwarfSym sym; @@ -150,6 +150,7 @@ if(trace) werrstr("program @ %lu ... %.*H opbase = %d\n", b.p - d->line.data, b.ep-b.p, b.p, opcodebase); first = 1; while(b.p != nil){ + firstline = 0; op = dwarfget1(&b); if(trace) werrstr("\tline %lu, addr 0x%x, op %d %.10H", cur.line, cur.addr, op, b.p); if(op >= opcodebase){ @@ -162,12 +163,16 @@ if(first){ if(cur.addr > pc){ werrstr("found wrong line mapping 0x%x for pc 0x%x", cur.addr, pc); - goto out; + /* This is an overzealous check. gcc can produce discontiguous ranges + and reorder statements, so it's possible for a future line to start + ahead of pc and still find a matching one. */ + /*goto out;*/ + firstline = 1; } first = 0; start = cur.addr; } - if(cur.addr > pc) + if(cur.addr > pc && !firstline) break; if(b.p == nil){ werrstr("buffer underflow in line mapping"); Modified: branches/cmake-bringup/lib/rossym/fromfile.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/fromfi…
============================================================================== --- branches/cmake-bringup/lib/rossym/fromfile.c [iso-8859-1] (original) +++ branches/cmake-bringup/lib/rossym/fromfile.c [iso-8859-1] Wed Dec 15 23:37:54 2010 @@ -20,6 +20,8 @@ #define NDEBUG #include <debug.h> +extern NTSTATUS RosSymStatus; + BOOLEAN RosSymCreateFromFile(PVOID FileContext, PROSSYM_INFO *RosSymInfo) { @@ -30,10 +32,14 @@ unsigned SymbolTable, NumSymbols; /* Load DOS header */ - DPRINT("About to read file\n"); + if (! RosSymSeekFile(FileContext, 0)) + { + DPRINT1("Could not rewind file\n"); + return FALSE; + } if (! RosSymReadFile(FileContext, &DosHeader, sizeof(IMAGE_DOS_HEADER))) { - DPRINT1("Failed to read DOS header\n"); + DPRINT1("Failed to read DOS header %x\n", RosSymStatus); return FALSE; } if (! ROSSYM_IS_VALID_DOS_HEADER(&DosHeader)) @@ -70,6 +76,7 @@ DPRINT1("Failed seeking to section headers\n"); return FALSE; } + DPRINT("Alloc section headers\n"); SectionHeaders = RosSymAllocMem(NtHeaders.FileHeader.NumberOfSections * sizeof(IMAGE_SECTION_HEADER)); if (NULL == SectionHeaders) @@ -178,7 +185,9 @@ pe->imagebase = pe->loadbase = NtHeaders.OptionalHeader.ImageBase; pe->imagesize = NtHeaders.OptionalHeader.SizeOfImage; pe->loadsection = loaddisksection; + DPRINT("do dwarfopen\n"); *RosSymInfo = dwarfopen(pe); + DPRINT("done %x\n", *RosSymInfo); return TRUE; Modified: branches/cmake-bringup/lib/rossym/initum.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/initum…
============================================================================== --- branches/cmake-bringup/lib/rossym/initum.c [iso-8859-1] (original) +++ branches/cmake-bringup/lib/rossym/initum.c [iso-8859-1] Wed Dec 15 23:37:54 2010 @@ -7,9 +7,12 @@ * PROGRAMMERS: Ge van Geldorp (gvg(a)reactos.com) */ +#define WIN32_NO_STATUS #include <windows.h> #include <reactos/rossym.h> #include "rossympriv.h" +#define NTOS_MODE_USER +#include <ndk/ntndk.h> #define NDEBUG #include <debug.h> @@ -17,13 +20,13 @@ static PVOID RosSymAllocMemUM(ULONG_PTR Size) { - return HeapAlloc(GetProcessHeap(), 0, Size); + return RtlAllocateHeap(RtlGetProcessHeap(), 0, Size); } static VOID RosSymFreeMemUM(PVOID Area) { - HeapFree(GetProcessHeap(), 0, Area); + RtlFreeHeap(RtlGetProcessHeap(), 0, Area); } VOID Modified: branches/cmake-bringup/lib/rossym/pe.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/pe.c?r…
============================================================================== --- branches/cmake-bringup/lib/rossym/pe.c [iso-8859-1] (original) +++ branches/cmake-bringup/lib/rossym/pe.c [iso-8859-1] Wed Dec 15 23:37:54 2010 @@ -111,6 +111,10 @@ for (i = 0; i < pe->nsections; i++) { RtlFreeAnsiString(ANSI_NAME_STRING(&pe->sect[i])); } + for (i = 0; i < pe->nsymbols; i++) { + free(pe->symtab[i].name); + } + free(pe->symtab); free(pe->sect); free(pe); } Modified: branches/cmake-bringup/lib/rossym/zwfile.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/lib/rossym/zwfile…
============================================================================== --- branches/cmake-bringup/lib/rossym/zwfile.c [iso-8859-1] (original) +++ branches/cmake-bringup/lib/rossym/zwfile.c [iso-8859-1] Wed Dec 15 23:37:54 2010 @@ -15,38 +15,40 @@ #define NDEBUG #include <debug.h> +NTSTATUS RosSymStatus; + BOOLEAN RosSymZwReadFile(PVOID FileContext, PVOID Buffer, ULONG Size) { - NTSTATUS Status; + //NTSTATUS Status; IO_STATUS_BLOCK IoStatusBlock; - Status = ZwReadFile(*((HANDLE *) FileContext), + RosSymStatus = ZwReadFile(*((HANDLE *) FileContext), 0, 0, 0, &IoStatusBlock, Buffer, Size, 0, 0); - return NT_SUCCESS(Status) && IoStatusBlock.Information == Size; + return NT_SUCCESS(RosSymStatus) && IoStatusBlock.Information == Size; } BOOLEAN RosSymZwSeekFile(PVOID FileContext, ULONG_PTR Position) { - NTSTATUS Status; + //NTSTATUS Status; IO_STATUS_BLOCK IoStatusBlock; FILE_POSITION_INFORMATION NewPosition; NewPosition.CurrentByteOffset.u.HighPart = 0; NewPosition.CurrentByteOffset.u.LowPart = Position; - Status = ZwSetInformationFile(*((HANDLE *) FileContext), + RosSymStatus = ZwSetInformationFile(*((HANDLE *) FileContext), &IoStatusBlock, (PVOID) &NewPosition, sizeof(FILE_POSITION_INFORMATION), FilePositionInformation); - return NT_SUCCESS(Status); + return NT_SUCCESS(RosSymStatus); } /* EOF */ Modified: branches/cmake-bringup/ntoskrnl/kdbg/kdb_symbols.c URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/ntoskrnl/kdbg/kdb…
============================================================================== --- branches/cmake-bringup/ntoskrnl/kdbg/kdb_symbols.c [iso-8859-1] (original) +++ branches/cmake-bringup/ntoskrnl/kdbg/kdb_symbols.c [iso-8859-1] Wed Dec 15 23:37:54 2010 @@ -29,6 +29,8 @@ static BOOLEAN LoadSymbols; static LIST_ENTRY SymbolFileListHead; static KSPIN_LOCK SymbolFileListLock; +static PROSSYM_INFO KdbpRosSymInfo; +static ULONG_PTR KdbpImageBase; BOOLEAN KdbpSymbolsInitialized = FALSE; /* FUNCTIONS ****************************************************************/ @@ -124,7 +126,13 @@ KdbSymPrintAddress( IN PVOID Address) { + PMEMORY_AREA MemoryArea = NULL; + HANDLE FileHandle = NULL; + PROS_SECTION_OBJECT SectionObject; PLDR_DATA_TABLE_ENTRY LdrEntry; + OBJECT_ATTRIBUTES ObjectAttributes; + IO_STATUS_BLOCK IoStatusBlock; + UNICODE_STRING ModuleFileName; ULONG_PTR RelativeAddress; NTSTATUS Status; ULONG LineNumber; @@ -144,11 +152,79 @@ { DbgPrint("<%wZ:%x (%s:%d (%s))>", &LdrEntry->BaseDllName, RelativeAddress, FileName, LineNumber, FunctionName); - } - else - { - DbgPrint("<%wZ:%x>", &LdrEntry->BaseDllName, RelativeAddress); - } + return TRUE; + } + else if (Address < MmSystemRangeStart) + { + MemoryArea = MmLocateMemoryAreaByAddress(&PsGetCurrentProcess()->Vm, Address); + if (!MemoryArea || MemoryArea->Type != MEMORY_AREA_SECTION_VIEW) + { + goto end; + } + SectionObject = MemoryArea->Data.SectionData.Section; + if (!(SectionObject->AllocationAttributes & SEC_IMAGE)) goto end; + if (SectionObject->ImageSection->ImageBase != KdbpImageBase) + { + if (KdbpRosSymInfo) + { + RosSymDelete(KdbpRosSymInfo); + KdbpRosSymInfo = NULL; + } + + Status = MmGetFileNameForAddress(Address, &ModuleFileName); + if (!NT_SUCCESS(Status)) + goto end; + + InitializeObjectAttributes + (&ObjectAttributes, + &ModuleFileName, + OBJ_CASE_INSENSITIVE, + NULL, + NULL); + + if (!NT_SUCCESS + (ZwOpenFile + (&FileHandle, + FILE_READ_ACCESS, + &ObjectAttributes, + &IoStatusBlock, + FILE_SHARE_READ, + FILE_SYNCHRONOUS_IO_NONALERT))) + { + goto end; + } + + if (!RosSymCreateFromFile(&FileHandle, &KdbpRosSymInfo)) + { + KdbpRosSymInfo = NULL; + } + + ZwClose(FileHandle); + KdbpImageBase = SectionObject->ImageSection->ImageBase; + } + + if (KdbpRosSymInfo) + { + RelativeAddress = (ULONG_PTR)Address - KdbpImageBase; + Status = KdbSymGetAddressInformation + (KdbpRosSymInfo, + RelativeAddress, + &LineNumber, + FileName, + FunctionName); + if (NT_SUCCESS(Status)) + { + DbgPrint + ("<%wZ:%x (%s:%d (%s))>", + &SectionObject->FileObject->FileName, + RelativeAddress, FileName, LineNumber, FunctionName); + return TRUE; + } + } + } + +end: + DbgPrint("<%wZ:%x>", &LdrEntry->BaseDllName, RelativeAddress); return TRUE; } @@ -208,8 +284,6 @@ PLIST_ENTRY CurrentEntry; KIRQL Irql; - DPRINT("Looking for cached symbol file %wZ\n", FileName); - KeAcquireSpinLock(&SymbolFileListLock, &Irql); CurrentEntry = SymbolFileListHead.Flink; @@ -217,7 +291,6 @@ { Current = CONTAINING_RECORD(CurrentEntry, IMAGE_SYMBOL_INFO_CACHE, ListEntry); - DPRINT("Current->FileName %wZ FileName %wZ\n", &Current->FileName, FileName); if (RtlEqualUnicodeString(&Current->FileName, FileName, TRUE)) { Current->RefCount++; @@ -311,7 +384,6 @@ } KeReleaseSpinLock(&SymbolFileListLock, Irql); - DPRINT1("Warning: Removing unknown symbol file: RosSymInfo = %p\n", RosSymInfo); } /*! \brief Loads a symbol file. @@ -411,7 +483,6 @@ LdrEntry->DllBase, (PVOID)(LdrEntry->SizeOfImage + (ULONG_PTR)LdrEntry->DllBase), LdrEntry->PatchInformation); - } VOID
14 years, 4 months
1
0
0
0
[fireball] 50032: [NTOS] - Roel Messiant: Fix NtQueryObject to return the required buffer size if the buffer provided was too small. Unimplemented paths behaviour is preserved.
by fireball@svn.reactos.org
Author: fireball Date: Wed Dec 15 20:12:03 2010 New Revision: 50032 URL:
http://svn.reactos.org/svn/reactos?rev=50032&view=rev
Log: [NTOS] - Roel Messiant: Fix NtQueryObject to return the required buffer size if the buffer provided was too small. Unimplemented paths behaviour is preserved. Modified: trunk/reactos/ntoskrnl/ob/oblife.c Modified: trunk/reactos/ntoskrnl/ob/oblife.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ob/oblife.c?rev=5…
============================================================================== --- trunk/reactos/ntoskrnl/ob/oblife.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ob/oblife.c [iso-8859-1] Wed Dec 15 20:12:03 2010 @@ -1549,6 +1549,7 @@ /* Information about all types */ case ObjectTypesInformation: DPRINT1("NOT IMPLEMENTED!\n"); + InfoLength = Length; Status = STATUS_NOT_IMPLEMENTED; break; @@ -1580,6 +1581,7 @@ default: /* Fail it */ + InfoLength = Length; Status = STATUS_INVALID_INFO_CLASS; break; } @@ -1588,7 +1590,7 @@ if (ResultLength) { /* Write the length */ - *ResultLength = Length; + *ResultLength = InfoLength; } } _SEH2_EXCEPT(ExSystemExceptionFilter())
14 years, 4 months
1
0
0
0
[fireball] 50031: [RTL] - Roel Messiant: Specify proper byte length of a unicode string. Fixes out of bounds access in actctx.c support code. No more half-cut active context stuff in debug logs.
by fireball@svn.reactos.org
Author: fireball Date: Wed Dec 15 20:03:43 2010 New Revision: 50031 URL:
http://svn.reactos.org/svn/reactos?rev=50031&view=rev
Log: [RTL] - Roel Messiant: Specify proper byte length of a unicode string. Fixes out of bounds access in actctx.c support code. No more half-cut active context stuff in debug logs. Modified: trunk/reactos/lib/rtl/actctx.c Modified: trunk/reactos/lib/rtl/actctx.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/actctx.c?rev=50031…
============================================================================== --- trunk/reactos/lib/rtl/actctx.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/actctx.c [iso-8859-1] Wed Dec 15 20:03:43 2010 @@ -239,7 +239,7 @@ UNICODE_STRING res; res.Buffer = (PWSTR)xmlstr->ptr; - res.Length = res.MaximumLength = xmlstr->len; + res.Length = res.MaximumLength = xmlstr->len * sizeof(WCHAR); return res; }
14 years, 4 months
1
0
0
0
[gadamopoulos] 50030: [win32k] - Use the new version of NtUserGetMessage and NtUserPeekMessage written by Jim. It is possible to use them now because GetMessage and PeekMessage don't return message...
by gadamopoulos@svn.reactos.org
Author: gadamopoulos Date: Wed Dec 15 19:21:48 2010 New Revision: 50030 URL:
http://svn.reactos.org/svn/reactos?rev=50030&view=rev
Log: [win32k] - Use the new version of NtUserGetMessage and NtUserPeekMessage written by Jim. It is possible to use them now because GetMessage and PeekMessage don't return messages that contain pointers. As a result they don't need to do any extra work to copy the message to user mode. All messages that contain pointers are sent messages and this means that they don't get into the message loop. Instead they are passed directly to the window proc. - DispatchMessage works only if the target window belongs to the current thread. This lets us remove uneeded copies of lparam to user mode. [user32] - Remove a bunch of uneeded code in GetMessage and PeekMessage that copyied the lparam in a new buffer and did unicode to ansi convertions. It is not needed because they don't receive messages with pointers any more Modified: trunk/reactos/dll/win32/user32/windows/message.c trunk/reactos/include/reactos/win32k/ntuser.h trunk/reactos/subsystems/win32/win32k/ntuser/message.c Modified: trunk/reactos/dll/win32/user32/windows/message.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/user32/windows/m…
============================================================================== --- trunk/reactos/dll/win32/user32/windows/message.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/user32/windows/message.c [iso-8859-1] Wed Dec 15 19:21:48 2010 @@ -931,121 +931,6 @@ return TRUE; } -typedef struct tagMSGCONVERSION -{ - BOOL InUse; - BOOL Ansi; - MSG KMMsg; - MSG UnicodeMsg; - MSG AnsiMsg; - PMSG FinalMsg; - SIZE_T LParamSize; -} MSGCONVERSION, *PMSGCONVERSION; - -static PMSGCONVERSION MsgConversions = NULL; -static unsigned MsgConversionNumAlloc = 0; -static unsigned MsgConversionNumUsed = 0; -static CRITICAL_SECTION MsgConversionCrst; - -static BOOL FASTCALL -MsgConversionAdd(PMSGCONVERSION Conversion) -{ - unsigned i; - - EnterCriticalSection(&MsgConversionCrst); - - if (MsgConversionNumUsed == MsgConversionNumAlloc) - { -#define GROWBY 4 - PMSGCONVERSION New; - if (NULL != MsgConversions) - { - New = HeapReAlloc(GetProcessHeap(), 0, MsgConversions, - (MsgConversionNumAlloc + GROWBY) * sizeof(MSGCONVERSION)); - } - else - { - New = HeapAlloc(GetProcessHeap(), 0, - (MsgConversionNumAlloc + GROWBY) * sizeof(MSGCONVERSION)); - } - - if (NULL == New) - { - LeaveCriticalSection(&MsgConversionCrst); - return FALSE; - } - MsgConversions = New; - /* zero out newly allocated part */ - memset(MsgConversions + MsgConversionNumAlloc, 0, GROWBY * sizeof(MSGCONVERSION)); - MsgConversionNumAlloc += GROWBY; -#undef GROWBY - } - - for (i = 0; i < MsgConversionNumAlloc; i++) - { - if (! MsgConversions[i].InUse) - { - MsgConversions[i] = *Conversion; - MsgConversions[i].InUse = TRUE; - MsgConversionNumUsed++; - break; - } - } - LeaveCriticalSection(&MsgConversionCrst); - - return TRUE; -} - -static void FASTCALL -MsgConversionCleanup(CONST MSG *Msg, BOOL Ansi, BOOL CheckMsgContents, LRESULT *Result) -{ - BOOL Found; - PMSGCONVERSION Conversion; - LRESULT Dummy; - - EnterCriticalSection(&MsgConversionCrst); - for (Conversion = MsgConversions; - Conversion < MsgConversions + MsgConversionNumAlloc; - Conversion++) - { - if (Conversion->InUse && - ((Ansi && Conversion->Ansi) || - (! Ansi && ! Conversion->Ansi))) - { - Found = (Conversion->FinalMsg == Msg); - if (! Found && CheckMsgContents) - { - if (Ansi) - { - Found = (0 == memcmp(Msg, &Conversion->AnsiMsg, sizeof(MSG))); - } - else - { - Found = (0 == memcmp(Msg, &Conversion->UnicodeMsg, sizeof(MSG))); - } - } - if (Found) - { - if (Ansi) - { - MsgiUnicodeToAnsiReply(&Conversion->AnsiMsg, &Conversion->UnicodeMsg, - NULL == Result ? &Dummy : Result); - } - MsgiKMToUMReply(&Conversion->KMMsg, &Conversion->UnicodeMsg, - NULL == Result ? &Dummy : Result); - if (0 != Conversion->LParamSize) - { - NtFreeVirtualMemory(NtCurrentProcess(), (PVOID *) &Conversion->KMMsg.lParam, - &Conversion->LParamSize, MEM_DECOMMIT); - } - Conversion->InUse = FALSE; - MsgConversionNumUsed--; - } - } - } - LeaveCriticalSection(&MsgConversionCrst); -} - /* * @implemented */ @@ -1712,50 +1597,26 @@ */ BOOL WINAPI GetMessageA(LPMSG lpMsg, - HWND hWnd, - UINT wMsgFilterMin, - UINT wMsgFilterMax) + HWND hWnd, + UINT wMsgFilterMin, + UINT wMsgFilterMax) { BOOL Res; - MSGCONVERSION Conversion; - NTUSERGETMESSAGEINFO Info; PUSER32_THREAD_DATA ThreadData = User32GetThreadData(); - MsgConversionCleanup(lpMsg, TRUE, FALSE, NULL); - Res = NtUserGetMessage(&Info, hWnd, wMsgFilterMin, wMsgFilterMax); + Res = NtUserGetMessage(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax); if (-1 == (int) Res) { return Res; } - Conversion.LParamSize = Info.LParamSize; - Conversion.KMMsg = Info.Msg; - - if (! MsgiKMToUMMessage(&Conversion.KMMsg, &Conversion.UnicodeMsg)) - { - return (BOOL) -1; - } - if (! MsgiUnicodeToAnsiMessage(&Conversion.AnsiMsg, &Conversion.UnicodeMsg)) - { - MsgiKMToUMCleanup(&Info.Msg, &Conversion.UnicodeMsg); - return (BOOL) -1; - } - if (!lpMsg) - { - SetLastError( ERROR_NOACCESS ); - return FALSE; - } - *lpMsg = Conversion.AnsiMsg; - Conversion.Ansi = TRUE; - Conversion.FinalMsg = lpMsg; - MsgConversionAdd(&Conversion); + if (Res && lpMsg->message != WM_PAINT && lpMsg->message != WM_QUIT) { - ThreadData->LastMessage = Info.Msg; + ThreadData->LastMessage = *lpMsg; } return Res; } - /* * @implemented @@ -1767,46 +1628,28 @@ UINT wMsgFilterMax) { BOOL Res; - MSGCONVERSION Conversion; - NTUSERGETMESSAGEINFO Info; PUSER32_THREAD_DATA ThreadData = User32GetThreadData(); - MsgConversionCleanup(lpMsg, FALSE, FALSE, NULL); - Res = NtUserGetMessage(&Info, hWnd, wMsgFilterMin, wMsgFilterMax); + Res = NtUserGetMessage(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax); if (-1 == (int) Res) { return Res; } - Conversion.LParamSize = Info.LParamSize; - Conversion.KMMsg = Info.Msg; - - if (! MsgiKMToUMMessage(&Conversion.KMMsg, &Conversion.UnicodeMsg)) - { - return (BOOL) -1; - } - if (!lpMsg) - { - SetLastError( ERROR_NOACCESS ); - return FALSE; - } - *lpMsg = Conversion.UnicodeMsg; - Conversion.Ansi = FALSE; - Conversion.FinalMsg = lpMsg; - MsgConversionAdd(&Conversion); + if (Res && lpMsg->message != WM_PAINT && lpMsg->message != WM_QUIT) { - ThreadData->LastMessage = Info.Msg; + ThreadData->LastMessage = *lpMsg; } return Res; } BOOL WINAPI -PeekMessageWorker(PNTUSERGETMESSAGEINFO pInfo, - HWND hWnd, - UINT wMsgFilterMin, - UINT wMsgFilterMax, - UINT wRemoveMsg) +PeekMessageWorker(PMSG pMsg, + HWND hWnd, + UINT wMsgFilterMin, + UINT wMsgFilterMax, + UINT wRemoveMsg) { PCLIENTINFO pci; PCLIENTTHREADINFO pcti; @@ -1835,7 +1678,7 @@ } } } - return NtUserPeekMessage(pInfo, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg); + return NtUserPeekMessage(pMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg); } /* @@ -1849,40 +1692,17 @@ UINT wRemoveMsg) { BOOL Res; - MSGCONVERSION Conversion; - NTUSERGETMESSAGEINFO Info; PUSER32_THREAD_DATA ThreadData = User32GetThreadData(); - MsgConversionCleanup(lpMsg, TRUE, FALSE, NULL); - Res = PeekMessageWorker(&Info, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg); + Res = PeekMessageWorker(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg); if (-1 == (int) Res || !Res) { return FALSE; } - Conversion.LParamSize = Info.LParamSize; - Conversion.KMMsg = Info.Msg; - - if (! MsgiKMToUMMessage(&Conversion.KMMsg, &Conversion.UnicodeMsg)) - { - return FALSE; - } - if (! MsgiUnicodeToAnsiMessage(&Conversion.AnsiMsg, &Conversion.UnicodeMsg)) - { - MsgiKMToUMCleanup(&Info.Msg, &Conversion.UnicodeMsg); - return FALSE; - } - if (!lpMsg) - { - SetLastError( ERROR_NOACCESS ); - return FALSE; - } - *lpMsg = Conversion.AnsiMsg; - Conversion.Ansi = TRUE; - Conversion.FinalMsg = lpMsg; - MsgConversionAdd(&Conversion); + if (Res && lpMsg->message != WM_PAINT && lpMsg->message != WM_QUIT) { - ThreadData->LastMessage = Info.Msg; + ThreadData->LastMessage = *lpMsg; } return Res; @@ -1902,35 +1722,17 @@ UINT wRemoveMsg) { BOOL Res; - MSGCONVERSION Conversion; - NTUSERGETMESSAGEINFO Info; PUSER32_THREAD_DATA ThreadData = User32GetThreadData(); - MsgConversionCleanup(lpMsg, FALSE, FALSE, NULL); - Res = PeekMessageWorker(&Info, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg); + Res = PeekMessageWorker(lpMsg, hWnd, wMsgFilterMin, wMsgFilterMax, wRemoveMsg); if (-1 == (int) Res || !Res) { return FALSE; } - Conversion.LParamSize = Info.LParamSize; - Conversion.KMMsg = Info.Msg; - - if (! MsgiKMToUMMessage(&Conversion.KMMsg, &Conversion.UnicodeMsg)) - { - return FALSE; - } - if (!lpMsg) - { - SetLastError( ERROR_NOACCESS ); - return FALSE; - } - *lpMsg = Conversion.UnicodeMsg; - Conversion.Ansi = FALSE; - Conversion.FinalMsg = lpMsg; - MsgConversionAdd(&Conversion); + if (Res && lpMsg->message != WM_PAINT && lpMsg->message != WM_QUIT) { - ThreadData->LastMessage = Info.Msg; + ThreadData->LastMessage = *lpMsg; } return Res; @@ -2878,7 +2680,6 @@ BOOL FASTCALL MessageInit(VOID) { InitializeCriticalSection(&DdeCrst); - InitializeCriticalSection(&MsgConversionCrst); InitializeCriticalSection(&gcsMPH); return TRUE; @@ -2887,7 +2688,6 @@ VOID FASTCALL MessageCleanup(VOID) { DeleteCriticalSection(&DdeCrst); - DeleteCriticalSection(&MsgConversionCrst); DeleteCriticalSection(&gcsMPH); } Modified: trunk/reactos/include/reactos/win32k/ntuser.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/reactos/win32k/ntu…
============================================================================== --- trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] (original) +++ trunk/reactos/include/reactos/win32k/ntuser.h [iso-8859-1] Wed Dec 15 19:21:48 2010 @@ -1996,19 +1996,11 @@ NtUserGetListBoxInfo( HWND hWnd); -typedef struct tagNTUSERGETMESSAGEINFO -{ - MSG Msg; - ULONG LParamSize; -} NTUSERGETMESSAGEINFO, *PNTUSERGETMESSAGEINFO; - -BOOL -NTAPI -NtUserGetMessage( - PNTUSERGETMESSAGEINFO MsgInfo, - HWND hWnd, - UINT wMsgFilterMin, - UINT wMsgFilterMax); +BOOL APIENTRY +NtUserGetMessage(PMSG pMsg, + HWND hWnd, + UINT MsgFilterMin, + UINT MsgFilterMax); DWORD NTAPI @@ -2373,14 +2365,12 @@ DWORD dwUnknown5, DWORD dwUnknown6); -BOOL -NTAPI -NtUserPeekMessage( - PNTUSERGETMESSAGEINFO MsgInfo, - HWND hWnd, - UINT wMsgFilterMin, - UINT wMsgFilterMax, - UINT wRemoveMsg); +BOOL APIENTRY +NtUserPeekMessage( PMSG pMsg, + HWND hWnd, + UINT MsgFilterMin, + UINT MsgFilterMax, + UINT RemoveMsg); BOOL NTAPI Modified: trunk/reactos/subsystems/win32/win32k/ntuser/message.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/subsystems/win32/win32k/nt…
============================================================================== --- trunk/reactos/subsystems/win32/win32k/ntuser/message.c [iso-8859-1] (original) +++ trunk/reactos/subsystems/win32/win32k/ntuser/message.c [iso-8859-1] Wed Dec 15 19:21:48 2010 @@ -426,10 +426,7 @@ LARGE_INTEGER TickCount; LONG Time; LRESULT retval = 0; - PMSGMEMORY MsgMemoryEntry; - INT lParamBufferSize; PTHREADINFO pti; - LPARAM lParamPacked; PWND Window = NULL; if (pMsg->hwnd) @@ -452,7 +449,6 @@ { if (pMsg->message == WM_TIMER) { - ObReferenceObject(pti->pEThread); if (ValidateTimerCallback(pti,pMsg->lParam)) { KeQueryTickCount(&TickCount); @@ -463,9 +459,8 @@ WM_TIMER, pMsg->wParam, (LPARAM)Time, - sizeof(LPARAM)); - } - ObDereferenceObject(pti->pEThread); + 0); + } return retval; } else @@ -483,35 +478,17 @@ // Need a window! if ( !Window ) return 0; - /* See if this message type is present in the table */ - MsgMemoryEntry = FindMsgMemory(pMsg->message); - if ( !MsgMemoryEntry ) - { - lParamBufferSize = -1; - } - else - { - lParamBufferSize = MsgMemorySize(MsgMemoryEntry, pMsg->wParam, pMsg->lParam); - } - - if (! NT_SUCCESS(PackParam(&lParamPacked, pMsg->message, pMsg->wParam, pMsg->lParam, FALSE))) - { - DPRINT1("Failed to pack message parameters\n"); - return 0; - } - ObReferenceObject(pti->pEThread); + /* Since we are doing a callback on the same thread right away, there is + no need to copy the lparam to kernel mode and then back to usermode. + We just pretend it isn't a pointer */ + retval = co_IntCallWindowProc( Window->lpfnWndProc, !Window->Unicode, pMsg->hwnd, pMsg->message, pMsg->wParam, - lParamPacked, - lParamBufferSize); - - if (! NT_SUCCESS(UnpackParam(lParamPacked, pMsg->message, pMsg->wParam, pMsg->lParam, FALSE))) - { - DPRINT1("Failed to unpack message parameters\n"); - } + pMsg->lParam, + 0); if (pMsg->message == WM_PAINT) { @@ -520,7 +497,7 @@ co_UserGetUpdateRgn( Window, hrgn, TRUE ); REGION_FreeRgnByHandle( hrgn ); } - ObDereferenceObject(pti->pEThread); + return retval; } @@ -868,6 +845,9 @@ bGMSG ); if (Present) { + /* GetMessage or PostMessage must never get messages that contain pointers */ + ASSERT(FindMsgMemory(pMsg->message) == NULL); + pti->timeLast = pMsg->time; pti->ptLast = pMsg->pt; @@ -1698,30 +1678,14 @@ return ret; } - BOOL APIENTRY -NtUserGetMessage( PNTUSERGETMESSAGEINFO UnsafeInfo, +NtUserGetMessage(PMSG pMsg, HWND hWnd, UINT MsgFilterMin, UINT MsgFilterMax ) -/* -* FUNCTION: Get a message from the calling thread's message queue. -* ARGUMENTS: -* UnsafeMsg - Pointer to the structure which receives the returned message. -* Wnd - Window whose messages are to be retrieved. -* MsgFilterMin - Integer value of the lowest message value to be -* retrieved. -* MsgFilterMax - Integer value of the highest message value to be -* retrieved. -*/ -{ - NTUSERGETMESSAGEINFO Info; - NTSTATUS Status; - PMSGMEMORY MsgMemoryEntry; - PVOID UserMem; - ULONG Size; +{ MSG Msg; - BOOL GotMessage; + BOOL Ret; if ( (MsgFilterMin|MsgFilterMax) & ~WM_MAXIMUM ) { @@ -1733,86 +1697,6 @@ RtlZeroMemory(&Msg, sizeof(MSG)); - GotMessage = co_IntGetPeekMessage(&Msg, hWnd, MsgFilterMin, MsgFilterMax, PM_REMOVE, TRUE); - - UserLeave(); - - Info.Msg = Msg; - /* See if this message type is present in the table */ - MsgMemoryEntry = FindMsgMemory(Info.Msg.message); - - _SEH2_TRY - { - ProbeForWrite(UnsafeInfo, sizeof(NTUSERGETMESSAGEINFO), 1); - RtlCopyMemory(UnsafeInfo, &Info, sizeof(NTUSERGETMESSAGEINFO)); - - if (NULL == MsgMemoryEntry) - { - /* Not present, no copying needed */ - UnsafeInfo->LParamSize = 0; - } - else - { - /* Determine required size */ - Size = MsgMemorySize(MsgMemoryEntry, Info.Msg.wParam, Info.Msg.lParam); - - /* Allocate required amount of user-mode memory */ - Status = ZwAllocateVirtualMemory(NtCurrentProcess(), - &UserMem, - 0, - &Size, - MEM_COMMIT, - PAGE_READWRITE); - if (! NT_SUCCESS(Status)) - { - SetLastNtError(Status); - _SEH2_YIELD(return (BOOL) -1); - } - - /* Transfer lParam data to user-mode mem */ - ProbeForWrite(UserMem, Size, 1); - RtlCopyMemory(UserMem, (PVOID)Info.Msg.lParam, Size); - - UnsafeInfo->LParamSize = Size; - UnsafeInfo->Msg.lParam = (LPARAM) UserMem; - } - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - SetLastNtError(_SEH2_GetExceptionCode()); - - if(UserMem != NULL) - { - ZwFreeVirtualMemory(NtCurrentProcess(), &UserMem, &Size, MEM_RELEASE); - } - - _SEH2_YIELD(return (BOOL) -1); - } - _SEH2_END; - - return GotMessage; -} - - -BOOL APIENTRY -NtUserGetMessageX(PMSG pMsg, - HWND hWnd, - UINT MsgFilterMin, - UINT MsgFilterMax) -{ - MSG Msg; - BOOL Ret; - - if ( (MsgFilterMin|MsgFilterMax) & ~WM_MAXIMUM ) - { - SetLastWin32Error(ERROR_INVALID_PARAMETER); - return FALSE; - } - - UserEnterExclusive(); - - RtlZeroMemory(&Msg, sizeof(MSG)); - Ret = co_IntGetPeekMessage(&Msg, hWnd, MsgFilterMin, MsgFilterMax, PM_REMOVE, TRUE); UserLeave(); @@ -1836,98 +1720,11 @@ } BOOL APIENTRY -NtUserPeekMessage(PNTUSERGETMESSAGEINFO UnsafeInfo, +NtUserPeekMessage( PMSG pMsg, HWND hWnd, UINT MsgFilterMin, UINT MsgFilterMax, UINT RemoveMsg) -{ - NTSTATUS Status; - NTUSERGETMESSAGEINFO Info; - PMSGMEMORY MsgMemoryEntry; - PVOID UserMem = NULL; - ULONG Size; - MSG Msg; - BOOL Ret; - - if ( RemoveMsg & PM_BADMSGFLAGS ) - { - SetLastWin32Error(ERROR_INVALID_FLAGS); - return FALSE; - } - - UserEnterExclusive(); - - RtlZeroMemory(&Msg, sizeof(MSG)); - - Ret = co_IntGetPeekMessage(&Msg, hWnd, MsgFilterMin, MsgFilterMax, RemoveMsg, FALSE); - - UserLeave(); - - if (Ret) - { - Info.Msg = Msg; - /* See if this message type is present in the table */ - MsgMemoryEntry = FindMsgMemory(Info.Msg.message); - - _SEH2_TRY - { - ProbeForWrite(UnsafeInfo, sizeof(NTUSERGETMESSAGEINFO), 1); - RtlCopyMemory(UnsafeInfo, &Info, sizeof(NTUSERGETMESSAGEINFO)); - - if (NULL == MsgMemoryEntry) - { - /* Not present, no copying needed */ - UnsafeInfo->LParamSize = 0; - } - else - { - /* Determine required size */ - Size = MsgMemorySize(MsgMemoryEntry, Info.Msg.wParam, Info.Msg.lParam); - - /* Allocate required amount of user-mode memory */ - Status = ZwAllocateVirtualMemory(NtCurrentProcess(), - &UserMem, - 0, - &Size, - MEM_COMMIT, - PAGE_READWRITE); - if (! NT_SUCCESS(Status)) - { - SetLastNtError(Status); - _SEH2_YIELD(return (BOOL) -1); - } - - /* Transfer lParam data to user-mode mem */ - ProbeForWrite(UserMem, Size, 1); - RtlCopyMemory(UserMem, (PVOID)Info.Msg.lParam, Size); - - UnsafeInfo->LParamSize = Size; - UnsafeInfo->Msg.lParam = (LPARAM) UserMem; - } - } - _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) - { - SetLastNtError(_SEH2_GetExceptionCode()); - Ret = (BOOL) -1; - - if(UserMem != NULL) - { - ZwFreeVirtualMemory(NtCurrentProcess(), &UserMem, &Size, MEM_RELEASE); - } - } - _SEH2_END; - } - - return Ret; -} - -BOOL APIENTRY -NtUserPeekMessageX( PMSG pMsg, - HWND hWnd, - UINT MsgFilterMin, - UINT MsgFilterMax, - UINT RemoveMsg) { MSG Msg; BOOL Ret;
14 years, 4 months
1
0
0
0
[evb] 50029: - Mode detect look for 4BPP, planar, graphics < 0x800 mode now - Add GDIINFO from NT4 VGA DDK sample driver - Set 4BPP prefer DIB format - No graphics caps set for VGA driver - Put sta...
by evb@svn.reactos.org
Author: evb Date: Tue Dec 14 04:10:14 2010 New Revision: 50029 URL:
http://svn.reactos.org/svn/reactos?rev=50029&view=rev
Log: - Mode detect look for 4BPP, planar, graphics < 0x800 mode now - Add GDIINFO from NT4 VGA DDK sample driver - Set 4BPP prefer DIB format - No graphics caps set for VGA driver - Put static palette/color buffer for when VGA IOCTL send later - Convert almost done, bInitSURF is last Modified: trunk/reactos/drivers/video/displays/vga_new/screen.c Modified: trunk/reactos/drivers/video/displays/vga_new/screen.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/displays/vga…
============================================================================== --- trunk/reactos/drivers/video/displays/vga_new/screen.c [iso-8859-1] (original) +++ trunk/reactos/drivers/video/displays/vga_new/screen.c [iso-8859-1] Tue Dec 14 04:10:14 2010 @@ -16,7 +16,9 @@ // on information passed back from the miniport driver. const DEVINFO gDevInfoFrameBuffer = { - ( GCAPS_OPAQUERECT +// eVb: 2.1 [VGARISC CHANGE] - No capabilities + ( 0 +// eVb: 2.1 [END] // eVb: 2.8 [DDK CHANGE] - No dithering support // eVb: 2.8 [END] ), /* Graphics capabilities */ @@ -24,7 +26,9 @@ HELVE_LOGFONT, /* ANSI variable font description */ COURI_LOGFONT, /* ANSI fixed font description */ 0, /* Count of device fonts */ - 0, /* Preferred DIB format */ +// eVb: 2.2 [VGARISC CHANGE] - DIB format is 4BPP + BMF_4BPP, /* Preferred DIB format */ +// eVb: 2.2 [END] // eVb: 2.9 [DDK CHANGE] - No dithering support 0, /* Width of color dither */ 0, /* Height of color dither */ @@ -32,6 +36,127 @@ 0 /* Default palette to use for this device */ }; +// eVb: 2.3 [VGARISC CHANGE] - Add VGA structures from NT4 DDK Sample VGA driver +/******************************Public*Data*Struct*************************\ +* This contains the GDIINFO structure that contains the device capabilities +* which are passed to the NT GDI engine during dhpdevEnablePDEV. +* +\**************************************************************************/ + +GDIINFO gaulCap = { + + GDI_DRIVER_VERSION, + DT_RASDISPLAY, // ulTechnology + 0, // ulHorzSize + 0, // ulVertSize + 0, // ulHorzRes (filled in at initialization) + 0, // ulVertRes (filled in at initialization) + 4, // cBitsPixel + 1, // cPlanes + 16, // ulNumColors + 0, // flRaster (DDI reserved field) + + 0, // ulLogPixelsX (filled in at initialization) + 0, // ulLogPixelsY (filled in at initialization) + + TC_RA_ABLE | TC_SCROLLBLT, // flTextCaps + + 6, // ulDACRed + 6, // ulDACGree + 6, // ulDACBlue + + 0x0024, // ulAspectX (one-to-one aspect ratio) + 0x0024, // ulAspectY + 0x0033, // ulAspectXY + + 1, // xStyleStep + 1, // yStyleSte; + 3, // denStyleStep + + { 0, 0 }, // ptlPhysOffset + { 0, 0 }, // szlPhysSize + + 0, // ulNumPalReg (win3.1 16 color drivers say 0 too) + +// These fields are for halftone initialization. + + { // ciDevice, ColorInfo + { 6700, 3300, 0 }, // Red + { 2100, 7100, 0 }, // Green + { 1400, 800, 0 }, // Blue + { 1750, 3950, 0 }, // Cyan + { 4050, 2050, 0 }, // Magenta + { 4400, 5200, 0 }, // Yellow + { 3127, 3290, 0 }, // AlignmentWhite + 20000, // RedGamma + 20000, // GreenGamma + 20000, // BlueGamma + 0, 0, 0, 0, 0, 0 + }, + + 0, // ulDevicePelsDPI (filled in at initialization) + PRIMARY_ORDER_CBA, // ulPrimaryOrder + HT_PATSIZE_4x4_M, // ulHTPatternSize + HT_FORMAT_4BPP_IRGB, // ulHTOutputFormat + HT_FLAG_ADDITIVE_PRIMS, // flHTFlags + + 0, // ulVRefresh +// eVb: 2.4 [VGARISC DDK CHANGE] - Use 1 bit alignment, not 8 + 1, // ulBltAlignment (preferred window alignment +// eVb: 2.4 [END] + // for fast-text routines) + 0, // ulPanningHorzRes + 0, // ulPanningVertRes +}; + +/******************************Module*Header*******************************\ +* Color tables +\**************************************************************************/ + +// Values for the internal, EGA-compatible palette. + +static WORD PaletteBuffer[] = { + + 16, // 16 entries + 0, // start with first palette register + +// On the VGA, the palette contains indices into the array of color DACs. +// Since we can program the DACs as we please, we'll just put all the indices +// down at the beginning of the DAC array (that is, pass pixel values through +// the internal palette unchanged). + + 0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15 +}; + + +// These are the values for the first 16 DAC registers, the only ones we'll +// work with. These correspond to the RGB colors (6 bits for each primary, with +// the fourth entry unused) for pixel values 0-15. + +static BYTE ColorBuffer[] = { + + 16, // 16 entries + 0, + 0, + 0, // start with first palette register + 0x00, 0x00, 0x00, 0x00, // black + 0x2A, 0x00, 0x15, 0x00, // red + 0x00, 0x2A, 0x15, 0x00, // green + 0x2A, 0x2A, 0x15, 0x00, // mustard/brown + 0x00, 0x00, 0x2A, 0x00, // blue + 0x2A, 0x15, 0x2A, 0x00, // magenta + 0x15, 0x2A, 0x2A, 0x00, // ScanLinesan + 0x21, 0x22, 0x23, 0x00, // dark gray 2A + 0x30, 0x31, 0x32, 0x00, // light gray 39 + 0x3F, 0x00, 0x00, 0x00, // bright red + 0x00, 0x3F, 0x00, 0x00, // bright green + 0x3F, 0x3F, 0x00, 0x00, // bright yellow + 0x00, 0x00, 0x3F, 0x00, // bright blue + 0x3F, 0x00, 0x3F, 0x00, // bright magenta + 0x00, 0x3F, 0x3F, 0x00, // bright ScanLinesan + 0x3F, 0x3F, 0x3F, 0x00 // bright white +}; +// eVb: 2.3 [END] /******************************Public*Routine******************************\ * bInitSURF * @@ -288,13 +413,18 @@ ppdev->ulMode = pVideoModeSelected->ModeIndex; ppdev->cxScreen = pVideoModeSelected->VisScreenWidth; ppdev->cyScreen = pVideoModeSelected->VisScreenHeight; + ppdev->lDeltaScreen = pVideoModeSelected->ScreenStride; +// eVb: 2.8 [VGARISC CHANGE] - Extra fields not required on VGA, start with defaults +#if 0 ppdev->ulBitCount = pVideoModeSelected->BitsPerPlane * pVideoModeSelected->NumberOfPlanes; - ppdev->lDeltaScreen = pVideoModeSelected->ScreenStride; - ppdev->flRed = pVideoModeSelected->RedMask; ppdev->flGreen = pVideoModeSelected->GreenMask; ppdev->flBlue = pVideoModeSelected->BlueMask; +#else + *pGdiInfo = gaulCap; +#endif +// eVb: 2.8 [END] pGdiInfo->ulVersion = GDI_DRIVER_VERSION; @@ -316,6 +446,8 @@ pGdiInfo->ulLogPixelsX = pDevMode->dmLogPixels; pGdiInfo->ulLogPixelsY = pDevMode->dmLogPixels; +// eVb: 2.9 [VGARISC CHANGE] - Extra fields not required on VGA +#if 0 #ifdef MIPS if (ppdev->ulBitCount == 8) pGdiInfo->flTextCaps = (TC_RA_ABLE | TC_SCROLLBLT); @@ -324,11 +456,15 @@ pGdiInfo->flTextCaps = TC_RA_ABLE; pGdiInfo->flRaster = 0; // flRaster is reserved by DDI +#endif +// eVb: 2.9 [END] pGdiInfo->ulDACRed = pVideoModeSelected->NumberRedBits; pGdiInfo->ulDACGreen = pVideoModeSelected->NumberGreenBits; pGdiInfo->ulDACBlue = pVideoModeSelected->NumberBlueBits; +// eVb: 2.7 [VGARISC CHANGE] - Extra fields not required on VGA +#if 0 pGdiInfo->ulAspectX = 0x24; // One-to-one aspect ratio pGdiInfo->ulAspectY = 0x24; pGdiInfo->ulAspectXY = 0x33; @@ -439,11 +575,15 @@ pGdiInfo->ulHTPatternSize = HT_PATSIZE_4x4_M; pGdiInfo->flHTFlags = HT_FLAG_ADDITIVE_PRIMS; +// eVb: 2.7 [END] +#endif // Fill in the basic devinfo structure *pDevInfo = gDevInfoFrameBuffer; +// eVb: 2.6 [VGARISC CHANGE] - Use defaults in gaulCap for GDI Info +#if 0 // Fill in the rest of the devinfo and GdiInfo structures. if (ppdev->ulBitCount == 8) @@ -483,6 +623,8 @@ pDevInfo->iDitherFormat = BMF_32BPP; } } +#endif +// eVb: 2.6 [END] EngFreeMem(pVideoBuffer); @@ -575,22 +717,19 @@ ulTemp = modes.NumModes; pVideoTemp = *modeInformation; - // - // Mode is rejected if it is not one plane, or not graphics, or is not - // one of 8, 16 or 32 bits per pel. +// eVb: 2.5 [VGARISC CHANGE] - Add correct mode checks for VGA + // + // Mode is rejected if it is not 4 planes, or not graphics, or is not + // one of 1 bits per pel. // while (ulTemp--) { - if ((pVideoTemp->NumberOfPlanes != 1 ) || + if ((pVideoTemp->NumberOfPlanes != 4 ) || !(pVideoTemp->AttributeFlags & VIDEO_MODE_GRAPHICS) || -// eVb: 2.6 [DDK CHANGE] - Do not process banked video modes - (pVideoTemp->AttributeFlags & VIDEO_MODE_BANKED) || -// eVb: 2.6 [END] - ((pVideoTemp->BitsPerPlane != 8) && - (pVideoTemp->BitsPerPlane != 16) && - (pVideoTemp->BitsPerPlane != 24) && - (pVideoTemp->BitsPerPlane != 32))) + ((pVideoTemp->BitsPerPlane != 1) || + (pVideoTemp->VisScreenWidth > 800))) +// eVb: 2.5 [END] { pVideoTemp->Length = 0; }
14 years, 4 months
1
0
0
0
[evb] 50028: - Finish make enable.c work full on vga, main change force 4BPP (disable other codes), create 4BPP bitmap surfobj, associate and lock - Easy part done, now hard part
by evb@svn.reactos.org
Author: evb Date: Tue Dec 14 03:52:00 2010 New Revision: 50028 URL:
http://svn.reactos.org/svn/reactos?rev=50028&view=rev
Log: - Finish make enable.c work full on vga, main change force 4BPP (disable other codes), create 4BPP bitmap surfobj, associate and lock - Easy part done, now hard part Modified: trunk/reactos/drivers/video/displays/vga_new/enable.c Modified: trunk/reactos/drivers/video/displays/vga_new/enable.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/video/displays/vga…
============================================================================== --- trunk/reactos/drivers/video/displays/vga_new/enable.c [iso-8859-1] (original) +++ trunk/reactos/drivers/video/displays/vga_new/enable.c [iso-8859-1] Tue Dec 14 03:52:00 2010 @@ -19,7 +19,9 @@ { INDEX_DrvEnableSurface, (PFN) DrvEnableSurface }, { INDEX_DrvDisableSurface, (PFN) DrvDisableSurface }, { INDEX_DrvAssertMode, (PFN) DrvAssertMode }, +// eVb: 1.2 [VGARISC Change] - Disable hardware palette support { INDEX_DrvSetPalette, (PFN) DrvSetPalette }, +// eVb: 1.2 [END] // eVb: 1.1 [VGARISC Change] - Disable hardware pointer support #if 0 { INDEX_DrvMovePointer, (PFN) DrvMovePointer }, @@ -227,6 +229,8 @@ sizl.cx = ppdev->cxScreen; sizl.cy = ppdev->cyScreen; +// eVb: 1.3 [VGARISC Change] - Disable dynamic palette and > 4BPP support +#if 0 if (ppdev->ulBitCount == 8) { if (!bInit256ColorPalette(ppdev)) { @@ -253,6 +257,10 @@ } // eVb: 1.3 [DDK Change] - Support new VGA Miniport behavior w.r.t updated framebuffer remapping ppdev->flHooks = flHooks; +// eVb: 1.3 [END] +#else + ulBitmapType = BMF_4BPP; +#endif // eVb: 1.3 [END] // eVb: 1.4 [DDK Change] - Use EngCreateDeviceSurface instead of EngCreateBitmap hsurf = (HSURF)EngCreateDeviceSurface((DHSURF)ppdev, @@ -281,7 +289,35 @@ } // eVb: 1.5 [END] ppdev->hsurfEng = hsurf; - +// eVb: 1.4 [VGARISC Change] - Allocate 4BPP DIB that will store GDI drawing + HSURF hSurfBitmap; + hSurfBitmap = (HSURF)EngCreateBitmap(sizl, 0, ulBitmapType, 0, NULL); + if (hSurfBitmap == (HSURF) 0) + { + RIP("DISP DrvEnableSurface failed EngCreateBitmap\n"); + return(FALSE); + } + + if ( !EngModifySurface(hSurfBitmap, + ppdev->hdevEng, + ppdev->flHooks | HOOK_SYNCHRONIZE, + MS_NOTSYSTEMMEMORY, + (DHSURF)ppdev, + ppdev->pjScreen, + ppdev->lDeltaScreen, + NULL)) + { + RIP("DISP DrvEnableSurface failed second EngModifySurface\n"); + return(FALSE); + } + + ppdev->pso = EngLockSurface(hSurfBitmap); + if (ppdev->pso == NULL) + { + RIP("DISP DrvEnableSurface failed EngLockSurface\n"); + return(FALSE); + } +// eVb: 1.4 [END] return(hsurf); }
14 years, 4 months
1
0
0
0
← Newer
1
...
19
20
21
22
23
24
25
...
37
Older →
Jump to page:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
Results per page:
10
25
50
100
200