Commit Graph
39747 Commits
Author SHA1 Message Date
Timo Kreuzer 60bf8d9cd4 Implement "portable" SList code for 64 bit
svn path=/branches/ros-amd64-bringup/; revision=44296
2009-11-27 17:37:07 +00:00
Timo Kreuzer a3ec73cfaf Some more fixes for RtlInterlockedPopEntrySList and RtlInterlockedPushEntrySList
svn path=/branches/ros-amd64-bringup/; revision=44295
2009-11-27 17:30:25 +00:00
Timo Kreuzer 892c213bdc Fix SLIST_ENTRY for WIN64
svn path=/branches/ros-amd64-bringup/; revision=44294
2009-11-27 17:23:05 +00:00
Timo Kreuzer 644d3aee30 - Don't use a pointer to SINGLE_LIST_ENTRY as parameter for InterlockedPushEntrySList. It's not the same as SLIST_ENTRY!
svn path=/branches/ros-amd64-bringup/; revision=44293
2009-11-27 17:06:54 +00:00
Timo Kreuzer ba13b6786a - rewrite the completely broken RtlInterlockedPopEntrySList, implement RtlInterlockedPushEntrySList, RtlInterlockedFlushSList
- use these for ExpInterlocked*
- remove a bunch of Interlocked* functions from amd64 kernel exports

svn path=/branches/ros-amd64-bringup/; revision=44289
2009-11-26 22:40:07 +00:00
Timo Kreuzer a78c631dcd SeCaptureSecurityDescriptor: instead of first copying the relative offsets of a SECURITY_DESCRIPTOR_RELATIVE into the pointer fields of a SECURITY_DESCRIPTOR and later adding the base pointer, do it directly as the code already needs to handle relative and absolute structures differently before.
svn path=/branches/ros-amd64-bringup/; revision=44276
2009-11-23 21:52:18 +00:00
Timo Kreuzer c6aa60e093 Mm64BitPhysicalAddress is a BOOLEAN, not a PBOOLEAN
svn path=/branches/ros-amd64-bringup/; revision=44274
2009-11-23 20:44:21 +00:00
Timo Kreuzer 7ccba78dc7 Remove some useless code.
svn path=/branches/ros-amd64-bringup/; revision=44270
2009-11-22 21:10:06 +00:00
Timo Kreuzer aae3e9fba5 [MM]
Don't acquire the pfn lock before calling MmReleasePageMemoryConsumer. The function acquires it already and before that it acquires a different spinlock, leading to a race condition on SMP systems.

svn path=/branches/ros-amd64-bringup/; revision=44269
2009-11-22 20:33:49 +00:00
Timo Kreuzer a504eda297 [MM]
Use an array of PFN_NUMBER to pass to MiMapPagesToZeroInHyperSpace instead of MMPFNs which were then converted to PFN_NUMBERs.

svn path=/branches/ros-amd64-bringup/; revision=44268
2009-11-22 19:16:50 +00:00
Timo Kreuzer 7ae6f1e2be ULONG -> ULONG_PTR
svn path=/branches/ros-amd64-bringup/; revision=44259
2009-11-21 15:56:05 +00:00
Timo Kreuzer 66fbb30e23 - MmArmAccessFault: Don't assume that PDE's are accessible, instead use MiIsPdeForAddressValid
- Use HYPER_SPACE_END / MI_PFN_DATABASE constants instead of hardcoded values
- Remove the MmAccessFault hack, it works now.

svn path=/branches/ros-amd64-bringup/; revision=44258
2009-11-21 15:52:28 +00:00
Timo Kreuzer 5374d2c307 PFN_TYPE -> PFN_NUMBER
svn path=/branches/ros-amd64-bringup/; revision=44257
2009-11-21 15:43:26 +00:00
Timo Kreuzer 22b47450d3 - Update MMPFN for WIN64
svn path=/branches/ros-amd64-bringup/; revision=44256
2009-11-21 15:28:14 +00:00
Timo Kreuzer 84c2495bb9 [MM]
Implement MiBuildPagedPool. Refactor MmArmInitSystem. Use a hardcoded address for the PFN database, this might not be identical to windows, but it makes things simpler and there's no real point in dynamically putting it below the non paged pool. Use a global MxPhase to decide whether to do early page allocations using MxAllocEarlyPage or use MmAllocPage in phase 1. Paged pool allocations work now, but the page fault isn't handled yet.

svn path=/branches/ros-amd64-bringup/; revision=44229
2009-11-18 21:35:14 +00:00
Timo Kreuzer 84c574f9fe [MM]
Don't assume 1024 PTEs per page, instead use PTE_PER_PAGE constant.

