VirtualBox

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

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

VMM/GIC: bugref:10877 GITS PIDR2 register reads and related nits.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 3.9 KB
Line 
1/* $Id: GITSInternal.h 108751 2025-03-26 10:33:33Z 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/**
44 * Interrupt Translation Table Base.
45 */
46typedef struct GITSITSBASE
47{
48 /** The physical address of the table. */
49 RTGCPHYS GCPhys;
50 /** Number of pages of memory allocated to this table. */
51 uint8_t cPages;
52 /** Size of each page allocated. */
53 uint8_t cPageSize;
54 /** Size of each entry in the table in bytes. */
55 uint8_t cbEntry;
56 /** Whether this is a two-level table or not. */
57 bool fTwoLevel;
58 /** Memory shareability attributes. */
59 GITSATTRSHARE AttrShare;
60 /** Memory cacheability attributes. */
61 GITSATTRMEM AttrMem;
62} GITSITSBASE;
63
64/**
65 * The GIC Interrupt Translation Service device state.
66 */
67typedef struct GITSDEV
68{
69 /** @name Control registers.
70 * @{ */
71 /** Whether the ITS is enabled. */
72 bool fEnabled;
73 /** Whether unmapped MSI reporting interrupt is enabled. */
74 bool fUnmappedMsiReporting;
75 /** Whether ITS is quiescent and can be powered down. */
76 bool fQuiescent;
77 /** Padding. */
78 bool fPadding0;
79 /** The ITS table descriptor registers. */
80 GITSITSBASE aBases[8];
81 /** @} */
82
83 /** @name Interrupt translation space.
84 * @{ */
85 /** @} */
86
87 /** @name Configurables.
88 * @{ */
89 /** The ITS architecture (GITS_PIDR2.ArchRev). */
90 uint8_t uArchRev;
91 /** Padding. */
92 uint8_t afPadding0[7];
93 /** @} */
94} GITSDEV;
95/** Pointer to a GITS device. */
96typedef GITSDEV *PGITSDEV;
97/** Pointer to a const GITS device. */
98typedef GITSDEV const *PCGITSDEV;
99AssertCompileSizeAlignment(GITSDEV, 8);
100
101DECL_HIDDEN_CALLBACK(void) gitsInit(PGITSDEV pGitsDev);
102DECL_HIDDEN_CALLBACK(int) gitsSendMsi(PVMCC pVM, PCIBDF uBusDevFn, PCMSIMSG pMsi, uint32_t uEventId, uint32_t uTagSrc);
103DECL_HIDDEN_CALLBACK(VBOXSTRICTRC) gitsMmioReadCtrl(PCGITSDEV pGitsDev, uint16_t offReg, uint32_t *puValue);
104DECL_HIDDEN_CALLBACK(VBOXSTRICTRC) gitsMmioReadTranslate(PCGITSDEV pGitsDev, uint16_t offReg, uint32_t *puValue);
105DECL_HIDDEN_CALLBACK(VBOXSTRICTRC) gitsMmioWriteCtrl(PGITSDEV pGitsDev, uint16_t offReg, uint32_t uValue);
106DECL_HIDDEN_CALLBACK(VBOXSTRICTRC) gitsMmioWriteTranslate(PGITSDEV pGitsDev, uint16_t offReg, uint32_t uValue);
107
108#ifdef IN_RING3
109DECL_HIDDEN_CALLBACK(void) gitsR3DbgInfo(PCGITSDEV pGitsDev, PCDBGFINFOHLP pHlp, const char *pszArgs);
110#endif
111
112#ifdef LOG_ENABLED
113DECL_HIDDEN_CALLBACK(const char *) gitsGetCtrlRegDescription(uint16_t offReg);
114DECL_HIDDEN_CALLBACK(const char *) gitsGetTranslationRegDescription(uint16_t offReg);
115#endif
116
117/** @} */
118
119#endif /* !VMM_INCLUDED_SRC_include_GITSInternal_h */
120
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