VirtualBox

source: vbox/trunk/src/VBox/VMM/include/GITSInternal.h@ 108762

Last change on this file since 108762 was 108762, checked in by vboxsync, 3 weeks ago

VMM/GIC: bugref:10877 GITS work-in-progress.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.2 KB
Line 
1/* $Id: GITSInternal.h 108762 2025-03-27 10:16:28Z vboxsync $ */
2/** @file
3 * GITS - Generic Interrupt Controller Interrupt Translation Service - Internal.
4 */
5
6/*
7 * Copyright (C) 2025 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 VMM_INCLUDED_SRC_include_GITSInternal_h
29#define VMM_INCLUDED_SRC_include_GITSInternal_h
30#ifndef RT_WITHOUT_PRAGMA_ONCE
31# pragma once
32#endif
33
34#include <VBox/types.h>
35#include <VBox/gic-its.h>
36
37/** @defgroup grp_gits_int Internal
38 * @ingroup grp_gits
39 * @internal
40 * @{
41 */
42
43#if 0
44/**
45 * Interrupt Translation Table Base.
46 */
47typedef struct GITSITSBASE
48{
49 /** The physical address of the table. */
50 RTGCPHYS GCPhys;
51 /** Size of every allocated page in bytes. */
52 uint32_t cbPageSize;
53 /** Number of pages allocated. */
54 uint8_t cPages;
55 /** Size of each entry in bytes. */
56 uint8_t cbEntry;
57 /** Whether this is a two-level or flat table. */
58 bool fTwoLevel;
59 /** Whether software has memory allocated for the table. */
60 bool fValid;
61 /** Memory shareability attributes. */
62 GITSATTRSHARE AttrShare;
63 /** Memory cacheability attributes (Inner). */
64 GITSATTRMEM AttrMemInner;
65 /** Memory cacheability attributes (Outer). */
66 GITSATTRMEM AttrMemOuter;
67} GITSITSBASE;
68AssertCompileSizeAlignment(GITSITSBASE, 8);
69AssertCompileMemberAlignment(GITSITSBASE, AttrShare, 8);
70#endif
71
72
73/**
74 * The GIC Interrupt Translation Service device state.
75 */
76typedef struct GITSDEV
77{
78 /** @name Control registers.
79 * @{ */
80 /** Whether the ITS is enabled. */
81 bool fEnabled;
82 /** Whether unmapped MSI reporting interrupt is enabled. */
83 bool fUnmappedMsiReporting;
84 /** Whether ITS is quiescent and can be powered down. */
85 bool fQuiescent;
86 /** Padding. */
87 bool fPadding0;
88 /** The ITS table descriptor registers. */
89 RTUINT64U aItsTableRegs[8];
90 /** @} */
91
92 /** @name Interrupt translation space.
93 * @{ */
94 /** @} */
95
96 /** @name Configurables.
97 * @{ */
98 /** The ITS architecture (GITS_PIDR2.ArchRev). */
99 uint8_t uArchRev;
100 /** Padding. */
101 uint8_t afPadding0[7];
102 /** @} */
103} GITSDEV;
104/** Pointer to a GITS device. */
105typedef GITSDEV *PGITSDEV;
106/** Pointer to a const GITS device. */
107typedef GITSDEV const *PCGITSDEV;
108AssertCompileSizeAlignment(GITSDEV, 8);
109
110DECL_HIDDEN_CALLBACK(void) gitsInit(PGITSDEV pGitsDev);
111DECL_HIDDEN_CALLBACK(int) gitsSendMsi(PVMCC pVM, PCIBDF uBusDevFn, PCMSIMSG pMsi, uint32_t uEventId, uint32_t uTagSrc);
112DECL_HIDDEN_CALLBACK(VBOXSTRICTRC) gitsMmioReadCtrl(PCGITSDEV pGitsDev, uint16_t offReg, uint32_t *puValue);
113DECL_HIDDEN_CALLBACK(VBOXSTRICTRC) gitsMmioReadTranslate(PCGITSDEV pGitsDev, uint16_t offReg, uint32_t *puValue);
114DECL_HIDDEN_CALLBACK(VBOXSTRICTRC) gitsMmioWriteCtrl(PGITSDEV pGitsDev, uint16_t offReg, uint32_t uValue);
115DECL_HIDDEN_CALLBACK(VBOXSTRICTRC) gitsMmioWriteTranslate(PGITSDEV pGitsDev, uint16_t offReg, uint32_t uValue);
116
117#ifdef IN_RING3
118DECL_HIDDEN_CALLBACK(void) gitsR3DbgInfo(PCGITSDEV pGitsDev, PCDBGFINFOHLP pHlp, const char *pszArgs);
119#endif
120
121#ifdef LOG_ENABLED
122DECL_HIDDEN_CALLBACK(const char *) gitsGetCtrlRegDescription(uint16_t offReg);
123DECL_HIDDEN_CALLBACK(const char *) gitsGetTranslationRegDescription(uint16_t offReg);
124#endif
125
126/** @} */
127
128#endif /* !VMM_INCLUDED_SRC_include_GITSInternal_h */
129
Note: See TracBrowser for help on using the repository browser.

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