[ros-diffs] [tkreuzer] 48177: [FREELDR] - In the fat bootsector, don't clobber ax, it contains the number of first cluster of freeldr.sys and is used by the fathelper code. - Fix jump code in the fathelper code, like in the other bootsectors. - Now booting from fat partitions (looks like that's what sysreg does) works again. It's safe under the condition that the cluster size is at least 4352 bytes, which is true for harddisks of sizes bigger than 272MB. Booting from smaller fat disks, like floppy breaks when freeldr.sys gets fragmented, which should rarely happen.
tkreuzer at svn.reactos.org
tkreuzer at svn.reactos.org
Thu Jul 22 03:29:26 UTC 2010
- Previous message: [ros-diffs] [sir_richard] 48176: [NTOS]: MiRosTakeOverPebTebRanges now creates a small ~1MB ARM3 memory range on top of the ReactOS per-process VA. This does a couple of things: First of all, it changes the default PEB address to another static address. Still not dynamic like it will be soon, but at least it changes it a bit so we can test if anything breaks due to that. It also likewise changes the addresses of the TEBs (Shifted down by 1MB, basically). Finally, it blocks off that part of address space, which nobody should be using now, to see if anyone does indeed touch it. [NTOS]: Knowing if this change causes issues will help later in determining regressions due to TEB/PEBs mapped as VADs by ARM3, and regressions simply due to the change in VA layout. [NTOS]: When implemented, the VAD mapping for PEB/TEB will only use that ~1MB, which yes, will limit ReactOS processes to each have only 256 threads. That is obviously a temporary limitation, one I doubt we'll even hit, but I'm putting it out here so you know.
- Next message: [ros-diffs] [tkreuzer] 48178: [NDK] Fix MMADDRESS_NODE and MM_AVL_TABLE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: tkreuzer
Date: Thu Jul 22 03:29:25 2010
New Revision: 48177
URL: http://svn.reactos.org/svn/reactos?rev=48177&view=rev
Log:
[FREELDR]
- In the fat bootsector, don't clobber ax, it contains the number of first cluster of freeldr.sys and is used by the fathelper code.
- Fix jump code in the fathelper code, like in the other bootsectors.
- Now booting from fat partitions (looks like that's what sysreg does) works again. It's safe under the condition that the cluster size is at least 4352 bytes, which is true for harddisks of sizes bigger than 272MB. Booting from smaller fat disks, like floppy breaks when freeldr.sys gets fragmented, which should rarely happen.
Modified:
trunk/reactos/boot/freeldr/bootsect/fat.asm
trunk/reactos/boot/freeldr/freeldr/arch/i386/fathelp.asm
Modified: trunk/reactos/boot/freeldr/bootsect/fat.asm
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/bootsect/fat.asm?rev=48177&r1=48176&r2=48177&view=diff
==============================================================================
--- trunk/reactos/boot/freeldr/bootsect/fat.asm [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/bootsect/fat.asm [iso-8859-1] Thu Jul 22 03:29:25 2010
@@ -208,11 +208,11 @@
; to the helper code. Skip the first three bytes
; because they contain a jump instruction to skip
; over the helper code in the FreeLoader image.
- ;jmp 0000:8003h
+ ;jmp 0000:9003h
push 0 ; push segment (0x0000)
- mov eax, [0x8000 + 0xA8] ; load the RVA of the EntryPoint into eax
- add eax, 0x8003 ; RVA -> VA and skip 3 bytes (jump to fathelper code)
- push ax ; push offset
+ mov bx, [0x8000 + 0xA8] ; load the RVA of the EntryPoint into eax
+ add bx, 0x8003 ; RVA -> VA and skip 3 bytes (jump to fathelper code)
+ push bx ; push offset
retf ; Transfer control to FreeLoader
Modified: trunk/reactos/boot/freeldr/freeldr/arch/i386/fathelp.asm
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/freeldr/arch/i386/fathelp.asm?rev=48177&r1=48176&r2=48177&view=diff
==============================================================================
--- trunk/reactos/boot/freeldr/freeldr/arch/i386/fathelp.asm [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/freeldr/arch/i386/fathelp.asm [iso-8859-1] Thu Jul 22 03:29:25 2010
@@ -125,10 +125,12 @@
LoadFile_Done:
mov dl,BYTE [BYTE bp+BootDrive] ; Load the boot drive into DL
mov dh,[BootPartition] ; Load the boot partition into DH
- push WORD 0x0000
- push WORD 0x8000 ; We will do a far return to 0000:8000h
- retf ; Transfer control to ROSLDR
-
+
+ push 0 ; push segment (0x0000)
+ mov bx, [0x8000 + 0xA8] ; load the RVA of the EntryPoint into eax
+ add bx, 0x8000 ; RVA -> VA and skip 3 bytes (jump to fathelper code)
+ push bx ; push offset
+ retf ; Transfer control to FreeLoader
; Reads the entire FAT into memory at 7000:0000
ReadFatIntoMemory:
- Previous message: [ros-diffs] [sir_richard] 48176: [NTOS]: MiRosTakeOverPebTebRanges now creates a small ~1MB ARM3 memory range on top of the ReactOS per-process VA. This does a couple of things: First of all, it changes the default PEB address to another static address. Still not dynamic like it will be soon, but at least it changes it a bit so we can test if anything breaks due to that. It also likewise changes the addresses of the TEBs (Shifted down by 1MB, basically). Finally, it blocks off that part of address space, which nobody should be using now, to see if anyone does indeed touch it. [NTOS]: Knowing if this change causes issues will help later in determining regressions due to TEB/PEBs mapped as VADs by ARM3, and regressions simply due to the change in VA layout. [NTOS]: When implemented, the VAD mapping for PEB/TEB will only use that ~1MB, which yes, will limit ReactOS processes to each have only 256 threads. That is obviously a temporary limitation, one I doubt we'll even hit, but I'm putting it out here so you know.
- Next message: [ros-diffs] [tkreuzer] 48178: [NDK] Fix MMADDRESS_NODE and MM_AVL_TABLE
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the Ros-diffs
mailing list