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
September 2015
----- 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
17 participants
535 discussions
Start a n
N
ew thread
[akhaldi] 69060: [CMAKE] Introduce a way to compile ReactOS without invoking CMake twice. You can enable it by running configure with -DNEW_STYLE_BUILD=1. Once the transition goes smoothly we can e...
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Sep 6 16:44:30 2015 New Revision: 69060 URL:
http://svn.reactos.org/svn/reactos?rev=69060&view=rev
Log: [CMAKE] Introduce a way to compile ReactOS without invoking CMake twice. You can enable it by running configure with -DNEW_STYLE_BUILD=1. Once the transition goes smoothly we can enable this by default. CORE-10121 Added: trunk/reactos/cmake/host-tools.cmake (with props) Modified: trunk/reactos/CMakeLists.txt trunk/reactos/cmake/gcc.cmake trunk/reactos/tools/CMakeLists.txt trunk/reactos/tools/cabman/CMakeLists.txt trunk/reactos/tools/cdmake/CMakeLists.txt trunk/reactos/tools/hpp/CMakeLists.txt trunk/reactos/tools/kbdtool/CMakeLists.txt trunk/reactos/tools/log2lines/CMakeLists.txt trunk/reactos/tools/mkhive/CMakeLists.txt trunk/reactos/tools/rsym/CMakeLists.txt trunk/reactos/tools/widl/CMakeLists.txt Modified: trunk/reactos/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/CMakeLists.txt?rev=69060&r…
============================================================================== --- trunk/reactos/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/CMakeLists.txt [iso-8859-1] Sun Sep 6 16:44:30 2015 @@ -41,6 +41,10 @@ set(CMAKE_DISABLE_NINJA_DEPSLOG TRUE) endif() +if(NOT DEFINED NEW_STYLE_BUILD) + set(NEW_STYLE_BUILD FALSE) +endif() + if(NOT ARCH) set(ARCH i386) endif() @@ -80,6 +84,10 @@ if(NOT CMAKE_CROSSCOMPILING) + if(NEW_STYLE_BUILD) + set(TOOLS_FOLDER ${CMAKE_CURRENT_BINARY_DIR}) + endif() + add_definitions(-DTARGET_${ARCH}) if(MSVC) @@ -102,13 +110,19 @@ add_subdirectory(tools) add_subdirectory(lib) - if(NOT MSVC) - export(TARGETS bin2c widl gendib cabman cdmake mkhive obj2bin spec2def geninc rsym mkshelllink utf16le FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- ) - else() - export(TARGETS bin2c widl gendib cabman cdmake mkhive obj2bin spec2def geninc mkshelllink utf16le FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- ) + if(NOT NEW_STYLE_BUILD) + if(NOT MSVC) + export(TARGETS bin2c widl gendib cabman cdmake mkhive obj2bin spec2def geninc rsym mkshelllink utf16le FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- ) + else() + export(TARGETS bin2c widl gendib cabman cdmake mkhive obj2bin spec2def geninc mkshelllink utf16le FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- ) + endif() endif() else() + + if(NEW_STYLE_BUILD) + include(cmake/host-tools.cmake) + endif() # adjust the default behaviour of the FIND_XXX() commands: # search headers and libraries in the target environment, search @@ -130,12 +144,13 @@ ${REACTOS_BINARY_DIR}/boot/ros_cab.txt ${REACTOS_BINARY_DIR}/boot/ros_cab_target.txt) - if(NOT DEFINED REACTOS_BUILD_TOOLS_DIR) - set(REACTOS_BUILD_TOOLS_DIR ${REACTOS_SOURCE_DIR}/build) - endif() - - set(IMPORT_EXECUTABLES "${REACTOS_BUILD_TOOLS_DIR}/ImportExecutables.cmake" CACHE FILEPATH "Host executables") - include(${IMPORT_EXECUTABLES}) + if(NOT NEW_STYLE_BUILD) + if(NOT DEFINED REACTOS_BUILD_TOOLS_DIR) + set(REACTOS_BUILD_TOOLS_DIR ${REACTOS_SOURCE_DIR}/build) + endif() + set(IMPORT_EXECUTABLES "${REACTOS_BUILD_TOOLS_DIR}/ImportExecutables.cmake" CACHE FILEPATH "Host executables") + include(${IMPORT_EXECUTABLES}) + endif() if(DBG) add_definitions(-DDBG=1 -D_SEH_ENABLE_TRACE) Modified: trunk/reactos/cmake/gcc.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/gcc.cmake?rev=69060&…
============================================================================== --- trunk/reactos/cmake/gcc.cmake [iso-8859-1] (original) +++ trunk/reactos/cmake/gcc.cmake [iso-8859-1] Sun Sep 6 16:44:30 2015 @@ -225,7 +225,13 @@ set(CMAKE_RC_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER> ${CMAKE_C_FLAGS} <CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>") else() # Normal rsym build - get_target_property(RSYM native-rsym IMPORTED_LOCATION_NOCONFIG) + if(NEW_STYLE_BUILD) + string(TOUPPER ${CMAKE_BUILD_TYPE} _build_type) + get_target_property(RSYM native-rsym IMPORTED_LOCATION_${_build_type}) + else() + get_target_property(RSYM native-rsym IMPORTED_LOCATION_NOCONFIG) + endif() + set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> ${CMAKE_C_FLAGS} <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>" "${RSYM} -s ${REACTOS_SOURCE_DIR} <TARGET> <TARGET>") Added: trunk/reactos/cmake/host-tools.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/host-tools.cmake?rev…
============================================================================== --- trunk/reactos/cmake/host-tools.cmake (added) +++ trunk/reactos/cmake/host-tools.cmake [iso-8859-1] Sun Sep 6 16:44:30 2015 @@ -0,0 +1,37 @@ + +if(CMAKE_HOST_WIN32) + set(native_suffix ".exe") +endif() + +string(TOUPPER ${CMAKE_BUILD_TYPE} _build_type) + +# List of host tools +list(APPEND host_tools_list bin2c widl gendib cabman cdmake mkhive obj2bin spec2def geninc mkshelllink utf16le) +if(NOT MSVC) + list(APPEND host_tools_list rsym) +endif() + +foreach(_host_tool ${host_tools_list}) + if(MSVC_IDE) + get_filename_component(_tool_location "${CMAKE_CURRENT_BINARY_DIR}/host-tools/${CMAKE_BUILD_TYPE}/${_host_tool}${native_suffix}" ABSOLUTE) + else() + get_filename_component(_tool_location "${CMAKE_CURRENT_BINARY_DIR}/host-tools/${_host_tool}${native_suffix}" ABSOLUTE) + endif() + list(APPEND tools_binaries ${_tool_location}) + add_executable(native-${_host_tool} IMPORTED) + set_property(TARGET native-${_host_tool} PROPERTY IMPORTED_LOCATION_${_build_type} ${_tool_location}) + add_dependencies(native-${_host_tool} host-tools) +endforeach() + +include(ExternalProject) + +ExternalProject_Add(host-tools + SOURCE_DIR ${REACTOS_SOURCE_DIR} + BINARY_DIR ${REACTOS_BINARY_DIR}/host-tools + STAMP_DIR ${REACTOS_BINARY_DIR}/host-tools/stamps + BUILD_ALWAYS 1 + PREFIX host-tools + EXCLUDE_FROM_ALL 1 + CMAKE_ARGS "-DNEW_STYLE_BUILD=1" + INSTALL_COMMAND "" + BUILD_BYPRODUCTS ${tools_binaries}) Propchange: trunk/reactos/cmake/host-tools.cmake ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/tools/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/CMakeLists.txt?rev=6…
============================================================================== --- trunk/reactos/tools/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/tools/CMakeLists.txt [iso-8859-1] Sun Sep 6 16:44:30 2015 @@ -1,3 +1,10 @@ + +function(add_host_tool _tool) + add_executable(${_tool} ${ARGN}) + if(NEW_STYLE_BUILD) + set_target_properties(${_tool} PROPERTIES RUNTIME_OUTPUT_DIRECTORY ${TOOLS_FOLDER}) + endif() +endfunction() #add_executable(pefixup pefixup.c) @@ -5,17 +12,17 @@ add_definitions(-D_CRT_SECURE_NO_WARNINGS) endif() -add_executable(bin2c bin2c.c) -add_executable(gendib gendib/gendib.c) -add_executable(geninc geninc/geninc.c) -add_executable(mkshelllink mkshelllink/mkshelllink.c) -add_executable(obj2bin obj2bin/obj2bin.c) -add_executable(spec2def spec2def/spec2def.c) +add_host_tool(bin2c bin2c.c) +add_host_tool(gendib gendib/gendib.c) +add_host_tool(geninc geninc/geninc.c) +add_host_tool(mkshelllink mkshelllink/mkshelllink.c) +add_host_tool(obj2bin obj2bin/obj2bin.c) +add_host_tool(spec2def spec2def/spec2def.c) if(MSVC) set_property(SOURCE utf16le/utf16le.cpp APPEND_STRING PROPERTY COMPILE_FLAGS " /EHsc") endif() -add_executable(utf16le utf16le/utf16le.cpp) +add_host_tool(utf16le utf16le/utf16le.cpp) add_subdirectory(cabman) add_subdirectory(cdmake) Modified: trunk/reactos/tools/cabman/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/cabman/CMakeLists.tx…
============================================================================== --- trunk/reactos/tools/cabman/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/tools/cabman/CMakeLists.txt [iso-8859-1] Sun Sep 6 16:44:30 2015 @@ -7,5 +7,5 @@ raw.cxx) include_directories(${REACTOS_SOURCE_DIR}/include/reactos/libs/zlib) -add_executable(cabman ${SOURCE}) +add_host_tool(cabman ${SOURCE}) target_link_libraries(cabman zlibhost) Modified: trunk/reactos/tools/cdmake/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/cdmake/CMakeLists.tx…
============================================================================== --- trunk/reactos/tools/cdmake/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/tools/cdmake/CMakeLists.txt [iso-8859-1] Sun Sep 6 16:44:30 2015 @@ -1,2 +1,2 @@ -add_executable(cdmake cdmake.c dirhash.c llmsort.c) +add_host_tool(cdmake cdmake.c dirhash.c llmsort.c) Modified: trunk/reactos/tools/hpp/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/hpp/CMakeLists.txt?r…
============================================================================== --- trunk/reactos/tools/hpp/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/tools/hpp/CMakeLists.txt [iso-8859-1] Sun Sep 6 16:44:30 2015 @@ -1,2 +1,2 @@ -add_executable(hpp hpp.c) +add_host_tool(hpp hpp.c) Modified: trunk/reactos/tools/kbdtool/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/kbdtool/CMakeLists.t…
============================================================================== --- trunk/reactos/tools/kbdtool/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/tools/kbdtool/CMakeLists.txt [iso-8859-1] Sun Sep 6 16:44:30 2015 @@ -1,2 +1,2 @@ -add_executable(kbdtool data.c main.c output.c parser.c) +add_host_tool(kbdtool data.c main.c output.c parser.c) Modified: trunk/reactos/tools/log2lines/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/log2lines/CMakeLists…
============================================================================== --- trunk/reactos/tools/log2lines/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/tools/log2lines/CMakeLists.txt [iso-8859-1] Sun Sep 6 16:44:30 2015 @@ -13,5 +13,5 @@ util.c) include_directories(${REACTOS_SOURCE_DIR}/tools/rsym) -add_executable(log2lines ${SOURCE}) +add_host_tool(log2lines ${SOURCE}) target_link_libraries(log2lines rsym_common) Modified: trunk/reactos/tools/mkhive/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/CMakeLists.tx…
============================================================================== --- trunk/reactos/tools/mkhive/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/tools/mkhive/CMakeLists.txt [iso-8859-1] Sun Sep 6 16:44:30 2015 @@ -16,5 +16,5 @@ registry.c rtl.c) -add_executable(mkhive ${SOURCE}) +add_host_tool(mkhive ${SOURCE}) target_link_libraries(mkhive unicode cmlibhost inflibhost) Modified: trunk/reactos/tools/rsym/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/rsym/CMakeLists.txt?…
============================================================================== --- trunk/reactos/tools/rsym/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/tools/rsym/CMakeLists.txt [iso-8859-1] Sun Sep 6 16:44:30 2015 @@ -4,12 +4,12 @@ if(ARCH STREQUAL "i386") add_definitions(-D_X86_) - add_executable(rsym rsym.c) + add_host_tool(rsym rsym.c) elseif(ARCH STREQUAL "amd64") - add_executable(rsym rsym64.c) + add_host_tool(rsym rsym64.c) elseif(ARCH STREQUAL "arm") add_executable(rsym rsym64.c) endif() target_link_libraries(rsym rsym_common dbghelphost zlibhost unicode) -add_executable(raddr2line rsym_common.c raddr2line.c) +add_host_tool(raddr2line rsym_common.c raddr2line.c) Modified: trunk/reactos/tools/widl/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/CMakeLists.txt?…
============================================================================== --- trunk/reactos/tools/widl/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/tools/widl/CMakeLists.txt [iso-8859-1] Sun Sep 6 16:44:30 2015 @@ -32,5 +32,5 @@ # Taken from widl.rbuild add_definitions(-DINT16=SHORT) -add_executable(widl ${SOURCE}) +add_host_tool(widl ${SOURCE}) target_link_libraries(widl wpphost)
9 years, 3 months
1
0
0
0
[ion] 69059: [BOOTMGFW]: - Implement case in BlMmRemoveRegionFromMdlEx where the descriptor's tail (or entire allocation) is contained in the descriptor -- this covers our BootMgr entry. - Implemen...
by ion@svn.reactos.org
Author: ion Date: Sun Sep 6 16:41:43 2015 New Revision: 69059 URL:
http://svn.reactos.org/svn/reactos?rev=69059&view=rev
Log: [BOOTMGFW]: - Implement case in BlMmRemoveRegionFromMdlEx where the descriptor's tail (or entire allocation) is contained in the descriptor -- this covers our BootMgr entry. - Implement some more initialization functions. - Start implementing the heap allocator initialization code. Now we need to implement the actual page allocator. Modified: trunk/reactos/boot/environ/include/bl.h trunk/reactos/boot/environ/lib/firmware/efi/firmware.c trunk/reactos/boot/environ/lib/mm/descriptor.c trunk/reactos/boot/environ/lib/mm/heapalloc.c trunk/reactos/boot/environ/lib/mm/i386/mmx86.c trunk/reactos/boot/environ/lib/mm/mm.c trunk/reactos/boot/environ/lib/mm/pagealloc.c Modified: trunk/reactos/boot/environ/include/bl.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/include/bl.h?…
============================================================================== --- trunk/reactos/boot/environ/include/bl.h [iso-8859-1] (original) +++ trunk/reactos/boot/environ/include/bl.h [iso-8859-1] Sun Sep 6 16:41:43 2015 @@ -64,6 +64,8 @@ #define BL_MM_DESCRIPTOR_REQUIRES_COALESCING_FLAG 0x2000000 #define BL_MM_DESCRIPTOR_REQUIRES_UPDATING_FLAG 0x4000000 +#define BL_MM_REMOVE_VIRTUAL_REGION_FLAG 0x80000000 + #define BL_LIBRARY_FLAG_REINITIALIZE 0x02 #define BL_LIBRARY_FLAG_REINITIALIZE_ALL 0x04 #define BL_LIBRARY_FLAG_INITIALIZATION_COMPLETED 0x20 @@ -71,6 +73,12 @@ #define BL_MEMORY_CLASS_SHIFT 28 /* ENUMERATIONS **************************************************************/ + +typedef enum _BL_MEMORY_DESCRIPTOR_TYPE +{ + BlMdPhysical, + BlMdVirtual, +} BL_MEMORY_DESCRIPTOR_TYPE; typedef enum _BL_TRANSLATION_TYPE { @@ -144,6 +152,7 @@ // Loader Memory // BlLoaderMemory = 0xD0000002, + BlLoaderHeap = 0xD0000005, BlLoaderPageDirectory = 0xD0000006, BlLoaderReferencePage = 0xD0000007, BlLoaderRamDisk = 0xD0000008, @@ -397,6 +406,12 @@ ULONG Type; } BL_MEMORY_DESCRIPTOR_LIST, *PBL_MEMORY_DESCRIPTOR_LIST; +typedef struct _BL_ADDRESS_RANGE +{ + ULONGLONG Minimum; + ULONGLONG Maximum; +} BL_ADDRESS_RANGE, *PBL_ADDRESS_RANGE; + /* INLINE ROUTINES ***********************************************************/ FORCEINLINE @@ -554,6 +569,17 @@ __in PBL_MEMORY_DESCRIPTOR_LIST NewMdList ); +NTSTATUS +MmPapAllocatePagesInRange ( + _Inout_ PULONG PhysicalAddress, + _In_ BL_MEMORY_TYPE MemoryType, + _In_ ULONGLONG Pages, + _In_ ULONG Attributes, + _In_ ULONG Alignment, + _In_opt_ PBL_ADDRESS_RANGE Range, + _In_ ULONG Type + ); + extern ULONG MmDescriptorCallTreeCount; extern ULONG BlpApplicationFlags; extern BL_LIBRARY_PARAMETERS BlpLibraryParameters; Modified: trunk/reactos/boot/environ/lib/firmware/efi/firmware.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/lib/firmware/…
============================================================================== --- trunk/reactos/boot/environ/lib/firmware/efi/firmware.c [iso-8859-1] (original) +++ trunk/reactos/boot/environ/lib/firmware/efi/firmware.c [iso-8859-1] Sun Sep 6 16:41:43 2015 @@ -530,9 +530,11 @@ } /* Loop the EFI memory map */ +#if 0 EarlyPrint(L"UEFI MEMORY MAP\n\n"); EarlyPrint(L"TYPE START END ATTRIBUTES\n"); EarlyPrint(L"===============================================================\n"); +#endif while (EfiMemoryMapSize != 0) { /* Check if this is an EFI buffer, but we're not in real mode */ @@ -571,13 +573,13 @@ { goto LoopAgain; } - +#if 0 EarlyPrint(L"%08X 0x%016I64X-0x%016I64X 0x%I64X\n", MemoryType, StartPage << PAGE_SHIFT, EndPage << PAGE_SHIFT, EfiDescriptor.Attribute); - +#endif /* Check for any range of memory below 1MB */ if (StartPage < 0x100) { Modified: trunk/reactos/boot/environ/lib/mm/descriptor.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/lib/mm/descri…
============================================================================== --- trunk/reactos/boot/environ/lib/mm/descriptor.c [iso-8859-1] (original) +++ trunk/reactos/boot/environ/lib/mm/descriptor.c [iso-8859-1] Sun Sep 6 16:41:43 2015 @@ -476,14 +476,6 @@ } } -typedef enum _BL_MEMORY_DESCRIPTOR_TYPE -{ - BlMdPhysical, - BlMdVirtual, -} BL_MEMORY_DESCRIPTOR_TYPE; - -#define BL_MM_REMOVE_VIRTUAL_REGION_FLAG 0x80000000 - NTSTATUS MmMdRemoveRegionFromMdlEx ( __in PBL_MEMORY_DESCRIPTOR_LIST MdList, @@ -498,7 +490,11 @@ PLIST_ENTRY ListHead, NextEntry; PBL_MEMORY_DESCRIPTOR Descriptor; BL_MEMORY_DESCRIPTOR NewDescriptor; + ULONGLONG RegionSize; ULONGLONG FoundBasePage, FoundEndPage, FoundPageCount, EndPage; + + /* Set initial status */ + Status = STATUS_SUCCESS; /* Check if removed descriptors should go into a new list */ if (NewMdList != NULL) @@ -551,7 +547,7 @@ FoundPageCount = Descriptor->PageCount; FoundEndPage = FoundBasePage + FoundPageCount; EndPage = PageCount + BasePage; - EarlyPrint(L"Looking for Region 0x%08I64X-0x%08I64X in 0x%08I64X-0x%08I64X\n", BasePage, EndPage, FoundBasePage, FoundEndPage); + //EarlyPrint(L"Looking for Region 0x%08I64X-0x%08I64X in 0x%08I64X-0x%08I64X\n", BasePage, EndPage, FoundBasePage, FoundEndPage); /* Make a copy of the original descriptor */ RtlCopyMemory(&NewDescriptor, NextEntry, sizeof(NewDescriptor)); @@ -566,28 +562,71 @@ if ((FoundBasePage >= BasePage) || (EndPage >= FoundEndPage)) { /* This descriptor doesn't cover any part of the range */ - EarlyPrint(L"No part of this descriptor contains the region\n"); + //EarlyPrint(L"No part of this descriptor contains the region\n"); } else { /* This descriptor covers the head of the allocation */ - EarlyPrint(L"Descriptor covers the head of the region\n"); + //EarlyPrint(L"Descriptor covers the head of the region\n"); } } else { /* This descriptor contains the entire allocation */ - EarlyPrint(L"Descriptor contains the entire region\n"); - } + //EarlyPrint(L"Descriptor contains the entire region\n"); + } + + /* Keep going */ + NextEntry = NextEntry->Flink; } else { - /* This descriptor covers the end of the allocation */ - EarlyPrint(L"Descriptor covers the end of the region\n"); - } - - /* Keep going */ - NextEntry = NextEntry->Flink; + /* + * This descriptor contains the end of the allocation. It may: + * + * - Contain the full allocation (i.e.: the start is aligned) + * - Contain parts of the end of the allocation (i.e.: the end is beyond) + * - Contain the entire tail end of the allocation (i..e:the end is within) + * + * So first, figure out if we cover the entire end or not + */ + if (EndPage > FoundEndPage) + { + /* The allocation goes past the end of this descriptor */ + EndPage = FoundEndPage; + } + + /* This is how many pages we will eat away from the descriptor */ + RegionSize = EndPage - FoundBasePage; + + /* Update the descriptor to account for the consumed pages */ + Descriptor->BasePage += RegionSize; + Descriptor->PageCount -= RegionSize; + if (Descriptor->VirtualPage) + { + Descriptor->VirtualPage += RegionSize; + } + + /* Go to the next entry */ + NextEntry = NextEntry->Flink; + + /* Check if the descriptor is now empty */ + if (!Descriptor->PageCount) + { + /* Remove it */ + //EarlyPrint(L"Entire descriptor consumed\n"); + MmMdRemoveDescriptorFromList(MdList, Descriptor); + MmMdFreeDescriptor(Descriptor); + + /* Check if we're supposed to insert it into a new list */ + if (HaveNewList) + { + EarlyPrint(L"Not yet implemented\n"); + Status = STATUS_NOT_IMPLEMENTED; + goto Quickie; + } + } + } } Quickie: Modified: trunk/reactos/boot/environ/lib/mm/heapalloc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/lib/mm/heapal…
============================================================================== --- trunk/reactos/boot/environ/lib/mm/heapalloc.c [iso-8859-1] (original) +++ trunk/reactos/boot/environ/lib/mm/heapalloc.c [iso-8859-1] Sun Sep 6 16:41:43 2015 @@ -12,8 +12,149 @@ /* DATA VARIABLES ************************************************************/ +#define BL_HEAP_POINTER_FLAG_BITS 3 + +typedef struct _BL_HEAP_POINTER +{ + union + { + struct + { + ULONG_PTR BufferFree : 1; + ULONG_PTR BufferOnHeap : 1; + ULONG_PTR NotUsed : 1; + ULONG_PTR BufferPointer : (sizeof(ULONG_PTR) - BL_HEAP_POINTER_FLAG_BITS); + }; + PVOID P; + }; +} BL_HEAP_POINTER, *PBL_HEAP_POINTER; + +typedef struct _BL_FREE_HEAP_ENTRY +{ + BL_HEAP_POINTER BufferNext; + BL_HEAP_POINTER BufferPrevious; + BL_HEAP_POINTER FreeNext; + BL_HEAP_POINTER FreePrevious; +} BL_FREE_HEAP_ENTRY, *PBL_FREE_HEAP_ENTRY; + +typedef struct _BL_BUSY_HEAP_ENTRY +{ + BL_HEAP_POINTER BufferNext; + BL_HEAP_POINTER BufferPrevious; + UCHAR Buffer[ANYSIZE_ARRAY]; +} BL_BUSY_HEAP_ENTRY, *PBL_BUSY_HEAP_ENTRY; + +typedef struct _BL_HEAP_BOUNDARIES +{ + LIST_ENTRY ListEntry; + ULONG_PTR HeapHigh; + ULONG_PTR HeapLimit; + ULONG_PTR HeapBottom; + PBL_BUSY_HEAP_ENTRY HeapTop; +} BL_HEAP_BOUNDARIES, *PBL_HEAP_BOUNDARIES; + +ULONG HapInitializationStatus; +LIST_ENTRY MmHeapBoundaries; +ULONG HapMinimumHeapSize; +ULONG HapAllocationAttributes; +PBL_FREE_HEAP_ENTRY* MmFreeList; /* FUNCTIONS *****************************************************************/ + +NTSTATUS +MmHapHeapAllocatorExtend ( + _In_ ULONG ExtendSize + ) +{ + ULONG HeapSize, AlignedSize, HeapLimit; + PBL_HEAP_BOUNDARIES Heap, NewHeap; + NTSTATUS Status; + PBL_BUSY_HEAP_ENTRY HeapBase = NULL; + + /* Compute a new heap, and add 2 more pages for the free list */ + HeapSize = ExtendSize + (2 * PAGE_SIZE); + if ((ExtendSize + (2 * PAGE_SIZE)) < ExtendSize) + { + return STATUS_INTEGER_OVERFLOW; + } + + /* Make sure the new heap is at least the minimum configured size */ + if (HapMinimumHeapSize > HeapSize) + { + HeapSize = HapMinimumHeapSize; + } + + /* Align it on a page boundary */ + AlignedSize = ALIGN_UP_BY(HeapSize, PAGE_SIZE); + if (!AlignedSize) + { + return STATUS_INTEGER_OVERFLOW; + } + + /* Check if we already have a heap */ + if (!IsListEmpty(&MmHeapBoundaries)) + { + /* Find the first heap*/ + Heap = CONTAINING_RECORD(MmHeapBoundaries.Flink, + BL_HEAP_BOUNDARIES, + ListEntry); + + /* Check if we have a page free above the heap */ + HeapLimit = Heap->HeapLimit + PAGE_SIZE; + if (HeapLimit <= Heap->HeapHigh) + { + EarlyPrint(L"TODO\n"); + return STATUS_INSUFFICIENT_RESOURCES; + } + } + + /* We do not -- allocate one */ + Status = MmPapAllocatePagesInRange((PULONG)&HeapBase, + BlLoaderHeap, + AlignedSize >> PAGE_SHIFT, + HapAllocationAttributes, + 0, + NULL, + 0); + if (!NT_SUCCESS(Status)) + { + return Status; + } + + /* Set the heap bottom, limit, and top */ + NewHeap = (PBL_HEAP_BOUNDARIES)HeapBase->Buffer; + NewHeap->HeapBottom = (ULONG_PTR)HeapBase; + NewHeap->HeapLimit = (ULONG_PTR)HeapBase + AlignedSize; + NewHeap->HeapTop = (PBL_BUSY_HEAP_ENTRY)(NewHeap + 1); + + /* Set the buffer links */ + HeapBase->BufferPrevious.P = NULL; + HeapBase->BufferNext.P = NewHeap->HeapTop; + + /* Set the buffer at the top of the heap and mark it as being free */ + NewHeap->HeapTop->BufferPrevious.P = HeapBase; + NewHeap->HeapTop->BufferNext.P = NewHeap->HeapTop; + NewHeap->HeapTop->BufferNext.BufferFree = 1; + NewHeap->HeapTop->BufferNext.BufferOnHeap = 1; + + /* Is this the first heap ever? */ + if (IsListEmpty(&MmHeapBoundaries)) + { + /* We will host the free list at the top of the heap */ + MmFreeList = (PBL_FREE_HEAP_ENTRY*)((ULONG_PTR)NewHeap->HeapLimit - sizeof(BL_HEAP_BOUNDARIES)); + NewHeap->HeapLimit = (ULONG_PTR)MmFreeList; + RtlZeroMemory(MmFreeList, 8 * sizeof(PBL_FREE_HEAP_ENTRY)); + } + + /* Remove a page on top */ + HeapLimit = NewHeap->HeapLimit; + NewHeap->HeapHigh = NewHeap->HeapLimit; + NewHeap->HeapLimit -= PAGE_SIZE; + + /* Add us into the heap list */ + InsertTailList(&MmHeapBoundaries, &NewHeap->ListEntry); + return STATUS_SUCCESS; +} NTSTATUS MmHaInitialize ( @@ -21,5 +162,27 @@ _In_ ULONG HeapAttributes ) { - return STATUS_NOT_IMPLEMENTED; + NTSTATUS Status; + + /* No free list to begin with */ + MmFreeList = NULL; + + /* Configure the minimum heap size and allocation attributes */ + HapMinimumHeapSize = ALIGN_UP_BY(HeapSize, PAGE_SIZE); + HapAllocationAttributes = HeapAttributes & 0x20000; + + /* Initialize the heap boundary list */ + InitializeListHead(&MmHeapBoundaries); + + /* Initialize a heap big enough to handle a one pointer long allocation */ + Status = MmHapHeapAllocatorExtend(sizeof(PVOID)); + if (NT_SUCCESS(Status)) + { + /* The heap is ready! */ + HapInitializationStatus = 1; + Status = STATUS_SUCCESS; + } + + /* Return initialization status */ + return Status; } Modified: trunk/reactos/boot/environ/lib/mm/i386/mmx86.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/lib/mm/i386/m…
============================================================================== --- trunk/reactos/boot/environ/lib/mm/i386/mmx86.c [iso-8859-1] (original) +++ trunk/reactos/boot/environ/lib/mm/i386/mmx86.c [iso-8859-1] Sun Sep 6 16:41:43 2015 @@ -12,15 +12,92 @@ /* DATA VARIABLES ************************************************************/ +ULONG_PTR MmArchKsegBase; +ULONG_PTR MmArchKsegBias; +ULONG MmArchLargePageSize; +BL_ADDRESS_RANGE MmArchKsegAddressRange; +ULONG_PTR MmArchTopOfApplicationAddressSpace; +ULONG_PTR Mmx86SelfMapBase; + +typedef VOID +(*PBL_MM_FLUSH_TLB) ( + VOID + ); + +typedef VOID +(*PBL_MM_RELOCATE_SELF_MAP) ( + VOID + ); + +PBL_MM_RELOCATE_SELF_MAP BlMmRelocateSelfMap; +PBL_MM_FLUSH_TLB BlMmFlushTlb; + /* FUNCTIONS *****************************************************************/ + +VOID +MmArchNullFunction ( + VOID + ) +{ + /* Nothing to do */ + return; +} NTSTATUS MmArchInitialize ( _In_ ULONG Phase, _In_ PBL_MEMORY_DATA MemoryData, _In_ BL_TRANSLATION_TYPE TranslationType, - _In_ BL_TRANSLATION_TYPE LibraryTranslationType + _In_ BL_TRANSLATION_TYPE RequestedTranslationType ) { - return STATUS_NOT_IMPLEMENTED; + NTSTATUS Status; + + /* For phase 2, just map deferred regions */ + if (Phase != 1) + { + //return Mmx86pMapMemoryRegions(2, MemoryData); + return STATUS_NOT_IMPLEMENTED; + } + + /* What translation type are we switching to? */ + switch (RequestedTranslationType) + { + /* Physical memory */ + case BlNone: + + /* Initialize everything to default/null values */ + MmArchLargePageSize = 1; + MmArchKsegBase = 0; + MmArchKsegBias = 0; + MmArchKsegAddressRange.Minimum = 0; + MmArchKsegAddressRange.Maximum = (ULONGLONG)~0; + MmArchTopOfApplicationAddressSpace = 0; + Mmx86SelfMapBase = 0; + + /* Set stub functions */ + BlMmRelocateSelfMap = MmArchNullFunction; + BlMmFlushTlb = MmArchNullFunction; + + /* Set success */ + Status = STATUS_SUCCESS; + break; + + case BlVirtual: + + Status = STATUS_NOT_IMPLEMENTED; + break; + + case BlPae: + + Status = STATUS_NOT_SUPPORTED; + break; + + default: + Status = STATUS_INVALID_PARAMETER; + break; + } + + return Status; + } Modified: trunk/reactos/boot/environ/lib/mm/mm.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/lib/mm/mm.c?r…
============================================================================== --- trunk/reactos/boot/environ/lib/mm/mm.c [iso-8859-1] (original) +++ trunk/reactos/boot/environ/lib/mm/mm.c [iso-8859-1] Sun Sep 6 16:41:43 2015 @@ -22,9 +22,16 @@ VOID ) { + /* Nothing to track if we're using physical memory */ + if (MmTranslationType == BlNone) + { + return STATUS_SUCCESS; + } + + /* TODO */ + EarlyPrint(L"Required for protected mode\n"); return STATUS_NOT_IMPLEMENTED; } - NTSTATUS BlMmRemoveBadMemory ( Modified: trunk/reactos/boot/environ/lib/mm/pagealloc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/lib/mm/pageal…
============================================================================== --- trunk/reactos/boot/environ/lib/mm/pagealloc.c [iso-8859-1] (original) +++ trunk/reactos/boot/environ/lib/mm/pagealloc.c [iso-8859-1] Sun Sep 6 16:41:43 2015 @@ -43,6 +43,20 @@ } NTSTATUS +MmPapAllocatePagesInRange ( + _Inout_ PULONG PhysicalAddress, + _In_ BL_MEMORY_TYPE MemoryType, + _In_ ULONGLONG Pages, + _In_ ULONG Attributes, + _In_ ULONG Alignment, + _In_opt_ PBL_ADDRESS_RANGE Range, + _In_ ULONG Type + ) +{ + return STATUS_NOT_IMPLEMENTED; +} + +NTSTATUS MmPaInitialize ( __in PBL_MEMORY_DATA BootMemoryData, __in ULONG MinimumAllocationCount @@ -75,6 +89,7 @@ BL_MM_FLAG_REQUEST_COALESCING); if (NT_SUCCESS(Status)) { +#if 0 PLIST_ENTRY listHead, nextEntry; /* Loop the NT firmware memory list */ @@ -93,6 +108,7 @@ nextEntry = nextEntry->Flink; } +#endif /* * Because BL supports cross x86-x64 application launches and a LIST_ENTRY @@ -148,6 +164,7 @@ if (NT_SUCCESS(Status)) { /* The Page Allocator has initialized */ + EarlyPrint(L"Page Allocator initialized\n"); PapInitializationStatus = TRUE; Status = STATUS_SUCCESS; }
9 years, 3 months
1
0
0
0
[akhaldi] 69058: [CONFIGURE] First step towards introducing a way to compile ReactOS without invoking CMake twice. NFC. CORE-10121
by akhaldi@svn.reactos.org
Author: akhaldi Date: Sun Sep 6 16:17:26 2015 New Revision: 69058 URL:
http://svn.reactos.org/svn/reactos?rev=69058&view=rev
Log: [CONFIGURE] First step towards introducing a way to compile ReactOS without invoking CMake twice. NFC. CORE-10121 Modified: trunk/reactos/configure.cmd Modified: trunk/reactos/configure.cmd URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/configure.cmd?rev=69058&r1…
============================================================================== --- trunk/reactos/configure.cmd [iso-8859-1] (original) +++ trunk/reactos/configure.cmd [iso-8859-1] Sun Sep 6 16:17:26 2015 @@ -15,6 +15,7 @@ echo Syntax: path\to\source\configure.cmd [script-options] [Cmake-options] echo Available script-options: Codeblocks, Eclipse, Makefiles, clang, VSSolution, RTC echo Cmake-options: -DVARIABLE:TYPE=VALUE + endlocal exit /b ) @@ -27,7 +28,8 @@ :: Configure host tools for x86 cmake -G %3 -DARCH:STRING=i386 %~dp0 - exit + endlocal + exit /b ) :: Get the source root directory @@ -59,6 +61,7 @@ cl 2>&1 | find "19.00." > NUL && set VS_VERSION=14 if not defined VS_VERSION ( echo Error: Visual Studio version too old or version detection failed. + endlocal exit /b ) set BUILD_ENVIRONMENT=VS @@ -67,18 +70,24 @@ echo Detected Visual Studio Environment !BUILD_ENVIRONMENT!!VS_VERSION!-!ARCH! ) else ( echo Error: Unable to detect build environment. Configure script failure. + endlocal exit /b ) :: Checkpoint if not defined ARCH ( echo Unknown build architecture - exit /b -) + endlocal + exit /b +) + +set NEW_STYLE_BUILD=0 :: Parse command line parameters :repeat - if "%BUILD_ENVIRONMENT%" == "MinGW" ( + if /I "%1%" == "-DNEW_STYLE_BUILD" ( + set NEW_STYLE_BUILD=%2 + ) else if "%BUILD_ENVIRONMENT%" == "MinGW" ( if /I "%1" == "Codeblocks" ( set CMAKE_GENERATOR="CodeBlocks - MinGW Makefiles" ) else if /I "%1" == "Eclipse" ( @@ -168,47 +177,65 @@ cd %REACTOS_OUTPUT_PATH% ) -if not exist host-tools ( - mkdir host-tools -) -if not exist reactos ( - mkdir reactos -) - -echo Preparing host tools... -cd host-tools +if "%NEW_STYLE_BUILD%"=="0" ( + + if not exist host-tools ( + mkdir host-tools + ) + + if not exist reactos ( + mkdir reactos + ) + + echo Preparing host tools... + cd host-tools + if EXIST CMakeCache.txt ( + del CMakeCache.txt /q + ) + + set REACTOS_BUILD_TOOLS_DIR=!CD! + + :: Use x86 for ARM host tools + if "%ARCH%" == "arm" ( + :: Launch new script instance for x86 host tools configuration + start "Preparing host tools for ARM cross build..." /I /B /WAIT %~dp0configure.cmd arm_hosttools "%VSINSTALLDIR%VC\vcvarsall.bat" %CMAKE_GENERATOR_HOST% + ) else ( + cmake -G %CMAKE_GENERATOR% -DARCH:STRING=%ARCH% "%REACTOS_SOURCE_DIR%" + ) + + cd.. + +) + +echo Preparing reactos... + +if "%NEW_STYLE_BUILD%"=="0" ( + cd reactos +) + if EXIST CMakeCache.txt ( del CMakeCache.txt /q ) -set REACTOS_BUILD_TOOLS_DIR=%CD% - -:: Use x86 for ARM host tools -if "%ARCH%" == "arm" ( - :: Launch new script instance for x86 host tools configuration - start "Preparing host tools for ARM cross build..." /I /B /WAIT %~dp0configure.cmd arm_hosttools "%VSINSTALLDIR%VC\vcvarsall.bat" %CMAKE_GENERATOR_HOST% + +if "%NEW_STYLE_BUILD%"=="0" ( + set BUILD_TOOLS_FLAG=-DREACTOS_BUILD_TOOLS_DIR:PATH="%REACTOS_BUILD_TOOLS_DIR%" +) + +if "%BUILD_ENVIRONMENT%" == "MinGW" ( + cmake -G %CMAKE_GENERATOR% -DENABLE_CCACHE:BOOL=0 -DCMAKE_TOOLCHAIN_FILE:FILEPATH=%MINGW_TOOCHAIN_FILE% -DARCH:STRING=%ARCH% %BUILD_TOOLS_FLAG% %* "%REACTOS_SOURCE_DIR%" ) else ( - cmake -G %CMAKE_GENERATOR% -DARCH:STRING=%ARCH% "%REACTOS_SOURCE_DIR%" -) - -cd.. - -echo Preparing reactos... -cd reactos -if EXIST CMakeCache.txt ( - del CMakeCache.txt /q -) - -if "%BUILD_ENVIRONMENT%" == "MinGW" ( - cmake -G %CMAKE_GENERATOR% -DENABLE_CCACHE:BOOL=0 -DCMAKE_TOOLCHAIN_FILE:FILEPATH=%MINGW_TOOCHAIN_FILE% -DARCH:STRING=%ARCH% -DREACTOS_BUILD_TOOLS_DIR:PATH="%REACTOS_BUILD_TOOLS_DIR%" %* "%REACTOS_SOURCE_DIR%" -) else ( - cmake -G %CMAKE_GENERATOR% -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-msvc.cmake -DARCH:STRING=%ARCH% -DREACTOS_BUILD_TOOLS_DIR:PATH="%REACTOS_BUILD_TOOLS_DIR%" -DRUNTIME_CHECKS:BOOL=%VS_RUNTIME_CHECKS% %* "%REACTOS_SOURCE_DIR%" -) - -cd.. - -echo Configure script complete^^! Enter directories and execute appropriate build commands (ex: ninja, make, nmake, etc...). + cmake -G %CMAKE_GENERATOR% -DCMAKE_TOOLCHAIN_FILE:FILEPATH=toolchain-msvc.cmake -DARCH:STRING=%ARCH% %BUILD_TOOLS_FLAG% -DRUNTIME_CHECKS:BOOL=%VS_RUNTIME_CHECKS% %* "%REACTOS_SOURCE_DIR%" +) + +if "%NEW_STYLE_BUILD%"=="0" ( + cd.. +) + +echo Configure script complete^^! Execute appropriate build commands (ex: ninja, make, nmake, etc...). +endlocal exit /b :cmake_notfound echo Unable to find cmake, if it is installed, check your PATH variable. +endlocal exit /b
9 years, 3 months
1
0
0
0
[ion] 69057: [BOOTMGFW] - Start implementing MmMdRemoveRegionFromMdlEx. The 3 cases are detected and print right now.
by ion@svn.reactos.org
Author: ion Date: Sun Sep 6 15:44:56 2015 New Revision: 69057 URL:
http://svn.reactos.org/svn/reactos?rev=69057&view=rev
Log: [BOOTMGFW] - Start implementing MmMdRemoveRegionFromMdlEx. The 3 cases are detected and print right now. Modified: trunk/reactos/boot/environ/lib/bootlib.c trunk/reactos/boot/environ/lib/mm/descriptor.c trunk/reactos/boot/environ/lib/mm/pagealloc.c Modified: trunk/reactos/boot/environ/lib/bootlib.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/lib/bootlib.c…
============================================================================== --- trunk/reactos/boot/environ/lib/bootlib.c [iso-8859-1] (original) +++ trunk/reactos/boot/environ/lib/bootlib.c [iso-8859-1] Sun Sep 6 15:44:56 2015 @@ -37,7 +37,7 @@ g_SystemTable->ConOut->OutputString(g_SystemTable->ConOut, L"\r"); g_SystemTable->ConOut->OutputString(g_SystemTable->ConOut, buffer); - g_SystemTable->BootServices->Stall(1000000); + g_SystemTable->BootServices->Stall(200000); va_end(args); } Modified: trunk/reactos/boot/environ/lib/mm/descriptor.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/lib/mm/descri…
============================================================================== --- trunk/reactos/boot/environ/lib/mm/descriptor.c [iso-8859-1] (original) +++ trunk/reactos/boot/environ/lib/mm/descriptor.c [iso-8859-1] Sun Sep 6 15:44:56 2015 @@ -476,6 +476,14 @@ } } +typedef enum _BL_MEMORY_DESCRIPTOR_TYPE +{ + BlMdPhysical, + BlMdVirtual, +} BL_MEMORY_DESCRIPTOR_TYPE; + +#define BL_MM_REMOVE_VIRTUAL_REGION_FLAG 0x80000000 + NTSTATUS MmMdRemoveRegionFromMdlEx ( __in PBL_MEMORY_DESCRIPTOR_LIST MdList, @@ -485,7 +493,118 @@ __in PBL_MEMORY_DESCRIPTOR_LIST NewMdList ) { - return STATUS_NOT_IMPLEMENTED; + BOOLEAN HaveNewList, UseVirtualPage; + NTSTATUS Status; + PLIST_ENTRY ListHead, NextEntry; + PBL_MEMORY_DESCRIPTOR Descriptor; + BL_MEMORY_DESCRIPTOR NewDescriptor; + ULONGLONG FoundBasePage, FoundEndPage, FoundPageCount, EndPage; + + /* Check if removed descriptors should go into a new list */ + if (NewMdList != NULL) + { + /* Initialize it */ + MmMdInitializeListHead(NewMdList); + NewMdList->Type = MdList->Type; + + /* Remember for later */ + HaveNewList = TRUE; + } + else + { + /* For later */ + HaveNewList = FALSE; + } + + /* Is the region being removed physical? */ + UseVirtualPage = FALSE; + if (!(Flags & BL_MM_REMOVE_VIRTUAL_REGION_FLAG)) + { + /* Is this a list of virtual descriptors? */ + if (MdList->Type == BlMdVirtual) + { + /* Request is nonsensical, fail */ + Status = STATUS_INVALID_PARAMETER; + goto Quickie; + } + } + else + { + /* Is this a list of physical descriptors? */ + if (MdList->Type == BlMdPhysical) + { + /* We'll have to use the virtual page instead */ + UseVirtualPage = TRUE; + } + } + + /* Loop the list*/ + ListHead = MdList->First; + NextEntry = ListHead->Flink; + while (NextEntry != ListHead) + { + /* Get the descriptor */ + Descriptor = CONTAINING_RECORD(NextEntry, BL_MEMORY_DESCRIPTOR, ListEntry); + + /* Extract range details */ + FoundBasePage = UseVirtualPage ? Descriptor->VirtualPage : Descriptor->BasePage; + FoundPageCount = Descriptor->PageCount; + FoundEndPage = FoundBasePage + FoundPageCount; + EndPage = PageCount + BasePage; + EarlyPrint(L"Looking for Region 0x%08I64X-0x%08I64X in 0x%08I64X-0x%08I64X\n", BasePage, EndPage, FoundBasePage, FoundEndPage); + + /* Make a copy of the original descriptor */ + RtlCopyMemory(&NewDescriptor, NextEntry, sizeof(NewDescriptor)); + + /* Check if the region to be removed starts after the found region starts */ + if ((BasePage > FoundBasePage) || (FoundBasePage >= EndPage)) + { + /* Check if the region ends after the found region */ + if ((BasePage >= FoundEndPage) || (FoundEndPage > EndPage)) + { + /* Check if the found region starts after the region or ends before the region */ + if ((FoundBasePage >= BasePage) || (EndPage >= FoundEndPage)) + { + /* This descriptor doesn't cover any part of the range */ + EarlyPrint(L"No part of this descriptor contains the region\n"); + } + else + { + /* This descriptor covers the head of the allocation */ + EarlyPrint(L"Descriptor covers the head of the region\n"); + } + } + else + { + /* This descriptor contains the entire allocation */ + EarlyPrint(L"Descriptor contains the entire region\n"); + } + } + else + { + /* This descriptor covers the end of the allocation */ + EarlyPrint(L"Descriptor covers the end of the region\n"); + } + + /* Keep going */ + NextEntry = NextEntry->Flink; + } + +Quickie: + /* Check for failure cleanup */ + if (!NT_SUCCESS(Status)) + { + /* Did we have to build a new list? */ + if (HaveNewList) + { + /* Free and re-initialize it */ + MmMdFreeList(NewMdList); + MmMdInitializeListHead(NewMdList); + NewMdList->Type = MdList->Type; + } + } + + return Status; } VOID Modified: trunk/reactos/boot/environ/lib/mm/pagealloc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/lib/mm/pageal…
============================================================================== --- trunk/reactos/boot/environ/lib/mm/pagealloc.c [iso-8859-1] (original) +++ trunk/reactos/boot/environ/lib/mm/pagealloc.c [iso-8859-1] Sun Sep 6 15:44:56 2015 @@ -85,7 +85,7 @@ { Descriptor = CONTAINING_RECORD(nextEntry, BL_MEMORY_DESCRIPTOR, ListEntry); - EarlyPrint(L"Type: %lX Flags: %lX Start: 0x%I64X End: 0x%I64X\n", + EarlyPrint(L"Type: %08lX Flags: %08lX Base: 0x%016I64X End: 0x%016I64X\n", Descriptor->Type, Descriptor->Flags, Descriptor->BasePage << PAGE_SHIFT,
9 years, 3 months
1
0
0
0
[ion] 69056: [BOOTMGFW]: - Implement algorithm to detect if truncation is needed, which should only happen on IA64 systems I believe (otherwise, the OS and firmware should have the same alignment/p...
by ion@svn.reactos.org
Author: ion Date: Sun Sep 6 15:02:49 2015 New Revision: 69056 URL:
http://svn.reactos.org/svn/reactos?rev=69056&view=rev
Log: [BOOTMGFW]: - Implement algorithm to detect if truncation is needed, which should only happen on IA64 systems I believe (otherwise, the OS and firmware should have the same alignment/page size requirements) - Implement algorithm to detect if coalescing is needed. This shouldn't happen with firmware memory yet, but might happen once we start carving out stuff. Modified: trunk/reactos/boot/environ/include/bl.h trunk/reactos/boot/environ/lib/mm/descriptor.c trunk/reactos/boot/environ/lib/mm/pagealloc.c Modified: trunk/reactos/boot/environ/include/bl.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/include/bl.h?…
============================================================================== --- trunk/reactos/boot/environ/include/bl.h [iso-8859-1] (original) +++ trunk/reactos/boot/environ/include/bl.h [iso-8859-1] Sun Sep 6 15:02:49 2015 @@ -545,6 +545,15 @@ _In_ ULONG Flags ); +NTSTATUS +MmMdRemoveRegionFromMdlEx ( + __in PBL_MEMORY_DESCRIPTOR_LIST MdList, + __in ULONG Flags, + __in ULONGLONG BasePage, + __in ULONGLONG PageCount, + __in PBL_MEMORY_DESCRIPTOR_LIST NewMdList + ); + extern ULONG MmDescriptorCallTreeCount; extern ULONG BlpApplicationFlags; extern BL_LIBRARY_PARAMETERS BlpLibraryParameters; Modified: trunk/reactos/boot/environ/lib/mm/descriptor.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/lib/mm/descri…
============================================================================== --- trunk/reactos/boot/environ/lib/mm/descriptor.c [iso-8859-1] (original) +++ trunk/reactos/boot/environ/lib/mm/descriptor.c [iso-8859-1] Sun Sep 6 15:02:49 2015 @@ -268,6 +268,100 @@ return MemoryDescriptor; } +BOOLEAN +MmMdpTruncateDescriptor ( + __in PBL_MEMORY_DESCRIPTOR_LIST MdList, + __in PBL_MEMORY_DESCRIPTOR MemoryDescriptor, + __in ULONG Flags + ) +{ + PBL_MEMORY_DESCRIPTOR NextDescriptor, PreviousDescriptor; + PLIST_ENTRY NextEntry, PreviousEntry; + ULONGLONG EndPage, PreviousEndPage;// , NextEndPage; + + /* Get the next descriptor */ + NextEntry = MemoryDescriptor->ListEntry.Flink; + NextDescriptor = CONTAINING_RECORD(NextEntry, BL_MEMORY_DESCRIPTOR, ListEntry); + + /* Get the previous descriptor */ + PreviousEntry = MemoryDescriptor->ListEntry.Blink; + PreviousDescriptor = CONTAINING_RECORD(PreviousEntry, BL_MEMORY_DESCRIPTOR, ListEntry); + + /* Calculate end pages */ + EndPage = MemoryDescriptor->BasePage + MemoryDescriptor->PageCount; + //NextEndPage = NextDescriptor->BasePage + NextDescriptor->PageCount; + PreviousEndPage = PreviousDescriptor->BasePage + PreviousDescriptor->PageCount; + + /* Check for backward overlap */ + if ((PreviousEntry != MdList->First) && (MemoryDescriptor->BasePage < PreviousEndPage)) + { + EarlyPrint(L"Overlap detected -- this is unexpected on x86/x64 platforms\n"); + } + + /* Check for forward overlap */ + if ((NextEntry != MdList->First) && (NextDescriptor->BasePage < EndPage)) + { + EarlyPrint(L"Overlap detected -- this is unexpected on x86/x64 platforms\n"); + } + + /* Nothing to do */ + return FALSE; +} + +BOOLEAN +MmMdpCoalesceDescriptor ( + __in PBL_MEMORY_DESCRIPTOR_LIST MdList, + __in PBL_MEMORY_DESCRIPTOR MemoryDescriptor, + __in ULONG Flags + ) +{ + PBL_MEMORY_DESCRIPTOR NextDescriptor, PreviousDescriptor; + PLIST_ENTRY NextEntry, PreviousEntry; + ULONGLONG EndPage, PreviousEndPage, PreviousMappedEndPage, MappedEndPage; + + /* Get the next descriptor */ + NextEntry = MemoryDescriptor->ListEntry.Flink; + NextDescriptor = CONTAINING_RECORD(NextEntry, BL_MEMORY_DESCRIPTOR, ListEntry); + + /* Get the previous descriptor */ + PreviousEntry = MemoryDescriptor->ListEntry.Blink; + PreviousDescriptor = CONTAINING_RECORD(PreviousEntry, BL_MEMORY_DESCRIPTOR, ListEntry); + + /* Calculate end pages */ + EndPage = MemoryDescriptor->BasePage + MemoryDescriptor->PageCount; + MappedEndPage = MemoryDescriptor->BasePage + MemoryDescriptor->PageCount; + PreviousMappedEndPage = PreviousDescriptor->VirtualPage + PreviousDescriptor->PageCount; + PreviousEndPage = PreviousDescriptor->BasePage + PreviousDescriptor->PageCount; + PreviousMappedEndPage = PreviousDescriptor->VirtualPage + PreviousDescriptor->PageCount; + + /* Check if the previous entry touches the current entry, and is compatible */ + if ((PreviousEntry != MdList->First) && + (PreviousDescriptor->Type == MemoryDescriptor->Type) && + ((PreviousDescriptor->Flags ^ MemoryDescriptor->Flags) & 0x1B19FFFF) && + (PreviousEndPage == MemoryDescriptor->BasePage) && + ((!(MemoryDescriptor->VirtualPage) && !(PreviousDescriptor->VirtualPage)) || + ((MemoryDescriptor->VirtualPage) && (PreviousDescriptor->VirtualPage) && + (PreviousMappedEndPage == MemoryDescriptor->VirtualPage)))) + { + EarlyPrint(L"Previous descriptor coalescible!\n"); + } + + /* CHeck if the current entry touches the next entry, and is compatible */ + if ((NextEntry != MdList->First) && + (NextDescriptor->Type == MemoryDescriptor->Type) && + ((NextDescriptor->Flags ^ MemoryDescriptor->Flags) & 0x1B19FFFF) && + (EndPage == NextDescriptor->BasePage) && + ((!(MemoryDescriptor->VirtualPage) && !(PreviousDescriptor->VirtualPage)) || + ((MemoryDescriptor->VirtualPage) && (PreviousDescriptor->VirtualPage) && + (MappedEndPage == NextDescriptor->VirtualPage)))) + { + EarlyPrint(L"Next descriptor coalescible!\n"); + } + + /* Nothing to do */ + return FALSE; +} + NTSTATUS MmMdAddDescriptorToList ( _In_ PBL_MEMORY_DESCRIPTOR_LIST MdList, @@ -340,24 +434,20 @@ if (Flags & BL_MM_ADD_DESCRIPTOR_TRUNCATE_FLAG) { /* Do it and then exit */ -#if 0 - if (MmMdpTruncateDescriptor(MdList, Flags)) + if (MmMdpTruncateDescriptor(MdList, MemoryDescriptor, Flags)) { return STATUS_SUCCESS; } -#endif } /* Do we have to coalesce? */ if (Flags & BL_MM_ADD_DESCRIPTOR_COALESCE_FLAG) { /* Do it and then exit */ -#if 0 - if (MmMdpCoalesceDescriptor(MdList)) + if (MmMdpCoalesceDescriptor(MdList, MemoryDescriptor, Flags)) { return STATUS_SUCCESS; } -#endif } /* Do we have to update the current pointer? */ @@ -386,6 +476,17 @@ } } +NTSTATUS +MmMdRemoveRegionFromMdlEx ( + __in PBL_MEMORY_DESCRIPTOR_LIST MdList, + __in ULONG Flags, + __in ULONGLONG BasePage, + __in ULONGLONG PageCount, + __in PBL_MEMORY_DESCRIPTOR_LIST NewMdList + ) +{ + return STATUS_NOT_IMPLEMENTED; +} VOID MmMdInitialize ( Modified: trunk/reactos/boot/environ/lib/mm/pagealloc.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/environ/lib/mm/pageal…
============================================================================== --- trunk/reactos/boot/environ/lib/mm/pagealloc.c [iso-8859-1] (original) +++ trunk/reactos/boot/environ/lib/mm/pagealloc.c [iso-8859-1] Sun Sep 6 15:02:49 2015 @@ -50,7 +50,7 @@ { NTSTATUS Status; ULONG ExistingDescriptors, FinalOffset; - PBL_MEMORY_DESCRIPTOR Descriptor; + PBL_MEMORY_DESCRIPTOR Descriptor, NewDescriptor; /* Initialize physical allocator variables */ PapMaximumPhysicalPage = 0xFFFFFFFFFFFFF; @@ -109,9 +109,38 @@ ExistingDescriptors = BootMemoryData->DescriptorCount; while (ExistingDescriptors != 0) { - EarlyPrint(L"Existing migration of memory not supported\n"); - Status = STATUS_NOT_IMPLEMENTED; - break; + /* Remove this region from our free memory MDL */ + Status = MmMdRemoveRegionFromMdlEx(&MmMdlUnmappedUnallocated, + 0x40000000, + Descriptor->BasePage, + Descriptor->PageCount, + NULL); + if (!NT_SUCCESS(Status)) + { + return STATUS_INVALID_PARAMETER; + } + + /* Build a descriptor for it */ + NewDescriptor = MmMdInitByteGranularDescriptor(Descriptor->Flags, + Descriptor->Type, + Descriptor->BasePage, + Descriptor->VirtualPage, + Descriptor->PageCount); + if (!NewDescriptor) + { + return STATUS_NO_MEMORY; + } + + /* And add this region to the reserved & allocated MDL */ + Status = MmMdAddDescriptorToList(&MmMdlReservedAllocated, NewDescriptor, 0); + if (!NT_SUCCESS(Status)) + { + return Status; + } + + /* Move on to the next descriptor */ + ExistingDescriptors--; + Descriptor = (PBL_MEMORY_DESCRIPTOR)((ULONG_PTR)Descriptor + BootMemoryData->DescriptorSize); } /* We are done, so check for any RAM constraints which will make us truncate memory */
9 years, 3 months
1
0
0
0
[tfaber] 69055: [NDIS] - Better stub power IRP handling. Failing IRP_MN_SET_POWER is illegal! CORE-10117
by tfaber@svn.reactos.org
Author: tfaber Date: Sun Sep 6 14:35:20 2015 New Revision: 69055 URL:
http://svn.reactos.org/svn/reactos?rev=69055&view=rev
Log: [NDIS] - Better stub power IRP handling. Failing IRP_MN_SET_POWER is illegal! CORE-10117 Modified: trunk/reactos/drivers/network/ndis/ndis/miniport.c Modified: trunk/reactos/drivers/network/ndis/ndis/miniport.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/network/ndis/ndis/…
============================================================================== --- trunk/reactos/drivers/network/ndis/ndis/miniport.c [iso-8859-1] (original) +++ trunk/reactos/drivers/network/ndis/ndis/miniport.c [iso-8859-1] Sun Sep 6 14:35:20 2015 @@ -2400,6 +2400,19 @@ NTSTATUS NTAPI +NdisIPower( + _In_ PDEVICE_OBJECT DeviceObject, + _In_ PIRP Irp) +{ + PLOGICAL_ADAPTER Adapter = DeviceObject->DeviceExtension; + + PoStartNextPowerIrp(Irp); + IoSkipCurrentIrpStackLocation(Irp); + return PoCallDriver(Adapter->NdisMiniportBlock.NextDeviceObject, Irp); +} + +NTSTATUS +NTAPI NdisIAddDevice( IN PDRIVER_OBJECT DriverObject, IN PDEVICE_OBJECT PhysicalDeviceObject) @@ -2580,6 +2593,12 @@ { return NdisIDeviceIoControl(DeviceObject, Irp); } + else if (IrpSp->MajorFunction == IRP_MJ_POWER) + { + return NdisIPower(DeviceObject, Irp); + } + NDIS_DbgPrint(MIN_TRACE, ("Unexpected IRP MajorFunction 0x%x\n", IrpSp->MajorFunction)); + ASSERT(FALSE); } else if (DeviceObject->DeviceType == FILE_DEVICE_NETWORK) {
9 years, 3 months
1
0
0
0
[tfaber] 69054: [KBDCLASS][MOUCLASS] - Forward power IRPs to lower devices. Failing IRP_MN_SET_POWER is illegal! CORE-10117
by tfaber@svn.reactos.org
Author: tfaber Date: Sun Sep 6 14:32:22 2015 New Revision: 69054 URL:
http://svn.reactos.org/svn/reactos?rev=69054&view=rev
Log: [KBDCLASS][MOUCLASS] - Forward power IRPs to lower devices. Failing IRP_MN_SET_POWER is illegal! CORE-10117 Modified: trunk/reactos/drivers/input/kbdclass/kbdclass.c trunk/reactos/drivers/input/mouclass/mouclass.c Modified: trunk/reactos/drivers/input/kbdclass/kbdclass.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/input/kbdclass/kbd…
============================================================================== --- trunk/reactos/drivers/input/kbdclass/kbdclass.c [iso-8859-1] (original) +++ trunk/reactos/drivers/input/kbdclass/kbdclass.c [iso-8859-1] Sun Sep 6 14:32:22 2015 @@ -193,15 +193,18 @@ IN PIRP Irp) { NTSTATUS Status = STATUS_NOT_SUPPORTED; - - if (!((PCOMMON_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsClassDO) + PPORT_DEVICE_EXTENSION DeviceExtension; + + DeviceExtension = DeviceObject->DeviceExtension; + if (!DeviceExtension->Common.IsClassDO) { /* Forward some IRPs to lower device */ switch (IoGetCurrentIrpStackLocation(Irp)->MajorFunction) { - case IRP_MJ_PNP: - case IRP_MJ_INTERNAL_DEVICE_CONTROL: - return ForwardIrpAndForget(DeviceObject, Irp); + case IRP_MJ_POWER: + PoStartNextPowerIrp(Irp); + IoSkipCurrentIrpStackLocation(Irp); + return PoCallDriver(DeviceExtension->LowerDevice, Irp); default: { ERR_(CLASS_NAME, "Port DO stub for major function 0x%lx\n", Modified: trunk/reactos/drivers/input/mouclass/mouclass.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/input/mouclass/mou…
============================================================================== --- trunk/reactos/drivers/input/mouclass/mouclass.c [iso-8859-1] (original) +++ trunk/reactos/drivers/input/mouclass/mouclass.c [iso-8859-1] Sun Sep 6 14:32:22 2015 @@ -170,15 +170,18 @@ IN PIRP Irp) { NTSTATUS Status = STATUS_NOT_SUPPORTED; - - if (!((PCOMMON_DEVICE_EXTENSION)DeviceObject->DeviceExtension)->IsClassDO) + PPORT_DEVICE_EXTENSION DeviceExtension; + + DeviceExtension = DeviceObject->DeviceExtension; + if (!DeviceExtension->Common.IsClassDO) { /* Forward some IRPs to lower device */ switch (IoGetCurrentIrpStackLocation(Irp)->MajorFunction) { - case IRP_MJ_PNP: - case IRP_MJ_INTERNAL_DEVICE_CONTROL: - return ForwardIrpAndForget(DeviceObject, Irp); + case IRP_MJ_POWER: + PoStartNextPowerIrp(Irp); + IoSkipCurrentIrpStackLocation(Irp); + return PoCallDriver(DeviceExtension->LowerDevice, Irp); default: { ERR_(CLASS_NAME, "Port DO stub for major function 0x%lx\n",
9 years, 3 months
1
0
0
0
[tfaber] 69053: [VIDEOPRT] - Correctly stub power IRP handling. Fixes IRP leaks on shutdown. - Correctly stub IntVideoPortDispatchSystemControl to avoid IRP leak. CORE-10117 CORE-10105
by tfaber@svn.reactos.org
Author: tfaber Date: Sun Sep 6 10:45:37 2015 New Revision: 69053 URL:
http://svn.reactos.org/svn/reactos?rev=69053&view=rev
Log: [VIDEOPRT] - Correctly stub power IRP handling. Fixes IRP leaks on shutdown. - Correctly stub IntVideoPortDispatchSystemControl to avoid IRP leak. CORE-10117 CORE-10105 Modified: trunk/reactos/win32ss/drivers/videoprt/dispatch.c Modified: trunk/reactos/win32ss/drivers/videoprt/dispatch.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/win32ss/drivers/videoprt/d…
============================================================================== --- trunk/reactos/win32ss/drivers/videoprt/dispatch.c [iso-8859-1] (original) +++ trunk/reactos/win32ss/drivers/videoprt/dispatch.c [iso-8859-1] Sun Sep 6 10:45:37 2015 @@ -834,7 +834,32 @@ IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { - return STATUS_NOT_IMPLEMENTED; + PIO_STACK_LOCATION IrpSp; + NTSTATUS Status = Irp->IoStatus.Status; + PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension = DeviceObject->DeviceExtension; + + IrpSp = IoGetCurrentIrpStackLocation(Irp); + + if (DeviceExtension->Common.Fdo) + { + PoStartNextPowerIrp(Irp); + IoSkipCurrentIrpStackLocation(Irp); + return PoCallDriver(DeviceExtension->NextDeviceObject, Irp); + } + else + { + switch (IrpSp->MinorFunction) + { + case IRP_MN_QUERY_POWER: + case IRP_MN_SET_POWER: + Status = STATUS_SUCCESS; + break; + } + PoStartNextPowerIrp(Irp); + Irp->IoStatus.Status = Status; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return Status; + } } NTSTATUS @@ -843,7 +868,20 @@ IN PDEVICE_OBJECT DeviceObject, IN PIRP Irp) { - return STATUS_NOT_IMPLEMENTED; + NTSTATUS Status; + PVIDEO_PORT_DEVICE_EXTENSION DeviceExtension = DeviceObject->DeviceExtension; + + if (DeviceExtension->Common.Fdo) + { + IoSkipCurrentIrpStackLocation(Irp); + return IoCallDriver(DeviceExtension->NextDeviceObject, Irp); + } + else + { + Status = Irp->IoStatus.Status; + IoCompleteRequest(Irp, IO_NO_INCREMENT); + return Status; + } } VOID
9 years, 3 months
1
0
0
0
[pschweitzer] 69052: [NTOSKRNL] Define & use a tag for FsRtlNotify* memory allocations
by pschweitzer@svn.reactos.org
Author: pschweitzer Date: Sun Sep 6 10:06:59 2015 New Revision: 69052 URL:
http://svn.reactos.org/svn/reactos?rev=69052&view=rev
Log: [NTOSKRNL] Define & use a tag for FsRtlNotify* memory allocations Modified: trunk/reactos/ntoskrnl/fsrtl/notify.c trunk/reactos/ntoskrnl/include/internal/tag.h Modified: trunk/reactos/ntoskrnl/fsrtl/notify.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/fsrtl/notify.c?re…
============================================================================== --- trunk/reactos/ntoskrnl/fsrtl/notify.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/fsrtl/notify.c [iso-8859-1] Sun Sep 6 10:06:59 2015 @@ -166,7 +166,7 @@ if (Buffer == NULL) { PsChargePoolQuota(NotifyChange->OwningProcess, PagedPool, BufferLength); - Buffer = ExAllocatePoolWithTag(PagedPool | POOL_RAISE_IF_ALLOCATION_FAILURE, BufferLength, 'NrSF'); + Buffer = ExAllocatePoolWithTag(PagedPool | POOL_RAISE_IF_ALLOCATION_FAILURE, BufferLength, TAG_FS_NOTIFICATIONS); NotifyChange->AllocatedBuffer = Buffer; } @@ -200,7 +200,7 @@ if (NotifyChange->AllocatedBuffer) { PsReturnProcessPagedPoolQuota(NotifyChange->OwningProcess, NotifyChange->ThisBufferLength); - ExFreePoolWithTag(NotifyChange->AllocatedBuffer, 'NrSF'); + ExFreePoolWithTag(NotifyChange->AllocatedBuffer, TAG_FS_NOTIFICATIONS); } /* In case of full name, remember subject context for later deletion */ @@ -1328,7 +1328,7 @@ PsChargePoolQuota(NotifyChange->OwningProcess, PagedPool, NumberOfBytes); PoolQuotaCharged = TRUE; OutputBuffer = ExAllocatePoolWithTag(PagedPool | POOL_RAISE_IF_ALLOCATION_FAILURE, - NumberOfBytes, 'NrSF'); + NumberOfBytes, TAG_FS_NOTIFICATIONS); NotifyChange->Buffer = OutputBuffer; NotifyChange->AllocatedBuffer = OutputBuffer; } @@ -1371,7 +1371,7 @@ if (NotifyChange->AllocatedBuffer != NULL) { PsReturnProcessPagedPoolQuota(NotifyChange->OwningProcess, NotifyChange->ThisBufferLength); - ExFreePoolWithTag(NotifyChange->AllocatedBuffer, 'NrSF'); + ExFreePoolWithTag(NotifyChange->AllocatedBuffer, TAG_FS_NOTIFICATIONS); } NotifyChange->Buffer = NULL; Modified: trunk/reactos/ntoskrnl/include/internal/tag.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/include/internal/…
============================================================================== --- trunk/reactos/ntoskrnl/include/internal/tag.h [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/include/internal/tag.h [iso-8859-1] Sun Sep 6 10:06:59 2015 @@ -50,6 +50,7 @@ #define TAG_FILE_SYSTEM 'SYSF' #define TAG_FS_CHANGE_NOTIFY 'NCSF' #define IFS_POOL_TAG 'trSF' +#define TAG_FS_NOTIFICATIONS 'NrSF' /* formerly located in io/iocomp.c */ #define IOC_TAG 'TCOI'
9 years, 3 months
1
0
0
0
[tfaber] 69051: [FMIFS] - Remove useless export of InitializeFmIfs. Fixes MSVC warning (LNK4216: Exported entry point _InitializeFmIfs@12)
by tfaber@svn.reactos.org
Author: tfaber Date: Sun Sep 6 09:55:10 2015 New Revision: 69051 URL:
http://svn.reactos.org/svn/reactos?rev=69051&view=rev
Log: [FMIFS] - Remove useless export of InitializeFmIfs. Fixes MSVC warning (LNK4216: Exported entry point _InitializeFmIfs@12) Modified: trunk/reactos/dll/win32/fmifs/fmifs.spec Modified: trunk/reactos/dll/win32/fmifs/fmifs.spec URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/dll/win32/fmifs/fmifs.spec…
============================================================================== --- trunk/reactos/dll/win32/fmifs/fmifs.spec [iso-8859-1] (original) +++ trunk/reactos/dll/win32/fmifs/fmifs.spec [iso-8859-1] Sun Sep 6 09:55:10 2015 @@ -7,7 +7,6 @@ @ stdcall Format(wstr ptr wstr wstr long ptr) @ stdcall FormatEx(wstr ptr wstr wstr long long ptr) @ stub FormatEx2 -@ stdcall InitializeFmIfs(ptr long ptr) @ stdcall QueryAvailableFileSystemFormat(long wstr str str ptr) @ stub QueryDeviceInformation @ stub QueryDeviceInformationByHandle
9 years, 3 months
1
0
0
0
← Newer
1
...
34
35
36
37
38
39
40
...
54
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Results per page:
10
25
50
100
200