mirror of
https://github.com/reactos/reactos.git
synced 2025-06-13 04:48:31 +00:00
[HAL]
Fix MSVC / 64 bit warnings svn path=/trunk/; revision=56260
This commit is contained in:
parent
d8e68c8aff
commit
efff43afd5
10 changed files with 317 additions and 317 deletions
|
@ -87,8 +87,8 @@ HalpGetSystemInterruptVector_Acpi(IN ULONG BusNumber,
|
||||||
OUT PKIRQL Irql,
|
OUT PKIRQL Irql,
|
||||||
OUT PKAFFINITY Affinity)
|
OUT PKAFFINITY Affinity)
|
||||||
{
|
{
|
||||||
ULONG Vector = IRQ2VECTOR(BusInterruptLevel);
|
UCHAR Vector = IRQ2VECTOR((UCHAR)BusInterruptLevel);
|
||||||
*Irql = (KIRQL)VECTOR2IRQL(Vector);
|
*Irql = VECTOR2IRQL(Vector);
|
||||||
*Affinity = 0xFFFFFFFF;
|
*Affinity = 0xFFFFFFFF;
|
||||||
return Vector;
|
return Vector;
|
||||||
}
|
}
|
||||||
|
|
|
@ -89,7 +89,7 @@ HalpAcpiCopyBiosTable(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
|
||||||
IN PDESCRIPTION_HEADER TableHeader)
|
IN PDESCRIPTION_HEADER TableHeader)
|
||||||
{
|
{
|
||||||
ULONG Size;
|
ULONG Size;
|
||||||
PFN_NUMBER PageCount;
|
PFN_COUNT PageCount;
|
||||||
PHYSICAL_ADDRESS PhysAddress;
|
PHYSICAL_ADDRESS PhysAddress;
|
||||||
PACPI_CACHED_TABLE CachedTable;
|
PACPI_CACHED_TABLE CachedTable;
|
||||||
PDESCRIPTION_HEADER CopiedTable;
|
PDESCRIPTION_HEADER CopiedTable;
|
||||||
|
@ -153,7 +153,7 @@ HalpAcpiGetTableFromBios(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
|
||||||
ULONG Offset;
|
ULONG Offset;
|
||||||
ULONG EntryCount, CurrentEntry;
|
ULONG EntryCount, CurrentEntry;
|
||||||
PCHAR CurrentByte;
|
PCHAR CurrentByte;
|
||||||
PFN_NUMBER PageCount;
|
PFN_COUNT PageCount;
|
||||||
|
|
||||||
/* Should not query the RSDT/XSDT by itself */
|
/* Should not query the RSDT/XSDT by itself */
|
||||||
if ((Signature == RSDT_SIGNATURE) || (Signature == XSDT_SIGNATURE)) return NULL;
|
if ((Signature == RSDT_SIGNATURE) || (Signature == XSDT_SIGNATURE)) return NULL;
|
||||||
|
@ -404,7 +404,7 @@ NTAPI
|
||||||
HalpAcpiGetTable(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
|
HalpAcpiGetTable(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
|
||||||
IN ULONG Signature)
|
IN ULONG Signature)
|
||||||
{
|
{
|
||||||
PFN_NUMBER PageCount;
|
PFN_COUNT PageCount;
|
||||||
PDESCRIPTION_HEADER TableAddress, BiosCopy;
|
PDESCRIPTION_HEADER TableAddress, BiosCopy;
|
||||||
|
|
||||||
/* See if we have a cached table? */
|
/* See if we have a cached table? */
|
||||||
|
@ -552,7 +552,7 @@ HalpAcpiFindRsdtPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
|
||||||
PCM_PARTIAL_RESOURCE_LIST ResourceList;
|
PCM_PARTIAL_RESOURCE_LIST ResourceList;
|
||||||
PACPI_BIOS_MULTI_NODE NodeData;
|
PACPI_BIOS_MULTI_NODE NodeData;
|
||||||
SIZE_T NodeLength;
|
SIZE_T NodeLength;
|
||||||
PFN_NUMBER PageCount;
|
PFN_COUNT PageCount;
|
||||||
PVOID MappedAddress;
|
PVOID MappedAddress;
|
||||||
PHYSICAL_ADDRESS PhysicalAddress;
|
PHYSICAL_ADDRESS PhysicalAddress;
|
||||||
|
|
||||||
|
@ -607,7 +607,7 @@ HalpAcpiFindRsdtPhase0(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
|
||||||
(NodeData->Count - 1) * sizeof(ACPI_E820_ENTRY);
|
(NodeData->Count - 1) * sizeof(ACPI_E820_ENTRY);
|
||||||
|
|
||||||
/* Convert to pages */
|
/* Convert to pages */
|
||||||
PageCount = BYTES_TO_PAGES(NodeLength);
|
PageCount = (PFN_COUNT)BYTES_TO_PAGES(NodeLength);
|
||||||
|
|
||||||
/* Allocate the memory */
|
/* Allocate the memory */
|
||||||
PhysicalAddress.QuadPart = HalpAllocPhysicalMemory(LoaderBlock,
|
PhysicalAddress.QuadPart = HalpAllocPhysicalMemory(LoaderBlock,
|
||||||
|
|
|
@ -478,7 +478,7 @@ HalpQueryIdPdo(IN PDEVICE_OBJECT DeviceObject,
|
||||||
PWCHAR CurrentId;
|
PWCHAR CurrentId;
|
||||||
WCHAR Id[100];
|
WCHAR Id[100];
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
ULONG Length = 0;
|
SIZE_T Length = 0;
|
||||||
PWCHAR Buffer;
|
PWCHAR Buffer;
|
||||||
|
|
||||||
/* Get the PDO type */
|
/* Get the PDO type */
|
||||||
|
@ -570,7 +570,7 @@ HalpQueryIdFdo(IN PDEVICE_OBJECT DeviceObject,
|
||||||
OUT PUSHORT *BusQueryId)
|
OUT PUSHORT *BusQueryId)
|
||||||
{
|
{
|
||||||
NTSTATUS Status;
|
NTSTATUS Status;
|
||||||
ULONG Length;
|
SIZE_T Length;
|
||||||
PWCHAR Id;
|
PWCHAR Id;
|
||||||
PWCHAR Buffer;
|
PWCHAR Buffer;
|
||||||
|
|
||||||
|
|
|
@ -309,7 +309,7 @@ HalpGrowMapBuffers(IN PADAPTER_OBJECT AdapterObject,
|
||||||
}
|
}
|
||||||
|
|
||||||
RtlClearBit(AdapterObject->MapRegisters,
|
RtlClearBit(AdapterObject->MapRegisters,
|
||||||
CurrentEntry - AdapterObject->MapRegisterBase);
|
(ULONG)(CurrentEntry - AdapterObject->MapRegisterBase));
|
||||||
CurrentEntry->VirtualAddress = VirtualAddress;
|
CurrentEntry->VirtualAddress = VirtualAddress;
|
||||||
CurrentEntry->PhysicalAddress = PhysicalAddress;
|
CurrentEntry->PhysicalAddress = PhysicalAddress;
|
||||||
|
|
||||||
|
@ -1547,7 +1547,7 @@ IoFreeMapRegisters(IN PADAPTER_OBJECT AdapterObject,
|
||||||
|
|
||||||
RealMapRegisterBase = (PROS_MAP_REGISTER_ENTRY)((ULONG_PTR)MapRegisterBase & ~MAP_BASE_SW_SG);
|
RealMapRegisterBase = (PROS_MAP_REGISTER_ENTRY)((ULONG_PTR)MapRegisterBase & ~MAP_BASE_SW_SG);
|
||||||
RtlClearBits(MasterAdapter->MapRegisters,
|
RtlClearBits(MasterAdapter->MapRegisters,
|
||||||
RealMapRegisterBase - MasterAdapter->MapRegisterBase,
|
(ULONG)(RealMapRegisterBase - MasterAdapter->MapRegisterBase),
|
||||||
NumberOfMapRegisters);
|
NumberOfMapRegisters);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -1593,8 +1593,8 @@ IoFreeMapRegisters(IN PADAPTER_OBJECT AdapterObject,
|
||||||
{
|
{
|
||||||
KeAcquireSpinLock(&MasterAdapter->SpinLock, &OldIrql);
|
KeAcquireSpinLock(&MasterAdapter->SpinLock, &OldIrql);
|
||||||
RtlClearBits(MasterAdapter->MapRegisters,
|
RtlClearBits(MasterAdapter->MapRegisters,
|
||||||
AdapterObject->MapRegisterBase -
|
(ULONG)(AdapterObject->MapRegisterBase -
|
||||||
MasterAdapter->MapRegisterBase,
|
MasterAdapter->MapRegisterBase),
|
||||||
AdapterObject->NumberOfMapRegisters);
|
AdapterObject->NumberOfMapRegisters);
|
||||||
KeReleaseSpinLock(&MasterAdapter->SpinLock, OldIrql);
|
KeReleaseSpinLock(&MasterAdapter->SpinLock, OldIrql);
|
||||||
}
|
}
|
||||||
|
|
|
@ -31,9 +31,9 @@ HalpAllocPhysicalMemory(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
|
||||||
IN PFN_NUMBER PageCount,
|
IN PFN_NUMBER PageCount,
|
||||||
IN BOOLEAN Aligned)
|
IN BOOLEAN Aligned)
|
||||||
{
|
{
|
||||||
ULONG UsedDescriptors, Alignment;
|
ULONG UsedDescriptors;
|
||||||
ULONG_PTR PhysicalAddress;
|
ULONG_PTR PhysicalAddress;
|
||||||
PFN_NUMBER MaxPage, BasePage;
|
PFN_NUMBER MaxPage, BasePage, Alignment;
|
||||||
PLIST_ENTRY NextEntry;
|
PLIST_ENTRY NextEntry;
|
||||||
PMEMORY_ALLOCATION_DESCRIPTOR MdBlock, NewBlock, FreeBlock;
|
PMEMORY_ALLOCATION_DESCRIPTOR MdBlock, NewBlock, FreeBlock;
|
||||||
|
|
||||||
|
@ -139,7 +139,7 @@ HalpAllocPhysicalMemory(IN PLOADER_PARAMETER_BLOCK LoaderBlock,
|
||||||
PVOID
|
PVOID
|
||||||
NTAPI
|
NTAPI
|
||||||
HalpMapPhysicalMemory64(IN PHYSICAL_ADDRESS PhysicalAddress,
|
HalpMapPhysicalMemory64(IN PHYSICAL_ADDRESS PhysicalAddress,
|
||||||
IN PFN_NUMBER PageCount)
|
IN PFN_COUNT PageCount)
|
||||||
{
|
{
|
||||||
PHARDWARE_PTE PointerPte;
|
PHARDWARE_PTE PointerPte;
|
||||||
PFN_NUMBER UsedPages = 0;
|
PFN_NUMBER UsedPages = 0;
|
||||||
|
@ -207,7 +207,7 @@ HalpMapPhysicalMemory64(IN PHYSICAL_ADDRESS PhysicalAddress,
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
HalpUnmapVirtualAddress(IN PVOID VirtualAddress,
|
HalpUnmapVirtualAddress(IN PVOID VirtualAddress,
|
||||||
IN PFN_NUMBER PageCount)
|
IN PFN_COUNT PageCount)
|
||||||
{
|
{
|
||||||
PHARDWARE_PTE PointerPte;
|
PHARDWARE_PTE PointerPte;
|
||||||
ULONG i;
|
ULONG i;
|
||||||
|
|
|
@ -157,7 +157,7 @@ VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
HalpFlushTLB(VOID)
|
HalpFlushTLB(VOID)
|
||||||
{
|
{
|
||||||
ULONG Flags, Cr4;
|
ULONG_PTR Flags, Cr4;
|
||||||
INT CpuInfo[4];
|
INT CpuInfo[4];
|
||||||
ULONG_PTR PageDirectory;
|
ULONG_PTR PageDirectory;
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
/* GLOBALS *******************************************************************/
|
/* GLOBALS *******************************************************************/
|
||||||
|
|
||||||
ULONG HalpSystemHardwareFlags;
|
ULONG_PTR HalpSystemHardwareFlags;
|
||||||
KSPIN_LOCK HalpSystemHardwareLock;
|
KSPIN_LOCK HalpSystemHardwareLock;
|
||||||
|
|
||||||
/* FUNCTIONS *****************************************************************/
|
/* FUNCTIONS *****************************************************************/
|
||||||
|
@ -226,7 +226,7 @@ VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
HalpAcquireCmosSpinLock(VOID)
|
HalpAcquireCmosSpinLock(VOID)
|
||||||
{
|
{
|
||||||
ULONG Flags;
|
ULONG_PTR Flags;
|
||||||
|
|
||||||
/* Get flags and disable interrupts */
|
/* Get flags and disable interrupts */
|
||||||
Flags = __readeflags();
|
Flags = __readeflags();
|
||||||
|
@ -243,7 +243,7 @@ VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
HalpReleaseCmosSpinLock(VOID)
|
HalpReleaseCmosSpinLock(VOID)
|
||||||
{
|
{
|
||||||
ULONG Flags;
|
ULONG_PTR Flags;
|
||||||
|
|
||||||
/* Get the flags */
|
/* Get the flags */
|
||||||
Flags = HalpSystemHardwareFlags;
|
Flags = HalpSystemHardwareFlags;
|
||||||
|
|
|
@ -228,7 +228,7 @@ HalpReportResourceUsage(IN PUNICODE_STRING HalName,
|
||||||
if (KdComPortInUse)
|
if (KdComPortInUse)
|
||||||
{
|
{
|
||||||
/* Enter it into the I/O space */
|
/* Enter it into the I/O space */
|
||||||
HalpComIoSpace.Element[0].Start = (ULONG_PTR)KdComPortInUse;
|
HalpComIoSpace.Element[0].Start = PtrToUlong(KdComPortInUse);
|
||||||
HalpComIoSpace.Next = HalpAddressUsageList;
|
HalpComIoSpace.Next = HalpAddressUsageList;
|
||||||
HalpAddressUsageList = &HalpComIoSpace;
|
HalpAddressUsageList = &HalpComIoSpace;
|
||||||
|
|
||||||
|
@ -402,7 +402,7 @@ HalpReportResourceUsage(IN PUNICODE_STRING HalName,
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Get the final list of the size for the kernel call later */
|
/* Get the final list of the size for the kernel call later */
|
||||||
ListSize = (ULONG_PTR)CurrentRaw - (ULONG_PTR)RawList;
|
ListSize = (ULONG)((ULONG_PTR)CurrentRaw - (ULONG_PTR)RawList);
|
||||||
|
|
||||||
/* Now reset back to the first full descriptor */
|
/* Now reset back to the first full descriptor */
|
||||||
RawFull = RawList->List;
|
RawFull = RawList->List;
|
||||||
|
|
|
@ -652,14 +652,14 @@ PVOID
|
||||||
NTAPI
|
NTAPI
|
||||||
HalpMapPhysicalMemory64(
|
HalpMapPhysicalMemory64(
|
||||||
IN PHYSICAL_ADDRESS PhysicalAddress,
|
IN PHYSICAL_ADDRESS PhysicalAddress,
|
||||||
IN PFN_NUMBER PageCount
|
IN PFN_COUNT PageCount
|
||||||
);
|
);
|
||||||
|
|
||||||
VOID
|
VOID
|
||||||
NTAPI
|
NTAPI
|
||||||
HalpUnmapVirtualAddress(
|
HalpUnmapVirtualAddress(
|
||||||
IN PVOID VirtualAddress,
|
IN PVOID VirtualAddress,
|
||||||
IN PFN_NUMBER NumberPages
|
IN PFN_COUNT NumberPages
|
||||||
);
|
);
|
||||||
|
|
||||||
/* sysinfo.c */
|
/* sysinfo.c */
|
||||||
|
@ -846,7 +846,7 @@ HalpInitProcessor(
|
||||||
#define KfLowerIrql KeLowerIrql
|
#define KfLowerIrql KeLowerIrql
|
||||||
#define KiEnterInterruptTrap(TrapFrame) /* We do all neccessary in asm code */
|
#define KiEnterInterruptTrap(TrapFrame) /* We do all neccessary in asm code */
|
||||||
#define KiEoiHelper(TrapFrame) return /* Just return to the caller */
|
#define KiEoiHelper(TrapFrame) return /* Just return to the caller */
|
||||||
#define HalBeginSystemInterrupt(Irql, Vector, OldIrql) TRUE
|
#define HalBeginSystemInterrupt(Irql, Vector, OldIrql) ((*(OldIrql) = PASSIVE_LEVEL), TRUE)
|
||||||
#ifndef CONFIG_SMP
|
#ifndef CONFIG_SMP
|
||||||
/* On UP builds, spinlocks don't exist at IRQL >= DISPATCH */
|
/* On UP builds, spinlocks don't exist at IRQL >= DISPATCH */
|
||||||
#define KiAcquireSpinLock(SpinLock)
|
#define KiAcquireSpinLock(SpinLock)
|
||||||
|
|
|
@ -709,7 +709,7 @@ HalpAssignPCISlotResources(IN PBUS_HANDLER BusHandler,
|
||||||
{
|
{
|
||||||
PCI_COMMON_CONFIG PciConfig;
|
PCI_COMMON_CONFIG PciConfig;
|
||||||
SIZE_T Address;
|
SIZE_T Address;
|
||||||
SIZE_T ResourceCount;
|
ULONG ResourceCount;
|
||||||
ULONG Size[PCI_TYPE0_ADDRESSES];
|
ULONG Size[PCI_TYPE0_ADDRESSES];
|
||||||
NTSTATUS Status = STATUS_SUCCESS;
|
NTSTATUS Status = STATUS_SUCCESS;
|
||||||
UCHAR Offset;
|
UCHAR Offset;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue