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 2011
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
20 participants
399 discussions
Start a n
N
ew thread
[tkreuzer] 53881: [FREELDR] Cleanup headers
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Wed Sep 28 09:54:05 2011 New Revision: 53881 URL:
http://svn.reactos.org/svn/reactos?rev=53881&view=rev
Log: [FREELDR] Cleanup headers Removed: trunk/reactos/boot/freeldr/freeldr/include/rtl.h Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/i386rtl.c trunk/reactos/boot/freeldr/freeldr/arch/i386/winldr.c trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mboot.c trunk/reactos/boot/freeldr/freeldr/include/arch/i386/i386.h trunk/reactos/boot/freeldr/freeldr/include/freeldr.h trunk/reactos/boot/freeldr/freeldr/include/reactos.h Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/i386rtl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/i386rtl.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/i386rtl.c [iso-8859-1] Wed Sep 28 09:54:05 2011 @@ -18,6 +18,9 @@ */ #include <freeldr.h> + +void sound(int freq); +void delay(unsigned msec); void PcBeep(void) { Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/winldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/winldr.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/winldr.c [iso-8859-1] Wed Sep 28 09:54:05 2011 @@ -338,16 +338,14 @@ { *ExtendedBIOSDataArea = BiosRegs.w.es << 4; *ExtendedBIOSDataSize = 1024; - ERR(">> *ExtendedBIOSDataArea = 0x%lx\n", *ExtendedBIOSDataArea); + TRACE("*ExtendedBIOSDataArea = 0x%lx\n", *ExtendedBIOSDataArea); } else { - ERR("Couldn't get address of extended BIOS data area\n"); + WARN("Couldn't get address of extended BIOS data area\n"); *ExtendedBIOSDataArea = 0; *ExtendedBIOSDataSize = 0; } - - /* Store size of the extended bios data area in 0x740 */ } void WinLdrSetupMachineDependent(PLOADER_PARAMETER_BLOCK LoaderBlock) Modified: trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mboot.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mboot.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mboot.c [iso-8859-1] Wed Sep 28 09:54:05 2011 @@ -55,6 +55,8 @@ #define BAT_GRANULARITY (64 * 1024) #define KernelMemorySize (8 * 1024 * 1024) #define XROUNDUP(x,n) ((((ULONG)x) + ((n) - 1)) & (~((n) - 1))) + +char reactos_module_strings[64][256]; // Array to hold module names /* Load Address of Next Module */ ULONG_PTR NextModuleBase = 0; @@ -178,7 +180,7 @@ set->info = newinfo; set->mapsize *= 2; } - + set->info[set->usecount].flags = MMU_ALL_RW; set->info[set->usecount].proc = proc; set->info[set->usecount].addr = virt; @@ -208,7 +210,7 @@ while(OldModCount != LoaderBlock.ModsCount) { - printf("Added %d modules last pass\n", + printf("Added %d modules last pass\n", LoaderBlock.ModsCount - OldModCount); OldModCount = LoaderBlock.ModsCount; @@ -224,7 +226,7 @@ ((PVOID)reactos_modules[i].ModStart, (PCHAR)reactos_modules[i].String); } - } + } } printf("Starting mmu\n"); @@ -233,7 +235,7 @@ printf("Allocating vsid 0 (kernel)\n"); MmuAllocVsid(0, 0xff00); - + /* We'll use vsid 1 for freeldr (expendable) */ printf("Allocating vsid 1 (freeldr)\n"); MmuAllocVsid(1, 0xff); @@ -247,7 +249,7 @@ i += (1<<PFN_SHIFT) ) { FrLdrAddPageMapping(&memmap, 1, i, 0); } - + printf("KernelBase %x\n", KernelBase); /* Heap pages -- this gets the entire freeldr heap */ @@ -255,7 +257,7 @@ tmp = i<<PFN_SHIFT; if (FreeLdrMap[i].PageAllocated == LoaderSystemCode) { UsedEntries++; - if (tmp >= (ULONG)KernelMemory && + if (tmp >= (ULONG)KernelMemory && tmp < (ULONG)KernelMemory + KernelMemorySize) { FrLdrAddPageMapping(&memmap, 0, tmp, KernelBase + tmp - (ULONG)KernelMemory); } else { @@ -721,7 +723,7 @@ } while(TempName); NameBuffer = reactos_module_strings[LoaderBlock.ModsCount]; - + /* Get Module Size */ LocalModuleSize = FsGetFileSize(ModuleImage); @@ -773,7 +775,7 @@ PVOID ModuleBase = (PVOID)NextModuleBase; if(FrLdrMapModule(Image, ShortName, 0, 0)) - Result = ModuleBase; + Result = ModuleBase; } return Result; } Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/i386/i386.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/arch/i386/i386.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/arch/i386/i386.h [iso-8859-1] Wed Sep 28 09:54:05 2011 @@ -24,6 +24,32 @@ #undef KIP0PCRADDRESS #define KIP0PCRADDRESS 0xffdff000 +/* Bits to shift to convert a Virtual Address into an Offset in the Page Table */ +#define PFN_SHIFT 12 + +/* Bits to shift to convert a Virtual Address into an Offset in the Page Directory */ +#define PDE_SHIFT 22 +#define PDE_SHIFT_PAE 18 + +/* Converts a Physical Address Pointer into a Page Frame Number */ +#define PaPtrToPfn(p) \ + (((ULONG_PTR)&p) >> PFN_SHIFT) + +/* Converts a Physical Address into a Page Frame Number */ +#define PaToPfn(p) \ + ((p) >> PFN_SHIFT) + +#define STARTUP_BASE 0xC0000000 + +#define LowMemPageTableIndex 0 +#define StartupPageTableIndex (STARTUP_BASE >> 22) +#define HalPageTableIndex (HAL_BASE >> 22) + +typedef struct _PAGE_DIRECTORY_X86 +{ + HARDWARE_PTE Pde[1024]; +} PAGE_DIRECTORY_X86, *PPAGE_DIRECTORY_X86; + void i386DivideByZero(void); void i386DebugException(void); void i386NMIException(void); Modified: trunk/reactos/boot/freeldr/freeldr/include/freeldr.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/freeldr.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/freeldr.h [iso-8859-1] Wed Sep 28 09:54:05 2011 @@ -45,8 +45,6 @@ #include <stdlib.h> #include <stdio.h> #include <ctype.h> -#include <rosldr.h> -#include <rtl.h> #include <ntdddisk.h> #include <internal/hal.h> #include <drivers/pci/pci.h> @@ -55,8 +53,8 @@ /* internal headers */ #include <arcemul.h> +#include <bget.h> #include <bytesex.h> -#include <bget.h> #include <cache.h> #include <cmdline.h> #include <comm.h> Modified: trunk/reactos/boot/freeldr/freeldr/include/reactos.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/reactos.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/reactos.h [iso-8859-1] Wed Sep 28 09:54:05 2011 @@ -19,53 +19,6 @@ #pragma once -/* Base Addres of Kernel in Physical Memory */ -#define KERNEL_BASE_PHYS 0x800000 - -#if defined(_M_IX86) - -/* Bits to shift to convert a Virtual Address into an Offset in the Page Table */ -#define PFN_SHIFT 12 - -/* Bits to shift to convert a Virtual Address into an Offset in the Page Directory */ -#define PDE_SHIFT 22 -#define PDE_SHIFT_PAE 18 - -/* Converts a Physical Address Pointer into a Page Frame Number */ -#define PaPtrToPfn(p) \ - (((ULONG_PTR)&p) >> PFN_SHIFT) - -/* Converts a Physical Address into a Page Frame Number */ -#define PaToPfn(p) \ - ((p) >> PFN_SHIFT) - -#define STARTUP_BASE 0xC0000000 - -#define LowMemPageTableIndex 0 -#define StartupPageTableIndex (STARTUP_BASE >> 22) -#define HalPageTableIndex (HAL_BASE >> 22) - -typedef struct _PAGE_DIRECTORY_X86 -{ - HARDWARE_PTE Pde[1024]; -} PAGE_DIRECTORY_X86, *PPAGE_DIRECTORY_X86; - -#endif - -/////////////////////////////////////////////////////////////////////////////////////// -// -// ReactOS Loading Functions -// -/////////////////////////////////////////////////////////////////////////////////////// -VOID LoadAndBootReactOS(PCSTR OperatingSystemName); - -/////////////////////////////////////////////////////////////////////////////////////// -// -// ReactOS Setup Loader Functions -// -/////////////////////////////////////////////////////////////////////////////////////// -VOID ReactOSRunSetupLoader(VOID); - /////////////////////////////////////////////////////////////////////////////////////// // // ARC Path Functions @@ -83,53 +36,4 @@ VOID ConstructArcPath(PCHAR ArcPath, PCHAR SystemFolder, UCHAR Disk, ULONG Partition); UCHAR ConvertArcNameToBiosDriveNumber(PCHAR ArcPath); -/////////////////////////////////////////////////////////////////////////////////////// -// -// Loader Functions And Definitions -// -/////////////////////////////////////////////////////////////////////////////////////// -extern ROS_LOADER_PARAMETER_BLOCK LoaderBlock; /* Multiboot info structure passed to kernel */ -extern char reactos_kernel_cmdline[255]; // Command line passed to kernel -extern LOADER_MODULE reactos_modules[64]; // Array to hold boot module info loaded for the kernel -extern char reactos_module_strings[64][256]; // Array to hold module names -typedef struct _reactos_mem_data { - unsigned long memory_map_descriptor_size; - memory_map_t memory_map[32]; // Memory map -} reactos_mem_data_t; -extern reactos_mem_data_t reactos_mem_data; -#define reactos_memory_map_descriptor_size reactos_mem_data.memory_map_descriptor_size -#define reactos_memory_map reactos_mem_data.memory_map - -VOID FASTCALL FrLdrSetupPae(ULONG Magic); -VOID FASTCALL FrLdrSetupPageDirectory(VOID); -VOID FASTCALL FrLdrGetPaeMode(VOID); -BOOLEAN NTAPI FrLdrMapKernel(PFILE KernelImage); -ULONG_PTR NTAPI FrLdrCreateModule(LPCSTR ModuleName); -ULONG_PTR NTAPI FrLdrLoadModule(PFILE ModuleImage, LPCSTR ModuleName, PULONG ModuleSize); -BOOLEAN NTAPI FrLdrCloseModule(ULONG_PTR ModuleBase, ULONG dwModuleSize); -VOID NTAPI FrLdrStartup(ULONG Magic); -typedef VOID (NTAPI *ROS_KERNEL_ENTRY_POINT)(IN PROS_LOADER_PARAMETER_BLOCK LoaderBlock); - -PVOID -NTAPI -FrLdrMapImage( - IN PFILE Image, - IN PCHAR ShortName, - IN ULONG ImageType -); - -PVOID -NTAPI -FrLdrReadAndMapImage( - IN PFILE Image, - IN PCHAR ShortName, - IN ULONG ImageType -); - -PVOID -NTAPI -FrLdrLoadImage( - IN PCHAR szFileName, - IN INT nPos, - IN ULONG ImageType -); +void PcBeep(void); Removed: trunk/reactos/boot/freeldr/freeldr/include/rtl.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/rtl.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/rtl.h (removed) @@ -1,29 +1,0 @@ -/* - * FreeLoader - * Copyright (C) 1998-2003 Brian Palmer <brianp(a)sginet.com> - * - * This program is free software; you can redistribute it and/or modify - * it under the terms of the GNU General Public License as published by - * the Free Software Foundation; either version 2 of the License, or - * (at your option) any later version. - * - * This program is distributed in the hope that it will be useful, - * but WITHOUT ANY WARRANTY; without even the implied warranty of - * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the - * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License along - * with this program; if not, write to the Free Software Foundation, Inc., - * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. - */ - -#pragma once - -#include <freeldr.h> - -char * convert_to_ascii(char *buf, int c, int num); -char * convert_i64_to_ascii(char *buf, int c, unsigned long long num); - -void PcBeep(void); -void delay(unsigned msec); -void sound(int freq);
13 years, 2 months
1
0
0
0
[cgutman] 53880: [ACPI] - The width parameter in AcpiOsReadPciConfiguration and AcpiOsWritePciConfiguration was in bits but we were treating it as a width in bytes - This caused overreads, memory c...
by cgutman@svn.reactos.org
Author: cgutman Date: Wed Sep 28 04:05:34 2011 New Revision: 53880 URL:
http://svn.reactos.org/svn/reactos?rev=53880&view=rev
Log: [ACPI] - The width parameter in AcpiOsReadPciConfiguration and AcpiOsWritePciConfiguration was in bits but we were treating it as a width in bytes - This caused overreads, memory corruption, and crashes when these functions were called (VMWare was particularly picky about bad accesses to the PCI configuration space) - A hack was (unknowingly) added which prevented some crashes but had a side-effect of causing the partial disruption of ACPI's PCI configuration space accesses while the others that went through wrote bad data to the PCI config space or corrupted kernel memory Modified: trunk/reactos/drivers/bus/acpi/osl.c Modified: trunk/reactos/drivers/bus/acpi/osl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/drivers/bus/acpi/osl.c?rev…
============================================================================== --- trunk/reactos/drivers/bus/acpi/osl.c [iso-8859-1] (original) +++ trunk/reactos/drivers/bus/acpi/osl.c [iso-8859-1] Wed Sep 28 04:05:34 2011 @@ -456,26 +456,28 @@ NTSTATUS Status; PCI_SLOT_NUMBER slot; - if (Register == 0 || PciId->Device == 0 || - Register + Width > PCI_COMMON_HDR_LENGTH) - return AE_ERROR; - slot.u.AsULONG = 0; slot.u.bits.DeviceNumber = PciId->Device; slot.u.bits.FunctionNumber = PciId->Function; DPRINT("AcpiOsReadPciConfiguration, slot=0x%X, func=0x%X\n", slot.u.AsULONG, Register); + Status = HalGetBusDataByOffset(PCIConfiguration, PciId->Bus, slot.u.AsULONG, Value, Register, - Width); - - if (NT_SUCCESS(Status)) + (Width / 8)); + + if (Status == 0 || Status == 2) + { + DPRINT1("HalGetBusDataByOffset failed (Status = %d)\n", Status); + return AE_NOT_FOUND; + } + else + { return AE_OK; - else - return AE_ERROR; + } } ACPI_STATUS @@ -489,26 +491,26 @@ ULONG buf = Value; PCI_SLOT_NUMBER slot; - if (Register == 0 || PciId->Device == 0 || - Register + Width > PCI_COMMON_HDR_LENGTH) - return AE_ERROR; - slot.u.AsULONG = 0; slot.u.bits.DeviceNumber = PciId->Device; slot.u.bits.FunctionNumber = PciId->Function; DPRINT("AcpiOsWritePciConfiguration, slot=0x%x\n", slot.u.AsULONG); + Status = HalSetBusDataByOffset(PCIConfiguration, PciId->Bus, slot.u.AsULONG, &buf, Register, - Width); - - if (NT_SUCCESS(Status)) + (Width / 8)); + + if (Status == 0 || Status == 2) + { + DPRINT1("HalSetBusDataByOffset failed (Status = %d)\n", Status); + return AE_NOT_FOUND; + } + else return AE_OK; - else - return AE_ERROR; } ACPI_STATUS
13 years, 2 months
1
0
0
0
[tkreuzer] 53879: [FREELDR] Try to fix boot with rbuild
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue Sep 27 23:58:47 2011 New Revision: 53879 URL:
http://svn.reactos.org/svn/reactos?rev=53879&view=rev
Log: [FREELDR] Try to fix boot with rbuild Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/int386.S Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/int386.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/int386.S [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/int386.S [iso-8859-1] Tue Sep 27 23:58:47 2011 @@ -92,7 +92,7 @@ /* Copy the input regs to our variables */ movl $Int386_REGS,%edi movl Int386_regsin,%esi - movl $0x24,%ecx + movl $0x28,%ecx cld rep movsb @@ -170,7 +170,7 @@ /* Copy the variables to the output regs */ movl $Int386_REGS,%esi movl Int386_regsout,%edi - movl $0x24,%ecx + movl $0x28,%ecx cld rep movsb
13 years, 2 months
1
0
0
0
[tkreuzer] 53878: [FREELDR] - Modify some memory types to match what windows uses - Modify PcMemGetBiosMemoryMap, so that is crops free memory to page alignment, while extending non-free memory to ...
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue Sep 27 22:43:52 2011 New Revision: 53878 URL:
http://svn.reactos.org/svn/reactos?rev=53878&view=rev
Log: [FREELDR] - Modify some memory types to match what windows uses - Modify PcMemGetBiosMemoryMap, so that is crops free memory to page alignment, while extending non-free memory to page alignment. This way we don't loose small firmware descriptors like the one for the extended bios data area enumerated by the bios. Fixes a warning from win 2003 about not owned memory. - Modify MempAddMemoryBlock to map LoaderFirmwarePermanent into kernel space like ntldr, but don't map page 0! ntldr doesn't do that either. Also map LoaderXIPRom. - After generating memory descriptors from the page lookup table, add any descriptor from the bios memory table, that is higher than MmHigestPhysical address, so we don't loose high rom descriptors. Do not map beyond LoaderPagesSpanned. Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/pcmem.c trunk/reactos/boot/freeldr/freeldr/include/arch/pc/x86common.h trunk/reactos/boot/freeldr/freeldr/windows/peloader.c trunk/reactos/boot/freeldr/freeldr/windows/wlmemory.c Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/pcmem.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/pcmem.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/pcmem.c [iso-8859-1] Tue Sep 27 22:43:52 2011 @@ -39,7 +39,7 @@ #define FILEBUF_PAGE_COUNT (DISKBUF_BASE_PAGE - FILEBUF_BASE_PAGE) #define DISKBUF_PAGE_COUNT (1) #define STACK_PAGE_COUNT (STACK_END_PAGE - STACK_BASE_PAGE) -#define BIOSBUF_PAGE_COUNT (0xA0 - BIOSBUF_BASE_PAGE) +#define BIOSBUF_PAGE_COUNT (1) BIOS_MEMORY_MAP PcBiosMemoryMap[MAX_BIOS_DESCRIPTORS]; ULONG PcBiosMapCount; @@ -53,7 +53,8 @@ { LoaderFirmwareTemporary, DISKBUF_BASE_PAGE, DISKBUF_PAGE_COUNT }, // Disk read buffer for int 13h. DISKREADBUFFER { LoaderOsloaderStack, STACK_BASE_PAGE, STACK_PAGE_COUNT }, // prot mode stack. { LoaderFirmwareTemporary, BIOSBUF_BASE_PAGE, BIOSBUF_PAGE_COUNT }, // BIOSCALLBUFFER - { LoaderFirmwarePermanent, 0xA0, 0x60 }, // ROM / Video + { LoaderFirmwarePermanent, 0xA0, 0x50 }, // ROM / Video + { LoaderSpecialMemory, 0xF0, 0x10 }, // ROM / Video { LoaderSpecialMemory, 0xFFF, 1 }, // unusable memory { 0, 0, 0 }, // end of map }; @@ -194,6 +195,7 @@ REGS Regs; ULONG MapCount = 0; ULONGLONG RealBaseAddress, RealSize; + TYPE_OF_MEMORY MemoryType; ASSERT(PcBiosMapCount == 0); TRACE("GetBiosMemoryMap()\n"); @@ -252,21 +254,40 @@ TRACE("Reserved: 0x%x\n", PcBiosMemoryMap[PcBiosMapCount].Reserved); TRACE("\n"); - /* Align up base of memory area */ - RealBaseAddress = ROUND_UP(PcBiosMemoryMap[PcBiosMapCount].BaseAddress, MM_PAGE_SIZE); - RealSize = PcBiosMemoryMap[PcBiosMapCount].Length - - (RealBaseAddress - PcBiosMemoryMap[PcBiosMapCount].BaseAddress); + /* Check if this is free memory */ + if (PcBiosMemoryMap[PcBiosMapCount].Type == BiosMemoryUsable) + { + MemoryType = LoaderFree; + + /* Align up base of memory area */ + RealBaseAddress = ALIGN_UP_BY(PcBiosMemoryMap[PcBiosMapCount].BaseAddress, + MM_PAGE_SIZE); + + /* Calculate the length after aligning the base */ + RealSize = PcBiosMemoryMap[PcBiosMapCount].BaseAddress + + PcBiosMemoryMap[PcBiosMapCount].Length - RealBaseAddress; + RealSize = ALIGN_DOWN_BY(RealSize, MM_PAGE_SIZE); + } + else + { + if (PcBiosMemoryMap[PcBiosMapCount].Type == BiosMemoryReserved) + MemoryType = LoaderFirmwarePermanent; + else + MemoryType = LoaderSpecialMemory; + + /* Align down base of memory area */ + RealBaseAddress = ALIGN_DOWN_BY(PcBiosMemoryMap[PcBiosMapCount].BaseAddress, + MM_PAGE_SIZE); + + /* Calculate the length after aligning the base */ + RealSize = PcBiosMemoryMap[PcBiosMapCount].BaseAddress + + PcBiosMemoryMap[PcBiosMapCount].Length - RealBaseAddress; + RealSize = ALIGN_UP_BY(RealSize, MM_PAGE_SIZE); + } /* Check if we can add this descriptor */ if ((RealSize >= MM_PAGE_SIZE) && (MapCount < MaxMemoryMapSize)) { - TYPE_OF_MEMORY MemoryType; - - if (PcBiosMemoryMap[PcBiosMapCount].Type == BiosMemoryUsable) - MemoryType = LoaderFree; - else - MemoryType = LoaderFirmwarePermanent; - /* Add the descriptor */ MapCount = AddMemoryDescriptor(PcMemoryMap, MAX_BIOS_DESCRIPTORS, Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/pc/x86common.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/arch/pc/x86common.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/arch/pc/x86common.h [iso-8859-1] Tue Sep 27 22:43:52 2011 @@ -22,6 +22,7 @@ #define BIOSCALLBUFSEGMENT (BIOSCALLBUFFER/16) /* Buffer to store temporary data for any Int386() call */ #define BIOSCALLBUFOFFSET HEX(0000) /* Buffer to store temporary data for any Int386() call */ +#define BIOSCALLBUFSIZE PAGE_SIZE /* max is sizeof(VESA_SVGA_INFO) = 512 */ /* These addresses specify the realmode "BSS section" layout */ #define BSS_RealModeEntry (BSS_START + 0) Modified: trunk/reactos/boot/freeldr/freeldr/windows/peloader.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/windows/peloader.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/windows/peloader.c [iso-8859-1] Tue Sep 27 22:43:52 2011 @@ -735,7 +735,7 @@ //Print(L"Loading referenced DLL: %s\n", FullDllName); /* Load the image */ - Status = WinLdrLoadImage(FullDllName, LoaderSystemCode, &BasePA); + Status = WinLdrLoadImage(FullDllName, LoaderBootDriver, &BasePA); if (!Status) { Modified: trunk/reactos/boot/freeldr/freeldr/windows/wlmemory.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/windows/wlmemory.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/windows/wlmemory.c [iso-8859-1] Tue Sep 27 22:43:52 2011 @@ -48,6 +48,10 @@ WinLdrInsertDescriptor(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock, IN PMEMORY_ALLOCATION_DESCRIPTOR NewDescriptor); +extern PFREELDR_MEMORY_DESCRIPTOR BiosMemoryMap; +extern ULONG BiosMemoryMapEntryCount; +extern ULONG MmLowestPhysicalPage; +extern ULONG MmHighestPhysicalPage; /* GLOBALS ***************************************************************/ @@ -108,12 +112,25 @@ Mad[MadCount].PageCount = PageCount; Mad[MadCount].MemoryType = Type; - // // Add descriptor // WinLdrInsertDescriptor(LoaderBlock, &Mad[MadCount]); MadCount++; + + /* Make sure we don't map too high */ + if (BasePage + PageCount > LoaderPagesSpanned) return; + + /* Special handling for page 0 */ + if (BasePage == 0) + { + /* If its only one page, ignore it! */ + if (PageCount == 1) return; + + /* Otherwise, skip first page */ + BasePage++; + PageCount--; + } switch (Type) { @@ -121,7 +138,6 @@ case LoaderLoadedProgram: case LoaderOsloaderStack: case LoaderFirmwareTemporary: - case LoaderFirmwarePermanent: /* Map these pages into user mode */ Status = MempSetupPaging(BasePage, PageCount, FALSE); break; @@ -129,6 +145,7 @@ /* Pages used by the kernel */ case LoaderExceptionBlock: case LoaderSystemBlock: + case LoaderFirmwarePermanent: case LoaderSystemCode: case LoaderHalCode: case LoaderBootDriver: @@ -142,6 +159,7 @@ case LoaderRegistryData: case LoaderMemoryData: case LoaderNlsData: + case LoaderXIPRom: case LoaderOsloaderHeap: // FIXME /* Map these pages into kernel mode */ Status = MempSetupPaging(BasePage, PageCount, TRUE); @@ -160,7 +178,6 @@ // FIXME: not known (not used anyway) case LoaderReserve: - case LoaderXIPRom: case LoaderLargePageFiller: case LoaderErrorLogMemory: break; @@ -293,6 +310,20 @@ } #endif + /* Now we need to add high descriptors from the bios memory map */ + for (i = 0; i < BiosMemoryMapEntryCount; i++) + { + /* Check if its higher than the lookup table */ + if (BiosMemoryMap->BasePage > MmHighestPhysicalPage) + { + /* Copy this descriptor */ + MempAddMemoryBlock(LoaderBlock, + BiosMemoryMap->BasePage, + BiosMemoryMap->PageCount, + BiosMemoryMap->MemoryType); + } + } + TRACE("MadCount: %d\n", MadCount); WinLdrpDumpMemoryDescriptors(LoaderBlock); //FIXME: Delete!
13 years, 2 months
1
0
0
0
[akhaldi] 53877: [CMAKE] * Prefix with ccache only when compiling c/c++ objects. * Show a note when ccache build is enabled.
by akhaldi@svn.reactos.org
Author: akhaldi Date: Tue Sep 27 21:21:59 2011 New Revision: 53877 URL:
http://svn.reactos.org/svn/reactos?rev=53877&view=rev
Log: [CMAKE] * Prefix with ccache only when compiling c/c++ objects. * Show a note when ccache build is enabled. Modified: trunk/reactos/cmake/gcc.cmake trunk/reactos/toolchain-gcc.cmake Modified: trunk/reactos/cmake/gcc.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/cmake/gcc.cmake?rev=53877&…
============================================================================== --- trunk/reactos/cmake/gcc.cmake [iso-8859-1] (original) +++ trunk/reactos/cmake/gcc.cmake [iso-8859-1] Tue Sep 27 21:21:59 2011 @@ -1,3 +1,8 @@ + +# Show a note about ccache build +if(CCACHE STREQUAL "ccache") + message("-- Enabling ccache build - done") +endif() # Compiler Core add_compile_flags("-pipe -fms-extensions") @@ -94,6 +99,8 @@ set(CMAKE_CXX_CREATE_SHARED_LIBRARY "<CMAKE_CXX_COMPILER> <CMAKE_SHARED_LIBRARY_CXX_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_CXX_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>") set(CMAKE_RC_CREATE_SHARED_LIBRARY "<CMAKE_C_COMPILER> <CMAKE_SHARED_LIBRARY_C_FLAGS> <LINK_FLAGS> <CMAKE_SHARED_LIBRARY_CREATE_C_FLAGS> -o <TARGET> <OBJECTS> <LINK_LIBRARIES>") +SET(CMAKE_C_COMPILE_OBJECT "${CCACHE} <CMAKE_C_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>") +SET(CMAKE_CXX_COMPILE_OBJECT "${CCACHE} <CMAKE_CXX_COMPILER> <DEFINES> <FLAGS> -o <OBJECT> -c <SOURCE>") set(CMAKE_ASM_COMPILE_OBJECT "<CMAKE_ASM_COMPILER> -x assembler-with-cpp -o <OBJECT> -I${REACTOS_SOURCE_DIR}/include/asm -I${REACTOS_BINARY_DIR}/include/asm <FLAGS> <DEFINES> -D__ASM__ -c <SOURCE>") #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 -O coff -o <OBJECT>") @@ -292,10 +299,10 @@ if(IS_CPP) set(__lang CXX) - set(__compiler ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1}) + set(__compiler ${CCACHE} ${CMAKE_CXX_COMPILER} ${CMAKE_CXX_COMPILER_ARG1}) else() set(__lang C) - set(__compiler ${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1}) + set(__compiler ${CCACHE} ${CMAKE_C_COMPILER} ${CMAKE_C_COMPILER_ARG1}) endif() add_custom_command(OUTPUT ${_gch_filename} Modified: trunk/reactos/toolchain-gcc.cmake URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/toolchain-gcc.cmake?rev=53…
============================================================================== --- trunk/reactos/toolchain-gcc.cmake [iso-8859-1] (original) +++ trunk/reactos/toolchain-gcc.cmake [iso-8859-1] Tue Sep 27 21:21:59 2011 @@ -35,8 +35,8 @@ set(CMAKE_SYSTEM_PROCESSOR i686) # Which tools to use -set(CMAKE_C_COMPILER ${CCACHE} ${MINGW_TOOLCHAIN_PREFIX}gcc${MINGW_TOOLCHAIN_SUFFIX}) -set(CMAKE_CXX_COMPILER ${CCACHE} ${MINGW_TOOLCHAIN_PREFIX}g++${MINGW_TOOLCHAIN_SUFFIX}) +set(CMAKE_C_COMPILER ${MINGW_TOOLCHAIN_PREFIX}gcc${MINGW_TOOLCHAIN_SUFFIX}) +set(CMAKE_CXX_COMPILER ${MINGW_TOOLCHAIN_PREFIX}g++${MINGW_TOOLCHAIN_SUFFIX}) set(CMAKE_ASM_COMPILER ${MINGW_TOOLCHAIN_PREFIX}gcc${MINGW_TOOLCHAIN_SUFFIX}) set(CMAKE_MC_COMPILER ${MINGW_TOOLCHAIN_PREFIX}windmc) set(CMAKE_RC_COMPILER ${MINGW_TOOLCHAIN_PREFIX}windres)
13 years, 2 months
1
0
0
0
[tkreuzer] 53876: [FREELDR] - copy ebp into REGS structure on Int386 - Write pointer and size of extended bios data area in physical page 0 location 0x740 and pointers to vga rom fonts in location ...
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue Sep 27 20:25:51 2011 New Revision: 53876 URL:
http://svn.reactos.org/svn/reactos?rev=53876&view=rev
Log: [FREELDR] - copy ebp into REGS structure on Int386 - Write pointer and size of extended bios data area in physical page 0 location 0x740 and pointers to vga rom fonts in location 0x700. This is required by windows 2003's videoprt. Now freeldr is more Windows 2003 ready then ever! Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/winldr.c trunk/reactos/boot/freeldr/freeldr/arch/realmode/int386.inc Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/winldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/winldr.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/winldr.c [iso-8859-1] Tue Sep 27 20:25:51 2011 @@ -279,6 +279,77 @@ return TRUE; } +#define ExtendedBIOSDataArea ((PULONG)0x740) +#define ExtendedBIOSDataSize ((PULONG)0x744) +#define RomFontPointers ((PULONG)0x700) + +enum +{ + INT1FhFont = 0x00, + INT43hFont = 0x01, + ROM_8x14CharacterFont = 0x02, + ROM_8x8DoubleDotFontLo = 0x03, + ROM_8x8DoubleDotFontHi = 0x04, + ROM_AlphaAlternate = 0x05, + ROM_8x16Font = 0x06, + ROM_Alternate9x16Font = 0x07, + UltraVision_8x20Font = 0x11, + UltraVision_8x10Font = 0x12, +}; + +void WinLdrSetupSpecialDataPointers() +{ + REGS BiosRegs; + + /* Get the address of the bios rom fonts. Win 2003 videoprt reads these + values from address 0x700 .. 0x718 and store them in the registry + in HKLM\System\CurrentControlSet\Control\Wow\RomFontPointers + Int 10h, AX=1130h, BH = pointer specifier + returns: es:bp = address */ + BiosRegs.d.eax = 0x1130; + BiosRegs.b.bh = ROM_8x14CharacterFont; + Int386(0x10, &BiosRegs, &BiosRegs); + RomFontPointers[0] = BiosRegs.w.es << 4 | BiosRegs.w.bp; + + BiosRegs.b.bh = ROM_8x8DoubleDotFontLo; + Int386(0x10, &BiosRegs, &BiosRegs); + RomFontPointers[1] = BiosRegs.w.es << 16 | BiosRegs.w.bp; + + BiosRegs.b.bh = ROM_8x8DoubleDotFontHi; + Int386(0x10, &BiosRegs, &BiosRegs); + RomFontPointers[2] = BiosRegs.w.es << 16 | BiosRegs.w.bp; + + BiosRegs.b.bh = ROM_AlphaAlternate; + Int386(0x10, &BiosRegs, &BiosRegs); + RomFontPointers[3] = BiosRegs.w.es << 16 | BiosRegs.w.bp; + + BiosRegs.b.bh = ROM_8x16Font; + Int386(0x10, &BiosRegs, &BiosRegs); + RomFontPointers[4] = BiosRegs.w.es << 16 | BiosRegs.w.bp; + + BiosRegs.b.bh = ROM_Alternate9x16Font; + Int386(0x10, &BiosRegs, &BiosRegs); + RomFontPointers[5] = BiosRegs.w.es << 16 | BiosRegs.w.bp; + + /* Store address of the extended bios data area in 0x740 */ + BiosRegs.d.eax = 0xC100; + Int386(0x15, &BiosRegs, &BiosRegs); + if (INT386_SUCCESS(BiosRegs)) + { + *ExtendedBIOSDataArea = BiosRegs.w.es << 4; + *ExtendedBIOSDataSize = 1024; + ERR(">> *ExtendedBIOSDataArea = 0x%lx\n", *ExtendedBIOSDataArea); + } + else + { + ERR("Couldn't get address of extended BIOS data area\n"); + *ExtendedBIOSDataArea = 0; + *ExtendedBIOSDataSize = 0; + } + + /* Store size of the extended bios data area in 0x740 */ +} + void WinLdrSetupMachineDependent(PLOADER_PARAMETER_BLOCK LoaderBlock) { ULONG TssSize; @@ -331,6 +402,9 @@ /* Map stuff like PCR, KI_USER_SHARED_DATA and Apic */ WinLdrMapSpecialPages(); + + /* Set some special fields */ + WinLdrSetupSpecialDataPointers(); } Modified: trunk/reactos/boot/freeldr/freeldr/arch/realmode/int386.inc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/realmode/int386.inc [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/realmode/int386.inc [iso-8859-1] Tue Sep 27 20:25:51 2011 @@ -29,6 +29,7 @@ mov edx, dword ptr cs:[BSS_RegisterSet + REGS_EDX] mov esi, dword ptr cs:[BSS_RegisterSet + REGS_ESI] mov edi, dword ptr cs:[BSS_RegisterSet + REGS_EDI] + mov ebp, dword ptr cs:[BSS_RegisterSet + REGS_EBP] /* Do not set the flags register */ /* only return its value in regsout */ @@ -46,6 +47,7 @@ mov dword ptr cs:[BSS_RegisterSet + REGS_EDX], edx mov dword ptr cs:[BSS_RegisterSet + REGS_ESI], esi mov dword ptr cs:[BSS_RegisterSet + REGS_EDI], edi + mov dword ptr cs:[BSS_RegisterSet + REGS_EBP], ebp mov ax, ds mov word ptr cs:[BSS_RegisterSet + REGS_DS], ax
13 years, 2 months
1
0
0
0
[tkreuzer] 53875: [FREELDR] Add ebp to the bios register set.
by tkreuzer@svn.reactos.org
Author: tkreuzer Date: Tue Sep 27 19:29:52 2011 New Revision: 53875 URL:
http://svn.reactos.org/svn/reactos?rev=53875&view=rev
Log: [FREELDR] Add ebp to the bios register set. Modified: trunk/reactos/boot/freeldr/freeldr/arch/amd64/int386.S trunk/reactos/boot/freeldr/freeldr/arch/i386/entry.S trunk/reactos/boot/freeldr/freeldr/arch/i386/int386.S trunk/reactos/boot/freeldr/freeldr/arch/realmode/int386.inc trunk/reactos/boot/freeldr/freeldr/include/arch/pc/pcbios.h trunk/reactos/boot/freeldr/freeldr/include/arch/pc/x86common.h Modified: trunk/reactos/boot/freeldr/freeldr/arch/amd64/int386.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/amd64/int386.S [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/amd64/int386.S [iso-8859-1] Tue Sep 27 19:29:52 2011 @@ -19,6 +19,7 @@ #include <asm.inc> #include <arch/pc/x86common.h> +#include <arch/pc/pcbios.h> .code64 EXTERN CallRealMode:PROC Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/entry.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/entry.S [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/entry.S [iso-8859-1] Tue Sep 27 19:29:52 2011 @@ -19,6 +19,7 @@ #include <asm.inc> #include <arch/pc/x86common.h> +#include <arch/pc/pcbios.h> EXTERN _BootMain:PROC EXTERN _InitIdt:PROC Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/int386.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/int386.S [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/int386.S [iso-8859-1] Tue Sep 27 19:29:52 2011 @@ -44,6 +44,8 @@ Int386_esi: .long 0 Int386_edi: + .long 0 +Int386_ebp: .long 0 Int386_ds: Modified: trunk/reactos/boot/freeldr/freeldr/arch/realmode/int386.inc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/realmode/int386.inc [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/realmode/int386.inc [iso-8859-1] Tue Sep 27 19:29:52 2011 @@ -1,4 +1,5 @@ +#include "../../include/arch/pc/pcbios.h" Int386: /* Save all registers + segment registers */ Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/pc/pcbios.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/arch/pc/pcbios.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/arch/pc/pcbios.h [iso-8859-1] Tue Sep 27 19:29:52 2011 @@ -10,6 +10,7 @@ unsigned long esi; unsigned long edi; + unsigned long ebp; unsigned short ds; unsigned short es; @@ -29,6 +30,7 @@ unsigned short si, _upper_si; unsigned short di, _upper_di; + unsigned short bp, _upper_bp; unsigned short ds; unsigned short es; @@ -56,6 +58,7 @@ unsigned short si, _upper_si; unsigned short di, _upper_di; + unsigned short bp, _upper_bp; unsigned short ds; unsigned short es; @@ -96,3 +99,19 @@ VOID DetectHardware(VOID); // Implemented in hardware.c #endif /* ! __ASM__ */ + +/* Layout of the REGS structure */ +#define REGS_EAX 0 +#define REGS_EBX 4 +#define REGS_ECX 8 +#define REGS_EDX 12 +#define REGS_ESI 16 +#define REGS_EDI 20 +#define REGS_EBP 24 +#define REGS_DS 28 +#define REGS_ES 30 +#define REGS_FS 32 +#define REGS_GS 34 +#define REGS_EFLAGS 36 +#define REGS_SIZE 40 + Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/pc/x86common.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/arch/pc/x86common.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/arch/pc/x86common.h [iso-8859-1] Tue Sep 27 19:29:52 2011 @@ -23,25 +23,10 @@ #define BIOSCALLBUFSEGMENT (BIOSCALLBUFFER/16) /* Buffer to store temporary data for any Int386() call */ #define BIOSCALLBUFOFFSET HEX(0000) /* Buffer to store temporary data for any Int386() call */ -/* Layout of the REGS structure */ -#define REGS_EAX 0 -#define REGS_EBX 4 -#define REGS_ECX 8 -#define REGS_EDX 12 -#define REGS_ESI 16 -#define REGS_EDI 20 -#define REGS_DS 24 -#define REGS_ES 26 -#define REGS_FS 28 -#define REGS_GS 30 -#define REGS_EFLAGS 32 -#define REGS_SIZE 36 - /* These addresses specify the realmode "BSS section" layout */ #define BSS_RealModeEntry (BSS_START + 0) -#define BSS_CallbackAddress (BSS_START + 4) -#define BSS_CallbackReturn (BSS_START + 8) -#define BSS_RegisterSet (BSS_START + 16) /* size = 36 */ +#define BSS_CallbackReturn (BSS_START + 4) +#define BSS_RegisterSet (BSS_START + 8) /* size = 40 */ #define BSS_IntVector (BSS_START + 52) #define BSS_PxeEntryPoint (BSS_START + 56) #define BSS_PxeBufferSegment (BSS_START + 60)
13 years, 2 months
1
0
0
0
[tfaber] 53874: [SHELL32_WINETEST] - Fix MSVC build. This is a (partial) Winesync
by tfaber@svn.reactos.org
Author: tfaber Date: Tue Sep 27 19:07:21 2011 New Revision: 53874 URL:
http://svn.reactos.org/svn/reactos?rev=53874&view=rev
Log: [SHELL32_WINETEST] - Fix MSVC build. This is a (partial) Winesync Modified: trunk/rostests/winetests/shell32/recyclebin.c Modified: trunk/rostests/winetests/shell32/recyclebin.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/winetests/shell32/recycle…
============================================================================== --- trunk/rostests/winetests/shell32/recyclebin.c [iso-8859-1] (original) +++ trunk/rostests/winetests/shell32/recyclebin.c [iso-8859-1] Tue Sep 27 19:07:21 2011 @@ -55,8 +55,8 @@ HRESULT hr; HANDLE file; SHFILEOPSTRUCTA shfo; - const CHAR *name="test.txt"; - CHAR buf[MAX_PATH+strlen(name)+2]; + const CHAR name[] = "test.txt"; + CHAR buf[MAX_PATH + sizeof(name) + 1]; if(!pSHQueryRecycleBinA) { skip("SHQueryRecycleBinA does not exist\n");
13 years, 2 months
1
0
0
0
[ekohl] 53873: [APITESTS] Add service tag tests. Patch by Thomas Faber.
by ekohl@svn.reactos.org
Author: ekohl Date: Tue Sep 27 13:06:33 2011 New Revision: 53873 URL:
http://svn.reactos.org/svn/reactos?rev=53873&view=rev
Log: [APITESTS] Add service tag tests. Patch by Thomas Faber. Added: trunk/rostests/apitests/advapi32/ trunk/rostests/apitests/advapi32/CMakeLists.txt (with props) trunk/rostests/apitests/advapi32/CreateService.c (with props) trunk/rostests/apitests/advapi32/advapi32_apitest.rbuild (with props) trunk/rostests/apitests/advapi32/testlist.c (with props) Modified: trunk/rostests/apitests/CMakeLists.txt trunk/rostests/apitests/directory.rbuild Modified: trunk/rostests/apitests/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/CMakeLists.txt?r…
============================================================================== --- trunk/rostests/apitests/CMakeLists.txt [iso-8859-1] (original) +++ trunk/rostests/apitests/CMakeLists.txt [iso-8859-1] Tue Sep 27 13:06:33 2011 @@ -1,6 +1,7 @@ add_library(apitest apitest.c) +add_subdirectory(advapi32) add_subdirectory(dciman32) add_subdirectory(gdi32) add_subdirectory(ntdll) Added: trunk/rostests/apitests/advapi32/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/advapi32/CMakeLi…
============================================================================== --- trunk/rostests/apitests/advapi32/CMakeLists.txt (added) +++ trunk/rostests/apitests/advapi32/CMakeLists.txt [iso-8859-1] Tue Sep 27 13:06:33 2011 @@ -1,0 +1,12 @@ + +add_definitions(-D_DLL -D__USE_CRTIMP) + +list(APPEND SOURCE + CreateService.c + testlist.c) + +add_executable(advapi32_apitest ${SOURCE}) +target_link_libraries(advapi32_apitest wine) +set_module_type(advapi32_apitest win32cui) +add_importlibs(advapi32_apitest advapi32 msvcrt kernel32 ntdll) +add_cd_file(TARGET advapi32_apitest DESTINATION reactos/bin FOR all) Propchange: trunk/rostests/apitests/advapi32/CMakeLists.txt ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/rostests/apitests/advapi32/CMakeLists.txt ------------------------------------------------------------------------------ svn:keywords = author date id revision Added: trunk/rostests/apitests/advapi32/CreateService.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/advapi32/CreateS…
============================================================================== --- trunk/rostests/apitests/advapi32/CreateService.c (added) +++ trunk/rostests/apitests/advapi32/CreateService.c [iso-8859-1] Tue Sep 27 13:06:33 2011 @@ -1,0 +1,125 @@ +/* + * PROJECT: ReactOS api tests + * LICENSE: GPLv2+ - See COPYING in the top level directory + * PURPOSE: Test for CreateService + * PROGRAMMER: Thomas Faber + */ + +#include <wine/test.h> +#include <windows.h> +#include <strsafe.h> + +#define ok_lasterr(err, s) ok(GetLastError() == (err), "%s GetLastError()=0x%08lx, expected 0x%08lx\n", s, GetLastError(), (DWORD)(err)) + +static int MakeService(SC_HANDLE hScm, const wchar_t *serviceName, SC_HANDLE *hService, DWORD *tag) +{ + DWORD ret; + HKEY hKey = NULL; + DWORD type = 0, tagData = 0, tagSize; + wchar_t keyName[256]; + + SetLastError(DNS_ERROR_RCODE_NXRRSET); + *hService = CreateServiceW( + hScm, + serviceName, + NULL, + DELETE, + SERVICE_KERNEL_DRIVER, + SERVICE_BOOT_START, + SERVICE_ERROR_IGNORE, + L"%systemroot%\\drivers\\win32k.sys", + L"advapi32_apitest_CreateService_Test_Group", + tag, + NULL, + NULL, + NULL); + + ok(*hService != NULL, "Failed to create service, error=0x%08lx\n", GetLastError()); + if (!*hService) + { + skip("No service; cannot proceed with CreateService test\n"); + return 1; + } + + ok_lasterr(ERROR_SUCCESS, "CreateServiceW"); + + ok(*tag != 0, "tag is zero, expected nonzero\n"); + + StringCbPrintfW(keyName, sizeof keyName, L"System\\CurrentControlSet\\Services\\%ls", serviceName); + ret = RegOpenKeyW(HKEY_LOCAL_MACHINE, keyName, &hKey); + ok(ret == ERROR_SUCCESS, "RegOpenKeyW failed with 0x%08lx\n", ret); + if (ret) + { + skip("No regkey; cannot proceed with CreateService test\n"); + return 2; + } + + tagSize = sizeof tagData; + ret = RegQueryValueExW(hKey, L"Tag", NULL, &type, (PBYTE)&tagData, &tagSize); + ok(ret == ERROR_SUCCESS, "RegQueryValueExW returned 0x%08lx\n", ret); + ok(type == REG_DWORD, "type=%lu, expected REG_DWORD\n", type); + ok(tagSize == sizeof tagData, "tagSize=%lu, expected 4\n", tagSize); + ok(tagData == *tag, "tag=%lu, but registry says %lu\n", *tag, tagData); + + RegCloseKey(hKey); + + return 0; +} + +static void Test_CreateService(void) +{ + SC_HANDLE hScm = NULL; + SC_HANDLE hService1 = NULL, hService2 = NULL; + LONG ret; + DWORD tag1 = 0, tag2 = 0; + + SetLastError(DNS_ERROR_RCODE_NXRRSET); + hScm = OpenSCManagerW(NULL, NULL, SC_MANAGER_CREATE_SERVICE); + ok(hScm != NULL, "Failed to open service manager, error=0x%08lx\n", GetLastError()); + if (!hScm) + { + skip("No service control manager; cannot proceed with CreateService test\n"); + goto cleanup; + } + + ok_lasterr(ERROR_SUCCESS, "OpenSCManagerW"); + + if (MakeService(hScm, L"advapi32_apitest_CreateService_Test_Service1", &hService1, &tag1)) + goto cleanup; + + if (MakeService(hScm, L"advapi32_apitest_CreateService_Test_Service2", &hService2, &tag2)) + goto cleanup; + + ok(tag1 != tag2, "tag1=%lu, tag2=%lu\n", tag1, tag2); + +cleanup: + if (hService2) + { + SetLastError(DNS_ERROR_RCODE_NXRRSET); + ret = DeleteService(hService2); + ok(ret == TRUE, "DeleteService returned %ld, expected 1\n", ret); + ok(GetLastError() == DNS_ERROR_RCODE_NXRRSET /* win7 */ + || GetLastError() == ERROR_SUCCESS /* win2k3 */, "DeleteService (Error: %ld)\n", GetLastError()); + + CloseServiceHandle(hService2); + } + + if (hService1) + { + SetLastError(DNS_ERROR_RCODE_NXRRSET); + ret = DeleteService(hService1); + ok(ret == TRUE, "DeleteService returned %ld, expected 1\n", ret); + ok(GetLastError() == DNS_ERROR_RCODE_NXRRSET /* win7 */ + || GetLastError() == ERROR_SUCCESS /* win2k3 */, "DeleteService (Error: %ld)\n", GetLastError()); + + CloseServiceHandle(hService1); + } + + if (hScm) + CloseServiceHandle(hScm); +} + +START_TEST(CreateService) +{ + Test_CreateService(); +} Propchange: trunk/rostests/apitests/advapi32/CreateService.c ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/rostests/apitests/advapi32/CreateService.c ------------------------------------------------------------------------------ svn:keywords = author date id revision Added: trunk/rostests/apitests/advapi32/advapi32_apitest.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/advapi32/advapi3…
============================================================================== --- trunk/rostests/apitests/advapi32/advapi32_apitest.rbuild (added) +++ trunk/rostests/apitests/advapi32/advapi32_apitest.rbuild [iso-8859-1] Tue Sep 27 13:06:33 2011 @@ -1,0 +1,15 @@ +<?xml version="1.0"?> +<!DOCTYPE module SYSTEM "../../../tools/rbuild/project.dtd"> +<group> +<module name="advapi32_apitest" type="win32cui" installbase="bin" installname="advapi32_apitest.exe"> + <include base="advapi32_apitest">.</include> + <library>wine</library> + <library>gdi32</library> + <library>user32</library> + <library>pseh</library> + <library>advapi32</library> + <file>testlist.c</file> + <file>CreateService.c</file> + +</module> +</group> Propchange: trunk/rostests/apitests/advapi32/advapi32_apitest.rbuild ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/rostests/apitests/advapi32/advapi32_apitest.rbuild ------------------------------------------------------------------------------ svn:keywords = author date id revision Added: trunk/rostests/apitests/advapi32/testlist.c URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/advapi32/testlis…
============================================================================== --- trunk/rostests/apitests/advapi32/testlist.c (added) +++ trunk/rostests/apitests/advapi32/testlist.c [iso-8859-1] Tue Sep 27 13:06:33 2011 @@ -1,0 +1,16 @@ +#define WIN32_LEAN_AND_MEAN +#define __ROS_LONG64__ +#include <windows.h> + +#define STANDALONE +#include "wine/test.h" + +extern void func_CreateService(void); + +const struct test winetest_testlist[] = +{ + { "CreateService", func_CreateService }, + + { 0, 0 } +}; + Propchange: trunk/rostests/apitests/advapi32/testlist.c ------------------------------------------------------------------------------ svn:eol-style = native Propchange: trunk/rostests/apitests/advapi32/testlist.c ------------------------------------------------------------------------------ svn:keywords = author date id revision Modified: trunk/rostests/apitests/directory.rbuild URL:
http://svn.reactos.org/svn/reactos/trunk/rostests/apitests/directory.rbuild…
============================================================================== --- trunk/rostests/apitests/directory.rbuild [iso-8859-1] (original) +++ trunk/rostests/apitests/directory.rbuild [iso-8859-1] Tue Sep 27 13:06:33 2011 @@ -5,6 +5,10 @@ <include base="apitest">.</include> <file>apitest.c</file> </module> + + <directory name="advapi32"> + <xi:include href="advapi32/advapi32_apitest.rbuild" /> + </directory> <directory name="dciman32"> <xi:include href="dciman32/dciman32_apitest.rbuild" />
13 years, 2 months
1
0
0
0
[ekohl] 53872: [SERVICES] Assign a new Tag to new or changed services. Patch by Thomas Faber! See issue #6147 for more details.
by ekohl@svn.reactos.org
Author: ekohl Date: Tue Sep 27 12:42:42 2011 New Revision: 53872 URL:
http://svn.reactos.org/svn/reactos?rev=53872&view=rev
Log: [SERVICES] Assign a new Tag to new or changed services. Patch by Thomas Faber! See issue #6147 for more details. Modified: trunk/reactos/base/system/services/rpcserver.c Modified: trunk/reactos/base/system/services/rpcserver.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/base/system/services/rpcse…
============================================================================== --- trunk/reactos/base/system/services/rpcserver.c [iso-8859-1] (original) +++ trunk/reactos/base/system/services/rpcserver.c [iso-8859-1] Tue Sep 27 12:42:42 2011 @@ -77,6 +77,7 @@ SERVICE_STOP | \ SERVICE_START) +#define TAG_ARRAY_SIZE 32 /* VARIABLES ***************************************************************/ @@ -263,10 +264,124 @@ DWORD ScmAssignNewTag(PSERVICE lpService) { - /* FIXME */ - DPRINT("Assigning new tag to service %S\n", lpService->lpServiceName); - lpService->dwTag = 0; - return ERROR_SUCCESS; + HKEY hKey = NULL; + DWORD dwError; + DWORD dwGroupTagCount = 0; + PDWORD pdwGroupTags = NULL; + DWORD dwFreeTag = 0; + DWORD dwTagUsedBase = 1; + BOOLEAN TagUsed[TAG_ARRAY_SIZE]; + DWORD dwTagOffset; + DWORD i; + DWORD cbDataSize; + PLIST_ENTRY ServiceEntry; + PSERVICE CurrentService; + + dwError = RegOpenKeyExW(HKEY_LOCAL_MACHINE, + L"System\\CurrentControlSet\\Control\\GroupOrderList", + 0, + KEY_READ, + &hKey); + + if (dwError != ERROR_SUCCESS) + goto findFreeTag; + + /* query value length */ + cbDataSize = 0; + dwError = RegQueryValueExW(hKey, + lpService->lpGroup->szGroupName, + NULL, + NULL, + NULL, + &cbDataSize); + + if (dwError != ERROR_MORE_DATA) + goto findFreeTag; + + pdwGroupTags = HeapAlloc(GetProcessHeap(), 0, cbDataSize); + if (!pdwGroupTags) + { + dwError = ERROR_NOT_ENOUGH_MEMORY; + goto cleanup; + } + + dwError = RegQueryValueExW(hKey, + lpService->lpGroup->szGroupName, + NULL, + NULL, + (LPBYTE)pdwGroupTags, + &cbDataSize); + + if (dwError != ERROR_SUCCESS) + goto findFreeTag; + + dwGroupTagCount = min(pdwGroupTags[0], cbDataSize / sizeof(pdwGroupTags[0])); + +findFreeTag: + do + { + /* mark all tags as unused */ + for (i = 0; i < TAG_ARRAY_SIZE; i++) + TagUsed[i] = FALSE; + + /* mark tags in GroupOrderList as used */ + for (i = 1; i <= dwGroupTagCount; i++) + { + dwTagOffset = pdwGroupTags[i] - dwTagUsedBase; + if (dwTagOffset >= 0 && dwTagOffset < TAG_ARRAY_SIZE) + TagUsed[dwTagOffset] = TRUE; + } + + /* mark tags in service list as used */ + ServiceEntry = lpService->ServiceListEntry.Flink; + while (ServiceEntry != &lpService->ServiceListEntry) + { + CurrentService = CONTAINING_RECORD(ServiceEntry, SERVICE, ServiceListEntry); + if (CurrentService->lpGroup == lpService->lpGroup) + { + dwTagOffset = CurrentService->dwTag - dwTagUsedBase; + if (dwTagOffset >= 0 && dwTagOffset < TAG_ARRAY_SIZE) + TagUsed[dwTagOffset] = TRUE; + } + + ServiceEntry = ServiceEntry->Flink; + } + + /* find unused tag, if any */ + for (i = 0; i < TAG_ARRAY_SIZE; i++) + { + if (!TagUsed[i]) + { + dwFreeTag = dwTagUsedBase + i; + break; + } + } + + dwTagUsedBase += TAG_ARRAY_SIZE; + } + while (!dwFreeTag); + +cleanup: + if (pdwGroupTags) + HeapFree(GetProcessHeap(), 0, pdwGroupTags); + + if (hKey) + RegCloseKey(hKey); + + if (dwFreeTag) + { + lpService->dwTag = dwFreeTag; + DPRINT("Assigning new tag %lu to service %S in group %S\n", + lpService->dwTag, lpService->lpServiceName, lpService->lpGroup->szGroupName); + dwError = ERROR_SUCCESS; + } + else + { + DPRINT1("Failed to assign new tag to service %S, error=%lu\n", + lpService->lpServiceName, dwError); + } + + return dwError; }
13 years, 2 months
1
0
0
0
← Newer
1
2
3
4
5
6
7
...
40
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
Results per page:
10
25
50
100
200