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