VirtualBox

source: vbox/trunk/src/VBox/Main/include/PlatformX86Impl.h@ 101505

Last change on this file since 101505 was 101043, checked in by vboxsync, 15 months ago

Initial commit (based draft v2 / on patch v5) for implementing platform architecture support for x86 and ARM: More SCM fixes. bugref:10384

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 2.9 KB
Line 
1/* $Id: PlatformX86Impl.h 101043 2023-09-07 10:16:04Z vboxsync $ */
2/** @file
3 * VirtualBox COM class implementation - x86 platform settings.
4 */
5
6/*
7 * Copyright (C) 2023 Oracle and/or its affiliates.
8 *
9 * This file is part of VirtualBox base platform packages, as
10 * available from https://www.virtualbox.org.
11 *
12 * This program is free software; you can redistribute it and/or
13 * modify it under the terms of the GNU General Public License
14 * as published by the Free Software Foundation, in version 3 of the
15 * License.
16 *
17 * This program is distributed in the hope that it will be useful, but
18 * WITHOUT ANY WARRANTY; without even the implied warranty of
19 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
20 * General Public License for more details.
21 *
22 * You should have received a copy of the GNU General Public License
23 * along with this program; if not, see <https://www.gnu.org/licenses>.
24 *
25 * SPDX-License-Identifier: GPL-3.0-only
26 */
27
28#ifndef MAIN_INCLUDED_PlatformX86Impl_h
29#define MAIN_INCLUDED_PlatformX86Impl_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34class Machine;
35class Platform;
36
37namespace settings
38{
39 struct PlatformX86;
40}
41
42#include "PlatformX86Wrap.h"
43#include "PlatformBase.h"
44
45class ATL_NO_VTABLE PlatformX86
46 : public PlatformX86Wrap, public PlatformBase
47{
48public:
49
50 DECLARE_COMMON_CLASS_METHODS(PlatformX86)
51
52 HRESULT FinalConstruct();
53 void FinalRelease();
54
55 // public initializer/uninitializer for internal purposes only
56 HRESULT init(Platform *aParent, Machine *aMachine);
57 HRESULT init(Platform *aParent, Machine *aMachine, PlatformX86 *aThat);
58 HRESULT initCopy(Platform *aParent, Machine *aMachine, PlatformX86 *aThat);
59 void uninit();
60
61 // public internal methods
62 void i_rollback();
63 void i_commit();
64 void i_copyFrom(PlatformX86 *aThat);
65
66 // public internal methods
67 HRESULT i_loadSettings(const settings::PlatformX86 &data);
68 HRESULT i_saveSettings(settings::PlatformX86 &data);
69 HRESULT i_applyDefaults(GuestOSType *aOsType);
70
71private:
72
73 // wrapped IPlatformX86 properties
74 HRESULT getHPETEnabled(BOOL *aHPETEnabled);
75 HRESULT setHPETEnabled(BOOL aHPETEnabled);
76
77 // wrapped IPlatformX86 methods
78 HRESULT getCPUProperty(CPUPropertyTypeX86_T aProperty, BOOL *aValue);
79 HRESULT setCPUProperty(CPUPropertyTypeX86_T aProperty, BOOL aValue);
80 HRESULT getCPUIDLeafByOrdinal(ULONG aOrdinal, ULONG *aIdx, ULONG *aSubIdx, ULONG *aValEax, ULONG *aValEbx, ULONG *aValEcx, ULONG *aValEdx);
81 HRESULT getCPUIDLeaf(ULONG aIdx, ULONG aSubIdx, ULONG *aValEax, ULONG *aValEbx, ULONG *aValEcx, ULONG *aValEdx);
82 HRESULT setCPUIDLeaf(ULONG aIdx, ULONG aSubIdx, ULONG aValEax, ULONG aValEbx, ULONG aValEcx, ULONG aValEdx);
83 HRESULT removeCPUIDLeaf(ULONG aIdx, ULONG aSubIdx);
84 HRESULT removeAllCPUIDLeaves();
85 HRESULT getHWVirtExProperty(HWVirtExPropertyType_T aProperty, BOOL *aValue);
86 HRESULT setHWVirtExProperty(HWVirtExPropertyType_T aProperty, BOOL aValue);
87};
88
89#endif /* !MAIN_INCLUDED_PlatformX86Impl_h */
90
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