VirtualBox

source: vbox/trunk/src/VBox/VMM/VMMR3/PGMPhysRWTmpl.h@ 55705

Last change on this file since 55705 was 44528, checked in by vboxsync, 12 years ago

header (C) fixes

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 1.7 KB
Line 
1/* $Id: PGMPhysRWTmpl.h 44528 2013-02-04 14:27:54Z vboxsync $ */
2/** @file
3 * PGM - Page Manager and Monitor, Physical Memory Access Template.
4 */
5
6/*
7 * Copyright (C) 2006-2012 Oracle Corporation
8 *
9 * This file is part of VirtualBox Open Source Edition (OSE), as
10 * available from http://www.virtualbox.org. This file is free software;
11 * you can redistribute it and/or modify it under the terms of the GNU
12 * General Public License (GPL) as published by the Free Software
13 * Foundation, in version 2 as it comes in the "COPYING" file of the
14 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
15 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
16 */
17
18
19/**
20 * Read physical memory. (one byte/word/dword)
21 *
22 * This API respects access handlers and MMIO. Use PGMPhysSimpleReadGCPhys() if you
23 * want to ignore those.
24 *
25 * @param pVM Pointer to the VM.
26 * @param GCPhys Physical address start reading from.
27 */
28VMMDECL(PGMPHYS_DATATYPE) PGMPHYSFN_READNAME(PVM pVM, RTGCPHYS GCPhys)
29{
30 Assert(VM_IS_EMT(pVM));
31 PGMPHYS_DATATYPE val;
32 PGMPhysRead(pVM, GCPhys, &val, sizeof(val));
33 return val;
34}
35
36
37/**
38 * Write to physical memory. (one byte/word/dword)
39 *
40 * This API respects access handlers and MMIO. Use PGMPhysSimpleReadGCPhys() if you
41 * want to ignore those.
42 *
43 * @param pVM Pointer to the VM.
44 * @param GCPhys Physical address to write to.
45 * @param val What to write.
46 */
47VMMDECL(void) PGMPHYSFN_WRITENAME(PVM pVM, RTGCPHYS GCPhys, PGMPHYS_DATATYPE val)
48{
49 Assert(VM_IS_EMT(pVM));
50 PGMPhysWrite(pVM, GCPhys, &val, sizeof(val));
51}
52
53#undef PGMPHYSFN_READNAME
54#undef PGMPHYSFN_WRITENAME
55#undef PGMPHYS_DATATYPE
56#undef PGMPHYS_DATASIZE
57
Note: See TracBrowser for help on using the repository browser.

© 2024 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette