mirror of
https://github.com/reactos/reactos.git
synced 2025-08-06 21:03:02 +00:00
[NTOSKRNL]
Fix MSVC and amd64 build svn path=/trunk/; revision=52121
This commit is contained in:
parent
116862c485
commit
63ed94244c
10 changed files with 16 additions and 11 deletions
|
@ -423,7 +423,11 @@ endif()
|
||||||
|
|
||||||
add_executable(ntoskrnl ${SOURCE})
|
add_executable(ntoskrnl ${SOURCE})
|
||||||
|
|
||||||
|
if (ARCH MATCHES i386)
|
||||||
set_entrypoint(ntoskrnl KiSystemStartup@4)
|
set_entrypoint(ntoskrnl KiSystemStartup@4)
|
||||||
|
else()
|
||||||
|
set_entrypoint(ntoskrnl KiSystemStartup)
|
||||||
|
endif()
|
||||||
set_subsystem(ntoskrnl native)
|
set_subsystem(ntoskrnl native)
|
||||||
|
|
||||||
if(MSVC)
|
if(MSVC)
|
||||||
|
|
3
reactos/ntoskrnl/cache/section/io.c
vendored
3
reactos/ntoskrnl/cache/section/io.c
vendored
|
@ -71,9 +71,10 @@ MiSimpleReadComplete
|
||||||
PIRP Irp,
|
PIRP Irp,
|
||||||
PVOID Context)
|
PVOID Context)
|
||||||
{
|
{
|
||||||
|
PMDL Mdl = Irp->MdlAddress;
|
||||||
|
|
||||||
/* Unlock MDL Pages, page 167. */
|
/* Unlock MDL Pages, page 167. */
|
||||||
DPRINT("MiSimpleReadComplete %x\n", Irp);
|
DPRINT("MiSimpleReadComplete %x\n", Irp);
|
||||||
PMDL Mdl = Irp->MdlAddress;
|
|
||||||
while (Mdl)
|
while (Mdl)
|
||||||
{
|
{
|
||||||
DPRINT("MDL Unlock %x\n", Mdl);
|
DPRINT("MDL Unlock %x\n", Mdl);
|
||||||
|
|
|
@ -104,8 +104,6 @@ static __inline__ __attribute__((always_inline)) void __str(unsigned short *Dest
|
||||||
|
|
||||||
#elif defined(_MSC_VER)
|
#elif defined(_MSC_VER)
|
||||||
|
|
||||||
#define UNIMPLEMENTED DbgPrint("%s is unimplemented!!!\n", __FUNCTION__);
|
|
||||||
|
|
||||||
void __lgdt(void *Source);
|
void __lgdt(void *Source);
|
||||||
|
|
||||||
void __sgdt(void *Destination);
|
void __sgdt(void *Destination);
|
||||||
|
|
|
@ -142,6 +142,9 @@ MiIsPdeForAddressValid(PVOID Address)
|
||||||
(MiAddressToPde(Address)->u.Hard.Valid));
|
(MiAddressToPde(Address)->u.Hard.Valid));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#define MiPdeToPte(PDE) ((PMMPTE)MiPteToAddress(PDE))
|
||||||
|
#define MiPteToPde(PTE) ((PMMPDE)MiAddressToPte(PTE))
|
||||||
|
|
||||||
#define ADDR_TO_PAGE_TABLE(v) (((ULONG_PTR)(v)) / (512 * PAGE_SIZE))
|
#define ADDR_TO_PAGE_TABLE(v) (((ULONG_PTR)(v)) / (512 * PAGE_SIZE))
|
||||||
#define ADDR_TO_PDE_OFFSET(v) ((((ULONG_PTR)(v)) / (512 * PAGE_SIZE)))
|
#define ADDR_TO_PDE_OFFSET(v) ((((ULONG_PTR)(v)) / (512 * PAGE_SIZE)))
|
||||||
#define ADDR_TO_PTE_OFFSET(v) ((((ULONG_PTR)(v)) % (512 * PAGE_SIZE)) / PAGE_SIZE)
|
#define ADDR_TO_PTE_OFFSET(v) ((((ULONG_PTR)(v)) % (512 * PAGE_SIZE)) / PAGE_SIZE)
|
||||||
|
|
|
@ -480,7 +480,7 @@ ULONG
|
||||||
ExGetCountFastReference(IN EX_FAST_REF FastRef)
|
ExGetCountFastReference(IN EX_FAST_REF FastRef)
|
||||||
{
|
{
|
||||||
/* Return the reference count */
|
/* Return the reference count */
|
||||||
return FastRef.RefCnt;
|
return (ULONG)FastRef.RefCnt;
|
||||||
}
|
}
|
||||||
|
|
||||||
FORCEINLINE
|
FORCEINLINE
|
||||||
|
|
|
@ -1140,7 +1140,7 @@ MiGetPfnEntry(IN PFN_NUMBER Pfn)
|
||||||
if (Pfn > MmHighestPhysicalPage) return NULL;
|
if (Pfn > MmHighestPhysicalPage) return NULL;
|
||||||
|
|
||||||
/* Make sure this page actually has a PFN entry */
|
/* Make sure this page actually has a PFN entry */
|
||||||
if ((MiPfnBitMap.Buffer) && !(RtlTestBit(&MiPfnBitMap, Pfn))) return NULL;
|
if ((MiPfnBitMap.Buffer) && !(RtlTestBit(&MiPfnBitMap, (ULONG)Pfn))) return NULL;
|
||||||
|
|
||||||
/* Get the entry */
|
/* Get the entry */
|
||||||
Page = &MmPfnDatabase[Pfn];
|
Page = &MmPfnDatabase[Pfn];
|
||||||
|
|
|
@ -17,6 +17,7 @@
|
||||||
#ifdef _M_AMD64
|
#ifdef _M_AMD64
|
||||||
#define IoAllocateAdapterChannel _IoAllocateAdapterChannel
|
#define IoAllocateAdapterChannel _IoAllocateAdapterChannel
|
||||||
#define KeGetCurrentThread _KeGetCurrentThread
|
#define KeGetCurrentThread _KeGetCurrentThread
|
||||||
|
#define RtlFillMemoryUlong _RtlFillMemoryUlong
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/* Version Data */
|
/* Version Data */
|
||||||
|
|
|
@ -8,7 +8,6 @@
|
||||||
/* INCLUDES ******************************************************************/
|
/* INCLUDES ******************************************************************/
|
||||||
|
|
||||||
#include <asm.inc>
|
#include <asm.inc>
|
||||||
|
|
||||||
#include <ksamd64.inc>
|
#include <ksamd64.inc>
|
||||||
|
|
||||||
EXTERN KiInitializeKernelAndGotoIdleLoop:PROC
|
EXTERN KiInitializeKernelAndGotoIdleLoop:PROC
|
||||||
|
@ -19,7 +18,6 @@ EXTERN KiInitializeKernelAndGotoIdleLoop:PROC
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
.code64
|
.code64
|
||||||
.text
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* VOID
|
* VOID
|
||||||
|
|
|
@ -10,7 +10,6 @@
|
||||||
/* INCLUDES ******************************************************************/
|
/* INCLUDES ******************************************************************/
|
||||||
|
|
||||||
#include <asm.inc>
|
#include <asm.inc>
|
||||||
|
|
||||||
#include <ksamd64.inc>
|
#include <ksamd64.inc>
|
||||||
|
|
||||||
/* FUNCTIONS ****************************************************************/
|
/* FUNCTIONS ****************************************************************/
|
||||||
|
@ -166,7 +165,7 @@ KiSwapContext:
|
||||||
mov [rsp+0], rbp
|
mov [rsp+0], rbp
|
||||||
|
|
||||||
/* Get the PCR */
|
/* Get the PCR */
|
||||||
mov rbx, gs:[KPCR_SELF]
|
mov rbx, gs:[PcSelf]
|
||||||
|
|
||||||
/* Get the current thread */
|
/* Get the current thread */
|
||||||
mov rdi, rcx
|
mov rdi, rcx
|
||||||
|
|
|
@ -259,7 +259,6 @@ ENDM
|
||||||
|
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
|
||||||
.text
|
|
||||||
.code64
|
.code64
|
||||||
|
|
||||||
ALIGN 8
|
ALIGN 8
|
||||||
|
@ -907,6 +906,8 @@ PUBLIC KiUnexpectedInterrupt
|
||||||
.ENDP KiUnexpectedInterrupt
|
.ENDP KiUnexpectedInterrupt
|
||||||
|
|
||||||
#ifdef _MSC_VER
|
#ifdef _MSC_VER
|
||||||
|
#undef lgdt
|
||||||
|
#undef lidt
|
||||||
|
|
||||||
//void __lgdt(void *Source);
|
//void __lgdt(void *Source);
|
||||||
PUBLIC __lgdt
|
PUBLIC __lgdt
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue