From 567e9e3a71c49f9b884ac8604dcf1d3584d4eabf Mon Sep 17 00:00:00 2001 From: Dmitry Gorbachev Date: Sun, 26 Feb 2012 19:04:00 +0000 Subject: [PATCH] [NDK] - Fix declaration of HalPrivateDispatchTable for FreeLDR. [FREELDR] - Rename BiosMemoryMap to XboxMemoryMap. Another BiosMemoryMap is in meminit.c [NTOSKRNL][WIN32K][FTP] - Fix some variables. svn path=/trunk/; revision=55878 --- reactos/base/applications/network/ftp/cmds.c | 2 +- reactos/base/applications/network/ftp/main.c | 2 +- reactos/boot/freeldr/freeldr/arch/i386/halstub.c | 4 +++- reactos/boot/freeldr/freeldr/arch/i386/xboxmem.c | 16 ++++++++-------- reactos/include/ndk/haltypes.h | 2 +- reactos/ntoskrnl/mm/section.c | 3 ++- reactos/subsystems/win32/win32k/ntddraw/ddraw.c | 4 ++-- 7 files changed, 18 insertions(+), 15 deletions(-) diff --git a/reactos/base/applications/network/ftp/cmds.c b/reactos/base/applications/network/ftp/cmds.c index b4f9912bf6b..b40f5a7d0ad 100644 --- a/reactos/base/applications/network/ftp/cmds.c +++ b/reactos/base/applications/network/ftp/cmds.c @@ -1627,7 +1627,7 @@ void quit(int argc, const char *argv[]) */ void disconnect(int argc, const char *argv[]) { - extern int cout; + extern SOCKET cout; extern int data; if (!connected) diff --git a/reactos/base/applications/network/ftp/main.c b/reactos/base/applications/network/ftp/main.c index db4859f3987..192f39c9b3d 100644 --- a/reactos/base/applications/network/ftp/main.c +++ b/reactos/base/applications/network/ftp/main.c @@ -250,7 +250,7 @@ void intr(void) void lostpeer(void) { - extern int cout; + extern SOCKET cout; extern int data; if (connected) { diff --git a/reactos/boot/freeldr/freeldr/arch/i386/halstub.c b/reactos/boot/freeldr/freeldr/arch/i386/halstub.c index 32a4ae6bb3b..583f33ef981 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/halstub.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/halstub.c @@ -69,7 +69,9 @@ HAL_DISPATCH HalDispatchTable = (pHalEndMirroring)NULL, (pHalMirrorPhysicalMemory)NULL, (pHalEndOfBoot)NULL, - (pHalMirrorVerify)NULL + (pHalMirrorVerify)NULL, + (pHalGetAcpiTable)NULL, + (pHalSetPciErrorHandlerCallback)NULL }; HAL_PRIVATE_DISPATCH HalPrivateDispatchTable = diff --git a/reactos/boot/freeldr/freeldr/arch/i386/xboxmem.c b/reactos/boot/freeldr/freeldr/arch/i386/xboxmem.c index b06c80d770f..05c760c673c 100644 --- a/reactos/boot/freeldr/freeldr/arch/i386/xboxmem.c +++ b/reactos/boot/freeldr/freeldr/arch/i386/xboxmem.c @@ -75,24 +75,24 @@ XboxMemInit(VOID) AvailableMemoryMb = InstalledMemoryMb; } -FREELDR_MEMORY_DESCRIPTOR BiosMemoryMap[2]; +FREELDR_MEMORY_DESCRIPTOR XboxMemoryMap[2]; PFREELDR_MEMORY_DESCRIPTOR XboxMemGetMemoryMap(ULONG *MemoryMapSize) { /* Synthesize memory map */ /* Available RAM block */ - BiosMemoryMap[0].BasePage = 0; - BiosMemoryMap[0].PageCount = AvailableMemoryMb * 1024 * 1024 / MM_PAGE_SIZE; - BiosMemoryMap[0].MemoryType = LoaderFree; + XboxMemoryMap[0].BasePage = 0; + XboxMemoryMap[0].PageCount = AvailableMemoryMb * 1024 * 1024 / MM_PAGE_SIZE; + XboxMemoryMap[0].MemoryType = LoaderFree; /* Video memory */ - BiosMemoryMap[1].BasePage = AvailableMemoryMb * 1024 * 1024 / MM_PAGE_SIZE; - BiosMemoryMap[1].PageCount = (InstalledMemoryMb - AvailableMemoryMb) * 1024 * 1024 / MM_PAGE_SIZE; - BiosMemoryMap[1].MemoryType = LoaderFirmwarePermanent; + XboxMemoryMap[1].BasePage = AvailableMemoryMb * 1024 * 1024 / MM_PAGE_SIZE; + XboxMemoryMap[1].PageCount = (InstalledMemoryMb - AvailableMemoryMb) * 1024 * 1024 / MM_PAGE_SIZE; + XboxMemoryMap[1].MemoryType = LoaderFirmwarePermanent; *MemoryMapSize = 2; - return BiosMemoryMap; + return XboxMemoryMap; } PVOID diff --git a/reactos/include/ndk/haltypes.h b/reactos/include/ndk/haltypes.h index 904a83146f1..1fd0b94aadc 100644 --- a/reactos/include/ndk/haltypes.h +++ b/reactos/include/ndk/haltypes.h @@ -257,7 +257,7 @@ typedef struct _BUS_HANDLER // // Kernel Exports // -#if defined(_NTDRIVER_) || defined(_NTHAL_) +#if (defined(_NTDRIVER_) || defined(_NTHAL_)) && !defined(_BLDR_) extern NTSYSAPI PHAL_PRIVATE_DISPATCH HalPrivateDispatchTable; #define HALPRIVATEDISPATCH ((PHAL_PRIVATE_DISPATCH)&HalPrivateDispatchTable) #else diff --git a/reactos/ntoskrnl/mm/section.c b/reactos/ntoskrnl/mm/section.c index 136c1df96a1..e680ee4dbd6 100644 --- a/reactos/ntoskrnl/mm/section.c +++ b/reactos/ntoskrnl/mm/section.c @@ -64,6 +64,8 @@ _MmSetPageEntrySectionSegment(S,O,E,__FILE__,__LINE__); \ } while (0) +extern MMSESSION MmSession; + NTSTATUS NTAPI MiMapViewInSystemSpace(IN PVOID Section, @@ -4939,7 +4941,6 @@ MmMapViewInSystemSpace (IN PVOID SectionObject, if ((ULONG_PTR)SectionObject & 1) { - extern PVOID MmSession; return MiMapViewInSystemSpace((PVOID)((ULONG_PTR)SectionObject & ~1), &MmSession, MappedBase, diff --git a/reactos/subsystems/win32/win32k/ntddraw/ddraw.c b/reactos/subsystems/win32/win32k/ntddraw/ddraw.c index 53cc47d928a..278e122c41d 100644 --- a/reactos/subsystems/win32/win32k/ntddraw/ddraw.c +++ b/reactos/subsystems/win32/win32k/ntddraw/ddraw.c @@ -15,7 +15,7 @@ PGD_DXDDSTARTUPDXGRAPHICS gpfnStartupDxGraphics = NULL; PGD_DXDDCLEANUPDXGRAPHICS gpfnCleanupDxGraphics = NULL; /* export from dxeng.c */ -extern DRVFN gaEngFuncs; +extern DRVFN gaEngFuncs[]; extern ULONG gcEngFuncs; extern EDD_DIRECTDRAW_GLOBAL edd_DdirectDraw_Global; @@ -157,7 +157,7 @@ DxDdStartupDxGraphics( ULONG ulc1, { /* Setup driver data for activate the dx interface */ DxEngDrv.iDriverVersion = DDI_DRIVER_VERSION_NT5_01; - DxEngDrv.pdrvfn = &gaEngFuncs; + DxEngDrv.pdrvfn = gaEngFuncs; DxEngDrv.c = gcEngFuncs; Status = gpfnStartupDxGraphics ( sizeof(DRVENABLEDATA),