Author: tkreuzer
Date: Sat Jul 2 23:11:06 2011
New Revision: 52507
URL: http://svn.reactos.org/svn/reactos?rev=52507&view=rev
Log:
[NTOSKNRL]
- Change an ASSERT to a KeBugCheck, since the assertion can fail for any invalid memory access and this is not an internal Mm failure.
- Remove 2 cases, that "Should NEVER happen on ARM3!!!", but can very well happen.
- Do NOT make the code cleaner, by releasing the PFN lock in the same function that acquires it, but keep it 2 functions down. This is because it *SHOULD* be that way, since some internal undocumented functions, that we do not implement but that are (theoretically) called from here, also do release the PFN lock. Thanks Alex for explaining this.
Modified:
trunk/reactos/ntoskrnl/mm/ARM3/pagfault.c
Modified: trunk/reactos/ntoskrnl/mm/ARM3/pagfault.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/ntoskrnl/mm/ARM3/pagfault.…
==============================================================================
--- trunk/reactos/ntoskrnl/mm/ARM3/pagfault.c [iso-8859-1] (original)
+++ trunk/reactos/ntoskrnl/mm/ARM3/pagfault.c [iso-8859-1] Sat Jul 2 23:11:06 2011
@@ -583,10 +583,19 @@
}
//
- // The PTE must be invalid, but not totally blank
+ // The PTE must be invalid
//
ASSERT(TempPte.u.Hard.Valid == 0);
- ASSERT(TempPte.u.Long != 0);
+
+ /* Check if the PTE is completely empty */
+ if (TempPte.u.Long == 0)
+ {
+ KeBugCheckEx(PAGE_FAULT_IN_NONPAGED_AREA,
+ (ULONG_PTR)Address,
+ StoreInstruction,
+ (ULONG_PTR)TrapInformation,
+ 2);
+ }
//
// No prototype, transition or page file software PTEs in ARM3 yet
@@ -727,11 +736,6 @@
// Writing to a read-only page (the stuff ARM3 works with is write,
// so again, moot point).
//
- if (StoreInstruction)
- {
- DPRINT1("Should NEVER happen on ARM3!!!\n");
- return STATUS_ACCESS_VIOLATION;
- }
//
// Otherwise, the PDE was probably invalid, and all is good now
@@ -776,11 +780,6 @@
// Writing to a read-only page (the stuff ARM3 works with is write,
// so again, moot point.
//
- if (StoreInstruction)
- {
- DPRINT1("Should NEVER happen on ARM3!!!\n");
- return STATUS_ACCESS_VIOLATION;
- }
/* Release the working set */
MiUnlockWorkingSet(CurrentThread, WorkingSet);
Author: cgutman
Date: Sat Jul 2 22:57:30 2011
New Revision: 52505
URL: http://svn.reactos.org/svn/reactos?rev=52505&view=rev
Log:
[OSKITTCP]
- Remove socket state checks from OskitTCPRecv and OskitTCPSend
- Oskit already returns ESHUTDOWN when sosend is called on a socket with SS_CANTSENDMORE so it is unnecessary
- The check in OskitTCPRecv broke returning success and 0 bytes on a graceful shutdown (We got the FIN, set SS_CANTRCVMORE, signaled the connection, tried to read and failed with ESHUTDOWN instead of succeeding with 0 bytes)
Modified:
trunk/reactos/lib/drivers/oskittcp/oskittcp/interface.c
Modified: trunk/reactos/lib/drivers/oskittcp/oskittcp/interface.c
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/lib/drivers/oskittcp/oskit…
==============================================================================
--- trunk/reactos/lib/drivers/oskittcp/oskittcp/interface.c [iso-8859-1] (original)
+++ trunk/reactos/lib/drivers/oskittcp/oskittcp/interface.c [iso-8859-1] Sat Jul 2 22:57:30 2011
@@ -158,9 +158,6 @@
if (!connection)
return OSK_ESHUTDOWN;
-
- if (so->so_state & SS_CANTRCVMORE)
- return OSK_ESHUTDOWN;
OS_DbgPrint(OSK_MID_TRACE,
("so->so_state %x\n", so->so_state));
@@ -302,9 +299,6 @@
struct iovec iov;
if (!socket)
- return OSK_ESHUTDOWN;
-
- if (so->so_state & SS_CANTSENDMORE)
return OSK_ESHUTDOWN;
iov.iov_len = Len;
Author: tkreuzer
Date: Sat Jul 2 15:08:54 2011
New Revision: 52500
URL: http://svn.reactos.org/svn/reactos?rev=52500&view=rev
Log:
[FAT32]
- Really fix loading the MSVC built kernel, by moving the FAT sector buffer beyond the area for freeldr.sys
- Load segment only in one place
Modified:
trunk/reactos/boot/freeldr/bootsect/fat32.S
Modified: trunk/reactos/boot/freeldr/bootsect/fat32.S
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/boot/freeldr/bootsect/fat3…
==============================================================================
--- trunk/reactos/boot/freeldr/bootsect/fat32.S [iso-8859-1] (original)
+++ trunk/reactos/boot/freeldr/bootsect/fat32.S [iso-8859-1] Sat Jul 2 15:08:54 2011
@@ -153,6 +153,7 @@
// EAX has logical sector number to read
// CX has number of sectors to read
ReadSectors:
+ push es
cmp eax, dword ptr ds:[BiosCHSDriveSize] // Check if they are reading a sector outside CHS range
jae ReadSectorsLBA // Yes - go to the LBA routine
// If at all possible we want to use LBA routines because
@@ -194,13 +195,6 @@
mov dl, byte ptr BP_REL(BootDrive) // Drive number
mov ah, HEX(42) // Int 13h, AH = 42h - Extended Read
int HEX(13) // Call BIOS
-
- /* This code "fixes" loading the MSVC built kernel */
- pushad
- mov si, offset msgNull
- call PutChars
- popad
-
jc PrintDiskError // If the read failed then abort
add sp, 16 // Remove disk address packet from stack
@@ -219,6 +213,7 @@
sub cx, word ptr ds:[LBASectorsRead]
jnz ReadSectorsLBA // Read next sector
+ pop es
ret
LBASectorsRead:
@@ -309,8 +304,6 @@
.ascii "File system error", CR, LF, NUL
msgAnyKey:
.ascii "Press any key to restart", CR, LF, NUL
-msgNull:
- .ascii NUL
.org 509 // Pad to 509 bytes
@@ -473,21 +466,21 @@
LoadFatSector:
push ecx
+
+ mov bx, HEX(9000) // We will load it to [9000:0000h]
+ mov es, bx
+
// EAX holds logical FAT sector number
// Check if we have already loaded it
cmp eax, dword ptr ds:[FatSectorInCache]
je LoadFatSectorAlreadyLoaded
mov dword ptr ds:[FatSectorInCache], eax
- mov bx, HEX(7000)
- mov es, bx
- xor bx, bx // We will load it to [7000:0000h]
+ xor bx, bx
mov cx, 1
call ReadSectors
LoadFatSectorAlreadyLoaded:
- mov bx, HEX(7000)
- mov es, bx
pop ecx
mov eax, dword ptr es:[ecx] // Get FAT entry
and eax, HEX(0fffffff) // Mask off reserved bits