svn path=/branches/ros-amd64-bringup/; revision=44228
2009-11-18 21:20:09 +00:00
Timo Kreuzer d4bcf7f0d7 [MM]
Overall code improvements.

svn path=/branches/ros-amd64-bringup/; revision=44222
2009-11-17 19:30:35 +00:00
Timo Kreuzer 7ee161e3b5 Ammendment to r44220
svn path=/branches/ros-amd64-bringup/; revision=44221
2009-11-17 19:25:19 +00:00
Timo Kreuzer 4c52a315f1 [MM]
- MmCreateMemoryArea: the area type is a bitfield rather than an enum so use %lx instead of %ld to DPRINT it, add 2 more DPRINTs on failure
- MiInitSystemMemoryAreas: fix calculation of memory area sizes for 64 bit

svn path=/branches/ros-amd64-bringup/; revision=44220
2009-11-17 19:22:55 +00:00
Timo Kreuzer 94571497d9 Remove unused variable.
svn path=/branches/ros-amd64-bringup/; revision=44219
2009-11-17 19:11:12 +00:00
Timo Kreuzer 85a6488b56 Create a better definition of C_ASSERT to avoid multiple definition errors caused by included files.
svn path=/branches/ros-amd64-bringup/; revision=44218
2009-11-17 19:09:38 +00:00
Timo Kreuzer 584007b6f6 [MM]
- Implement the rest of MmArmInitSystem phase 1 except MiBuildPagedPool

svn path=/branches/ros-amd64-bringup/; revision=44207
2009-11-16 22:12:36 +00:00
Timo Kreuzer 60e68cd411 add 64 bit POOL_HEADER, to make pool allocations work here, too
svn path=/branches/ros-amd64-bringup/; revision=44206
2009-11-16 22:03:30 +00:00
Timo Kreuzer 78ea6134bb - add BAUDRATE=115000 to boot command line
- Improve the code in wlmemory.c, no real functional change


svn path=/branches/ros-amd64-bringup/; revision=44205
2009-11-16 21:56:29 +00:00
Timo Kreuzer bbc5790f22 On amd64 the NextEntry member of MMPTE_LIST has 32 bits, but 36 would be required to cover the whole pte space. Therefore use MmSystemPtesStart[SystemPtePoolType] as base for the pfn linked list instead of MmSystemPteBase, which is set to PTE_BASE.
svn path=/branches/ros-amd64-bringup/; revision=44204
2009-11-16 19:35:36 +00:00
Timo Kreuzer a6656cbfae Add some debugging code
svn path=/branches/ros-amd64-bringup/; revision=44179
2009-11-15 20:28:38 +00:00
Timo Kreuzer a5a0c47af3 Fix definition of _CONTEXT. It was defining EFlags as USHORT, this caused the upper 2 bytes being left randomly when the context was initialized from the trap frame on exceptions. And as soon as the VM bits was set, everything went nots.
svn path=/branches/ros-amd64-bringup/; revision=44178
2009-11-15 20:18:34 +00:00
Timo Kreuzer 5eb72addd0 - Get rid of the MmGlobalKernelPageDirectory hack. It's not going to be used on amd64. Instead set up a total of 256 (1MB) shared PDPs in the PML4.
- Partly implement phase 1 of MmArmInitSystem
- Fix MiPteToAddress
- Fix MmSystemRangeStart

svn path=/branches/ros-amd64-bringup/; revision=44174
2009-11-15 16:10:52 +00:00
Timo Kreuzer 36c73e8aee Don't truncate MI_MAPPING_RANGE_START to ULONG
svn path=/branches/ros-amd64-bringup/; revision=44156
2009-11-14 14:49:50 +00:00
Timo Kreuzer a181e0135a Pass pointers to MiAddressToPte instead of integer
svn path=/branches/ros-amd64-bringup/; revision=44155
2009-11-14 14:45:30 +00:00
Timo Kreuzer 09feec648d - Remove old debugging code from MiArmInitializePageTable
- Fix mapping in MiArmPreparePfnDatabse
We now reach phase 1 of MmArmInitSystem

svn path=/branches/ros-amd64-bringup/; revision=44148
2009-11-14 04:15:21 +00:00
Timo Kreuzer aa646f4618 The freelist code is an increadible hack. It #defines structure members to other structure members and misuses them. Try to improve the hack by declaring PHYSICAL_PAGE as a unioun of MMPFN and the stuff that is used in the freelist code. Exchange the positions of RmapListHead with MapCount as the former must be pointer sized. More work is required here.
svn path=/branches/ros-amd64-bringup/; revision=44147
2009-11-14 04:08:54 +00:00
Timo Kreuzer d25b422abb fix x86 build
svn path=/branches/ros-amd64-bringup/; revision=44146
2009-11-14 02:11:01 +00:00
Timo Kreuzer dd9ed9ea92 - Share some more inline functions between the kernel and freeldr
- Use __ltr instead of Ke386SetTr
- refactor KiInitializeTss
- Update some Mm conatnts
- Halfplement KeFlushEntireTb
- Clean the mapping of page 0 in KiSystemStartup, as long as we don't clean mappings in freeldr
- Fix a serious bug in KiPageFault, where ebp was used instead of rbp, resulting in recursive page faults as soon as usermode mappings were cleared
- Refactor MmArmInitSystem and related. Pahse 0 initialisation completes here now. we fail later in freelist setup code, which is not 64 bit safe.

