1 | /** @file
|
---|
2 | * VirtualBox - ARMv8 virtual platform definitions shared by the device and firmware.
|
---|
3 | */
|
---|
4 |
|
---|
5 | /*
|
---|
6 | * Copyright (C) 2023 Oracle and/or its affiliates.
|
---|
7 | *
|
---|
8 | * This file is part of VirtualBox base platform packages, as
|
---|
9 | * available from https://www.virtualbox.org.
|
---|
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 | */
|
---|
50 | typedef 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 backwards from the start of this descriptor, 0 if not available. */
|
---|
65 | uint64_t u64OffBackFdt;
|
---|
66 | /** Size of the FDT in bytes, 0 if not available. */
|
---|
67 | uint64_t cbFdt;
|
---|
68 | /** Offset to the RDSP/XSDP table for ACPI backwards from the start of this descriptor, 0 if not available. */
|
---|
69 | uint64_t u64OffBackAcpiXsdp;
|
---|
70 | /** Size of the RDSP/XSDP table, 0 if not available. */
|
---|
71 | uint64_t cbAcpiXsdp;
|
---|
72 | /** Offset backwards 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 | uint64_t u64OffBackUefiRom;
|
---|
74 | /** Size if the UEFI ROM region in bytes, 0 if not available. */
|
---|
75 | uint64_t cbUefiRom;
|
---|
76 | /** Offset backwards to the start of the MMIO region from the start of this descriptor, 0 if not available (doesn't make much sense though). */
|
---|
77 | uint64_t u64OffBackMmio;
|
---|
78 | /** Size of the MMIO region in bytes, 0 if not available. */
|
---|
79 | uint64_t cbMmio;
|
---|
80 | /** Padding to 64KiB. */
|
---|
81 | uint8_t abPadding[_64K - 4 * sizeof(uint32_t) - 10 * sizeof(uint64_t)];
|
---|
82 | } VBOXPLATFORMARMV8;
|
---|
83 | AssertCompileSize(VBOXPLATFORMARMV8, _64K);
|
---|
84 | typedef VBOXPLATFORMARMV8 *PVBOXPLATFORMARMV8;
|
---|
85 | typedef const VBOXPLATFORMARMV8 *PCVBOXPLATFORMARMV8;
|
---|
86 |
|
---|
87 | /** Magic identifying the VirtualBox descriptor. */
|
---|
88 | #define VBOXPLATFORMARMV8_MAGIC RT_MAKE_U32_FROM_U8('V', '8', 'O', 'X')
|
---|
89 | /** Current version of the descriptor. */
|
---|
90 | #define VBOXPLATFORMARMV8_VERSION 0x1
|
---|
91 |
|
---|
92 | #endif /* !VBOX_INCLUDED_platforms_vbox_armv8_h */
|
---|