ReactOS.org
Sign In
Sign Up
Sign In
Sign Up
Manage this list
×
Keyboard Shortcuts
Thread View
j
: Next unread message
k
: Previous unread message
j a
: Jump to all threads
j l
: Jump to MailingList overview
2024
December
November
October
September
August
July
June
May
April
March
February
January
2023
December
November
October
September
August
July
June
May
April
March
February
January
2022
December
November
October
September
August
July
June
May
April
March
February
January
2021
December
November
October
September
August
July
June
May
April
March
February
January
2020
December
November
October
September
August
July
June
May
April
March
February
January
2019
December
November
October
September
August
July
June
May
April
March
February
January
2018
December
November
October
September
August
July
June
May
April
March
February
January
2017
December
November
October
September
August
July
June
May
April
March
February
January
2016
December
November
October
September
August
July
June
May
April
March
February
January
2015
December
November
October
September
August
July
June
May
April
March
February
January
2014
December
November
October
September
August
July
June
May
April
March
February
January
2013
December
November
October
September
August
July
June
May
April
March
February
January
2012
December
November
October
September
August
July
June
May
April
March
February
January
2011
December
November
October
September
August
July
June
May
April
March
February
January
2010
December
November
October
September
August
July
June
May
April
March
February
January
2009
December
November
October
September
August
July
June
May
April
March
February
January
2008
December
November
October
September
August
July
June
May
April
March
February
January
2007
December
November
October
September
August
July
June
May
April
March
February
January
2006
December
November
October
September
August
July
June
May
April
March
February
January
2005
December
November
October
September
August
July
June
May
April
March
February
January
2004
December
November
October
September
August
July
June
May
April
March
February
List overview
Download
Ros-diffs
February 2015
----- 2024 -----
December 2024
November 2024
October 2024
September 2024
August 2024
July 2024
June 2024
May 2024
April 2024
March 2024
February 2024
January 2024
----- 2023 -----
December 2023
November 2023
October 2023
September 2023
August 2023
July 2023
June 2023
May 2023
April 2023
March 2023
February 2023
January 2023
----- 2022 -----
December 2022
November 2022
October 2022
September 2022
August 2022
July 2022
June 2022
May 2022
April 2022
March 2022
February 2022
January 2022
----- 2021 -----
December 2021
November 2021
October 2021
September 2021
August 2021
July 2021
June 2021
May 2021
April 2021
March 2021
February 2021
January 2021
----- 2020 -----
December 2020
November 2020
October 2020
September 2020
August 2020
July 2020
June 2020
May 2020
April 2020
March 2020
February 2020
January 2020
----- 2019 -----
December 2019
November 2019
October 2019
September 2019
August 2019
July 2019
June 2019
May 2019
April 2019
March 2019
February 2019
January 2019
----- 2018 -----
December 2018
November 2018
October 2018
September 2018
August 2018
July 2018
June 2018
May 2018
April 2018
March 2018
February 2018
January 2018
----- 2017 -----
December 2017
November 2017
October 2017
September 2017
August 2017
July 2017
June 2017
May 2017
April 2017
March 2017
February 2017
January 2017
----- 2016 -----
December 2016
November 2016
October 2016
September 2016
August 2016
July 2016
June 2016
May 2016
April 2016
March 2016
February 2016
January 2016
----- 2015 -----
December 2015
November 2015
October 2015
September 2015
August 2015
July 2015
June 2015
May 2015
April 2015
March 2015
February 2015
January 2015
----- 2014 -----
December 2014
November 2014
October 2014
September 2014
August 2014
July 2014
June 2014
May 2014
April 2014
March 2014
February 2014
January 2014
----- 2013 -----
December 2013
November 2013
October 2013
September 2013
August 2013
July 2013
June 2013
May 2013
April 2013
March 2013
February 2013
January 2013
----- 2012 -----
December 2012
November 2012
October 2012
September 2012
August 2012
July 2012
June 2012
May 2012
April 2012
March 2012
February 2012
January 2012
----- 2011 -----
December 2011
November 2011
October 2011
September 2011
August 2011
July 2011
June 2011
May 2011
April 2011
March 2011
February 2011
January 2011
----- 2010 -----
December 2010
November 2010
October 2010
September 2010
August 2010
July 2010
June 2010
May 2010
April 2010
March 2010
February 2010
January 2010
----- 2009 -----
December 2009
November 2009
October 2009
September 2009
August 2009
July 2009
June 2009
May 2009
April 2009
March 2009
February 2009
January 2009
----- 2008 -----
December 2008
November 2008
October 2008
September 2008
August 2008
July 2008
June 2008
May 2008
April 2008
March 2008
February 2008
January 2008
----- 2007 -----
December 2007
November 2007
October 2007
September 2007
August 2007
July 2007
June 2007
May 2007
April 2007
March 2007
February 2007
January 2007
----- 2006 -----
December 2006
November 2006
October 2006
September 2006
August 2006
July 2006
June 2006
May 2006
April 2006
March 2006
February 2006
January 2006
----- 2005 -----
December 2005
November 2005
October 2005
September 2005
August 2005
July 2005
June 2005
May 2005
April 2005
March 2005
February 2005
January 2005
----- 2004 -----
December 2004
November 2004
October 2004
September 2004
August 2004
July 2004
June 2004
May 2004
April 2004
March 2004
February 2004
ros-diffs@reactos.org
16 participants
372 discussions
Start a n
N
ew thread
[hbelusca] 66147: [STLPORT] Fix assignment. Patch by Victor Martinez. CORE-8117 #resolve #comment Fixed in r66147, thanks!
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sun Feb 1 22:37:06 2015 New Revision: 66147 URL:
http://svn.reactos.org/svn/reactos?rev=66147&view=rev
Log: [STLPORT] Fix assignment. Patch by Victor Martinez. CORE-8117 #resolve #comment Fixed in r66147, thanks! Modified: trunk/reactos/include/c++/stlport/stl/_fstream.c Modified: trunk/reactos/include/c++/stlport/stl/_fstream.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/c%2B%2B/stlport/st…
============================================================================== --- trunk/reactos/include/c++/stlport/stl/_fstream.c [iso-8859-1] (original) +++ trunk/reactos/include/c++/stlport/stl/_fstream.c [iso-8859-1] Sun Feb 1 22:37:06 2015 @@ -84,7 +84,7 @@ if (_M_in_output_mode) { __ok = __ok && !_Traits::eq_int_type(this->overflow(traits_type::eof()), traits_type::eof()); - __ok == __ok && this->_M_unshift(); + __ok = __ok && this->_M_unshift(); } else if (_M_in_input_mode) this->_M_exit_input_mode();
9 years, 10 months
1
0
0
0
[hbelusca] 66146: [FREELDR]: All tabs to 4 spaces and remove trailing whitespace.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sun Feb 1 22:15:32 2015 New Revision: 66146 URL:
http://svn.reactos.org/svn/reactos?rev=66146&view=rev
Log: [FREELDR]: All tabs to 4 spaces and remove trailing whitespace. Modified: trunk/reactos/boot/freeldr/freeldr/CHANGELOG trunk/reactos/boot/freeldr/freeldr/arch/amd64/entry.S trunk/reactos/boot/freeldr/freeldr/arch/amd64/int386.S trunk/reactos/boot/freeldr/freeldr/arch/amd64/pnpbios.S trunk/reactos/boot/freeldr/freeldr/arch/arm/winldr.c trunk/reactos/boot/freeldr/freeldr/arch/i386/drvmap.S trunk/reactos/boot/freeldr/freeldr/arch/i386/entry.S trunk/reactos/boot/freeldr/freeldr/arch/i386/i386bug.c trunk/reactos/boot/freeldr/freeldr/arch/i386/i386pnp.S trunk/reactos/boot/freeldr/freeldr/arch/i386/i386trap.S trunk/reactos/boot/freeldr/freeldr/arch/i386/linux.S trunk/reactos/boot/freeldr/freeldr/arch/i386/mb.S trunk/reactos/boot/freeldr/freeldr/arch/powerpc/boot.s trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c trunk/reactos/boot/freeldr/freeldr/arch/powerpc/ofw_util.s trunk/reactos/boot/freeldr/freeldr/arch/powerpc/prep.c trunk/reactos/boot/freeldr/freeldr/arch/powerpc/prep.h trunk/reactos/boot/freeldr/freeldr/arch/powerpc/prep_vga.c trunk/reactos/boot/freeldr/freeldr/arch/realmode/amd64.S trunk/reactos/boot/freeldr/freeldr/arch/realmode/fathelp.inc trunk/reactos/boot/freeldr/freeldr/arch/realmode/helpers.inc trunk/reactos/boot/freeldr/freeldr/arch/realmode/i386.S trunk/reactos/boot/freeldr/freeldr/arch/realmode/int386.inc trunk/reactos/boot/freeldr/freeldr/arch/realmode/linux.inc trunk/reactos/boot/freeldr/freeldr/arch/realmode/pnp.inc trunk/reactos/boot/freeldr/freeldr/arch/realmode/pxe.inc trunk/reactos/boot/freeldr/freeldr/comm/rs232.c trunk/reactos/boot/freeldr/freeldr/include/ver.h trunk/reactos/boot/freeldr/freeldr/ui/directui.c trunk/reactos/boot/freeldr/freeldr/ui/minitui.c trunk/reactos/boot/freeldr/freeldr/windows/headless.c Modified: trunk/reactos/boot/freeldr/freeldr/CHANGELOG URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/CHANG…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/CHANGELOG [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/CHANGELOG [iso-8859-1] Sun Feb 1 22:15:32 2015 @@ -38,7 +38,7 @@ Changes in v1.8.24 (09/20/2004) (hbirr) -- Implemented the driver loading by the sequence of tag entries +- Implemented the driver loading by the sequence of tag entries in the GroupOrderList key. Changes in v1.8.23 (30/08/2004) (ekohl) @@ -56,7 +56,7 @@ - Experimental NTFS reading support with no boot code yet. - Adjusted detection timeouts for PS/2 and RS232 to the minimum allowed by the specifications. -- Enabled the 'Press any key to boot from CD' message in the ISO +- Enabled the 'Press any key to boot from CD' message in the ISO boot code and show it only when some hard disk is present. Changes in v1.8.20 (21/05/2004) (navaraf) @@ -228,7 +228,7 @@ - freeldr.c, bootmgr.c, setupldr.c, makefile: Renamed LoadBootManager() and ReactOSRunSetupLoader() to RunLoader(). Either bootmgr.o or setupldr.o is used to build freeldr.sys or - setupldr.sys + setupldr.sys Changes in v1.7.5 (8/21/2002) (brianp) Modified: trunk/reactos/boot/freeldr/freeldr/arch/amd64/entry.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/amd64/entry.S [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/amd64/entry.S [iso-8859-1] Sun Feb 1 22:15:32 2015 @@ -1,4 +1,3 @@ - #include <asm.inc> #include <arch/pc/x86common.h> @@ -45,11 +44,11 @@ xor rcx, rcx call BootMain - /* We should never get here */ + /* We should never get here */ stop: - jmp stop - nop - nop + jmp stop + nop + nop PUBLIC Reboot @@ -74,17 +73,17 @@ SwitchToReal: /* Set sane segments */ - mov ax, LMODE_DS - mov ds, ax - mov es, ax - mov fs, ax - mov gs, ax - //mov ss, ax + mov ax, LMODE_DS + mov ds, ax + mov es, ax + mov fs, ax + mov gs, ax + //mov ss, ax //mov word ptr [HEX(0b8008)], HEX(0e00) + '4' - /* Save 64-bit stack pointer */ - mov qword ptr [stack64], rsp + /* Save 64-bit stack pointer */ + mov qword ptr [stack64], rsp /* Step 1 - jump to compatibility segment */ jmp fword ptr [jumpvector] @@ -97,15 +96,15 @@ /* Note: In fact the CPU is in 32 bit mode here. But it will interprete the generated instructions accordingly. rax will become eax */ - /* Step 2 - deactivate long mode, by disabling paging */ - mov rax, cr0 - and eax, HEX(7fffffff) //~0x80000000, upper bits cleared - mov cr0, rax + /* Step 2 - deactivate long mode, by disabling paging */ + mov rax, cr0 + and eax, HEX(7fffffff) //~0x80000000, upper bits cleared + mov cr0, rax // mov word ptr [HEX(0b800a)], HEX(0e00) + '5' - /* Step 3 - jump to 16-bit segment to set the limit correctly */ - .byte HEX(0EA) // 32bit long jmp + /* Step 3 - jump to 16-bit segment to set the limit correctly */ + .byte HEX(0EA) // 32bit long jmp AddressOfRealModeEntryPoint: .long 0 // receives address of RealModeEntryPoint .word HEX(20)//RMODE_CS @@ -119,7 +118,7 @@ ///////////////////////////////////////// - /* 64-bit stack pointer */ + /* 64-bit stack pointer */ stack64: .double STACKADDR 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] Sun Feb 1 22:15:32 2015 @@ -34,18 +34,18 @@ mov qword ptr [r11 + 16], rdx mov qword ptr [r11 + 24], r8 - /* Save non-volatile registers */ - push rbx - push rbp - push rsi - push rdi + /* Save non-volatile registers */ + push rbx + push rbp + push rsi + push rdi /* Alloc stack space for home registers */ - sub rsp, 40 + sub rsp, 40 //.ENDPROLOG int386_2: - /* Copy the int vector to shared memory */ + /* Copy the int vector to shared memory */ mov dword ptr [BSS_IntVector], ecx /* Copy input registers */ Modified: trunk/reactos/boot/freeldr/freeldr/arch/amd64/pnpbios.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/amd64/pnpbios.S [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/amd64/pnpbios.S [iso-8859-1] Sun Feb 1 22:15:32 2015 @@ -41,25 +41,25 @@ xor rdi, rdi /* init rsi */ - mov rsi, HEX(0F0000) + mov rsi, HEX(0F0000) pnp_again: mov eax, [rsi] - cmp eax, HEX(506E5024) /* "$PnP" */ + cmp eax, HEX(506E5024) /* "$PnP" */ je pnp_found - cmp rsi, HEX(0FFFF0) + cmp rsi, HEX(0FFFF0) je pnp_not_found pnp_add: - add rsi, 16 + add rsi, 16 jmp pnp_again pnp_found: /* first calculate the checksum */ push rsi - push HEX(21) + push HEX(21) pop rcx xor edx, edx @@ -76,14 +76,14 @@ /* Calculate the bios entry point (far pointer) */ xor eax, eax - mov ax, [rsi + HEX(0F)] - shl eax, 16 - mov ax, [rsi + HEX(0D)] - mov dword ptr [BSS_PnpBiosEntryPoint], eax + mov ax, [rsi + HEX(0F)] + shl eax, 16 + mov ax, [rsi + HEX(0D)] + mov dword ptr [BSS_PnpBiosEntryPoint], eax /* Store bios data segment */ mov ax, [rsi + HEX(1B)] - mov word ptr [BSS_PnpBiosDataSegment], ax + mov word ptr [BSS_PnpBiosDataSegment], ax pnp_not_found: mov rax, rdi @@ -109,14 +109,14 @@ call CallRealMode xor eax, eax - mov ax, [BSS_PnpNodeSize] - mov [rcx], eax - mov ax, [BSS_PnpNodeCount] - mov [rdx], eax + mov ax, [BSS_PnpNodeSize] + mov [rcx], eax + mov ax, [BSS_PnpNodeCount] + mov [rdx], eax - mov eax, dword ptr [BSS_PnpResult] + mov eax, dword ptr [BSS_PnpResult] - ret + ret @@ -128,29 +128,29 @@ PUBLIC PnpBiosGetDeviceNode PnpBiosGetDeviceNode: - /* get current node number */ - mov al, [rcx] - mov byte ptr [BSS_PnpNodeNumber], al + /* get current node number */ + mov al, [rcx] + mov byte ptr [BSS_PnpNodeNumber], al - /* convert pointer to node buffer to segment/offset */ - mov rax, rdx - shr eax, 4 - mov word ptr [BSS_PnpBiosBufferSegment], ax - mov rax, rdx - and eax, HEX(0f) - mov word ptr [BSS_PnpBiosBufferOffset], ax + /* convert pointer to node buffer to segment/offset */ + mov rax, rdx + shr eax, 4 + mov word ptr [BSS_PnpBiosBufferSegment], ax + mov rax, rdx + and eax, HEX(0f) + mov word ptr [BSS_PnpBiosBufferOffset], ax /* Call the real mode function */ mov bx, FNID_PnpBiosGetDeviceNode call CallRealMode - /* update node number */ - mov al, byte ptr [BSS_PnpNodeNumber] - mov [rcx], al + /* update node number */ + mov al, byte ptr [BSS_PnpNodeNumber] + mov [rcx], al - mov eax, [BSS_PnpResult] + mov eax, [BSS_PnpResult] - ret + ret END /* EOF */ Modified: trunk/reactos/boot/freeldr/freeldr/arch/arm/winldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/arm/winldr.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/arm/winldr.c [iso-8859-1] Sun Feb 1 22:15:32 2015 @@ -106,12 +106,12 @@ PHARDWARE_PDE_ARMV6 PointerPde; PHARDWARE_LARGE_PTE_ARMV6 LargePte; PFN_NUMBER Pfn; - + /* Setup the Startup PDE */ LargePte = &PdrPage->PageDir.Pte[StartupPdePageTableIndex]; TempLargePte.PageFrameNumber = PaToLargePfn((ULONG_PTR)&PdrPage->PageDir); *LargePte = TempLargePte; - + /* Map-in the PDR */ LargePte = &PdrPage->PageDir.Pte[PdrPageTableIndex]; *LargePte = TempLargePte; @@ -130,7 +130,7 @@ *PointerPde++ = TempPde; } - /* + /* * Now map these page tables in PTE space (MiAddressToPte(PTE_BASE)). * Note that they all live on a single page, since each is 1KB. */ @@ -156,7 +156,7 @@ TempPte.PageFrameNumber = 0; *PointerPte = TempPte; - /* TODO: Map in the kernel CPTs */ + /* TODO: Map in the kernel CPTs */ return TRUE; } @@ -177,7 +177,7 @@ LoaderBlock->u.Arm.SecondLevelDcacheFillSize = SecondLevelDcacheFillSize; LoaderBlock->u.Arm.SecondLevelIcacheSize = SecondLevelIcacheSize; LoaderBlock->u.Arm.SecondLevelIcacheFillSize = SecondLevelIcacheSize; - + /* Write initial context information */ LoaderBlock->KernelStack = (ULONG_PTR)PdrPage->KernelStack; LoaderBlock->KernelStack += KERNEL_STACK_SIZE; @@ -248,11 +248,11 @@ WinLdrSetProcessorContext(PVOID GdtIdt, IN ULONG Pcr, IN ULONG Tss) -{ +{ ARM_CONTROL_REGISTER ControlRegister; ARM_TTB_REGISTER TtbRegister; ARM_DOMAIN_REGISTER DomainRegister; - + /* Set the TTBR */ TtbRegister.AsUlong = (ULONG_PTR)&PdrPage->PageDir; ASSERT(TtbRegister.Reserved == 0); @@ -270,5 +270,5 @@ ControlRegister.DCacheEnabled = TRUE; ControlRegister.ForceAp = TRUE; ControlRegister.ExtendedPageTables = TRUE; - KeArmControlRegisterSet(ControlRegister); -} + KeArmControlRegisterSet(ControlRegister); +} Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/drvmap.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/drvmap.S [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/drvmap.S [iso-8859-1] Sun Feb 1 22:15:32 2015 @@ -27,115 +27,115 @@ _DriveMapInt13HandlerStart: Int13Handler: - push bp - mov bp, sp - push ax - push cx - push si + push bp + mov bp, sp + push ax + push cx + push si - cld + cld - /* Get callers flags from stack */ - mov ax, [bp + 6] - mov word ptr cs:[CallersFlags - Int13Handler], ax + /* Get callers flags from stack */ + mov ax, [bp + 6] + mov word ptr cs:[CallersFlags - Int13Handler], ax - /* Save the drive number they passed in */ - mov cs:[PassedInDriveNumber - Int13Handler], dl + /* Save the drive number they passed in */ + mov cs:[PassedInDriveNumber - Int13Handler], dl - /* Now we need to perform the mapping */ - xor cx, cx - mov si, offset Int13HandlerMapCount - Int13Handler + /* Now we need to perform the mapping */ + xor cx, cx + mov si, offset Int13HandlerMapCount - Int13Handler - /* Get the count of drives in the map list */ - mov cl, cs:[si] - inc si + /* Get the count of drives in the map list */ + mov cl, cs:[si] + inc si - /* If the map list is empty then just call the old int 13h handler */ - cmp cl, 0 - jz CallOldInt13Handler + /* If the map list is empty then just call the old int 13h handler */ + cmp cl, 0 + jz CallOldInt13Handler GetMappedDriveNumberLoop: - /* Get the next drive number in the list */ - lods ax, cs:[si] + /* Get the next drive number in the list */ + lods ax, cs:[si] - /* Check to see if it's the one they are calling int 13h for */ - cmp dl, al + /* Check to see if it's the one they are calling int 13h for */ + cmp dl, al - /* If not get the next one */ - jne GetMappedDriveNumberLoopNext + /* If not get the next one */ + jne GetMappedDriveNumberLoopNext - /* If we get here then we have found a mapped drive */ - /* Send new drive number on to the old int 13h handler */ - mov dl, ah + /* If we get here then we have found a mapped drive */ + /* Send new drive number on to the old int 13h handler */ + mov dl, ah - /* Call BIOS Int 13 Handler */ - jmp CallOldInt13Handler + /* Call BIOS Int 13 Handler */ + jmp CallOldInt13Handler GetMappedDriveNumberLoopNext: - loop GetMappedDriveNumberLoop + loop GetMappedDriveNumberLoop CallOldInt13Handler: - /* Restore the registers we changed off the stack */ - pop si - pop cx - pop ax + /* Restore the registers we changed off the stack */ + pop si + pop cx + pop ax - /* Put flags onto stack */ - push word ptr cs:[CallersFlags - Int13Handler] + /* Put flags onto stack */ + push word ptr cs:[CallersFlags - Int13Handler] - /* Call old int 13h handler with new drive number */ - .byte HEX(9a) /* lcall */ + /* Call old int 13h handler with new drive number */ + .byte HEX(9a) /* lcall */ PUBLIC _DriveMapOldInt13HandlerAddress _DriveMapOldInt13HandlerAddress: - .word 0 - .word 0 + .word 0 + .word 0 - /* Update the callers flags with the values the BIOS returned */ - push ax - pushf - pop ax - mov [bp + 6], ax - pop ax + /* Update the callers flags with the values the BIOS returned */ + push ax + pushf + pop ax + mov [bp + 6], ax + pop ax - /* Restore the callers drive number */ - mov dl, cs:[PassedInDriveNumber - Int13Handler] + /* Restore the callers drive number */ + mov dl, cs:[PassedInDriveNumber - Int13Handler] - pop bp + pop bp - iret + iret CallersFlags: - .word 0 + .word 0 PassedInDriveNumber: - .byte 0 + .byte 0 PUBLIC _DriveMapInt13HandlerMapList _DriveMapInt13HandlerMapList: Int13HandlerMapCount: - .byte 0 + .byte 0 Int13HandlerDrive1: - .byte 0 + .byte 0 Int13HandlerDriveNew1: - .byte 0 + .byte 0 Int13HandlerDrive2: - .byte 0 + .byte 0 Int13HandlerDriveNew2: - .byte 0 + .byte 0 Int13HandlerDrive3: - .byte 0 + .byte 0 Int13HandlerDriveNew3: - .byte 0 + .byte 0 Int13HandlerDrive4: - .byte 0 + .byte 0 Int13HandlerDriveNew4: - .byte 0 + .byte 0 PUBLIC _DriveMapInt13HandlerEnd _DriveMapInt13HandlerEnd: 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] Sun Feb 1 22:15:32 2015 @@ -245,13 +245,13 @@ /* 16-bit stack pointer */ stack16: - .word STACK16ADDR + .word STACK16ADDR /* 32-bit stack pointer */ stack32: .long STACKADDR - .align 4 /* force 4-byte alignment */ + .align 4 /* force 4-byte alignment */ gdt: /* NULL Descriptor */ .word HEX(0000) @@ -285,18 +285,18 @@ /* GDT table pointer */ gdtptr: - .word HEX(27) /* Limit */ - .long gdt /* Base Address */ + .word HEX(27) /* Limit */ + .long gdt /* Base Address */ /* Real-mode IDT pointer */ rmode_idtptr: - .word HEX(3ff) /* Limit */ - .long 0 /* Base Address */ + .word HEX(3ff) /* Limit */ + .long 0 /* Base Address */ PUBLIC i386idtptr i386idtptr: - .word 255 /* Limit */ - .long _i386Idt /* Base Address */ + .word 255 /* Limit */ + .long _i386Idt /* Base Address */ PUBLIC _FrldrBootDrive _FrldrBootDrive: Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/i386bug.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/i386bug.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/i386bug.c [iso-8859-1] Sun Feb 1 22:15:32 2015 @@ -33,7 +33,8 @@ "Exception 12: MACHINE CHECK\n\n" }; -#define SCREEN_ATTR 0x1f +#define SCREEN_ATTR 0x1F // Bright white on blue background + void i386PrintChar(char chr, ULONG x, ULONG y) { Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/i386pnp.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/i386pnp.S [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/i386pnp.S [iso-8859-1] Sun Feb 1 22:15:32 2015 @@ -32,67 +32,67 @@ PUBLIC _PnpBiosSupported _PnpBiosSupported: - push edi - push esi - push ecx - push edx + push edi + push esi + push ecx + push edx - xor edi, edi + xor edi, edi - /* init esi */ - mov esi, HEX(0F0000) + /* init esi */ + mov esi, HEX(0F0000) pnp_again: - mov eax, [esi] - cmp eax, HEX(506E5024) /* "$PnP" */ - je pnp_found + mov eax, [esi] + cmp eax, HEX(506E5024) /* "$PnP" */ + je pnp_found - cmp esi, HEX(0FFFF0) - je pnp_not_found + cmp esi, HEX(0FFFF0) + je pnp_not_found pnp_add: - add esi, 16 - jmp pnp_again + add esi, 16 + jmp pnp_again pnp_found: - /* first calculate the checksum */ - push esi + /* first calculate the checksum */ + push esi - push HEX(21) - pop ecx - xor edx, edx + push HEX(21) + pop ecx + xor edx, edx pnp_loop: - lodsb - add dl, al - loop pnp_loop + lodsb + add dl, al + loop pnp_loop - test dl, dl - pop esi - jnz pnp_add + test dl, dl + pop esi + jnz pnp_add - mov edi, esi + mov edi, esi - /* Calculate the bios entry point (far pointer) */ - xor eax, eax - mov ax, [esi + HEX(0F)] - shl eax, 16 - mov ax, [esi + HEX(0D)] - mov dword ptr ds:[BSS_PnpBiosEntryPoint], eax + /* Calculate the bios entry point (far pointer) */ + xor eax, eax + mov ax, [esi + HEX(0F)] + shl eax, 16 + mov ax, [esi + HEX(0D)] + mov dword ptr ds:[BSS_PnpBiosEntryPoint], eax - /* Store bios data segment */ - mov ax, [esi + HEX(1B)] - mov word ptr ds:[BSS_PnpBiosDataSegment], ax + /* Store bios data segment */ + mov ax, [esi + HEX(1B)] + mov word ptr ds:[BSS_PnpBiosDataSegment], ax pnp_not_found: - mov eax, edi + mov eax, edi - pop edx - pop ecx - pop esi - pop edi + pop edx + pop ecx + pop esi + pop edi - ret + ret /* @@ -103,34 +103,34 @@ PUBLIC _PnpBiosGetDeviceNodeCount _PnpBiosGetDeviceNodeCount: - push ebp - mov ebp, esp + push ebp + mov ebp, esp - pusha - push es + pusha + push es mov bx, FNID_PnpBiosGetDeviceNodeCount call i386CallRealMode - mov esi, [ebp + 8] - mov ax, [BSS_PnpNodeSize] - movzx ecx, ax - mov [esi], ecx + mov esi, [ebp + 8] + mov ax, [BSS_PnpNodeSize] + movzx ecx, ax + mov [esi], ecx - mov esi, [ebp + 12] - mov ax, [BSS_PnpNodeCount] - movzx ecx, ax - mov [esi], ecx + mov esi, [ebp + 12] + mov ax, [BSS_PnpNodeCount] + movzx ecx, ax + mov [esi], ecx - pop es - popa + pop es + popa - mov esp, ebp - pop ebp + mov esp, ebp + pop ebp - mov eax, dword ptr [BSS_PnpResult] + mov eax, dword ptr [BSS_PnpResult] - ret + ret /* @@ -141,43 +141,44 @@ PUBLIC _PnpBiosGetDeviceNode _PnpBiosGetDeviceNode: - push ebp - mov ebp, esp + push ebp + mov ebp, esp - pusha - push es + pusha + push es - /* get current node number */ - mov esi, [ebp + 8] - mov al, [esi] - mov byte ptr ds:[BSS_PnpNodeNumber], al + /* get current node number */ + mov esi, [ebp + 8] + mov al, [esi] + mov byte ptr ds:[BSS_PnpNodeNumber], al - /* convert pointer to node buffer to segment/offset */ - mov eax, [ebp + 12] - shr eax, 4 - and eax, HEX(0f000) - mov word ptr ds:[BSS_PnpBiosBufferSegment], ax - mov eax, [ebp + 12] - and eax, HEX(0ffff) - mov word ptr ds:[BSS_PnpBiosBufferOffset], ax + /* convert pointer to node buffer to segment/offset */ + mov eax, [ebp + 12] + shr eax, 4 + and eax, HEX(0f000) + mov word ptr ds:[BSS_PnpBiosBufferSegment], ax + mov eax, [ebp + 12] + and eax, HEX(0ffff) + mov word ptr ds:[BSS_PnpBiosBufferOffset], ax mov bx, FNID_PnpBiosGetDeviceNode call i386CallRealMode - /* update node number */ - mov esi, [ebp + 8] - mov al, byte ptr ds:[BSS_PnpNodeNumber] - mov [esi], al + /* update node number */ + mov esi, [ebp + 8] + mov al, byte ptr ds:[BSS_PnpNodeNumber] + mov [esi], al - pop es - popa + pop es + popa - mov esp, ebp - pop ebp + mov esp, ebp + pop ebp - mov eax, [BSS_PnpResult] + mov eax, [BSS_PnpResult] - ret + ret END + /* EOF */ Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/i386trap.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/i386trap.S [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/i386trap.S [iso-8859-1] Sun Feb 1 22:15:32 2015 @@ -19,9 +19,6 @@ #include <asm.inc> #include <arch/pc/x86common.h> -#include <ver.h> - -#define SCREEN_ATTR 0x1f /* Bright white on blue background */ EXTERN _i386PrintExceptionText@12:PROC @@ -59,10 +56,10 @@ /* push KSPECIAL_REGISTERS */ /* Gdtr, Idtr, Tr, Ldtr, Reserved */ sub esp, 44 - sgdt [esp] - sidt [esp + 8] - str word ptr [esp + 16] - sldt word ptr [esp + 18] + sgdt [esp] + sidt [esp + 8] + str word ptr [esp + 16] + sldt word ptr [esp + 18] mov eax, dr7; push eax mov eax, dr6; @@ -87,12 +84,12 @@ /* Set by each exception handler to the address of the description text */ i386ExceptionIndex: - .long 0 + .long 0 /************************************************************************/ i386CommonExceptionHandler: - SAVE_CPU_REGS + SAVE_CPU_REGS lea eax, [esp + (21 * 4)] // KTRAP_FRAME push esp // KSPECIAL_REGISTERS @@ -100,26 +97,26 @@ push dword ptr ds:[i386ExceptionIndex] call _i386PrintExceptionText@12 - cli + cli i386ExceptionHandlerHang: - hlt - jmp i386ExceptionHandlerHang + hlt + jmp i386ExceptionHandlerHang - iret + iret MACRO(TRAP_STUB, function, index) PUBLIC VAL(function) &function: push 0 // Fake error code - mov dword ptr ds:[i386ExceptionIndex], VAL(index) - jmp i386CommonExceptionHandler + mov dword ptr ds:[i386ExceptionIndex], VAL(index) + jmp i386CommonExceptionHandler ENDM MACRO(TRAP_STUB2, function, index) PUBLIC VAL(function) &function: - mov dword ptr ds:[i386ExceptionIndex], VAL(index) - jmp i386CommonExceptionHandler + mov dword ptr ds:[i386ExceptionIndex], VAL(index) + jmp i386CommonExceptionHandler ENDM /************************************************************************/ @@ -156,15 +153,15 @@ #else \functionname: #endif - push eax - mov eax, [esp + 8] - mov dr3, eax - mov eax, dr7 - and eax, VAL(mask1) - or eax, VAL(mask2) - mov dr7, eax - pop eax - ret + push eax + mov eax, [esp + 8] + mov dr3, eax + mov eax, dr7 + and eax, VAL(mask1) + or eax, VAL(mask2) + mov dr7, eax + pop eax + ret ENDM BREAKPOINT_TEPLATE _INSTRUCTION_BREAKPOINT1, HEX(0fff0ffff), HEX(000000303) @@ -180,5 +177,4 @@ BREAKPOINT_TEPLATE _MEMORY_READWRITE_BREAKPOINT4, HEX(00fffffff), HEX(0300003c0) BREAKPOINT_TEPLATE _MEMORY_WRITE_BREAKPOINT4, HEX(00fffffff), HEX(0100003c0) - END Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/linux.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/linux.S [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/linux.S [iso-8859-1] Sun Feb 1 22:15:32 2015 @@ -30,16 +30,16 @@ PUBLIC _BootOldLinuxKernel _BootOldLinuxKernel: - /* First we have to copy the kernel down from 0x100000 to 0x10000 */ - /* The reason we can overwrite low memory is because this code */ - /* executes between 0000:8000 and 0000:FFFF. That leaves space for */ - /* 32k of code before we start interfering with Linux kernel address space. */ + /* First we have to copy the kernel down from 0x100000 to 0x10000 */ + /* The reason we can overwrite low memory is because this code */ + /* executes between 0000:8000 and 0000:FFFF. That leaves space for */ + /* 32k of code before we start interfering with Linux kernel address space. */ - /* Get KernelSize in ECX and move the kernel down */ - mov ecx, [esp + 4] - mov esi, HEX(100000) - mov edi, HEX(10000) - rep movsb + /* Get KernelSize in ECX and move the kernel down */ + mov ecx, [esp + 4] + mov esi, HEX(100000) + mov edi, HEX(10000) + rep movsb /* Fall through */ Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/mb.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/mb.S [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/mb.S [iso-8859-1] Sun Feb 1 22:15:32 2015 @@ -35,16 +35,16 @@ #endif _PageDirectoryStart: _startup_pagedirectory: - .fill 4096, 1, 0 + .fill 4096, 1, 0 _lowmem_pagetable: - .fill 4096, 1, 0 + .fill 4096, 1, 0 _kernel_pagetable: - .fill 2*4096, 1, 0 + .fill 2*4096, 1, 0 _apic_pagetable: - .fill 4096, 1, 0 + .fill 4096, 1, 0 _PageDirectoryEnd: Modified: trunk/reactos/boot/freeldr/freeldr/arch/powerpc/boot.s URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/powerpc/boot.s [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/powerpc/boot.s [iso-8859-1] Sun Feb 1 22:15:32 2015 @@ -1,38 +1,38 @@ - .section ".text" - .extern PpcInit - .globl _start - .globl call_ofw + .section ".text" + .extern PpcInit + .globl _start + .globl call_ofw _start: - sync - isync + sync + isync - lis %r1,stackend@ha - addi %r1,%r1,stackend@l + lis %r1,stackend@ha + addi %r1,%r1,stackend@l - /* Store ofw call addr */ - mr %r21,%r5 - lis %r10,ofw_call_addr@ha - stw %r5,ofw_call_addr@l(%r10) + /* Store ofw call addr */ + mr %r21,%r5 + lis %r10,ofw_call_addr@ha + stw %r5,ofw_call_addr@l(%r10) - bl zero_registers - - /* Zero CTR */ - mtcr %r31 + bl zero_registers - lis %r3,PpcInit@ha - addi %r3,%r3,PpcInit@l - mtlr %r3 + /* Zero CTR */ + mtcr %r31 - /* Check for ofw */ - lis %r3,ofw_call_addr@ha - lwz %r3,ofw_call_addr@l(%r3) - cmpw %r3,%r31 /* Zero? */ - mr %r3,%r31 - beq initfp - - lis %r3,call_ofw@ha - addi %r3,%r3,call_ofw@l - b bootme + lis %r3,PpcInit@ha + addi %r3,%r3,PpcInit@l + mtlr %r3 + + /* Check for ofw */ + lis %r3,ofw_call_addr@ha + lwz %r3,ofw_call_addr@l(%r3) + cmpw %r3,%r31 /* Zero? */ + mr %r3,%r31 + beq initfp + + lis %r3,call_ofw@ha + addi %r3,%r3,call_ofw@l + b bootme initfp: /* Enabling FP at this point won't hurt, and the varargs scheme we're @@ -41,71 +41,71 @@ ori %r0,%r0,8192 mtmsr %r0 -bootme: - blr +bootme: + blr zero_registers: - xor %r2,%r2,%r2 - mr %r0,%r2 - mr %r3,%r2 - - mr %r4,%r2 - mr %r5,%r2 - mr %r6,%r2 - mr %r7,%r2 + xor %r2,%r2,%r2 + mr %r0,%r2 + mr %r3,%r2 - mr %r8,%r2 - mr %r9,%r2 - mr %r10,%r2 - mr %r11,%r2 + mr %r4,%r2 + mr %r5,%r2 + mr %r6,%r2 + mr %r7,%r2 - mr %r12,%r2 - mr %r13,%r2 - mr %r14,%r2 - mr %r15,%r2 - - mr %r12,%r2 - mr %r13,%r2 - mr %r14,%r2 - mr %r15,%r2 - - mr %r16,%r2 - mr %r17,%r2 - mr %r18,%r2 - mr %r19,%r2 - - mr %r20,%r2 - mr %r21,%r2 - mr %r22,%r2 - mr %r23,%r2 - - mr %r24,%r2 - mr %r25,%r2 - mr %r26,%r2 - mr %r27,%r2 - - mr %r28,%r2 - mr %r29,%r2 - mr %r30,%r2 - mr %r31,%r2 + mr %r8,%r2 + mr %r9,%r2 + mr %r10,%r2 + mr %r11,%r2 - blr - + mr %r12,%r2 + mr %r13,%r2 + mr %r14,%r2 + mr %r15,%r2 + + mr %r12,%r2 + mr %r13,%r2 + mr %r14,%r2 + mr %r15,%r2 + + mr %r16,%r2 + mr %r17,%r2 + mr %r18,%r2 + mr %r19,%r2 + + mr %r20,%r2 + mr %r21,%r2 + mr %r22,%r2 + mr %r23,%r2 + + mr %r24,%r2 + mr %r25,%r2 + mr %r26,%r2 + mr %r27,%r2 + + mr %r28,%r2 + mr %r29,%r2 + mr %r30,%r2 + mr %r31,%r2 + + blr + ofw_memory_size: - .long 0 - .long 0 - .long 0 - .long 0 + .long 0 + .long 0 + .long 0 + .long 0 - .align 4 + .align 4 stack: - .space 0x4000 + .space 0x4000 stackend: - .long 0,0,0,0 - - .globl _bss - .section ".bss2" + .long 0,0,0,0 + + .globl _bss + .section ".bss2" _bss: - .long 0 + .long 0 - .align 4 + .align 4 Modified: trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/powerpc/mach.c [iso-8859-1] Sun Feb 1 22:15:32 2015 @@ -209,14 +209,14 @@ BiosMemoryMap[slots].Length = claimed[i] - last; slots++; } - + BiosMemoryMap[slots].Type = BiosMemoryUsable; BiosMemoryMap[slots].BaseAddress = claimed[i]; BiosMemoryMap[slots].Length = 8 * 1024 * 1024; - + total += BiosMemoryMap[slots].Length; - last = - BiosMemoryMap[slots].BaseAddress + + last = + BiosMemoryMap[slots].BaseAddress + BiosMemoryMap[slots].Length; slots++; i++; @@ -236,12 +236,12 @@ i, (int)BiosMemoryMap[i].BaseAddress, (int)BiosMemoryMap[i].Length); - + } mem_range_end = regdata[1]; - printf( "Returning memory map (%d entries, %dk free, %dk total ram)\n", + printf( "Returning memory map (%d entries, %dk free, %dk total ram)\n", slots, total / 1024, regdata[1] / 1024 ); return slots; @@ -313,10 +313,10 @@ /* Recursively copy the device tree into our representation * It'll be passed to HAL. - * - * When NT was first done on PPC, it was on PReP hardware, which is very + * + * When NT was first done on PPC, it was on PReP hardware, which is very * like PC hardware (really, just a PPC on a PC motherboard). HAL can guess - * the addresses of needed resources in this scheme as it can on x86. + * the addresses of needed resources in this scheme as it can on x86. * * Most PPC hardware doesn't assign fixed addresses to hardware, which is * the problem that open firmware partially solves. It allows hardware makers @@ -327,8 +327,8 @@ * recording information from openfirmware to be treated as hints. */ VOID OfwCopyDeviceTree -(PCONFIGURATION_COMPONENT_DATA ParentKey, - char *name, +(PCONFIGURATION_COMPONENT_DATA ParentKey, + char *name, int innode, ULONG *BusNumber, ULONG *DiskController, @@ -360,7 +360,7 @@ proplen = ofw_getproplen(node, cur_name); if (proplen > 256 || proplen < 0) { - printf("Warning: not getting prop %s (too long: %d)\n", + printf("Warning: not getting prop %s (too long: %d)\n", cur_name, proplen); continue; } @@ -369,7 +369,7 @@ /* Get device type so we can examine it */ if (!strcmp(cur_name, "device_type")) strcpy(devtype, (char *)data); - + NarrowToWide(wide_name, cur_name); //RegSetValue(NewKey, wide_name, REG_BINARY, data, proplen); Modified: trunk/reactos/boot/freeldr/freeldr/arch/powerpc/ofw_util.s URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/powerpc/ofw_util.s [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/powerpc/ofw_util.s [iso-8859-1] Sun Feb 1 22:15:32 2015 @@ -1,8 +1,8 @@ - .section .text - .globl ofw_functions - .globl ofw_call_addr - .globl call_ofw -call_ofw: + .section .text + .globl ofw_functions + .globl ofw_call_addr + .globl call_ofw +call_ofw: /* R3 has the function offset to call (n * 4) * Other arg registers are unchanged. */ subi %r1,%r1,0x100 @@ -46,4 +46,3 @@ lwz %r20,36(%r1) addi %r1,%r1,0x100 blr - Modified: trunk/reactos/boot/freeldr/freeldr/arch/powerpc/prep.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/powerpc/prep.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/powerpc/prep.c [iso-8859-1] Sun Feb 1 22:15:32 2015 @@ -82,8 +82,8 @@ // Find the last ram address in physical space ... this bypasses mapping // but could run into non-ram objects right above ram. Usually systems // aren't designed like that though. - for (physAddr = 0x40000, change = newStore; - (physAddr < 0x80000000) && (change == newStore); + for (physAddr = 0x40000, change = newStore; + (physAddr < 0x80000000) && (change == newStore); physAddr += 1 << 12) { oldStore = GetPhys(physAddr); @@ -106,7 +106,7 @@ return 1; } -/* Most PReP hardware is in standard locations, based on the corresponding +/* Most PReP hardware is in standard locations, based on the corresponding * hardware on PCs. */ PCONFIGURATION_COMPONENT_DATA PpcPrepHwDetect() { PCONFIGURATION_COMPONENT_DATA SystemKey; Modified: trunk/reactos/boot/freeldr/freeldr/arch/powerpc/prep.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/powerpc/prep.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/powerpc/prep.h [iso-8859-1] Sun Feb 1 22:15:32 2015 @@ -15,11 +15,11 @@ void print_bar( struct _pci_bar *bar ); void pci_setup -( PCONFIGURATION_COMPONENT_DATA pci_bus, +( PCONFIGURATION_COMPONENT_DATA pci_bus, struct _pci_desc *pci_desc ); void pci_read_bar -( struct _pci_desc *pci_desc, - int bus, int dev, int fn, int bar, +( struct _pci_desc *pci_desc, + int bus, int dev, int fn, int bar, struct _pci_bar *bar_data ); void vga_setup Modified: trunk/reactos/boot/freeldr/freeldr/arch/powerpc/prep_vga.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/powerpc/prep_vga.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/powerpc/prep_vga.c [iso-8859-1] Sun Feb 1 22:15:32 2015 @@ -10,7 +10,7 @@ #define VGA_HEIGHT 768 struct _vga_desc vga1_desc = { (char *)0x800003c0 }; -void vga_setup( PCONFIGURATION_COMPONENT_DATA pcibus, +void vga_setup( PCONFIGURATION_COMPONENT_DATA pcibus, struct _pci_desc *desc, struct _vga_desc *vga_desc, int bus, int dev, int fn ) { struct _pci_bar bar_data; Modified: trunk/reactos/boot/freeldr/freeldr/arch/realmode/amd64.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/realmode/amd64.S [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/realmode/amd64.S [iso-8859-1] Sun Feb 1 22:15:32 2015 @@ -15,26 +15,26 @@ .org 512 Startup: - cli - - /* Setup real mode segment registers */ - xor ax, ax - mov ds, ax - mov es, ax - mov fs, ax - mov gs, ax - mov ss, ax + cli + + /* Setup real mode segment registers */ + xor ax, ax + mov ds, ax + mov es, ax + mov fs, ax + mov gs, ax + mov ss, ax /* Save the boot drive and partition */ mov byte ptr ds:[BSS_BootDrive], dl mov byte ptr ds:[BSS_BootPartition], dh - /* Setup a real mode stack */ + /* Setup a real mode stack */ mov sp, word ptr ds:[stack16] - /* Output first status */ - mov si, offset Msg_Starting - call writestr + /* Output first status */ + mov si, offset Msg_Starting + call writestr /* Enable A20 address line */ call EnableA20 @@ -44,9 +44,9 @@ test al, al jnz .LongModeSupported - /* Output failure message */ - mov si, offset Msg_Unsupported - call writestr + /* Output failure message */ + mov si, offset Msg_Unsupported + call writestr /* Wait for a keypress */ int HEX(16) @@ -57,21 +57,21 @@ .ascii "Press any key to reboot...", NUL Msg_Starting: - .ascii "Starting FreeLoader...", CR, LF, NUL + .ascii "Starting FreeLoader...", CR, LF, NUL Msg_LongModeSupported: .ascii "Long mode support detected.", CR, LF, NUL .LongModeSupported: - /* Output status */ - mov si, offset Msg_LongModeSupported - call writestr - - /* Load the GDT */ - lgdt fword ptr [gdtptr] + /* Output status */ + mov si, offset Msg_LongModeSupported + call writestr + + /* Load the GDT */ + lgdt fword ptr [gdtptr] /* Build the startup page tables */ - call BuildPageTables + call BuildPageTables /* Store real mode entry point in shared memory */ mov dword ptr ds:[BSS_RealModeEntry], offset RealModeEntryPoint @@ -95,9 +95,9 @@ xor ax, ax mov es, ax - /* Output status */ - mov si, offset Msg_SwitchToLongMode - call writestr + /* Output status */ + mov si, offset Msg_SwitchToLongMode + call writestr jmp ExitToLongMode @@ -106,36 +106,36 @@ .align 8 gdt: - .word HEX(0000), HEX(0000), HEX(0000), HEX(0000) /* 00: NULL descriptor */ - .word HEX(0000), HEX(0000), HEX(0000), HEX(0000) /* 08: */ - .word HEX(0000), HEX(0000), HEX(9800), HEX(0020) /* 10: long mode cs */ - .word HEX(ffff), HEX(0000), HEX(f300), HEX(00cf) /* 18: long mode ds */ - .word HEX(FFFF), HEX(0000), HEX(9E00), HEX(0000) /* 20: 16-bit real mode CS */ - .word HEX(FFFF), HEX(0000), HEX(9200), HEX(0000) /* 28: 16-bit real mode DS */ - .word HEX(FFFF), HEX(0000), HEX(9B00), HEX(00CF) /* 30: compat mode cs */ + .word HEX(0000), HEX(0000), HEX(0000), HEX(0000) /* 00: NULL descriptor */ + .word HEX(0000), HEX(0000), HEX(0000), HEX(0000) /* 08: */ + .word HEX(0000), HEX(0000), HEX(9800), HEX(0020) /* 10: long mode cs */ + .word HEX(ffff), HEX(0000), HEX(f300), HEX(00cf) /* 18: long mode ds */ + .word HEX(FFFF), HEX(0000), HEX(9E00), HEX(0000) /* 20: 16-bit real mode CS */ + .word HEX(FFFF), HEX(0000), HEX(9200), HEX(0000) /* 28: 16-bit real mode DS */ + .word HEX(FFFF), HEX(0000), HEX(9B00), HEX(00CF) /* 30: compat mode cs */ /* GDT table pointer */ gdtptr: - .word HEX(37) /* Limit */ - .long offset gdt /* Base Address */ + .word HEX(37) /* Limit */ + .long offset gdt /* Base Address */ CheckFor64BitSupport: - /* Check if CPU supports CPUID */ - pushad - pushfd - pop eax - mov ebx, eax - xor eax, HEX(00200000) - push eax - popfd - pushfd - pop eax - cmp eax,ebx - jnz .CheckForPAE + /* Check if CPU supports CPUID */ + pushad + pushfd + pop eax + mov ebx, eax + xor eax, HEX(00200000) + push eax + popfd + pushfd + pop eax + cmp eax,ebx + jnz .CheckForPAE mov si, offset .Msg_NoCpuidSupport - call writestr + call writestr popad xor al, al ret @@ -144,15 +144,15 @@ .ascii "The system doesn't support CPUID.", CR, LF, NUL .CheckForPAE: - /* CPUID support detected - getting the PAE/PGE */ - mov eax,1 // Fn0000_0001 - PAE in EDX[6] - cpuid - and edx, HEX(00a0) - cmp edx, HEX(00a0) - je .CheckForLongMode + /* CPUID support detected - getting the PAE/PGE */ + mov eax,1 // Fn0000_0001 - PAE in EDX[6] + cpuid + and edx, HEX(00a0) + cmp edx, HEX(00a0) + je .CheckForLongMode mov si, offset .Msg_NoPAE - call writestr + call writestr popad xor al, al ret @@ -161,15 +161,15 @@ .ascii "PAE or PGE not set.", CR, LF, NUL .CheckForLongMode: - xor edx, edx - mov eax, HEX(80000001) - cpuid - and edx, HEX(20000000) - test edx,edx - jnz .Success + xor edx, edx + mov eax, HEX(80000001) + cpuid + and edx, HEX(20000000) + test edx,edx + jnz .Success mov si, offset .Msg_NoLongMode - call writestr + call writestr popad xor al, al ret @@ -185,53 +185,53 @@ BuildPageTables: - pusha - push es - - /* Get segment of the PML4 */ - mov eax, PML4_ADDRESS / 16 - mov es, ax - cld - xor di, di - - /* One entry in the PML4 pointing to PDP */ - mov eax, PDP_ADDRESS - or eax, HEX(0f) - stosd - - /* clear rest */ - xor eax, eax - mov cx, 1023 - rep stosd - - /* One entry in the PDP pointing to PD */ - mov eax, PD_ADDRESS - or eax, HEX(0f) - stosd - - /* clear rest */ - xor eax, eax - mov ecx, 1023 - rep stosd - - /* 512 entries in the PD, each defining a 2MB page each */ - mov ecx, 512 - mov eax, HEX(008f) + pusha + push es + + /* Get segment of the PML4 */ + mov eax, PML4_ADDRESS / 16 + mov es, ax + cld + xor di, di + + /* One entry in the PML4 pointing to PDP */ + mov eax, PDP_ADDRESS + or eax, HEX(0f) + stosd + + /* clear rest */ + xor eax, eax + mov cx, 1023 + rep stosd + + /* One entry in the PDP pointing to PD */ + mov eax, PD_ADDRESS + or eax, HEX(0f) + stosd + + /* clear rest */ + xor eax, eax + mov ecx, 1023 + rep stosd + + /* 512 entries in the PD, each defining a 2MB page each */ + mov ecx, 512 + mov eax, HEX(008f) .Bpt2: - mov es: [di], eax - mov dword ptr es: [di + 4], 0 - add eax, 512 * 4096 // add 512 4k pages - add di, 8 - - /* Loop all PDEs */ - dec cx - jnz .Bpt2 - - /* Return */ - pop es - popa - ret + mov es: [di], eax + mov dword ptr es: [di + 4], 0 + add eax, 512 * 4096 // add 512 4k pages + add di, 8 + + /* Loop all PDEs */ + dec cx + jnz .Bpt2 + + /* Return */ + pop es + popa + ret /******************************************************************************/ @@ -241,13 +241,13 @@ /* This is the entry point from long mode */ RealModeEntryPoint: - /* Disable Protected Mode */ - mov eax, cr0 - and eax, HEX(0fffffffe) // ~0x00000001 - mov cr0, eax - - /* Clear prefetch queue & correct CS */ - ljmp16 0, offset InRealMode + /* Disable Protected Mode */ + mov eax, cr0 + and eax, HEX(0fffffffe) // ~0x00000001 + mov cr0, eax + + /* Clear prefetch queue & correct CS */ + ljmp16 0, offset InRealMode InRealMode: @@ -285,43 +285,43 @@ cli /* Set correct segment registers */ - xor ax,ax - mov ds,ax - mov es,ax - mov fs,ax - mov gs,ax - mov ss,ax + xor ax,ax + mov ds,ax + mov es,ax + mov fs,ax + mov gs,ax + mov ss,ax /* Safe current stack pointer */ mov word ptr ds:[stack16], sp /* Set PAE and PGE: 10100000b */ - mov eax, HEX(00a0) - mov cr4, eax + mov eax, HEX(00a0) + mov cr4, eax /* Point cr3 at the PML4 */ - mov eax, PML4_ADDRESS - mov cr3, eax + mov eax, PML4_ADDRESS + mov cr3, eax /* Enable long mode */ - mov ecx, MSR_EFER - rdmsr - or eax, HEX(00000100) - wrmsr + mov ecx, MSR_EFER + rdmsr + or eax, HEX(00000100) + wrmsr /* Activate long mode by enabling paging and protection simultaneously, skipping protected mode entirely */ - mov eax, cr0 - or eax, HEX(80000001) - mov cr0, eax + mov eax, cr0 + or eax, HEX(80000001) + mov cr0, eax /* Clear prefetch queue & correct CS */ ljmp16 LMODE_CS, InLongMode InLongMode: - //DB 66h, 0B8h, 18h, 00h // mov ax, LMODE_DS - //DB 66h, 8Eh, 0D8h // mov ds, ax - //DB 66h, 66h, 0C7h, 04h, 25h, 00h, 80h, 0Bh, 00h, 31h, 0Eh - //mov word ptr [HEX(b8000)], HEX(0e00) + '1' + //DB 66h, 0B8h, 18h, 00h // mov ax, LMODE_DS + //DB 66h, 8Eh, 0D8h // mov ds, ax + //DB 66h, 66h, 0C7h, 04h, 25h, 00h, 80h, 0Bh, 00h, 31h, 0Eh + //mov word ptr [HEX(b8000)], HEX(0e00) + '1' .byte HEX(0ff), HEX(25) // opcode of 64bit indirect jump .long 1 // relative address of LongModeEntryPoint Modified: trunk/reactos/boot/freeldr/freeldr/arch/realmode/fathelp.inc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/realmode/fathelp.inc [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/realmode/fathelp.inc [iso-8859-1] Sun Feb 1 22:15:32 2015 @@ -8,37 +8,37 @@ //.text -#define BootSectorStackTop HEX(7bf2) -#define DataAreaStartHigh 2 -#define DataAreaStartLow 4 -#define BiosCHSDriveSizeHigh 6 -#define BiosCHSDriveSizeLow 8 -#define BiosCHSDriveSize 8 -#define ReadSectorsOffset 10 -#define ReadClusterOffset 12 -#define PutCharsOffset 14 - -#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 HEX(7dfd) +#define BootSectorStackTop HEX(7bf2) +#define DataAreaStartHigh 2 +#define DataAreaStartLow 4 +#define BiosCHSDriveSizeHigh 6 +#define BiosCHSDriveSizeLow 8 +#define BiosCHSDriveSize 8 +#define ReadSectorsOffset 10 +#define ReadClusterOffset 12 +#define PutCharsOffset 14 + +#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 HEX(7dfd) // This code will be stored in the first 512 bytes @@ -82,13 +82,13 @@ call IsFat12 pop ax jnc LoadFile2 - cmp ax, HEX(0ff8) // Check to see if this is the last cluster in the chain + cmp ax, HEX(0ff8) // Check to see if this is the last cluster in the chain jmp LoadFile3 LoadFile2: cmp ax, HEX(0fff8) LoadFile3: - jae LoadFile_Done // If so continue, if not then read then next one + 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 @@ -97,27 +97,27 @@ 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 + 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 + call GetFatEntry12 // Get the next entry jmp LoadFile5 LoadFile4: call GetFatEntry16 LoadFile5: pop es - jmp LoadFile // Load the next cluster (if any) + jmp LoadFile // Load the next cluster (if any) LoadFile_Done: - mov dl, byte ptr [bp+BootDrive] // Load the boot drive into DL - mov dh, byte ptr ds:[BootPartition] // Load the boot partition into DH + mov dl, byte ptr [bp+BootDrive] // Load the boot drive into DL + mov dh, byte ptr ds:[BootPartition] // Load the boot partition into DH /* continue where other bootsectors start */ jmp start @@ -141,15 +141,15 @@ // 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) + mov cx,2 // AX = AX * 2 (since FAT16 entries are 2 bytes) mul cx shl dx,12 mov bx, HEX(7000) add bx,dx mov es,bx - mov bx,ax // Restore FAT entry offset - mov ax, es:[bx] // Get FAT entry + mov bx,ax // Restore FAT entry offset + mov ax, es:[bx] // Get FAT entry ret @@ -161,13 +161,13 @@ 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) + add ax,cx // AX = AX * 1.5 (AX = AX + (AX / 2)) (since FAT12 entries are 12 bits) mov bx, HEX(7000) 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 + 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, HEX(0fff0) @@ -201,8 +201,8 @@ // 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 movzx ebx, byte ptr [bp+SectsPerCluster] @@ -220,6 +220,6 @@ msgLoading: .ascii "Loading FreeLoader...", CR, LF, NUL - .org 510 // Pad to 510 bytes - .word HEX(0aa55) // BootSector signature - + .org 510 // Pad to 510 bytes + .word HEX(0aa55) // BootSector signature + Modified: trunk/reactos/boot/freeldr/freeldr/arch/realmode/helpers.inc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/realmode/helpers.inc [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/realmode/helpers.inc [iso-8859-1] Sun Feb 1 22:15:32 2015 @@ -1,21 +1,21 @@ Empty8042: - .word HEX(00eb), HEX(00eb) // jmp $+2, jmp $+2 + .word HEX(00eb), HEX(00eb) // jmp $+2, jmp $+2 in al, HEX(64) - cmp al, HEX(0ff) // legacy-free machine without keyboard - jz Empty8042_ret // controllers on Intel Macs read back 0xFF + cmp al, HEX(0ff) // legacy-free machine without keyboard + jz Empty8042_ret // controllers on Intel Macs read back 0xFF test al, 2 jnz Empty8042 Empty8042_ret: - ret + ret EnableA20: pusha call Empty8042 - mov al, HEX(0D1) // command write + mov al, HEX(0D1) // command write out HEX(064), al call Empty8042 - mov al, HEX(0DF) // A20 on + mov al, HEX(0DF) // A20 on out HEX(060), al call Empty8042 popa @@ -26,32 +26,32 @@ * si = pointer to zero terminated string */ writestr: - pushfd - pushad + pushfd + pushad writestr_top: - lodsb - and al, al - jz writestr_end - call writechr - jmp short writestr_top + lodsb + and al, al + jz writestr_end + call writechr + jmp short writestr_top writestr_end: - popad - popfd - ret + popad + popfd + ret /* * writechr * al = character to output */ writechr: - pushf - pusha - mov ah, HEX(0E) - xor bx, bx - int HEX(10) - popa - popf - ret + pushf + pusha + mov ah, HEX(0E) + xor bx, bx + int HEX(10) + popa + popf + ret // // writehex[248]: Write a hex number in (AL, AX, EAX) to the console @@ -93,13 +93,13 @@ ret Reboot: - cli + cli - /* Set the word at location 40h:72h to 0 (cold reboot) */ - mov word ptr ds:[HEX(0472)], HEX(0) + /* Set the word at location 40h:72h to 0 (cold reboot) */ + mov word ptr ds:[HEX(0472)], HEX(0) - /* and jump to location F000h:FFF0h in ROM */ - ljmp16 HEX(0F000), HEX(0FFF0) + /* and jump to location F000h:FFF0h in ROM */ + ljmp16 HEX(0F000), HEX(0FFF0) ChainLoadBiosBootSectorCode: Modified: trunk/reactos/boot/freeldr/freeldr/arch/realmode/i386.S URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/realmode/i386.S [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/realmode/i386.S [iso-8859-1] Sun Feb 1 22:15:32 2015 @@ -58,50 +58,50 @@ /* This is the entry point from protected mode */ switch_to_real16: - /* Restore segment registers to correct limit */ - mov ax, RMODE_DS - mov ds, ax - mov es, ax - mov fs, ax - mov gs, ax - mov ss, ax - - /* Disable Protected Mode */ - mov eax, cr0 - and eax, CR0_PE_CLR - mov cr0, eax - - /* Clear prefetch queue & correct CS */ - ljmp16 0, inrmode + /* Restore segment registers to correct limit */ + mov ax, RMODE_DS + mov ds, ax + mov es, ax + mov fs, ax + mov gs, ax + mov ss, ax + + /* Disable Protected Mode */ + mov eax, cr0 + and eax, CR0_PE_CLR + mov cr0, eax + + /* Clear prefetch queue & correct CS */ + ljmp16 0, inrmode inrmode: /* Set real mode segments */ - xor ax, ax - mov ds, ax - mov es, ax - mov fs, ax - mov gs, ax - mov ss, ax - - /* Clear out the high 16-bits of ESP */ - /* This is needed because I have one */ - /* machine that hangs when booted to dos if */ - /* anything other than 0x0000 is in the high */ - /* 16-bits of ESP. Even though real-mode */ - /* code should only use SP and not ESP. */ - xor esp, esp + xor ax, ax + mov ds, ax + mov es, ax + mov fs, ax + mov gs, ax + mov ss, ax + + /* Clear out the high 16-bits of ESP */ + /* This is needed because I have one */ + /* machine that hangs when booted to dos if */ + /* anything other than 0x0000 is in the high */ + /* 16-bits of ESP. Even though real-mode */ + /* code should only use SP and not ESP. */ + xor esp, esp /* Restore real mode stack */ - mov sp, word ptr ds:[stack16] - - /* Load IDTR with real mode value */ + mov sp, word ptr ds:[stack16] + + /* Load IDTR with real mode value */ #ifdef _USE_ML lidt fword ptr rmode_idtptr #else - lidt rmode_idtptr + lidt rmode_idtptr #endif - sti /* These are ok now */ + sti /* These are ok now */ /* Do the callback, specified by bx */ shl bx, 1 @@ -155,47 +155,47 @@ .word STACK16ADDR -.align 4 /* force 4-byte alignment */ +.align 4 /* force 4-byte alignment */ gdt: - /* NULL Descriptor */ - .word HEX(0000) - .word HEX(0000) - .word HEX(0000) - .word HEX(0000) - - /* 32-bit flat CS */ - .word HEX(FFFF) - .word HEX(0000) - .word HEX(9A00) - .word HEX(00CF) - - /* 32-bit flat DS */ - .word HEX(FFFF) - .word HEX(0000) - .word HEX(9200) - .word HEX(00CF) - - /* 16-bit real mode CS */ - .word HEX(FFFF) - .word HEX(0000) - .word HEX(9E00) - .word HEX(0000) - - /* 16-bit real mode DS */ - .word HEX(FFFF) - .word HEX(0000) - .word HEX(9200) - .word HEX(0000) + /* NULL Descriptor */ + .word HEX(0000) + .word HEX(0000) + .word HEX(0000) + .word HEX(0000) + + /* 32-bit flat CS */ + .word HEX(FFFF) + .word HEX(0000) + .word HEX(9A00) + .word HEX(00CF) + + /* 32-bit flat DS */ + .word HEX(FFFF) + .word HEX(0000) + .word HEX(9200) + .word HEX(00CF) + + /* 16-bit real mode CS */ + .word HEX(FFFF) + .word HEX(0000) + .word HEX(9E00) + .word HEX(0000) + + /* 16-bit real mode DS */ + .word HEX(FFFF) + .word HEX(0000) + .word HEX(9200) + .word HEX(0000) /* GDT table pointer */ gdtptr: - .word HEX(27) /* Limit */ + .word HEX(27) /* Limit */ .word gdt, 0 /* Base Address */ /* Real-mode IDT pointer */ rmode_idtptr: - .word HEX(3ff) /* Limit */ - .long 0 /* Base Address */ + .word HEX(3ff) /* Limit */ + .long 0 /* Base Address */ #include "int386.inc" #include "pxe.inc" 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] Sun Feb 1 22:15:32 2015 @@ -6,75 +6,75 @@ #define EFLAGS_SF HEX(80) Int386: - /* Save all registers + segment registers */ - push ds - push es - push fs - push gs - pushad + /* Save all registers + segment registers */ + push ds + push es + push fs + push gs + pushad /* Get the interupt vector and patch the opcode */ mov al, byte ptr ds:[BSS_IntVector] mov byte ptr ds:[Int386_vector_opcode], al - /* Get current EFLAGS and mask CF, ZF and SF */ - pushf - pop cx - and cx, not (EFLAGS_CF or EFLAGS_ZF or EFLAGS_SF) + /* Get current EFLAGS and mask CF, ZF and SF */ + pushf + pop cx + and cx, not (EFLAGS_CF or EFLAGS_ZF or EFLAGS_SF) - /* Get flags CF, ZF and SF from the REGS structure */ - mov ax, word ptr cs:[BSS_RegisterSet + REGS_EFLAGS] - and ax, (EFLAGS_CF or EFLAGS_ZF or EFLAGS_SF) + /* Get flags CF, ZF and SF from the REGS structure */ + mov ax, word ptr cs:[BSS_RegisterSet + REGS_EFLAGS] + and ax, (EFLAGS_CF or EFLAGS_ZF or EFLAGS_SF) - /* Combine flags and set them */ - or ax, cx - push ax - popf + /* Combine flags and set them */ + or ax, cx + push ax + popf - /* Setup the registers */ - mov ax, word ptr cs:[BSS_RegisterSet + REGS_DS] - mov ds, ax - mov ax, word ptr cs:[BSS_RegisterSet + REGS_ES] - mov es, ax - mov ax, word ptr cs:[BSS_RegisterSet + REGS_FS] - mov fs, ax - mov ax, word ptr cs:[BSS_RegisterSet + REGS_GS] - mov gs, ax + /* Setup the registers */ + mov ax, word ptr cs:[BSS_RegisterSet + REGS_DS] + mov ds, ax + mov ax, word ptr cs:[BSS_RegisterSet + REGS_ES] + mov es, ax + mov ax, word ptr cs:[BSS_RegisterSet + REGS_FS] + mov fs, ax + mov ax, word ptr cs:[BSS_RegisterSet + REGS_GS] + mov gs, ax - mov eax, dword ptr cs:[BSS_RegisterSet + REGS_EAX] - mov ebx, dword ptr cs:[BSS_RegisterSet + REGS_EBX] - mov ecx, dword ptr cs:[BSS_RegisterSet + REGS_ECX] - 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] - // Don't setup ebp, we only use it as output! + mov eax, dword ptr cs:[BSS_RegisterSet + REGS_EAX] + mov ebx, dword ptr cs:[BSS_RegisterSet + REGS_EBX] + mov ecx, dword ptr cs:[BSS_RegisterSet + REGS_ECX] + 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] + // Don't setup ebp, we only use it as output! - /* Call the interrupt vector */ - /*int Int386_vector*/ - .byte HEX(0cd) + /* Call the interrupt vector */ + /*int Int386_vector*/ + .byte HEX(0cd) Int386_vector_opcode: - .byte 00 + .byte 00 - /* Save the registers */ - mov dword ptr cs:[BSS_RegisterSet + REGS_EAX], eax - mov dword ptr cs:[BSS_RegisterSet + REGS_EBX], ebx - mov dword ptr cs:[BSS_RegisterSet + REGS_ECX], ecx - 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 + /* Save the registers */ + mov dword ptr cs:[BSS_RegisterSet + REGS_EAX], eax + mov dword ptr cs:[BSS_RegisterSet + REGS_EBX], ebx + mov dword ptr cs:[BSS_RegisterSet + REGS_ECX], ecx + 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 - mov ax, es - mov word ptr cs:[BSS_RegisterSet + REGS_ES], ax - mov ax, fs - mov word ptr cs:[BSS_RegisterSet + REGS_FS], ax - mov ax, gs - mov word ptr cs:[BSS_RegisterSet + REGS_GS], ax + mov ax, ds + mov word ptr cs:[BSS_RegisterSet + REGS_DS], ax + mov ax, es + mov word ptr cs:[BSS_RegisterSet + REGS_ES], ax + mov ax, fs + mov word ptr cs:[BSS_RegisterSet + REGS_FS], ax + mov ax, gs + mov word ptr cs:[BSS_RegisterSet + REGS_GS], ax - pushfd - pop dword ptr cs:[BSS_RegisterSet + REGS_EFLAGS] + pushfd + pop dword ptr cs:[BSS_RegisterSet + REGS_EFLAGS] popad pop gs Modified: trunk/reactos/boot/freeldr/freeldr/arch/realmode/linux.inc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/realmode/linux.inc [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/realmode/linux.inc [iso-8859-1] Sun Feb 1 22:15:32 2015 @@ -1,16 +1,15 @@ - BootLinuxKernel: // dl must be set to the boot drive - /* Load segment registers */ - cli - mov bx, HEX(9000) - mov ds, bx - mov es, bx - mov fs, bx - mov gs, bx - mov ss, bx - mov sp, HEX(9000) + /* Load segment registers */ + cli + mov bx, HEX(9000) + mov ds, bx + mov es, bx + mov fs, bx + mov gs, bx + mov ss, bx + mov sp, HEX(9000) - ljmp16 HEX(9020), HEX(0000) + ljmp16 HEX(9020), HEX(0000) Modified: trunk/reactos/boot/freeldr/freeldr/arch/realmode/pnp.inc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/realmode/pnp.inc [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/realmode/pnp.inc [iso-8859-1] Sun Feb 1 22:15:32 2015 @@ -1,58 +1,56 @@ - PnpBiosGetDeviceNodeCount: - mov ax, word ptr ds:[BSS_PnpBiosDataSegment] - push ax + mov ax, word ptr ds:[BSS_PnpBiosDataSegment] + push ax - push cs - mov ax, BSS_PnpNodeSize - push ax + push cs + mov ax, BSS_PnpNodeSize + push ax - push cs - mov ax, BSS_PnpNodeCount - push ax + push cs + mov ax, BSS_PnpNodeCount + push ax - push 0 + push 0 - call dword ptr ds:[BSS_PnpBiosEntryPoint] - add sp, 12 + call dword ptr ds:[BSS_PnpBiosEntryPoint] + add sp, 12 - movzx ecx, ax - mov dword ptr ds:[BSS_PnpResult], ecx + movzx ecx, ax + mov dword ptr ds:[BSS_PnpResult], ecx ret PnpBiosGetDeviceNode: - /* push bios segment */ - mov ax, word ptr ds:[BSS_PnpBiosDataSegment] - push ax + /* push bios segment */ + mov ax, word ptr ds:[BSS_PnpBiosDataSegment] + push ax - /* push control flag */ - push 1 + /* push control flag */ + push 1 - /* push pointer to node buffer (segment/offset) */ - mov ax, word ptr ds:[BSS_PnpBiosBufferSegment] - push ax - mov ax, word ptr ds:[BSS_PnpBiosBufferOffset] - push ax + /* push pointer to node buffer (segment/offset) */ + mov ax, word ptr ds:[BSS_PnpBiosBufferSegment] + push ax + mov ax, word ptr ds:[BSS_PnpBiosBufferOffset] + push ax - /* push pointer to node number (segment/offset) */ - push cs - mov ax, BSS_PnpNodeNumber - push ax + /* push pointer to node number (segment/offset) */ + push cs + mov ax, BSS_PnpNodeNumber + push ax - /* push function number */ - push 1 + /* push function number */ + push 1 - /* call entry point */ - call dword ptr ds:[BSS_PnpBiosEntryPoint] - add sp, 14 + /* call entry point */ + call dword ptr ds:[BSS_PnpBiosEntryPoint] + add sp, 14 - movzx ecx, ax - mov dword ptr ds:[BSS_PnpResult], ecx + movzx ecx, ax + mov dword ptr ds:[BSS_PnpResult], ecx ret - Modified: trunk/reactos/boot/freeldr/freeldr/arch/realmode/pxe.inc URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/realmode/pxe.inc [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/realmode/pxe.inc [iso-8859-1] Sun Feb 1 22:15:32 2015 @@ -17,17 +17,16 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ - PxeCallApi: - mov ax, word ptr ds:[BSS_PxeBufferSegment] - push ax - mov ax, word ptr ds:[BSS_PxeBufferOffset] - push ax - mov ax, word ptr ds:[BSS_PxeFunction] - push ax - call dword ptr ds:[BSS_PxeEntryPoint] - add esp, 6 - mov word ptr ds:[BSS_PxeResult], ax + mov ax, word ptr ds:[BSS_PxeBufferSegment] + push ax + mov ax, word ptr ds:[BSS_PxeBufferOffset] + push ax + mov ax, word ptr ds:[BSS_PxeFunction] + push ax + call dword ptr ds:[BSS_PxeEntryPoint] + add esp, 6 + mov word ptr ds:[BSS_PxeResult], ax ret Modified: trunk/reactos/boot/freeldr/freeldr/comm/rs232.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/comm/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/comm/rs232.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/comm/rs232.c [iso-8859-1] Sun Feb 1 22:15:32 2015 @@ -18,7 +18,7 @@ * with this program; if not, write to the Free Software Foundation, Inc., * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ - + #ifndef _M_ARM #include <freeldr.h> Modified: trunk/reactos/boot/freeldr/freeldr/include/ver.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/ver.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/ver.h [iso-8859-1] Sun Feb 1 22:15:32 2015 @@ -17,15 +17,13 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ -#ifndef __ASM__ #pragma once -#endif -/* just some stuff */ -#define VERSION "FreeLoader v3.0" -#define COPYRIGHT "Copyright (C) 1998-2007 ReactOS Team" +/* Just some stuff */ +#define VERSION "FreeLoader v3.0" +#define COPYRIGHT "Copyright (C) 1998-2007 ReactOS Team" #define AUTHOR_EMAIL "<
www.reactos.org
>" -#define BY_AUTHOR "by ReactOS Team" +#define BY_AUTHOR "by ReactOS Team" // FreeLoader version defines // @@ -38,9 +36,4 @@ #define FREELOADER_MINOR_VERSION 0 #define FREELOADER_PATCH_VERSION 0 - -#ifndef __ASM__ - -PCHAR GetFreeLoaderVersionString(VOID); - -#endif // __ASM__ +PCHAR GetFreeLoaderVersionString(VOID); Modified: trunk/reactos/boot/freeldr/freeldr/ui/directui.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/ui/di…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/ui/directui.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/ui/directui.c [iso-8859-1] Sun Feb 1 22:15:32 2015 @@ -226,13 +226,13 @@ UiDrawProgressBar(IN ULONG Left, IN ULONG Top, IN ULONG Right, - IN ULONG Bottom, + IN ULONG Bottom, IN ULONG Position, IN ULONG Range, IN PCHAR ProgressText) { ULONG i, ProgressBarWidth; - + /* Calculate the width of the bar proper */ ProgressBarWidth = (Right - Left) - 3; Modified: trunk/reactos/boot/freeldr/freeldr/ui/minitui.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/ui/mi…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/ui/minitui.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/ui/minitui.c [iso-8859-1] Sun Feb 1 22:15:32 2015 @@ -154,7 +154,7 @@ TuiEditBox, TuiTextToColor, TuiTextToFillStyle, - MiniTuiDrawBackdrop, /* no FadeIn */ + MiniTuiDrawBackdrop, /* no FadeIn */ TuiFadeOut, TuiDisplayMenu, MiniTuiDrawMenu, Modified: trunk/reactos/boot/freeldr/freeldr/windows/headless.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/windows/headless.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/windows/headless.c [iso-8859-1] Sun Feb 1 22:15:32 2015 @@ -97,7 +97,7 @@ } } else - { + { /* Pick correct port for address */ PortAddress = (PUCHAR)0x2F8; if (CpDoesPortExist(PortAddress)) @@ -182,17 +182,17 @@ { case 2: LoaderRedirectionInformation.PortAddress = (PUCHAR)0x2F8; - break; - + break; + case 3: LoaderRedirectionInformation.PortAddress = (PUCHAR)0x3E8; - break; - + break; + case 4: LoaderRedirectionInformation.PortAddress = (PUCHAR)0x2E8; - break; - - default: + break; + + default: LoaderRedirectionInformation.PortAddress = (PUCHAR)0x3F8; break; } @@ -218,7 +218,7 @@ { /* Port seems usable, set it up and get the BIOS GUID */ WinLdrEnableFifo(WinLdrTerminalDeviceId, TRUE); - + WinLdrLoadGUID(&LoaderRedirectionInformation.SystemGUID); /* Calculate delay in us based on the baud, assume 9600 if none given */ @@ -297,7 +297,7 @@ else { LoaderRedirectionInformation.BaudRate = 9600; - } + } } /* Enable headless support if parameters were found */
9 years, 10 months
1
0
0
0
[hbelusca] 66145: [FREELDR] - Code style changes (whitespace + C-style comments). - Move reactos/registry to windows/ since it's only for booting windows-like OSes that registry functions are used....
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sun Feb 1 21:35:45 2015 New Revision: 66145 URL:
http://svn.reactos.org/svn/reactos?rev=66145&view=rev
Log: [FREELDR] - Code style changes (whitespace + C-style comments). - Move reactos/registry to windows/ since it's only for booting windows-like OSes that registry functions are used. - ARC hw support functions first move (i.e. another code refactoring will happen) outside of reactos/ (since they are used generally, not just for ReactOS loading). - ARC name outside of reactos/ - Delete now-useless reactos/ subdirectory. Added: trunk/reactos/boot/freeldr/freeldr/arch/archwsup.c - copied, changed from r66136, trunk/reactos/boot/freeldr/freeldr/reactos/archwsup.c trunk/reactos/boot/freeldr/freeldr/arcname.c - copied, changed from r66136, trunk/reactos/boot/freeldr/freeldr/reactos/arcname.c trunk/reactos/boot/freeldr/freeldr/include/arch/archwsup.h (with props) trunk/reactos/boot/freeldr/freeldr/include/arcname.h - copied unchanged from r66136, trunk/reactos/boot/freeldr/freeldr/include/reactos.h trunk/reactos/boot/freeldr/freeldr/windows/registry.c - copied, changed from r66136, trunk/reactos/boot/freeldr/freeldr/reactos/registry.c trunk/reactos/boot/freeldr/freeldr/windows/registry.h - copied, changed from r66136, trunk/reactos/boot/freeldr/freeldr/include/registry.h Removed: trunk/reactos/boot/freeldr/freeldr/include/reactos.h trunk/reactos/boot/freeldr/freeldr/include/registry.h trunk/reactos/boot/freeldr/freeldr/reactos/ Modified: trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt trunk/reactos/boot/freeldr/freeldr/custom.c trunk/reactos/boot/freeldr/freeldr/debug.c trunk/reactos/boot/freeldr/freeldr/include/arch/arm/hardware.h trunk/reactos/boot/freeldr/freeldr/include/arch/pc/hardware.h trunk/reactos/boot/freeldr/freeldr/include/arch/powerpc/hardware.h trunk/reactos/boot/freeldr/freeldr/include/freeldr.h trunk/reactos/boot/freeldr/freeldr/include/winldr.h trunk/reactos/boot/freeldr/freeldr/machine.c trunk/reactos/boot/freeldr/freeldr/options.c trunk/reactos/boot/freeldr/freeldr/oslist.c trunk/reactos/boot/freeldr/freeldr/version.c trunk/reactos/boot/freeldr/freeldr/windows/winldr.c trunk/reactos/boot/freeldr/freeldr/windows/wlregistry.c Modified: trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/CMake…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -33,6 +33,7 @@ list(APPEND FREELDR_COMMON_SOURCE include/freeldr.h + arcname.c cmdline.c custom.c debug.c @@ -42,6 +43,7 @@ options.c oslist.c version.c + arch/archwsup.c cache/blocklist.c cache/cache.c comm/rs232.c @@ -60,9 +62,6 @@ mm/meminit.c mm/mm.c mm/heap.c - reactos/registry.c - reactos/arcname.c - reactos/archwsup.c ui/directui.c ui/gui.c ui/minitui.c @@ -75,6 +74,7 @@ video/video.c windows/conversion.c windows/peloader.c + windows/registry.c windows/winldr.c windows/wlmemory.c windows/wlregistry.c) Copied: trunk/reactos/boot/freeldr/freeldr/arch/archwsup.c (from r66136, trunk/reactos/boot/freeldr/freeldr/reactos/archwsup.c) URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/reactos/archwsup.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/archwsup.c [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -32,7 +32,7 @@ return Buffer; } -VOID +static VOID NTAPI FldrSetIdentifier(IN PCONFIGURATION_COMPONENT_DATA ComponentData, IN PCHAR IdentifierString) @@ -82,7 +82,7 @@ *SystemNode = FldrArcHwTreeRoot; } -VOID +static VOID NTAPI FldrLinkToParent(IN PCONFIGURATION_COMPONENT_DATA Parent, IN PCONFIGURATION_COMPONENT_DATA Child) @@ -162,4 +162,3 @@ /* Return the child */ *ComponentKey = ComponentData; } - Copied: trunk/reactos/boot/freeldr/freeldr/arcname.c (from r66136, trunk/reactos/boot/freeldr/freeldr/reactos/arcname.c) URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arcna…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/reactos/arcname.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arcname.c [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -25,20 +25,14 @@ { char *p; - // - // Detect ramdisk path - // + /* Detect ramdisk path */ if (_strnicmp(ArcPath, "ramdisk(0)", 10) == 0) { - // - // Magic value for ramdisks - // + /* Magic value for ramdisks */ *BootDrive = 0x49; *BootPartition = 1; - // - // Get the path - // + /* Get the path */ p = ArcPath + 11; strcpy(BootPath, p); return TRUE; @@ -51,7 +45,7 @@ if (_strnicmp(p, "fdisk(", 6) == 0) { /* - * floppy disk path: + * Floppy disk path: * multi(0)disk(0)fdisk(x)\path */ p = p + 6; @@ -65,7 +59,7 @@ else if (_strnicmp(p, "cdrom(", 6) == 0) { /* - * cdrom path: + * Cdrom path: * multi(0)disk(0)cdrom(x)\path */ p = p + 6; @@ -79,7 +73,7 @@ else if (_strnicmp(p, "rdisk(", 6) == 0) { /* - * hard disk path: + * Hard disk path: * multi(0)disk(0)rdisk(x)partition(y)\path */ p = p + 6; @@ -169,7 +163,7 @@ if (Disk < 0x80) { /* - * floppy disk path: + * Floppy disk path: * multi(0)disk(0)fdisk(x)\path */ sprintf(tmp, "fdisk(%d)", (int) Disk); @@ -178,7 +172,7 @@ else { /* - * hard disk path: + * Hard disk path: * multi(0)disk(0)rdisk(x)partition(y)\path */ sprintf(tmp, "rdisk(%d)partition(%d)", (int) (Disk - 0x80), (int) Partition); @@ -209,7 +203,7 @@ if (_strnicmp(p, "fdisk(", 6) == 0) { /* - * floppy disk path: + * Floppy disk path: * multi(0)disk(0)fdisk(x)\path */ p = p + 6; @@ -218,7 +212,7 @@ else if (_strnicmp(p, "rdisk(", 6) == 0) { /* - * hard disk path: + * Hard disk path: * multi(0)disk(0)rdisk(x)partition(y)\path */ p = p + 6; Modified: trunk/reactos/boot/freeldr/freeldr/custom.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/custo…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/custom.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/custom.c [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -58,7 +58,7 @@ TRUE, NULL)) { - // The user pressed ESC + /* The user pressed ESC */ return; } Modified: trunk/reactos/boot/freeldr/freeldr/debug.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/debug…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/debug.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/debug.c [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -395,7 +395,7 @@ BugCheckCode, BugCheckParameter1, BugCheckParameter2, BugCheckParameter3, BugCheckParameter4); UiMessageBoxCritical(Buffer); - assert(FALSE); + ASSERT(FALSE); for (;;); } Added: trunk/reactos/boot/freeldr/freeldr/include/arch/archwsup.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/arch/archwsup.h (added) +++ trunk/reactos/boot/freeldr/freeldr/include/arch/archwsup.h [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -0,0 +1,49 @@ +/* + * FreeLoader + * + * Copyright (C) 2003 Eric Kohl + * + * 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 + +/* PROTOTYPES ***************************************************************/ + +// +// ARC Component Configuration Routines +// +VOID +NTAPI +FldrCreateSystemKey( + OUT PCONFIGURATION_COMPONENT_DATA *SystemKey +); + +VOID +NTAPI +FldrCreateComponentKey( + IN PCONFIGURATION_COMPONENT_DATA SystemKey, + IN CONFIGURATION_CLASS Class, + IN CONFIGURATION_TYPE Type, + IN IDENTIFIER_FLAG Flags, + IN ULONG Key, + IN ULONG Affinity, + IN PCHAR IdentifierString, + IN PCM_PARTIAL_RESOURCE_LIST ResourceList, + IN ULONG Size, + OUT PCONFIGURATION_COMPONENT_DATA *ComponentKey +); + +/* EOF */ Propchange: trunk/reactos/boot/freeldr/freeldr/include/arch/archwsup.h ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/arm/hardware.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/arch/arm/hardware.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/arch/arm/hardware.h [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -15,15 +15,6 @@ #include "../../../../../armllb/inc/osloader.h" #include "../../../../../armllb/inc/machtype.h" -// -// ARC Component Configuration Routines -// -VOID -NTAPI -FldrCreateSystemKey( - OUT PCONFIGURATION_COMPONENT_DATA *SystemKey -); - extern PARM_BOARD_CONFIGURATION_BLOCK ArmBoardBlock; extern ULONG FirstLevelDcacheSize; extern ULONG FirstLevelDcacheFillSize; Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/pc/hardware.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/arch/pc/hardware.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/arch/pc/hardware.h [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -25,30 +25,6 @@ #define TAG_HW_RESOURCE_LIST 'lRwH' #define TAG_HW_DISK_CONTEXT 'cDwH' - -// -// ARC Component Configuration Routines -// -VOID -NTAPI -FldrCreateSystemKey( - OUT PCONFIGURATION_COMPONENT_DATA *SystemKey -); - -VOID -NTAPI -FldrCreateComponentKey( - IN PCONFIGURATION_COMPONENT_DATA SystemKey, - IN CONFIGURATION_CLASS Class, - IN CONFIGURATION_TYPE Type, - IN IDENTIFIER_FLAG Flags, - IN ULONG Key, - IN ULONG Affinity, - IN PCHAR IdentifierString, - IN PCM_PARTIAL_RESOURCE_LIST ResourceList, - IN ULONG Size, - OUT PCONFIGURATION_COMPONENT_DATA *ComponentKey -); /* PROTOTYPES ***************************************************************/ Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/powerpc/hardware.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/arch/powerpc/hardware.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/arch/powerpc/hardware.h [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -27,30 +27,6 @@ #define CONFIG_CMD(bus, dev_fn, where) \ (0x80000000 | (((ULONG)(bus)) << 16) | (((dev_fn) & 0x1F) << 11) | (((dev_fn) & 0xE0) << 3) | ((where) & ~3)) -// -// ARC Component Configuration Routines -// -VOID -NTAPI -FldrCreateSystemKey( - OUT PCONFIGURATION_COMPONENT_DATA *SystemKey -); - -VOID -NTAPI -FldrCreateComponentKey( - IN PCONFIGURATION_COMPONENT_DATA SystemKey, - IN CONFIGURATION_CLASS Class, - IN CONFIGURATION_TYPE Type, - IN IDENTIFIER_FLAG Flags, - IN ULONG Key, - IN ULONG Affinity, - IN PCHAR IdentifierString, - IN PCM_PARTIAL_RESOURCE_LIST ResourceList, - IN ULONG Size, - OUT PCONFIGURATION_COMPONENT_DATA *ComponentKey -); - /* PROTOTYPES ***************************************************************/ /* hardware.c */ 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] Sun Feb 1 21:35:45 2015 @@ -56,6 +56,7 @@ /* Internal headers */ // #include <arcemul.h> +#include <arcname.h> #include <bytesex.h> #include <cache.h> #include <cmdline.h> @@ -75,8 +76,6 @@ #include <options.h> #include <oslist.h> #include <ramdisk.h> -#include <reactos.h> -#include <registry.h> #include <ui.h> #include <ver.h> #include <video.h> @@ -96,6 +95,7 @@ #include <ui/tui.h> /* Arch specific includes */ +#include <arch/archwsup.h> #if defined(_M_IX86) || defined(_M_AMD64) #include <arch/pc/hardware.h> #include <arch/pc/pcbios.h> Removed: 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 (removed) @@ -1,39 +0,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 - -/////////////////////////////////////////////////////////////////////////////////////// -// -// ARC Path Functions -// -/////////////////////////////////////////////////////////////////////////////////////// -BOOLEAN -DissectArcPath2( - IN CHAR* ArcPath, - OUT ULONG* x, - OUT ULONG* y, - OUT ULONG* z, - OUT ULONG* Partition, - OUT ULONG *PathSyntax); -BOOLEAN DissectArcPath(CHAR *ArcPath, CHAR *BootPath, UCHAR* BootDrive, ULONG* BootPartition); -VOID ConstructArcPath(PCHAR ArcPath, PCHAR SystemFolder, UCHAR Disk, ULONG Partition); -#if 0 -UCHAR ConvertArcNameToBiosDriveNumber(PCHAR ArcPath); -#endif Removed: trunk/reactos/boot/freeldr/freeldr/include/registry.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/registry.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/registry.h (removed) @@ -1,141 +0,0 @@ -/* - * FreeLoader - registry.h - * - * Copyright (C) 2001 Eric Kohl - * - * 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. - */ - -#ifndef __REGISTRY_H -#define __REGISTRY_H - -#define TAG_REG_NAME 'NgeR' -#define TAG_REG_KEY 'KgeR' -#define TAG_REG_KEY_DATA 'DgeR' -#define TAG_REG_VALUE 'VgeR' - -typedef struct _REG_KEY -{ - LIST_ENTRY KeyList; - LIST_ENTRY SubKeyList; - LIST_ENTRY ValueList; - - ULONG SubKeyCount; - ULONG ValueCount; - - ULONG NameSize; - PWCHAR Name; - - /* default data */ - ULONG DataType; - ULONG DataSize; - PCHAR Data; -} KEY, *FRLDRHKEY, **PFRLDRHKEY; - - -typedef struct _REG_VALUE -{ - LIST_ENTRY ValueList; - - /* value name */ - ULONG NameSize; - PWCHAR Name; - - /* value data */ - ULONG DataType; - ULONG DataSize; - PCHAR Data; -} VALUE, *PVALUE; - -#define assert(x) - -VOID -RegInitializeRegistry(VOID); - -LONG -RegInitCurrentControlSet(BOOLEAN LastKnownGood); - - -LONG -RegCreateKey(FRLDRHKEY ParentKey, - PCWSTR KeyName, - PFRLDRHKEY Key); - -LONG -RegDeleteKey(FRLDRHKEY Key, - PCWSTR Name); - -LONG -RegEnumKey( - _In_ FRLDRHKEY Key, - _In_ ULONG Index, - _Out_ PWCHAR Name, - _Inout_ ULONG* NameSize, - _Out_opt_ FRLDRHKEY *SubKey); - -LONG -RegOpenKey(FRLDRHKEY ParentKey, - PCWSTR KeyName, - PFRLDRHKEY Key); - - -LONG -RegSetValue(FRLDRHKEY Key, - PCWSTR ValueName, - ULONG Type, - PCSTR Data, - ULONG DataSize); - -LONG -RegQueryValue(FRLDRHKEY Key, - PCWSTR ValueName, - ULONG* Type, - PUCHAR Data, - ULONG* DataSize); - -LONG -RegDeleteValue(FRLDRHKEY Key, - PCWSTR ValueName); - -LONG -RegEnumValue(FRLDRHKEY Key, - ULONG Index, - PWCHAR ValueName, - ULONG* NameSize, - ULONG* Type, - PUCHAR Data, - ULONG* DataSize); - -ULONG -RegGetSubKeyCount (FRLDRHKEY Key); - -ULONG -RegGetValueCount (FRLDRHKEY Key); - - -BOOLEAN -RegImportBinaryHive (PCHAR ChunkBase, - ULONG ChunkSize); - -BOOLEAN -RegExportBinaryHive (PCWSTR KeyName, - PCHAR ChunkBase, - ULONG* ChunkSize); - - -#endif /* __REGISTRY_H */ - -/* EOF */ - Modified: trunk/reactos/boot/freeldr/freeldr/include/winldr.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/winldr.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/winldr.h [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -191,4 +191,3 @@ VOID WinLdrSetProcessorContext(VOID); - Modified: trunk/reactos/boot/freeldr/freeldr/machine.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/machi…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/machine.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/machine.c [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -45,127 +45,127 @@ VOID MachConsPutChar(int Ch) { - MachVtbl.ConsPutChar(Ch); + MachVtbl.ConsPutChar(Ch); } BOOLEAN MachConsKbHit() { - return MachVtbl.ConsKbHit(); + return MachVtbl.ConsKbHit(); } int MachConsGetCh() { - return MachVtbl.ConsGetCh(); + return MachVtbl.ConsGetCh(); } VOID MachVideoClearScreen(UCHAR Attr) { - MachVtbl.VideoClearScreen(Attr); + MachVtbl.VideoClearScreen(Attr); } VIDEODISPLAYMODE MachVideoSetDisplayMode(char *DisplayMode, BOOLEAN Init) { - return MachVtbl.VideoSetDisplayMode(DisplayMode, Init); + return MachVtbl.VideoSetDisplayMode(DisplayMode, Init); } VOID MachVideoGetDisplaySize(PULONG Width, PULONG Height, PULONG Depth) { - MachVtbl.VideoGetDisplaySize(Width, Height, Depth); + MachVtbl.VideoGetDisplaySize(Width, Height, Depth); } ULONG MachVideoGetBufferSize(VOID) { - return MachVtbl.VideoGetBufferSize(); + return MachVtbl.VideoGetBufferSize(); } VOID MachVideoSetTextCursorPosition(UCHAR X, UCHAR Y) { - MachVtbl.VideoSetTextCursorPosition(X, Y); + MachVtbl.VideoSetTextCursorPosition(X, Y); } VOID MachVideoHideShowTextCursor(BOOLEAN Show) { - MachVtbl.VideoHideShowTextCursor(Show); + MachVtbl.VideoHideShowTextCursor(Show); } VOID MachVideoPutChar(int Ch, UCHAR Attr, unsigned X, unsigned Y) { - MachVtbl.VideoPutChar(Ch, Attr, X, Y); + MachVtbl.VideoPutChar(Ch, Attr, X, Y); } VOID MachVideoCopyOffScreenBufferToVRAM(PVOID Buffer) { - MachVtbl.VideoCopyOffScreenBufferToVRAM(Buffer); + MachVtbl.VideoCopyOffScreenBufferToVRAM(Buffer); } BOOLEAN MachVideoIsPaletteFixed(VOID) { - return MachVtbl.VideoIsPaletteFixed(); + return MachVtbl.VideoIsPaletteFixed(); } VOID MachVideoSetPaletteColor(UCHAR Color, UCHAR Red, UCHAR Green, UCHAR Blue) { - MachVtbl.VideoSetPaletteColor(Color, Red, Green, Blue); + MachVtbl.VideoSetPaletteColor(Color, Red, Green, Blue); } VOID MachVideoGetPaletteColor(UCHAR Color, UCHAR *Red, UCHAR *Green, UCHAR *Blue) { - MachVtbl.VideoGetPaletteColor(Color, Red, Green, Blue); + MachVtbl.VideoGetPaletteColor(Color, Red, Green, Blue); } VOID MachVideoSync(VOID) { - MachVtbl.VideoSync(); + MachVtbl.VideoSync(); } VOID MachBeep(VOID) { - MachVtbl.Beep(); + MachVtbl.Beep(); } VOID MachPrepareForReactOS(IN BOOLEAN Setup) { - MachVtbl.PrepareForReactOS(Setup); + MachVtbl.PrepareForReactOS(Setup); } BOOLEAN MachDiskGetBootPath(char *BootPath, unsigned Size) { - return MachVtbl.DiskGetBootPath(BootPath, Size); + return MachVtbl.DiskGetBootPath(BootPath, Size); } BOOLEAN MachDiskReadLogicalSectors(UCHAR DriveNumber, ULONGLONG SectorNumber, ULONG SectorCount, PVOID Buffer) { - return MachVtbl.DiskReadLogicalSectors(DriveNumber, SectorNumber, SectorCount, Buffer); + return MachVtbl.DiskReadLogicalSectors(DriveNumber, SectorNumber, SectorCount, Buffer); } BOOLEAN MachDiskGetDriveGeometry(UCHAR DriveNumber, PGEOMETRY DriveGeometry) { - return MachVtbl.DiskGetDriveGeometry(DriveNumber, DriveGeometry); + return MachVtbl.DiskGetDriveGeometry(DriveNumber, DriveGeometry); } ULONG MachDiskGetCacheableBlockCount(UCHAR DriveNumber) { - return MachVtbl.DiskGetCacheableBlockCount(DriveNumber); + return MachVtbl.DiskGetCacheableBlockCount(DriveNumber); } Modified: trunk/reactos/boot/freeldr/freeldr/options.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/optio…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/options.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/options.c [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -17,8 +17,12 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +/* INCLUDES *******************************************************************/ + #include <freeldr.h> #include <debug.h> + +/* GLOBALS ********************************************************************/ PCSTR OptionsMenuList[] = { @@ -61,9 +65,7 @@ " +peloader\n" "NOTE: all letters must be lowercase, no spaces allowed."; -// -// The boot options are mutually exclusive. -// +/* The boot options are mutually exclusive */ enum BootOption { NO_OPTION = 0, @@ -82,6 +84,8 @@ static BOOLEAN BootLogging = FALSE; static BOOLEAN VgaMode = FALSE; static BOOLEAN DebuggingMode = FALSE; + +/* FUNCTIONS ******************************************************************/ VOID DoOptionsMenu(VOID) { @@ -97,11 +101,11 @@ TRUE, NULL)) { - // The user pressed ESC + /* The user pressed ESC */ return; } - // Clear the backdrop + /* Clear the backdrop */ UiDrawBackdrop(); switch (SelectedMenuItem) @@ -242,15 +246,15 @@ switch (BootOptionChoice) { case SAFE_MODE: - strcat(BootOptions, " /SAFEBOOT:MINIMAL /SOS"); //FIXME: NOGUIBOOT should also be specified + strcat(BootOptions, " /SAFEBOOT:MINIMAL /SOS"); // FIXME: NOGUIBOOT should also be specified break; case SAFE_MODE_WITH_NETWORKING: - strcat(BootOptions, " /SAFEBOOT:NETWORK /SOS"); //FIXME: NOGUIBOOT should also be specified + strcat(BootOptions, " /SAFEBOOT:NETWORK /SOS"); // FIXME: NOGUIBOOT should also be specified break; case SAFE_MODE_WITH_COMMAND_PROMPT: - strcat(BootOptions, " /SAFEBOOT:MINIMAL(ALTERNATESHELL) /SOS"); //FIXME: NOGUIBOOT should also be specified + strcat(BootOptions, " /SAFEBOOT:MINIMAL(ALTERNATESHELL) /SOS"); // FIXME: NOGUIBOOT should also be specified break; case LAST_KNOWN_GOOD_CONFIGURATION: Modified: trunk/reactos/boot/freeldr/freeldr/oslist.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/oslis…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/oslist.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/oslist.c [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -17,10 +17,14 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +/* INCLUDES *******************************************************************/ + #include <freeldr.h> -#define TAG_STRING ' rtS' +#define TAG_STRING ' rtS' #define TAG_OS_ITEM 'tISO' + +/* FUNCTIONS ******************************************************************/ static PCSTR CopyString(PCSTR Source) { @@ -28,11 +32,10 @@ if (!Source) return NULL; + Dest = FrLdrHeapAlloc(strlen(Source) + 1, TAG_STRING); if (Dest) - { strcpy(Dest, Source); - } return Dest; } @@ -48,38 +51,24 @@ ULONG Count; OperatingSystemItem* Items; - // - // Open the [FreeLoader] section - // + /* Open the [FreeLoader] section */ if (!IniOpenSection("Operating Systems", &SectionId)) - { return NULL; - } - // - // Count number of operating systems in the section - // + /* Count number of operating systems in the section */ Count = IniGetNumSectionItems(SectionId); - // - // Allocate memory to hold operating system lists - // + /* Allocate memory to hold operating system lists */ Items = FrLdrHeapAlloc(Count * sizeof(OperatingSystemItem), TAG_OS_ITEM); if (!Items) - { return NULL; - } - // - // Now loop through and read the operating system section and display names - // + /* Now loop through and read the operating system section and display names */ for (Idx = 0; Idx < Count; Idx++) { IniReadSettingByNumber(SectionId, Idx, SettingName, sizeof(SettingName), SettingValue, sizeof(SettingValue)); - // - // Search start and end of the title - // + /* Search start and end of the title */ OsLoadOptions = NULL; TitleStart = SettingValue; while (*TitleStart == ' ' || *TitleStart == '"') @@ -95,17 +84,13 @@ OsLoadOptions = TitleEnd + 1; } - // - // Copy the system partition, identifier and options - // + /* Copy the system partition, identifier and options */ Items[Idx].SystemPartition = CopyString(SettingName); Items[Idx].LoadIdentifier = CopyString(TitleStart); Items[Idx].OsLoadOptions = CopyString(OsLoadOptions); } - // - // Return success - // + /* Return success */ *OperatingSystemCountPointer = Count; return Items; } Modified: trunk/reactos/boot/freeldr/freeldr/version.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/versi…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/version.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/version.c [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -19,7 +19,7 @@ #include <freeldr.h> -CHAR FreeLoaderVersionString[80]; +CHAR FreeLoaderVersionString[80]; PCHAR GetFreeLoaderVersionString(VOID) { Copied: trunk/reactos/boot/freeldr/freeldr/windows/registry.c (from r66136, trunk/reactos/boot/freeldr/freeldr/reactos/registry.c) URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/reactos/registry.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/windows/registry.c [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -20,8 +20,9 @@ #include <freeldr.h> #include <cmlib.h> +#include "registry.h" + #include <debug.h> - DBG_DEFAULT_CHANNEL(REGISTRY); static PCMHIVE CmHive; @@ -70,7 +71,6 @@ { /* Nothing to do */ } - LONG RegInitCurrentControlSet( @@ -530,7 +530,6 @@ return ERROR_INVALID_PARAMETER; } - LONG RegEnumValue( _In_ FRLDRHKEY Key, Copied: trunk/reactos/boot/freeldr/freeldr/windows/registry.h (from r66136, trunk/reactos/boot/freeldr/freeldr/include/registry.h) URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/registry.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/windows/registry.h [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -28,54 +28,42 @@ typedef struct _REG_KEY { - LIST_ENTRY KeyList; - LIST_ENTRY SubKeyList; - LIST_ENTRY ValueList; + LIST_ENTRY KeyList; + LIST_ENTRY SubKeyList; + LIST_ENTRY ValueList; - ULONG SubKeyCount; - ULONG ValueCount; + ULONG SubKeyCount; + ULONG ValueCount; - ULONG NameSize; - PWCHAR Name; + ULONG NameSize; + PWCHAR Name; - /* default data */ - ULONG DataType; - ULONG DataSize; - PCHAR Data; + /* Default data */ + ULONG DataType; + ULONG DataSize; + PCHAR Data; } KEY, *FRLDRHKEY, **PFRLDRHKEY; typedef struct _REG_VALUE { - LIST_ENTRY ValueList; + LIST_ENTRY ValueList; - /* value name */ - ULONG NameSize; - PWCHAR Name; + /* Value name */ + ULONG NameSize; + PWCHAR Name; - /* value data */ - ULONG DataType; - ULONG DataSize; - PCHAR Data; + /* Value data */ + ULONG DataType; + ULONG DataSize; + PCHAR Data; } VALUE, *PVALUE; - -#define assert(x) VOID RegInitializeRegistry(VOID); LONG RegInitCurrentControlSet(BOOLEAN LastKnownGood); - - -LONG -RegCreateKey(FRLDRHKEY ParentKey, - PCWSTR KeyName, - PFRLDRHKEY Key); - -LONG -RegDeleteKey(FRLDRHKEY Key, - PCWSTR Name); LONG RegEnumKey( @@ -87,9 +75,8 @@ LONG RegOpenKey(FRLDRHKEY ParentKey, - PCWSTR KeyName, - PFRLDRHKEY Key); - + PCWSTR KeyName, + PFRLDRHKEY Key); LONG RegSetValue(FRLDRHKEY Key, @@ -138,4 +125,3 @@ #endif /* __REGISTRY_H */ /* EOF */ - Modified: trunk/reactos/boot/freeldr/freeldr/windows/winldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/windows/winldr.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/windows/winldr.c [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -20,10 +20,11 @@ */ #include <freeldr.h> +#include "registry.h" #include <ndk/ldrtypes.h> + #include <debug.h> - DBG_DEFAULT_CHANNEL(WINDOWS); //FIXME: Find a better way to retrieve ARC disk information Modified: trunk/reactos/boot/freeldr/freeldr/windows/wlregistry.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/windows/wlregistry.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/windows/wlregistry.c [iso-8859-1] Sun Feb 1 21:35:45 2015 @@ -9,8 +9,9 @@ /* INCLUDES ***************************************************************/ #include <freeldr.h> +#include "registry.h" + #include <debug.h> - DBG_DEFAULT_CHANNEL(WINDOWS); // The only global var here, used to mark mem pages as NLS in WinLdrSetupMemoryLayout() @@ -278,7 +279,6 @@ return TRUE; } - BOOLEAN WinLdrLoadNLSData(IN OUT PLOADER_PARAMETER_BLOCK LoaderBlock,
9 years, 10 months
1
0
0
0
[hbelusca] 66144: [FREELDR] - Fix date format in CHANGELOG (that uses that #$@! of US format) - Diverse code style changes (whitespace, extra braces, C++ to C-style comments, ...)
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sun Feb 1 20:22:13 2015 New Revision: 66144 URL:
http://svn.reactos.org/svn/reactos?rev=66144&view=rev
Log: [FREELDR] - Fix date format in CHANGELOG (that uses that #$@! of US format) - Diverse code style changes (whitespace, extra braces, C++ to C-style comments, ...) Added: trunk/reactos/boot/freeldr/freeldr/include/hal.h (with props) Modified: trunk/reactos/boot/freeldr/freeldr/CHANGELOG trunk/reactos/boot/freeldr/freeldr/arch/i386/i386bug.c trunk/reactos/boot/freeldr/freeldr/bootmgr.c trunk/reactos/boot/freeldr/freeldr/cmdline.c trunk/reactos/boot/freeldr/freeldr/custom.c trunk/reactos/boot/freeldr/freeldr/debug.c trunk/reactos/boot/freeldr/freeldr/freeldr.c trunk/reactos/boot/freeldr/freeldr/include/cmdline.h trunk/reactos/boot/freeldr/freeldr/include/debug.h trunk/reactos/boot/freeldr/freeldr/include/freeldr.h trunk/reactos/boot/freeldr/freeldr/linuxboot.c trunk/reactos/boot/freeldr/freeldr/miscboot.c Modified: trunk/reactos/boot/freeldr/freeldr/CHANGELOG URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/CHANG…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/CHANGELOG [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/CHANGELOG [iso-8859-1] Sun Feb 1 20:22:13 2015 @@ -1,4 +1,4 @@ -Changes in v3.0+ (05/01/2015) (hbelusca) +Changes in v3.0+ (01/05/2015) (hbelusca) - Remove support for special value "LiveCD" of SystemPath option for loading ReactOS since now we treat non-ARC SystemPath as Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/i386bug.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/i386bug.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/i386bug.c [iso-8859-1] Sun Feb 1 20:22:13 2015 @@ -163,7 +163,7 @@ TrapFrame->SegSs, Special->Ldtr, Special->Idtr.Limit); InstructionPointer = (PUCHAR)TrapFrame->Rip; #endif - PrintText("\nInstructionstream: %.2x %.2x %.2x %.2x %.2x %.2x %.2x %.2x \n", + PrintText("\nInstruction stream: %.2x %.2x %.2x %.2x %.2x %.2x %.2x %.2x \n", InstructionPointer[0], InstructionPointer[1], InstructionPointer[2], InstructionPointer[3], InstructionPointer[4], InstructionPointer[5], @@ -240,4 +240,3 @@ { FrLdrBugCheckEx(BugCode, 0, 0); } - Modified: trunk/reactos/boot/freeldr/freeldr/bootmgr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/bootm…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/bootmgr.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/bootmgr.c [iso-8859-1] Sun Feb 1 20:22:13 2015 @@ -17,9 +17,14 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +/* INCLUDES *******************************************************************/ + #include <freeldr.h> -ARC_DISK_SIGNATURE reactos_arc_disk_info[32]; // ARC Disk Information +/* GLOBALS ********************************************************************/ + +// ARC Disk Information +ARC_DISK_SIGNATURE reactos_arc_disk_info[32]; ULONG reactos_disk_count = 0; CHAR reactos_arc_strings[32][256]; @@ -48,9 +53,9 @@ {"WindowsNT40" , _WIN32_WINNT_NT4 , LoadAndBootWindows }, #endif {"Windows2003" , _WIN32_WINNT_WS03, LoadAndBootWindows }, - -// {"Not found" , 0 , NULL } }; + +/* FUNCTIONS ******************************************************************/ VOID LoadOperatingSystem(IN OperatingSystemItem* OperatingSystem) { @@ -59,10 +64,10 @@ CHAR BootType[80]; ULONG i; - // Try to open the operating system section in the .ini file + /* Try to open the operating system section in the .ini file */ if (IniOpenSection(SectionName, &SectionId)) { - // Try to read the boot type + /* Try to read the boot type */ IniReadSettingByName(SectionId, "BootType", BootType, sizeof(BootType)); } else @@ -72,7 +77,7 @@ if (BootType[0] == ANSI_NULL && SectionName[0] != ANSI_NULL) { - // Try to infere the boot type value + /* Try to infere the boot type value */ #ifdef _M_IX86 ULONG FileId; if (ArcOpen((PSTR)SectionName, OpenReadOnly, &FileId) == ESUCCESS) @@ -87,12 +92,12 @@ } } - // Install the drive mapper according to this section drive mappings + /* Install the drive mapper according to this section drive mappings */ #if defined(_M_IX86) && !defined(_MSC_VER) DriveMapMapDrivesInSection(SectionName); #endif - // Loop through the OS loading method table and find a suitable OS to boot + /* Loop through the OS loading method table and find a suitable OS to boot */ for (i = 0; i < sizeof(OSLoadingMethods) / sizeof(OSLoadingMethods[0]); ++i) { if (_stricmp(BootType, OSLoadingMethods[i].BootType) == 0) @@ -106,19 +111,17 @@ ULONG GetDefaultOperatingSystem(OperatingSystemItem* OperatingSystemList, ULONG OperatingSystemCount) { - CHAR DefaultOSText[80]; - PCSTR DefaultOSName; - ULONG_PTR SectionId; - ULONG DefaultOS = 0; - ULONG Idx; + CHAR DefaultOSText[80]; + PCSTR DefaultOSName; + ULONG_PTR SectionId; + ULONG DefaultOS = 0; + ULONG Idx; if (!IniOpenSection("FreeLoader", &SectionId)) - { return 0; - } DefaultOSName = CmdLineGetDefaultOS(); - if (NULL == DefaultOSName) + if (DefaultOSName == NULL) { if (IniReadSettingByName(SectionId, "DefaultOS", DefaultOSText, sizeof(DefaultOSText))) { @@ -126,9 +129,9 @@ } } - if (NULL != DefaultOSName) - { - for (Idx=0; Idx<OperatingSystemCount; Idx++) + if (DefaultOSName != NULL) + { + for (Idx = 0; Idx<OperatingSystemCount; Idx++) { if (_stricmp(DefaultOSName, OperatingSystemList[Idx].SystemPartition) == 0) { @@ -148,24 +151,16 @@ ULONG_PTR SectionId; TimeOut = CmdLineGetTimeOut(); - if (0 <= TimeOut) - { + if (TimeOut >= 0) return TimeOut; - } if (!IniOpenSection("FreeLoader", &SectionId)) - { return -1; - } if (IniReadSettingByName(SectionId, "TimeOut", TimeOutText, sizeof(TimeOutText))) - { TimeOut = atoi(TimeOutText); - } else - { TimeOut = -1; - } return TimeOut; } @@ -175,42 +170,41 @@ if (KeyPress == KEY_F8) { DoOptionsMenu(); - return TRUE; } - // We didn't handle the key + /* We didn't handle the key */ return FALSE; } VOID RunLoader(VOID) { - ULONG_PTR SectionId; - ULONG OperatingSystemCount; - OperatingSystemItem* OperatingSystemList; - PCSTR* OperatingSystemDisplayNames; - ULONG DefaultOperatingSystem; - LONG TimeOut; - ULONG SelectedOperatingSystem; - ULONG i; + ULONG_PTR SectionId; + ULONG OperatingSystemCount; + OperatingSystemItem* OperatingSystemList; + PCSTR* OperatingSystemDisplayNames; + ULONG DefaultOperatingSystem; + LONG TimeOut; + ULONG SelectedOperatingSystem; + ULONG i; if (!MachInitializeBootDevices()) { - UiMessageBoxCritical("Error when detecting hardware"); + UiMessageBoxCritical("Error when detecting hardware."); return; } #ifdef _M_IX86 - // Load additional SCSI driver (if any) + /* Load additional SCSI driver (if any) */ if (LoadBootDeviceDriver() != ESUCCESS) { - UiMessageBoxCritical("Unable to load additional boot device driver"); + UiMessageBoxCritical("Unable to load additional boot device drivers."); } #endif if (!IniFileInitialize()) { - UiMessageBoxCritical("Error initializing .ini file"); + UiMessageBoxCritical("Error initializing .ini file."); return; } @@ -219,6 +213,7 @@ UiMessageBoxCritical("Section [FreeLoader] not found in freeldr.ini."); return; } + TimeOut = GetTimeOut(); if (!UiInitialize(TRUE)) @@ -231,41 +226,36 @@ if (!OperatingSystemList) { UiMessageBox("Unable to read operating systems section in freeldr.ini.\nPress ENTER to reboot."); - goto reboot; + goto Reboot; } if (OperatingSystemCount == 0) { UiMessageBox("There were no operating systems listed in freeldr.ini.\nPress ENTER to reboot."); - goto reboot; + goto Reboot; } DefaultOperatingSystem = GetDefaultOperatingSystem(OperatingSystemList, OperatingSystemCount); - // - // Create list of display names - // + /* Create list of display names */ OperatingSystemDisplayNames = FrLdrTempAlloc(sizeof(PCSTR) * OperatingSystemCount, 'mNSO'); if (!OperatingSystemDisplayNames) - { - goto reboot; - } + goto Reboot; + for (i = 0; i < OperatingSystemCount; i++) { OperatingSystemDisplayNames[i] = OperatingSystemList[i].LoadIdentifier; } - // - // Find all the message box settings and run them - // + /* Find all the message box settings and run them */ UiShowMessageBoxesInSection("FreeLoader"); for (;;) { - // Redraw the backdrop + /* Redraw the backdrop */ UiDrawBackdrop(); - // Show the operating system list menu + /* Show the operating system list menu */ if (!UiDisplayMenu("Please select the operating system to start:", "For troubleshooting and advanced startup options for " "ReactOS, press F8.", @@ -279,16 +269,16 @@ MainBootMenuKeyPressFilter)) { UiMessageBox("Press ENTER to reboot."); - goto reboot; + goto Reboot; } TimeOut = -1; - // Load the chosen operating system + /* Load the chosen operating system */ LoadOperatingSystem(&OperatingSystemList[SelectedOperatingSystem]); } -reboot: +Reboot: UiUnInitialize("Rebooting..."); return; } Modified: trunk/reactos/boot/freeldr/freeldr/cmdline.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/cmdli…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/cmdline.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/cmdline.c [iso-8859-1] Sun Feb 1 20:22:13 2015 @@ -12,6 +12,12 @@ /* GLOBALS ********************************************************************/ +typedef struct tagCMDLINEINFO +{ + const char *DefaultOperatingSystem; + LONG TimeOut; +} CMDLINEINFO, *PCMDLINEINFO; + CCHAR DefaultOs[256]; CMDLINEINFO CmdLineInfo; @@ -23,43 +29,34 @@ PCHAR End, Setting; ULONG_PTR Length, Offset = 0; - // - // Set defaults - // + /* Set defaults */ CmdLineInfo.DefaultOperatingSystem = NULL; CmdLineInfo.TimeOut = -1; - // - // Get timeout - // + /* Get timeout */ Setting = strstr(CmdLine, "timeout="); if (Setting) CmdLineInfo.TimeOut = atoi(Setting + sizeof("timeout=") + sizeof(ANSI_NULL)); - // - // Get default OS - // + /* Get default OS */ Setting = strstr(CmdLine, "defaultos="); if (Setting) { - // - // Check if there's more command-line parameters following - // + /* Check if there's more command-line parameters following */ Setting += sizeof("defaultos=") + sizeof(ANSI_NULL); End = strstr(Setting, " "); - if (End) Length = End - Setting; else Length = sizeof(DefaultOs); + if (End) + Length = End - Setting; + else + Length = sizeof(DefaultOs); - // - // Copy the default OS - // + /* Copy the default OS */ strncpy(DefaultOs, Setting, Length); CmdLineInfo.DefaultOperatingSystem = DefaultOs; } - // - // Get ramdisk base address - // + /* Get ramdisk base address */ Setting = strstr(CmdLine, "rdbase="); if (Setting) gRamDiskBase = (PVOID)(ULONG_PTR)strtoull(Setting + sizeof("rdbase=") - @@ -67,9 +64,7 @@ NULL, 0); - // - // Get ramdisk size - // + /* Get ramdisk size */ Setting = strstr(CmdLine, "rdsize="); if (Setting) gRamDiskSize = strtoul(Setting + sizeof("rdsize=") - @@ -77,9 +72,7 @@ NULL, 0); - // - // Get ramdisk offset - // + /* Get ramdisk offset */ Setting = strstr(CmdLine, "rdoffset="); if (Setting) Offset = strtoul(Setting + sizeof("rdoffset=") - @@ -87,9 +80,7 @@ NULL, 0); - // - // Fix it up - // + /* Fix it up */ gRamDiskBase = (PVOID)((ULONG_PTR)gRamDiskBase + Offset); } Modified: trunk/reactos/boot/freeldr/freeldr/custom.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/custo…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/custom.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/custom.c [iso-8859-1] Sun Feb 1 20:22:13 2015 @@ -17,32 +17,37 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifdef _M_IX86 + +/* INCLUDES *******************************************************************/ + #include <freeldr.h> -#ifdef _M_IX86 - -const CHAR BootDrivePrompt[] = "Enter the boot drive.\n\nExamples:\nfd0 - first floppy drive\nhd0 - first hard drive\nhd1 - second hard drive\ncd0 - first CD-ROM drive.\n\nBIOS drive numbers may also be used:\n0 - first floppy drive\n0x80 - first hard drive\n0x81 - second hard drive"; -const CHAR BootPartitionPrompt[] = "Enter the boot partition.\n\nEnter 0 for the active (bootable) partition."; -const CHAR BootSectorFilePrompt[] = "Enter the boot sector file path.\n\nExamples:\n\\BOOTSECT.DOS\n/boot/bootsect.dos"; -const CHAR LinuxKernelPrompt[] = "Enter the Linux kernel image path.\n\nExamples:\n/vmlinuz\n/boot/vmlinuz-2.4.18"; -const CHAR LinuxInitrdPrompt[] = "Enter the initrd image path.\n\nExamples:\n/initrd.gz\n/boot/root.img.gz\n\nLeave blank for no initial ram disk."; -const CHAR LinuxCommandLinePrompt[] = "Enter the Linux kernel command line.\n\nExamples:\nroot=/dev/hda1\nroot=/dev/fd0 read-only\nroot=/dev/sdb1 init=/sbin/init"; -const CHAR ReactOSSystemPathPrompt[] = "Enter the path to your ReactOS system directory.\n\nExamples:\n\\REACTOS\n\\ROS"; -const CHAR ReactOSOptionsPrompt[] = "Enter the options you want passed to the kernel.\n\nExamples:\n/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200\n/FASTDETECT /SOS /NOGUIBOOT\n/BASEVIDEO /MAXMEM=64\n/KERNEL=NTKRNLMP.EXE /HAL=HALMPS.DLL"; - -const CHAR CustomBootPrompt[] = "Press ENTER to boot your custom boot setup."; +/* GLOBALS ********************************************************************/ + +const CHAR BootDrivePrompt[] = "Enter the boot drive.\n\nExamples:\nfd0 - first floppy drive\nhd0 - first hard drive\nhd1 - second hard drive\ncd0 - first CD-ROM drive.\n\nBIOS drive numbers may also be used:\n0 - first floppy drive\n0x80 - first hard drive\n0x81 - second hard drive"; +const CHAR BootPartitionPrompt[] = "Enter the boot partition.\n\nEnter 0 for the active (bootable) partition."; +const CHAR BootSectorFilePrompt[] = "Enter the boot sector file path.\n\nExamples:\n\\BOOTSECT.DOS\n/boot/bootsect.dos"; +const CHAR LinuxKernelPrompt[] = "Enter the Linux kernel image path.\n\nExamples:\n/vmlinuz\n/boot/vmlinuz-2.4.18"; +const CHAR LinuxInitrdPrompt[] = "Enter the initrd image path.\n\nExamples:\n/initrd.gz\n/boot/root.img.gz\n\nLeave blank for no initial ram disk."; +const CHAR LinuxCommandLinePrompt[] = "Enter the Linux kernel command line.\n\nExamples:\nroot=/dev/hda1\nroot=/dev/fd0 read-only\nroot=/dev/sdb1 init=/sbin/init"; +const CHAR ReactOSSystemPathPrompt[] = "Enter the path to your ReactOS system directory.\n\nExamples:\n\\REACTOS\n\\ROS"; +const CHAR ReactOSOptionsPrompt[] = "Enter the options you want passed to the kernel.\n\nExamples:\n/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200\n/FASTDETECT /SOS /NOGUIBOOT\n/BASEVIDEO /MAXMEM=64\n/KERNEL=NTKRNLMP.EXE /HAL=HALMPS.DLL"; +const CHAR CustomBootPrompt[] = "Press ENTER to boot your custom boot setup."; + +/* FUNCTIONS ******************************************************************/ VOID OptionMenuCustomBoot(VOID) { - PCSTR CustomBootMenuList[] = { + PCSTR CustomBootMenuList[] = { "Disk", "Partition", "Boot Sector File", "ReactOS", "Linux" }; - ULONG CustomBootMenuCount = sizeof(CustomBootMenuList) / sizeof(CustomBootMenuList[0]); - ULONG SelectedMenuItem; + ULONG CustomBootMenuCount = sizeof(CustomBootMenuList) / sizeof(CustomBootMenuList[0]); + ULONG SelectedMenuItem; if (!UiDisplayMenu("Please choose a boot method:", "", FALSE, @@ -59,61 +64,53 @@ switch (SelectedMenuItem) { - case 0: // Disk - OptionMenuCustomBootDisk(); - break; - case 1: // Partition - OptionMenuCustomBootPartition(); - break; - case 2: // Boot Sector File - OptionMenuCustomBootBootSectorFile(); - break; - case 3: // ReactOS - OptionMenuCustomBootReactOS(); - break; - case 4: // Linux - OptionMenuCustomBootLinux(); - break; + case 0: // Disk + OptionMenuCustomBootDisk(); + break; + case 1: // Partition + OptionMenuCustomBootPartition(); + break; + case 2: // Boot Sector File + OptionMenuCustomBootBootSectorFile(); + break; + case 3: // ReactOS + OptionMenuCustomBootReactOS(); + break; + case 4: // Linux + OptionMenuCustomBootLinux(); + break; } } VOID OptionMenuCustomBootDisk(VOID) { - ULONG_PTR SectionId; - CHAR SectionName[100]; - CHAR BootDriveString[20]; - TIMEINFO* TimeInfo; - OperatingSystemItem OperatingSystem; - - RtlZeroMemory(SectionName, sizeof(SectionName)); - RtlZeroMemory(BootDriveString, sizeof(BootDriveString)); - - if (!UiEditBox(BootDrivePrompt, BootDriveString, 20)) - { - return; - } - - // Generate a unique section name + ULONG_PTR SectionId; + CHAR SectionName[100]; + CHAR BootDriveString[20]; + TIMEINFO* TimeInfo; + OperatingSystemItem OperatingSystem; + + RtlZeroMemory(SectionName, sizeof(SectionName)); + RtlZeroMemory(BootDriveString, sizeof(BootDriveString)); + + if (!UiEditBox(BootDrivePrompt, BootDriveString, 20)) + return; + + /* Generate a unique section name */ TimeInfo = ArcGetTime(); sprintf(SectionName, "CustomBootDisk%u%u%u%u%u%u", TimeInfo->Year, TimeInfo->Day, TimeInfo->Month, TimeInfo->Hour, TimeInfo->Minute, TimeInfo->Second); - // Add the section - if (!IniAddSection(SectionName, &SectionId)) - { - return; - } - - // Add the BootType + /* Add the section */ + if (!IniAddSection(SectionName, &SectionId)) + return; + + /* Add the BootType */ if (!IniAddSettingValueToSection(SectionId, "BootType", "Drive")) - { - return; - } - - // Add the BootDrive + return; + + /* Add the BootDrive */ if (!IniAddSettingValueToSection(SectionId, "BootDrive", BootDriveString)) - { - return; - } + return; UiMessageBox(CustomBootPrompt); @@ -127,54 +124,42 @@ VOID OptionMenuCustomBootPartition(VOID) { - ULONG_PTR SectionId; - CHAR SectionName[100]; - CHAR BootDriveString[20]; - CHAR BootPartitionString[20]; - TIMEINFO* TimeInfo; - OperatingSystemItem OperatingSystem; + ULONG_PTR SectionId; + CHAR SectionName[100]; + CHAR BootDriveString[20]; + CHAR BootPartitionString[20]; + TIMEINFO* TimeInfo; + OperatingSystemItem OperatingSystem; RtlZeroMemory(SectionName, sizeof(SectionName)); RtlZeroMemory(BootDriveString, sizeof(BootDriveString)); RtlZeroMemory(BootPartitionString, sizeof(BootPartitionString)); if (!UiEditBox(BootDrivePrompt, BootDriveString, 20)) - { - return; - } + return; if (!UiEditBox(BootPartitionPrompt, BootPartitionString, 20)) - { - return; - } - - // Generate a unique section name + return; + + /* Generate a unique section name */ TimeInfo = ArcGetTime(); sprintf(SectionName, "CustomBootPartition%u%u%u%u%u%u", TimeInfo->Year, TimeInfo->Day, TimeInfo->Month, TimeInfo->Hour, TimeInfo->Minute, TimeInfo->Second); - // Add the section - if (!IniAddSection(SectionName, &SectionId)) - { - return; - } - - // Add the BootType + /* Add the section */ + if (!IniAddSection(SectionName, &SectionId)) + return; + + /* Add the BootType */ if (!IniAddSettingValueToSection(SectionId, "BootType", "Partition")) - { - return; - } - - // Add the BootDrive + return; + + /* Add the BootDrive */ if (!IniAddSettingValueToSection(SectionId, "BootDrive", BootDriveString)) - { - return; - } - - // Add the BootPartition + return; + + /* Add the BootPartition */ if (!IniAddSettingValueToSection(SectionId, "BootPartition", BootPartitionString)) - { - return; - } + return; UiMessageBox(CustomBootPrompt); @@ -188,13 +173,13 @@ VOID OptionMenuCustomBootBootSectorFile(VOID) { - ULONG_PTR SectionId; - CHAR SectionName[100]; - CHAR BootDriveString[20]; - CHAR BootPartitionString[20]; - CHAR BootSectorFileString[200]; - TIMEINFO* TimeInfo; - OperatingSystemItem OperatingSystem; + ULONG_PTR SectionId; + CHAR SectionName[100]; + CHAR BootDriveString[20]; + CHAR BootPartitionString[20]; + CHAR BootSectorFileString[200]; + TIMEINFO* TimeInfo; + OperatingSystemItem OperatingSystem; RtlZeroMemory(SectionName, sizeof(SectionName)); RtlZeroMemory(BootDriveString, sizeof(BootDriveString)); @@ -202,53 +187,37 @@ RtlZeroMemory(BootSectorFileString, sizeof(BootSectorFileString)); if (!UiEditBox(BootDrivePrompt, BootDriveString, 20)) - { - return; - } + return; if (!UiEditBox(BootPartitionPrompt, BootPartitionString, 20)) - { - return; - } + return; if (!UiEditBox(BootSectorFilePrompt, BootSectorFileString, 200)) - { - return; - } - - // Generate a unique section name + return; + + /* Generate a unique section name */ TimeInfo = ArcGetTime(); sprintf(SectionName, "CustomBootSectorFile%u%u%u%u%u%u", TimeInfo->Year, TimeInfo->Day, TimeInfo->Month, TimeInfo->Hour, TimeInfo->Minute, TimeInfo->Second); - // Add the section - if (!IniAddSection(SectionName, &SectionId)) - { - return; - } - - // Add the BootType + /* Add the section */ + if (!IniAddSection(SectionName, &SectionId)) + return; + + /* Add the BootType */ if (!IniAddSettingValueToSection(SectionId, "BootType", "BootSector")) - { - return; - } - - // Add the BootDrive + return; + + /* Add the BootDrive */ if (!IniAddSettingValueToSection(SectionId, "BootDrive", BootDriveString)) - { - return; - } - - // Add the BootPartition + return; + + /* Add the BootPartition */ if (!IniAddSettingValueToSection(SectionId, "BootPartition", BootPartitionString)) - { - return; - } - - // Add the BootSectorFile + return; + + /* Add the BootSectorFile */ if (!IniAddSettingValueToSection(SectionId, "BootSectorFile", BootSectorFileString)) - { - return; - } + return; UiMessageBox(CustomBootPrompt); @@ -262,15 +231,15 @@ VOID OptionMenuCustomBootReactOS(VOID) { - ULONG_PTR SectionId; - CHAR SectionName[100]; - CHAR BootDriveString[20]; - CHAR BootPartitionString[20]; - CHAR ReactOSSystemPath[200]; - CHAR ReactOSARCPath[200]; - CHAR ReactOSOptions[200]; - TIMEINFO* TimeInfo; - OperatingSystemItem OperatingSystem; + ULONG_PTR SectionId; + CHAR SectionName[100]; + CHAR BootDriveString[20]; + CHAR BootPartitionString[20]; + CHAR ReactOSSystemPath[200]; + CHAR ReactOSARCPath[200]; + CHAR ReactOSOptions[200]; + TIMEINFO* TimeInfo; + OperatingSystemItem OperatingSystem; RtlZeroMemory(SectionName, sizeof(SectionName)); RtlZeroMemory(BootDriveString, sizeof(BootDriveString)); @@ -279,55 +248,39 @@ RtlZeroMemory(ReactOSOptions, sizeof(ReactOSOptions)); if (!UiEditBox(BootDrivePrompt, BootDriveString, 20)) - { - return; - } + return; if (!UiEditBox(BootPartitionPrompt, BootPartitionString, 20)) - { - return; - } + return; if (!UiEditBox(ReactOSSystemPathPrompt, ReactOSSystemPath, 200)) - { - return; - } + return; if (!UiEditBox(ReactOSOptionsPrompt, ReactOSOptions, 200)) - { - return; - } - - // Generate a unique section name + return; + + /* Generate a unique section name */ TimeInfo = ArcGetTime(); sprintf(SectionName, "CustomReactOS%u%u%u%u%u%u", TimeInfo->Year, TimeInfo->Day, TimeInfo->Month, TimeInfo->Hour, TimeInfo->Minute, TimeInfo->Second); - // Add the section - if (!IniAddSection(SectionName, &SectionId)) - { - return; - } - - // Add the BootType + /* Add the section */ + if (!IniAddSection(SectionName, &SectionId)) + return; + + /* Add the BootType */ if (!IniAddSettingValueToSection(SectionId, "BootType", "Windows2003")) - { - return; - } - - // Construct the ReactOS ARC system path + return; + + /* Construct the ReactOS ARC system path */ ConstructArcPath(ReactOSARCPath, ReactOSSystemPath, DriveMapGetBiosDriveNumber(BootDriveString), atoi(BootPartitionString)); - // Add the system path + /* Add the system path */ if (!IniAddSettingValueToSection(SectionId, "SystemPath", ReactOSARCPath)) - { - return; - } - - // Add the CommandLine + return; + + /* Add the CommandLine */ if (!IniAddSettingValueToSection(SectionId, "Options", ReactOSOptions)) - { - return; - } + return; UiMessageBox(CustomBootPrompt); @@ -341,15 +294,15 @@ VOID OptionMenuCustomBootLinux(VOID) { - ULONG_PTR SectionId; - CHAR SectionName[100]; - CHAR BootDriveString[20]; - CHAR BootPartitionString[20]; - CHAR LinuxKernelString[200]; - CHAR LinuxInitrdString[200]; - CHAR LinuxCommandLineString[200]; - TIMEINFO* TimeInfo; - OperatingSystemItem OperatingSystem; + ULONG_PTR SectionId; + CHAR SectionName[100]; + CHAR BootDriveString[20]; + CHAR BootPartitionString[20]; + CHAR LinuxKernelString[200]; + CHAR LinuxInitrdString[200]; + CHAR LinuxCommandLineString[200]; + TIMEINFO* TimeInfo; + OperatingSystemItem OperatingSystem; RtlZeroMemory(SectionName, sizeof(SectionName)); RtlZeroMemory(BootDriveString, sizeof(BootDriveString)); @@ -359,78 +312,54 @@ RtlZeroMemory(LinuxCommandLineString, sizeof(LinuxCommandLineString)); if (!UiEditBox(BootDrivePrompt, BootDriveString, 20)) - { - return; - } + return; if (!UiEditBox(BootPartitionPrompt, BootPartitionString, 20)) - { - return; - } + return; if (!UiEditBox(LinuxKernelPrompt, LinuxKernelString, 200)) - { - return; - } + return; if (!UiEditBox(LinuxInitrdPrompt, LinuxInitrdString, 200)) - { - return; - } + return; if (!UiEditBox(LinuxCommandLinePrompt, LinuxCommandLineString, 200)) - { - return; - } - - // Generate a unique section name + return; + + /* Generate a unique section name */ TimeInfo = ArcGetTime(); sprintf(SectionName, "CustomLinux%u%u%u%u%u%u", TimeInfo->Year, TimeInfo->Day, TimeInfo->Month, TimeInfo->Hour, TimeInfo->Minute, TimeInfo->Second); - // Add the section - if (!IniAddSection(SectionName, &SectionId)) - { - return; - } - - // Add the BootType + /* Add the section */ + if (!IniAddSection(SectionName, &SectionId)) + return; + + /* Add the BootType */ if (!IniAddSettingValueToSection(SectionId, "BootType", "Linux")) - { - return; - } - - // Add the BootDrive + return; + + /* Add the BootDrive */ if (!IniAddSettingValueToSection(SectionId, "BootDrive", BootDriveString)) - { - return; - } - - // Add the BootPartition + return; + + /* Add the BootPartition */ if (!IniAddSettingValueToSection(SectionId, "BootPartition", BootPartitionString)) - { - return; - } - - // Add the Kernel + return; + + /* Add the Kernel */ if (!IniAddSettingValueToSection(SectionId, "Kernel", LinuxKernelString)) - { - return; - } - - // Add the Initrd + return; + + /* Add the Initrd */ if (strlen(LinuxInitrdString) > 0) { if (!IniAddSettingValueToSection(SectionId, "Initrd", LinuxInitrdString)) - { return; - } } - // Add the CommandLine + /* Add the CommandLine */ if (!IniAddSettingValueToSection(SectionId, "CommandLine", LinuxCommandLineString)) - { - return; - } + return; UiMessageBox(CustomBootPrompt); Modified: trunk/reactos/boot/freeldr/freeldr/debug.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/debug…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/debug.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/debug.c [iso-8859-1] Sun Feb 1 20:22:13 2015 @@ -23,12 +23,12 @@ #if DBG && !defined(_M_ARM) -//#define DEBUG_ALL -//#define DEBUG_WARN -//#define DEBUG_ERR -//#define DEBUG_INIFILE -//#define DEBUG_REACTOS -//#define DEBUG_CUSTOM +// #define DEBUG_ALL +// #define DEBUG_WARN +// #define DEBUG_ERR +// #define DEBUG_INIFILE +// #define DEBUG_REACTOS +// #define DEBUG_CUSTOM #define DEBUG_NONE #define DBG_DEFAULT_LEVELS (ERR_LEVEL|FIXME_LEVEL) @@ -44,23 +44,22 @@ #define BOCHS_OUTPUT_PORT 0xe9 - static UCHAR DbgChannels[DBG_CHANNELS_COUNT]; -ULONG DebugPort = RS232; -//ULONG DebugPort = SCREEN; -//ULONG DebugPort = BOCHS; -//ULONG DebugPort = SCREEN|BOCHS; +ULONG DebugPort = RS232; +// ULONG DebugPort = SCREEN; +// ULONG DebugPort = BOCHS; +// ULONG DebugPort = SCREEN|BOCHS; #ifdef _WINKD_ /* COM1 is the WinDbg port */ -ULONG ComPort = COM2; +ULONG ComPort = COM2; #else -ULONG ComPort = COM1; +ULONG ComPort = COM1; #endif -//ULONG BaudRate = 19200; -ULONG BaudRate = 115200; - -BOOLEAN DebugStartOfLine = TRUE; +// ULONG BaudRate = 19200; +ULONG BaudRate = 115200; + +BOOLEAN DebugStartOfLine = TRUE; VOID DebugInit(VOID) { @@ -93,16 +92,13 @@ VOID DebugPrintChar(UCHAR Character) { if (Character == '\n') - { DebugStartOfLine = TRUE; - } if (DebugPort & RS232) { if (Character == '\n') - { Rs232PortPutByte('\r'); - } + Rs232PortPutByte(Character); } if (DebugPort & BOCHS) @@ -152,13 +148,13 @@ char Buffer[2096]; char *ptr = Buffer; - // Mask out unwanted debug messages + /* Mask out unwanted debug messages */ if (!(DbgChannels[Mask] & Level) && !(Level & DBG_DEFAULT_LEVELS )) { return; } - // Print the header if we have started a new line + /* Print the header if we have started a new line */ if (DebugStartOfLine) { DbgPrint("(%s:%lu) ", File, Line); @@ -199,11 +195,9 @@ ULONG Idx; ULONG Idx2; - // Mask out unwanted debug messages + /* Mask out unwanted debug messages */ if (!(DbgChannels[Mask] & TRACE_LEVEL)) - { return; - } DebugStartOfLine = FALSE; // We don't want line headers DbgPrint("Dumping buffer at %p with length of %lu bytes:\n", Buffer, Length); @@ -213,21 +207,13 @@ DebugStartOfLine = FALSE; // We don't want line headers if (Idx < 0x0010) - { DbgPrint("000%x:\t", Idx); - } else if (Idx < 0x0100) - { DbgPrint("00%x:\t", Idx); - } else if (Idx < 0x1000) - { DbgPrint("0%x:\t", Idx); - } else - { DbgPrint("%x:\t", Idx); - } for (Idx2=0; Idx2<16; Idx2++,Idx++) { @@ -267,40 +253,40 @@ } static BOOLEAN -DbgAddDebugChannel( CHAR* channel, CHAR* level, CHAR op) +DbgAddDebugChannel(CHAR* channel, CHAR* level, CHAR op) { int iLevel, iChannel; - if(channel == NULL || *channel == L'\0' ||strlen(channel) == 0 ) + if (channel == NULL || *channel == L'\0' || strlen(channel) == 0 ) return FALSE; - if(level == NULL || *level == L'\0' ||strlen(level) == 0 ) + if (level == NULL || *level == L'\0' || strlen(level) == 0 ) iLevel = MAX_LEVEL; - else if(strcmp(level, "err") == 0) + else if (strcmp(level, "err") == 0) iLevel = ERR_LEVEL; - else if(strcmp(level, "fixme") == 0) + else if (strcmp(level, "fixme") == 0) iLevel = FIXME_LEVEL; - else if(strcmp(level, "warn") == 0) + else if (strcmp(level, "warn") == 0) iLevel = WARN_LEVEL; else if (strcmp(level, "trace") == 0) iLevel = TRACE_LEVEL; else return FALSE; - if(strcmp(channel, "memory") == 0) iChannel = DPRINT_MEMORY; - else if(strcmp(channel, "filesystem") == 0) iChannel = DPRINT_FILESYSTEM; - else if(strcmp(channel, "inifile") == 0) iChannel = DPRINT_INIFILE; - else if(strcmp(channel, "ui") == 0) iChannel = DPRINT_UI; - else if(strcmp(channel, "disk") == 0) iChannel = DPRINT_DISK; - else if(strcmp(channel, "cache") == 0) iChannel = DPRINT_CACHE; - else if(strcmp(channel, "registry") == 0) iChannel = DPRINT_REGISTRY; - else if(strcmp(channel, "linux") == 0) iChannel = DPRINT_LINUX; - else if(strcmp(channel, "hwdetect") == 0) iChannel = DPRINT_HWDETECT; - else if(strcmp(channel, "windows") == 0) iChannel = DPRINT_WINDOWS; - else if(strcmp(channel, "peloader") == 0) iChannel = DPRINT_PELOADER; - else if(strcmp(channel, "scsiport") == 0) iChannel = DPRINT_SCSIPORT; - else if(strcmp(channel, "heap") == 0) iChannel = DPRINT_HEAP; - else if(strcmp(channel, "all") == 0) + if (strcmp(channel, "memory" ) == 0) iChannel = DPRINT_MEMORY; + else if (strcmp(channel, "filesystem") == 0) iChannel = DPRINT_FILESYSTEM; + else if (strcmp(channel, "inifile" ) == 0) iChannel = DPRINT_INIFILE; + else if (strcmp(channel, "ui" ) == 0) iChannel = DPRINT_UI; + else if (strcmp(channel, "disk" ) == 0) iChannel = DPRINT_DISK; + else if (strcmp(channel, "cache" ) == 0) iChannel = DPRINT_CACHE; + else if (strcmp(channel, "registry" ) == 0) iChannel = DPRINT_REGISTRY; + else if (strcmp(channel, "linux" ) == 0) iChannel = DPRINT_LINUX; + else if (strcmp(channel, "hwdetect" ) == 0) iChannel = DPRINT_HWDETECT; + else if (strcmp(channel, "windows" ) == 0) iChannel = DPRINT_WINDOWS; + else if (strcmp(channel, "peloader" ) == 0) iChannel = DPRINT_PELOADER; + else if (strcmp(channel, "scsiport" ) == 0) iChannel = DPRINT_SCSIPORT; + else if (strcmp(channel, "heap" ) == 0) iChannel = DPRINT_HEAP; + else if (strcmp(channel, "all" ) == 0) { int i; @@ -316,7 +302,7 @@ } else return FALSE; - if(op==L'+') + if (op == L'+') DbgChannels[iChannel] |= iLevel; else DbgChannels[iChannel] &= ~iLevel; @@ -333,25 +319,25 @@ do { - separator = strchr(str, L','); - if(separator != NULL) - *separator = L'\0'; - - c = strchr(str, L'+'); - if(c == NULL) - c = strchr(str, L'-'); - - if(c != NULL) + separator = strchr(str, ','); + if (separator != NULL) + *separator = '\0'; + + c = strchr(str, '+'); + if (c == NULL) + c = strchr(str, '-'); + + if (c != NULL) { op = *c; - *c = L'\0'; + *c = '\0'; c++; DbgAddDebugChannel(c, str, op); } str = separator + 1; - } while(separator != NULL); + } while (separator != NULL); } #else @@ -394,7 +380,7 @@ return 0; } -//DECLSPEC_NORETURN +// DECLSPEC_NORETURN VOID NTAPI KeBugCheckEx( @@ -406,8 +392,8 @@ { char Buffer[70]; sprintf(Buffer, "*** STOP: 0x%08lX (0x%08lX, 0x%08lX, 0x%08lX, 0x%08lX)", - BugCheckCode, BugCheckParameter1, BugCheckParameter2, - BugCheckParameter3, BugCheckParameter4); + BugCheckCode, BugCheckParameter1, BugCheckParameter2, + BugCheckParameter3, BugCheckParameter4); UiMessageBoxCritical(Buffer); assert(FALSE); for (;;); @@ -420,23 +406,23 @@ IN ULONG LineNumber, IN PCHAR Message OPTIONAL) { - if (Message) - { - DbgPrint("Assertion \'%s\' failed at %s line %u: %s\n", - (PCHAR)FailedAssertion, - (PCHAR)FileName, - LineNumber, - Message); - } - else - { - DbgPrint("Assertion \'%s\' failed at %s line %u\n", - (PCHAR)FailedAssertion, - (PCHAR)FileName, - LineNumber); - } - - DbgBreakPoint(); + if (Message) + { + DbgPrint("Assertion \'%s\' failed at %s line %u: %s\n", + (PCHAR)FailedAssertion, + (PCHAR)FileName, + LineNumber, + Message); + } + else + { + DbgPrint("Assertion \'%s\' failed at %s line %u\n", + (PCHAR)FailedAssertion, + (PCHAR)FileName, + LineNumber); + } + + DbgBreakPoint(); } char *BugCodeStrings[] = @@ -448,4 +434,3 @@ }; ULONG_PTR BugCheckInfo[5]; - Modified: trunk/reactos/boot/freeldr/freeldr/freeldr.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/freel…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/freeldr.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/freeldr.c [iso-8859-1] Sun Feb 1 20:22:13 2015 @@ -17,20 +17,19 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +/* INCLUDES *******************************************************************/ + #include <freeldr.h> #include <debug.h> DBG_DEFAULT_CHANNEL(WARNING); -VOID NTAPI HalpInitializePciStubs(VOID); -VOID NTAPI HalpInitBusHandler(VOID); +/* FUNCTIONS ******************************************************************/ VOID BootMain(LPSTR CmdLine) { CmdLineParse(CmdLine); - MachInit(CmdLine); - FsInit(); DebugInit(); @@ -43,22 +42,23 @@ if (!UiInitialize(FALSE)) { UiMessageBoxCritical("Unable to initialize UI.\n"); - goto quit; + goto Quit; } if (!MmInitializeMemoryManager()) { UiMessageBoxCritical("Unable to initialize memory manager"); - goto quit; + goto Quit; } #ifdef _M_IX86 HalpInitializePciStubs(); HalpInitBusHandler(); #endif + RunLoader(); -quit: +Quit: /* If we reach this point, something went wrong before, therefore reboot */ DiskStopFloppyMotor(); Reboot(); @@ -73,7 +73,7 @@ return 1; } -int __cdecl mbtowc (wchar_t *wchar, const char *mbchar, size_t count) +int __cdecl mbtowc(wchar_t *wchar, const char *mbchar, size_t count) { *wchar = (wchar_t)*mbchar; return 1; Modified: trunk/reactos/boot/freeldr/freeldr/include/cmdline.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/cmdline.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/cmdline.h [iso-8859-1] Sun Feb 1 20:22:13 2015 @@ -19,12 +19,6 @@ #pragma once -typedef struct tagCMDLINEINFO -{ - const char *DefaultOperatingSystem; - LONG TimeOut; -} CMDLINEINFO, *PCMDLINEINFO; - VOID CmdLineParse(IN PCHAR CmdLine); PCCH CmdLineGetDefaultOS(VOID); Modified: trunk/reactos/boot/freeldr/freeldr/include/debug.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/debug.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/debug.h [iso-8859-1] Sun Feb 1 20:22:13 2015 @@ -20,16 +20,16 @@ #ifndef __DEBUG_H #define __DEBUG_H -#define DPRINT_NONE 0 // No debug print -#define DPRINT_WARNING 1 // debugger messages and other misc stuff -#define DPRINT_MEMORY 2 // memory management messages -#define DPRINT_FILESYSTEM 3 // file system messages -#define DPRINT_INIFILE 4 // .ini file messages -#define DPRINT_UI 5 // user interface messages -#define DPRINT_DISK 6 // disk messages -#define DPRINT_CACHE 7 // cache messages -#define DPRINT_REGISTRY 8 // registry messages -#define DPRINT_REACTOS 9 // ReactOS messages +#define DPRINT_NONE 0 // No debug print +#define DPRINT_WARNING 1 // debugger messages and other misc stuff +#define DPRINT_MEMORY 2 // memory management messages +#define DPRINT_FILESYSTEM 3 // file system messages +#define DPRINT_INIFILE 4 // .ini file messages +#define DPRINT_UI 5 // user interface messages +#define DPRINT_DISK 6 // disk messages +#define DPRINT_CACHE 7 // cache messages +#define DPRINT_REGISTRY 8 // registry messages +#define DPRINT_REACTOS 9 // ReactOS messages #define DPRINT_LINUX 10 // Linux messages #define DPRINT_HWDETECT 11 // hardware detection messages #define DPRINT_WINDOWS 12 // messages from Windows loader 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] Sun Feb 1 20:22:13 2015 @@ -29,7 +29,7 @@ #define ROUND_UP(n, align) \ ROUND_DOWN(((ULONG)n) + (align) - 1, (align)) -/* public headers */ +/* Public headers */ #ifdef __REACTOS__ #define NTOSAPI #define printf TuiPrintf @@ -54,7 +54,7 @@ #include <ntsup.h> #endif -/* internal headers */ +/* Internal headers */ // #include <arcemul.h> #include <bytesex.h> #include <cache.h> @@ -62,6 +62,7 @@ #include <comm.h> #include <disk.h> #include <fs.h> +#include <hal.h> #include <inffile.h> #include <inifile.h> #include <keycodes.h> @@ -81,20 +82,20 @@ #include <video.h> #include <winldr.h> -/* file system headers */ +/* File system headers */ #include <fs/ext2.h> #include <fs/fat.h> #include <fs/ntfs.h> #include <fs/iso.h> #include <fs/pxe.h> -/* ui support */ +/* UI support */ #include <ui/gui.h> #include <ui/minitui.h> #include <ui/noui.h> #include <ui/tui.h> -/* arch specific includes */ +/* Arch specific includes */ #if defined(_M_IX86) || defined(_M_AMD64) #include <arch/pc/hardware.h> #include <arch/pc/pcbios.h> Added: trunk/reactos/boot/freeldr/freeldr/include/hal.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/hal.h (added) +++ trunk/reactos/boot/freeldr/freeldr/include/hal.h [iso-8859-1] Sun Feb 1 20:22:13 2015 @@ -0,0 +1,9 @@ + +#pragma once + +#ifdef _M_IX86 + +VOID NTAPI HalpInitializePciStubs(VOID); +VOID NTAPI HalpInitBusHandler(VOID); + +#endif Propchange: trunk/reactos/boot/freeldr/freeldr/include/hal.h ------------------------------------------------------------------------------ svn:eol-style = native Modified: trunk/reactos/boot/freeldr/freeldr/linuxboot.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/linux…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/linuxboot.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/linuxboot.c [iso-8859-1] Sun Feb 1 20:22:13 2015 @@ -19,55 +19,55 @@ #ifndef _M_ARM +#ifdef _M_IX86 + +/* INCLUDES *******************************************************************/ + #include <freeldr.h> #include <debug.h> -#ifdef _M_IX86 - -#define LINUX_READ_CHUNK_SIZE 0x20000 // Read 128k at a time - DBG_DEFAULT_CHANNEL(LINUX); -PLINUX_BOOTSECTOR LinuxBootSector = NULL; -PLINUX_SETUPSECTOR LinuxSetupSector = NULL; -ULONG SetupSectorSize = 0; -BOOLEAN NewStyleLinuxKernel = FALSE; -ULONG LinuxKernelSize = 0; -ULONG LinuxInitrdSize = 0; -CHAR LinuxKernelName[260]; -CHAR LinuxInitrdName[260]; -BOOLEAN LinuxHasInitrd = FALSE; -CHAR LinuxCommandLine[260] = ""; -ULONG LinuxCommandLineSize = 0; -PVOID LinuxKernelLoadAddress = NULL; -PVOID LinuxInitrdLoadAddress = NULL; -CHAR LinuxBootDescription[80]; -CHAR LinuxBootPath[260] = ""; +/* GLOBALS ********************************************************************/ + +#define LINUX_READ_CHUNK_SIZE 0x20000 // Read 128k at a time + +PLINUX_BOOTSECTOR LinuxBootSector = NULL; +PLINUX_SETUPSECTOR LinuxSetupSector = NULL; +ULONG SetupSectorSize = 0; +BOOLEAN NewStyleLinuxKernel = FALSE; +ULONG LinuxKernelSize = 0; +ULONG LinuxInitrdSize = 0; +CHAR LinuxKernelName[260]; +CHAR LinuxInitrdName[260]; +BOOLEAN LinuxHasInitrd = FALSE; +CHAR LinuxCommandLine[260] = ""; +ULONG LinuxCommandLineSize = 0; +PVOID LinuxKernelLoadAddress = NULL; +PVOID LinuxInitrdLoadAddress = NULL; +CHAR LinuxBootDescription[80]; +CHAR LinuxBootPath[260] = ""; + +/* FUNCTIONS ******************************************************************/ BOOLEAN RemoveQuotes(PCHAR QuotedString) { - CHAR TempString[200]; + CHAR TempString[200]; PCHAR p; - PSTR Start; - - // - // Skip spaces up to " - // + PSTR Start; + + /* Skip spaces up to " */ p = QuotedString; while (*p == ' ' || *p == '"') p++; Start = p; - // - // Go up to next " - // + /* Go up to next " */ while (*p != '"' && *p != ANSI_NULL) p++; *p = ANSI_NULL; - // - // Copy result - // + /* Copy result */ strcpy(TempString, Start); strcpy(QuotedString, TempString); @@ -78,33 +78,27 @@ LoadAndBootLinux(IN OperatingSystemItem* OperatingSystem, IN USHORT OperatingSystemVersion) { - PCSTR SectionName = OperatingSystem->SystemPartition; - PCSTR Description = OperatingSystem->LoadIdentifier; - PFILE LinuxKernel = 0; - PFILE LinuxInitrdFile = 0; - CHAR TempString[260]; + PCSTR SectionName = OperatingSystem->SystemPartition; + PCSTR Description = OperatingSystem->LoadIdentifier; + PFILE LinuxKernel = 0; + PFILE LinuxInitrdFile = 0; + CHAR TempString[260]; UiDrawBackdrop(); if (Description) - { sprintf(LinuxBootDescription, "Loading %s...", Description); - } - else - { + else strcpy(LinuxBootDescription, "Loading Linux..."); - } UiDrawStatusText(LinuxBootDescription); UiDrawProgressBarCenter(0, 100, LinuxBootDescription); - // Parse the .ini file section + /* Parse the .ini file section */ if (!LinuxParseIniSection(SectionName)) - { goto LinuxBootFailed; - } - - // Open the kernel + + /* Open the kernel */ LinuxKernel = FsOpenFile(LinuxKernelName); if (!LinuxKernel) { @@ -113,7 +107,7 @@ goto LinuxBootFailed; } - // Open the initrd file image (if necessary) + /* Open the initrd file image (if necessary) */ if (LinuxHasInitrd) { LinuxInitrdFile = FsOpenFile(LinuxInitrdName); @@ -125,44 +119,34 @@ } } - // Read the boot sector + /* Read the boot sector */ if (!LinuxReadBootSector(LinuxKernel)) - { goto LinuxBootFailed; - } - - // Read the setup sector + + /* Read the setup sector */ if (!LinuxReadSetupSector(LinuxKernel)) - { goto LinuxBootFailed; - } - - // Calc kernel size + + /* Calc kernel size */ LinuxKernelSize = FsGetFileSize(LinuxKernel) - (512 + SetupSectorSize); - // Get the file size + /* Get the file size */ LinuxInitrdSize = FsGetFileSize(LinuxInitrdFile); - // Read the kernel + /* Read the kernel */ if (!LinuxReadKernel(LinuxKernel)) - { goto LinuxBootFailed; - } - - // Read the initrd (if necessary) + + /* Read the initrd (if necessary) */ if (LinuxHasInitrd) { if (!LinuxReadInitrd(LinuxInitrdFile)) - { goto LinuxBootFailed; - } } // If the default root device is set to FLOPPY (0000h), change to /dev/fd0 (0200h) if (LinuxBootSector->RootDevice == 0x0000) - { LinuxBootSector->RootDevice = 0x0200; - } if (LinuxSetupSector->Version >= 0x0202) { @@ -175,13 +159,9 @@ } if (NewStyleLinuxKernel) - { LinuxSetupSector->TypeOfLoader = LINUX_LOADER_TYPE_FREELOADER; - } - else - { + else LinuxSetupSector->LoadFlags = 0; - } RtlCopyMemory((PVOID)0x90000, LinuxBootSector, 512); RtlCopyMemory((PVOID)0x90200, LinuxSetupSector, SetupSectorSize); @@ -192,42 +172,30 @@ DiskStopFloppyMotor(); if (LinuxSetupSector->LoadFlags & LINUX_FLAG_LOAD_HIGH) - { BootNewLinuxKernel(); - } - else - { + else BootOldLinuxKernel(LinuxKernelSize); - } LinuxBootFailed: if (LinuxKernel) - { FsCloseFile(LinuxKernel); - } + if (LinuxInitrdFile) - { FsCloseFile(LinuxInitrdFile); - } if (LinuxBootSector != NULL) - { MmFreeMemory(LinuxBootSector); - } + if (LinuxSetupSector != NULL) - { MmFreeMemory(LinuxSetupSector); - } + if (LinuxKernelLoadAddress != NULL) - { MmFreeMemory(LinuxKernelLoadAddress); - } + if (LinuxInitrdLoadAddress != NULL) - { MmFreeMemory(LinuxInitrdLoadAddress); - } LinuxBootSector = NULL; LinuxSetupSector = NULL; @@ -243,13 +211,13 @@ BOOLEAN LinuxParseIniSection(PCSTR SectionName) { - ULONG_PTR SectionId; - CHAR SettingName[260]; - - // Find all the message box settings and run them + ULONG_PTR SectionId; + CHAR SettingName[260]; + + /* Find all the message box settings and run them */ UiShowMessageBoxesInSection(SectionName); - // Try to open the operating system section in the .ini file + /* Try to open the operating system section in the .ini file */ if (!IniOpenSection(SectionName, &SectionId)) { sprintf(SettingName, "Section [%s] not found in freeldr.ini.\n", SectionName); @@ -263,20 +231,20 @@ return FALSE; } - // Get the kernel name + /* Get the kernel name */ if (!IniReadSettingByName(SectionId, "Kernel", LinuxKernelName, sizeof(LinuxKernelName))) { UiMessageBox("Linux kernel filename not specified for selected OS!"); return FALSE; } - // Get the initrd name + /* Get the initrd name */ if (IniReadSettingByName(SectionId, "Initrd", LinuxInitrdName, sizeof(LinuxInitrdName))) { LinuxHasInitrd = TRUE; } - // Get the command line + /* Get the command line */ if (IniReadSettingByName(SectionId, "CommandLine", LinuxCommandLine, sizeof(LinuxCommandLine))) { RemoveQuotes(LinuxCommandLine); @@ -288,21 +256,17 @@ BOOLEAN LinuxReadBootSector(PFILE LinuxKernelFile) { - // Allocate memory for boot sector + /* Allocate memory for boot sector */ LinuxBootSector = MmAllocateMemoryWithType(512, LoaderSystemCode); if (LinuxBootSector == NULL) - { - return FALSE; - } - - // Read linux boot sector + return FALSE; + + /* Read linux boot sector */ FsSetFilePointer(LinuxKernelFile, 0); if (!FsReadFile(LinuxKernelFile, 512, NULL, LinuxBootSector)) - { - return FALSE; - } - - // Check for validity + return FALSE; + + /* Check for validity */ if (LinuxBootSector->BootFlag != LINUX_BOOT_SECTOR_MAGIC) { UiMessageBox("Invalid boot sector magic (0xaa55)"); @@ -325,48 +289,36 @@ BOOLEAN LinuxReadSetupSector(PFILE LinuxKernelFile) { - UCHAR TempLinuxSetupSector[512]; + UCHAR TempLinuxSetupSector[512]; LinuxSetupSector = (PLINUX_SETUPSECTOR)TempLinuxSetupSector; - // Read first linux setup sector + /* Read first linux setup sector */ FsSetFilePointer(LinuxKernelFile, 512); if (!FsReadFile(LinuxKernelFile, 512, NULL, TempLinuxSetupSector)) - { - return FALSE; - } - - // Check the kernel version + return FALSE; + + /* Check the kernel version */ if (!LinuxCheckKernelVersion()) - { - return FALSE; - } + return FALSE; if (NewStyleLinuxKernel) - { SetupSectorSize = 512 * LinuxBootSector->SetupSectors; - } - else - { - SetupSectorSize = 4 * 512; // Always 4 setup sectors - } - - // Allocate memory for setup sectors + else + SetupSectorSize = 512 * 4; // Always 4 setup sectors + + /* Allocate memory for setup sectors */ LinuxSetupSector = MmAllocateMemoryWithType(SetupSectorSize, LoaderSystemCode); if (LinuxSetupSector == NULL) - { - return FALSE; - } - - // Copy over first setup sector + return FALSE; + + /* Copy over first setup sector */ RtlCopyMemory(LinuxSetupSector, TempLinuxSetupSector, 512); - // Read in the rest of the linux setup sectors + /* Read in the rest of the linux setup sectors */ FsSetFilePointer(LinuxKernelFile, 1024); if (!FsReadFile(LinuxKernelFile, SetupSectorSize - 512, NULL, (PVOID)((ULONG_PTR)LinuxSetupSector + 512))) - { - return FALSE; - } + return FALSE; // DbgDumpBuffer(DPRINT_LINUX, LinuxSetupSector, SetupSectorSize); @@ -391,14 +343,14 @@ BOOLEAN LinuxReadKernel(PFILE LinuxKernelFile) { - ULONG BytesLoaded; - CHAR StatusText[260]; - PVOID LoadAddress; + ULONG BytesLoaded; + CHAR StatusText[260]; + PVOID LoadAddress; sprintf(StatusText, "Loading %s", LinuxKernelName); UiDrawStatusText(StatusText); - // Allocate memory for Linux kernel + /* Allocate memory for Linux kernel */ LinuxKernelLoadAddress = MmAllocateMemoryAtAddress(LinuxKernelSize, (PVOID)LINUX_KERNEL_LOAD_ADDRESS, LoaderSystemCode); if (LinuxKernelLoadAddress != (PVOID)LINUX_KERNEL_LOAD_ADDRESS) { @@ -407,14 +359,12 @@ LoadAddress = LinuxKernelLoadAddress; - // Read linux kernel to 0x100000 (1mb) + /* Read linux kernel to 0x100000 (1mb) */ FsSetFilePointer(LinuxKernelFile, 512 + SetupSectorSize); for (BytesLoaded=0; BytesLoaded<LinuxKernelSize; ) { if (!FsReadFile(LinuxKernelFile, LINUX_READ_CHUNK_SIZE, NULL, LoadAddress)) - { return FALSE; - } BytesLoaded += LINUX_READ_CHUNK_SIZE; LoadAddress = (PVOID)((ULONG_PTR)LoadAddress + LINUX_READ_CHUNK_SIZE); @@ -427,25 +377,25 @@ BOOLEAN LinuxCheckKernelVersion(VOID) { - // Just assume old kernel until we find otherwise + /* Just assume old kernel until we find otherwise */ NewStyleLinuxKernel = FALSE; - // Check for new style setup header + /* Check for new style setup header */ if (LinuxSetupSector->SetupHeaderSignature != LINUX_SETUP_HEADER_ID) { NewStyleLinuxKernel = FALSE; } - // Check for version below 2.0 + /* Check for version below 2.0 */ else if (LinuxSetupSector->Version < 0x0200) { NewStyleLinuxKernel = FALSE; } - // Check for version 2.0 + /* Check for version 2.0 */ else if (LinuxSetupSector->Version == 0x0200) { NewStyleLinuxKernel = TRUE; } - // Check for version 2.01+ + /* Check for version 2.01+ */ else if (LinuxSetupSector->Version >= 0x0201) { NewStyleLinuxKernel = TRUE; @@ -487,7 +437,7 @@ return FALSE; } - // Set the information in the setup struct + /* Set the information in the setup struct */ LinuxSetupSector->RamdiskAddress = (ULONG)LinuxInitrdLoadAddress; LinuxSetupSector->RamdiskSize = LinuxInitrdSize; @@ -499,13 +449,11 @@ TRACE("InitrdAddressMax: 0x%x\n", LinuxSetupSector->InitrdAddressMax); } - // Read in the ramdisk + /* Read in the ramdisk */ for (BytesLoaded=0; BytesLoaded<LinuxInitrdSize; ) { if (!FsReadFile(LinuxInitrdFile, LINUX_READ_CHUNK_SIZE, NULL, (PVOID)LinuxInitrdLoadAddress)) - { return FALSE; - } BytesLoaded += LINUX_READ_CHUNK_SIZE; LinuxInitrdLoadAddress = (PVOID)((ULONG_PTR)LinuxInitrdLoadAddress + LINUX_READ_CHUNK_SIZE); Modified: trunk/reactos/boot/freeldr/freeldr/miscboot.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/miscb…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/miscboot.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/miscboot.c [iso-8859-1] Sun Feb 1 20:22:13 2015 @@ -17,25 +17,29 @@ * 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA. */ +#ifdef _M_IX86 + +/* INCLUDES *******************************************************************/ + #include <freeldr.h> -#ifdef _M_IX86 +/* FUNCTIONS ******************************************************************/ VOID LoadAndBootBootSector(IN OperatingSystemItem* OperatingSystem, IN USHORT OperatingSystemVersion) { - ULONG_PTR SectionId; - PCSTR SectionName = OperatingSystem->SystemPartition; - CHAR FileName[260]; - PFILE FilePointer; - ULONG BytesRead; - CHAR SettingName[80]; - - // Find all the message box settings and run them + ULONG_PTR SectionId; + PCSTR SectionName = OperatingSystem->SystemPartition; + CHAR FileName[260]; + PFILE FilePointer; + ULONG BytesRead; + CHAR SettingName[80]; + + /* Find all the message box settings and run them */ UiShowMessageBoxesInSection(SectionName); - // Try to open the operating system section in the .ini file + /* Try to open the operating system section in the .ini file */ if (!IniOpenSection(SectionName, &SectionId)) { sprintf(SettingName, "Section [%s] not found in freeldr.ini.\n", SectionName); @@ -57,14 +61,14 @@ return; } - // Read boot sector + /* Read boot sector */ if (!FsReadFile(FilePointer, 512, &BytesRead, (void*)0x7c00) || (BytesRead != 512)) { UiMessageBox("Unable to read boot sector."); return; } - // Check for validity + /* Check for validity */ if (*((USHORT*)(0x7c00 + 0x1fe)) != 0xaa55) { UiMessageBox("Invalid boot sector magic (0xaa55)"); @@ -72,15 +76,18 @@ } UiUnInitialize("Booting..."); - // Don't stop the floppy drive motor when we - // are just booting a bootsector, or drive, or partition. - // If we were to stop the floppy motor then - // the BIOS wouldn't be informed and if the - // next read is to a floppy then the BIOS will - // still think the motor is on and this will - // result in a read error. - //DiskStopFloppyMotor(); - //DisableA20(); + + /* + * Don't stop the floppy drive motor when we + * are just booting a bootsector, or drive, or partition. + * If we were to stop the floppy motor then + * the BIOS wouldn't be informed and if the + * next read is to a floppy then the BIOS will + * still think the motor is on and this will + * result in a read error. + */ + // DiskStopFloppyMotor(); + // DisableA20(); ChainLoadBiosBootSectorCode(); } @@ -88,18 +95,18 @@ LoadAndBootPartition(IN OperatingSystemItem* OperatingSystem, IN USHORT OperatingSystemVersion) { - ULONG_PTR SectionId; - PCSTR SectionName = OperatingSystem->SystemPartition; - CHAR SettingName[80]; - CHAR SettingValue[80]; - PARTITION_TABLE_ENTRY PartitionTableEntry; - UCHAR DriveNumber; - ULONG PartitionNumber; - - // Find all the message box settings and run them + ULONG_PTR SectionId; + PCSTR SectionName = OperatingSystem->SystemPartition; + CHAR SettingName[80]; + CHAR SettingValue[80]; + PARTITION_TABLE_ENTRY PartitionTableEntry; + UCHAR DriveNumber; + ULONG PartitionNumber; + + /* Find all the message box settings and run them */ UiShowMessageBoxesInSection(SectionName); - // Try to open the operating system section in the .ini file + /* Try to open the operating system section in the .ini file */ if (!IniOpenSection(SectionName, &SectionId)) { sprintf(SettingName, "Section [%s] not found in freeldr.ini.\n", SectionName); @@ -107,7 +114,7 @@ return; } - // Read the boot drive + /* Read the boot drive */ if (!IniReadSettingByName(SectionId, "BootDrive", SettingValue, sizeof(SettingValue))) { UiMessageBox("Boot drive not specified for selected OS!"); @@ -116,7 +123,7 @@ DriveNumber = DriveMapGetBiosDriveNumber(SettingValue); - // Read the boot partition + /* Read the boot partition */ if (!IniReadSettingByName(SectionId, "BootPartition", SettingValue, sizeof(SettingValue))) { UiMessageBox("Boot partition not specified for selected OS!"); @@ -125,21 +132,20 @@ PartitionNumber = atoi(SettingValue); - // Get the partition table entry + /* Get the partition table entry */ if (!DiskGetPartitionEntry(DriveNumber, PartitionNumber, &PartitionTableEntry)) { return; } - // Now try to read the partition boot sector - // If this fails then abort + /* Now try to read the partition boot sector. If this fails then abort. */ if (!MachDiskReadLogicalSectors(DriveNumber, PartitionTableEntry.SectorCountBeforePartition, 1, (PVOID)0x7C00)) { UiMessageBox("Unable to read partition's boot sector."); return; } - // Check for validity + /* Check for validity */ if (*((USHORT*)(0x7c00 + 0x1fe)) != 0xaa55) { UiMessageBox("Invalid boot sector magic (0xaa55)"); @@ -147,15 +153,18 @@ } UiUnInitialize("Booting..."); - // Don't stop the floppy drive motor when we - // are just booting a bootsector, or drive, or partition. - // If we were to stop the floppy motor then - // the BIOS wouldn't be informed and if the - // next read is to a floppy then the BIOS will - // still think the motor is on and this will - // result in a read error. - //DiskStopFloppyMotor(); - //DisableA20(); + + /* + * Don't stop the floppy drive motor when we + * are just booting a bootsector, or drive, or partition. + * If we were to stop the floppy motor then + * the BIOS wouldn't be informed and if the + * next read is to a floppy then the BIOS will + * still think the motor is on and this will + * result in a read error. + */ + // DiskStopFloppyMotor(); + // DisableA20(); FrldrBootDrive = DriveNumber; ChainLoadBiosBootSectorCode(); } @@ -164,16 +173,16 @@ LoadAndBootDrive(IN OperatingSystemItem* OperatingSystem, IN USHORT OperatingSystemVersion) { - ULONG_PTR SectionId; - PCSTR SectionName = OperatingSystem->SystemPartition; - CHAR SettingName[80]; - CHAR SettingValue[80]; - UCHAR DriveNumber; - - // Find all the message box settings and run them + ULONG_PTR SectionId; + PCSTR SectionName = OperatingSystem->SystemPartition; + CHAR SettingName[80]; + CHAR SettingValue[80]; + UCHAR DriveNumber; + + /* Find all the message box settings and run them */ UiShowMessageBoxesInSection(SectionName); - // Try to open the operating system section in the .ini file + /* Try to open the operating system section in the .ini file */ if (!IniOpenSection(SectionName, &SectionId)) { sprintf(SettingName, "Section [%s] not found in freeldr.ini.\n", SectionName); @@ -189,15 +198,14 @@ DriveNumber = DriveMapGetBiosDriveNumber(SettingValue); - // Now try to read the boot sector (or mbr) - // If this fails then abort + /* Now try to read the boot sector (or mbr). If this fails then abort. */ if (!MachDiskReadLogicalSectors(DriveNumber, 0, 1, (PVOID)0x7C00)) { UiMessageBox("Unable to read boot sector"); return; } - // Check for validity + /* Check for validity */ if (*((USHORT*)(0x7c00 + 0x1fe)) != 0xaa55) { UiMessageBox("Invalid boot sector magic (0xaa55)"); @@ -205,15 +213,18 @@ } UiUnInitialize("Booting..."); - // Don't stop the floppy drive motor when we - // are just booting a bootsector, or drive, or partition. - // If we were to stop the floppy motor then - // the BIOS wouldn't be informed and if the - // next read is to a floppy then the BIOS will - // still think the motor is on and this will - // result in a read error. - //DiskStopFloppyMotor(); - //DisableA20(); + + /* + * Don't stop the floppy drive motor when we + * are just booting a bootsector, or drive, or partition. + * If we were to stop the floppy motor then + * the BIOS wouldn't be informed and if the + * next read is to a floppy then the BIOS will + * still think the motor is on and this will + * result in a read error. + */ + // DiskStopFloppyMotor(); + // DisableA20(); FrldrBootDrive = DriveNumber; ChainLoadBiosBootSectorCode(); }
9 years, 10 months
1
0
0
0
[hbelusca] 66143: [FREELDR] - Remove an unexisting function declaration. - Move some boot methods back to suitable place. - Whitespace fixes.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sun Feb 1 17:49:11 2015 New Revision: 66143 URL:
http://svn.reactos.org/svn/reactos?rev=66143&view=rev
Log: [FREELDR] - Remove an unexisting function declaration. - Move some boot methods back to suitable place. - Whitespace fixes. Added: trunk/reactos/boot/freeldr/freeldr/custom.c - copied, changed from r66136, trunk/reactos/boot/freeldr/freeldr/arch/i386/custom.c trunk/reactos/boot/freeldr/freeldr/include/custom.h - copied, changed from r66136, trunk/reactos/boot/freeldr/freeldr/include/arch/i386/custom.h trunk/reactos/boot/freeldr/freeldr/include/miscboot.h - copied, changed from r66136, trunk/reactos/boot/freeldr/freeldr/include/arch/i386/miscboot.h trunk/reactos/boot/freeldr/freeldr/miscboot.c - copied, changed from r66136, trunk/reactos/boot/freeldr/freeldr/arch/i386/miscboot.c Removed: trunk/reactos/boot/freeldr/freeldr/arch/i386/custom.c trunk/reactos/boot/freeldr/freeldr/arch/i386/miscboot.c trunk/reactos/boot/freeldr/freeldr/include/arch/i386/custom.h trunk/reactos/boot/freeldr/freeldr/include/arch/i386/miscboot.h Modified: trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt trunk/reactos/boot/freeldr/freeldr/include/arch/pc/hardware.h trunk/reactos/boot/freeldr/freeldr/include/freeldr.h trunk/reactos/boot/freeldr/freeldr/include/linux.h trunk/reactos/boot/freeldr/freeldr/linuxboot.c trunk/reactos/boot/freeldr/freeldr/mm/mm.c Modified: trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/CMake…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/CMakeLists.txt [iso-8859-1] Sun Feb 1 17:49:11 2015 @@ -34,8 +34,10 @@ list(APPEND FREELDR_COMMON_SOURCE include/freeldr.h cmdline.c + custom.c debug.c linuxboot.c + miscboot.c machine.c options.c oslist.c @@ -87,7 +89,6 @@ list(APPEND FREELDR_COMMON_SOURCE fs/pxe.c arch/i386/archmach.c - arch/i386/custom.c arch/i386/drivemap.c arch/i386/halstub.c arch/i386/hardware.c @@ -101,7 +102,6 @@ arch/i386/i386rtl.c arch/i386/i386vid.c arch/i386/machpc.c - arch/i386/miscboot.c arch/i386/ntoskrnl.c arch/i386/pccons.c arch/i386/pcdisk.c @@ -130,7 +130,6 @@ arch/amd64/pnpbios.S) list(APPEND FREELDR_COMMON_SOURCE fs/pxe.c - arch/i386/custom.c arch/i386/drivemap.c arch/i386/hardware.c arch/i386/hwacpi.c Removed: trunk/reactos/boot/freeldr/freeldr/arch/i386/custom.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/custom.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/custom.c (removed) @@ -1,450 +0,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. - */ - -#include <freeldr.h> - - -const CHAR BootDrivePrompt[] = "Enter the boot drive.\n\nExamples:\nfd0 - first floppy drive\nhd0 - first hard drive\nhd1 - second hard drive\ncd0 - first CD-ROM drive.\n\nBIOS drive numbers may also be used:\n0 - first floppy drive\n0x80 - first hard drive\n0x81 - second hard drive"; -const CHAR BootPartitionPrompt[] = "Enter the boot partition.\n\nEnter 0 for the active (bootable) partition."; -const CHAR BootSectorFilePrompt[] = "Enter the boot sector file path.\n\nExamples:\n\\BOOTSECT.DOS\n/boot/bootsect.dos"; -const CHAR LinuxKernelPrompt[] = "Enter the Linux kernel image path.\n\nExamples:\n/vmlinuz\n/boot/vmlinuz-2.4.18"; -const CHAR LinuxInitrdPrompt[] = "Enter the initrd image path.\n\nExamples:\n/initrd.gz\n/boot/root.img.gz\n\nLeave blank for no initial ram disk."; -const CHAR LinuxCommandLinePrompt[] = "Enter the Linux kernel command line.\n\nExamples:\nroot=/dev/hda1\nroot=/dev/fd0 read-only\nroot=/dev/sdb1 init=/sbin/init"; -const CHAR ReactOSSystemPathPrompt[] = "Enter the path to your ReactOS system directory.\n\nExamples:\n\\REACTOS\n\\ROS"; -const CHAR ReactOSOptionsPrompt[] = "Enter the options you want passed to the kernel.\n\nExamples:\n/DEBUG /DEBUGPORT=COM1 /BAUDRATE=115200\n/FASTDETECT /SOS /NOGUIBOOT\n/BASEVIDEO /MAXMEM=64\n/KERNEL=NTKRNLMP.EXE /HAL=HALMPS.DLL"; - -const CHAR CustomBootPrompt[] = "Press ENTER to boot your custom boot setup."; - -VOID OptionMenuCustomBoot(VOID) -{ - PCSTR CustomBootMenuList[] = { - "Disk", - "Partition", - "Boot Sector File", - "ReactOS", - "Linux" - }; - ULONG CustomBootMenuCount = sizeof(CustomBootMenuList) / sizeof(CustomBootMenuList[0]); - ULONG SelectedMenuItem; - - if (!UiDisplayMenu("Please choose a boot method:", "", - FALSE, - CustomBootMenuList, - CustomBootMenuCount, - 0, -1, - &SelectedMenuItem, - TRUE, - NULL)) - { - // The user pressed ESC - return; - } - - switch (SelectedMenuItem) - { - case 0: // Disk - OptionMenuCustomBootDisk(); - break; - case 1: // Partition - OptionMenuCustomBootPartition(); - break; - case 2: // Boot Sector File - OptionMenuCustomBootBootSectorFile(); - break; - case 3: // ReactOS - OptionMenuCustomBootReactOS(); - break; - case 4: // Linux - OptionMenuCustomBootLinux(); - break; - } -} - -VOID OptionMenuCustomBootDisk(VOID) -{ - ULONG_PTR SectionId; - CHAR SectionName[100]; - CHAR BootDriveString[20]; - TIMEINFO* TimeInfo; - OperatingSystemItem OperatingSystem; - - RtlZeroMemory(SectionName, sizeof(SectionName)); - RtlZeroMemory(BootDriveString, sizeof(BootDriveString)); - - if (!UiEditBox(BootDrivePrompt, BootDriveString, 20)) - { - return; - } - - // Generate a unique section name - TimeInfo = ArcGetTime(); - sprintf(SectionName, "CustomBootDisk%u%u%u%u%u%u", TimeInfo->Year, TimeInfo->Day, TimeInfo->Month, TimeInfo->Hour, TimeInfo->Minute, TimeInfo->Second); - - // Add the section - if (!IniAddSection(SectionName, &SectionId)) - { - return; - } - - // Add the BootType - if (!IniAddSettingValueToSection(SectionId, "BootType", "Drive")) - { - return; - } - - // Add the BootDrive - if (!IniAddSettingValueToSection(SectionId, "BootDrive", BootDriveString)) - { - return; - } - - UiMessageBox(CustomBootPrompt); - - OperatingSystem.SystemPartition = SectionName; - OperatingSystem.LoadIdentifier = NULL; - OperatingSystem.OsLoadOptions = NULL; - - // LoadAndBootDrive(&OperatingSystem, 0); - LoadOperatingSystem(&OperatingSystem); -} - -VOID OptionMenuCustomBootPartition(VOID) -{ - ULONG_PTR SectionId; - CHAR SectionName[100]; - CHAR BootDriveString[20]; - CHAR BootPartitionString[20]; - TIMEINFO* TimeInfo; - OperatingSystemItem OperatingSystem; - - RtlZeroMemory(SectionName, sizeof(SectionName)); - RtlZeroMemory(BootDriveString, sizeof(BootDriveString)); - RtlZeroMemory(BootPartitionString, sizeof(BootPartitionString)); - - if (!UiEditBox(BootDrivePrompt, BootDriveString, 20)) - { - return; - } - - if (!UiEditBox(BootPartitionPrompt, BootPartitionString, 20)) - { - return; - } - - // Generate a unique section name - TimeInfo = ArcGetTime(); - sprintf(SectionName, "CustomBootPartition%u%u%u%u%u%u", TimeInfo->Year, TimeInfo->Day, TimeInfo->Month, TimeInfo->Hour, TimeInfo->Minute, TimeInfo->Second); - - // Add the section - if (!IniAddSection(SectionName, &SectionId)) - { - return; - } - - // Add the BootType - if (!IniAddSettingValueToSection(SectionId, "BootType", "Partition")) - { - return; - } - - // Add the BootDrive - if (!IniAddSettingValueToSection(SectionId, "BootDrive", BootDriveString)) - { - return; - } - - // Add the BootPartition - if (!IniAddSettingValueToSection(SectionId, "BootPartition", BootPartitionString)) - { - return; - } - - UiMessageBox(CustomBootPrompt); - - OperatingSystem.SystemPartition = SectionName; - OperatingSystem.LoadIdentifier = NULL; - OperatingSystem.OsLoadOptions = NULL; - - // LoadAndBootPartition(&OperatingSystem, 0); - LoadOperatingSystem(&OperatingSystem); -} - -VOID OptionMenuCustomBootBootSectorFile(VOID) -{ - ULONG_PTR SectionId; - CHAR SectionName[100]; - CHAR BootDriveString[20]; - CHAR BootPartitionString[20]; - CHAR BootSectorFileString[200]; - TIMEINFO* TimeInfo; - OperatingSystemItem OperatingSystem; - - RtlZeroMemory(SectionName, sizeof(SectionName)); - RtlZeroMemory(BootDriveString, sizeof(BootDriveString)); - RtlZeroMemory(BootPartitionString, sizeof(BootPartitionString)); - RtlZeroMemory(BootSectorFileString, sizeof(BootSectorFileString)); - - if (!UiEditBox(BootDrivePrompt, BootDriveString, 20)) - { - return; - } - - if (!UiEditBox(BootPartitionPrompt, BootPartitionString, 20)) - { - return; - } - - if (!UiEditBox(BootSectorFilePrompt, BootSectorFileString, 200)) - { - return; - } - - // Generate a unique section name - TimeInfo = ArcGetTime(); - sprintf(SectionName, "CustomBootSectorFile%u%u%u%u%u%u", TimeInfo->Year, TimeInfo->Day, TimeInfo->Month, TimeInfo->Hour, TimeInfo->Minute, TimeInfo->Second); - - // Add the section - if (!IniAddSection(SectionName, &SectionId)) - { - return; - } - - // Add the BootType - if (!IniAddSettingValueToSection(SectionId, "BootType", "BootSector")) - { - return; - } - - // Add the BootDrive - if (!IniAddSettingValueToSection(SectionId, "BootDrive", BootDriveString)) - { - return; - } - - // Add the BootPartition - if (!IniAddSettingValueToSection(SectionId, "BootPartition", BootPartitionString)) - { - return; - } - - // Add the BootSectorFile - if (!IniAddSettingValueToSection(SectionId, "BootSectorFile", BootSectorFileString)) - { - return; - } - - UiMessageBox(CustomBootPrompt); - - OperatingSystem.SystemPartition = SectionName; - OperatingSystem.LoadIdentifier = NULL; - OperatingSystem.OsLoadOptions = NULL; - - // LoadAndBootBootSector(&OperatingSystem, 0); - LoadOperatingSystem(&OperatingSystem); -} - -VOID OptionMenuCustomBootReactOS(VOID) -{ - ULONG_PTR SectionId; - CHAR SectionName[100]; - CHAR BootDriveString[20]; - CHAR BootPartitionString[20]; - CHAR ReactOSSystemPath[200]; - CHAR ReactOSARCPath[200]; - CHAR ReactOSOptions[200]; - TIMEINFO* TimeInfo; - OperatingSystemItem OperatingSystem; - - RtlZeroMemory(SectionName, sizeof(SectionName)); - RtlZeroMemory(BootDriveString, sizeof(BootDriveString)); - RtlZeroMemory(BootPartitionString, sizeof(BootPartitionString)); - RtlZeroMemory(ReactOSSystemPath, sizeof(ReactOSSystemPath)); - RtlZeroMemory(ReactOSOptions, sizeof(ReactOSOptions)); - - if (!UiEditBox(BootDrivePrompt, BootDriveString, 20)) - { - return; - } - - if (!UiEditBox(BootPartitionPrompt, BootPartitionString, 20)) - { - return; - } - - if (!UiEditBox(ReactOSSystemPathPrompt, ReactOSSystemPath, 200)) - { - return; - } - - if (!UiEditBox(ReactOSOptionsPrompt, ReactOSOptions, 200)) - { - return; - } - - // Generate a unique section name - TimeInfo = ArcGetTime(); - sprintf(SectionName, "CustomReactOS%u%u%u%u%u%u", TimeInfo->Year, TimeInfo->Day, TimeInfo->Month, TimeInfo->Hour, TimeInfo->Minute, TimeInfo->Second); - - // Add the section - if (!IniAddSection(SectionName, &SectionId)) - { - return; - } - - // Add the BootType - if (!IniAddSettingValueToSection(SectionId, "BootType", "Windows2003")) - { - return; - } - - // Construct the ReactOS ARC system path - ConstructArcPath(ReactOSARCPath, ReactOSSystemPath, DriveMapGetBiosDriveNumber(BootDriveString), atoi(BootPartitionString)); - - // Add the system path - if (!IniAddSettingValueToSection(SectionId, "SystemPath", ReactOSARCPath)) - { - return; - } - - // Add the CommandLine - if (!IniAddSettingValueToSection(SectionId, "Options", ReactOSOptions)) - { - return; - } - - UiMessageBox(CustomBootPrompt); - - OperatingSystem.SystemPartition = SectionName; - OperatingSystem.LoadIdentifier = NULL; - OperatingSystem.OsLoadOptions = NULL; // ReactOSOptions - - // LoadAndBootWindows(&OperatingSystem, _WIN32_WINNT_WS03); - LoadOperatingSystem(&OperatingSystem); -} - -VOID OptionMenuCustomBootLinux(VOID) -{ - ULONG_PTR SectionId; - CHAR SectionName[100]; - CHAR BootDriveString[20]; - CHAR BootPartitionString[20]; - CHAR LinuxKernelString[200]; - CHAR LinuxInitrdString[200]; - CHAR LinuxCommandLineString[200]; - TIMEINFO* TimeInfo; - OperatingSystemItem OperatingSystem; - - RtlZeroMemory(SectionName, sizeof(SectionName)); - RtlZeroMemory(BootDriveString, sizeof(BootDriveString)); - RtlZeroMemory(BootPartitionString, sizeof(BootPartitionString)); - RtlZeroMemory(LinuxKernelString, sizeof(LinuxKernelString)); - RtlZeroMemory(LinuxInitrdString, sizeof(LinuxInitrdString)); - RtlZeroMemory(LinuxCommandLineString, sizeof(LinuxCommandLineString)); - - if (!UiEditBox(BootDrivePrompt, BootDriveString, 20)) - { - return; - } - - if (!UiEditBox(BootPartitionPrompt, BootPartitionString, 20)) - { - return; - } - - if (!UiEditBox(LinuxKernelPrompt, LinuxKernelString, 200)) - { - return; - } - - if (!UiEditBox(LinuxInitrdPrompt, LinuxInitrdString, 200)) - { - return; - } - - if (!UiEditBox(LinuxCommandLinePrompt, LinuxCommandLineString, 200)) - { - return; - } - - // Generate a unique section name - TimeInfo = ArcGetTime(); - sprintf(SectionName, "CustomLinux%u%u%u%u%u%u", TimeInfo->Year, TimeInfo->Day, TimeInfo->Month, TimeInfo->Hour, TimeInfo->Minute, TimeInfo->Second); - - // Add the section - if (!IniAddSection(SectionName, &SectionId)) - { - return; - } - - // Add the BootType - if (!IniAddSettingValueToSection(SectionId, "BootType", "Linux")) - { - return; - } - - // Add the BootDrive - if (!IniAddSettingValueToSection(SectionId, "BootDrive", BootDriveString)) - { - return; - } - - // Add the BootPartition - if (!IniAddSettingValueToSection(SectionId, "BootPartition", BootPartitionString)) - { - return; - } - - // Add the Kernel - if (!IniAddSettingValueToSection(SectionId, "Kernel", LinuxKernelString)) - { - return; - } - - // Add the Initrd - if (strlen(LinuxInitrdString) > 0) - { - if (!IniAddSettingValueToSection(SectionId, "Initrd", LinuxInitrdString)) - { - return; - } - } - - // Add the CommandLine - if (!IniAddSettingValueToSection(SectionId, "CommandLine", LinuxCommandLineString)) - { - return; - } - - UiMessageBox(CustomBootPrompt); - - OperatingSystem.SystemPartition = SectionName; - OperatingSystem.LoadIdentifier = "Custom Linux Setup"; - OperatingSystem.OsLoadOptions = NULL; - - // LoadAndBootLinux(&OperatingSystem, 0); - LoadOperatingSystem(&OperatingSystem); -} - -VOID OptionMenuReboot(VOID) -{ - UiMessageBox("The system will now reboot."); - - DiskStopFloppyMotor(); - Reboot(); -} Removed: trunk/reactos/boot/freeldr/freeldr/arch/i386/miscboot.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/miscboot.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/arch/i386/miscboot.c (removed) @@ -1,217 +0,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. - */ - -#include <freeldr.h> - -VOID -LoadAndBootBootSector(IN OperatingSystemItem* OperatingSystem, - IN USHORT OperatingSystemVersion) -{ - ULONG_PTR SectionId; - PCSTR SectionName = OperatingSystem->SystemPartition; - CHAR FileName[260]; - PFILE FilePointer; - ULONG BytesRead; - CHAR SettingName[80]; - - // Find all the message box settings and run them - UiShowMessageBoxesInSection(SectionName); - - // Try to open the operating system section in the .ini file - if (!IniOpenSection(SectionName, &SectionId)) - { - sprintf(SettingName, "Section [%s] not found in freeldr.ini.\n", SectionName); - UiMessageBox(SettingName); - return; - } - - if (!IniReadSettingByName(SectionId, "BootSectorFile", FileName, sizeof(FileName))) - { - UiMessageBox("Boot sector file not specified for selected OS!"); - return; - } - - FilePointer = FsOpenFile(FileName); - if (!FilePointer) - { - strcat(FileName, " not found."); - UiMessageBox(FileName); - return; - } - - // Read boot sector - if (!FsReadFile(FilePointer, 512, &BytesRead, (void*)0x7c00) || (BytesRead != 512)) - { - UiMessageBox("Unable to read boot sector."); - return; - } - - // Check for validity - if (*((USHORT*)(0x7c00 + 0x1fe)) != 0xaa55) - { - UiMessageBox("Invalid boot sector magic (0xaa55)"); - return; - } - - UiUnInitialize("Booting..."); - // Don't stop the floppy drive motor when we - // are just booting a bootsector, or drive, or partition. - // If we were to stop the floppy motor then - // the BIOS wouldn't be informed and if the - // next read is to a floppy then the BIOS will - // still think the motor is on and this will - // result in a read error. - //DiskStopFloppyMotor(); - //DisableA20(); - ChainLoadBiosBootSectorCode(); -} - -VOID -LoadAndBootPartition(IN OperatingSystemItem* OperatingSystem, - IN USHORT OperatingSystemVersion) -{ - ULONG_PTR SectionId; - PCSTR SectionName = OperatingSystem->SystemPartition; - CHAR SettingName[80]; - CHAR SettingValue[80]; - PARTITION_TABLE_ENTRY PartitionTableEntry; - UCHAR DriveNumber; - ULONG PartitionNumber; - - // Find all the message box settings and run them - UiShowMessageBoxesInSection(SectionName); - - // Try to open the operating system section in the .ini file - if (!IniOpenSection(SectionName, &SectionId)) - { - sprintf(SettingName, "Section [%s] not found in freeldr.ini.\n", SectionName); - UiMessageBox(SettingName); - return; - } - - // Read the boot drive - if (!IniReadSettingByName(SectionId, "BootDrive", SettingValue, sizeof(SettingValue))) - { - UiMessageBox("Boot drive not specified for selected OS!"); - return; - } - - DriveNumber = DriveMapGetBiosDriveNumber(SettingValue); - - // Read the boot partition - if (!IniReadSettingByName(SectionId, "BootPartition", SettingValue, sizeof(SettingValue))) - { - UiMessageBox("Boot partition not specified for selected OS!"); - return; - } - - PartitionNumber = atoi(SettingValue); - - // Get the partition table entry - if (!DiskGetPartitionEntry(DriveNumber, PartitionNumber, &PartitionTableEntry)) - { - return; - } - - // Now try to read the partition boot sector - // If this fails then abort - if (!MachDiskReadLogicalSectors(DriveNumber, PartitionTableEntry.SectorCountBeforePartition, 1, (PVOID)0x7C00)) - { - UiMessageBox("Unable to read partition's boot sector."); - return; - } - - // Check for validity - if (*((USHORT*)(0x7c00 + 0x1fe)) != 0xaa55) - { - UiMessageBox("Invalid boot sector magic (0xaa55)"); - return; - } - - UiUnInitialize("Booting..."); - // Don't stop the floppy drive motor when we - // are just booting a bootsector, or drive, or partition. - // If we were to stop the floppy motor then - // the BIOS wouldn't be informed and if the - // next read is to a floppy then the BIOS will - // still think the motor is on and this will - // result in a read error. - //DiskStopFloppyMotor(); - //DisableA20(); - FrldrBootDrive = DriveNumber; - ChainLoadBiosBootSectorCode(); -} - -VOID -LoadAndBootDrive(IN OperatingSystemItem* OperatingSystem, - IN USHORT OperatingSystemVersion) -{ - ULONG_PTR SectionId; - PCSTR SectionName = OperatingSystem->SystemPartition; - CHAR SettingName[80]; - CHAR SettingValue[80]; - UCHAR DriveNumber; - - // Find all the message box settings and run them - UiShowMessageBoxesInSection(SectionName); - - // Try to open the operating system section in the .ini file - if (!IniOpenSection(SectionName, &SectionId)) - { - sprintf(SettingName, "Section [%s] not found in freeldr.ini.\n", SectionName); - UiMessageBox(SettingName); - return; - } - - if (!IniReadSettingByName(SectionId, "BootDrive", SettingValue, sizeof(SettingValue))) - { - UiMessageBox("Boot drive not specified for selected OS!"); - return; - } - - DriveNumber = DriveMapGetBiosDriveNumber(SettingValue); - - // Now try to read the boot sector (or mbr) - // If this fails then abort - if (!MachDiskReadLogicalSectors(DriveNumber, 0, 1, (PVOID)0x7C00)) - { - UiMessageBox("Unable to read boot sector"); - return; - } - - // Check for validity - if (*((USHORT*)(0x7c00 + 0x1fe)) != 0xaa55) - { - UiMessageBox("Invalid boot sector magic (0xaa55)"); - return; - } - - UiUnInitialize("Booting..."); - // Don't stop the floppy drive motor when we - // are just booting a bootsector, or drive, or partition. - // If we were to stop the floppy motor then - // the BIOS wouldn't be informed and if the - // next read is to a floppy then the BIOS will - // still think the motor is on and this will - // result in a read error. - //DiskStopFloppyMotor(); - //DisableA20(); - FrldrBootDrive = DriveNumber; - ChainLoadBiosBootSectorCode(); -} Copied: trunk/reactos/boot/freeldr/freeldr/custom.c (from r66136, trunk/reactos/boot/freeldr/freeldr/arch/i386/custom.c) URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/custo…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/custom.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/custom.c [iso-8859-1] Sun Feb 1 17:49:11 2015 @@ -19,6 +19,7 @@ #include <freeldr.h> +#ifdef _M_IX86 const CHAR BootDrivePrompt[] = "Enter the boot drive.\n\nExamples:\nfd0 - first floppy drive\nhd0 - first hard drive\nhd1 - second hard drive\ncd0 - first CD-ROM drive.\n\nBIOS drive numbers may also be used:\n0 - first floppy drive\n0x80 - first hard drive\n0x81 - second hard drive"; const CHAR BootPartitionPrompt[] = "Enter the boot partition.\n\nEnter 0 for the active (bootable) partition."; @@ -448,3 +449,5 @@ DiskStopFloppyMotor(); Reboot(); } + +#endif // _M_IX86 Removed: trunk/reactos/boot/freeldr/freeldr/include/arch/i386/custom.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/arch/i386/custom.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/arch/i386/custom.h (removed) @@ -1,35 +0,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., 675 Mass Ave, Cambridge, MA 02139, USA. - */ - -#pragma once - -#define TAG_HW_RESOURCE_LIST 'lRwH' -#define TAG_HW_DISK_CONTEXT 'cDwH' - -#define HAS_OPTION_MENU_CUSTOM_BOOT -#define HAS_OPTION_MENU_REBOOT - -VOID OptionMenuReboot(VOID); - -VOID OptionMenuCustomBoot(VOID); -VOID OptionMenuCustomBootDisk(VOID); -VOID OptionMenuCustomBootPartition(VOID); -VOID OptionMenuCustomBootBootSectorFile(VOID); -VOID OptionMenuCustomBootReactOS(VOID); -VOID OptionMenuCustomBootLinux(VOID); Removed: trunk/reactos/boot/freeldr/freeldr/include/arch/i386/miscboot.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/arch/i386/miscboot.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/arch/i386/miscboot.h (removed) @@ -1,30 +0,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 - -VOID -LoadAndBootBootSector(IN OperatingSystemItem* OperatingSystem, - IN USHORT OperatingSystemVersion); -VOID -LoadAndBootPartition(IN OperatingSystemItem* OperatingSystem, - IN USHORT OperatingSystemVersion); -VOID -LoadAndBootDrive(IN OperatingSystemItem* OperatingSystem, - IN USHORT OperatingSystemVersion); Modified: trunk/reactos/boot/freeldr/freeldr/include/arch/pc/hardware.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/arch/pc/hardware.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/arch/pc/hardware.h [iso-8859-1] Sun Feb 1 17:49:11 2015 @@ -23,6 +23,8 @@ #define CONFIG_CMD(bus, dev_fn, where) \ (0x80000000 | (((ULONG)(bus)) << 16) | (((dev_fn) & 0x1F) << 11) | (((dev_fn) & 0xE0) << 3) | ((where) & ~3)) +#define TAG_HW_RESOURCE_LIST 'lRwH' +#define TAG_HW_DISK_CONTEXT 'cDwH' // // ARC Component Configuration Routines Copied: trunk/reactos/boot/freeldr/freeldr/include/custom.h (from r66136, trunk/reactos/boot/freeldr/freeldr/include/arch/i386/custom.h) URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/arch/i386/custom.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/custom.h [iso-8859-1] Sun Feb 1 17:49:11 2015 @@ -19,8 +19,7 @@ #pragma once -#define TAG_HW_RESOURCE_LIST 'lRwH' -#define TAG_HW_DISK_CONTEXT 'cDwH' +#ifdef _M_IX86 #define HAS_OPTION_MENU_CUSTOM_BOOT #define HAS_OPTION_MENU_REBOOT @@ -33,3 +32,5 @@ VOID OptionMenuCustomBootBootSectorFile(VOID); VOID OptionMenuCustomBootReactOS(VOID); VOID OptionMenuCustomBootLinux(VOID); + +#endif // _M_IX86 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] Sun Feb 1 17:49:11 2015 @@ -66,6 +66,8 @@ #include <inifile.h> #include <keycodes.h> #include <linux.h> +#include <custom.h> +#include <miscboot.h> #include <machine.h> #include <mm.h> #include <multiboot.h> @@ -99,13 +101,11 @@ #include <arch/pc/machpc.h> #include <arch/pc/x86common.h> #include <arch/pc/pxe.h> -#include <arch/i386/custom.h> #include <arch/i386/drivemap.h> #endif #if defined(_M_IX86) #include <arch/i386/i386.h> #include <arch/i386/machxbox.h> -#include <arch/i386/miscboot.h> #include <internal/i386/intrin_i.h> #elif defined(_M_AMD64) #include <arch/amd64/amd64.h> Modified: trunk/reactos/boot/freeldr/freeldr/include/linux.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/linux.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/linux.h [iso-8859-1] Sun Feb 1 17:49:11 2015 @@ -23,24 +23,25 @@ #ifndef __LINUX_H #define __LINUX_H -#ifdef __i386__ -#define LINUX_LOADER_TYPE_LILO 0x01 -#define LINUX_LOADER_TYPE_LOADLIN 0x11 -#define LINUX_LOADER_TYPE_BOOTSECT 0x21 -#define LINUX_LOADER_TYPE_SYSLINUX 0x31 -#define LINUX_LOADER_TYPE_ETHERBOOT 0x41 +#ifdef _M_IX86 + +#define LINUX_LOADER_TYPE_LILO 0x01 +#define LINUX_LOADER_TYPE_LOADLIN 0x11 +#define LINUX_LOADER_TYPE_BOOTSECT 0x21 +#define LINUX_LOADER_TYPE_SYSLINUX 0x31 +#define LINUX_LOADER_TYPE_ETHERBOOT 0x41 #define LINUX_LOADER_TYPE_FREELOADER 0x81 #define LINUX_COMMAND_LINE_MAGIC 0xA33F -#define LINUX_SETUP_HEADER_ID 0x53726448 // 'HdrS' +#define LINUX_SETUP_HEADER_ID 0x53726448 // 'HdrS' -#define LINUX_BOOT_SECTOR_MAGIC 0xAA55 +#define LINUX_BOOT_SECTOR_MAGIC 0xAA55 -#define LINUX_KERNEL_LOAD_ADDRESS 0x100000 +#define LINUX_KERNEL_LOAD_ADDRESS 0x100000 #define LINUX_FLAG_LOAD_HIGH 0x01 -#define LINUX_FLAG_CAN_USE_HEAP 0x80 +#define LINUX_FLAG_CAN_USE_HEAP 0x80 #define LINUX_MAX_INITRD_ADDRESS 0x38000000 @@ -140,6 +141,7 @@ BOOLEAN LinuxReadKernel(PFILE LinuxKernelFile); BOOLEAN LinuxCheckKernelVersion(VOID); BOOLEAN LinuxReadInitrd(PFILE LinuxInitrdFile); -#endif /* __i386__ */ + +#endif // _M_IX86 #endif // defined __LINUX_H Copied: trunk/reactos/boot/freeldr/freeldr/include/miscboot.h (from r66136, trunk/reactos/boot/freeldr/freeldr/include/arch/i386/miscboot.h) URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/inclu…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/include/arch/i386/miscboot.h [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/include/miscboot.h [iso-8859-1] Sun Feb 1 17:49:11 2015 @@ -19,6 +19,8 @@ #pragma once +#ifdef _M_IX86 + VOID LoadAndBootBootSector(IN OperatingSystemItem* OperatingSystem, IN USHORT OperatingSystemVersion); @@ -28,3 +30,5 @@ VOID LoadAndBootDrive(IN OperatingSystemItem* OperatingSystem, IN USHORT OperatingSystemVersion); + +#endif // _M_IX86 Modified: trunk/reactos/boot/freeldr/freeldr/linuxboot.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/linux…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/linuxboot.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/linuxboot.c [iso-8859-1] Sun Feb 1 17:49:11 2015 @@ -21,8 +21,10 @@ #include <freeldr.h> #include <debug.h> -#ifdef __i386__ -#define LINUX_READ_CHUNK_SIZE 0x20000 // Read 128k at a time + +#ifdef _M_IX86 + +#define LINUX_READ_CHUNK_SIZE 0x20000 // Read 128k at a time DBG_DEFAULT_CHANNEL(LINUX); @@ -307,7 +309,7 @@ return FALSE; } - DbgDumpBuffer(DPRINT_LINUX, LinuxBootSector, 512); + // DbgDumpBuffer(DPRINT_LINUX, LinuxBootSector, 512); TRACE("SetupSectors: %d\n", LinuxBootSector->SetupSectors); TRACE("RootFlags: 0x%x\n", LinuxBootSector->RootFlags); @@ -366,7 +368,7 @@ return FALSE; } - DbgDumpBuffer(DPRINT_LINUX, LinuxSetupSector, SetupSectorSize); + // DbgDumpBuffer(DPRINT_LINUX, LinuxSetupSector, SetupSectorSize); TRACE("SetupHeaderSignature: 0x%x (HdrS)\n", LinuxSetupSector->SetupHeaderSignature); TRACE("Version: 0x%x\n", LinuxSetupSector->Version); @@ -513,5 +515,7 @@ return TRUE; } -#endif /* __i386__ */ + +#endif // _M_IX86 + #endif Copied: trunk/reactos/boot/freeldr/freeldr/miscboot.c (from r66136, trunk/reactos/boot/freeldr/freeldr/arch/i386/miscboot.c) URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/miscb…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/arch/i386/miscboot.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/miscboot.c [iso-8859-1] Sun Feb 1 17:49:11 2015 @@ -19,6 +19,8 @@ #include <freeldr.h> +#ifdef _M_IX86 + VOID LoadAndBootBootSector(IN OperatingSystemItem* OperatingSystem, IN USHORT OperatingSystemVersion) @@ -215,3 +217,5 @@ FrldrBootDrive = DriveNumber; ChainLoadBiosBootSectorCode(); } + +#endif // _M_IX86 Modified: trunk/reactos/boot/freeldr/freeldr/mm/mm.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/mm/mm…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/mm/mm.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/mm/mm.c [iso-8859-1] Sun Feb 1 17:49:11 2015 @@ -21,8 +21,7 @@ #include <debug.h> #if DBG -VOID DumpMemoryAllocMap(VOID); -VOID MemAllocTest(VOID); +VOID DumpMemoryAllocMap(VOID); #endif // DBG DBG_DEFAULT_CHANNEL(MEMORY);
9 years, 10 months
1
0
0
0
[hbelusca] 66142: [FREELDR]: Pseudo-fix my previous commit. But anyway, the "usebiossettings" case looks strange... (I mean, this precise line: LoaderRedirectionInformation.PortAddress = (PUCHAR)st...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sun Feb 1 15:22:31 2015 New Revision: 66142 URL:
http://svn.reactos.org/svn/reactos?rev=66142&view=rev
Log: [FREELDR]: Pseudo-fix my previous commit. But anyway, the "usebiossettings" case looks strange... (I mean, this precise line: LoaderRedirectionInformation.PortAddress = (PUCHAR)strtoul(Settings, 0, 16); ). Modified: trunk/reactos/boot/freeldr/freeldr/windows/headless.c Modified: trunk/reactos/boot/freeldr/freeldr/windows/headless.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/windows/headless.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/windows/headless.c [iso-8859-1] Sun Feb 1 15:22:31 2015 @@ -242,7 +242,7 @@ VOID WinLdrSetupEms(IN PCHAR BootOptions) { - PCHAR Settings; + PCHAR Settings, RedirectPort; /* Start fresh */ RtlZeroMemory(&LoaderRedirectionInformation, sizeof(HEADLESS_LOADER_BLOCK)); @@ -252,7 +252,7 @@ Settings = strstr(BootOptions, "/redirect="); if (Settings) { - PCHAR RedirectPort = strstr(Settings, "com"); + RedirectPort = strstr(Settings, "com"); if (RedirectPort) { RedirectPort += sizeof("com") - 1; @@ -261,10 +261,11 @@ } else { - Settings = strstr(Settings, "usebiossettings"); - if (Settings) + RedirectPort = strstr(Settings, "usebiossettings"); + if (RedirectPort) { UiDrawStatusText("ACPI SRT Table Not Supported..."); + return; } else {
9 years, 10 months
1
0
0
0
[hbelusca] 66141: [FREELDR]: Don't use a null pointer for strstr call. CORE-8198 #resolve #comment Fixed.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sun Feb 1 15:10:19 2015 New Revision: 66141 URL:
http://svn.reactos.org/svn/reactos?rev=66141&view=rev
Log: [FREELDR]: Don't use a null pointer for strstr call. CORE-8198 #resolve #comment Fixed. Modified: trunk/reactos/boot/freeldr/freeldr/windows/headless.c Modified: trunk/reactos/boot/freeldr/freeldr/windows/headless.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/windo…
============================================================================== --- trunk/reactos/boot/freeldr/freeldr/windows/headless.c [iso-8859-1] (original) +++ trunk/reactos/boot/freeldr/freeldr/windows/headless.c [iso-8859-1] Sun Feb 1 15:10:19 2015 @@ -242,34 +242,33 @@ VOID WinLdrSetupEms(IN PCHAR BootOptions) { - PCHAR RedirectPort; + PCHAR Settings; /* Start fresh */ RtlZeroMemory(&LoaderRedirectionInformation, sizeof(HEADLESS_LOADER_BLOCK)); LoaderRedirectionInformation.PciDeviceId = PCI_INVALID_VENDORID; /* Use a direction port if one was given, or use ACPI to detect one instead */ - RedirectPort = strstr(BootOptions, "/redirect="); - - if (RedirectPort) - { - RedirectPort = strstr(RedirectPort, "com"); + Settings = strstr(BootOptions, "/redirect="); + if (Settings) + { + PCHAR RedirectPort = strstr(Settings, "com"); if (RedirectPort) { RedirectPort += sizeof("com") - 1; LoaderRedirectionInformation.PortNumber = atoi(RedirectPort); - LoaderRedirectionInformation.TerminalType = 1; //HeadlessSerialPort + LoaderRedirectionInformation.TerminalType = 1; // HeadlessSerialPort } else { - RedirectPort = strstr(RedirectPort, "usebiossettings"); - if (RedirectPort) + Settings = strstr(Settings, "usebiossettings"); + if (Settings) { UiDrawStatusText("ACPI SRT Table Not Supported..."); } else { - LoaderRedirectionInformation.PortAddress = (PUCHAR)strtoul(RedirectPort, 0, 16); + LoaderRedirectionInformation.PortAddress = (PUCHAR)strtoul(Settings, 0, 16); if (LoaderRedirectionInformation.PortAddress) { LoaderRedirectionInformation.PortNumber = 3; @@ -279,18 +278,18 @@ } /* Use a direction baudrate if one was given */ - RedirectPort = strstr(BootOptions, "/redirectbaudrate="); - if (RedirectPort) - { - if (strstr(RedirectPort, "115200")) + Settings = strstr(BootOptions, "/redirectbaudrate="); + if (Settings) + { + if (strstr(Settings, "115200")) { LoaderRedirectionInformation.BaudRate = 115200; } - else if (strstr(RedirectPort, "57600")) + else if (strstr(Settings, "57600")) { LoaderRedirectionInformation.BaudRate = 57600; } - else if (strstr(RedirectPort, "19200")) + else if (strstr(Settings, "19200")) { LoaderRedirectionInformation.BaudRate = 19200; }
9 years, 10 months
1
0
0
0
[hbelusca] 66140: [CMLIB]: Whitespace fixes only.
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sun Feb 1 14:39:35 2015 New Revision: 66140 URL:
http://svn.reactos.org/svn/reactos?rev=66140&view=rev
Log: [CMLIB]: Whitespace fixes only. Modified: trunk/reactos/lib/cmlib/cmlib.h trunk/reactos/lib/cmlib/cmtools.c trunk/reactos/lib/cmlib/hivebin.c trunk/reactos/lib/cmlib/hivedata.h Modified: trunk/reactos/lib/cmlib/cmlib.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/cmlib.h?rev=6614…
============================================================================== --- trunk/reactos/lib/cmlib/cmlib.h [iso-8859-1] (original) +++ trunk/reactos/lib/cmlib/cmlib.h [iso-8859-1] Sun Feb 1 14:39:35 2015 @@ -345,25 +345,25 @@ BOOLEAN NTAPI CmCompareHash( - IN PCUNICODE_STRING KeyName, - IN PCHAR HashString, - IN BOOLEAN CaseInsensitive); + IN PCUNICODE_STRING KeyName, + IN PCHAR HashString, + IN BOOLEAN CaseInsensitive); BOOLEAN NTAPI CmComparePackedNames( - IN PCUNICODE_STRING Name, - IN PVOID NameBuffer, - IN USHORT NameBufferSize, - IN BOOLEAN NamePacked, - IN BOOLEAN CaseInsensitive); + IN PCUNICODE_STRING Name, + IN PVOID NameBuffer, + IN USHORT NameBufferSize, + IN BOOLEAN NamePacked, + IN BOOLEAN CaseInsensitive); BOOLEAN NTAPI CmCompareKeyName( - IN PCM_KEY_NODE KeyCell, - IN PCUNICODE_STRING KeyName, - IN BOOLEAN CaseInsensitive); + IN PCM_KEY_NODE KeyCell, + IN PCUNICODE_STRING KeyName, + IN BOOLEAN CaseInsensitive); BOOLEAN NTAPI Modified: trunk/reactos/lib/cmlib/cmtools.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/cmtools.c?rev=66…
============================================================================== --- trunk/reactos/lib/cmlib/cmtools.c [iso-8859-1] (original) +++ trunk/reactos/lib/cmlib/cmtools.c [iso-8859-1] Sun Feb 1 14:39:35 2015 @@ -12,16 +12,16 @@ BOOLEAN NTAPI CmCompareHash( - IN PCUNICODE_STRING KeyName, - IN PCHAR HashString, - IN BOOLEAN CaseInsensitive) -{ - CHAR Buffer[4]; - - Buffer[0] = (KeyName->Length >= 2) ? (CHAR)KeyName->Buffer[0] : 0; - Buffer[1] = (KeyName->Length >= 4) ? (CHAR)KeyName->Buffer[1] : 0; - Buffer[2] = (KeyName->Length >= 6) ? (CHAR)KeyName->Buffer[2] : 0; - Buffer[3] = (KeyName->Length >= 8) ? (CHAR)KeyName->Buffer[3] : 0; + IN PCUNICODE_STRING KeyName, + IN PCHAR HashString, + IN BOOLEAN CaseInsensitive) +{ + CHAR Buffer[4]; + + Buffer[0] = (KeyName->Length >= 2) ? (CHAR)KeyName->Buffer[0] : 0; + Buffer[1] = (KeyName->Length >= 4) ? (CHAR)KeyName->Buffer[1] : 0; + Buffer[2] = (KeyName->Length >= 6) ? (CHAR)KeyName->Buffer[2] : 0; + Buffer[3] = (KeyName->Length >= 8) ? (CHAR)KeyName->Buffer[3] : 0; if (CaseInsensitive) { Modified: trunk/reactos/lib/cmlib/hivebin.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/hivebin.c?rev=66…
============================================================================== --- trunk/reactos/lib/cmlib/hivebin.c [iso-8859-1] (original) +++ trunk/reactos/lib/cmlib/hivebin.c [iso-8859-1] Sun Feb 1 14:39:35 2015 @@ -86,8 +86,8 @@ { ASSERT(RegistryHive->DirtyVector.Buffer); RtlCopyMemory(BitmapBuffer, - RegistryHive->DirtyVector.Buffer, - RegistryHive->DirtyVector.SizeOfBitMap / 8); + RegistryHive->DirtyVector.Buffer, + RegistryHive->DirtyVector.SizeOfBitMap / 8); RegistryHive->Free(RegistryHive->DirtyVector.Buffer, 0); } RtlInitializeBitMap(&RegistryHive->DirtyVector, BitmapBuffer, Modified: trunk/reactos/lib/cmlib/hivedata.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/cmlib/hivedata.h?rev=6…
============================================================================== --- trunk/reactos/lib/cmlib/hivedata.h [iso-8859-1] (original) +++ trunk/reactos/lib/cmlib/hivedata.h [iso-8859-1] Sun Feb 1 14:39:35 2015 @@ -78,15 +78,15 @@ // // Cell Magic Values // -#define HCELL_NIL MAXULONG -#define HCELL_CACHED 1 - -#define HCELL_TYPE_MASK 0x80000000 -#define HCELL_BLOCK_MASK 0x7ffff000 -#define HCELL_OFFSET_MASK 0x00000fff -#define HCELL_TYPE_SHIFT 31 -#define HCELL_BLOCK_SHIFT 12 -#define HCELL_OFFSET_SHIFT 0 +#define HCELL_NIL MAXULONG +#define HCELL_CACHED 1 + +#define HCELL_TYPE_MASK 0x80000000 +#define HCELL_BLOCK_MASK 0x7ffff000 +#define HCELL_OFFSET_MASK 0x00000fff +#define HCELL_TYPE_SHIFT 31 +#define HCELL_BLOCK_SHIFT 12 +#define HCELL_OFFSET_SHIFT 0 #define HvGetCellType(Cell) \ ((ULONG)((Cell & HCELL_TYPE_MASK) >> HCELL_TYPE_SHIFT)) @@ -107,7 +107,7 @@ * On-disk header for registry hive file. */ -#define HIVE_FILENAME_MAXLEN 31 +#define HIVE_FILENAME_MAXLEN 31 typedef struct _HBASE_BLOCK {
9 years, 10 months
1
0
0
0
[ekohl] 66139: [NTOSKRNL][INCLUDE] Add keyed event access mask values and use them in the keyed event object implementation. This fixes another kmtest:ObTypes bug.
by ekohl@svn.reactos.org
Author: ekohl Date: Sun Feb 1 13:59:09 2015 New Revision: 66139 URL:
http://svn.reactos.org/svn/reactos?rev=66139&view=rev
Log: [NTOSKRNL][INCLUDE] Add keyed event access mask values and use them in the keyed event object implementation. This fixes another kmtest:ObTypes bug. Modified: trunk/reactos/include/ndk/extypes.h trunk/reactos/ntoskrnl/ex/keyedevt.c Modified: trunk/reactos/include/ndk/extypes.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/include/ndk/extypes.h?rev=…
============================================================================== --- trunk/reactos/include/ndk/extypes.h [iso-8859-1] (original) +++ trunk/reactos/include/ndk/extypes.h [iso-8859-1] Sun Feb 1 13:59:09 2015 @@ -129,6 +129,15 @@ // #define PROFILE_CONTROL 0x0001 #define PROFILE_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | PROFILE_CONTROL) + +// +// Keyed Event Object Access Masks +// +#define KEYEDEVENT_WAIT 0x0001 +#define KEYEDEVENT_WAKE 0x0002 +#define KEYEDEVENT_ALL_ACCESS (STANDARD_RIGHTS_REQUIRED | \ + KEYEDEVENT_WAIT | \ + KEYEDEVENT_WAKE) // // NtRaiseHardError-related parameters Modified: trunk/reactos/ntoskrnl/ex/keyedevt.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/ex/keyedevt.c?rev…
============================================================================== --- trunk/reactos/ntoskrnl/ex/keyedevt.c [iso-8859-1] (original) +++ trunk/reactos/ntoskrnl/ex/keyedevt.c [iso-8859-1] Sun Feb 1 13:59:09 2015 @@ -43,10 +43,10 @@ static GENERIC_MAPPING ExpKeyedEventMapping = { - STANDARD_RIGHTS_READ | EVENT_QUERY_STATE, - STANDARD_RIGHTS_WRITE | EVENT_MODIFY_STATE, + STANDARD_RIGHTS_READ | KEYEDEVENT_WAIT, + STANDARD_RIGHTS_WRITE | KEYEDEVENT_WAKE, STANDARD_RIGHTS_EXECUTE, - EVENT_ALL_ACCESS + KEYEDEVENT_ALL_ACCESS }; /* FUNCTIONS *****************************************************************/ @@ -68,7 +68,7 @@ ObjectTypeInitializer.Length = sizeof(ObjectTypeInitializer); ObjectTypeInitializer.GenericMapping = ExpKeyedEventMapping; ObjectTypeInitializer.PoolType = PagedPool; - ObjectTypeInitializer.ValidAccessMask = EVENT_ALL_ACCESS; + ObjectTypeInitializer.ValidAccessMask = KEYEDEVENT_ALL_ACCESS; ObjectTypeInitializer.UseDefaultObject = TRUE; /* Create the keyed event object type */ @@ -81,14 +81,14 @@ /* Create the out of memory event for critical sections */ InitializeObjectAttributes(&ObjectAttributes, &Name, OBJ_PERMANENT, NULL, NULL); Status = ZwCreateKeyedEvent(&EventHandle, - EVENT_ALL_ACCESS, + KEYEDEVENT_ALL_ACCESS, &ObjectAttributes, 0); if (NT_SUCCESS(Status)) { /* Take a reference so we can get rid of the handle */ Status = ObReferenceObjectByHandle(EventHandle, - EVENT_ALL_ACCESS, + KEYEDEVENT_ALL_ACCESS, ExKeyedEventObjectType, KernelMode, (PVOID*)&ExpCritSecOutOfMemoryEvent, @@ -258,8 +258,8 @@ ExpReleaseKeyedEvent( _Inout_ PEX_KEYED_EVENT KeyedEvent, _In_ PVOID KeyedWaitValue, - _In_ BOOLEAN Alertable, - _In_ PLARGE_INTEGER Timeout) + _In_ BOOLEAN Alertable, + _In_ PLARGE_INTEGER Timeout) { /* Call the generic internal function */ return ExpReleaseOrWaitForKeyedEvent(KeyedEvent, @@ -433,7 +433,7 @@ { /* Get the keyed event object */ Status = ObReferenceObjectByHandle(Handle, - EVENT_MODIFY_STATE, + KEYEDEVENT_WAIT, ExKeyedEventObjectType, PreviousMode, (PVOID*)&KeyedEvent, @@ -493,7 +493,7 @@ { /* Get the keyed event object */ Status = ObReferenceObjectByHandle(Handle, - EVENT_MODIFY_STATE, + KEYEDEVENT_WAKE, ExKeyedEventObjectType, PreviousMode, (PVOID*)&KeyedEvent,
9 years, 10 months
1
0
0
0
[hbelusca] 66138: [RTL] - Whitespace files. - Add missing PSEH inclusion (that can be detected if one comments the objbase.h include in rtl.h ...) [MKHIVE] Code cleanup + add a comment to explain w...
by hbelusca@svn.reactos.org
Author: hbelusca Date: Sun Feb 1 13:33:06 2015 New Revision: 66138 URL:
http://svn.reactos.org/svn/reactos?rev=66138&view=rev
Log: [RTL] - Whitespace files. - Add missing PSEH inclusion (that can be detected if one comments the objbase.h include in rtl.h ...) [MKHIVE] Code cleanup + add a comment to explain what this ntoskrnl.h file is. Modified: trunk/reactos/lib/rtl/access.c trunk/reactos/lib/rtl/acl.c trunk/reactos/lib/rtl/atom.c trunk/reactos/lib/rtl/avltable.c trunk/reactos/lib/rtl/bootdata.c trunk/reactos/lib/rtl/byteswap.c trunk/reactos/lib/rtl/compress.c trunk/reactos/lib/rtl/crc32.c trunk/reactos/lib/rtl/dbgbuffer.c trunk/reactos/lib/rtl/dos8dot3.c trunk/reactos/lib/rtl/encode.c trunk/reactos/lib/rtl/exception.c trunk/reactos/lib/rtl/generictable.c trunk/reactos/lib/rtl/handle.c trunk/reactos/lib/rtl/heap.c trunk/reactos/lib/rtl/heappage.c trunk/reactos/lib/rtl/heapuser.c trunk/reactos/lib/rtl/image.c trunk/reactos/lib/rtl/largeint.c trunk/reactos/lib/rtl/luid.c trunk/reactos/lib/rtl/mem.c trunk/reactos/lib/rtl/memstream.c trunk/reactos/lib/rtl/message.c trunk/reactos/lib/rtl/rtl.h trunk/reactos/tools/mkhive/cmi.c trunk/reactos/tools/mkhive/ntoskrnl.h Modified: trunk/reactos/lib/rtl/access.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/access.c?rev=66138…
============================================================================== --- trunk/reactos/lib/rtl/access.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/access.c [iso-8859-1] Sun Feb 1 13:33:06 2015 @@ -1,4 +1,5 @@ -/* COPYRIGHT: See COPYING in the top level directory +/* + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/rtl/access.c * PURPOSE: Access rights handling functions Modified: trunk/reactos/lib/rtl/acl.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/acl.c?rev=66138&r1…
============================================================================== --- trunk/reactos/lib/rtl/acl.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/acl.c [iso-8859-1] Sun Feb 1 13:33:06 2015 @@ -1,4 +1,5 @@ -/* COPYRIGHT: See COPYING in the top level directory +/* + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * PURPOSE: Security manager * FILE: lib/rtl/acl.c Modified: trunk/reactos/lib/rtl/atom.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/atom.c?rev=66138&r…
============================================================================== --- trunk/reactos/lib/rtl/atom.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/atom.c [iso-8859-1] Sun Feb 1 13:33:06 2015 @@ -1,4 +1,5 @@ -/* COPYRIGHT: See COPYING in the top level directory +/* + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/rtl/atom.c * PURPOSE: Atom managment Modified: trunk/reactos/lib/rtl/avltable.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/avltable.c?rev=661…
============================================================================== --- trunk/reactos/lib/rtl/avltable.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/avltable.c [iso-8859-1] Sun Feb 1 13:33:06 2015 @@ -1,10 +1,10 @@ /* -* PROJECT: ReactOS Runtime Library -* LICENSE: BSD - See COPYING.ARM in the top level directory -* FILE: lib/rtl/avltable.c -* PURPOSE: AVL Tree Generic Table Implementation -* PROGRAMMERS: ReactOS Portable Systems Group -*/ + * PROJECT: ReactOS Runtime Library + * LICENSE: BSD - See COPYING.ARM in the top level directory + * FILE: lib/rtl/avltable.c + * PURPOSE: AVL Tree Generic Table Implementation + * PROGRAMMERS: ReactOS Portable Systems Group + */ /* INCLUDES ******************************************************************/ Modified: trunk/reactos/lib/rtl/bootdata.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/bootdata.c?rev=661…
============================================================================== --- trunk/reactos/lib/rtl/bootdata.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/bootdata.c [iso-8859-1] Sun Feb 1 13:33:06 2015 @@ -1,4 +1,5 @@ -/* COPYRIGHT: See COPYING in the top level directory +/* + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * PURPOSE: Boot Data implementation * FILE: lib/rtl/bootdata.c Modified: trunk/reactos/lib/rtl/byteswap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/byteswap.c?rev=661…
============================================================================== --- trunk/reactos/lib/rtl/byteswap.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/byteswap.c [iso-8859-1] Sun Feb 1 13:33:06 2015 @@ -1,4 +1,5 @@ -/* COPYRIGHT: See COPYING in the top level directory +/* + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/rtl/mem.c * PURPOSE: Memory functions Modified: trunk/reactos/lib/rtl/compress.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/compress.c?rev=661…
============================================================================== --- trunk/reactos/lib/rtl/compress.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/compress.c [iso-8859-1] Sun Feb 1 13:33:06 2015 @@ -1,4 +1,5 @@ -/* COPYRIGHT: See COPYING in the top level directory +/* + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * PURPOSE: Compression and decompression functions * FILE: lib/rtl/compress.c Modified: trunk/reactos/lib/rtl/crc32.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/crc32.c?rev=66138&…
============================================================================== --- trunk/reactos/lib/rtl/crc32.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/crc32.c [iso-8859-1] Sun Feb 1 13:33:06 2015 @@ -1,4 +1,5 @@ -/* COPYRIGHT: See COPYING in the top level directory +/* + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * PURPOSE: crc32 functions * FILE: lib/rtl/crc32.c Modified: trunk/reactos/lib/rtl/dbgbuffer.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/dbgbuffer.c?rev=66…
============================================================================== --- trunk/reactos/lib/rtl/dbgbuffer.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/dbgbuffer.c [iso-8859-1] Sun Feb 1 13:33:06 2015 @@ -1,8 +1,9 @@ -/* COPYRIGHT: See COPYING in the top level directory -* PROJECT: ReactOS system libraries -* FILE: lib/rtl/dbgbuffer.c -* PROGRAMER: James Tabor -*/ +/* + * COPYRIGHT: See COPYING in the top level directory + * PROJECT: ReactOS system libraries + * FILE: lib/rtl/dbgbuffer.c + * PROGRAMER: James Tabor + */ /* INCLUDES *****************************************************************/ @@ -14,8 +15,8 @@ /* FUNCTIONS *****************************************************************/ /* -* @unimplemented -*/ + * @unimplemented + */ PRTL_DEBUG_INFORMATION NTAPI RtlCreateQueryDebugBuffer(IN ULONG Size, @@ -42,8 +43,8 @@ } /* -* @unimplemented -*/ + * @unimplemented + */ NTSTATUS NTAPI RtlDestroyQueryDebugBuffer(IN PRTL_DEBUG_INFORMATION Buf) @@ -66,9 +67,8 @@ } /* -* Based on lib/epsapi/enum/modules.c by KJK::Hyperion. -* -*/ + * Based on lib/epsapi/enum/modules.c by KJK::Hyperion. + */ NTSTATUS NTAPI RtlpQueryRemoteProcessModules(HANDLE ProcessHandle, @@ -233,8 +233,8 @@ } /* -* @unimplemented -*/ + * @unimplemented + */ NTSTATUS NTAPI RtlQueryProcessDebugInformation(IN ULONG ProcessId, Modified: trunk/reactos/lib/rtl/dos8dot3.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/dos8dot3.c?rev=661…
============================================================================== --- trunk/reactos/lib/rtl/dos8dot3.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/dos8dot3.c [iso-8859-1] Sun Feb 1 13:33:06 2015 @@ -1,4 +1,5 @@ -/* COPYRIGHT: See COPYING in the top level directory +/* + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/rtl/dos8dot3.c * PURPOSE: Short name (8.3 name) functions Modified: trunk/reactos/lib/rtl/encode.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/encode.c?rev=66138…
============================================================================== --- trunk/reactos/lib/rtl/encode.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/encode.c [iso-8859-1] Sun Feb 1 13:33:06 2015 @@ -1,4 +1,5 @@ -/* COPYRIGHT: See COPYING in the top level directory +/* + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * PURPOSE: Security descriptor functions * FILE: lib/rtl/encode.c Modified: trunk/reactos/lib/rtl/exception.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/exception.c?rev=66…
============================================================================== --- trunk/reactos/lib/rtl/exception.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/exception.c [iso-8859-1] Sun Feb 1 13:33:06 2015 @@ -1,4 +1,5 @@ -/* COPYRIGHT: See COPYING in the top level directory +/* + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS Runtime Library * PURPOSE: User-Mode Exception Support * FILE: lib/rtl/exception.c Modified: trunk/reactos/lib/rtl/generictable.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/generictable.c?rev…
============================================================================== --- trunk/reactos/lib/rtl/generictable.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/generictable.c [iso-8859-1] Sun Feb 1 13:33:06 2015 @@ -1,10 +1,10 @@ /* -* PROJECT: ReactOS Runtime Library -* LICENSE: GPL - See COPYING in the top level directory -* FILE: lib/rtl/generictable.c -* PURPOSE: Splay Tree Generic Table Implementation -* PROGRAMMERS: Alex Ionescu (alex.ionescu(a)reactos.org) -*/ + * PROJECT: ReactOS Runtime Library + * LICENSE: GPL - See COPYING in the top level directory + * FILE: lib/rtl/generictable.c + * PURPOSE: Splay Tree Generic Table Implementation + * PROGRAMMERS: Alex Ionescu (alex.ionescu(a)reactos.org) + */ /* INCLUDES ******************************************************************/ Modified: trunk/reactos/lib/rtl/handle.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/handle.c?rev=66138…
============================================================================== --- trunk/reactos/lib/rtl/handle.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/handle.c [iso-8859-1] Sun Feb 1 13:33:06 2015 @@ -1,4 +1,5 @@ -/* COPYRIGHT: See COPYING in the top level directory +/* + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * PURPOSE: Handle table * FILE: lib/rtl/handle.c Modified: trunk/reactos/lib/rtl/heap.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/heap.c?rev=66138&r…
============================================================================== --- trunk/reactos/lib/rtl/heap.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/heap.c [iso-8859-1] Sun Feb 1 13:33:06 2015 @@ -1,4 +1,5 @@ -/* COPYRIGHT: See COPYING in the top level directory +/* + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/rtl/heap.c * PURPOSE: RTL Heap backend allocator Modified: trunk/reactos/lib/rtl/heappage.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/heappage.c?rev=661…
============================================================================== --- trunk/reactos/lib/rtl/heappage.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/heappage.c [iso-8859-1] Sun Feb 1 13:33:06 2015 @@ -1,4 +1,5 @@ -/* COPYRIGHT: See COPYING in the top level directory +/* + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/rtl/heappage.c * PURPOSE: RTL Page Heap implementation Modified: trunk/reactos/lib/rtl/heapuser.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/heapuser.c?rev=661…
============================================================================== --- trunk/reactos/lib/rtl/heapuser.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/heapuser.c [iso-8859-1] Sun Feb 1 13:33:06 2015 @@ -1,4 +1,5 @@ -/* COPYRIGHT: See COPYING in the top level directory +/* + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/rtl/heap.c * PURPOSE: RTL Heap backend allocator (user mode only functions) Modified: trunk/reactos/lib/rtl/image.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/image.c?rev=66138&…
============================================================================== --- trunk/reactos/lib/rtl/image.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/image.c [iso-8859-1] Sun Feb 1 13:33:06 2015 @@ -1,4 +1,5 @@ -/* COPYRIGHT: See COPYING in the top level directory +/* + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/rtl/image.c * PURPOSE: Image handling functions Modified: trunk/reactos/lib/rtl/largeint.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/largeint.c?rev=661…
============================================================================== --- trunk/reactos/lib/rtl/largeint.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/largeint.c [iso-8859-1] Sun Feb 1 13:33:06 2015 @@ -1,4 +1,5 @@ -/* COPYRIGHT: See COPYING in the top level directory +/* + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/rtl/largeint.c * PURPOSE: Large integer operations Modified: trunk/reactos/lib/rtl/luid.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/luid.c?rev=66138&r…
============================================================================== --- trunk/reactos/lib/rtl/luid.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/luid.c [iso-8859-1] Sun Feb 1 13:33:06 2015 @@ -1,4 +1,5 @@ -/* COPYRIGHT: See COPYING in the top level directory +/* + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * PURPOSE: Locally unique identifier (LUID) helper functions * FILE: lib/rtl/luid.c Modified: trunk/reactos/lib/rtl/mem.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/mem.c?rev=66138&r1…
============================================================================== --- trunk/reactos/lib/rtl/mem.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/mem.c [iso-8859-1] Sun Feb 1 13:33:06 2015 @@ -1,4 +1,5 @@ -/* COPYRIGHT: See COPYING in the top level directory +/* + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/rtl/mem.c * PURPOSE: Memory functions Modified: trunk/reactos/lib/rtl/memstream.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/memstream.c?rev=66…
============================================================================== --- trunk/reactos/lib/rtl/memstream.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/memstream.c [iso-8859-1] Sun Feb 1 13:33:06 2015 @@ -1,4 +1,5 @@ -/* COPYRIGHT: See COPYING in the top level directory +/* + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/rtl/mem.c * PURPOSE: MemoryStream functions Modified: trunk/reactos/lib/rtl/message.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/message.c?rev=6613…
============================================================================== --- trunk/reactos/lib/rtl/message.c [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/message.c [iso-8859-1] Sun Feb 1 13:33:06 2015 @@ -1,4 +1,5 @@ -/* COPYRIGHT: See COPYING in the top level directory +/* + * COPYRIGHT: See COPYING in the top level directory * PROJECT: ReactOS system libraries * FILE: lib/rtl/message.c * PURPOSE: Message table functions Modified: trunk/reactos/lib/rtl/rtl.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/lib/rtl/rtl.h?rev=66138&r1…
============================================================================== --- trunk/reactos/lib/rtl/rtl.h [iso-8859-1] (original) +++ trunk/reactos/lib/rtl/rtl.h [iso-8859-1] Sun Feb 1 13:33:06 2015 @@ -39,6 +39,9 @@ #include <ndk/sefuncs.h> #include <ndk/umfuncs.h> +/* SEH support with PSEH */ +#include <pseh/pseh2.h> + /* Internal RTL header */ #include "rtlp.h" Modified: trunk/reactos/tools/mkhive/cmi.c URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/cmi.c?rev=661…
============================================================================== --- trunk/reactos/tools/mkhive/cmi.c [iso-8859-1] (original) +++ trunk/reactos/tools/mkhive/cmi.c [iso-8859-1] Sun Feb 1 13:33:06 2015 @@ -219,7 +219,7 @@ return Status; } -NTSTATUS +static NTSTATUS CmiCreateSubKey( IN PCMHIVE RegistryHive, IN HCELL_INDEX ParentKeyCellOffset, @@ -363,6 +363,7 @@ return STATUS_SUCCESS; } +#if 0 // Those two functions seem to be unused, but keep them just in case we may need to use them in the future... static BOOLEAN CmiCompareHash( IN PCUNICODE_STRING KeyName, @@ -378,8 +379,7 @@ return (strncmp(Buffer, HashString, 4) == 0); } - -BOOLEAN +static BOOLEAN CmiCompareHashI( IN PCUNICODE_STRING KeyName, IN PCHAR HashString) @@ -393,6 +393,7 @@ return (strncasecmp(Buffer, HashString, 4) == 0); } +#endif NTSTATUS CmiScanForSubKey( Modified: trunk/reactos/tools/mkhive/ntoskrnl.h URL:
http://svn.reactos.org/svn/reactos/trunk/reactos/tools/mkhive/ntoskrnl.h?re…
============================================================================== --- trunk/reactos/tools/mkhive/ntoskrnl.h [iso-8859-1] (original) +++ trunk/reactos/tools/mkhive/ntoskrnl.h [iso-8859-1] Sun Feb 1 13:33:06 2015 @@ -1,10 +1,6 @@ +/* + * This header is used together with cmindex.c and cmname.c + */ + #define NDEBUG #include "mkhive.h" - -PVOID -NTAPI -CmpAllocate( - IN SIZE_T Size, - IN BOOLEAN Paged, - IN ULONG Tag -);
9 years, 10 months
1
0
0
0
← Newer
1
...
34
35
36
37
38
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
Results per page:
10
25
50
100
200