svn path=/branches/ros-amd64-bringup/; revision=44144
2009-11-13 23:30:44 +00:00
Timo Kreuzer bb7f766eff Initialize MmDebugPte from MiDebugMapping variable instead of using MiAddressToPte for a constant initializer. This way the page can be set dynamically. Use MmDebugPte to determine if ready for mapping physical pages.
svn path=/branches/ros-amd64-bringup/; revision=44143
2009-11-13 23:23:53 +00:00
Timo Kreuzer e9a4673307 Convert KdpDprintf to conditional KDDBGPRINT macros to stop spamming WinDbg on invalid addresses.
svn path=/branches/ros-amd64-bringup/; revision=44134
2009-11-13 14:29:39 +00:00
Samuel Serapion db4d913635 - Enable telnet, and tftpd.
- re-add some missing ntdll exports.
- export ctime64, its available.

svn path=/branches/ros-amd64-bringup/; revision=44125
2009-11-13 09:30:39 +00:00
Samuel Serapion 321196255a - re-add explorer (old one) to build, it builds.
- use amd64 specific manifest file.
- still not a valid exe according to windows 7

svn path=/branches/ros-amd64-bringup/; revision=44124
2009-11-13 09:24:35 +00:00
Timo Kreuzer 2c2f893be1 fix a typo
svn path=/branches/ros-amd64-bringup/; revision=44123
2009-11-13 02:16:15 +00:00
Timo Kreuzer 2e92cb2a4c Use the kernel mode address for the gdt/idt
svn path=/branches/ros-amd64-bringup/; revision=44095
2009-11-11 04:29:05 +00:00
Timo Kreuzer d3d5631e62 - Correct implementations of MiAddressToP*e() would help a bit... implement them as inline functions.
svn path=/branches/ros-amd64-bringup/; revision=44088
2009-11-11 01:53:48 +00:00
Timo Kreuzer a501510763 [MM]
Implement MmIsAddressValid for amd64.

svn path=/branches/ros-amd64-bringup/; revision=44073
2009-11-10 04:19:43 +00:00
Timo Kreuzer 81a17fc8f4 add missing file
svn path=/branches/ros-amd64-bringup/; revision=44072
2009-11-10 03:36:57 +00:00
Timo Kreuzer 14914c99db fix build of ntoskrnl
svn path=/branches/ros-amd64-bringup/; revision=44071
2009-11-10 03:30:58 +00:00
Timo Kreuzer 843b9ee1eb Merge trunk HEAD (r44067)
svn path=/branches/ros-amd64-bringup/; revision=44069
2009-11-10 02:40:48 +00:00
Timo Kreuzer 82c97ac922 [MM]
- Fix MiAddressToP*e macros
- move miarm constants
- set MmPfnDatabase address
- fix PageCount for pfn database mapping (round up)

svn path=/branches/ros-amd64-bringup/; revision=44067
2009-11-10 00:54:46 +00:00
Timo Kreuzer c203c7f36c don't anable interrupts as long as that's all broken, this way we make it a bit further...
svn path=/branches/ros-amd64-bringup/; revision=44066
2009-11-10 00:50:27 +00:00
Timo Kreuzer c9f7c2317c Use LoaderMemoryData instead of LoaderSpecialMemory for page tables
svn path=/branches/ros-amd64-bringup/; revision=44065
2009-11-10 00:48:09 +00:00
Timo Kreuzer 67918b7bd5 [KE]
- implement KiPageFault

svn path=/branches/ros-amd64-bringup/; revision=44064
2009-11-09 23:37:54 +00:00
Stefan Ginsberg b4835e6bad - Add KCALLOUT_FRAME to define the kernel callback stack layout during user mode callbacks. Define the NextCallback and FramePointer members of the debugger data block more portably with this.
- AMD64's is a copy of x86's to match asm.h's the assembly offsets. ARM's is a stub containing two necessary members to have some offsets for the debugger data block.
- Add ARM stub for KiCallUserMode as this is referenced from the debugger data block.

svn path=/trunk/; revision=44063
2009-11-09 23:19:03 +00:00