VirtualBox

source: vbox/trunk/include/VBox/platforms/vbox-armv8.h@ 106479

Last change on this file since 106479 was 106352, checked in by vboxsync, 7 months ago

Devices/EFI/Firmware: Expose ACPI tables if available, bugref:10733

This requires changing the VBox descriptor slightly to accomodate for the fact that
the XSDP will be located at the end of the ACPI region but the start + size of the
whole region are required for setting up the identity mapped page tables and have this region
covered in the address space. Doesn't need bumping the version because older firmware never
exposed ACPI tables.

  • Property svn:eol-style set to native
  • Property svn:keywords set to Author Date Id Revision
File size: 4.4 KB
Line 
1/** @file
2 * VirtualBox - ARMv8 virtual platform definitions shared by the device and firmware.
3 */
4
5/*
6 * Copyright (C) 2023-2024 Oracle and/or its affiliates.
7 *
8 * This file is part of VirtualBox base platform packages, as
9 * available from https://www.215389.xyz.
10 *
11 * This program is free software; you can redistribute it and/or
12 * modify it under the terms of the GNU General Public License
13 * as published by the Free Software Foundation, in version 3 of the
14 * License.
15 *
16 * This program is distributed in the hope that it will be useful, but
17 * WITHOUT ANY WARRANTY; without even the implied warranty of
18 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
19 * General Public License for more details.
20 *
21 * You should have received a copy of the GNU General Public License
22 * along with this program; if not, see <https://www.gnu.org/licenses>.
23 *
24 * The contents of this file may alternatively be used under the terms
25 * of the Common Development and Distribution License Version 1.0
26 * (CDDL), a copy of it is provided in the "COPYING.CDDL" file included
27 * in the VirtualBox distribution, in which case the provisions of the
28 * CDDL are applicable instead of those of the GPL.
29 *
30 * You may elect to license modified versions of this file under the
31 * terms and conditions of either the GPL or the CDDL or both.
32 *
33 * SPDX-License-Identifier: GPL-3.0-only OR CDDL-1.0
34 */
35
36#ifndef VBOX_INCLUDED_platforms_vbox_armv8_h
37#define VBOX_INCLUDED_platforms_vbox_armv8_h
38#ifndef RT_WITHOUT_PRAGMA_ONCE
39# pragma once
40#endif
41
42#include <iprt/assert.h>
43#include <iprt/types.h>
44#include <iprt/cdefs.h>
45
46
47/**
48 * The VBox region descriptor.
49 */
50typedef struct VBOXPLATFORMARMV8
51{
52 /** A magic value identifying the descriptor. */
53 uint32_t u32Magic;
54 /** Decriptor version. */
55 uint32_t u32Version;
56 /** Size of this descriptor. */
57 uint32_t cbDesc;
58 /** Some flags (MBZ for now). */
59 uint32_t fFlags;
60 /** Base RAM region start address. */
61 uint64_t u64PhysAddrRamBase;
62 /** Size of the base RAM region in bytes. */
63 uint64_t cbRamBase;
64 /** Offset to the beginning of the FDT from the start of this descriptor, 0 if not available. */
65 int64_t i64OffFdt;
66 /** Size of the FDT in bytes, 0 if not available. */
67 uint64_t cbFdt;
68 /** Offset to the start of the ACPI table region from the start of this descriptor, 0 if not available. */
69 int64_t i64OffAcpi;
70 /** Size of the ACPI region in bytes, 0 if not available. */
71 uint64_t cbAcpi;
72 /** Offset to the start of the UEFI ROM region from the start of this descriptor, 0 if not available (doesn't make much sense though). */
73 int64_t i64OffUefiRom;
74 /** Size if the UEFI ROM region in bytes, 0 if not available. */
75 uint64_t cbUefiRom;
76 /** Offset to the start of the MMIO region from the start of this descriptor, 0 if not available (doesn't make much sense though). */
77 int64_t i64OffMmio;
78 /** Size of the MMIO region in bytes, 0 if not available. */
79 uint64_t cbMmio;
80 /** Offset to the start of the MMIO32 region from the start of this descriptor, 0 if not available. */
81 int64_t i64OffMmio32;
82 /** Size of the MMIO32 region in bytes, 0 if not available. */
83 uint64_t cbMmio32;
84 /** Offset to the RDSP/XSDP table for ACPI from the start of this descriptor, 0 if not available. */
85 int64_t i64OffAcpiXsdp;
86 /** Size of the RDSP/XSDP table, 0 if not available. */
87 uint64_t cbAcpiXsdp;
88 /** Padding to 64KiB. */
89 uint8_t abPadding[_64K - 4 * sizeof(uint32_t) - 14 * sizeof(uint64_t)];
90} VBOXPLATFORMARMV8;
91AssertCompileSize(VBOXPLATFORMARMV8, _64K);
92typedef VBOXPLATFORMARMV8 *PVBOXPLATFORMARMV8;
93typedef const VBOXPLATFORMARMV8 *PCVBOXPLATFORMARMV8;
94
95/** Magic identifying the VirtualBox descriptor. */
96#define VBOXPLATFORMARMV8_MAGIC RT_MAKE_U32_FROM_U8('V', '8', 'O', 'X')
97/** Current version of the descriptor. */
98#define VBOXPLATFORMARMV8_VERSION 0x1
99
100/** Physical address of the VBox platform descriptor (128MiB). */
101#define VBOXPLATFORMARMV8_PHYS_ADDR UINT64_C(0x08000000)
102
103#endif /* !VBOX_INCLUDED_platforms_vbox_armv8_h */
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