ReactOS  0.4.14-dev-57-g333b8f1
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 */
14 PVOID
16 {
17  return (PVOID)((ULONG_PTR)Va & ~KSEG0_BASE);
18 }
19 
21 PVOID
23 {
24  return (PVOID)((ULONG_PTR)Pa | KSEG0_BASE);
25 }
26 #else
28 PVOID
29 VaToPa(PVOID Va)
30 {
31  return Va;
32 }
33 
35 PVOID
36 PaToVa(PVOID Pa)
37 {
38  return Pa;
39 }
40 #endif
#define KSEG0_BASE
Definition: ketypes.h:273
#define FORCEINLINE
Definition: ntbasedef.h:221
FORCEINLINE PVOID PaToVa(PVOID Pa)
Definition: conversion.h:22
#define ULONG_PTR
Definition: config.h:101
FORCEINLINE PVOID VaToPa(PVOID Va)
Definition: conversion.h:15