ReactOS 0.4.15-dev-6669-g8227c5d
conversion.h
Go to the documentation of this file.
1/*
2 * PROJECT: EFI Windows Loader
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: boot/freeldr/freeldr/windows/conversion.c
5 * PURPOSE: Physical <-> Virtual addressing mode conversions (arch-specific)
6 * PROGRAMMERS: Aleksey Bragin (aleksey@reactos.org)
7 */
8
9#pragma once
10
11#ifndef _ZOOM2_
12/* Arch-specific addresses translation implementation */
16{
17 return (PVOID)((ULONG_PTR)Va & ~KSEG0_BASE);
18}
19
23{
24 return (PVOID)((ULONG_PTR)Pa | KSEG0_BASE);
25}
26#else
29VaToPa(PVOID Va)
30{
31 return Va;
32}
33
36PaToVa(PVOID Pa)
37{
38 return Pa;
39}
40#endif
FORCEINLINE PVOID VaToPa(PVOID Va)
Definition: conversion.h:15
FORCEINLINE PVOID PaToVa(PVOID Pa)
Definition: conversion.h:22
#define ULONG_PTR
Definition: config.h:101
#define KSEG0_BASE
Definition: ketypes.h:278
#define FORCEINLINE
Definition: wdftypes.h:67