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 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
18 participants
278 discussions
Start a n
N
ew thread
[akhaldi] 48690: [CMAKE] - Improve gendib build. - Add gendib generated source files. - Add win32k to build. Dedicated to Timo ; )
by akhaldi@svn.reactos.org
Author: akhaldi Date: Fri Sep 3 00:03:00 2010 New Revision: 48690 URL:
http://svn.reactos.org/svn/reactos?rev=48690&view=rev
Log: [CMAKE] - Improve gendib build. - Add gendib generated source files. - Add win32k to build. Dedicated to Timo ;) Added: branches/cmake-bringup/drivers/video/font/ftfd/libftfd.a (with props) branches/cmake-bringup/subsystems/CMakeLists.txt (with props) branches/cmake-bringup/subsystems/win32/CMakeLists.txt (with props) branches/cmake-bringup/subsystems/win32/win32k/CMakeLists.txt (with props) branches/cmake-bringup/subsystems/win32/win32k/win32k_i386.def (with props) Modified: branches/cmake-bringup/CMakeLists.txt branches/cmake-bringup/tools/gendib/CMakeLists.txt Modified: branches/cmake-bringup/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/CMakeLists.txt?re…
============================================================================== --- branches/cmake-bringup/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/CMakeLists.txt [iso-8859-1] Fri Sep 3 00:03:00 2010 @@ -26,7 +26,7 @@ add_subdirectory(tools) add_subdirectory(lib) -export(TARGETS widl winebuild nci buildno FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- ) +export(TARGETS widl winebuild nci buildno gendib FILE ${CMAKE_BINARY_DIR}/ImportExecutables.cmake NAMESPACE native- ) else() @@ -108,48 +108,61 @@ add_subdirectory(hal) add_subdirectory(lib) add_subdirectory(ntoskrnl) +add_subdirectory(subsystems) # nci generated intermediate files set(nci_output - ${REACTOS_BINARY_DIR}/ntoskrnl/include/internal/napi.h - ${REACTOS_BINARY_DIR}/subsystems/win32/win32k/include/napi.h - ${REACTOS_BINARY_DIR}/lib/ntdllsys/ntdll.S - ${REACTOS_BINARY_DIR}/ntoskrnl/ex/zw.S - ${REACTOS_BINARY_DIR}/lib/win32ksys/win32k.S - ${REACTOS_BINARY_DIR}/dll/ntdll/def/ntsys.pspec -) + ${REACTOS_BINARY_DIR}/ntoskrnl/include/internal/napi.h + ${REACTOS_BINARY_DIR}/subsystems/win32/win32k/include/napi.h + ${REACTOS_BINARY_DIR}/lib/ntdllsys/ntdll.S + ${REACTOS_BINARY_DIR}/ntoskrnl/ex/zw.S + ${REACTOS_BINARY_DIR}/lib/win32ksys/win32k.S + ${REACTOS_BINARY_DIR}/dll/ntdll/def/ntsys.pspec) -# stupid nci tool can't create folders itself, se we're gonna create them for it set(nci_folders - ${CMAKE_CURRENT_BINARY_DIR}/dll/ntdll/def - ${CMAKE_CURRENT_BINARY_DIR}/lib/ntdllsys/ntdll - ${CMAKE_CURRENT_BINARY_DIR}/lib/win32ksys - ${CMAKE_CURRENT_BINARY_DIR}/ntoskrnl/include/internal - ${CMAKE_CURRENT_BINARY_DIR}/ntoskrnl/ex - ${CMAKE_CURRENT_BINARY_DIR}/subsystems/win32/win32k/include -) + ${CMAKE_CURRENT_BINARY_DIR}/dll/ntdll/def + ${CMAKE_CURRENT_BINARY_DIR}/lib/ntdllsys/ntdll + ${CMAKE_CURRENT_BINARY_DIR}/lib/win32ksys + ${CMAKE_CURRENT_BINARY_DIR}/ntoskrnl/include/internal + ${CMAKE_CURRENT_BINARY_DIR}/ntoskrnl/ex + ${CMAKE_CURRENT_BINARY_DIR}/subsystems/win32/win32k/include) file(MAKE_DIRECTORY ${nci_folders}) -ADD_CUSTOM_COMMAND( - OUTPUT ${nci_output} - COMMAND native-nci -arch ${ARCH} ${REACTOS_SOURCE_DIR}/ntoskrnl/sysfuncs.lst ${REACTOS_SOURCE_DIR}/subsystems/win32/win32k/w32ksvc.db ${nci_output} - DEPENDS native-nci ${nci_folders} -) +add_custom_command( + OUTPUT ${nci_output} + COMMAND native-nci -arch ${ARCH} ${REACTOS_SOURCE_DIR}/ntoskrnl/sysfuncs.lst ${REACTOS_SOURCE_DIR}/subsystems/win32/win32k/w32ksvc.db ${nci_output} + DEPENDS native-nci ${nci_folders}) -ADD_CUSTOM_TARGET(ntdll_S ALL DEPENDS ${REACTOS_BINARY_DIR}/lib/ntdllsys/ntdll.S) -ADD_CUSTOM_TARGET(win32k_S ALL DEPENDS ${REACTOS_BINARY_DIR}/lib/win32ksys/win32k.S) -ADD_CUSTOM_TARGET(ntsys_pspec ALL DEPENDS ${REACTOS_BINARY_DIR}/dll/ntdll/def/ntsys.pspec) -ADD_CUSTOM_TARGET(kernel_napi ALL DEPENDS ${REACTOS_BINARY_DIR}/ntoskrnl/include/internal/napi.h) -ADD_CUSTOM_TARGET(subsystem_napi ALL DEPENDS ${REACTOS_BINARY_DIR}/subsystems/win32/win32k/include/napi.h) -ADD_CUSTOM_TARGET(kernel_zw ALL DEPENDS ${REACTOS_BINARY_DIR}/ntoskrnl/ex/zw.S) +add_custom_target(ntdll_S ALL DEPENDS ${REACTOS_BINARY_DIR}/lib/ntdllsys/ntdll.S) +add_custom_target(win32k_S ALL DEPENDS ${REACTOS_BINARY_DIR}/lib/win32ksys/win32k.S) +add_custom_target(ntsys_pspec ALL DEPENDS ${REACTOS_BINARY_DIR}/dll/ntdll/def/ntsys.pspec) +add_custom_target(kernel_napi ALL DEPENDS ${REACTOS_BINARY_DIR}/ntoskrnl/include/internal/napi.h) +add_custom_target(subsystem_napi ALL DEPENDS ${REACTOS_BINARY_DIR}/subsystems/win32/win32k/include/napi.h) +add_custom_target(kernel_zw ALL DEPENDS ${REACTOS_BINARY_DIR}/ntoskrnl/ex/zw.S) file(MAKE_DIRECTORY ${REACTOS_BINARY_DIR}/include/reactos) -ADD_CUSTOM_COMMAND(OUTPUT ${REACTOS_BINARY_DIR}/include/reactos/buildno.h - COMMAND native-buildno ${REACTOS_BINARY_DIR}/include/reactos/buildno.h - DEPENDS ${REACTOS_SOURCE_DIR}/include/reactos/version.h) -ADD_CUSTOM_TARGET(buildno_header ALL DEPENDS ${REACTOS_BINARY_DIR}/include/reactos/buildno.h) + +add_custom_command( + OUTPUT ${REACTOS_BINARY_DIR}/include/reactos/buildno.h + COMMAND native-buildno ${REACTOS_BINARY_DIR}/include/reactos/buildno.h + DEPENDS ${REACTOS_SOURCE_DIR}/include/reactos/version.h) + +add_custom_target(buildno_header ALL DEPENDS ${REACTOS_BINARY_DIR}/include/reactos/buildno.h) + +file(MAKE_DIRECTORY ${REACTOS_BINARY_DIR}/subsystems/win32/win32k/dib) + +list(APPEND OUTPUT_FILES + ${REACTOS_BINARY_DIR}/subsystems/win32/win32k/dib/dib8gen.c + ${REACTOS_BINARY_DIR}/subsystems/win32/win32k/dib/dib16gen.c + ${REACTOS_BINARY_DIR}/subsystems/win32/win32k/dib/dib32gen.c) + +add_custom_command( + OUTPUT ${OUTPUT_FILES} + COMMAND native-gendib ${REACTOS_BINARY_DIR}/subsystems/win32/win32k/dib + DEPENDS native-gendib) + +add_custom_target(gendib_generated ALL DEPENDS ${OUTPUT_FILES}) endif() - Added: branches/cmake-bringup/drivers/video/font/ftfd/libftfd.a URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/drivers/video/fon…
============================================================================== Binary file - no diff available. Propchange: branches/cmake-bringup/drivers/video/font/ftfd/libftfd.a ------------------------------------------------------------------------------ svn:mime-type = application/octet-stream Added: branches/cmake-bringup/subsystems/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/CMakeL…
============================================================================== --- branches/cmake-bringup/subsystems/CMakeLists.txt (added) +++ branches/cmake-bringup/subsystems/CMakeLists.txt [iso-8859-1] Fri Sep 3 00:03:00 2010 @@ -1,0 +1,2 @@ + +add_subdirectory(win32) Propchange: branches/cmake-bringup/subsystems/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: branches/cmake-bringup/subsystems/win32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
============================================================================== --- branches/cmake-bringup/subsystems/win32/CMakeLists.txt (added) +++ branches/cmake-bringup/subsystems/win32/CMakeLists.txt [iso-8859-1] Fri Sep 3 00:03:00 2010 @@ -1,0 +1,2 @@ + +add_subdirectory(win32k) Propchange: branches/cmake-bringup/subsystems/win32/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: branches/cmake-bringup/subsystems/win32/win32k/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
============================================================================== --- branches/cmake-bringup/subsystems/win32/win32k/CMakeLists.txt (added) +++ branches/cmake-bringup/subsystems/win32/win32k/CMakeLists.txt [iso-8859-1] Fri Sep 3 00:03:00 2010 @@ -1,0 +1,190 @@ + +set(CMAKE_C_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>") + +include_directories(.) +include_directories(include) +include_directories(${REACTOS_SOURCE_DIR}/ntoskrnl/include) +include_directories(${REACTOS_SOURCE_DIR}/lib/3rdparty/freetype/include) +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/subsys) +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/drivers) + +add_definitions(-DLANGPACK) +add_definitions(-D_WIN32K_) + +list(APPEND SOURCE + dib/dib1bpp.c + dib/dib4bpp.c + dib/dib8bpp.c + dib/dib16bpp.c + dib/dib24bpp.c + dib/dib32bpp.c + dib/dib.c + dib/floodfill.c + dib/stretchblt.c + eng/alphablend.c + eng/bitblt.c + eng/engbrush.c + eng/engevent.c + eng/clip.c + eng/copybits.c + eng/debug.c + eng/device.c + eng/driverobj.c + eng/error.c + eng/float.c + eng/gradient.c + eng/lineto.c + eng/mapping.c + eng/mem.c + eng/engmisc.c + eng/mouse.c + eng/paint.c + eng/perfcnt.c + eng/semaphor.c + eng/sort.c + eng/string.c + eng/stretchblt.c + eng/surface.c + eng/transblt.c + eng/engwindow.c + eng/xlate.c + ldr/loader.c + main/dllmain.c + misc/driver.c + misc/err.c + misc/file.c + misc/math.c + misc/rtlstr.c + misc/copy.c + misc/registry.c + misc/usrheap.c + ntddraw/ddraw.c + ntddraw/dd.c + ntddraw/ddsurf.c + ntddraw/d3d.c + ntddraw/dvp.c + ntddraw/mocomp.c + ntddraw/eng.c + ntddraw/dxeng.c + ntuser/accelerator.c + ntuser/callback.c + ntuser/callproc.c + ntuser/caret.c + ntuser/class.c + ntuser/clipboard.c + ntuser/csr.c + ntuser/cursoricon.c + ntuser/defwnd.c + ntuser/desktop.c + ntuser/display.c + ntuser/event.c + ntuser/focus.c + ntuser/guicheck.c + ntuser/hook.c + ntuser/hotkey.c + ntuser/input.c + ntuser/keyboard.c + ntuser/kbdlayout.c + ntuser/menu.c + ntuser/message.c + ntuser/metric.c + ntuser/misc.c + ntuser/monitor.c + ntuser/msgqueue.c + ntuser/ntstubs.c + ntuser/ntuser.c + ntuser/painting.c + ntuser/prop.c + ntuser/scrollbar.c + ntuser/session.c + ntuser/simplecall.c + ntuser/sysparams.c + ntuser/timer.c + ntuser/useratom.c + ntuser/vis.c + ntuser/windc.c + ntuser/window.c + ntuser/winpos.c + ntuser/winsta.c + ntuser/object.c + objects/arc.c + objects/bezier.c + objects/bitblt.c + objects/bitmaps.c + objects/brush.c + objects/cliprgn.c + objects/coord.c + objects/dcattr.c + objects/dclife.c + objects/dcobjs.c + objects/dcstate.c + objects/dcutil.c + objects/device.c + objects/dibobj.c + objects/drawing.c + objects/fillshap.c + objects/font.c + objects/freetype.c + objects/gdibatch.c + objects/gdiobj.c + objects/icm.c + objects/line.c + objects/metafile.c + objects/palette.c + objects/path.c + objects/pen.c + objects/polyfill.c + objects/print.c + objects/rect.c + objects/region.c + objects/stockobj.c + objects/text.c + objects/wingl.c + objects/xformobj.c + stubs/stubs.c + stubs/umpdstubs.c + win32k.rc) + +list(APPEND GENDIB_GENERATED + ${CMAKE_CURRENT_BINARY_DIR}/dib/dib8gen.c + ${CMAKE_CURRENT_BINARY_DIR}/dib/dib16gen.c + ${CMAKE_CURRENT_BINARY_DIR}/dib/dib32gen.c) + +set_source_files_properties(${GENDIB_GENERATED} PROPERTIES GENERATED TRUE) + +list(APPEND SOURCE ${GENDIB_GENERATED}) + +if(ARCH MATCHES i386) +list(APPEND SOURCE + dib/i386/dib24bpp_hline.s + dib/i386/dib32bpp_hline.s + dib/i386/dib32bpp_colorfill.s + eng/i386/floatobj.S + misc/i386/cos_asm.s + misc/i386/sin_asm.s + misc/i386/atan2_asm.s + misc/i386/floor_asm.s + misc/i386/ceil_asm.s) +else() +list(APPEND SOURCE + dib/dib24bppc.c + dib/dib32bppc.c) +endif(ARCH MATCHES i386) + +add_library(win32k SHARED + ${CMAKE_CURRENT_BINARY_DIR}/win32k_pch.h.gch + ${SOURCE}) + +set_target_properties(win32k PROPERTIES LINK_FLAGS "-Wl,-entry,_DriverEntry@8 -Wl,--image-base,0x00010000 -Wl,--subsystem,native" SUFFIX ".sys") + +target_link_libraries(win32k + ${CMAKE_CURRENT_SOURCE_DIR}/win32k_i386.def + pseh + ${REACTOS_SOURCE_DIR}/ntoskrnl/libntoskrnl.a + ${REACTOS_SOURCE_DIR}/hal/halx86/libhal.a + ${REACTOS_SOURCE_DIR}/drivers/video/font/ftfd/libftfd.a + dxguid + libcntpr) + +add_pch(win32k ${CMAKE_CURRENT_SOURCE_DIR}/pch.h ${SOURCE}) +add_dependencies(win32k psdk gendib_generated bugcodes subsystem_napi buildno_header) Propchange: branches/cmake-bringup/subsystems/win32/win32k/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: branches/cmake-bringup/subsystems/win32/win32k/win32k_i386.def URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/subsystems/win32/…
============================================================================== --- branches/cmake-bringup/subsystems/win32/win32k/win32k_i386.def (added) +++ branches/cmake-bringup/subsystems/win32/win32k/win32k_i386.def [iso-8859-1] Fri Sep 3 00:03:00 2010 @@ -1,0 +1,231 @@ +; File generated automatically from obj-i386\subsystems\win32\win32k\win32k_win32k.spec; do not edit! + +LIBRARY win32k.sys + +EXPORTS + FLOATOBJ_AddFloatObj@8=FLOATOBJ_Add@8 @1 + FLOATOBJ_DivFloatObj@8=FLOATOBJ_Div@8 @2 + FLOATOBJ_MulFloatObj@8=FLOATOBJ_Mul@8 @3 + FLOATOBJ_SubFloatObj@8=FLOATOBJ_Sub@8 @4 + BRUSHOBJ_hGetColorTransform@4 @5 + BRUSHOBJ_pvAllocRbrush@8 @6 + BRUSHOBJ_pvGetRbrush@4 @7 + BRUSHOBJ_ulGetBrushColor@4 @8 + CLIPOBJ_bEnum@12 @9 + CLIPOBJ_cEnumStart@20 @10 + CLIPOBJ_ppoGetPath@4 @11 + EngAcquireSemaphore@4 @12 + EngAllocMem@12 @13 + EngAllocPrivateUserMem@12 @14 + EngAllocSectionMem@16 @15 + EngAllocUserMem@8 @16 + EngAlphaBlend@28 @17 + EngAssociateSurface@12 @18 + EngBitBlt@44 @19 + EngBugCheckEx(a)20=NTOSKRNL.KeBugCheckEx @20 + EngCheckAbort@4 @21 + EngClearEvent@4 @22 + EngComputeGlyphSet@12 @23 + EngControlSprites@8 @24 + EngCopyBits@24 @25 + EngCreateBitmap@24 @26 + EngCreateClip@0 @27 + EngCreateDeviceBitmap@16 @28 + EngCreateDeviceSurface@16 @29 + EngCreateDriverObj@12 @30 + EngCreateEvent@4 @31 + EngCreatePalette@24 @32 + EngCreatePath@0 @33 + EngCreateSemaphore@0 @34 + EngCreateWnd@20 @35 + EngDebugBreak(a)0=NTOSKRNL.DbgBreakPoint @36 + EngDebugPrint@12 @37 + EngDeleteClip@4 @38 + EngDeleteDriverObj@12 @39 + EngDeleteEvent@4 @40 + EngDeleteFile@4 @41 + EngDeletePalette@4 @42 + EngDeletePath@4 @43 + EngDeleteSafeSemaphore@4 @44 + EngDeleteSemaphore@4 @45 + EngDeleteSurface@4 @46 + EngDeleteWnd@4 @47 + EngDeviceIoControl@28 @48 + EngDitherColor@16 @49 + EngDxIoctl@12 @50 + EngEnumForms@24 @51 + EngEraseSurface@12 @52 + EngFileIoControl@28 @53 + EngFileWrite@16 @54 + EngFillPath@28 @55 + EngFindImageProcAddress@8 @56 + EngFindResource@16 @57 + EngFntCacheAlloc@8 @58 + EngFntCacheFault@8 @59 + EngFntCacheLookUp@8 @60 + EngFreeMem@4 @61 + EngFreeModule@4 @62 + EngFreePrivateUserMem@8 @63 + EngFreeSectionMem@8 @64 + EngFreeUserMem@4 @65 + EngGetCurrentCodePage@8 @66 + EngGetCurrentProcessId(a)0=NTOSKRNL.PsGetCurrentProcessId @67 + EngGetCurrentThreadId(a)0=NTOSKRNL.PsGetCurrentThreadId @68 + EngGetDriverName@4 @69 + EngGetFileChangeTime@8 @70 + EngGetFilePath@8 @71 + EngGetForm@24 @72 + EngGetLastError@0 @73 + EngGetPrinter@20 @74 + EngGetPrinterData@24 @75 + EngGetPrinterDataFileName@4 @76 + EngGetPrinterDriver@24 @77 + EngGetProcessHandle@0 @78 + EngGetTickCount@0 @79 + EngGetType1FontList@24 @80 + EngGradientFill@40 @81 + EngHangNotification@8 @82 + EngInitializeSafeSemaphore@4 @83 + EngIsSemaphoreOwned@4 @84 + EngIsSemaphoreOwnedByCurrentThread@4 @85 + EngLineTo@36 @86 + EngLoadImage@4 @87 + EngLoadModule@4 @88 + EngLoadModuleForWrite@8 @89 + EngLockDirectDrawSurface@4 @90 + EngLockDriverObj@4 @91 + EngLockSurface@4 @92 + EngLpkInstalled@0 @93 + EngMapEvent@20 @94 + EngMapFile@12 @95 + EngMapFontFile@12 @96 + EngMapFontFileFD@12 @97 + EngMapModule@8 @98 + EngMapSection@16 @99 + EngMarkBandingSurface@4 @100 + EngModifySurface@32 @101 + EngMovePointer@16 @102 + EngMulDiv@12 @103 + EngMultiByteToUnicodeN(a)20=NTOSKRNL.RtlMultiByteToUnicodeN @104 + EngMultiByteToWideChar@20 @105 + EngNineGrid@36 @106 + EngPaint@20 @107 + EngPlgBlt@44 @108 + EngProbeForRead(a)12=NTOSKRNL.ProbeForRead @109 + EngProbeForReadAndWrite(a)12=NTOSKRNL.ProbeForWrite @110 + EngQueryDeviceAttribute@24 @111 + EngQueryFileTimeStamp@4 @112 + EngQueryLocalTime@4 @113 + EngQueryPalette@16 @114 + EngQueryPerformanceCounter@4 @115 + EngQueryPerformanceFrequency@4 @116 + EngQuerySystemAttribute@8 @117 + EngReadStateEvent@4 @118 + EngReleaseSemaphore@4 @119 + EngRestoreFloatingPointState@4 @120 + EngSaveFloatingPointState@8 @121 + EngSecureMem@8 @122 + EngSetEvent@4 @123 + EngSetLastError@4 @124 + EngSetPointerShape@40 @125 + EngSetPointerTag@20 @126 + EngSetPrinterData@20 @127 + EngSort@16 @128 + EngStretchBlt@44 @129 + EngStretchBltROP@52 @130 + EngStrokeAndFillPath@40 @131 + EngStrokePath@32 @132 + EngTextOut@40 @133 + EngTransparentBlt@32 @134 + EngUnicodeToMultiByteN(a)20=NTOSKRNL.RtlUnicodeToMultiByteN @135 + EngUnloadImage@4 @136 + EngUnlockDirectDrawSurface@4 @137 + EngUnlockDriverObj@4 @138 + EngUnlockSurface@4 @139 + EngUnmapEvent@4 @140 + EngUnmapFile@4 @141 + EngUnmapFontFile@4 @142 + EngUnmapFontFileFD@4 @143 + EngUnsecureMem@4 @144 + EngWaitForSingleObject@8 @145 + EngWideCharToMultiByte@20 @146 + EngWritePrinter@16 @147 + FLOATOBJ_Add@8 @148 + FLOATOBJ_AddFloat@8 @149 + FLOATOBJ_AddLong@8 @150 + FLOATOBJ_Div@8 @151 + FLOATOBJ_DivFloat@8 @152 + FLOATOBJ_DivLong@8 @153 + FLOATOBJ_Equal@8 @154 + FLOATOBJ_EqualLong@8 @155 + FLOATOBJ_GetFloat@4 @156 + FLOATOBJ_GetLong@4 @157 + FLOATOBJ_GreaterThan@8 @158 + FLOATOBJ_GreaterThanLong@8 @159 + FLOATOBJ_LessThan@8 @160 + FLOATOBJ_LessThanLong@8 @161 + FLOATOBJ_Mul@8 @162 + FLOATOBJ_MulFloat@8 @163 + FLOATOBJ_MulLong@8 @164 + FLOATOBJ_Neg@4 @165 + FLOATOBJ_SetFloat@8 @166 + FLOATOBJ_SetLong@8 @167 + FLOATOBJ_Sub@8 @168 + FLOATOBJ_SubFloat@8 @169 + FLOATOBJ_SubLong@8 @170 + FONTOBJ_cGetAllGlyphHandles@8 @171 + FONTOBJ_cGetGlyphs@20 @172 + FONTOBJ_pQueryGlyphAttrs@8 @173 + FONTOBJ_pfdg@4 @174 + FONTOBJ_pifi@4 @175 + FONTOBJ_pjOpenTypeTablePointer@12 @176 + FONTOBJ_pvTrueTypeFontFile@8 @177 + FONTOBJ_pwszFontFilePaths@8 @178 + FONTOBJ_pxoGetXform@4 @179 + FONTOBJ_vGetInfo@12 @180 + HT_ComputeRGBGammaTable@24 @181 + HT_Get8BPPFormatPalette@16 @182 + HT_Get8BPPMaskPalette@24 @183 + HeapVidMemAllocAligned@20 @184 + PALOBJ_cGetColors@16 @185 + PATHOBJ_bCloseFigure@4 @186 + PATHOBJ_bEnum@8 @187 + PATHOBJ_bEnumClipLines@12 @188 + PATHOBJ_bMoveTo@12 @189 + PATHOBJ_bPolyBezierTo@12 @190 + PATHOBJ_bPolyLineTo@12 @191 + PATHOBJ_vEnumStart@4 @192 + PATHOBJ_vEnumStartClipLines@16 @193 + PATHOBJ_vGetBounds@8 @194 + RtlAnsiCharToUnicodeChar(a)4=NTOSKRNL.RtlAnsiCharToUnicodeChar @195 + RtlMultiByteToUnicodeN(a)20=NTOSKRNL.RtlMultiByteToUnicodeN @196 + RtlRaiseException(a)4=NTOSKRNL.RtlRaiseException @197 + RtlUnicodeToMultiByteN(a)20=NTOSKRNL.RtlUnicodeToMultiByteN @198 + RtlUnicodeToMultiByteSize(a)12=NTOSKRNL.RtlUnicodeToMultiByteSize @199 + RtlUnwind(a)16=NTOSKRNL.RtlUnwind @200 + RtlUpcaseUnicodeChar(a)4=NTOSKRNL.RtlUpcaseUnicodeChar @201 + RtlUpcaseUnicodeToMultiByteN(a)20=NTOSKRNL.RtlUpcaseUnicodeToMultiByteN @202 + STROBJ_bEnum@12 @203 + STROBJ_bEnumPositionsOnly@12 @204 + STROBJ_bGetAdvanceWidths@16 @205 + STROBJ_dwGetCodePage@4 @206 + STROBJ_fxBreakExtra@4 @207 + STROBJ_fxCharacterExtra@4 @208 + STROBJ_vEnumStart@4 @209 + VidMemFree@8 @210 + WNDOBJ_bEnum@12 @211 + WNDOBJ_cEnumStart@16 @212 + WNDOBJ_vSetConsumer@8 @213 + XFORMOBJ_bApplyXform@20 @214 + XFORMOBJ_iGetFloatObjXform@8 @215 + XFORMOBJ_iGetXform@8 @216 + XLATEOBJ_cGetPalette@16 @217 + XLATEOBJ_hGetColorTransform@4 @218 + XLATEOBJ_iXlate@8 @219 + XLATEOBJ_piVector@4 @220 + _abnormal_termination=NTOSKRNL._abnormal_termination @221 + _except_handler2=NTOSKRNL._except_handler2 @222 + _global_unwind2=NTOSKRNL._global_unwind2 @223 + _itoa=NTOSKRNL._itoa @224 + _itow=NTOSKRNL._itow @225 + _local_unwind2=NTOSKRNL._local_unwind2 @226 Propchange: branches/cmake-bringup/subsystems/win32/win32k/win32k_i386.def ------------------------------------------------------------------------------ svn:eol-style = native Modified: branches/cmake-bringup/tools/gendib/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/tools/gendib/CMak…
============================================================================== --- branches/cmake-bringup/tools/gendib/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/tools/gendib/CMakeLists.txt [iso-8859-1] Fri Sep 3 00:03:00 2010 @@ -1,3 +1,2 @@ -file(GLOB_RECURSE SOURCE "*.c") -add_executable(gendib ${SOURCE}) +add_executable(gendib gendib.c)
14 years, 3 months
1
0
0
0
[akhaldi] 48689: [CMAKE] - Add ftfd driver to build.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Sep 2 22:38:36 2010 New Revision: 48689 URL:
http://svn.reactos.org/svn/reactos?rev=48689&view=rev
Log: [CMAKE] - Add ftfd driver to build. Added: branches/cmake-bringup/drivers/video/CMakeLists.txt (with props) branches/cmake-bringup/drivers/video/font/CMakeLists.txt (with props) branches/cmake-bringup/drivers/video/font/ftfd/CMakeLists.txt (with props) Modified: branches/cmake-bringup/drivers/CMakeLists.txt Modified: branches/cmake-bringup/drivers/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/drivers/CMakeList…
============================================================================== --- branches/cmake-bringup/drivers/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/drivers/CMakeLists.txt [iso-8859-1] Thu Sep 2 22:38:36 2010 @@ -2,3 +2,4 @@ add_subdirectory(base) add_subdirectory(input) add_subdirectory(storage) +add_subdirectory(video) Added: branches/cmake-bringup/drivers/video/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/drivers/video/CMa…
============================================================================== --- branches/cmake-bringup/drivers/video/CMakeLists.txt (added) +++ branches/cmake-bringup/drivers/video/CMakeLists.txt [iso-8859-1] Thu Sep 2 22:38:36 2010 @@ -1,0 +1,2 @@ + +add_subdirectory(font) Propchange: branches/cmake-bringup/drivers/video/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: branches/cmake-bringup/drivers/video/font/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/drivers/video/fon…
============================================================================== --- branches/cmake-bringup/drivers/video/font/CMakeLists.txt (added) +++ branches/cmake-bringup/drivers/video/font/CMakeLists.txt [iso-8859-1] Thu Sep 2 22:38:36 2010 @@ -1,0 +1,2 @@ + +add_subdirectory(ftfd) Propchange: branches/cmake-bringup/drivers/video/font/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native Added: branches/cmake-bringup/drivers/video/font/ftfd/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/drivers/video/fon…
============================================================================== --- branches/cmake-bringup/drivers/video/font/ftfd/CMakeLists.txt (added) +++ branches/cmake-bringup/drivers/video/font/ftfd/CMakeLists.txt [iso-8859-1] Thu Sep 2 22:38:36 2010 @@ -1,0 +1,21 @@ + +set(CMAKE_C_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>") + +include_directories(${REACTOS_SOURCE_DIR}/lib/3rdparty/freetype/include) + +add_library(ftfd SHARED + enable.c + font.c + glyph.c + rosglue.c + sprintf.c) + +set_target_properties(ftfd PROPERTIES LINK_FLAGS "-Wl,-entry,_FtfdEnableDriver@12 -Wl,--subsystem,native") + +target_link_libraries(ftfd + ${CMAKE_CURRENT_SOURCE_DIR}/freetype.def + -lwin32k + freetype + libcntpr) + +add_dependencies(ftfd psdk) Propchange: branches/cmake-bringup/drivers/video/font/ftfd/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native
14 years, 3 months
1
0
0
0
[akhaldi] 48688: [FREELDR] - Use fathelp.S from r43775 (amd64 branch by timo) [CMAKE] - Improve hal, ntoskrnl and freeldr/setupldr build.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Sep 2 21:00:02 2010 New Revision: 48688 URL:
http://svn.reactos.org/svn/reactos?rev=48688&view=rev
Log: [FREELDR] - Use fathelp.S from r43775 (amd64 branch by timo) [CMAKE] - Improve hal, ntoskrnl and freeldr/setupldr build. Modified: branches/cmake-bringup/boot/CMakeLists.txt branches/cmake-bringup/boot/freeldr/freeldr/arch/i386/fathelp.S branches/cmake-bringup/hal/CMakeLists.txt branches/cmake-bringup/ntoskrnl/CMakeLists.txt Modified: branches/cmake-bringup/boot/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/boot/CMakeLists.t…
============================================================================== --- branches/cmake-bringup/boot/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/boot/CMakeLists.txt [iso-8859-1] Thu Sep 2 21:00:02 2010 @@ -154,7 +154,7 @@ list(APPEND SETUPLDR_MAIN_SOURCE freeldr/freeldr/windows/setupldr2.c) endif(ARCH MATCHES i386) -set_source_files_properties(${SETUPLDR_MAIN_SOURCE} PROPERTIES COMPILE_DEFINITIONS "_NTHAL_;FREELDR_REACTOS_SETUP" COMPILE_FLAGS "-ffreestanding -fno-builtin -fno-inline -fno-zero-initialized-in-bss") +set_source_files_properties(${SETUPLDR_MAIN_SOURCE} PROPERTIES COMPILE_FLAGS "-ffreestanding -fno-builtin -fno-inline -fno-zero-initialized-in-bss") set(CMAKE_C_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>") @@ -169,7 +169,7 @@ ${CMAKE_CURRENT_BINARY_DIR}/freeldr_freeldr.h.gch ${FREELDR_SOURCE}) -set_target_properties(freeldr PROPERTIES LINK_FLAGS "-Wl,--strip-all -Wl,-entry,_mainCRTStartup -Wl,--image-base,0x8000 -Wl,--exclude-all-symbols -Wl,--subsystem,native" SUFFIX ".sys") +set_target_properties(freeldr PROPERTIES LINK_FLAGS "-Wl,--strip-all -Wl,-entry,_mainCRTStartup -Wl,--image-base,0x8000 -Wl,--exclude-all-symbols -Wl,--subsystem,native -Wl,--file-alignment,0x1000" SUFFIX ".sys") if(ARCH MATCHES i386) target_link_libraries(freeldr mini_hal) @@ -189,11 +189,9 @@ ${FREELDR_ARCH_SOURCE} ${SETUPLDR_MAIN_SOURCE}) -add_library(setupldr SHARED - ${CMAKE_CURRENT_BINARY_DIR}/freeldr_freeldr.h.gch - ${SETUPLDR_SOURCE}) - -set_target_properties(setupldr PROPERTIES LINK_FLAGS "-Wl,--strip-all -Wl,-entry,_mainCRTStartup -Wl,--image-base,0x8000 -Wl,--exclude-all-symbols -Wl,--subsystem,native" SUFFIX ".sys") +add_library(setupldr SHARED ${SETUPLDR_SOURCE}) + +set_target_properties(setupldr PROPERTIES LINK_FLAGS "-Wl,--strip-all -Wl,-entry,_mainCRTStartup -Wl,--image-base,0x8000 -Wl,--exclude-all-symbols -Wl,--subsystem,native -Wl,--file-alignment,0x1000" SUFFIX ".sys" COMPILE_DEFINITIONS "FREELDR_REACTOS_SETUP") if(ARCH MATCHES i386) target_link_libraries(setupldr mini_hal) @@ -204,4 +202,3 @@ cmlib rtl libcntpr) -add_pch(setupldr ${CMAKE_CURRENT_SOURCE_DIR}/freeldr/freeldr/include/freeldr.h ${SETUPLDR_SOURCE}) Modified: branches/cmake-bringup/boot/freeldr/freeldr/arch/i386/fathelp.S URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/boot/freeldr/free…
============================================================================== --- branches/cmake-bringup/boot/freeldr/freeldr/arch/i386/fathelp.S [iso-8859-1] (original) +++ branches/cmake-bringup/boot/freeldr/freeldr/arch/i386/fathelp.S [iso-8859-1] Thu Sep 2 21:00:02 2010 @@ -1,10 +1,12 @@ -// FATHELP.ASM +// fathelp.S // FAT12/16 Boot Sector Helper Code // Copyright (c) 1998, 2001, 2002, 2003 Brian Palmer - .text - .code16 - .intel_syntax +.intel_syntax noprefix + +.text + +.code16 #define BootSectorStackTop 0x7bf2 #define DataAreaStartHigh 0x2 @@ -16,28 +18,26 @@ #define ReadClusterOffset 0xc #define PutCharsOffset 0xe -#define OEMName 3 -#define BytesPerSector 11 -#define SectsPerCluster 13 -#define ReservedSectors 14 -#define NumberOfFats 16 -#define MaxRootEntries 17 -#define TotalSectors 19 -#define MediaDescriptor 21 -#define SectorsPerFat 22 -#define SectorsPerTrack 24 -#define NumberOfHeads 26 -#define HiddenSectors 28 -#define TotalSectorsBig 32 -#define BootDrive 36 -#define Reserved 37 -#define ExtendSig 38 -#define SerialNumber 39 -#define VolumeLabel 43 -#define FileSystem 54 - -#define BootPartition 0x7dfd - +#define OEMName 3 +#define BytesPerSector 11 +#define SectsPerCluster 13 +#define ReservedSectors 14 +#define NumberOfFats 16 +#define MaxRootEntries 17 +#define TotalSectors 19 +#define MediaDescriptor 21 +#define SectorsPerFat 22 +#define SectorsPerTrack 24 +#define NumberOfHeads 26 +#define HiddenSectors 28 +#define TotalSectorsBig 32 +#define BootDrive 36 +#define Reserved 37 +#define ExtendSig 38 +#define SerialNumber 39 +#define VolumeLabel 43 +#define FileSystem 54 + // This code will be stored in the first 512 bytes // of freeldr.sys. The first 3 bytes will be a jmp @@ -46,12 +46,13 @@ // // This code is loaded at 0000:8000 so we have to // encode a jmp instruction to jump to 0000:8200 - -.globl _mainCRTStartup /* For Mingw32 builds where the linker looks for this symbol */ +//.org 0x8000 + +.global _mainCRTStartup // For Mingw32 builds where the linker looks for this symbol _mainCRTStartup: -.globl start +.global start start: - .byte 0xe9 + .byte 0xe9 .byte 0xfd .byte 0x01 @@ -64,80 +65,80 @@ FatHelperEntryPoint: - push %ax /* First save AX - the start cluster of freeldr.sys */ + push ax // First save AX - the start cluster of freeldr.sys // Display "Loading FreeLoader..." message - mov %esi,msgLoading /* Loading message */ - call [%bp-PutCharsOffset] /* Display it */ + mov esi, offset msgLoading // Loading message + call [bp-PutCharsOffset] // Display it call ReadFatIntoMemory - pop %ax /* Restore AX (start cluster) */ + pop ax // Restore AX (start cluster) // AX has start cluster of freeldr.sys - mov %bx,0x800 - mov %es,%bx + mov bx,0x800 + mov es,bx LoadFile: - push %ax + push ax call IsFat12 - pop %ax + pop ax jnc LoadFile2 - cmp %ax,0xff8 /* Check to see if this is the last cluster in the chain */ + cmp ax,0x0ff8 // Check to see if this is the last cluster in the chain jmp LoadFile3 LoadFile2: - cmp %ax,0xfff8 + cmp ax,0x0fff8 LoadFile3: - jae LoadFile_Done /* If so continue, if not then read then next one */ - push %ax - xor %bx,%bx /* Load ROSLDR starting at 0000:8000h */ - push %es - call [%bp-ReadClusterOffset] - pop %es - - xor %bx,%bx - mov %bl,BYTE [%bp+SectsPerCluster] - shl %bx,5 /* BX = BX * 512 / 16 */ - mov %ax,%es /* Increment the load address by */ - add %ax,%bx /* The size of a cluster */ - mov %es,%ax + jae LoadFile_Done // If so continue, if not then read then next one + push ax + xor bx,bx // Load ROSLDR starting at 0000:8000h + push es + call [bp-ReadClusterOffset] + pop es + + xor bx,bx + mov bl, [bp+SectsPerCluster] + shl bx,5 // BX = BX * 512 / 16 + mov ax,es // Increment the load address by + add ax,bx // The size of a cluster + mov es,ax call IsFat12 - pop %ax - push %es + pop ax + push es jnc LoadFile4 - call GetFatEntry12 /* Get the next entry */ + call GetFatEntry12 // Get the next entry jmp LoadFile5 LoadFile4: call GetFatEntry16 LoadFile5: - pop %es - - jmp LoadFile /* Load the next cluster (if any) */ + pop es + + jmp LoadFile // Load the next cluster (if any) LoadFile_Done: - mov %dl,BYTE [%bp+BootDrive] /* Load the boot drive into DL */ - mov %dh,[BootPartition] /* Load the boot partition into DH */ - - push 0 /* push segment (0x0000) */ - mov %bx, [0x80A8] /* load the RVA of the EntryPoint into eax */ - add %bx, 0x8000 /* RVA -> VA and skip 3 bytes (jump to fathelper code) */ - push %bx /* push offset */ - retf /* Transfer control to FreeLoader */ + mov dl, [bp+BootDrive] // Load the boot drive into DL + mov dh, BootPartition // Load the boot partition into DH + push word ptr 0x0000 + push word ptr 0x8000 // We will do a far return to 0000:8000h + +// retf // Transfer control to ROSLDR + .byte 0xcb // == retf + // Reads the entire FAT into memory at 7000:0000 ReadFatIntoMemory: - mov %ax,WORD [%bp+HiddenSectors] - mov %dx,WORD [%bp+HiddenSectors+2] - add %ax,WORD [%bp+ReservedSectors] - adc %dx,0 - mov %cx,WORD [%bp+SectorsPerFat] - mov %bx,0x7000 - mov %es,%bx - xor %bx,%bx - call [%bp-ReadSectorsOffset] + mov ax, [bp+HiddenSectors] + mov dx, [bp+HiddenSectors+2] + add ax, [bp+ReservedSectors] + adc dx, 0 + mov cx, [bp+SectorsPerFat] + mov bx,0x7000 + mov es,bx + xor bx,bx + call [bp-ReadSectorsOffset] ret @@ -146,15 +147,15 @@ // On return AX has FAT entry for that cluster GetFatEntry16: - mov %cx,2 /* AX = AX * 2 (since FAT16 entries are 2 bytes) */ - mul %cx - shl %dx,12 - - mov %bx,0x7000 - add %bx,%dx - mov %es,%bx - mov %bx,%ax /* Restore FAT entry offset */ - es mov %ax,WORD [%bx] /* Get FAT entry */ + mov cx,2 // AX = AX * 2 (since FAT16 entries are 2 bytes) + mul cx + shl dx,12 + + mov bx,0x7000 + add bx,dx + mov es,bx + mov bx,ax // Restore FAT entry offset + mov ax, es:[bx] // Get FAT entry ret @@ -164,24 +165,24 @@ // On return AX has FAT entry for that cluster GetFatEntry12: - push %ax - mov %cx,%ax - shr %ax,1 - add %ax,%cx /* AX = AX * 1.5 (AX = AX + (AX / 2)) (since FAT12 entries are 12 bits) */ - - mov %bx,0x7000 - mov %es,%bx - mov %bx,%ax /* Put FAT entry offset into BX */ - es mov %ax,WORD [%bx] /* Get FAT entry */ - pop %cx /* Get cluster number from stack */ - and %cx,1 + push ax + mov cx,ax + shr ax,1 + add ax,cx // AX = AX * 1.5 (AX = AX + (AX / 2)) (since FAT12 entries are 12 bits) + + mov bx,0x7000 + mov es,bx + mov bx,ax // Put FAT entry offset into BX + mov ax, es:[bx] // Get FAT entry + pop cx // Get cluster number from stack + and cx,1 jz UseLow12Bits - and %ax,0xfff0 - shr %ax,4 + and ax,0x0fff0 + shr ax,4 jmp GetFatEntry12_Done UseLow12Bits: - and %ax,0x0fff + and ax,0x0fff GetFatEntry12_Done: @@ -192,31 +193,30 @@ // Otherwise CF = 0 for FAT16 IsFat12: - mov %ebx,DWORD [%bp-DataAreaStartLow] + mov ebx, [bp-DataAreaStartLow] // EBX now has the number of the starting sector of the data area // starting from the beginning of the disk, so subtrace hidden sectors - sub %ebx,DWORD [%bp+HiddenSectors] - - - xor %eax,%eax - mov %ax,WORD [%bp+TotalSectors] - cmp %ax,0 + sub ebx, [bp+HiddenSectors] + + + xor eax,eax + mov ax, [bp+TotalSectors] + cmp ax, 0 jnz IsFat12_2 - mov %eax,DWORD [%bp+TotalSectorsBig] + mov eax, [bp+TotalSectorsBig] // EAX now contains the number of sectors on the volume IsFat12_2: - sub %eax,%ebx /* Subtract data area start sector */ - xor %edx,%edx /* from total sectors of volume */ + sub eax,ebx // Subtract data area start sector + xor edx,edx // from total sectors of volume // EDX:EAX now contains the number of data sectors on the volume - xor %ebx,%ebx - mov %bl,BYTE [%bp+SectsPerCluster] - div %ebx + movzx ebx, byte ptr [bp+SectsPerCluster] + div ebx // EAX now has the number of clusters on the volume stc - cmp %eax,4085 + cmp eax,4085 jb IsFat12_Done clc @@ -226,8 +226,14 @@ msgLoading: - .asciz "Loading FreeLoader...\r\n" - - .org 0x1fe -blockend: - .word 0x0aa55 /* BootSector signature */ + .ascii "Loading FreeLoader..." + .byte 0x0d,0x0a,0 + +// times 510-($-$$) db 0 // Pad to 510 bytes +.org 0x1fe + .word 0x0aa55 // BootSector signature + + +// pseudo adresses +//.org 0x7dfd +BootPartition: Modified: branches/cmake-bringup/hal/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/hal/CMakeLists.tx…
============================================================================== --- branches/cmake-bringup/hal/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/hal/CMakeLists.txt [iso-8859-1] Thu Sep 2 21:00:02 2010 @@ -28,10 +28,6 @@ halx86/generic/i386/systimer.S halx86/generic/i386/trap.S) -add_library(hal_generic ${HAL_GENERIC_SOURCE} ${CMAKE_CURRENT_BINARY_DIR}/hal_generic_hal.h.gch) -add_pch(hal_generic ${CMAKE_CURRENT_SOURCE_DIR}/halx86/include/hal.h ${HAL_GENERIC_SOURCE}) -add_dependencies(hal_generic psdk bugcodes) - list(APPEND HAL_GENERIC_PCAT_SOURCE halx86/generic/legacy/bus/bushndlr.c halx86/generic/legacy/bus/cmosbus.c @@ -42,28 +38,29 @@ halx86/generic/legacy/bussupp.c halx86/generic/legacy/halpcat.c) -add_library(hal_generic_pcat ${HAL_GENERIC_PCAT_SOURCE}) -add_dependencies(hal_generic_pcat psdk) - list(APPEND HAL_GENERIC_UP_SOURCE halx86/generic/spinlock.c halx86/up/pic.c halx86/up/processor.c) -add_library(hal_generic_up ${HAL_GENERIC_UP_SOURCE}) -add_dependencies(hal_generic_up psdk) - set(CMAKE_C_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>") -add_library(hal SHARED halx86/up/halinit_up.c halx86/up/halup.rc) +list(APPEND HAL_SOURCE + ${CMAKE_CURRENT_BINARY_DIR}/hal_hal.h.gch + ${HAL_GENERIC_SOURCE} + ${HAL_GENERIC_PCAT_SOURCE} + ${HAL_GENERIC_UP_SOURCE} + halx86/up/halinit_up.c + halx86/up/halup.rc) -set_target_properties(hal PROPERTIES LINK_FLAGS "-Wl,-entry,_HalInitSystem@8") +add_library(hal SHARED ${HAL_SOURCE}) +add_pch(hal ${CMAKE_CURRENT_SOURCE_DIR}/halx86/include/hal.h ${HAL_SOURCE}) +add_dependencies(hal psdk bugcodes) + +set_target_properties(hal PROPERTIES LINK_FLAGS "-Wl,-entry,_HalInitSystem@8 -Wl,--image-base,0x00010000 -Wl,--subsystem,native") target_link_libraries(hal ${CMAKE_CURRENT_SOURCE_DIR}/halx86/hal_i386.def - -Wl,--whole-archive hal_generic -Wl,--no-whole-archive - hal_generic_pcat - hal_generic_up ${REACTOS_SOURCE_DIR}/ntoskrnl/libntoskrnl.a libcntpr) @@ -99,7 +96,7 @@ endif(ARCH MATCHES i386) add_library(mini_hal ${MINI_HAL_SOURCE}) -set_property(TARGET mini_hal PROPERTY COMPILE_DEFINITIONS _BLDR_ _MINIHAL_) +set_property(TARGET mini_hal PROPERTY COMPILE_DEFINITIONS "_BLDR_;_MINIHAL_") add_dependencies(mini_hal psdk bugcodes) else() Modified: branches/cmake-bringup/ntoskrnl/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/ntoskrnl/CMakeLis…
============================================================================== --- branches/cmake-bringup/ntoskrnl/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/ntoskrnl/CMakeLists.txt [iso-8859-1] Thu Sep 2 21:00:02 2010 @@ -1,8 +1,8 @@ set(CMAKE_RC_COMPILE_OBJECT "<CMAKE_RC_COMPILER> -i <SOURCE> <CMAKE_C_LINK_FLAGS> <DEFINES> -I${REACTOS_SOURCE_DIR}/include/psdk -I${REACTOS_BINARY_DIR}/include/psdk -I${REACTOS_SOURCE_DIR}/include/ -I${REACTOS_SOURCE_DIR}/include/reactos -I${REACTOS_BINARY_DIR}/include/reactos -I${REACTOS_SOURCE_DIR}/include/reactos/wine -I${REACTOS_SOURCE_DIR}/include/crt -I${REACTOS_SOURCE_DIR}/include/crt/mingw32 -I${REACTOS_SOURCE_DIR} -I${CMAKE_CURRENT_SOURCE_DIR}/include -O coff -o <OBJECT> ") -set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <FLAGS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES> -Wl,-L${REACTOS_BINARY_DIR}/lib/3rdparty/mingw") -set(CMAKE_EXE_LINKER_FLAGS "-nodefaultlibs -nostdlib -Wl,-entry,_KiSystemStartup@4 -Wl,--image-base,0x80800000 -Wl,--kill-at -Wl,-T,${REACTOS_SOURCE_DIR}/global.lds") +set(CMAKE_C_LINK_EXECUTABLE "<CMAKE_C_COMPILER> <FLAGS> <CMAKE_C_LINK_FLAGS> <LINK_FLAGS> <OBJECTS> -o <TARGET> <LINK_LIBRARIES>") +set(CMAKE_EXE_LINKER_FLAGS "-nodefaultlibs -nostdlib -Wl,-entry,_KiSystemStartup@4 -Wl,--image-base,0x80800000 -Wl,--kill-at -Wl,-T,${REACTOS_SOURCE_DIR}/global.lds -Wl,--subsystem,native") add_definitions(-D__NTOSKRNL__) add_definitions(-D_NTOSKRNL_)
14 years, 3 months
1
0
0
0
[akhaldi] 48687: [FREELDR] - Convert fat12/16 boot sector helper code to gas syntax. Brought to you by the Arty. [CMAKE] - Add freeldr and setupldr to build.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Thu Sep 2 17:39:45 2010 New Revision: 48687 URL:
http://svn.reactos.org/svn/reactos?rev=48687&view=rev
Log: [FREELDR] - Convert fat12/16 boot sector helper code to gas syntax. Brought to you by the Arty. [CMAKE] - Add freeldr and setupldr to build. Added: branches/cmake-bringup/boot/freeldr/freeldr/arch/i386/fathelp.S - copied, changed from r48568, branches/cmake-bringup/boot/freeldr/freeldr/arch/i386/fathelp.asm Removed: branches/cmake-bringup/boot/freeldr/freeldr/arch/i386/fathelp.asm Modified: branches/cmake-bringup/boot/CMakeLists.txt Modified: branches/cmake-bringup/boot/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/boot/CMakeLists.t…
============================================================================== --- branches/cmake-bringup/boot/CMakeLists.txt [iso-8859-1] (original) +++ branches/cmake-bringup/boot/CMakeLists.txt [iso-8859-1] Thu Sep 2 17:39:45 2010 @@ -5,3 +5,203 @@ CreateBootSectorTarget(fat ${CMAKE_CURRENT_SOURCE_DIR}/freeldr/bootsect/fat.asm ${CMAKE_CURRENT_BINARY_DIR}/freeldr/bootsect/fat.bin) CreateBootSectorTarget(isoboot ${CMAKE_CURRENT_SOURCE_DIR}/freeldr/bootsect/isoboot.asm ${CMAKE_CURRENT_BINARY_DIR}/freeldr/bootsect/isoboot.bin) CreateBootSectorTarget(isobtrt ${CMAKE_CURRENT_SOURCE_DIR}/freeldr/bootsect/isobtrt.asm ${CMAKE_CURRENT_BINARY_DIR}/freeldr/bootsect/isobtrt.bin) + +include_directories(BEFORE freeldr/freeldr/include) +include_directories(${REACTOS_SOURCE_DIR}/ntoskrnl/include) + +if(ARCH MATCHES i386) +list(APPEND FREELDR_STARTUP_SOURCE + freeldr/freeldr/arch/i386/fathelp.S + freeldr/freeldr/arch/i386/arch.S) +elseif(ARCH MATCHES amd64) +list(APPEND FREELDR_STARTUP_SOURCE + freeldr/freeldr/arch/amd64/fathelp.S + freeldr/freeldr/arch/amd64/arch.S) +endif(ARCH MATCHES i386) + +if(ARCH MATCHES i386) +list(APPEND FREELDR_BASE64K_SOURCE + freeldr/freeldr/arch/i386/boot.S + freeldr/freeldr/arch/i386/drvmap.S + freeldr/freeldr/arch/i386/i386cpu.S + freeldr/freeldr/arch/i386/i386idt.S + freeldr/freeldr/arch/i386/i386pnp.S + freeldr/freeldr/arch/i386/i386trap.S + freeldr/freeldr/arch/i386/int386.S + freeldr/freeldr/arch/i386/linux.S + freeldr/freeldr/arch/i386/mb.S) +elseif(ARCH MATCHES amd64) +list(APPEND FREELDR_BASE64K_SOURCE + freeldr/freeldr/arch/amd64/drvmap.S + freeldr/freeldr/arch/amd64/i386cpu.S + freeldr/freeldr/arch/amd64/i386idt.S + freeldr/freeldr/arch/amd64/i386trap.S + freeldr/freeldr/arch/amd64/mb.S) +endif(ARCH MATCHES i386) + +set_source_files_properties(${FREELDR_BASE64K_SOURCE} PROPERTIES COMPILE_DEFINITIONS "_NTHAL_") + +include_directories(${REACTOS_SOURCE_DIR}/lib/cmlib) + +list(APPEND FREELDR_BASE_SOURCE + freeldr/freeldr/arcemul/mm.c + freeldr/freeldr/arcemul/time.c + freeldr/freeldr/cache/blocklist.c + freeldr/freeldr/cache/cache.c + freeldr/freeldr/comm/rs232.c + freeldr/freeldr/disk/disk.c + freeldr/freeldr/disk/partition.c + freeldr/freeldr/disk/ramdisk.c + freeldr/freeldr/fs/ext2.c + freeldr/freeldr/fs/fat.c + freeldr/freeldr/fs/fs.c + freeldr/freeldr/fs/iso.c + freeldr/freeldr/fs/ntfs.c + freeldr/freeldr/inifile/ini_init.c + freeldr/freeldr/inifile/inifile.c + freeldr/freeldr/inifile/parse.c + freeldr/freeldr/mm/meminit.c + freeldr/freeldr/mm/mm.c + freeldr/freeldr/reactos/registry.c + freeldr/freeldr/reactos/arcname.c + freeldr/freeldr/reactos/archwsup.c + freeldr/freeldr/reactos/binhive.c + freeldr/freeldr/reactos/reactos.c + freeldr/freeldr/reactos/imageldr.c + freeldr/freeldr/rtl/bget.c + freeldr/freeldr/rtl/libsupp.c + freeldr/freeldr/ui/directui.c + freeldr/freeldr/ui/gui.c + freeldr/freeldr/ui/minitui.c + freeldr/freeldr/ui/noui.c + freeldr/freeldr/ui/tui.c + freeldr/freeldr/ui/tuimenu.c + freeldr/freeldr/ui/ui.c + freeldr/freeldr/video/fade.c + freeldr/freeldr/video/palette.c + freeldr/freeldr/video/video.c + freeldr/freeldr/windows/conversion.c + freeldr/freeldr/windows/peloader.c + freeldr/freeldr/windows/winldr.c + freeldr/freeldr/windows/wlmemory.c + freeldr/freeldr/windows/wlregistry.c + freeldr/freeldr/freeldr.c + freeldr/freeldr/debug.c + freeldr/freeldr/version.c + freeldr/freeldr/cmdline.c + freeldr/freeldr/machine.c + freeldr/freeldr/options.c + freeldr/freeldr/linuxboot.c + freeldr/freeldr/oslist.c) + +if(ARCH MATCHES i386) +list(APPEND FREELDR_BASE_SOURCE freeldr/freeldr/disk/scsiport.c) +endif(ARCH MATCHES i386) + +set_source_files_properties(${FREELDR_BASE_SOURCE} PROPERTIES COMPILE_DEFINITIONS "_NTHAL_;_BLDR_;_NTSYSTEM_") + +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/libs) +include_directories(${REACTOS_SOURCE_DIR}/include/reactos/elf) + +if(ARCH MATCHES i386) +list(APPEND FREELDR_ARCH_SOURCE + freeldr/freeldr/arch/i386/_alloca.S + freeldr/freeldr/arch/i386/archmach.c + freeldr/freeldr/arch/i386/custom.c + freeldr/freeldr/arch/i386/drivemap.c + freeldr/freeldr/arch/i386/halstub.c + freeldr/freeldr/arch/i386/hardware.c + freeldr/freeldr/arch/i386/hwacpi.c + freeldr/freeldr/arch/i386/hwapm.c + freeldr/freeldr/arch/i386/hwpci.c + freeldr/freeldr/arch/i386/i386disk.c + freeldr/freeldr/arch/i386/i386rtl.c + freeldr/freeldr/arch/i386/i386vid.c + freeldr/freeldr/arch/i386/loader.c + freeldr/freeldr/arch/i386/machpc.c + freeldr/freeldr/arch/i386/miscboot.c + freeldr/freeldr/arch/i386/ntoskrnl.c + freeldr/freeldr/arch/i386/pccons.c + freeldr/freeldr/arch/i386/pcdisk.c + freeldr/freeldr/arch/i386/pcmem.c + freeldr/freeldr/arch/i386/pcrtc.c + freeldr/freeldr/arch/i386/pcvideo.c + freeldr/freeldr/arch/i386/machxbox.c + freeldr/freeldr/arch/i386/xboxcons.c + freeldr/freeldr/arch/i386/xboxdisk.c + freeldr/freeldr/arch/i386/xboxfont.c + freeldr/freeldr/arch/i386/xboxhw.c + freeldr/freeldr/arch/i386/xboxi2c.c + freeldr/freeldr/arch/i386/xboxmem.c + freeldr/freeldr/arch/i386/xboxrtc.c + freeldr/freeldr/arch/i386/xboxvideo.c + freeldr/freeldr/windows/i386/ntsetup.c + freeldr/freeldr/windows/i386/wlmemory.c) +else() +#TBD +endif(ARCH MATCHES i386) + +set_source_files_properties(${FREELDR_ARCH_SOURCE} PROPERTIES COMPILE_DEFINITIONS "_NTHAL_;_BLDR_;_NTSYSTEM_") + +list(APPEND SETUPLDR_MAIN_SOURCE + freeldr/freeldr/bootmgr.c + freeldr/freeldr/inffile/inffile.c + freeldr/freeldr/reactos/setupldr.c) + +if(ARCH MATCHES i386) +list(APPEND SETUPLDR_MAIN_SOURCE freeldr/freeldr/windows/setupldr2.c) +elseif(ARCH MATCHES amd64) +list(APPEND SETUPLDR_MAIN_SOURCE freeldr/freeldr/windows/setupldr2.c) +endif(ARCH MATCHES i386) + +set_source_files_properties(${SETUPLDR_MAIN_SOURCE} PROPERTIES COMPILE_DEFINITIONS "_NTHAL_;FREELDR_REACTOS_SETUP" COMPILE_FLAGS "-ffreestanding -fno-builtin -fno-inline -fno-zero-initialized-in-bss") + +set(CMAKE_C_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>") + +list(APPEND FREELDR_SOURCE + freeldr/freeldr/bootmgr.c + ${FREELDR_STARTUP_SOURCE} + ${FREELDR_BASE64K_SOURCE} + ${FREELDR_BASE_SOURCE} + ${FREELDR_ARCH_SOURCE}) + +add_library(freeldr SHARED + ${CMAKE_CURRENT_BINARY_DIR}/freeldr_freeldr.h.gch + ${FREELDR_SOURCE}) + +set_target_properties(freeldr PROPERTIES LINK_FLAGS "-Wl,--strip-all -Wl,-entry,_mainCRTStartup -Wl,--image-base,0x8000 -Wl,--exclude-all-symbols -Wl,--subsystem,native" SUFFIX ".sys") + +if(ARCH MATCHES i386) +target_link_libraries(freeldr mini_hal) +endif(ARCH MATCHES i386) + +target_link_libraries(freeldr + rossym + cmlib + rtl + libcntpr) +add_pch(freeldr ${CMAKE_CURRENT_SOURCE_DIR}/freeldr/freeldr/include/freeldr.h ${FREELDR_SOURCE}) + +list(APPEND SETUPLDR_SOURCE + ${FREELDR_STARTUP_SOURCE} + ${FREELDR_BASE64K_SOURCE} + ${FREELDR_BASE_SOURCE} + ${FREELDR_ARCH_SOURCE} + ${SETUPLDR_MAIN_SOURCE}) + +add_library(setupldr SHARED + ${CMAKE_CURRENT_BINARY_DIR}/freeldr_freeldr.h.gch + ${SETUPLDR_SOURCE}) + +set_target_properties(setupldr PROPERTIES LINK_FLAGS "-Wl,--strip-all -Wl,-entry,_mainCRTStartup -Wl,--image-base,0x8000 -Wl,--exclude-all-symbols -Wl,--subsystem,native" SUFFIX ".sys") + +if(ARCH MATCHES i386) +target_link_libraries(setupldr mini_hal) +endif(ARCH MATCHES i386) + +target_link_libraries(setupldr + rossym + cmlib + rtl + libcntpr) +add_pch(setupldr ${CMAKE_CURRENT_SOURCE_DIR}/freeldr/freeldr/include/freeldr.h ${SETUPLDR_SOURCE}) Copied: branches/cmake-bringup/boot/freeldr/freeldr/arch/i386/fathelp.S (from r48568, branches/cmake-bringup/boot/freeldr/freeldr/arch/i386/fathelp.asm) URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/boot/freeldr/free…
============================================================================== --- branches/cmake-bringup/boot/freeldr/freeldr/arch/i386/fathelp.asm [iso-8859-1] (original) +++ branches/cmake-bringup/boot/freeldr/freeldr/arch/i386/fathelp.S [iso-8859-1] Thu Sep 2 17:39:45 2010 @@ -1,226 +1,222 @@ -; FATHELP.ASM -; FAT12/16 Boot Sector Helper Code -; Copyright (c) 1998, 2001, 2002, 2003 Brian Palmer - - - -;org 8000h - -segment .text - -bits 16 - - -BootSectorStackTop equ 0x7bf2 -DataAreaStartHigh equ 0x2 -DataAreaStartLow equ 0x4 -BiosCHSDriveSizeHigh equ 0x6 -BiosCHSDriveSizeLow equ 0x8 -BiosCHSDriveSize equ 0x8 -ReadSectorsOffset equ 0xa -ReadClusterOffset equ 0xc -PutCharsOffset equ 0xe - -OEMName equ 3 -BytesPerSector equ 11 -SectsPerCluster equ 13 -ReservedSectors equ 14 -NumberOfFats equ 16 -MaxRootEntries equ 17 -TotalSectors equ 19 -MediaDescriptor equ 21 -SectorsPerFat equ 22 -SectorsPerTrack equ 24 -NumberOfHeads equ 26 -HiddenSectors equ 28 -TotalSectorsBig equ 32 -BootDrive equ 36 -Reserved equ 37 -ExtendSig equ 38 -SerialNumber equ 39 -VolumeLabel equ 43 -FileSystem equ 54 - -BootPartition equ 0x7dfd +// FATHELP.ASM +// FAT12/16 Boot Sector Helper Code +// Copyright (c) 1998, 2001, 2002, 2003 Brian Palmer + + .text + .code16 + .intel_syntax + +#define BootSectorStackTop 0x7bf2 +#define DataAreaStartHigh 0x2 +#define DataAreaStartLow 0x4 +#define BiosCHSDriveSizeHigh 0x6 +#define BiosCHSDriveSizeLow 0x8 +#define BiosCHSDriveSize 0x8 +#define ReadSectorsOffset 0xa +#define ReadClusterOffset 0xc +#define PutCharsOffset 0xe + +#define OEMName 3 +#define BytesPerSector 11 +#define SectsPerCluster 13 +#define ReservedSectors 14 +#define NumberOfFats 16 +#define MaxRootEntries 17 +#define TotalSectors 19 +#define MediaDescriptor 21 +#define SectorsPerFat 22 +#define SectorsPerTrack 24 +#define NumberOfHeads 26 +#define HiddenSectors 28 +#define TotalSectorsBig 32 +#define BootDrive 36 +#define Reserved 37 +#define ExtendSig 38 +#define SerialNumber 39 +#define VolumeLabel 43 +#define FileSystem 54 + +#define BootPartition 0x7dfd -; This code will be stored in the first 512 bytes -; of freeldr.sys. The first 3 bytes will be a jmp -; instruction to skip past the FAT helper code -; that is stored in the rest of the 512 bytes. -; -; This code is loaded at 0000:8000 so we have to -; encode a jmp instruction to jump to 0000:8200 - -global _mainCRTStartup ; For Mingw32 builds where the linker looks for this symbol +// This code will be stored in the first 512 bytes +// of freeldr.sys. The first 3 bytes will be a jmp +// instruction to skip past the FAT helper code +// that is stored in the rest of the 512 bytes. +// +// This code is loaded at 0000:8000 so we have to +// encode a jmp instruction to jump to 0000:8200 + +.globl _mainCRTStartup /* For Mingw32 builds where the linker looks for this symbol */ _mainCRTStartup: -global start +.globl start start: - db 0xe9 - db 0xfd - db 0x01 - -; Now starts the extra boot code that we will store -; in the first 512 bytes of freeldr.sys. This code -; allows the FAT12/16 bootsector to navigate the -; FAT table so that we can still load freeldr.sys -; even if it is fragmented. + .byte 0xe9 + .byte 0xfd + .byte 0x01 + +// Now starts the extra boot code that we will store +// in the first 512 bytes of freeldr.sys. This code +// allows the FAT12/16 bootsector to navigate the +// FAT table so that we can still load freeldr.sys +// even if it is fragmented. FatHelperEntryPoint: - push ax ; First save AX - the start cluster of freeldr.sys - - - ; Display "Loading FreeLoader..." message - mov esi,msgLoading ; Loading message - call [bp-PutCharsOffset] ; Display it + push %ax /* First save AX - the start cluster of freeldr.sys */ + + + // Display "Loading FreeLoader..." message + mov %esi,msgLoading /* Loading message */ + call [%bp-PutCharsOffset] /* Display it */ call ReadFatIntoMemory - pop ax ; Restore AX (start cluster) - ; AX has start cluster of freeldr.sys - - mov bx,800h - mov es,bx + pop %ax /* Restore AX (start cluster) */ + // AX has start cluster of freeldr.sys + + mov %bx,0x800 + mov %es,%bx LoadFile: - push ax + push %ax call IsFat12 - pop ax + pop %ax jnc LoadFile2 - cmp ax,0ff8h ; Check to see if this is the last cluster in the chain + cmp %ax,0xff8 /* Check to see if this is the last cluster in the chain */ jmp LoadFile3 LoadFile2: - cmp ax,0fff8h + cmp %ax,0xfff8 LoadFile3: - jae LoadFile_Done ; If so continue, if not then read then next one - push ax - xor bx,bx ; Load ROSLDR starting at 0000:8000h - push es - call [bp-ReadClusterOffset] - pop es - - xor bx,bx - mov bl,BYTE [BYTE bp+SectsPerCluster] - shl bx,5 ; BX = BX * 512 / 16 - mov ax,es ; Increment the load address by - add ax,bx ; The size of a cluster - mov es,ax + jae LoadFile_Done /* If so continue, if not then read then next one */ + push %ax + xor %bx,%bx /* Load ROSLDR starting at 0000:8000h */ + push %es + call [%bp-ReadClusterOffset] + pop %es + + xor %bx,%bx + mov %bl,BYTE [%bp+SectsPerCluster] + shl %bx,5 /* BX = BX * 512 / 16 */ + mov %ax,%es /* Increment the load address by */ + add %ax,%bx /* The size of a cluster */ + mov %es,%ax call IsFat12 - pop ax - push es + pop %ax + push %es jnc LoadFile4 - call GetFatEntry12 ; Get the next entry + call GetFatEntry12 /* Get the next entry */ jmp LoadFile5 LoadFile4: call GetFatEntry16 LoadFile5: - pop es - - jmp LoadFile ; Load the next cluster (if any) + pop %es + + jmp LoadFile /* Load the next cluster (if any) */ LoadFile_Done: - mov dl,BYTE [BYTE bp+BootDrive] ; Load the boot drive into DL - mov dh,[BootPartition] ; Load the boot partition into DH - - push 0 ; push segment (0x0000) - mov bx, [0x8000 + 0xA8] ; load the RVA of the EntryPoint into eax - add bx, 0x8000 ; RVA -> VA and skip 3 bytes (jump to fathelper code) - push bx ; push offset - retf ; Transfer control to FreeLoader - -; Reads the entire FAT into memory at 7000:0000 + mov %dl,BYTE [%bp+BootDrive] /* Load the boot drive into DL */ + mov %dh,[BootPartition] /* Load the boot partition into DH */ + + push 0 /* push segment (0x0000) */ + mov %bx, [0x80A8] /* load the RVA of the EntryPoint into eax */ + add %bx, 0x8000 /* RVA -> VA and skip 3 bytes (jump to fathelper code) */ + push %bx /* push offset */ + retf /* Transfer control to FreeLoader */ + +// Reads the entire FAT into memory at 7000:0000 ReadFatIntoMemory: - mov ax,WORD [BYTE bp+HiddenSectors] - mov dx,WORD [BYTE bp+HiddenSectors+2] - add ax,WORD [BYTE bp+ReservedSectors] - adc dx,byte 0 - mov cx,WORD [BYTE bp+SectorsPerFat] - mov bx,7000h - mov es,bx - xor bx,bx - call [bp-ReadSectorsOffset] - ret - - -; Returns the FAT entry for a given cluster number for 16-bit FAT -; On entry AX has cluster number -; On return AX has FAT entry for that cluster + mov %ax,WORD [%bp+HiddenSectors] + mov %dx,WORD [%bp+HiddenSectors+2] + add %ax,WORD [%bp+ReservedSectors] + adc %dx,0 + mov %cx,WORD [%bp+SectorsPerFat] + mov %bx,0x7000 + mov %es,%bx + xor %bx,%bx + call [%bp-ReadSectorsOffset] + ret + + +// Returns the FAT entry for a given cluster number for 16-bit FAT +// On entry AX has cluster number +// On return AX has FAT entry for that cluster GetFatEntry16: - mov cx,2 ; AX = AX * 2 (since FAT16 entries are 2 bytes) - mul cx - shl dx,12 - - mov bx,7000h - add bx,dx - mov es,bx - mov bx,ax ; Restore FAT entry offset - mov ax,WORD [es:bx] ; Get FAT entry - - ret - - -; Returns the FAT entry for a given cluster number for 12-bit FAT -; On entry AX has cluster number -; On return AX has FAT entry for that cluster + mov %cx,2 /* AX = AX * 2 (since FAT16 entries are 2 bytes) */ + mul %cx + shl %dx,12 + + mov %bx,0x7000 + add %bx,%dx + mov %es,%bx + mov %bx,%ax /* Restore FAT entry offset */ + es mov %ax,WORD [%bx] /* Get FAT entry */ + + ret + + +// Returns the FAT entry for a given cluster number for 12-bit FAT +// On entry AX has cluster number +// On return AX has FAT entry for that cluster GetFatEntry12: - push ax - mov cx,ax - shr ax,1 - add ax,cx ; AX = AX * 1.5 (AX = AX + (AX / 2)) (since FAT12 entries are 12 bits) - - mov bx,7000h - mov es,bx - mov bx,ax ; Put FAT entry offset into BX - mov ax,WORD [es:bx] ; Get FAT entry - pop cx ; Get cluster number from stack - and cx,1 + push %ax + mov %cx,%ax + shr %ax,1 + add %ax,%cx /* AX = AX * 1.5 (AX = AX + (AX / 2)) (since FAT12 entries are 12 bits) */ + + mov %bx,0x7000 + mov %es,%bx + mov %bx,%ax /* Put FAT entry offset into BX */ + es mov %ax,WORD [%bx] /* Get FAT entry */ + pop %cx /* Get cluster number from stack */ + and %cx,1 jz UseLow12Bits - and ax,0fff0h - shr ax,4 + and %ax,0xfff0 + shr %ax,4 jmp GetFatEntry12_Done UseLow12Bits: - and ax,0fffh + and %ax,0x0fff GetFatEntry12_Done: ret -; Returns CF = 1 if this is a FAT12 file system -; Otherwise CF = 0 for FAT16 +// Returns CF = 1 if this is a FAT12 file system +// Otherwise CF = 0 for FAT16 IsFat12: - mov ebx,DWORD [BYTE bp-DataAreaStartLow] - ; EBX now has the number of the starting sector of the data area - ; starting from the beginning of the disk, so subtrace hidden sectors - sub ebx,DWORD [BYTE bp+HiddenSectors] - - - xor eax,eax - mov ax,WORD [BYTE bp+TotalSectors] - cmp ax,byte 0 + mov %ebx,DWORD [%bp-DataAreaStartLow] + // EBX now has the number of the starting sector of the data area + // starting from the beginning of the disk, so subtrace hidden sectors + sub %ebx,DWORD [%bp+HiddenSectors] + + + xor %eax,%eax + mov %ax,WORD [%bp+TotalSectors] + cmp %ax,0 jnz IsFat12_2 - mov eax,DWORD [BYTE bp+TotalSectorsBig] - - ; EAX now contains the number of sectors on the volume + mov %eax,DWORD [%bp+TotalSectorsBig] + + // EAX now contains the number of sectors on the volume IsFat12_2: - sub eax,ebx ; Subtract data area start sector - xor edx,edx ; from total sectors of volume - - ; EDX:EAX now contains the number of data sectors on the volume - movzx ebx,BYTE [BYTE bp+SectsPerCluster] - div ebx - ; EAX now has the number of clusters on the volume + sub %eax,%ebx /* Subtract data area start sector */ + xor %edx,%edx /* from total sectors of volume */ + + // EDX:EAX now contains the number of data sectors on the volume + xor %ebx,%ebx + mov %bl,BYTE [%bp+SectsPerCluster] + div %ebx + // EAX now has the number of clusters on the volume stc - cmp eax,4085 + cmp %eax,4085 jb IsFat12_Done clc @@ -229,7 +225,9 @@ -msgLoading db 'Loading FreeLoader...',0dh,0ah,0 - - times 510-($-$$) db 0 ; Pad to 510 bytes - dw 0aa55h ; BootSector signature +msgLoading: + .asciz "Loading FreeLoader...\r\n" + + .org 0x1fe +blockend: + .word 0x0aa55 /* BootSector signature */ Removed: branches/cmake-bringup/boot/freeldr/freeldr/arch/i386/fathelp.asm URL:
http://svn.reactos.org/svn/reactos/branches/cmake-bringup/boot/freeldr/free…
============================================================================== --- branches/cmake-bringup/boot/freeldr/freeldr/arch/i386/fathelp.asm [iso-8859-1] (original) +++ branches/cmake-bringup/boot/freeldr/freeldr/arch/i386/fathelp.asm (removed) @@ -1,235 +1,0 @@ -; FATHELP.ASM -; FAT12/16 Boot Sector Helper Code -; Copyright (c) 1998, 2001, 2002, 2003 Brian Palmer - - - -;org 8000h - -segment .text - -bits 16 - - -BootSectorStackTop equ 0x7bf2 -DataAreaStartHigh equ 0x2 -DataAreaStartLow equ 0x4 -BiosCHSDriveSizeHigh equ 0x6 -BiosCHSDriveSizeLow equ 0x8 -BiosCHSDriveSize equ 0x8 -ReadSectorsOffset equ 0xa -ReadClusterOffset equ 0xc -PutCharsOffset equ 0xe - -OEMName equ 3 -BytesPerSector equ 11 -SectsPerCluster equ 13 -ReservedSectors equ 14 -NumberOfFats equ 16 -MaxRootEntries equ 17 -TotalSectors equ 19 -MediaDescriptor equ 21 -SectorsPerFat equ 22 -SectorsPerTrack equ 24 -NumberOfHeads equ 26 -HiddenSectors equ 28 -TotalSectorsBig equ 32 -BootDrive equ 36 -Reserved equ 37 -ExtendSig equ 38 -SerialNumber equ 39 -VolumeLabel equ 43 -FileSystem equ 54 - -BootPartition equ 0x7dfd - - -; This code will be stored in the first 512 bytes -; of freeldr.sys. The first 3 bytes will be a jmp -; instruction to skip past the FAT helper code -; that is stored in the rest of the 512 bytes. -; -; This code is loaded at 0000:8000 so we have to -; encode a jmp instruction to jump to 0000:8200 - -global _mainCRTStartup ; For Mingw32 builds where the linker looks for this symbol -_mainCRTStartup: -global start -start: - db 0xe9 - db 0xfd - db 0x01 - -; Now starts the extra boot code that we will store -; in the first 512 bytes of freeldr.sys. This code -; allows the FAT12/16 bootsector to navigate the -; FAT table so that we can still load freeldr.sys -; even if it is fragmented. - - -FatHelperEntryPoint: - - push ax ; First save AX - the start cluster of freeldr.sys - - - ; Display "Loading FreeLoader..." message - mov esi,msgLoading ; Loading message - call [bp-PutCharsOffset] ; Display it - - - call ReadFatIntoMemory - - pop ax ; Restore AX (start cluster) - ; AX has start cluster of freeldr.sys - - mov bx,800h - mov es,bx - -LoadFile: - push ax - call IsFat12 - pop ax - jnc LoadFile2 - cmp ax,0ff8h ; Check to see if this is the last cluster in the chain - jmp LoadFile3 -LoadFile2: - cmp ax,0fff8h -LoadFile3: - jae LoadFile_Done ; If so continue, if not then read then next one - push ax - xor bx,bx ; Load ROSLDR starting at 0000:8000h - push es - call [bp-ReadClusterOffset] - pop es - - xor bx,bx - mov bl,BYTE [BYTE bp+SectsPerCluster] - shl bx,5 ; BX = BX * 512 / 16 - mov ax,es ; Increment the load address by - add ax,bx ; The size of a cluster - mov es,ax - - call IsFat12 - pop ax - push es - jnc LoadFile4 - call GetFatEntry12 ; Get the next entry - jmp LoadFile5 -LoadFile4: - call GetFatEntry16 -LoadFile5: - pop es - - jmp LoadFile ; Load the next cluster (if any) - -LoadFile_Done: - mov dl,BYTE [BYTE bp+BootDrive] ; Load the boot drive into DL - mov dh,[BootPartition] ; Load the boot partition into DH - - push 0 ; push segment (0x0000) - mov bx, [0x8000 + 0xA8] ; load the RVA of the EntryPoint into eax - add bx, 0x8000 ; RVA -> VA and skip 3 bytes (jump to fathelper code) - push bx ; push offset - retf ; Transfer control to FreeLoader - -; Reads the entire FAT into memory at 7000:0000 -ReadFatIntoMemory: - mov ax,WORD [BYTE bp+HiddenSectors] - mov dx,WORD [BYTE bp+HiddenSectors+2] - add ax,WORD [BYTE bp+ReservedSectors] - adc dx,byte 0 - mov cx,WORD [BYTE bp+SectorsPerFat] - mov bx,7000h - mov es,bx - xor bx,bx - call [bp-ReadSectorsOffset] - ret - - -; Returns the FAT entry for a given cluster number for 16-bit FAT -; On entry AX has cluster number -; On return AX has FAT entry for that cluster -GetFatEntry16: - - mov cx,2 ; AX = AX * 2 (since FAT16 entries are 2 bytes) - mul cx - shl dx,12 - - mov bx,7000h - add bx,dx - mov es,bx - mov bx,ax ; Restore FAT entry offset - mov ax,WORD [es:bx] ; Get FAT entry - - ret - - -; Returns the FAT entry for a given cluster number for 12-bit FAT -; On entry AX has cluster number -; On return AX has FAT entry for that cluster -GetFatEntry12: - - push ax - mov cx,ax - shr ax,1 - add ax,cx ; AX = AX * 1.5 (AX = AX + (AX / 2)) (since FAT12 entries are 12 bits) - - mov bx,7000h - mov es,bx - mov bx,ax ; Put FAT entry offset into BX - mov ax,WORD [es:bx] ; Get FAT entry - pop cx ; Get cluster number from stack - and cx,1 - jz UseLow12Bits - and ax,0fff0h - shr ax,4 - jmp GetFatEntry12_Done - -UseLow12Bits: - and ax,0fffh - -GetFatEntry12_Done: - - ret - - -; Returns CF = 1 if this is a FAT12 file system -; Otherwise CF = 0 for FAT16 -IsFat12: - - mov ebx,DWORD [BYTE bp-DataAreaStartLow] - ; EBX now has the number of the starting sector of the data area - ; starting from the beginning of the disk, so subtrace hidden sectors - sub ebx,DWORD [BYTE bp+HiddenSectors] - - - xor eax,eax - mov ax,WORD [BYTE bp+TotalSectors] - cmp ax,byte 0 - jnz IsFat12_2 - mov eax,DWORD [BYTE bp+TotalSectorsBig] - - ; EAX now contains the number of sectors on the volume - -IsFat12_2: - sub eax,ebx ; Subtract data area start sector - xor edx,edx ; from total sectors of volume - - ; EDX:EAX now contains the number of data sectors on the volume - movzx ebx,BYTE [BYTE bp+SectsPerCluster] - div ebx - ; EAX now has the number of clusters on the volume - stc - cmp eax,4085 - jb IsFat12_Done - clc - -IsFat12_Done: - ret - - - -msgLoading db 'Loading FreeLoader...',0dh,0ah,0 - - times 510-($-$$) db 0 ; Pad to 510 bytes - dw 0aa55h ; BootSector signature
14 years, 3 months
1
0
0
0
[cgutman] 48686: [OSKITTCP] - Check for a shutdown connection that we missed a few times - Remove some junk and stop playing with flags behind oskit's back - Fix an invalid parameter check - Enable...
by cgutman@svn.reactos.org
Author: cgutman Date: Thu Sep 2 04:18:17 2010 New Revision: 48686 URL:
http://svn.reactos.org/svn/reactos?rev=48686&view=rev
Log: [OSKITTCP] - Check for a shutdown connection that we missed a few times - Remove some junk and stop playing with flags behind oskit's back - Fix an invalid parameter check - Enable a check to ensure that accept doesn't get called for a socket that isn't listening - Use the queue manipulation function instead of manually changing the queue - Signal that we accepted/connected a socket [IP] - Set the network mask and destination address in TCPGetInterfaceData Modified: trunk/reactos/lib/drivers/ip/network/ip.c trunk/reactos/lib/drivers/ip/transport/tcp/if.c trunk/reactos/lib/drivers/oskittcp/oskittcp/interface.c Modified: trunk/reactos/lib/drivers/ip/network/ip.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/network/ip.…
============================================================================== --- trunk/reactos/lib/drivers/ip/network/ip.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/ip/network/ip.c [iso-8859-1] Thu Sep 2 04:18:17 2010 @@ -163,7 +163,7 @@ TcpipInitializeSpinLock(&IF->Lock); IF->TCPContext = ExAllocatePoolWithTag - ( NonPagedPool, sizeof(OSK_IFADDR) + 2 * sizeof( struct sockaddr_in ), + ( NonPagedPool, sizeof(OSK_IFADDR) + 3 * sizeof( struct sockaddr_in ), OSKITTCP_CONTEXT_TAG ); if (!IF->TCPContext) { ExFreePoolWithTag(IF, IP_INTERFACE_TAG); Modified: trunk/reactos/lib/drivers/ip/transport/tcp/if.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/ip/transport/t…
============================================================================== --- trunk/reactos/lib/drivers/ip/transport/tcp/if.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/ip/transport/tcp/if.c [iso-8859-1] Thu Sep 2 04:18:17 2010 @@ -35,19 +35,16 @@ POSK_IFADDR ifaddr = IF->TCPContext; struct sockaddr_in *addr_in; struct sockaddr_in *dstaddr_in; + struct sockaddr_in *netmask_in; ASSERT(ifaddr); - RtlZeroMemory(ifaddr, sizeof(OSK_IFADDR) + 2 * sizeof( struct sockaddr_in )); + RtlZeroMemory(ifaddr, sizeof(OSK_IFADDR) + 3 * sizeof( struct sockaddr_in )); addr_in = (struct sockaddr_in *)&ifaddr[1]; dstaddr_in = (struct sockaddr_in *)&addr_in[1]; + netmask_in = (struct sockaddr_in *)&dstaddr_in[1]; TI_DbgPrint(DEBUG_TCPIF,("Called\n")); - - ifaddr->ifa_dstaddr = (struct sockaddr *)dstaddr_in; - - /* XXX - Point-to-point interfaces not supported yet */ - memset( &ifaddr->ifa_dstaddr, 0, sizeof( struct sockaddr ) ); ifaddr->ifa_addr = (struct sockaddr *)addr_in; Status = GetInterfaceIPv4Address( IF, @@ -56,10 +53,24 @@ ASSERT(NT_SUCCESS(Status)); + ifaddr->ifa_dstaddr = (struct sockaddr *)dstaddr_in; + Status = GetInterfaceIPv4Address(IF, + ADE_POINTOPOINT, + (PULONG)&dstaddr_in->sin_addr.s_addr ); + + ASSERT(NT_SUCCESS(Status)); + + ifaddr->ifa_netmask = (struct sockaddr *)netmask_in; + Status = GetInterfaceIPv4Address(IF, + ADE_ADDRMASK, + (PULONG)&netmask_in->sin_addr.s_addr ); + + ASSERT(NT_SUCCESS(Status)); + TI_DbgPrint(DEBUG_TCPIF,("interface %x : addr %x\n", IF, addr_in->sin_addr.s_addr)); - ifaddr->ifa_flags = 0; /* XXX what goes here? */ + ifaddr->ifa_flags = 0; ifaddr->ifa_refcnt = 0; /* Anachronistic */ ifaddr->ifa_metric = 1; /* We can get it like in ninfo.c, if we want */ ifaddr->ifa_mtu = IF->MTU; Modified: trunk/reactos/lib/drivers/oskittcp/oskittcp/interface.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/oskittcp/oskit…
============================================================================== --- trunk/reactos/lib/drivers/oskittcp/oskittcp/interface.c [iso-8859-1] (original) +++ trunk/reactos/lib/drivers/oskittcp/oskittcp/interface.c [iso-8859-1] Thu Sep 2 04:18:17 2010 @@ -151,6 +151,9 @@ struct iovec iov = { 0 }; int error = 0; int tcp_flags = 0; + + if (!connection) + return OSK_ESHUTDOWN; OS_DbgPrint(OSK_MID_TRACE, ("so->so_state %x\n", ((struct socket *)connection)->so_state)); @@ -218,14 +221,12 @@ struct sockaddr addr; OS_DbgPrint(OSK_MID_TRACE,("Called, socket = %08x\n", socket)); - - OSKLock(); - if ((so->so_state & SS_NBIO) && (so->so_state & SS_ISCONNECTING)) { - error = EALREADY; - goto done; - } + + if (!socket) + return OSK_ESHUTDOWN; OS_DbgPrint(OSK_MIN_TRACE,("Nam: %x\n", nam)); + if( nam ) addr = *((struct sockaddr *)nam); @@ -236,26 +237,12 @@ addr.sa_family = addr.sa_len; addr.sa_len = sizeof(struct sockaddr); + OSKLock(); error = soconnect(so, &sabuf); - - if (error == EINPROGRESS) - goto done; - else if (error) - goto bad; - - if ((so->so_state & SS_NBIO) && (so->so_state & SS_ISCONNECTING)) { - error = EINPROGRESS; - goto done; - } - -bad: - so->so_state &= ~SS_ISCONNECTING; - - if (error == ERESTART) - error = EINTR; - -done: - OSKUnlock(); + OSKUnlock(); + + if (error == 0) error = OSK_EINPROGRESS; + OS_DbgPrint(OSK_MID_TRACE,("Ending: %08x\n", error)); return (error); } @@ -347,13 +334,11 @@ if (!socket) return OSK_ESHUTDOWN; - if (!new_socket || !AddrOut) + if (!new_socket) return OSK_EINVAL; OS_DbgPrint(OSK_MID_TRACE,("OSKITTCP: Doing accept (Finish %d)\n", FinishAccepting)); - - *OutAddrLen = AddrLen; if (name) /* that's a copyin actually */ @@ -363,19 +348,17 @@ s = splnet(); -#if 0 if ((head->so_options & SO_ACCEPTCONN) == 0) { OS_DbgPrint(OSK_MID_TRACE,("OSKITTCP: head->so_options = %x, wanted bit %x\n", head->so_options, SO_ACCEPTCONN)); error = EINVAL; goto out; } -#endif OS_DbgPrint(OSK_MID_TRACE,("head->so_q = %x, head->so_state = %x\n", head->so_q, head->so_state)); - if ((head->so_state & SS_NBIO) && head->so_q == NULL) { + if (head->so_q == NULL) { error = EWOULDBLOCK; goto out; } @@ -395,8 +378,6 @@ OS_DbgPrint(OSK_MID_TRACE,("error = %d\n", error)); if( FinishAccepting && so ) { - head->so_q = so->so_q; - head->so_qlen--; mnam.m_data = (char *)&sa; mnam.m_len = sizeof(sa); @@ -405,12 +386,9 @@ if (error) goto out; - InitializeSocketFlags(so); - so->so_state |= SS_ISCONNECTED; - so->so_q = so->so_q0 = NULL; - so->so_qlen = so->so_q0len = 0; - so->so_head = 0; + soqremque(so, 1); so->so_connection = context; + soisconnected(so); *newso = so;
14 years, 3 months
1
0
0
0
[jgardou] 48685: [WIN32K] - Do not acccess unsafe bits outside of PSEH
by jgardou@svn.reactos.org
Author: jgardou Date: Wed Sep 1 22:36:00 2010 New Revision: 48685 URL:
http://svn.reactos.org/svn/reactos?rev=48685&view=rev
Log: [WIN32K] - Do not acccess unsafe bits outside of PSEH Modified: branches/reactos-yarotows/subsystems/win32/win32k/objects/dibobj.c Modified: branches/reactos-yarotows/subsystems/win32/win32k/objects/dibobj.c URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
============================================================================== --- branches/reactos-yarotows/subsystems/win32/win32k/objects/dibobj.c [iso-8859-1] (original) +++ branches/reactos-yarotows/subsystems/win32/win32k/objects/dibobj.c [iso-8859-1] Wed Sep 1 22:36:00 2010 @@ -1219,11 +1219,27 @@ IN HANDLE hcmXform) { NTSTATUS Status = STATUS_SUCCESS; + PBYTE safeBits = NULL; + HBITMAP hbmResult = NULL; + + if(pjInit && (fInit == CBM_INIT)) + { + safeBits = ExAllocatePoolWithTag(PagedPool, cjMaxBits, TAG_DIB); + if(!safeBits) + { + SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY); + return NULL; + } + } _SEH2_TRY { if(pbmi) ProbeForRead(pbmi, cjMaxInitInfo, 1); - if(pjInit && (fInit == CBM_INIT)) ProbeForRead(pjInit, cjMaxBits, 1); + if(pjInit && (fInit == CBM_INIT)) + { + ProbeForRead(pjInit, cjMaxBits, 1); + RtlCopyMemory(safeBits, pjInit, cjMaxBits); + } } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { @@ -1234,18 +1250,22 @@ if(!NT_SUCCESS(Status)) { SetLastNtError(Status); - return NULL; - } - - return GreCreateDIBitmapInternal(hDc, - cx, - cy, - fInit, - pjInit, - pbmi, - iUsage, - fl, - hcmXform); + goto cleanup; + } + + hbmResult = GreCreateDIBitmapInternal(hDc, + cx, + cy, + fInit, + safeBits, + pbmi, + iUsage, + fl, + hcmXform); + +cleanup: + ExFreePoolWithTag(safeBits, TAG_DIB); + return hbmResult; } HBITMAP
14 years, 3 months
1
0
0
0
[jgardou] 48684: [WIN32K] - always make icon mask bitmap a global object
by jgardou@svn.reactos.org
Author: jgardou Date: Wed Sep 1 20:06:46 2010 New Revision: 48684 URL:
http://svn.reactos.org/svn/reactos?rev=48684&view=rev
Log: [WIN32K] - always make icon mask bitmap a global object Modified: branches/reactos-yarotows/subsystems/win32/win32k/ntuser/cursoricon.c Modified: branches/reactos-yarotows/subsystems/win32/win32k/ntuser/cursoricon.c URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
============================================================================== --- branches/reactos-yarotows/subsystems/win32/win32k/ntuser/cursoricon.c [iso-8859-1] (original) +++ branches/reactos-yarotows/subsystems/win32/win32k/ntuser/cursoricon.c [iso-8859-1] Wed Sep 1 20:06:46 2010 @@ -1006,8 +1006,8 @@ CurIcon->Size.cy = psurfBmp->SurfObj.sizlBitmap.cy / 2; SURFACE_UnlockSurface(psurfBmp); - GDIOBJ_SetOwnership(CurIcon->IconInfo.hbmMask, NULL); - } + } + GDIOBJ_SetOwnership(CurIcon->IconInfo.hbmMask, NULL); Ret = TRUE;
14 years, 3 months
1
0
0
0
[jgardou] 48683: [WIN32K] - Do not access unsafe buffer out of PSEH.
by jgardou@svn.reactos.org
Author: jgardou Date: Wed Sep 1 19:54:45 2010 New Revision: 48683 URL:
http://svn.reactos.org/svn/reactos?rev=48683&view=rev
Log: [WIN32K] - Do not access unsafe buffer out of PSEH. Modified: branches/reactos-yarotows/subsystems/win32/win32k/objects/dibobj.c Modified: branches/reactos-yarotows/subsystems/win32/win32k/objects/dibobj.c URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
============================================================================== --- branches/reactos-yarotows/subsystems/win32/win32k/objects/dibobj.c [iso-8859-1] (original) +++ branches/reactos-yarotows/subsystems/win32/win32k/objects/dibobj.c [iso-8859-1] Wed Sep 1 19:54:45 2010 @@ -1030,13 +1030,24 @@ HBITMAP hBitmap; BOOL fastpath = FALSE; NTSTATUS Status = STATUS_SUCCESS; - + PBYTE safeBits ; if (!Bits || !BitsInfo) return 0; - if (!(pdc = DC_LockDc(hDC))) return 0; - + safeBits = ExAllocatePoolWithTag(PagedPool, cjMaxBits, TAG_DIB); + if(!safeBits) + { + SetLastWin32Error(ERROR_NOT_ENOUGH_MEMORY); + return 0; + } + + if (!(pdc = DC_LockDc(hDC))) + { + ExFreePoolWithTag(safeBits, TAG_DIB); + SetLastWin32Error(ERROR_INVALID_HANDLE); + return 0; + } _SEH2_TRY { @@ -1047,6 +1058,7 @@ DPRINT1("Invalid bitmap\n"); Status = STATUS_INVALID_PARAMETER; } + RtlCopyMemory(safeBits, Bits, cjMaxBits); } _SEH2_EXCEPT(EXCEPTION_EXECUTE_HANDLER) { @@ -1088,19 +1100,24 @@ { /* fast path */ DPRINT1("using fast path\n"); - ret = IntSetDIBits( pdc, hBitmap, 0, height, Bits, BitsInfo, Usage); + ret = IntSetDIBits( pdc, hBitmap, 0, height, safeBits, BitsInfo, Usage); } else { /* slow path - need to use StretchBlt */ HBITMAP hOldBitmap; - HPALETTE hpal = NULL; HDC hdcMem; PVOID pvBits; hdcMem = NtGdiCreateCompatibleDC( hDC ); hBitmap = DIB_CreateDIBSection(pdc, BitsInfo, Usage, &pvBits, NULL, 0, 0); - RtlCopyMemory(pvBits, Bits, cjMaxBits); + if(!hBitmap) + { + DPRINT1("Error, failed to create a DIB section\n"); + NtGdiDeleteObjectApp(hdcMem); + goto cleanup; + } + RtlCopyMemory(pvBits, safeBits, cjMaxBits); hOldBitmap = NtGdiSelectBitmap( hdcMem, hBitmap ); /* Origin for DIBitmap may be bottom left (positive biHeight) or top @@ -1108,15 +1125,15 @@ ret = NtGdiStretchBlt( hDC, XDest, YDest, DestWidth, DestHeight, hdcMem, XSrc, abs(height) - SrcHeight - YSrc, SrcWidth, SrcHeight, ROP, 0 ); - if(hpal) - GdiSelectPalette(hdcMem, hpal, FALSE); - if(ret) + + if(ret) ret = SrcHeight; NtGdiSelectBitmap( hdcMem, hOldBitmap ); NtGdiDeleteObjectApp( hdcMem ); GreDeleteObject( hBitmap ); } cleanup: + ExFreePoolWithTag(safeBits, TAG_DIB); DC_UnlockDc(pdc); return ret; }
14 years, 3 months
1
0
0
0
[jgardou] 48682: [WIN32K] - same as 48681 for win32k
by jgardou@svn.reactos.org
Author: jgardou Date: Wed Sep 1 18:39:37 2010 New Revision: 48682 URL:
http://svn.reactos.org/svn/reactos?rev=48682&view=rev
Log: [WIN32K] - same as 48681 for win32k Modified: branches/reactos-yarotows/subsystems/win32/win32k/eng/bitblt.c Modified: branches/reactos-yarotows/subsystems/win32/win32k/eng/bitblt.c URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/subsystems/win…
============================================================================== --- branches/reactos-yarotows/subsystems/win32/win32k/eng/bitblt.c [iso-8859-1] (original) +++ branches/reactos-yarotows/subsystems/win32/win32k/eng/bitblt.c [iso-8859-1] Wed Sep 1 18:39:37 2010 @@ -158,7 +158,7 @@ // These functions are assigned if we're working with a DIB // The assigned functions depend on the bitsPerPixel of the DIB - DibFunctionsForBitmapFormat[Dest->iBitmapFormat].DIB_ColorFill(Dest, DestRect, pbo ? (pbo->iSolidColor &0x00ffffff): 0); + DibFunctionsForBitmapFormat[Dest->iBitmapFormat].DIB_ColorFill(Dest, DestRect, pbo ? pbo->iSolidColor : 0); return TRUE; }
14 years, 3 months
1
0
0
0
[jgardou] 48681: [GENDIB] - Revert the "ignore alpha channel value of pattern" changes
by jgardou@svn.reactos.org
Author: jgardou Date: Wed Sep 1 18:37:48 2010 New Revision: 48681 URL:
http://svn.reactos.org/svn/reactos?rev=48681&view=rev
Log: [GENDIB] - Revert the "ignore alpha channel value of pattern" changes Modified: branches/reactos-yarotows/tools/gendib/gendib.c Modified: branches/reactos-yarotows/tools/gendib/gendib.c URL:
http://svn.reactos.org/svn/reactos/branches/reactos-yarotows/tools/gendib/g…
============================================================================== --- branches/reactos-yarotows/tools/gendib/gendib.c [iso-8859-1] (original) +++ branches/reactos-yarotows/tools/gendib/gendib.c [iso-8859-1] Wed Sep 1 18:37:48 2010 @@ -143,16 +143,16 @@ { ROPCODE_NOTSRCCOPY, "NOTSRCCOPY", "~S", 0, 1, 0 }, { ROPCODE_SRCERASE, "SRCERASE", "(~D) & S", 1, 1, 0 }, { ROPCODE_DSTINVERT, "DSTINVERT", "~D", 1, 0, 0 }, - { ROPCODE_PATINVERT, "PATINVERT", "D ^ (P & 0x00ffffff)", 1, 0, 1 }, + { ROPCODE_PATINVERT, "PATINVERT", "D ^ P", 1, 0, 1 }, { ROPCODE_SRCINVERT, "SRCINVERT", "D ^ S", 1, 1, 0 }, { ROPCODE_SRCAND, "SRCAND", "D & S", 1, 1, 0 }, { ROPCODE_NOOP, "NOOP", "D", 1, 0, 0 }, { ROPCODE_MERGEPAINT, "MERGEPAINT", "D | (~S)", 1, 1, 0 }, - { ROPCODE_MERGECOPY, "MERGECOPY", "S & P & 0x00ffffff", 0, 1, 1 }, + { ROPCODE_MERGECOPY, "MERGECOPY", "S & P", 0, 1, 1 }, { ROPCODE_SRCCOPY, "SRCCOPY", "S", 0, 1, 0 }, { ROPCODE_SRCPAINT, "SRCPAINT", "D | S", 1, 1, 0 }, - { ROPCODE_PATCOPY, "PATCOPY", "P & 0x00ffffff", 0, 0, 1 }, - { ROPCODE_PATPAINT, "PATPAINT", "D | (~S) | (P & 0x00ffffff)", 1, 1, 1 }, + { ROPCODE_PATCOPY, "PATCOPY", "P", 0, 0, 1 }, + { ROPCODE_PATPAINT, "PATPAINT", "D | (~S) | P", 1, 1, 1 }, { ROPCODE_WHITENESS, "WHITENESS", "0xffffffff", 0, 0, 0 }, { ROPCODE_GENERIC, NULL, NULL, 1, 1, 1 } };
14 years, 3 months
1
0
0
0
← Newer
1
...
24
25
26
27
28
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
Results per page:
10
25
50
100
200