ReactOS
0.4.16-dev-533-gc7d1aa3
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 */
13
FORCEINLINE
14
PVOID
15
VaToPa
(
PVOID
Va)
16
{
17
return
(
PVOID
)((
ULONG_PTR
)Va & ~
KSEG0_BASE
);
18
}
19
20
FORCEINLINE
21
PVOID
22
PaToVa
(
PVOID
Pa)
23
{
24
return
(
PVOID
)((
ULONG_PTR
)Pa |
KSEG0_BASE
);
25
}
26
#else
27
FORCEINLINE
28
PVOID
29
VaToPa
(
PVOID
Va)
30
{
31
return
Va;
32
}
33
34
FORCEINLINE
35
PVOID
36
PaToVa
(
PVOID
Pa)
37
{
38
return
Pa;
39
}
40
#endif
VaToPa
FORCEINLINE PVOID VaToPa(PVOID Va)
Definition:
conversion.h:15
PaToVa
FORCEINLINE PVOID PaToVa(PVOID Pa)
Definition:
conversion.h:22
ULONG_PTR
#define ULONG_PTR
Definition:
config.h:101
void
Definition:
nsiface.idl:2307
KSEG0_BASE
#define KSEG0_BASE
Definition:
ketypes.h:360
FORCEINLINE
#define FORCEINLINE
Definition:
wdftypes.h:67
boot
freeldr
freeldr
include
conversion.h
Generated on Sun Jan 19 2025 06:02:49 for ReactOS by
1.9.6