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
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
February 2010
----- 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
22 participants
365 discussions
Start a n
N
ew thread
[jcatena] 45391: [REACTOS] platf.h update
by jcatena@svn.reactos.org
Author: jcatena Date: Wed Feb 3 14:23:05 2010 New Revision: 45391 URL:
http://svn.reactos.org/svn/reactos?rev=45391&view=rev
Log: [REACTOS] platf.h update Modified: branches/jcatena-branch/include/reactos/msc/i386/platf.h branches/jcatena-branch/include/reactos/msc/intrin2.h Modified: branches/jcatena-branch/include/reactos/msc/i386/platf.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/include/reactos/…
============================================================================== --- branches/jcatena-branch/include/reactos/msc/i386/platf.h [iso-8859-1] (original) +++ branches/jcatena-branch/include/reactos/msc/i386/platf.h [iso-8859-1] Wed Feb 3 14:23:05 2010 @@ -66,6 +66,30 @@ #define IN #define OUT +/************************************************************************* +utility macros +*************************************************************************/ +// token paste +#define tokenpaste_(a1, a2) a1##a2 +#define tokenpaste(a1, a2) tokenpaste_(a1, a2) + +// stringfy +#define sfy_(x) #x +#define sfy(x) sfy_(x) + +// string literal macros +// double definitions here are necessary because preprocessor behavior +#define T16(x) tokenpaste(L, x) +#define T8(x) x +#ifdef _UNICODE +#define TX(x) _T16(x) +#else +#define TX(x) _T8(x) +#endif + +/************************************************************************* +basic types +*************************************************************************/ /* ptr size */ #define PTRSIZ 4 #define PTRSIZMIN 4 @@ -78,9 +102,6 @@ #define _SEGMENT _UNSUPPORTED #define _SEGNAME _UNSUPPORTED -/************************************************************************* -basic types -*************************************************************************/ typedef void *pvoid, _NEAR *npvoid, _FAR *lpvoid, _FARH *hpvoid; /* chars */ @@ -125,21 +146,6 @@ typedef chrs *pchrs, _NEAR *npchrs, _FAR *lpchrs, _FARH hpchrs; typedef chru *pchru, _NEAR *npchru, _FAR *lpchru, _FARH hpchru; -// string literal macros -// double definitions here are necessary because preprocessor behavior -#define _T16(x) L ## x -#define T16(x) _T16(x) -#define _T8(x) x -#define T8(x) _T8(x) -#ifdef _UNICODE -#define TX(x) _T16(x) -#else -#define TX(x) _T8(x) -#endif -// stringfy -#define _sfy(x) #x -#define sfy(x) _sfy(x) - /* integers */ #define INTSIZMIN 1 #define INTSIZMAX 8 @@ -202,12 +208,6 @@ #define _UNREACHABLE _ASSUME(0); _noreturn() #define UNREACHABLE _UNREACHABLE -pvoid _ReturnAddress(void); -#pragma intrinsic(_ReturnAddress) -#define ReturnAddress _ReturnAddress -#define _ReturnAddressn(x) _ReturnAddress() -#define ReturnAddressn _ReturnAddressn - _NOWARN_MSC(4146) // unary minus applied to unsigned #include <platf2.h> // should not be needed if code uses above macros instead of compiler dependent directives Modified: branches/jcatena-branch/include/reactos/msc/intrin2.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/include/reactos/…
============================================================================== --- branches/jcatena-branch/include/reactos/msc/intrin2.h [iso-8859-1] (original) +++ branches/jcatena-branch/include/reactos/msc/intrin2.h [iso-8859-1] Wed Feb 3 14:23:05 2010 @@ -9,6 +9,10 @@ void * _ReturnAddress(void); void * _AddressOfReturnAddress(void); unsigned int __getcallerseflags(void); + +#define ReturnAddress _ReturnAddress +#define _ReturnAddressn(x) _ReturnAddress() +#define ReturnAddressn _ReturnAddressn /*** Atomic operations ***/ void _ReadWriteBarrier(void);
14 years, 10 months
1
0
0
0
[janderwald] 45390: [WDMAUD.DRV] - Cleanup code - Fix a bug which made the caller assume that a wave handle has already been open. - define a macro which appends a postfix depending on wether USE_MMIXER_LIB has been defined
by janderwald@svn.reactos.org
Author: janderwald Date: Wed Feb 3 13:48:27 2010 New Revision: 45390 URL:
http://svn.reactos.org/svn/reactos?rev=45390&view=rev
Log: [WDMAUD.DRV] - Cleanup code - Fix a bug which made the caller assume that a wave handle has already been open. - define a macro which appends a postfix depending on wether USE_MMIXER_LIB has been defined Modified: trunk/reactos/dll/win32/wdmaud.drv/legacy.c trunk/reactos/dll/win32/wdmaud.drv/mmixer.c trunk/reactos/dll/win32/wdmaud.drv/wdmaud.c trunk/reactos/dll/win32/wdmaud.drv/wdmaud.h Modified: trunk/reactos/dll/win32/wdmaud.drv/legacy.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wdmaud.drv/legac…
============================================================================== --- trunk/reactos/dll/win32/wdmaud.drv/legacy.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wdmaud.drv/legacy.c [iso-8859-1] Wed Feb 3 13:48:27 2010 @@ -15,9 +15,12 @@ #include "wdmaud.h" +#include <stdio.h> + #define KERNEL_DEVICE_NAME L"\\\\.\\wdmaud" -extern HANDLE KernelHandle; -extern DWORD OpenCount; + +HANDLE KernelHandle = INVALID_HANDLE_VALUE; +DWORD OpenCount = 0; DWORD WINAPI @@ -77,14 +80,16 @@ return 0; } -VOID -WdmAudCleanupLegacy() -{ - if ( KernelHandle != INVALID_HANDLE_VALUE ) +MMRESULT +WdmAudCleanupByLegacy() +{ + if (KernelHandle != INVALID_HANDLE_VALUE) { CloseHandle(KernelHandle); KernelHandle = INVALID_HANDLE_VALUE; } + + return MMSYSERR_NOERROR; } MMRESULT @@ -325,12 +330,11 @@ WDMAUD_DEVICE_INFO DeviceInfo; HANDLE hThread; - Instance->hNotifyEvent = CreateEventW(NULL, FALSE, FALSE, NULL); if ( ! Instance->hNotifyEvent ) return MMSYSERR_NOMEM; - if (Instance->Handle != KernelHandle) + if (Instance->Handle != NULL) { /* device is already open */ return MMSYSERR_NOERROR; @@ -399,7 +403,7 @@ return TranslateInternalMmResult(Result); } - if (Instance->Handle != KernelHandle) + if (Instance->Handle != NULL) { /* device is already open */ return MMSYSERR_NOERROR; @@ -494,7 +498,7 @@ } MMRESULT -WriteFileEx_Committer2( +WdmAudCommitWaveBufferByLegacy( IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance, IN PVOID OffsetPtr, IN DWORD Length, @@ -514,7 +518,7 @@ VALIDATE_MMSYS_PARAMETER( CompletionRoutine ); GetSoundDeviceInstanceHandle(SoundDeviceInstance, &Handle); - + SND_ASSERT(Handle); Result = GetSoundDeviceFromInstance(SoundDeviceInstance, &SoundDevice); @@ -525,8 +529,6 @@ Result = GetSoundDeviceType(SoundDevice, &DeviceType); SND_ASSERT( Result == MMSYSERR_NOERROR ); - - SND_ASSERT(Handle); ZeroMemory(&DeviceInfo, sizeof(WDMAUD_DEVICE_INFO)); @@ -541,6 +543,8 @@ DeviceInfo.Header.PresentationTime.Denominator = 1; DeviceInfo.hDevice = Handle; DeviceInfo.DeviceType = DeviceType; + + Overlap->Standard.hEvent = CreateEventW(NULL, FALSE, FALSE, NULL); Modified: trunk/reactos/dll/win32/wdmaud.drv/mmixer.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wdmaud.drv/mmixe…
============================================================================== --- trunk/reactos/dll/win32/wdmaud.drv/mmixer.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wdmaud.drv/mmixer.c [iso-8859-1] Wed Feb 3 13:48:27 2010 @@ -518,8 +518,7 @@ IN struct _SOUND_DEVICE* SoundDevice, OUT PVOID* Handle) { - /* no-op */ - return MMSYSERR_NOERROR; + return WdmAudInitUserModeMixer(); } MMRESULT @@ -731,7 +730,7 @@ sizeof(KSSTREAM_HEADER), &Length); - /* FIXXXXXME + /* HACK: * don't call completion routine directly */ CompletionRoutine(ERROR_SUCCESS, Length, (LPOVERLAPPED)Overlap); Modified: trunk/reactos/dll/win32/wdmaud.drv/wdmaud.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wdmaud.drv/wdmau…
============================================================================== --- trunk/reactos/dll/win32/wdmaud.drv/wdmaud.c [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wdmaud.drv/wdmaud.c [iso-8859-1] Wed Feb 3 13:48:27 2010 @@ -15,306 +15,11 @@ #include "wdmaud.h" -#define KERNEL_DEVICE_NAME L"\\\\.\\wdmaud" - -PWSTR UnknownWaveIn = L"Wave Input"; -PWSTR UnknownWaveOut = L"Wave Output"; -PWSTR UnknownMidiIn = L"Midi Input"; -PWSTR UnknownMidiOut = L"Midi Output"; - - -HANDLE KernelHandle = INVALID_HANDLE_VALUE; -DWORD OpenCount = 0; - -MMRESULT -WriteFileEx_Remixer( - IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance, - IN PVOID OffsetPtr, - IN DWORD Length, - IN PSOUND_OVERLAPPED Overlap, - IN LPOVERLAPPED_COMPLETION_ROUTINE CompletionRoutine); - - - -MMRESULT -GetNumWdmDevs( - IN HANDLE Handle, - IN MMDEVICE_TYPE DeviceType, - OUT DWORD* DeviceCount) -{ -#ifdef USE_MMIXER_LIB - - switch(DeviceType) - { - case MIXER_DEVICE_TYPE: - *DeviceCount = WdmAudGetMixerCount(); - break; - case WAVE_OUT_DEVICE_TYPE: - *DeviceCount = WdmAudGetWaveOutCount(); - break; - case WAVE_IN_DEVICE_TYPE: - *DeviceCount = WdmAudGetWaveInCount(); - break; - default: - *DeviceCount = 0; - } - return MMSYSERR_NOERROR; +#ifndef USE_MMIXER_LIB +#define FUNC_NAME(x) x##ByLegacy #else - - MMRESULT Result; - WDMAUD_DEVICE_INFO DeviceInfo; - - VALIDATE_MMSYS_PARAMETER( Handle != INVALID_HANDLE_VALUE ); - VALIDATE_MMSYS_PARAMETER( IS_VALID_SOUND_DEVICE_TYPE(DeviceType) ); - VALIDATE_MMSYS_PARAMETER( DeviceCount ); - - ZeroMemory(&DeviceInfo, sizeof(WDMAUD_DEVICE_INFO)); - DeviceInfo.DeviceType = DeviceType; - - Result = SyncOverlappedDeviceIoControl(Handle, - IOCTL_GETNUMDEVS_TYPE, - (LPVOID) &DeviceInfo, - sizeof(WDMAUD_DEVICE_INFO), - (LPVOID) &DeviceInfo, - sizeof(WDMAUD_DEVICE_INFO), - NULL); - - if ( ! MMSUCCESS( Result ) ) - { - SND_ERR(L"Call to IOCTL_GETNUMDEVS_TYPE failed\n"); - *DeviceCount = 0; - return TranslateInternalMmResult(Result); - } - - *DeviceCount = DeviceInfo.DeviceCount; - - return MMSYSERR_NOERROR; +#define FUNC_NAME(x) x##ByMMixer #endif -} - -MMRESULT -GetWdmDeviceCapabilities( - IN PSOUND_DEVICE SoundDevice, - IN DWORD DeviceId, - OUT PVOID Capabilities, - IN DWORD CapabilitiesSize) -{ - /* NOTE - At this time, WDMAUD does not support this properly */ - - MMRESULT Result; - MMDEVICE_TYPE DeviceType; - WDMAUD_DEVICE_INFO DeviceInfo; - - SND_ASSERT( SoundDevice ); - SND_ASSERT( Capabilities ); - - Result = GetSoundDeviceType(SoundDevice, &DeviceType); - SND_ASSERT( Result == MMSYSERR_NOERROR ); - - if ( ! MMSUCCESS(Result) ) - return Result; - - SND_TRACE(L"WDMAUD - GetWdmDeviceCapabilities DeviceType %u DeviceId %u\n", DeviceType, DeviceId); - -#ifdef USE_MMIXER_LIB - if (DeviceType == MIXER_DEVICE_TYPE) - { - return WdmAudGetMixerCapabilities(DeviceId, (LPMIXERCAPSW)Capabilities); - } - else if (DeviceType == WAVE_OUT_DEVICE_TYPE) - { - return WdmAudGetWaveOutCapabilities(DeviceId, (LPWAVEOUTCAPSW)Capabilities); - } - else if (DeviceType == WAVE_IN_DEVICE_TYPE) - { - return WdmAudGetWaveInCapabilities(DeviceId, (LPWAVEINCAPSW)Capabilities); - } - -#endif - - - ZeroMemory(&DeviceInfo, sizeof(WDMAUD_DEVICE_INFO)); - DeviceInfo.DeviceType = DeviceType; - DeviceInfo.DeviceIndex = DeviceId; - - Result = SyncOverlappedDeviceIoControl(KernelHandle, - IOCTL_GETCAPABILITIES, - (LPVOID) &DeviceInfo, - sizeof(WDMAUD_DEVICE_INFO), - (LPVOID) &DeviceInfo, - sizeof(WDMAUD_DEVICE_INFO), - NULL); - - if ( ! MMSUCCESS(Result) ) - { - return TranslateInternalMmResult(Result); - } - - /* This is pretty much a big hack right now */ - switch ( DeviceType ) - { - case MIXER_DEVICE_TYPE: - { - LPMIXERCAPS MixerCaps = (LPMIXERCAPS) Capabilities; - - DeviceInfo.u.MixCaps.szPname[MAXPNAMELEN-1] = L'\0'; - CopyWideString(MixerCaps->szPname, DeviceInfo.u.MixCaps.szPname); - - MixerCaps->cDestinations = DeviceInfo.u.MixCaps.cDestinations; - MixerCaps->fdwSupport = DeviceInfo.u.MixCaps.fdwSupport; - MixerCaps->vDriverVersion = DeviceInfo.u.MixCaps.vDriverVersion; - MixerCaps->wMid = DeviceInfo.u.MixCaps.wMid; - MixerCaps->wPid = DeviceInfo.u.MixCaps.wPid; - break; - } - case WAVE_OUT_DEVICE_TYPE : - { - LPWAVEOUTCAPS WaveOutCaps = (LPWAVEOUTCAPS) Capabilities; - - DeviceInfo.u.WaveOutCaps.szPname[MAXPNAMELEN-1] = L'\0'; - WaveOutCaps->wMid = DeviceInfo.u.WaveOutCaps.wMid; - WaveOutCaps->wPid = DeviceInfo.u.WaveOutCaps.wPid; - - WaveOutCaps->vDriverVersion = 0x0001; - CopyWideString(WaveOutCaps->szPname, DeviceInfo.u.WaveOutCaps.szPname); - - WaveOutCaps->dwFormats = DeviceInfo.u.WaveOutCaps.dwFormats; - WaveOutCaps->wChannels = DeviceInfo.u.WaveOutCaps.wChannels; - WaveOutCaps->dwSupport = DeviceInfo.u.WaveOutCaps.dwSupport; - break; - } - case WAVE_IN_DEVICE_TYPE : - { - LPWAVEINCAPSW WaveInCaps = (LPWAVEINCAPSW) Capabilities; - - DeviceInfo.u.WaveInCaps.szPname[MAXPNAMELEN-1] = L'\0'; - - WaveInCaps->wMid = DeviceInfo.u.WaveInCaps.wMid; - WaveInCaps->wPid = DeviceInfo.u.WaveInCaps.wPid; - - WaveInCaps->vDriverVersion = 0x0001; - CopyWideString(WaveInCaps->szPname, DeviceInfo.u.WaveInCaps.szPname); - - WaveInCaps->dwFormats = DeviceInfo.u.WaveInCaps.dwFormats; - WaveInCaps->wChannels = DeviceInfo.u.WaveInCaps.wChannels; - WaveInCaps->wReserved1 = 0; - break; - } - } - - return MMSYSERR_NOERROR; -} - - -MMRESULT -OpenWdmSoundDevice( - IN struct _SOUND_DEVICE* SoundDevice, /* NOT USED */ - OUT PVOID* Handle) -{ - /* Only open this if it's not already open */ - if ( KernelHandle == INVALID_HANDLE_VALUE ) - { - SND_TRACE(L"Opening wdmaud device\n"); - KernelHandle = CreateFileW(KERNEL_DEVICE_NAME, - GENERIC_READ | GENERIC_WRITE, - 0, - NULL, - OPEN_EXISTING, - FILE_FLAG_OVERLAPPED, - NULL); - } - - if ( KernelHandle == INVALID_HANDLE_VALUE ) - return MMSYSERR_ERROR; - - SND_ASSERT( Handle ); - - *Handle = KernelHandle; - ++ OpenCount; - - return MMSYSERR_NOERROR; -} - -MMRESULT -CloseWdmSoundDevice( - IN struct _SOUND_DEVICE_INSTANCE* SoundDeviceInstance, - IN PVOID Handle) -{ - WDMAUD_DEVICE_INFO DeviceInfo; - MMRESULT Result; - MMDEVICE_TYPE DeviceType; - PSOUND_DEVICE SoundDevice; - - Result = GetSoundDeviceFromInstance(SoundDeviceInstance, &SoundDevice); - - if ( ! MMSUCCESS(Result) ) - { - return TranslateInternalMmResult(Result); - } - - if ( OpenCount == 0 ) - { - return MMSYSERR_NOERROR; - } - - SND_ASSERT( KernelHandle != INVALID_HANDLE_VALUE ); - - Result = GetSoundDeviceType(SoundDevice, &DeviceType); - SND_ASSERT( Result == MMSYSERR_NOERROR ); - - if (SoundDeviceInstance->Handle != (PVOID)KernelHandle) - { - ZeroMemory(&DeviceInfo, sizeof(WDMAUD_DEVICE_INFO)); - - DeviceInfo.DeviceType = DeviceType; - DeviceInfo.hDevice = SoundDeviceInstance->Handle; - - /* First stop the stream */ - if (DeviceType != MIXER_DEVICE_TYPE) - { - DeviceInfo.u.State = KSSTATE_STOP; - SyncOverlappedDeviceIoControl(KernelHandle, - IOCTL_SETDEVICE_STATE, - (LPVOID) &DeviceInfo, - sizeof(WDMAUD_DEVICE_INFO), - (LPVOID) &DeviceInfo, - sizeof(WDMAUD_DEVICE_INFO), - NULL); - } -#ifdef USE_MMIXER_LIB - if (DeviceType == MIXER_DEVICE_TYPE) - { - return WdmAudCloseMixer(SoundDeviceInstance->Handle, SoundDeviceInstance->hNotifyEvent); - } -#endif - - SyncOverlappedDeviceIoControl(KernelHandle, - IOCTL_CLOSE_WDMAUD, - (LPVOID) &DeviceInfo, - sizeof(WDMAUD_DEVICE_INFO), - (LPVOID) &DeviceInfo, - sizeof(WDMAUD_DEVICE_INFO), - NULL); - } - - if (DeviceType == MIXER_DEVICE_TYPE) - { - SetEvent(SoundDeviceInstance->hStopEvent); - CloseHandle(SoundDeviceInstance->hStopEvent); - CloseHandle(SoundDeviceInstance->hNotifyEvent); - } - - --OpenCount; - - if ( OpenCount < 1 ) - { - CloseHandle(KernelHandle); - KernelHandle = INVALID_HANDLE_VALUE; - } - - return MMSYSERR_NOERROR; -} - MMRESULT QueryWdmWaveDeviceFormatSupport( @@ -326,484 +31,8 @@ return MMSYSERR_NOERROR; } - - - - -MMRESULT -SetWdmMixerDeviceFormat( - IN PSOUND_DEVICE_INSTANCE Instance, - IN DWORD DeviceId, - IN PWAVEFORMATEX WaveFormat, - IN DWORD WaveFormatSize) -{ - MMRESULT Result; - WDMAUD_DEVICE_INFO DeviceInfo; - HANDLE hThread; - - - Instance->hNotifyEvent = CreateEventW(NULL, FALSE, FALSE, NULL); - if ( ! Instance->hNotifyEvent ) - return MMSYSERR_NOMEM; - -#ifdef USE_MMIXER_LIB - return WdmAudOpenMixer(&Instance->Handle, DeviceId, Instance->hNotifyEvent); -#endif - - if (Instance->Handle != KernelHandle) - { - /* device is already open */ - return MMSYSERR_NOERROR; - } - - Instance->hStopEvent = CreateEventW(NULL, FALSE, FALSE, NULL); - if ( ! Instance->hStopEvent ) - return MMSYSERR_NOMEM; - - ZeroMemory(&DeviceInfo, sizeof(WDMAUD_DEVICE_INFO)); - DeviceInfo.DeviceType = MIXER_DEVICE_TYPE; - DeviceInfo.DeviceIndex = DeviceId; - DeviceInfo.u.hNotifyEvent = Instance->hNotifyEvent; - - Result = SyncOverlappedDeviceIoControl(KernelHandle, - IOCTL_OPEN_WDMAUD, - (LPVOID) &DeviceInfo, - sizeof(WDMAUD_DEVICE_INFO), - (LPVOID) &DeviceInfo, - sizeof(WDMAUD_DEVICE_INFO), - NULL); - - if ( ! MMSUCCESS(Result) ) - { - CloseHandle(Instance->hNotifyEvent); - CloseHandle(Instance->hStopEvent); - return TranslateInternalMmResult(Result); - } - - hThread = CreateThread(NULL, 0, MixerEventThreadRoutine, (LPVOID)Instance, 0, NULL); - if ( hThread ) - { - CloseHandle(hThread); - } - - /* Store sound device handle instance handle */ - Instance->Handle = (PVOID)DeviceInfo.hDevice; - - return MMSYSERR_NOERROR; -} - -MMRESULT -SetWdmWaveDeviceFormat( - IN PSOUND_DEVICE_INSTANCE Instance, - IN DWORD DeviceId, - IN PWAVEFORMATEX WaveFormat, - IN DWORD WaveFormatSize) -{ - MMRESULT Result; - PSOUND_DEVICE SoundDevice; - PVOID Identifier; - WDMAUD_DEVICE_INFO DeviceInfo; - MMDEVICE_TYPE DeviceType; - - Result = GetSoundDeviceFromInstance(Instance, &SoundDevice); - - if ( ! MMSUCCESS(Result) ) - { - return TranslateInternalMmResult(Result); - } - - Result = GetSoundDeviceIdentifier(SoundDevice, &Identifier); - - if ( ! MMSUCCESS(Result) ) - { - return TranslateInternalMmResult(Result); - } - - if (Instance->Handle != KernelHandle) - { - /* device is already open */ - return MMSYSERR_NOERROR; - } - - Result = GetSoundDeviceType(SoundDevice, &DeviceType); - -#ifdef USE_MMIXER_LIB - return WdmAudOpenWavePin(Instance, DeviceId, WaveFormat, DeviceType); -#endif - - - SND_ASSERT( Result == MMSYSERR_NOERROR ); - - ZeroMemory(&DeviceInfo, sizeof(WDMAUD_DEVICE_INFO)); - DeviceInfo.DeviceType = DeviceType; - DeviceInfo.DeviceIndex = DeviceId; - DeviceInfo.u.WaveFormatEx.cbSize = sizeof(WAVEFORMATEX); //WaveFormat->cbSize; - DeviceInfo.u.WaveFormatEx.wFormatTag = WaveFormat->wFormatTag; -#ifdef USERMODE_MIXER - DeviceInfo.u.WaveFormatEx.nChannels = 2; - DeviceInfo.u.WaveFormatEx.nSamplesPerSec = 44100; - DeviceInfo.u.WaveFormatEx.nBlockAlign = 4; - DeviceInfo.u.WaveFormatEx.nAvgBytesPerSec = 176400; - DeviceInfo.u.WaveFormatEx.wBitsPerSample = 16; -#else - DeviceInfo.u.WaveFormatEx.nChannels = WaveFormat->nChannels; - DeviceInfo.u.WaveFormatEx.nSamplesPerSec = WaveFormat->nSamplesPerSec; - DeviceInfo.u.WaveFormatEx.nBlockAlign = WaveFormat->nBlockAlign; - DeviceInfo.u.WaveFormatEx.nAvgBytesPerSec = WaveFormat->nAvgBytesPerSec; - DeviceInfo.u.WaveFormatEx.wBitsPerSample = WaveFormat->wBitsPerSample; -#endif - - Result = SyncOverlappedDeviceIoControl(KernelHandle, - IOCTL_OPEN_WDMAUD, - (LPVOID) &DeviceInfo, - sizeof(WDMAUD_DEVICE_INFO), - (LPVOID) &DeviceInfo, - sizeof(WDMAUD_DEVICE_INFO), - NULL); - - if ( ! MMSUCCESS(Result) ) - { - return TranslateInternalMmResult(Result); - } - - /* Store format */ - Instance->WaveFormatEx.cbSize = WaveFormat->cbSize; - Instance->WaveFormatEx.wFormatTag = WaveFormat->wFormatTag; - Instance->WaveFormatEx.nChannels = WaveFormat->nChannels; - Instance->WaveFormatEx.nSamplesPerSec = WaveFormat->nSamplesPerSec; - Instance->WaveFormatEx.nBlockAlign = WaveFormat->nBlockAlign; - Instance->WaveFormatEx.nAvgBytesPerSec = WaveFormat->nAvgBytesPerSec; - Instance->WaveFormatEx.wBitsPerSample = WaveFormat->wBitsPerSample; - - /* Store sound device handle instance handle */ - Instance->Handle = (PVOID)DeviceInfo.hDevice; - - /* Now determine framing requirements */ - Result = SyncOverlappedDeviceIoControl(KernelHandle, - IOCTL_GETFRAMESIZE, - (LPVOID) &DeviceInfo, - sizeof(WDMAUD_DEVICE_INFO), - (LPVOID) &DeviceInfo, - sizeof(WDMAUD_DEVICE_INFO), - NULL); - - if ( MMSUCCESS(Result) ) - { - if (DeviceInfo.u.FrameSize) - { - Instance->FrameSize = DeviceInfo.u.FrameSize * 2; - Instance->BufferCount = WaveFormat->nAvgBytesPerSec / Instance->FrameSize; - SND_TRACE(L"FrameSize %u BufferCount %u\n", Instance->FrameSize, Instance->BufferCount); - } - } - else - { - // use a default of 100 buffers - Instance->BufferCount = 100; - } - - if (DeviceType == WAVE_OUT_DEVICE_TYPE) - { - /* Now start the stream */ - DeviceInfo.u.State = KSSTATE_RUN; - SyncOverlappedDeviceIoControl(KernelHandle, - IOCTL_SETDEVICE_STATE, - (LPVOID) &DeviceInfo, - sizeof(WDMAUD_DEVICE_INFO), - (LPVOID) &DeviceInfo, - sizeof(WDMAUD_DEVICE_INFO), - NULL); - } - - return MMSYSERR_NOERROR; -} - - -MMRESULT -SetWdmWaveState( - IN struct _SOUND_DEVICE_INSTANCE* SoundDeviceInstance, - IN BOOL bStart) -{ - MMRESULT Result; - PSOUND_DEVICE SoundDevice; - WDMAUD_DEVICE_INFO DeviceInfo; - MMDEVICE_TYPE DeviceType; - HANDLE Handle; - - Result = GetSoundDeviceFromInstance(SoundDeviceInstance, &SoundDevice); - - if ( ! MMSUCCESS(Result) ) - { - return TranslateInternalMmResult(Result); - } - - Result = GetSoundDeviceType(SoundDevice, &DeviceType); - SND_ASSERT( Result == MMSYSERR_NOERROR ); - - Result = GetSoundDeviceInstanceHandle(SoundDeviceInstance, &Handle); - SND_ASSERT( Result == MMSYSERR_NOERROR ); - - ZeroMemory(&DeviceInfo, sizeof(WDMAUD_DEVICE_INFO)); - DeviceInfo.hDevice = Handle; - DeviceInfo.DeviceType = DeviceType; - - if (bStart) - DeviceInfo.u.State = KSSTATE_RUN; - else - DeviceInfo.u.State = KSSTATE_PAUSE; - Result = SyncOverlappedDeviceIoControl(KernelHandle, - IOCTL_SETDEVICE_STATE, - (LPVOID) &DeviceInfo, - sizeof(WDMAUD_DEVICE_INFO), - (LPVOID) &DeviceInfo, - sizeof(WDMAUD_DEVICE_INFO), - NULL); - - return Result; -} - -MMRESULT -GetDeviceInterfaceString( - IN MMDEVICE_TYPE DeviceType, - IN DWORD DeviceId, - IN LPWSTR Interface, - IN DWORD InterfaceLength, - OUT DWORD * InterfaceSize) -{ - WDMAUD_DEVICE_INFO DeviceInfo; - MMRESULT Result; - - ZeroMemory(&DeviceInfo, sizeof(WDMAUD_DEVICE_INFO)); - DeviceInfo.DeviceType = DeviceType; - DeviceInfo.DeviceIndex = DeviceId; - - - Result = SyncOverlappedDeviceIoControl(KernelHandle, - IOCTL_QUERYDEVICEINTERFACESTRING, - (LPVOID) &DeviceInfo, - sizeof(WDMAUD_DEVICE_INFO), - (LPVOID) &DeviceInfo, - sizeof(WDMAUD_DEVICE_INFO), - NULL); - - - if ( ! MMSUCCESS(Result) ) - { - return TranslateInternalMmResult(Result); - } - - - if (!Interface) - { - SND_ASSERT(InterfaceSize); - - *InterfaceSize = DeviceInfo.u.Interface.DeviceInterfaceStringSize; - return MMSYSERR_NOERROR; - } - - if (InterfaceLength < DeviceInfo.u.Interface.DeviceInterfaceStringSize) - { - /* buffer is too small */ - return MMSYSERR_MOREDATA; - } - - DeviceInfo.u.Interface.DeviceInterfaceStringSize = InterfaceLength; - DeviceInfo.u.Interface.DeviceInterfaceString = Interface; - - Result = SyncOverlappedDeviceIoControl(KernelHandle, - IOCTL_QUERYDEVICEINTERFACESTRING, - (LPVOID) &DeviceInfo, - sizeof(WDMAUD_DEVICE_INFO), - (LPVOID) &DeviceInfo, - sizeof(WDMAUD_DEVICE_INFO), - NULL); - - if ( MMSUCCESS(Result) && InterfaceLength > 2) - { - Interface[1] = L'\\'; - Interface[InterfaceLength-1] = L'\0'; - } - - return Result; -} - -MMRESULT -GetWdmPosition( - IN struct _SOUND_DEVICE_INSTANCE* SoundDeviceInstance, - IN MMTIME* Time) -{ - MMRESULT Result; - PSOUND_DEVICE SoundDevice; - WDMAUD_DEVICE_INFO DeviceInfo; - MMDEVICE_TYPE DeviceType; - HANDLE Handle; - - Result = GetSoundDeviceFromInstance(SoundDeviceInstance, &SoundDevice); - - if ( ! MMSUCCESS(Result) ) - { - return TranslateInternalMmResult(Result); - } - - Result = GetSoundDeviceType(SoundDevice, &DeviceType); - SND_ASSERT( Result == MMSYSERR_NOERROR ); - - Result = GetSoundDeviceInstanceHandle(SoundDeviceInstance, &Handle); - SND_ASSERT( Result == MMSYSERR_NOERROR ); - - ZeroMemory(&DeviceInfo, sizeof(WDMAUD_DEVICE_INFO)); - DeviceInfo.hDevice = Handle; - DeviceInfo.DeviceType = DeviceType; - - Result = SyncOverlappedDeviceIoControl(KernelHandle, - IOCTL_OPEN_WDMAUD, - (LPVOID) &DeviceInfo, - sizeof(WDMAUD_DEVICE_INFO), - (LPVOID) &DeviceInfo, - sizeof(WDMAUD_DEVICE_INFO), - NULL); - - if ( ! MMSUCCESS(Result) ) - { - return TranslateInternalMmResult(Result); - } - - Time->wType = TIME_BYTES; - Time->u.cb = (DWORD)DeviceInfo.u.Position; - - return MMSYSERR_NOERROR; -} - -MMRESULT -ResetStream( - IN struct _SOUND_DEVICE_INSTANCE* SoundDeviceInstance, - IN MMDEVICE_TYPE DeviceType, - IN BOOLEAN bStartReset) -{ - MMRESULT Result; - HANDLE Handle; - WDMAUD_DEVICE_INFO DeviceInfo; - - Result = GetSoundDeviceInstanceHandle(SoundDeviceInstance, &Handle); - SND_ASSERT( Result == MMSYSERR_NOERROR ); - - ZeroMemory(&DeviceInfo, sizeof(WDMAUD_DEVICE_INFO)); - DeviceInfo.hDevice = Handle; - DeviceInfo.DeviceType = DeviceType; - DeviceInfo.u.ResetStream = (bStartReset ? KSRESET_BEGIN : KSRESET_END); - - Result = SyncOverlappedDeviceIoControl(KernelHandle, - IOCTL_RESET_STREAM, - (LPVOID) &DeviceInfo, - sizeof(WDMAUD_DEVICE_INFO), - (LPVOID) &DeviceInfo, - sizeof(WDMAUD_DEVICE_INFO), - NULL); - return Result; -} - - -MMRESULT -QueryMixerInfo( - IN struct _SOUND_DEVICE_INSTANCE* SoundDeviceInstance, - IN UINT uMsg, - IN LPVOID Parameter, - IN DWORD Flags) -{ - MMRESULT Result; - WDMAUD_DEVICE_INFO DeviceInfo; - HANDLE Handle; - DWORD IoControlCode; - LPMIXERLINEW MixLine; - LPMIXERLINECONTROLSW MixControls; - LPMIXERCONTROLDETAILS MixDetails; - - SND_TRACE(L"uMsg %x Flags %x\n", uMsg, Flags); - - Result = GetSoundDeviceInstanceHandle(SoundDeviceInstance, &Handle); - SND_ASSERT( Result == MMSYSERR_NOERROR ); - - ZeroMemory(&DeviceInfo, sizeof(WDMAUD_DEVICE_INFO)); - DeviceInfo.hDevice = Handle; - DeviceInfo.DeviceType = MIXER_DEVICE_TYPE; - DeviceInfo.Flags = Flags; - - MixLine = (LPMIXERLINEW)Parameter; - MixControls = (LPMIXERLINECONTROLSW)Parameter; - MixDetails = (LPMIXERCONTROLDETAILS)Parameter; - -#ifdef USE_MMIXER_LIB - switch(uMsg) - { - case MXDM_GETLINEINFO: - return WdmAudGetLineInfo(SoundDeviceInstance->Handle, MixLine, Flags); - case MXDM_GETLINECONTROLS: - return WdmAudGetLineControls(SoundDeviceInstance->Handle, MixControls, Flags); - case MXDM_SETCONTROLDETAILS: - return WdmAudSetControlDetails(SoundDeviceInstance->Handle, MixDetails, Flags); - break; - case MXDM_GETCONTROLDETAILS: - return WdmAudGetControlDetails(SoundDeviceInstance->Handle, MixDetails, Flags); - break; - default: - SND_ASSERT(0); - return MMSYSERR_NOTSUPPORTED; - } -#endif - - - switch(uMsg) - { - case MXDM_GETLINEINFO: - RtlCopyMemory(&DeviceInfo.u.MixLine, MixLine, sizeof(MIXERLINEW)); - IoControlCode = IOCTL_GETLINEINFO; - break; - case MXDM_GETLINECONTROLS: - RtlCopyMemory(&DeviceInfo.u.MixControls, MixControls, sizeof(MIXERLINECONTROLSW)); - IoControlCode = IOCTL_GETLINECONTROLS; - break; - case MXDM_SETCONTROLDETAILS: - RtlCopyMemory(&DeviceInfo.u.MixDetails, MixDetails, sizeof(MIXERCONTROLDETAILS)); - IoControlCode = IOCTL_SETCONTROLDETAILS; - break; - case MXDM_GETCONTROLDETAILS: - RtlCopyMemory(&DeviceInfo.u.MixDetails, MixDetails, sizeof(MIXERCONTROLDETAILS)); - IoControlCode = IOCTL_GETCONTROLDETAILS; - break; - default: - SND_ASSERT(0); - return MMSYSERR_NOTSUPPORTED; - } - - Result = SyncOverlappedDeviceIoControl(KernelHandle, - IoControlCode, - (LPVOID) &DeviceInfo, - sizeof(WDMAUD_DEVICE_INFO), - (LPVOID) &DeviceInfo, - sizeof(WDMAUD_DEVICE_INFO), - NULL); - - if ( ! MMSUCCESS(Result) ) - { - return Result; - } - - switch(uMsg) - { - case MXDM_GETLINEINFO: - { - RtlCopyMemory(MixLine, &DeviceInfo.u.MixLine, sizeof(MIXERLINEW)); - break; - } - } - - return Result; -} - - MMRESULT PopulateWdmDeviceList( - HANDLE Handle, MMDEVICE_TYPE DeviceType) { MMRESULT Result; @@ -812,10 +41,9 @@ MMFUNCTION_TABLE FuncTable; DWORD i; - VALIDATE_MMSYS_PARAMETER( Handle != INVALID_HANDLE_VALUE ); VALIDATE_MMSYS_PARAMETER( IS_VALID_SOUND_DEVICE_TYPE(DeviceType) ); - Result = GetNumWdmDevs(Handle, DeviceType, &DeviceCount); + Result = FUNC_NAME(WdmAudGetNumWdmDevs)(DeviceType, &DeviceCount); if ( ! MMSUCCESS(Result) ) { @@ -838,33 +66,30 @@ /* Set up our function table */ ZeroMemory(&FuncTable, sizeof(MMFUNCTION_TABLE)); - FuncTable.GetCapabilities = GetWdmDeviceCapabilities; - FuncTable.QueryWaveFormatSupport = QueryWdmWaveDeviceFormatSupport; + FuncTable.GetCapabilities = FUNC_NAME(WdmAudGetCapabilities); + FuncTable.QueryWaveFormatSupport = QueryWdmWaveDeviceFormatSupport; //FIXME + FuncTable.Open = FUNC_NAME(WdmAudOpenSoundDevice); + FuncTable.Close = FUNC_NAME(WdmAudCloseSoundDevice); + FuncTable.GetDeviceInterfaceString = FUNC_NAME(WdmAudGetDeviceInterfaceString); + if (DeviceType == MIXER_DEVICE_TYPE) { - FuncTable.SetWaveFormat = SetWdmMixerDeviceFormat; - FuncTable.QueryMixerInfo = QueryMixerInfo; - } - else - { - FuncTable.SetWaveFormat = SetWdmWaveDeviceFormat; - } - - if (DeviceType == WAVE_IN_DEVICE_TYPE || DeviceType == WAVE_OUT_DEVICE_TYPE) - { - FuncTable.SetState = SetWdmWaveState; - FuncTable.ResetStream = ResetStream; - } - - FuncTable.Open = OpenWdmSoundDevice; - FuncTable.Close = CloseWdmSoundDevice; - FuncTable.GetDeviceInterfaceString = GetDeviceInterfaceString; + FuncTable.SetWaveFormat = FUNC_NAME(WdmAudSetMixerDeviceFormat); + FuncTable.QueryMixerInfo = FUNC_NAME(WdmAudQueryMixerInfo); + } + else if (DeviceType == WAVE_IN_DEVICE_TYPE || DeviceType == WAVE_OUT_DEVICE_TYPE) + { + FuncTable.SetWaveFormat = FUNC_NAME(WdmAudSetWaveDeviceFormat); + FuncTable.SetState = FUNC_NAME(WdmAudSetWaveState); + FuncTable.ResetStream = FUNC_NAME(WdmAudResetStream); + FuncTable.GetPos = FUNC_NAME(WdmAudGetWavePosition); + #ifndef USERMODE_MIXER - FuncTable.CommitWaveBuffer = WriteFileEx_Committer2; + FuncTable.CommitWaveBuffer = FUNC_NAME(WdmAudCommitWaveBuffer); #else - FuncTable.CommitWaveBuffer = WriteFileEx_Remixer; + FuncTable.CommitWaveBuffer = WriteFileEx_Remixer; #endif - FuncTable.GetPos = GetWdmPosition; + } SetSoundDeviceFunctionTable(SoundDevice, &FuncTable); } @@ -883,13 +108,12 @@ LONG Parameter1, LONG Parameter2) { - MMRESULT Result; - switch ( Message ) { case DRV_LOAD : { HANDLE Handle; + MMRESULT Result; SND_TRACE(L"DRV_LOAD\n"); Result = InitEntrypointMutexes(); @@ -897,13 +121,11 @@ if ( ! MMSUCCESS(Result) ) return 0L; - OpenWdmSoundDevice(NULL, &Handle); - - if ( Handle == INVALID_HANDLE_VALUE ) + Result = FUNC_NAME(WdmAudOpenSoundDevice)(NULL, &Handle); + + if ( Result != MMSYSERR_NOERROR ) { SND_ERR(L"Failed to open \\\\.\\wdmaud\n"); - CleanupEntrypointMutexes(); - //UnlistAllSoundDevices(); return 0L; @@ -911,12 +133,12 @@ /* Populate the device lists */ SND_TRACE(L"Populating device lists\n"); - PopulateWdmDeviceList(KernelHandle, WAVE_OUT_DEVICE_TYPE); - PopulateWdmDeviceList(KernelHandle, WAVE_IN_DEVICE_TYPE); - PopulateWdmDeviceList(KernelHandle, MIDI_OUT_DEVICE_TYPE); - PopulateWdmDeviceList(KernelHandle, MIDI_IN_DEVICE_TYPE); - PopulateWdmDeviceList(KernelHandle, AUX_DEVICE_TYPE); - PopulateWdmDeviceList(KernelHandle, MIXER_DEVICE_TYPE); + PopulateWdmDeviceList(WAVE_OUT_DEVICE_TYPE); + PopulateWdmDeviceList(WAVE_IN_DEVICE_TYPE); + PopulateWdmDeviceList(MIDI_OUT_DEVICE_TYPE); + PopulateWdmDeviceList(MIDI_IN_DEVICE_TYPE); + PopulateWdmDeviceList(AUX_DEVICE_TYPE); + PopulateWdmDeviceList(MIXER_DEVICE_TYPE); SND_TRACE(L"Initialisation complete\n"); @@ -927,11 +149,7 @@ { SND_TRACE(L"DRV_FREE\n"); - if ( KernelHandle != INVALID_HANDLE_VALUE ) - { - CloseHandle(KernelHandle); - KernelHandle = INVALID_HANDLE_VALUE; - } + FUNC_NAME(WdmAudCleanup)(); /* TODO: Clean up the path names! */ UnlistAllSoundDevices(); @@ -985,9 +203,6 @@ switch ( fdwReason ) { case DLL_PROCESS_ATTACH : -#ifdef USE_MMIXER_LIB - WdmAudInitUserModeMixer(); -#endif SND_TRACE(L"WDMAUD.DRV - Process attached\n"); break; case DLL_PROCESS_DETACH : Modified: trunk/reactos/dll/win32/wdmaud.drv/wdmaud.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/wdmaud.drv/wdmau…
============================================================================== --- trunk/reactos/dll/win32/wdmaud.drv/wdmaud.h [iso-8859-1] (original) +++ trunk/reactos/dll/win32/wdmaud.drv/wdmaud.h [iso-8859-1] Wed Feb 3 13:48:27 2010 @@ -27,9 +27,20 @@ WdmAudGetMixerCount(); MMRESULT +WdmAudOpenSoundDeviceByLegacy(); + +MMRESULT WdmAudGetNumDevsByMMixer( IN MMDEVICE_TYPE DeviceType, OUT DWORD* DeviceCount); + +MMRESULT +WdmAudCommitWaveBufferByLegacy( + IN PSOUND_DEVICE_INSTANCE SoundDeviceInstance, + IN PVOID OffsetPtr, + IN DWORD Length, + IN PSOUND_OVERLAPPED Overlap, + IN LPOVERLAPPED_COMPLETION_ROUTINE CompletionRoutine); MMRESULT WriteFileEx_Remixer( @@ -133,13 +144,13 @@ IN PSOUND_OVERLAPPED Overlap, IN LPOVERLAPPED_COMPLETION_ROUTINE CompletionRoutine); -VOID -WdmAudCleanupMMixer(); +MMRESULT +WdmAudCleanupByMMixer(); /* legacy.c */ -VOID -WdmAudCleanupLegacy(); +MMRESULT +WdmAudCleanupByLegacy(); MMRESULT WdmAudGetCapabilitiesByLegacy(
14 years, 10 months
1
0
0
0
[gedmurphy] 45389: Fix typo in vcproj generator code
by gedmurphy@svn.reactos.org
Author: gedmurphy Date: Wed Feb 3 12:36:49 2010 New Revision: 45389 URL:
http://svn.reactos.org/svn/reactos?rev=45389&view=rev
Log: Fix typo in vcproj generator code Modified: trunk/reactos/tools/rbuild/backend/msvc/msvc.cpp Modified: trunk/reactos/tools/rbuild/backend/msvc/msvc.cpp URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rbuild/backend/msvc/…
============================================================================== --- trunk/reactos/tools/rbuild/backend/msvc/msvc.cpp [iso-8859-1] (original) +++ trunk/reactos/tools/rbuild/backend/msvc/msvc.cpp [iso-8859-1] Wed Feb 3 12:36:49 2010 @@ -140,13 +140,13 @@ if (configuration.VSProjectVersion == "10.00") { - string vcproj_file = VcprojFileName(module); - projMaker = new VCXProjMaker( configuration, m_configurations, vcproj_file ); + string vcxproj_file = VcxprojFileName(module); + projMaker = new VCXProjMaker( configuration, m_configurations, vcxproj_file ); } else { - string vcxproj_file = VcxprojFileName(module); - projMaker = new VCProjMaker( configuration, m_configurations, vcxproj_file ); + string vcproj_file = VcprojFileName(module); + projMaker = new VCProjMaker( configuration, m_configurations, vcproj_file ); } projMaker->_generate_proj_file ( module );
14 years, 10 months
1
0
0
0
[jcatena] 45388: [NTOS] msvc project updates
by jcatena@svn.reactos.org
Author: jcatena Date: Wed Feb 3 10:56:15 2010 New Revision: 45388 URL:
http://svn.reactos.org/svn/reactos?rev=45388&view=rev
Log: [NTOS] msvc project updates Added: branches/jcatena-branch/drivers/base/kddll/kdcom.def (with props) branches/jcatena-branch/include/reactos/msc/intrin2.h (with props) branches/jcatena-branch/include/reactos/platf2.h (with props) branches/jcatena-branch/lib/cpu/i386/cpu-i386.vcproj - copied, changed from r45369, branches/jcatena-branch/lib/cpu/i386/cpu.vcproj branches/jcatena-branch/lib/cpu/i386/cpu-i386_bld.h - copied, changed from r45369, branches/jcatena-branch/lib/cpu/i386/cpu_bld.h branches/jcatena-branch/lib/rtl/i386/thread_a.c - copied unchanged from r45368, branches/jcatena-branch/lib/rtl/i386/thread.c branches/jcatena-branch/ntoskrnl/include/internal/dbgp.h (with props) branches/jcatena-branch/ntoskrnl/noimpl.c (with props) branches/jcatena-branch/ntoskrnl/ntoskrnl.def (with props) branches/jcatena-branch/ntoskrnl/trap/ (with props) branches/jcatena-branch/ntoskrnl/trap/i386/ (with props) branches/jcatena-branch/ntoskrnl/trap/i386/TrapStub.h (with props) branches/jcatena-branch/ntoskrnl/trap/i386/trap_asm.h (with props) branches/jcatena-branch/ntoskrnl/trap/trap.c (with props) branches/jcatena-branch/ntoskrnl/trap/trap.h (with props) branches/jcatena-branch/ntoskrnl/trap/trap.vcproj (with props) Removed: branches/jcatena-branch/lib/cpu/i386/cpu.vcproj branches/jcatena-branch/lib/cpu/i386/cpu_bld.h branches/jcatena-branch/lib/rtl/i386/thread.c Modified: branches/jcatena-branch/drivers/base/kddll/kdcom_bld.h branches/jcatena-branch/include/ddk/ntdef.h branches/jcatena-branch/include/ddk/ntifs.h branches/jcatena-branch/include/ddk/wdm.h branches/jcatena-branch/include/ddk/winddk.h branches/jcatena-branch/include/ndk/i386/ketypes.h branches/jcatena-branch/include/reactos/debug.h branches/jcatena-branch/include/reactos/i386/cpu.h branches/jcatena-branch/include/reactos/i386/reactos_cfg.h branches/jcatena-branch/include/reactos/msc/i386/cpu_c.h branches/jcatena-branch/include/reactos/msc/i386/platf.h branches/jcatena-branch/lib/cmlib/cmlib.h branches/jcatena-branch/lib/cpu/i386/RegSave.c branches/jcatena-branch/lib/drivers/csq/csq.vcproj branches/jcatena-branch/lib/rtl/actctx.c branches/jcatena-branch/lib/rtl/rtl_bld.h branches/jcatena-branch/lib/rtl/rtlp.h branches/jcatena-branch/lib/sdk/crt2/crtnt.vcproj branches/jcatena-branch/lib/sdk/crt2/crtnt_bld.h branches/jcatena-branch/lib/sdk/crt2/excpt/i32/seh.s branches/jcatena-branch/ntoskrnl/dbgp/DbgDumpCpu.c branches/jcatena-branch/ntoskrnl/dbgp/dbgp.vcproj branches/jcatena-branch/ntoskrnl/ex/ex.vcproj branches/jcatena-branch/ntoskrnl/include/internal/i386/intrin_i.h branches/jcatena-branch/ntoskrnl/include/internal/i386/ke.h branches/jcatena-branch/ntoskrnl/include/internal/kd64.h branches/jcatena-branch/ntoskrnl/include/internal/ke.h branches/jcatena-branch/ntoskrnl/include/ntoskrnl_bld.h branches/jcatena-branch/ntoskrnl/io/iomgr/io.vcproj branches/jcatena-branch/ntoskrnl/kd64/kd.vcproj branches/jcatena-branch/ntoskrnl/ke/i386/irqobj.c branches/jcatena-branch/ntoskrnl/ke/i386/kiinit.c branches/jcatena-branch/ntoskrnl/ke/i386/traphdlr.c branches/jcatena-branch/ntoskrnl/ke/ke.vcproj branches/jcatena-branch/ntoskrnl/mm/ARM3/arm/init.c branches/jcatena-branch/ntoskrnl/mm/ARM3/arm3.vcproj branches/jcatena-branch/ntoskrnl/mm/ARM3/contmem.c branches/jcatena-branch/ntoskrnl/mm/ARM3/drvmgmt.c branches/jcatena-branch/ntoskrnl/mm/ARM3/dynamic.c branches/jcatena-branch/ntoskrnl/mm/ARM3/expool.c branches/jcatena-branch/ntoskrnl/mm/ARM3/hypermap.c branches/jcatena-branch/ntoskrnl/mm/ARM3/i386/init.c branches/jcatena-branch/ntoskrnl/mm/ARM3/iosup.c branches/jcatena-branch/ntoskrnl/mm/ARM3/mdlsup.c branches/jcatena-branch/ntoskrnl/mm/ARM3/mmsup.c branches/jcatena-branch/ntoskrnl/mm/ARM3/ncache.c branches/jcatena-branch/ntoskrnl/mm/ARM3/pagfault.c branches/jcatena-branch/ntoskrnl/mm/ARM3/pool.c branches/jcatena-branch/ntoskrnl/mm/ARM3/procsup.c branches/jcatena-branch/ntoskrnl/mm/ARM3/syspte.c branches/jcatena-branch/ntoskrnl/mm/ARM3/virtual.c branches/jcatena-branch/ntoskrnl/ntoskrnl.sln branches/jcatena-branch/ntoskrnl/ntoskrnl.vcproj branches/jcatena-branch/ntoskrnl/ntoskrnl.vsprops branches/jcatena-branch/ntoskrnl/rtl/libsupp.c branches/jcatena-branch/ntoskrnl/rtl/rt.vcproj branches/jcatena-branch/root.vsprops [This mail would be too long, it was shortened to contain the URLs only.] Added: branches/jcatena-branch/drivers/base/kddll/kdcom.def URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/drivers/base/kdd…
Modified: branches/jcatena-branch/drivers/base/kddll/kdcom_bld.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/drivers/base/kdd…
Modified: branches/jcatena-branch/include/ddk/ntdef.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/include/ddk/ntde…
Modified: branches/jcatena-branch/include/ddk/ntifs.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/include/ddk/ntif…
Modified: branches/jcatena-branch/include/ddk/wdm.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/include/ddk/wdm.…
Modified: branches/jcatena-branch/include/ddk/winddk.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/include/ddk/wind…
Modified: branches/jcatena-branch/include/ndk/i386/ketypes.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/include/ndk/i386…
Modified: branches/jcatena-branch/include/reactos/debug.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/include/reactos/…
Modified: branches/jcatena-branch/include/reactos/i386/cpu.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/include/reactos/…
Modified: branches/jcatena-branch/include/reactos/i386/reactos_cfg.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/include/reactos/…
Modified: branches/jcatena-branch/include/reactos/msc/i386/cpu_c.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/include/reactos/…
Modified: branches/jcatena-branch/include/reactos/msc/i386/platf.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/include/reactos/…
Added: branches/jcatena-branch/include/reactos/msc/intrin2.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/include/reactos/…
Added: branches/jcatena-branch/include/reactos/platf2.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/include/reactos/…
Modified: branches/jcatena-branch/lib/cmlib/cmlib.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/lib/cmlib/cmlib.…
Modified: branches/jcatena-branch/lib/cpu/i386/RegSave.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/lib/cpu/i386/Reg…
Copied: branches/jcatena-branch/lib/cpu/i386/cpu-i386.vcproj (from r45369, branches/jcatena-branch/lib/cpu/i386/cpu.vcproj) URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/lib/cpu/i386/cpu…
Copied: branches/jcatena-branch/lib/cpu/i386/cpu-i386_bld.h (from r45369, branches/jcatena-branch/lib/cpu/i386/cpu_bld.h) URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/lib/cpu/i386/cpu…
Removed: branches/jcatena-branch/lib/cpu/i386/cpu.vcproj URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/lib/cpu/i386/cpu…
Removed: branches/jcatena-branch/lib/cpu/i386/cpu_bld.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/lib/cpu/i386/cpu…
Modified: branches/jcatena-branch/lib/drivers/csq/csq.vcproj URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/lib/drivers/csq/…
Modified: branches/jcatena-branch/lib/rtl/actctx.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/lib/rtl/actctx.c…
Removed: branches/jcatena-branch/lib/rtl/i386/thread.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/lib/rtl/i386/thr…
Modified: branches/jcatena-branch/lib/rtl/rtl_bld.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/lib/rtl/rtl_bld.…
Modified: branches/jcatena-branch/lib/rtl/rtlp.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/lib/rtl/rtlp.h?r…
Modified: branches/jcatena-branch/lib/sdk/crt2/crtnt.vcproj URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/lib/sdk/crt2/crt…
Modified: branches/jcatena-branch/lib/sdk/crt2/crtnt_bld.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/lib/sdk/crt2/crt…
Modified: branches/jcatena-branch/lib/sdk/crt2/excpt/i32/seh.s URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/lib/sdk/crt2/exc…
Modified: branches/jcatena-branch/ntoskrnl/dbgp/DbgDumpCpu.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/dbgp/Db…
Modified: branches/jcatena-branch/ntoskrnl/dbgp/dbgp.vcproj URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/dbgp/db…
Modified: branches/jcatena-branch/ntoskrnl/ex/ex.vcproj URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/ex/ex.v…
Added: branches/jcatena-branch/ntoskrnl/include/internal/dbgp.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/include…
Modified: branches/jcatena-branch/ntoskrnl/include/internal/i386/intrin_i.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/include…
Modified: branches/jcatena-branch/ntoskrnl/include/internal/i386/ke.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/include…
Modified: branches/jcatena-branch/ntoskrnl/include/internal/kd64.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/include…
Modified: branches/jcatena-branch/ntoskrnl/include/internal/ke.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/include…
Modified: branches/jcatena-branch/ntoskrnl/include/ntoskrnl_bld.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/include…
Modified: branches/jcatena-branch/ntoskrnl/io/iomgr/io.vcproj URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/io/iomg…
Modified: branches/jcatena-branch/ntoskrnl/kd64/kd.vcproj URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/kd64/kd…
Modified: branches/jcatena-branch/ntoskrnl/ke/i386/irqobj.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/ke/i386…
Modified: branches/jcatena-branch/ntoskrnl/ke/i386/kiinit.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/ke/i386…
Modified: branches/jcatena-branch/ntoskrnl/ke/i386/traphdlr.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/ke/i386…
Modified: branches/jcatena-branch/ntoskrnl/ke/ke.vcproj URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/ke/ke.v…
Modified: branches/jcatena-branch/ntoskrnl/mm/ARM3/arm/init.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/mm/ARM3…
Modified: branches/jcatena-branch/ntoskrnl/mm/ARM3/arm3.vcproj URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/mm/ARM3…
Modified: branches/jcatena-branch/ntoskrnl/mm/ARM3/contmem.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/mm/ARM3…
Modified: branches/jcatena-branch/ntoskrnl/mm/ARM3/drvmgmt.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/mm/ARM3…
Modified: branches/jcatena-branch/ntoskrnl/mm/ARM3/dynamic.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/mm/ARM3…
Modified: branches/jcatena-branch/ntoskrnl/mm/ARM3/expool.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/mm/ARM3…
Modified: branches/jcatena-branch/ntoskrnl/mm/ARM3/hypermap.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/mm/ARM3…
Modified: branches/jcatena-branch/ntoskrnl/mm/ARM3/i386/init.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/mm/ARM3…
Modified: branches/jcatena-branch/ntoskrnl/mm/ARM3/iosup.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/mm/ARM3…
Modified: branches/jcatena-branch/ntoskrnl/mm/ARM3/mdlsup.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/mm/ARM3…
Modified: branches/jcatena-branch/ntoskrnl/mm/ARM3/mmsup.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/mm/ARM3…
Modified: branches/jcatena-branch/ntoskrnl/mm/ARM3/ncache.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/mm/ARM3…
Modified: branches/jcatena-branch/ntoskrnl/mm/ARM3/pagfault.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/mm/ARM3…
Modified: branches/jcatena-branch/ntoskrnl/mm/ARM3/pool.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/mm/ARM3…
Modified: branches/jcatena-branch/ntoskrnl/mm/ARM3/procsup.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/mm/ARM3…
Modified: branches/jcatena-branch/ntoskrnl/mm/ARM3/syspte.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/mm/ARM3…
Modified: branches/jcatena-branch/ntoskrnl/mm/ARM3/virtual.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/mm/ARM3…
Added: branches/jcatena-branch/ntoskrnl/noimpl.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/noimpl.…
Added: branches/jcatena-branch/ntoskrnl/ntoskrnl.def URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/ntoskrn…
Modified: branches/jcatena-branch/ntoskrnl/ntoskrnl.sln URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/ntoskrn…
Modified: branches/jcatena-branch/ntoskrnl/ntoskrnl.vcproj URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/ntoskrn…
Modified: branches/jcatena-branch/ntoskrnl/ntoskrnl.vsprops URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/ntoskrn…
Modified: branches/jcatena-branch/ntoskrnl/rtl/libsupp.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/rtl/lib…
Modified: branches/jcatena-branch/ntoskrnl/rtl/rt.vcproj URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/rtl/rt.…
Added: branches/jcatena-branch/ntoskrnl/trap/i386/TrapStub.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/trap/i3…
Added: branches/jcatena-branch/ntoskrnl/trap/i386/trap_asm.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/trap/i3…
Added: branches/jcatena-branch/ntoskrnl/trap/trap.c URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/trap/tr…
Added: branches/jcatena-branch/ntoskrnl/trap/trap.h URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/trap/tr…
Added: branches/jcatena-branch/ntoskrnl/trap/trap.vcproj URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/ntoskrnl/trap/tr…
Modified: branches/jcatena-branch/root.vsprops URL:
http://svn.reactos.org/svn/reactos/branches/jcatena-branch/root.vsprops?rev…
14 years, 10 months
1
0
0
0
[dreimer] 45387: Bug 4342: Update log2lines to Version 1.12b. (Jan Roeloffzen)
by dreimer@svn.reactos.org
Author: dreimer Date: Wed Feb 3 08:34:59 2010 New Revision: 45387 URL:
http://svn.reactos.org/svn/reactos?rev=45387&view=rev
Log: Bug 4342: Update log2lines to Version 1.12b. (Jan Roeloffzen) Added: trunk/reactos/tools/log2lines/ trunk/reactos/tools/log2lines/cache.c (with props) trunk/reactos/tools/log2lines/cache.h (with props) trunk/reactos/tools/log2lines/compat.h (with props) trunk/reactos/tools/log2lines/config.h (with props) trunk/reactos/tools/log2lines/help.c (with props) trunk/reactos/tools/log2lines/help.h (with props) trunk/reactos/tools/log2lines/image.c (with props) trunk/reactos/tools/log2lines/image.h (with props) trunk/reactos/tools/log2lines/list.c (with props) trunk/reactos/tools/log2lines/list.h (with props) trunk/reactos/tools/log2lines/log2lines.c (with props) trunk/reactos/tools/log2lines/log2lines.h (with props) trunk/reactos/tools/log2lines/log2lines.mak (with props) trunk/reactos/tools/log2lines/options.c (with props) trunk/reactos/tools/log2lines/options.h (with props) trunk/reactos/tools/log2lines/revision.c (with props) trunk/reactos/tools/log2lines/revision.h (with props) trunk/reactos/tools/log2lines/stat.c (with props) trunk/reactos/tools/log2lines/stat.h (with props) trunk/reactos/tools/log2lines/util.c (with props) trunk/reactos/tools/log2lines/util.h (with props) trunk/reactos/tools/log2lines/version.h (with props) Removed: trunk/reactos/tools/rsym/log2lines.c trunk/reactos/tools/rsym/log2lines.mak Modified: trunk/reactos/tools/tools.mak [This mail would be too long, it was shortened to contain the URLs only.] Added: trunk/reactos/tools/log2lines/cache.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/cache.c?re…
Added: trunk/reactos/tools/log2lines/cache.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/cache.h?re…
Added: trunk/reactos/tools/log2lines/compat.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/compat.h?r…
Added: trunk/reactos/tools/log2lines/config.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/config.h?r…
Added: trunk/reactos/tools/log2lines/help.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/help.c?rev…
Added: trunk/reactos/tools/log2lines/help.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/help.h?rev…
Added: trunk/reactos/tools/log2lines/image.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/image.c?re…
Added: trunk/reactos/tools/log2lines/image.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/image.h?re…
Added: trunk/reactos/tools/log2lines/list.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/list.c?rev…
Added: trunk/reactos/tools/log2lines/list.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/list.h?rev…
Added: trunk/reactos/tools/log2lines/log2lines.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/log2lines.…
Added: trunk/reactos/tools/log2lines/log2lines.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/log2lines.…
Added: trunk/reactos/tools/log2lines/log2lines.mak URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/log2lines.…
Added: trunk/reactos/tools/log2lines/options.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/options.c?…
Added: trunk/reactos/tools/log2lines/options.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/options.h?…
Added: trunk/reactos/tools/log2lines/revision.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/revision.c…
Added: trunk/reactos/tools/log2lines/revision.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/revision.h…
Added: trunk/reactos/tools/log2lines/stat.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/stat.c?rev…
Added: trunk/reactos/tools/log2lines/stat.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/stat.h?rev…
Added: trunk/reactos/tools/log2lines/util.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/util.c?rev…
Added: trunk/reactos/tools/log2lines/util.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/util.h?rev…
Added: trunk/reactos/tools/log2lines/version.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/version.h?…
Removed: trunk/reactos/tools/rsym/log2lines.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rsym/log2lines.c?rev…
Removed: trunk/reactos/tools/rsym/log2lines.mak URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rsym/log2lines.mak?r…
Modified: trunk/reactos/tools/tools.mak URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/tools.mak?rev=45387&…
14 years, 10 months
1
0
0
0
[evb] 45386: - Flesh out more code. - Support ATAG Linux/ARMBoot architecture defined-structures. These are used by all ARMBoot-compatible loaders (QEmu, U-boot, etc). - Read RAMDisk, RAM, Command Line from ATAGs (use -append boot-device=RAMDISK). - Make environment-get function read command-line. - Allocate RAM memory structure portably. - Validate board info on boot.
by evb@svn.reactos.org
Author: evb Date: Wed Feb 3 04:14:59 2010 New Revision: 45386 URL:
http://svn.reactos.org/svn/reactos?rev=45386&view=rev
Log: - Flesh out more code. - Support ATAG Linux/ARMBoot architecture defined-structures. These are used by all ARMBoot-compatible loaders (QEmu, U-boot, etc). - Read RAMDisk, RAM, Command Line from ATAGs (use -append boot-device=RAMDISK). - Make environment-get function read command-line. - Allocate RAM memory structure portably. - Validate board info on boot. Added: trunk/reactos/boot/armllb/inc/envir.h (with props) Modified: trunk/reactos/boot/armllb/envir.c trunk/reactos/boot/armllb/hw/versatile/hwinfo.c trunk/reactos/boot/armllb/hw/versatile/hwinit.c trunk/reactos/boot/armllb/inc/osloader.h trunk/reactos/boot/armllb/inc/precomp.h trunk/reactos/boot/armllb/main.c trunk/reactos/boot/armllb/os/loader.c Modified: trunk/reactos/boot/armllb/envir.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/envir.c?rev=45…
============================================================================== --- trunk/reactos/boot/armllb/envir.c [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/envir.c [iso-8859-1] Wed Feb 3 04:14:59 2010 @@ -8,12 +8,111 @@ #include "precomp.h" +ULONG LlbEnvHwPageSize; +ULONG LlbEnvHwMemStart; +ULONG LlbEnvHwMemSize; +ULONG LlbEnvRamDiskStart; +ULONG LlbEnvRamDiskSize; +CHAR LlbEnvCmdLine[256]; + +VOID +NTAPI +LlbEnvParseArguments(IN PATAG Arguments) +{ + PATAG Atag; + + /* Parse the ATAGs */ + Atag = Arguments; + while (Atag->Hdr.Size) + { + /* Check tag type */ + switch (Atag->Hdr.Tag) + { + case ATAG_CORE: + + /* Save page size */ + LlbEnvHwPageSize = Atag->u.Core.PageSize; + break; + + case ATAG_MEM: + + /* Save RAM start and size */ + LlbEnvHwMemStart = Atag->u.Mem.Start; + LlbEnvHwMemSize = Atag->u.Mem.Size; + break; + + case ATAG_INITRD2: + + /* Save RAMDISK start and size */ + LlbEnvRamDiskStart = Atag->u.InitRd2.Start; + LlbEnvRamDiskSize = Atag->u.InitRd2.Size; + break; + + case ATAG_CMDLINE: + + /* Save command line */ + strncpy(LlbEnvCmdLine, + Atag->u.CmdLine.CmdLine, + Atag->Hdr.Size * sizeof(ULONG)); + break; + + /* Nothing left to handle */ + case ATAG_NONE: + default: + return; + } + + /* Next tag */ + Atag = (PATAG)((PULONG)Atag + Atag->Hdr.Size); + } + + /* For debugging */ + DbgPrint("[BOOTROM] PageSize: %dKB RAM: %dMB CMDLINE: %s\n", + LlbEnvHwPageSize / 1024, LlbEnvHwMemSize / 1024 / 1024, LlbEnvCmdLine); +} + +VOID +NTAPI +LlbEnvGetMemoryInformation(IN PULONG Base, + IN PULONG Size) +{ + /* Return RAM information */ + *Base = LlbEnvHwMemStart; + *Size = LlbEnvHwMemSize; +} + +BOOLEAN +NTAPI +LlbEnvGetRamDiskInformation(IN PULONG Base, + IN PULONG Size) +{ + /* Do we have a ramdisk? */ + if (LlbEnvRamDiskSize == 0) + { + /* No */ + *Base = 0; + *Size = 0; + return FALSE; + } + + /* Return ramdisk information */ + *Base = LlbEnvRamDiskStart; + *Size = LlbEnvRamDiskSize; + return TRUE; +} + PCHAR NTAPI LlbEnvRead(IN PCHAR ValueName) { - /* FIXME: HACK */ - return "RAMDISK"; + PCHAR ValueData; + + /* Search for the value name */ + ValueData = strstr(LlbEnvCmdLine, ValueName); + if (ValueData) ValueData += strlen(ValueName) + 1; + + /* Return the data */ + return ValueData; } /* EOF */ Modified: trunk/reactos/boot/armllb/hw/versatile/hwinfo.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/hw/versatile/h…
============================================================================== --- trunk/reactos/boot/armllb/hw/versatile/hwinfo.c [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/hw/versatile/hwinfo.c [iso-8859-1] Wed Feb 3 04:14:59 2010 @@ -40,9 +40,6 @@ NTAPI LlbHwBuildMemoryMap(IN PBIOS_MEMORY_MAP MemoryMap) { - /* For now, hard-code 128MB of RAM starting at 0x00000000 */ - LlbAllocateMemoryEntry(BiosMemoryUsable, 0x00000000, 128 * 1024 * 1024); - /* Mark MMIO space as reserved */ LlbAllocateMemoryEntry(BiosMemoryReserved, 0x10000000, 128 * 1024 * 1024); } Modified: trunk/reactos/boot/armllb/hw/versatile/hwinit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/hw/versatile/h…
============================================================================== --- trunk/reactos/boot/armllb/hw/versatile/hwinit.c [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/hw/versatile/hwinit.c [iso-8859-1] Wed Feb 3 04:14:59 2010 @@ -29,8 +29,11 @@ NTAPI LlbHwLoadOsLoaderFromRam(VOID) { - /* The OS Loader should have already been loaded by QEMU at the right place */ - return (POSLOADER_INIT)0x800000; + ULONG Base, Dummy; + + /* On versatile, the loader is loaded with the RAMDISK. Just get the address */ + LlbEnvGetRamDiskInformation(&Base, &Dummy); + return (POSLOADER_INIT)Base; } Added: trunk/reactos/boot/armllb/inc/envir.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/inc/envir.h?re…
============================================================================== --- trunk/reactos/boot/armllb/inc/envir.h (added) +++ trunk/reactos/boot/armllb/inc/envir.h [iso-8859-1] Wed Feb 3 04:14:59 2010 @@ -1,0 +1,88 @@ +/* + * PROJECT: ReactOS Boot Loader + * LICENSE: BSD - See COPYING.ARM in the top level directory + * FILE: boot/armllb/inc/envir.h + * PURPOSE: LLB Environment Functions + * PROGRAMMERS: ReactOS Portable Systems Group + */ + +typedef struct _ATAG_HEADER +{ + ULONG Size; + ULONG Tag; +} ATAG_HEADER, *PATAG_HEADER; + +typedef struct _ATAG_CORE +{ + ULONG Flags; + ULONG PageSize; + ULONG RootDev; +} ATAG_CORE, *PATAG_CORE; + +typedef struct _ATAG_MEM +{ + ULONG Size; + ULONG Start; +} ATAG_MEM, *PATAG_MEM; + +typedef struct _ATAG_INITRD2 +{ + ULONG Start; + ULONG Size; +} ATAG_INITRD2, *PATAG_INITRD2; + +typedef struct _ATAG_CMDLINE +{ + CHAR CmdLine[ANYSIZE_ARRAY]; +} ATAG_CMDLINE, *PATAG_CMDLINE; + +typedef struct _ATAG +{ + ATAG_HEADER Hdr; + union + { + ATAG_CORE Core; + ATAG_MEM Mem; + ATAG_INITRD2 InitRd2; + ATAG_CMDLINE CmdLine; + } u; +} ATAG, *PATAG; + +#define ATAG_NONE 0x00000000 +#define ATAG_CORE 0x54410001 +#define ATAG_MEM 0x54410002 +#define ATAG_VIDEOTEXT 0x54410003 +#define ATAG_RAMDISK 0x54410004 +#define ATAG_INITRD2 0x54420005 +#define ATAG_SERIAL 0x54410006 +#define ATAG_REVISION 0x54410007 +#define ATAG_VIDEOLFB 0x54410008 +#define ATAG_CMDLINE 0x54410009 + +PCHAR +NTAPI +LlbEnvRead( + IN PCHAR Option +); + +BOOLEAN +NTAPI +LlbEnvGetRamDiskInformation( + IN PULONG Base, + IN PULONG Size +); + +VOID +NTAPI +LlbEnvGetMemoryInformation( + IN PULONG Base, + IN PULONG Size +); + +VOID +NTAPI +LlbEnvParseArguments( + IN PATAG Arguments +); + +/* EOF */ Propchange: trunk/reactos/boot/armllb/inc/envir.h ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/reactos/boot/armllb/inc/envir.h ------------------------------------------------------------------------------ svn:executable = * Modified: trunk/reactos/boot/armllb/inc/osloader.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/inc/osloader.h…
============================================================================== --- trunk/reactos/boot/armllb/inc/osloader.h [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/inc/osloader.h [iso-8859-1] Wed Feb 3 04:14:59 2010 @@ -97,10 +97,4 @@ IN PCHAR CommandLine ); -PCHAR -NTAPI -LlbEnvRead( - IN PCHAR Option -); - /* EOF */ Modified: trunk/reactos/boot/armllb/inc/precomp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/inc/precomp.h?…
============================================================================== --- trunk/reactos/boot/armllb/inc/precomp.h [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/inc/precomp.h [iso-8859-1] Wed Feb 3 04:14:59 2010 @@ -16,6 +16,7 @@ #include "serial.h" #include "video.h" #include "keyboard.h" +#include "envir.h" VOID DbgPrint( Modified: trunk/reactos/boot/armllb/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/main.c?rev=453…
============================================================================== --- trunk/reactos/boot/armllb/main.c [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/main.c [iso-8859-1] Wed Feb 3 04:14:59 2010 @@ -9,8 +9,16 @@ #include "precomp.h" VOID -LlbStartup(VOID) +LlbStartup(IN ULONG Reserved, + IN ULONG BoardInfo, + IN PATAG Arguments) { + /* Make sure we are booting on the correct kind of machine */ + if (BoardInfo != LlbHwGetBoardType()) while (TRUE); + + /* Either QEMU or U-Boot itself should send this information */ + LlbEnvParseArguments(Arguments); + /* Initialize hardware components */ LlbHwInitialize(); Modified: trunk/reactos/boot/armllb/os/loader.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/os/loader.c?re…
============================================================================== --- trunk/reactos/boot/armllb/os/loader.c [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/os/loader.c [iso-8859-1] Wed Feb 3 04:14:59 2010 @@ -38,7 +38,6 @@ LlbSetCommandLine(IN PCHAR CommandLine) { /* Copy the command line in the ARM block */ - printf("Command Line %s\n", CommandLine); strcpy(ArmBlock.CommandLine, CommandLine); } @@ -61,11 +60,11 @@ ArmBlock.UartRegisterBase = LlbHwGetUartBase(LlbHwGetSerialUart()); /* Debug */ - printf("Machine Identifier: %lx\nPCLK: %d\nTIMER 0: %p\nSERIAL UART: %p\n", - ArmBlock.BoardType, - ArmBlock.ClockRate, - ArmBlock.TimerRegisterBase, - ArmBlock.UartRegisterBase); + DbgPrint("Machine Identifier: %lx\nPCLK: %d\nTIMER 0: %p\nSERIAL UART: %p\n", + ArmBlock.BoardType, + ArmBlock.ClockRate, + ArmBlock.TimerRegisterBase, + ArmBlock.UartRegisterBase); /* Now load the memory map */ ArmBlock.MemoryMap = MemoryMap; @@ -80,10 +79,16 @@ NTAPI LlbBuildMemoryMap(VOID) { + ULONG Base, Size; + /* Zero out the memory map */ memset(MemoryMap, 0, sizeof(MemoryMap)); + + /* Query memory information */ + LlbEnvGetMemoryInformation(&Base, &Size); + LlbAllocateMemoryEntry(BiosMemoryUsable, Base, Size); - /* Call the hardware-specific function */ + /* Call the hardware-specific function for hardware-defined regions */ LlbHwBuildMemoryMap(MemoryMap); }
14 years, 10 months
1
0
0
0
[evb] 45385: - Implement logical keyboard interface. Converts scan code to ASCII codes (just ok). - Implement firmware ConsGetCh based on keyboard interface. - Implement KMI (Keyboard & Mouse Interface) PL050 driver for Versatile to init PS/2 and read keyboard scancodes. Can now press ENTER/whatever when FreeLDR gives "Cannot find freeldr.ini" error. - More fixes
by evb@svn.reactos.org
Author: evb Date: Wed Feb 3 02:19:26 2010 New Revision: 45385 URL:
http://svn.reactos.org/svn/reactos?rev=45385&view=rev
Log: - Implement logical keyboard interface. Converts scan code to ASCII codes (just ok). - Implement firmware ConsGetCh based on keyboard interface. - Implement KMI (Keyboard & Mouse Interface) PL050 driver for Versatile to init PS/2 and read keyboard scancodes. Can now press ENTER/whatever when FreeLDR gives "Cannot find freeldr.ini" error. - More fixes Added: trunk/reactos/boot/armllb/hw/keyboard.c (with props) trunk/reactos/boot/armllb/hw/versatile/hwkmi.c (with props) trunk/reactos/boot/armllb/inc/keyboard.h (with props) Modified: trunk/reactos/boot/armllb/armllb.rbuild trunk/reactos/boot/armllb/crtsupp.c trunk/reactos/boot/armllb/fw.c trunk/reactos/boot/armllb/hw/versatile/hwinit.c trunk/reactos/boot/armllb/inc/hw.h trunk/reactos/boot/armllb/inc/precomp.h trunk/reactos/boot/armllb/inc/versa.h trunk/reactos/boot/armllb/main.c Modified: trunk/reactos/boot/armllb/armllb.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/armllb.rbuild?…
============================================================================== --- trunk/reactos/boot/armllb/armllb.rbuild [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/armllb.rbuild [iso-8859-1] Wed Feb 3 02:19:26 2010 @@ -24,6 +24,7 @@ <file>envir.c</file> <file>fw.c</file> <directory name="hw"> + <file>keyboard.c</file> <file>serial.c</file> <file>video.c</file> <if property="SARCH" value="omap3"> @@ -38,6 +39,7 @@ <if property="SARCH" value="versatile"> <directory name="versatile"> <file>hwclcd.c</file> + <file>hwkmi.c</file> <file>hwuart.c</file> <file>hwinfo.c</file> <file>hwinit.c</file> Modified: trunk/reactos/boot/armllb/crtsupp.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/crtsupp.c?rev=…
============================================================================== --- trunk/reactos/boot/armllb/crtsupp.c [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/crtsupp.c [iso-8859-1] Wed Feb 3 02:19:26 2010 @@ -40,4 +40,18 @@ return puts(printbuffer); } +VOID +DbgPrint(const char *fmt, ...) +{ + va_list args; + unsigned int i, j; + char Buffer[1024]; + + va_start(args, fmt); + i = vsprintf(Buffer, fmt, args); + va_end(args); + + for (j = 0; j < i; j++) LlbSerialPutChar(Buffer[j]); +} + /* EOF */ Modified: trunk/reactos/boot/armllb/fw.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/fw.c?rev=45385…
============================================================================== --- trunk/reactos/boot/armllb/fw.c [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/fw.c [iso-8859-1] Wed Feb 3 02:19:26 2010 @@ -28,9 +28,8 @@ INT LlbFwGetCh(VOID) { - /* Not yet implemented */ - while (TRUE); - return 0; + /* Return the key pressed */ + return LlbKeyboardGetChar(); } /* EOF */ Added: trunk/reactos/boot/armllb/hw/keyboard.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/hw/keyboard.c?…
============================================================================== --- trunk/reactos/boot/armllb/hw/keyboard.c (added) +++ trunk/reactos/boot/armllb/hw/keyboard.c [iso-8859-1] Wed Feb 3 02:19:26 2010 @@ -1,0 +1,242 @@ +/* + * PROJECT: ReactOS Boot Loader + * LICENSE: BSD - See COPYING.ARM in the top level directory + * FILE: boot/armllb/hw/keyboard.c + * PURPOSE: LLB Keyboard Routines + * PROGRAMMERS: ReactOS Portable Systems Group + */ + +#include "precomp.h" + +#define E0_KPENTER 96 +#define E0_RCTRL 97 +#define E0_KPSLASH 98 +#define E0_PRSCR 99 +#define E0_RALT 100 +#define E0_BREAK 101 +#define E0_HOME 102 +#define E0_UP 103 +#define E0_PGUP 104 +#define E0_LEFT 105 +#define E0_RIGHT 106 +#define E0_END 107 +#define E0_DOWN 108 +#define E0_PGDN 109 +#define E0_INS 110 +#define E0_DEL 111 +#define E1_PAUSE 119 +#define E0_MACRO 112 +#define E0_F13 113 +#define E0_F14 114 +#define E0_HELP 115 +#define E0_DO 116 +#define E0_F17 117 +#define E0_KPMINPLUS 118 +#define E0_OK 124 +#define E0_MSLW 125 +#define E0_MSRW 126 +#define E0_MSTM 127 + +/* US 101 KEYBOARD LAYOUT *****************************************************/ + +CHAR LlbHwScanCodeToAsciiTable[58][2] = +{ + { 0,0 } , + { 27, 27 } , + { '1','!' } , + { '2','@' } , + { '3','#' } , + { '4','$' } , + { '5','%' } , + { '6','^' } , + { '7','&' } , + { '8','*' } , + { '9','(' } , + { '0',')' } , + { '-','_' } , + { '=','+' } , + { 8,8 } , + { 9,9 } , + { 'q','Q' } , + { 'w','W' } , + { 'e','E' } , + { 'r','R' } , + { 't','T' } , + { 'y','Y' } , + { 'u','U' } , + { 'i','I' } , + { 'o','O' } , + { 'p','P' } , + { '[','{' } , + { ']','}' } , + { 13,13 } , + { 0,0 } , + { 'a','A' } , + { 's','S' } , + { 'd','D' } , + { 'f','F' } , + { 'g','G' } , + { 'h','H' } , + { 'j','J' } , + { 'k','K' } , + { 'l','L' } , + { ';',':' } , + { 39,34 } , + { '`','~' } , + { 0,0 } , + { '\\','|'} , + { 'z','Z' } , + { 'x','X' } , + { 'c','C' } , + { 'v','V' } , + { 'b','B' } , + { 'n','N' } , + { 'm','M' } , + { ',','<' } , + { '.','>' } , + { '/','?' } , + { 0,0 } , + { 0,0 } , + { 0,0 } , + { ' ',' ' } , +}; + +/* EXTENDED KEY TABLE *********************************************************/ + +UCHAR LlbHwExtendedScanCodeTable[128] = +{ + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + E0_KPENTER, E0_RCTRL, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, E0_KPSLASH, 0, E0_PRSCR, + E0_RALT, 0, 0, 0, + 0, E0_F13, E0_F14, E0_HELP, + E0_DO, E0_F17, 0, 0, + 0, 0, E0_BREAK, E0_HOME, + E0_UP, E0_PGUP, 0, E0_LEFT, + E0_OK, E0_RIGHT, E0_KPMINPLUS, E0_END, + E0_DOWN, E0_PGDN, E0_INS, E0_DEL, + 0, 0, 0, 0, + 0, 0, 0, E0_MSLW, + E0_MSRW, E0_MSTM, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, E0_MACRO, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0, + 0, 0, 0, 0 + }; + + +/* FUNCTIONS ******************************************************************/ + +USHORT LlbKbdLastScanCode; + +UCHAR +NTAPI +LlbKbdTranslateScanCode(IN USHORT ScanCode, + IN PUCHAR KeyCode) +{ + ULONG LastScanCode; + + /* Check for extended scan codes */ + if ((ScanCode == 0xE0) || (ScanCode == 0xE1)) + { + /* We'll get these on the next scan */ + LlbKbdLastScanCode = ScanCode; + return 0; + } + + /* Check for bogus scan codes */ + if ((ScanCode == 0x00) || (ScanCode == 0xFF)) + { + /* Reset */ + LlbKbdLastScanCode = 0; + return 0; + } + + /* Only act on the break, not the make */ + if (ScanCode > 0x80) return 0; + + /* Keep only simple scan codes */ + ScanCode &= 0x7F; + + /* Check if this was part of an extended sequence */ + if (LlbKbdLastScanCode) + { + /* Save the last scan code and clear it, since we've consumed it now */ + LastScanCode = LlbKbdLastScanCode; + LlbKbdLastScanCode = 0; + switch (LastScanCode) + { + /* E0 extended codes */ + case 0xE0: + + /* Skip bogus codes */ + if ((ScanCode == 0x2A) || (ScanCode == 0x36)) return 0; + + /* Lookup the code for it */ + if (!LlbHwExtendedScanCodeTable[ScanCode]) return 0; + *KeyCode = LlbHwExtendedScanCodeTable[ScanCode]; + break; + + /* E1 extended codes */ + case 0xE1: + + /* Only recognize one (the SYSREQ/PAUSE sequence) */ + if (ScanCode != 0x1D) return 0; + LlbKbdLastScanCode = 0x100; + break; + + /* PAUSE sequence */ + case 0x100: + + /* Make sure it's the one */ + if (ScanCode != 0x45) return 0; + *KeyCode = E1_PAUSE; + break; + } + } + else + { + /* Otherwise, the scancode is the key code */ + LlbKbdLastScanCode = 0; + *KeyCode = ScanCode; + } + + /* Translation success */ + return 1; + } + +CHAR +NTAPI +LlbKeyboardGetChar(VOID) +{ + UCHAR ScanCode, KeyCode; + + do + { + /* Read the scan code and convert it to a virtual key code */ + ScanCode = LlbHwKbdRead(); + } while (!LlbKbdTranslateScanCode(ScanCode, &KeyCode)); + + /* Is this ASCII? */ + if (KeyCode > 96) return ScanCode; + + /* Return the ASCII character */ + return LlbHwScanCodeToAsciiTable[KeyCode][0]; +} + +/* EOF */ Propchange: trunk/reactos/boot/armllb/hw/keyboard.c ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/reactos/boot/armllb/hw/keyboard.c ------------------------------------------------------------------------------ svn:executable = * Modified: trunk/reactos/boot/armllb/hw/versatile/hwinit.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/hw/versatile/h…
============================================================================== --- trunk/reactos/boot/armllb/hw/versatile/hwinit.c [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/hw/versatile/hwinit.c [iso-8859-1] Wed Feb 3 02:19:26 2010 @@ -17,6 +17,9 @@ /* Setup the UART (PL011) */ LlbHwVersaUartInitialize(); + + /* Setup the KMI (PL050) */ + LlbHwVersaKmiInitialize(); } // Added: trunk/reactos/boot/armllb/hw/versatile/hwkmi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/hw/versatile/h…
============================================================================== --- trunk/reactos/boot/armllb/hw/versatile/hwkmi.c (added) +++ trunk/reactos/boot/armllb/hw/versatile/hwkmi.c [iso-8859-1] Wed Feb 3 02:19:26 2010 @@ -1,0 +1,135 @@ +/* + * PROJECT: ReactOS Boot Loader + * LICENSE: BSD - See COPYING.ARM in the top level directory + * FILE: boot/armllb/hw/versatile/hwkmi.c + * PURPOSE: LLB KMI Support for Versatile + * PROGRAMMERS: ReactOS Portable Systems Group + */ + +#include "precomp.h" + +// +// Control Register Bits +// +#define KMICR_TYPE (1 << 5) +#define KMICR_RXINTREN (1 << 4) +#define KMICR_TXINTREN (1 << 3) +#define KMICR_EN (1 << 2) +#define KMICR_FD (1 << 1) +#define KMICR_FC (1 << 0) + +// +// Status Register Bits +// +#define KMISTAT_TXEMPTY (1 << 6) +#define KMISTAT_TXBUSY (1 << 5) +#define KMISTAT_RXFULL (1 << 4) +#define KMISTAT_RXBUSY (1 << 3) +#define KMISTAT_RXPARITY (1 << 2) +#define KMISTAT_IC (1 << 1) +#define KMISTAT_ID (1 << 0) + +// +// KMI Registers +// +#define PL050_KMICR (LlbHwVersaKmiBase + 0x00) +#define PL050_KMISTAT (LlbHwVersaKmiBase + 0x04) +#define PL050_KMIDATA (LlbHwVersaKmiBase + 0x08) +#define PL050_KMICLKDIV (LlbHwVersaKmiBase + 0x0c) +static const ULONG LlbHwVersaKmiBase = 0x10006000; + +// +// PS/2 Commands/Requests +// +#define PS2_O_RESET 0xff +#define PS2_O_RESEND 0xfe +#define PS2_O_DISABLE 0xf5 +#define PS2_O_ENABLE 0xf4 +#define PS2_O_ECHO 0xee +#define PS2_O_SET_DEFAULT 0xf6 +#define PS2_O_SET_RATE_DELAY 0xf3 +#define PS2_O_SET_SCANSET 0xf0 +#define PS2_O_INDICATORS 0xed +#define PS2_I_RESEND 0xfe +#define PS2_I_DIAGFAIL 0xfd +#define PS2_I_ACK 0xfa +#define PS2_I_BREAK 0xf0 +#define PS2_I_ECHO 0xee +#define PS2_I_BAT_OK 0xaa + +/* FUNCTIONS ******************************************************************/ + +VOID +NTAPI +LlbHwVersaKmiSendAndWait(IN ULONG Value) +{ + volatile int i = 1000; + + /* Send the value */ + LlbHwKbdSend(Value); + + /* Wait a bit */ + while (--i); + + /* Now make sure we received an ACK */ + if (LlbHwKbdRead() != PS2_I_ACK) DbgPrint("PS/2 FAILURE!\n"); +} + +VOID +NTAPI +LlbHwVersaKmiInitialize(VOID) +{ + UCHAR Divisor; + + /* Setup divisor and enable KMI */ + Divisor = (LlbHwGetPClk() / 8000000) - 1; + WRITE_REGISTER_UCHAR(PL050_KMICLKDIV, Divisor); + WRITE_REGISTER_UCHAR(PL050_KMICR, KMICR_EN); + + /* Reset PS/2 controller */ + LlbHwVersaKmiSendAndWait(PS2_O_RESET); + if (LlbHwKbdRead() != PS2_I_BAT_OK) DbgPrint("PS/2 RESET FAILURE!\n"); + + /* Send PS/2 Initialization Stream */ + LlbHwVersaKmiSendAndWait(PS2_O_DISABLE); + LlbHwVersaKmiSendAndWait(PS2_O_SET_DEFAULT); + LlbHwVersaKmiSendAndWait(PS2_O_SET_SCANSET); + LlbHwVersaKmiSendAndWait(1); + LlbHwVersaKmiSendAndWait(PS2_O_ENABLE); +} + +VOID +NTAPI +LlbHwKbdSend(IN ULONG Value) +{ + ULONG Status; + + /* Wait for ready signal */ + do + { + /* Read TX buffer state */ + Status = READ_REGISTER_UCHAR(PL050_KMISTAT); + } while (!(Status & KMISTAT_TXEMPTY)); + + /* Send value */ + WRITE_REGISTER_UCHAR(PL050_KMIDATA, Value); +} + +INT +NTAPI +LlbHwKbdRead(VOID) +{ + ULONG Status; + + /* Wait for ready signal */ + do + { + /* Read TX buffer state */ + Status = READ_REGISTER_UCHAR(PL050_KMISTAT); + } while (!(Status & KMISTAT_RXFULL)); + + /* Read current data on keyboard */ + return READ_REGISTER_UCHAR(PL050_KMIDATA); +} + +/* EOF */ Propchange: trunk/reactos/boot/armllb/hw/versatile/hwkmi.c ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/reactos/boot/armllb/hw/versatile/hwkmi.c ------------------------------------------------------------------------------ svn:executable = * Modified: trunk/reactos/boot/armllb/inc/hw.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/inc/hw.h?rev=4…
============================================================================== --- trunk/reactos/boot/armllb/inc/hw.h [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/inc/hw.h [iso-8859-1] Wed Feb 3 02:19:26 2010 @@ -86,6 +86,18 @@ IN PBIOS_MEMORY_MAP MemoryMap ); +VOID +NTAPI +LlbHwKbdSend( + IN ULONG Value +); + +INT +NTAPI +LlbHwKbdRead( + VOID +); + POSLOADER_INIT NTAPI LlbHwLoadOsLoaderFromRam( Added: trunk/reactos/boot/armllb/inc/keyboard.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/inc/keyboard.h…
============================================================================== --- trunk/reactos/boot/armllb/inc/keyboard.h (added) +++ trunk/reactos/boot/armllb/inc/keyboard.h [iso-8859-1] Wed Feb 3 02:19:26 2010 @@ -1,0 +1,15 @@ +/* + * PROJECT: ReactOS Boot Loader + * LICENSE: BSD - See COPYING.ARM in the top level directory + * FILE: boot/armllb/inc/keyboard.h + * PURPOSE: LLB Keyboard Functions + * PROGRAMMERS: ReactOS Portable Systems Group + */ + +CHAR +NTAPI +LlbKeyboardGetChar( + VOID +); + +/* EOF */ Propchange: trunk/reactos/boot/armllb/inc/keyboard.h ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/reactos/boot/armllb/inc/keyboard.h ------------------------------------------------------------------------------ svn:executable = * Modified: trunk/reactos/boot/armllb/inc/precomp.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/inc/precomp.h?…
============================================================================== --- trunk/reactos/boot/armllb/inc/precomp.h [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/inc/precomp.h [iso-8859-1] Wed Feb 3 02:19:26 2010 @@ -15,5 +15,12 @@ #include "fw.h" #include "serial.h" #include "video.h" +#include "keyboard.h" + +VOID +DbgPrint( + const char *fmt, + ... +); /* EOF */ Modified: trunk/reactos/boot/armllb/inc/versa.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/inc/versa.h?re…
============================================================================== --- trunk/reactos/boot/armllb/inc/versa.h [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/inc/versa.h [iso-8859-1] Wed Feb 3 02:19:26 2010 @@ -18,4 +18,10 @@ VOID ); +VOID +NTAPI +LlbHwVersaKmiInitialize( + VOID +); + /* EOF */ Modified: trunk/reactos/boot/armllb/main.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/armllb/main.c?rev=453…
============================================================================== --- trunk/reactos/boot/armllb/main.c [iso-8859-1] (original) +++ trunk/reactos/boot/armllb/main.c [iso-8859-1] Wed Feb 3 02:19:26 2010 @@ -25,18 +25,4 @@ while (TRUE); } -VOID -DbgPrint(const char *fmt, ...) -{ - va_list args; - unsigned int i; - char Buffer[1024]; - - va_start(args, fmt); - i = vsprintf(Buffer, fmt, args); - va_end(args); - - while (*Buffer) LlbSerialPutChar(*Buffer); -} - /* EOF */
14 years, 10 months
1
0
0
0
[tkreuzer] 45384: [NTOS] - Fix KGDT64 names, - Add missing .ALLOCSTACK
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Feb 3 01:18:24 2010 New Revision: 45384 URL:
http://svn.reactos.org/svn/reactos?rev=45384&view=rev
Log: [NTOS] - Fix KGDT64 names, - Add missing .ALLOCSTACK Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/amd64/kdx64.c branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/kddata.c branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/context.c branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/cpu.c branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/except.c branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/kiinit.c branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/trap.S Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/amd64/kdx64.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/amd64/kdx64.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/amd64/kdx64.c [iso-8859-1] Wed Feb 3 01:18:24 2010 @@ -85,7 +85,7 @@ /* Set Report Flags */ WaitStateChange->ControlReport.ReportFlags = REPORT_INCLUDES_SEGS; - if (WaitStateChange->ControlReport.SegCs == KGDT_64_R0_CODE) + if (WaitStateChange->ControlReport.SegCs == KGDT64_R0_CODE) { WaitStateChange->ControlReport.ReportFlags |= REPORT_STANDARD_CS; } Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/kddata.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/kddata.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/kd64/kddata.c [iso-8859-1] Wed Feb 3 01:18:24 2010 @@ -526,14 +526,14 @@ // // AMD64 GDT/LDT/TSS constants // - KGDT_64_R0_CODE, - KGDT_64_DATA, - KGDT_64_DATA, - KGDT_64_R3_CODE, - KGDT_64_DATA, - KGDT_64_DATA, - 0, - KGDT_TSS, + KGDT64_R0_CODE, + KGDT64_R3_DATA, + KGDT64_R3_DATA, + KGDT64_R3_CODE, + KGDT64_R3_DATA, + KGDT64_R3_DATA, + 0, + KGDT64_SYS_TSS, 0, 0, #else Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/context.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/context.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/context.c [iso-8859-1] Wed Feb 3 01:18:24 2010 @@ -74,11 +74,11 @@ if ((Context->ContextFlags & CONTEXT_CONTROL) == CONTEXT_CONTROL) { /* Check if this was a Kernel Trap */ - if (Context->SegCs == KGDT_64_R0_CODE) - { - /* Set valid selectors */ - TrapFrame->SegCs = KGDT_64_R0_CODE; - TrapFrame->SegSs = KGDT_64_R0_SS; + if (Context->SegCs == KGDT64_R0_CODE) + { + /* Set valid selectors */ + TrapFrame->SegCs = KGDT64_R0_CODE; + TrapFrame->SegSs = KGDT64_R0_DATA; } else { @@ -97,13 +97,13 @@ if ((Context->ContextFlags & CONTEXT_SEGMENTS) == CONTEXT_SEGMENTS) { /* Check if this was a Kernel Trap */ - if (Context->SegCs == KGDT_64_R0_CODE) - { - /* Set valid selectors */ - TrapFrame->SegDs = KGDT_64_DATA | RPL_MASK; - TrapFrame->SegEs = KGDT_64_DATA | RPL_MASK; - TrapFrame->SegFs = KGDT_32_R3_TEB | RPL_MASK; - TrapFrame->SegGs = KGDT_64_DATA | RPL_MASK; + if (Context->SegCs == KGDT64_R0_CODE) + { + /* Set valid selectors */ + TrapFrame->SegDs = KGDT64_R3_DATA | RPL_MASK; + TrapFrame->SegEs = KGDT64_R3_DATA | RPL_MASK; + TrapFrame->SegFs = KGDT64_R3_CMTEB | RPL_MASK; + TrapFrame->SegGs = KGDT64_R3_DATA | RPL_MASK; } else { @@ -190,11 +190,11 @@ if ((Context->ContextFlags & CONTEXT_CONTROL) == CONTEXT_CONTROL) { /* Check if this was a Kernel Trap */ - if (TrapFrame->SegCs == KGDT_64_R0_CODE) - { - /* Set valid selectors */ - Context->SegCs = KGDT_64_R0_CODE; - Context->SegSs = KGDT_64_R0_SS; + if (TrapFrame->SegCs == KGDT64_R0_CODE) + { + /* Set valid selectors */ + Context->SegCs = KGDT64_R0_CODE; + Context->SegSs = KGDT64_R0_DATA; } else { @@ -213,13 +213,13 @@ if ((Context->ContextFlags & CONTEXT_SEGMENTS) == CONTEXT_SEGMENTS) { /* Check if this was a Kernel Trap */ - if (TrapFrame->SegCs == KGDT_64_R0_CODE) - { - /* Set valid selectors */ - Context->SegDs = KGDT_64_DATA | RPL_MASK; - Context->SegEs = KGDT_64_DATA | RPL_MASK; - Context->SegFs = KGDT_32_R3_TEB | RPL_MASK; - Context->SegGs = KGDT_64_DATA | RPL_MASK; + if (TrapFrame->SegCs == KGDT64_R0_CODE) + { + /* Set valid selectors */ + Context->SegDs = KGDT64_R3_DATA | RPL_MASK; + Context->SegEs = KGDT64_R3_DATA | RPL_MASK; + Context->SegFs = KGDT64_R3_CMTEB | RPL_MASK; + Context->SegGs = KGDT64_R3_DATA | RPL_MASK; } else { Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/cpu.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/cpu.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/cpu.c [iso-8859-1] Wed Feb 3 01:18:24 2010 @@ -379,7 +379,7 @@ PKGDTENTRY64 TssEntry; /* Get pointer to the GDT entry */ - TssEntry = KiGetGdtEntry(KeGetPcr()->GdtBase, KGDT_TSS); + TssEntry = KiGetGdtEntry(KeGetPcr()->GdtBase, KGDT64_SYS_TSS); /* Initialize the GDT entry */ KiInitGdtEntry(TssEntry, (ULONG64)Tss, sizeof(KTSS64), AMD64_TSS, 0); @@ -403,7 +403,7 @@ Tss->Ist[3] = (ULONG64)KiDoubleFaultStack; /* Load the task register */ - __ltr(KGDT_TSS); + __ltr(KGDT64_SYS_TSS); } VOID Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/except.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/except.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/except.c [iso-8859-1] Wed Feb 3 01:18:24 2010 @@ -50,9 +50,8 @@ KIDTENTRY64 KiIdt[256]; KDESCRIPTOR KiIdtDescriptor = {{0}, sizeof(KiIdt) - 1, KiIdt}; + /* FUNCTIONS *****************************************************************/ - - VOID INIT_FUNCTION @@ -80,7 +79,7 @@ KiIdt[i].IstIndex = 0; } KiIdt[i].OffsetLow = Offset & 0xffff; - KiIdt[i].Selector = KGDT_64_R0_CODE; + KiIdt[i].Selector = KGDT64_R0_CODE; KiIdt[i].Type = 0x0e; KiIdt[i].Reserved0 = 0; KiIdt[i].Present = 1; @@ -242,6 +241,20 @@ ASSERT(FALSE); } + /* Check for lazy segment load */ + if (TrapFrame->SegDs != (KGDT64_R3_DATA | RPL_MASK)) + { + /* Fix it */ + TrapFrame->SegDs = (KGDT64_R3_DATA | RPL_MASK); + return STATUS_SUCCESS; + } + else if (TrapFrame->SegEs != (KGDT64_R3_DATA | RPL_MASK)) + { + /* Fix it */ + TrapFrame->SegEs = (KGDT64_R3_DATA | RPL_MASK); + return STATUS_SUCCESS; + } + /* Check for nested exception */ if ((TrapFrame->Rip >= (ULONG64)KiGeneralProtectionFaultHandler) && (TrapFrame->Rip < (ULONG64)KiGeneralProtectionFaultHandler)) @@ -271,20 +284,6 @@ return STATUS_ACCESS_VIOLATION; } - /* Check for lazy segment load */ - if (TrapFrame->SegDs != (KGDT64_R0_DATA | RPL_MASK)) - { - /* Fix it */ - TrapFrame->SegDs = (KGDT64_R0_DATA | RPL_MASK); - return STATUS_SUCCESS; - } - else if (TrapFrame->SegEs != (KGDT64_R0_DATA | RPL_MASK)) - { - /* Fix it */ - TrapFrame->SegEs = (KGDT64_R0_DATA | RPL_MASK); - return STATUS_SUCCESS; - } - ASSERT(FALSE); return STATUS_UNSUCCESSFUL; } Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/kiinit.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/kiinit.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/kiinit.c [iso-8859-1] Wed Feb 3 01:18:24 2010 @@ -120,7 +120,7 @@ /* Get TSS Selector */ __str(&Tr); - ASSERT(Tr == KGDT_TSS); + ASSERT(Tr == KGDT64_SYS_TSS); /* Get TSS Entry */ TssEntry = KiGetGdtEntry(Pcr->GdtBase, Tr); @@ -390,9 +390,9 @@ __writemsr(X86_MSR_KERNEL_GSBASE, (ULONG64)Pcr); /* Load Ring 3 selectors for DS/ES/FS */ - Ke386SetDs(KGDT_64_DATA | RPL_MASK); - Ke386SetEs(KGDT_64_DATA | RPL_MASK); - Ke386SetFs(KGDT_32_R3_TEB | RPL_MASK); + Ke386SetDs(KGDT64_R3_DATA | RPL_MASK); + Ke386SetEs(KGDT64_R3_DATA | RPL_MASK); + Ke386SetFs(KGDT64_R3_CMTEB | RPL_MASK); /* LDT is unused */ __lldt(0); Modified: branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/trap.S URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/ntosk…
============================================================================== --- branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/trap.S [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/ntoskrnl/ke/amd64/trap.S [iso-8859-1] Wed Feb 3 01:18:24 2010 @@ -274,6 +274,7 @@ /* Allocate stack space for EXCEPTION_RECORD and KEXCEPTION_FRAME */ sub rsp, SIZE_EXCEPTION_RECORD + SIZE_KEXCEPTION_FRAME + .allocstack (SIZE_EXCEPTION_RECORD + SIZE_KEXCEPTION_FRAME) /* Set up EXCEPTION_RECORD */ lea rcx, [rsp + SIZE_KEXCEPTION_FRAME]
14 years, 10 months
1
0
0
0
[tkreuzer] 45383: [FREELDR] Fix KGDT64 names, initialize KGDT64_NULL and KGDT64_R3_CMCODE
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Feb 3 01:04:27 2010 New Revision: 45383 URL:
http://svn.reactos.org/svn/reactos?rev=45383&view=rev
Log: [FREELDR] Fix KGDT64 names, initialize KGDT64_NULL and KGDT64_R3_CMCODE Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/amd64/wlmemory.c Modified: branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/amd64/wlmemory.c URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/boot/…
============================================================================== --- branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/amd64/wlmemory.c [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/boot/freeldr/freeldr/windows/amd64/wlmemory.c [iso-8859-1] Wed Feb 3 01:04:27 2010 @@ -252,28 +252,36 @@ PKGDTENTRY64 Entry; KDESCRIPTOR GdtDesc; - /* Setup KGDT_64_R0_CODE */ - Entry = KiGetGdtEntry(GdtBase, KGDT_64_R0_CODE); + /* Setup KGDT64_NULL */ + Entry = KiGetGdtEntry(GdtBase, KGDT64_NULL); + *(PULONG64)Entry = 0x0000000000000000ULL; + + /* Setup KGDT64_R0_CODE */ + Entry = KiGetGdtEntry(GdtBase, KGDT64_R0_CODE); *(PULONG64)Entry = 0x00209b0000000000ULL; - /* Setup KGDT_64_R0_SS */ - Entry = KiGetGdtEntry(GdtBase, KGDT_64_R0_SS); + /* Setup KGDT64_R0_DATA */ + Entry = KiGetGdtEntry(GdtBase, KGDT64_R0_DATA); *(PULONG64)Entry = 0x00cf93000000ffffULL; - /* Setup KGDT_64_DATA */ - Entry = KiGetGdtEntry(GdtBase, KGDT_64_DATA); + /* Setup KGDT64_R3_CMCODE */ + Entry = KiGetGdtEntry(GdtBase, KGDT64_R3_CMCODE); + *(PULONG64)Entry = 0x00cffb000000ffffULL; + + /* Setup KGDT64_R3_DATA */ + Entry = KiGetGdtEntry(GdtBase, KGDT64_R3_DATA); *(PULONG64)Entry = 0x00cff3000000ffffULL; - /* Setup KGDT_64_R3_CODE */ - Entry = KiGetGdtEntry(GdtBase, KGDT_64_R3_CODE); + /* Setup KGDT64_R3_CODE */ + Entry = KiGetGdtEntry(GdtBase, KGDT64_R3_CODE); *(PULONG64)Entry = 0x0020fb0000000000ULL; - /* Setup KGDT_32_R3_TEB */ - Entry = KiGetGdtEntry(GdtBase, KGDT_32_R3_TEB); + /* Setup KGDT64_R3_CMTEB */ + Entry = KiGetGdtEntry(GdtBase, KGDT64_R3_CMTEB); *(PULONG64)Entry = 0xff40f3fd50003c00ULL; /* Setup TSS entry */ - Entry = KiGetGdtEntry(GdtBase, KGDT_TSS); + Entry = KiGetGdtEntry(GdtBase, KGDT64_SYS_TSS); KiInitGdtEntry(Entry, TssBase, sizeof(KTSS), I386_TSS, 0); /* Setup GDT descriptor */ @@ -334,14 +342,14 @@ // __lldt(0); /* Load selectors for DS/ES/FS/GS/SS */ - Ke386SetDs(KGDT_64_DATA | RPL_MASK); // 0x2b - Ke386SetEs(KGDT_64_DATA | RPL_MASK); // 0x2b - Ke386SetFs(KGDT_32_R3_TEB | RPL_MASK); // 0x53 - Ke386SetGs(KGDT_64_DATA | RPL_MASK); // 0x2b - Ke386SetSs(KGDT_64_R0_SS); // 0x18 + Ke386SetDs(KGDT64_R3_DATA | RPL_MASK); // 0x2b + Ke386SetEs(KGDT64_R3_DATA | RPL_MASK); // 0x2b + Ke386SetFs(KGDT64_R3_CMTEB | RPL_MASK); // 0x53 + Ke386SetGs(KGDT64_R3_DATA | RPL_MASK); // 0x2b + Ke386SetSs(KGDT64_R0_DATA); // 0x18 /* Load TSR */ - __ltr(KGDT_TSS); + __ltr(KGDT64_SYS_TSS); DPRINTM(DPRINT_WINDOWS, "leave WinLdrSetProcessorContext\n"); }
14 years, 10 months
1
0
0
0
[tkreuzer] 45382: Fix the UNIMPLEMENTED macro
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Feb 3 00:48:03 2010 New Revision: 45382 URL:
http://svn.reactos.org/svn/reactos?rev=45382&view=rev
Log: Fix the UNIMPLEMENTED macro Modified: branches/ros-amd64-bringup/reactos/include/reactos/asm.h Modified: branches/ros-amd64-bringup/reactos/include/reactos/asm.h URL:
http://svn.reactos.org/svn/reactos/branches/ros-amd64-bringup/reactos/inclu…
============================================================================== --- branches/ros-amd64-bringup/reactos/include/reactos/asm.h [iso-8859-1] (original) +++ branches/ros-amd64-bringup/reactos/include/reactos/asm.h [iso-8859-1] Wed Feb 3 00:48:03 2010 @@ -137,13 +137,11 @@ .macro .endprolog .endm -// Note the file1. This is a hack, as "\file" doesn't work with __FILE__, when -// .altmacro is specified. -.macro UNIMPLEMENTED2 file1, line, func +.macro UNIMPLEMENTED2 file, line, func jmp 3f -1: .asciz "\func" -2: .asciz "\file" +1: .asciz \func +2: .asciz \file 3: sub rsp, 0x20 lea rcx, _MsgUnimplemented[rip]
14 years, 10 months
1
0
0
0
← Newer
1
...
32
33
34
35
36
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