1 | /* $Id: DevEFI-binaries.S 107139 2024-11-26 10:19:37Z vboxsync $ */
|
---|
2 | /** @file
|
---|
3 | * DevEFI - firmware binaries.
|
---|
4 | */
|
---|
5 |
|
---|
6 | /*
|
---|
7 | * Copyright (C) 2011-2024 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 |
|
---|
29 | #ifdef RT_OS_DARWIN
|
---|
30 | #define NAME(a_Name) _##a_Name
|
---|
31 | #else
|
---|
32 | #define NAME(a_Name) a_Name
|
---|
33 | #endif
|
---|
34 |
|
---|
35 | #ifdef RT_OS_DARWIN
|
---|
36 | .section __TEXT,__const
|
---|
37 | #else
|
---|
38 | .section .text
|
---|
39 | #endif
|
---|
40 |
|
---|
41 | /* 32-bit firmware: */
|
---|
42 | .p2align 6
|
---|
43 | .globl NAME(g_abEfiFirmwareX86)
|
---|
44 | NAME(g_abEfiFirmwareX86):
|
---|
45 | .incbin "VBoxEFI-x86.fd"
|
---|
46 | end_x86_firmware:
|
---|
47 |
|
---|
48 | .p2align 2
|
---|
49 | .globl NAME(g_cbEfiFirmwareX86)
|
---|
50 | NAME(g_cbEfiFirmwareX86):
|
---|
51 | .long end_x86_firmware - NAME(g_abEfiFirmwareX86)
|
---|
52 |
|
---|
53 |
|
---|
54 | /* 64-bit firmware: */
|
---|
55 | .p2align 6
|
---|
56 | .globl NAME(g_abEfiFirmwareAmd64)
|
---|
57 | NAME(g_abEfiFirmwareAmd64):
|
---|
58 | .incbin "VBoxEFI-amd64.fd"
|
---|
59 | end_amd64_firmware:
|
---|
60 |
|
---|
61 | .p2align 2
|
---|
62 | .globl NAME(g_cbEfiFirmwareAmd64)
|
---|
63 | NAME(g_cbEfiFirmwareAmd64):
|
---|
64 | .long end_amd64_firmware - NAME(g_abEfiFirmwareAmd64)
|
---|
65 |
|
---|
66 | #ifdef ASM_FORMAT_ELF
|
---|
67 | .size g_abEfiFirmwareX86, end_x86_firmware - NAME(g_abEfiFirmwareX86)
|
---|
68 | .type g_abEfiFirmwareX86 object
|
---|
69 | .size g_cbEfiFirmwareX86, 4
|
---|
70 | .type g_cbEfiFirmwareX86 object
|
---|
71 |
|
---|
72 | .size g_abEfiFirmwareAmd64, end_amd64_firmware - NAME(g_abEfiFirmwareAmd64)
|
---|
73 | .type g_abEfiFirmwareAmd64 object
|
---|
74 | .size g_cbEfiFirmwareAmd64, 4
|
---|
75 | .type g_cbEfiFirmwareAmd64 object
|
---|
76 |
|
---|
77 | #elif defined(ASM_FORMAT_PE)
|
---|
78 | /* Explit exportint: */
|
---|
79 | .section .drectve
|
---|
80 | .string "-export:g_abEfiFirmwareX86 -export:g_cbEfiFirmwareX86 -export:g_abEfiFirmwareAmd64 -export:g_cbEfiFirmwareAmd64"
|
---|
81 | .section .text
|
---|
82 |
|
---|
83 | #endif
|
---|
84 |
|
---|
85 | #ifdef VBOX_WITH_VIRT_ARMV8
|
---|
86 | /*
|
---|
87 | * The ARMv8 bits
|
---|
88 | */
|
---|
89 |
|
---|
90 | /* 32-bit firmware: */
|
---|
91 | .p2align 6
|
---|
92 | .globl NAME(g_abEfiFirmwareArm32)
|
---|
93 | NAME(g_abEfiFirmwareArm32):
|
---|
94 | .incbin "VBoxEFI-arm32.fd"
|
---|
95 | end_arm32_firmware:
|
---|
96 |
|
---|
97 | .p2align 2
|
---|
98 | .globl NAME(g_cbEfiFirmwareArm32)
|
---|
99 | NAME(g_cbEfiFirmwareArm32):
|
---|
100 | .long end_arm32_firmware - NAME(g_abEfiFirmwareArm32)
|
---|
101 |
|
---|
102 |
|
---|
103 | /* 64-bit firmware: */
|
---|
104 | .p2align 6
|
---|
105 | .globl NAME(g_abEfiFirmwareArm64)
|
---|
106 | NAME(g_abEfiFirmwareArm64):
|
---|
107 | .incbin "VBoxEFI-arm64.fd"
|
---|
108 | end_arm64_firmware:
|
---|
109 |
|
---|
110 | .p2align 2
|
---|
111 | .globl NAME(g_cbEfiFirmwareArm64)
|
---|
112 | NAME(g_cbEfiFirmwareArm64):
|
---|
113 | .long end_arm64_firmware - NAME(g_abEfiFirmwareArm64)
|
---|
114 |
|
---|
115 | # ifdef ASM_FORMAT_ELF
|
---|
116 | .size g_abEfiFirmwareArm32, end_arm32_firmware - NAME(g_abEfiFirmwareArm32)
|
---|
117 | .type g_abEfiFirmwareArm32 object
|
---|
118 | .size g_cbEfiFirmwareArm32, 4
|
---|
119 | .type g_cbEfiFirmwareArm32 object
|
---|
120 |
|
---|
121 | .size g_abEfiFirmwareArm64, end_arm64_firmware - NAME(g_abEfiFirmwareArm64)
|
---|
122 | .type g_abEfiFirmwareArm64 object
|
---|
123 | .size g_cbEfiFirmwareArm64, 4
|
---|
124 | .type g_cbEfiFirmwareArm64 object
|
---|
125 |
|
---|
126 | #elif defined(ASM_FORMAT_PE)
|
---|
127 | /* Explit exportint: */
|
---|
128 | .section .drectve
|
---|
129 | .string "-export:g_abEfiFirmwareArm32 -export:g_cbEfiFirmwareArm32 -export:g_abEfiFirmwareArm64 -export:g_cbEfiFirmwareArm64"
|
---|
130 | .section .text
|
---|
131 |
|
---|
132 | # endif
|
---|
133 | #endif /*VBOX_WITH_VIRT_ARMV8 */
|
---|