audk/OvmfPkg/Include/IndustryStandard/Xen
Laszlo Ersek 6f21d772aa OvmfPkg/IndustryStandard/Xen: replace MIT license text with SPDX ID
The header files under "OvmfPkg/Include/IndustryStandard/Xen" include the
MIT License text. Replace those license blocks with
"SPDX-License-Identifier: MIT" (which refers to
<https://spdx.org/licenses/MIT.html>) for easier parsing by machines (and
humans).

This follows the tree-wide adoption of "SPDX-License-Identifier"s, made
for <https://bugzilla.tianocore.org/show_bug.cgi?id=1373>.

Cc: Anthony Perard <anthony.perard@citrix.com>
Cc: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Cc: Jordan Justen <jordan.l.justen@intel.com>
Cc: Julien Grall <julien.grall@arm.com>
Cc: Lars Kurth <lars.kurth@citrix.com>
Cc: xen-devel@lists.xenproject.org
Bugzilla: https://bugzilla.tianocore.org/show_bug.cgi?id=1654
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Reviewed-by: Ard Biesheuvel <ard.biesheuvel@linaro.org>
Reviewed-by: Anthony PERARD <anthony.perard@citrix.com>
2019-04-12 12:04:36 +02:00
..
arch-arm OvmfPkg/IndustryStandard/Xen: replace MIT license text with SPDX ID 2019-04-12 12:04:36 +02:00
arch-x86 OvmfPkg/IndustryStandard/Xen: replace MIT license text with SPDX ID 2019-04-12 12:04:36 +02:00
hvm OvmfPkg/IndustryStandard/Xen: replace MIT license text with SPDX ID 2019-04-12 12:04:36 +02:00
io OvmfPkg/IndustryStandard/Xen: replace MIT license text with SPDX ID 2019-04-12 12:04:36 +02:00
README OvmfPkg/Include/...Xen: Convert __i386__/__x86_64__ to MDE_CPU_IA32/MDE_CPU_X64. 2014-10-31 21:25:11 +00:00
event_channel.h OvmfPkg/IndustryStandard/Xen: replace MIT license text with SPDX ID 2019-04-12 12:04:36 +02:00
grant_table.h OvmfPkg/IndustryStandard/Xen: replace MIT license text with SPDX ID 2019-04-12 12:04:36 +02:00
memory.h OvmfPkg/IndustryStandard/Xen: replace MIT license text with SPDX ID 2019-04-12 12:04:36 +02:00
xen-compat.h OvmfPkg/IndustryStandard/Xen: replace MIT license text with SPDX ID 2019-04-12 12:04:36 +02:00
xen.h OvmfPkg/IndustryStandard/Xen: replace MIT license text with SPDX ID 2019-04-12 12:04:36 +02:00

README

This file contains invisible Unicode characters

This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

The headers in this directory have been imported from the Xen Project with few
modification that are described in this README.

The modifications that needed to be done are:
- Use of ZeroMem() or SetMem() instead of memset().
- If a struct is using a 64bit field, then a #pragma(4) might be needed
  for IA32, like in io/blkif.h.
- Replace the types with the ones used in UEFI.


* Command to run to change types:
find OvmfPkg/Include/IndustryStandard/Xen -type f -name '*.h' -exec sed --regexp-extended --file=fix_type_in_xen_includes.sed --in-place {} \;

$ cat fix_type_in_xen_includes.sed
# Avoid changing the 'long' that is not a type.
/as long as/b

s/([^a-zA-Z0-9_]|^)uint8_t([^a-zA-Z0-9_]|$)/\1UINT8\2/g
s/([^a-zA-Z0-9_]|^)uint16_t([^a-zA-Z0-9_]|$)/\1UINT16\2/g
s/([^a-zA-Z0-9_]|^)uint32_t([^a-zA-Z0-9_]|$)/\1UINT32\2/g
s/([^a-zA-Z0-9_]|^)uint64_t([^a-zA-Z0-9_]|$)/\1UINT64\2/g

s/([^a-zA-Z0-9_]|^)int8_t([^a-zA-Z0-9_]|$)/\1INT8\2/g
s/([^a-zA-Z0-9_]|^)int16_t([^a-zA-Z0-9_]|$)/\1INT16\2/g
s/([^a-zA-Z0-9_]|^)int32_t([^a-zA-Z0-9_]|$)/\1INT32\2/g
s/([^a-zA-Z0-9_]|^)int64_t([^a-zA-Z0-9_]|$)/\1INT64\2/g

s/([^a-zA-Z0-9_]|^)void([^a-zA-Z0-9_]|$)/\1VOID\2/g
s/([^a-zA-Z0-9_]|^)unsigned int([^a-zA-Z0-9_]|$)/\1UINT32\2/g
s/([^a-zA-Z0-9_]|^)int([^a-zA-Z0-9_]|$)/\1INT32\2/g
s/([^a-zA-Z0-9_]|^)unsigned char([^a-zA-Z0-9_]|$)/\1UINT8\2/g
s/([^a-zA-Z0-9_]|^)char([^a-zA-Z0-9_]|$)/\1CHAR8\2/g
s/([^a-zA-Z0-9_]|^)unsigned long([^a-zA-Z0-9_]|$)/\1UINTN\2/g
s/([^a-zA-Z0-9_]|^)long([^a-zA-Z0-9_]|$)/\1INTN\2/g

s/__i386__/MDE_CPU_IA32/g
s/__x86_64__/MDE_CPU_X64/g