VirtualBox

source: vbox/trunk/include/VBox/pdmapi.h@ 12975

Last change on this file since 12975 was 12975, checked in by vboxsync, 16 years ago

#1865: PDMLdr.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Id
File size: 5.8 KB
Line 
1/** @file
2 * PDM - Pluggable Device Manager, Core API.
3 *
4 * The 'Core API' has been put in a different header because everyone
5 * is currently including pdm.h. So, pdm.h is for including all of the
6 * PDM stuff, while pdmapi.h is for the core stuff.
7 */
8
9/*
10 * Copyright (C) 2006-2007 Sun Microsystems, Inc.
11 *
12 * This file is part of VirtualBox Open Source Edition (OSE), as
13 * available from http://www.virtualbox.org. This file is free software;
14 * you can redistribute it and/or modify it under the terms of the GNU
15 * General Public License (GPL) as published by the Free Software
16 * Foundation, in version 2 as it comes in the "COPYING" file of the
17 * VirtualBox OSE distribution. VirtualBox OSE is distributed in the
18 * hope that it will be useful, but WITHOUT ANY WARRANTY of any kind.
19 *
20 * The contents of this file may alternatively be used under the terms
21 * of the Common Development and Distribution License Version 1.0
22 * (CDDL) only, as it comes in the "COPYING.CDDL" file of the
23 * VirtualBox OSE distribution, in which case the provisions of the
24 * CDDL are applicable instead of those of the GPL.
25 *
26 * You may elect to license modified versions of this file under the
27 * terms and conditions of either the GPL or the CDDL or both.
28 *
29 * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa
30 * Clara, CA 95054 USA or visit http://www.sun.com if you need
31 * additional information or have any questions.
32 */
33
34#ifndef ___VBox_pdmapi_h
35#define ___VBox_pdmapi_h
36
37#include <VBox/types.h>
38
39__BEGIN_DECLS
40
41/** @defgroup grp_pdm The Pluggable Device Manager API
42 * @{
43 */
44
45PDMDECL(int) PDMGetInterrupt(PVM pVM, uint8_t *pu8Interrupt);
46PDMDECL(int) PDMIsaSetIrq(PVM pVM, uint8_t u8Irq, uint8_t u8Level);
47PDMDECL(int) PDMIoApicSetIrq(PVM pVM, uint8_t u8Irq, uint8_t u8Level);
48PDMDECL(int) PDMApicHasPendingIrq(PVM pVM, bool *pfPending);
49PDMDECL(int) PDMApicSetBase(PVM pVM, uint64_t u64Base);
50PDMDECL(int) PDMApicGetBase(PVM pVM, uint64_t *pu64Base);
51PDMDECL(int) PDMApicSetTPR(PVM pVM, uint8_t u8TPR);
52PDMDECL(int) PDMApicGetTPR(PVM pVM, uint8_t *pu8TPR, bool *pfPending);
53PDMDECL(int) PDMVMMDevHeapR3ToGCPhys(PVM pVM, RTR3PTR pv, RTGCPHYS *pGCPhys);
54
55#ifdef IN_RING3
56/** @defgroup grp_pdm_r3 The PDM Host Context Ring-3 API
57 * @ingroup grp_pdm
58 * @{
59 */
60
61PDMR3DECL(int) PDMR3InitUVM(PUVM pUVM);
62PDMR3DECL(int) PDMR3LdrLoadVMMR0U(PUVM pUVM);
63PDMR3DECL(int) PDMR3Init(PVM pVM);
64PDMR3DECL(void) PDMR3PowerOn(PVM pVM);
65PDMR3DECL(void) PDMR3Reset(PVM pVM);
66PDMR3DECL(void) PDMR3Suspend(PVM pVM);
67PDMR3DECL(void) PDMR3Resume(PVM pVM);
68PDMR3DECL(void) PDMR3PowerOff(PVM pVM);
69PDMR3DECL(void) PDMR3Relocate(PVM pVM, RTGCINTPTR offDelta);
70PDMR3DECL(int) PDMR3Term(PVM pVM);
71PDMR3DECL(void) PDMR3TermUVM(PUVM pUVM);
72
73/**
74 * Module enumeration callback function.
75 *
76 * @returns VBox status.
77 * Failure will stop the search and return the return code.
78 * Warnings will be ignored and not returned.
79 * @param pVM VM Handle.
80 * @param pszFilename Module filename.
81 * @param pszName Module name. (short and unique)
82 * @param ImageBase Address where to executable image is loaded.
83 * @param cbImage Size of the executable image.
84 * @param fGC Set if guest context, clear if host context.
85 * @param pvArg User argument.
86 */
87typedef DECLCALLBACK(int) FNPDMR3ENUM(PVM pVM, const char *pszFilename, const char *pszName, RTUINTPTR ImageBase, size_t cbImage, bool fGC);
88/** Pointer to a FNPDMR3ENUM() function. */
89typedef FNPDMR3ENUM *PFNPDMR3ENUM;
90PDMR3DECL(int) PDMR3LdrEnumModules(PVM pVM, PFNPDMR3ENUM pfnCallback, void *pvArg);
91PDMR3DECL(void) PDMR3LdrRelocateU(PUVM pUVM, RTGCINTPTR offDelta);
92PDMR3DECL(int) PDMR3LdrGetSymbolR3(PVM pVM, const char *pszModule, const char *pszSymbol, void **ppvValue);
93PDMR3DECL(int) PDMR3LdrGetSymbolR0(PVM pVM, const char *pszModule, const char *pszSymbol, PRTR0PTR ppvValue);
94PDMR3DECL(int) PDMR3LdrGetSymbolR0Lazy(PVM pVM, const char *pszModule, const char *pszSymbol, PRTR0PTR ppvValue);
95PDMR3DECL(int) PDMR3LdrLoadRC(PVM pVM, const char *pszFilename, const char *pszName);
96PDMR3DECL(int) PDMR3LdrGetSymbolRC(PVM pVM, const char *pszModule, const char *pszSymbol, PRTRCPTR pRCPtrValue);
97PDMR3DECL(int) PDMR3LdrGetSymbolRCLazy(PVM pVM, const char *pszModule, const char *pszSymbol, PRTRCPTR pRCPtrValue);
98PDMR3DECL(int) PDMR3LdrQueryRCModFromPC(PVM pVM, RTRCPTR uPC,
99 char *pszModName, size_t cchModName, PRTRCPTR pMod,
100 char *pszNearSym1, size_t cchNearSym1, PRTRCPTR pNearSym1,
101 char *pszNearSym2, size_t cchNearSym2, PRTRCPTR pNearSym2);
102
103PDMR3DECL(int) PDMR3QueryDevice(PVM pVM, const char *pszDevice, unsigned iInstance, PPPDMIBASE ppBase);
104PDMR3DECL(int) PDMR3QueryDeviceLun(PVM pVM, const char *pszDevice, unsigned iInstance, unsigned iLun, PPPDMIBASE ppBase);
105PDMR3DECL(int) PDMR3QueryLun(PVM pVM, const char *pszDevice, unsigned iInstance, unsigned iLun, PPPDMIBASE ppBase);
106PDMR3DECL(int) PDMR3DeviceAttach(PVM pVM, const char *pszDevice, unsigned iInstance, unsigned iLun, PPPDMIBASE ppBase);
107PDMR3DECL(int) PDMR3DeviceDetach(PVM pVM, const char *pszDevice, unsigned iInstance, unsigned iLun);
108PDMR3DECL(void) PDMR3DmaRun(PVM pVM);
109PDMR3DECL(void) PDMR3Poll(PVM pVM);
110PDMR3DECL(int) PDMR3LockCall(PVM pVM);
111PDMR3DECL(int) PDMR3RegisterVMMDevHeap(PVM pVM, RTGCPHYS GCPhys, RTR3PTR pvHeap, unsigned cbSize);
112PDMR3DECL(int) PDMR3VMMDevHeapAlloc(PVM pVM, unsigned cbSize, RTR3PTR *ppv);
113PDMR3DECL(int) PDMR3VMMDevHeapFree(PVM pVM, RTR3PTR pv);
114PDMR3DECL(int) PDMR3UnregisterVMMDevHeap(PVM pVM, RTGCPHYS GCPhys);
115
116/** @} */
117#endif
118
119
120#ifdef IN_GC
121/** @defgroup grp_pdm_gc The PDM Guest Context API
122 * @ingroup grp_pdm
123 * @{
124 */
125/** @} */
126#endif
127
128__END_DECLS
129
130/** @} */
131
132#endif
133
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