History log of /u-boot/arch/riscv/lib/crt0_riscv_efi.S
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# c9f368b5 14-Feb-2024 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: set IMAGE_DLLCHARACTERISTICS_NX_COMPAT

The IMAGE_DLLCHARACTERISTICS_NX_COMPAT flag marks an EFI binary where
the following conditions are met [1]:

* Executable and writable sections are separated.
* The application does not run self-modifying code.
* The application uses the EFI_MEMORY_ATTRIBUTE_PROTOCOL when loading
executable code.
* The application does not assume that all memory ranges are usable.
* The stack is not expected to be executable.

The only EFI binaries U-Boot provides that do not fulfill these
requirements are the EFI app and the EFI payload.

Once we have implemented separation of writable and executable memory in
U-Boot we can use the IMAGE_DLLCHARACTERISTICS_NX_COMPAT flag to decide
if we will load an EFI binary.

[1] New UEFI CA memory mitigation requirements for signing
https://techcommunity.microsoft.com/t5/hardware-dev-center/new-uefi-ca-memory-mitigation-requirements-for-signing/ba-p/3608714

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

# 3e911b74 25-Jan-2024 Heinrich Schuchardt <xypron.glpk@gmx.de>

riscv: separate .data and .text sections of EFI binaries

EFI binaries should not contain sections that are both writable and
executable. Separate the RX .text section from the RW .data section

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

# a5c3c1ba 25-Jan-2024 Heinrich Schuchardt <xypron.glpk@gmx.de>

riscv: page align EFI binary section

Change the alignment of the relocation code in EFI binaries to match page
boundaries.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

# 3ec07c99 22-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: set IMAGE_FILE_LARGE_ADDRESS_AWARE

For the 64bit EFI binaries that we create set the
IMAGE_FILE_LARGE_ADDRESS_AWARE characteristic in the PE-COFF header
to indicate that they can handle addresses above 2 GiB.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

# 9ef5ccaa 14-Jan-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: fix SectionAlignment, FileAlignment

The alignment of sections in the EFI binaries generated by U-Boot is
incorrect.

According to the PE-COFF specification [1] the minimum value for
FileAlignment is 512. If the value of SectionAlignment is
less then the page size, it must equal FileAlignment.

Let's set both values to 512 for the ARM and RISC-V architectures.

[1] https://docs.microsoft.com/en-us/windows/win32/debug/pe-format

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

# dfbc2be4 09-Jan-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

riscv: revert Complete efi header for RV32/64

EDK II refuses to load the EFI binaries created by U-Boot.
The reason is an incorrect PE-COFF header. The number of
data directories does not match NumberOfRvaAndSizes.
This leads to a failed consistency check in
PeCoffLoaderGetPeHeader():

SizeOfOptionalHeader - HeaderWithoutDataDir) !=
NumberOfRvaAndSizes * sizeof(DATA_DIRECTORY))

Fixes: 9afaeec6ef8b ("riscv: Complete efi header for RV32/64")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

# 17a50bd6 28-May-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: add Linux magic to RISC-V crt0

Add the Linux magic to the EFI file header to allow running our test
programs with GRUB's linux command.

MajorImageVersion = 1 indicates a kernel that can consume the
EFI_LOAD_FILE2_PROTOCOL. This allows to dump the GRUB provided intird with
our initrddump.efi tool.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>

# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com

# 84c3db2e 13-Oct-2020 Atish Patra <atishp@atishpatra.org>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>

# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>

# 7215787c 29-May-2018 Rick Chen <rick@andestech.com>

SPDX: Convert single license tags to Linux Kernel style

Fix license tags problem after apply patchs about
riscv: Enable efi_loader support.

Signed-off-by: Rick Chen <rick@andestech.com>
Signed-off-by: Rick Chen <rickchen36@gmail.com>
Cc: Greentime Hu <green.hu@gmail.com>

# 493d1e88 22-Apr-2018 Alexander Graf <agraf@csgraf.de>

riscv: Add EFI application infrastructure

The hello world binary and a few selftests require to build EFI target
binaries, not just the EFI host environment.

This patch adds all required files to generate an EFI binary for
RISC-V.

Signed-off-by: Alexander Graf <agraf@suse.de>

# 3e911b74 25-Jan-2024 Heinrich Schuchardt <xypron.glpk@gmx.de>

riscv: separate .data and .text sections of EFI binaries

EFI binaries should not contain sections that are both writable and
executable. Separate the RX .text section from the RW .data section

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

# a5c3c1ba 25-Jan-2024 Heinrich Schuchardt <xypron.glpk@gmx.de>

riscv: page align EFI binary section

Change the alignment of the relocation code in EFI binaries to match page
boundaries.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

# 3ec07c99 22-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: set IMAGE_FILE_LARGE_ADDRESS_AWARE

For the 64bit EFI binaries that we create set the
IMAGE_FILE_LARGE_ADDRESS_AWARE characteristic in the PE-COFF header
to indicate that they can handle addresses above 2 GiB.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

# 9ef5ccaa 14-Jan-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: fix SectionAlignment, FileAlignment

The alignment of sections in the EFI binaries generated by U-Boot is
incorrect.

According to the PE-COFF specification [1] the minimum value for
FileAlignment is 512. If the value of SectionAlignment is
less then the page size, it must equal FileAlignment.

Let's set both values to 512 for the ARM and RISC-V architectures.

[1] https://docs.microsoft.com/en-us/windows/win32/debug/pe-format

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

# dfbc2be4 09-Jan-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

riscv: revert Complete efi header for RV32/64

EDK II refuses to load the EFI binaries created by U-Boot.
The reason is an incorrect PE-COFF header. The number of
data directories does not match NumberOfRvaAndSizes.
This leads to a failed consistency check in
PeCoffLoaderGetPeHeader():

SizeOfOptionalHeader - HeaderWithoutDataDir) !=
NumberOfRvaAndSizes * sizeof(DATA_DIRECTORY))

Fixes: 9afaeec6ef8b ("riscv: Complete efi header for RV32/64")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

# 17a50bd6 28-May-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: add Linux magic to RISC-V crt0

Add the Linux magic to the EFI file header to allow running our test
programs with GRUB's linux command.

MajorImageVersion = 1 indicates a kernel that can consume the
EFI_LOAD_FILE2_PROTOCOL. This allows to dump the GRUB provided intird with
our initrddump.efi tool.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>

# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com

# 84c3db2e 13-Oct-2020 Atish Patra <atishp@atishpatra.org>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>

# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>

# 7215787c 29-May-2018 Rick Chen <rick@andestech.com>

SPDX: Convert single license tags to Linux Kernel style

Fix license tags problem after apply patchs about
riscv: Enable efi_loader support.

Signed-off-by: Rick Chen <rick@andestech.com>
Signed-off-by: Rick Chen <rickchen36@gmail.com>
Cc: Greentime Hu <green.hu@gmail.com>

# 493d1e88 22-Apr-2018 Alexander Graf <agraf@csgraf.de>

riscv: Add EFI application infrastructure

The hello world binary and a few selftests require to build EFI target
binaries, not just the EFI host environment.

This patch adds all required files to generate an EFI binary for
RISC-V.

Signed-off-by: Alexander Graf <agraf@suse.de>

# 3ec07c99 22-Dec-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: set IMAGE_FILE_LARGE_ADDRESS_AWARE

For the 64bit EFI binaries that we create set the
IMAGE_FILE_LARGE_ADDRESS_AWARE characteristic in the PE-COFF header
to indicate that they can handle addresses above 2 GiB.

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

# 9ef5ccaa 14-Jan-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: fix SectionAlignment, FileAlignment

The alignment of sections in the EFI binaries generated by U-Boot is
incorrect.

According to the PE-COFF specification [1] the minimum value for
FileAlignment is 512. If the value of SectionAlignment is
less then the page size, it must equal FileAlignment.

Let's set both values to 512 for the ARM and RISC-V architectures.

[1] https://docs.microsoft.com/en-us/windows/win32/debug/pe-format

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

# dfbc2be4 09-Jan-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

riscv: revert Complete efi header for RV32/64

EDK II refuses to load the EFI binaries created by U-Boot.
The reason is an incorrect PE-COFF header. The number of
data directories does not match NumberOfRvaAndSizes.
This leads to a failed consistency check in
PeCoffLoaderGetPeHeader():

SizeOfOptionalHeader - HeaderWithoutDataDir) !=
NumberOfRvaAndSizes * sizeof(DATA_DIRECTORY))

Fixes: 9afaeec6ef8b ("riscv: Complete efi header for RV32/64")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

# 17a50bd6 28-May-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: add Linux magic to RISC-V crt0

Add the Linux magic to the EFI file header to allow running our test
programs with GRUB's linux command.

MajorImageVersion = 1 indicates a kernel that can consume the
EFI_LOAD_FILE2_PROTOCOL. This allows to dump the GRUB provided intird with
our initrddump.efi tool.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>

# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com

# 84c3db2e 13-Oct-2020 Atish Patra <atishp@atishpatra.org>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>

# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>

# 7215787c 29-May-2018 Rick Chen <rick@andestech.com>

SPDX: Convert single license tags to Linux Kernel style

Fix license tags problem after apply patchs about
riscv: Enable efi_loader support.

Signed-off-by: Rick Chen <rick@andestech.com>
Signed-off-by: Rick Chen <rickchen36@gmail.com>
Cc: Greentime Hu <green.hu@gmail.com>

# 493d1e88 22-Apr-2018 Alexander Graf <agraf@csgraf.de>

riscv: Add EFI application infrastructure

The hello world binary and a few selftests require to build EFI target
binaries, not just the EFI host environment.

This patch adds all required files to generate an EFI binary for
RISC-V.

Signed-off-by: Alexander Graf <agraf@suse.de>

# 9ef5ccaa 14-Jan-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: fix SectionAlignment, FileAlignment

The alignment of sections in the EFI binaries generated by U-Boot is
incorrect.

According to the PE-COFF specification [1] the minimum value for
FileAlignment is 512. If the value of SectionAlignment is
less then the page size, it must equal FileAlignment.

Let's set both values to 512 for the ARM and RISC-V architectures.

[1] https://docs.microsoft.com/en-us/windows/win32/debug/pe-format

Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

# dfbc2be4 09-Jan-2022 Heinrich Schuchardt <xypron.glpk@gmx.de>

riscv: revert Complete efi header for RV32/64

EDK II refuses to load the EFI binaries created by U-Boot.
The reason is an incorrect PE-COFF header. The number of
data directories does not match NumberOfRvaAndSizes.
This leads to a failed consistency check in
PeCoffLoaderGetPeHeader():

SizeOfOptionalHeader - HeaderWithoutDataDir) !=
NumberOfRvaAndSizes * sizeof(DATA_DIRECTORY))

Fixes: 9afaeec6ef8b ("riscv: Complete efi header for RV32/64")
Signed-off-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>

# 17a50bd6 28-May-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: add Linux magic to RISC-V crt0

Add the Linux magic to the EFI file header to allow running our test
programs with GRUB's linux command.

MajorImageVersion = 1 indicates a kernel that can consume the
EFI_LOAD_FILE2_PROTOCOL. This allows to dump the GRUB provided intird with
our initrddump.efi tool.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>

# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com

# 84c3db2e 13-Oct-2020 Atish Patra <atishp@atishpatra.org>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>

# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>

# 7215787c 29-May-2018 Rick Chen <rick@andestech.com>

SPDX: Convert single license tags to Linux Kernel style

Fix license tags problem after apply patchs about
riscv: Enable efi_loader support.

Signed-off-by: Rick Chen <rick@andestech.com>
Signed-off-by: Rick Chen <rickchen36@gmail.com>
Cc: Greentime Hu <green.hu@gmail.com>

# 493d1e88 22-Apr-2018 Alexander Graf <agraf@csgraf.de>

riscv: Add EFI application infrastructure

The hello world binary and a few selftests require to build EFI target
binaries, not just the EFI host environment.

This patch adds all required files to generate an EFI binary for
RISC-V.

Signed-off-by: Alexander Graf <agraf@suse.de>

# 17a50bd6 28-May-2021 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: add Linux magic to RISC-V crt0

Add the Linux magic to the EFI file header to allow running our test
programs with GRUB's linux command.

MajorImageVersion = 1 indicates a kernel that can consume the
EFI_LOAD_FILE2_PROTOCOL. This allows to dump the GRUB provided intird with
our initrddump.efi tool.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>

# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com

# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>

# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>

# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>

# 7215787c 29-May-2018 Rick Chen <rick@andestech.com>

SPDX: Convert single license tags to Linux Kernel style

Fix license tags problem after apply patchs about
riscv: Enable efi_loader support.

Signed-off-by: Rick Chen <rick@andestech.com>
Signed-off-by: Rick Chen <rickchen36@gmail.com>
Cc: Greentime Hu <green.hu@gmail.com>

# 493d1e88 22-Apr-2018 Alexander Graf <agraf@csgraf.de>

riscv: Add EFI application infrastructure

The hello world binary and a few selftests require to build EFI target
binaries, not just the EFI host environment.

This patch adds all required files to generate an EFI binary for
RISC-V.

Signed-off-by: Alexander Graf <agraf@suse.de>

# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 9afaeec6 16-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Complete efi header for RV32/64

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Add fields to complete Optional Header "Data Directories" specified in the document.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Reviewed-by: Atish Patra <atish.patra@wdc.com>


# 9ea6952a 11-Nov-2020 Leo Yu-Chi Liang <ycliang@andestech.com>

riscv: Fix efi header size for RV32

This patch depends on Atish's patch.
(https://patchwork.ozlabs.org/project/uboot/patch/20201013192331.3236458-1-atish.patra@wdc.com/)

Modify the size of the Optional Header "Windows-Specific Fields" to fit with the specification.
(https://docs.microsoft.com/en-us/windows/win32/debug/pe-format)

Signed-off-by: Leo Yu-Chi Liang <ycliang@andestech.com>
Cc: rick@andestech.com
Cc: alankao@andestech.com
Cc: atish.patra@wdc.com
Cc: xypron.glpk@gmx.de
Cc: bmeng.cn@gmail.com


# 84c3db2e 13-Oct-2020 Atish Patra <atish.patra@wdc.com>

riscv: Fix efi header for RV32

RV32 should use PE32 format instead of PE32+ as the efi header format.
This requires following changes
1. A different header magic value
2. An additional parameter known as BaseOfData. Currently, it is set to
zero in absence of any usage.

Signed-off-by: Atish Patra <atish.patra@wdc.com>
Reviewed-by: Bin Meng <bin.meng@windriver.com>
Reviewed-by: Rick Chen <rick@andestech.com>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# a35c33c0 10-Jul-2019 Heinrich Schuchardt <xypron.glpk@gmx.de>

efi_loader: use predefined constants in crt0_*_efi.S

We should use predefined constants instead of magic numbers.

Move some constant definitions from include/pe.h to
include/asm-generic/pe.h.

Use these constants in crt0_*_efi.S.

Signed-off-by: Heinrich Schuchardt <xypron.glpk@gmx.de>


# a33a4efd 02-Oct-2018 Bin Meng <bmeng.cn@gmail.com>

riscv: efi: Generate Microsoft PE format compliant images

Per Microsoft PE Format documentation [1], PointerToSymbolTable and
NumberOfSymbols should be zero for an image in the COFF file header.
Currently the COFF file header is hardcoded on RISC-V and these two
members are not zero.

This updates the hardcoded structure to clear these two members, as
well as setting the flag IMAGE_FILE_LOCAL_SYMS_STRIPPED so that we
can generate compliant *.efi images.

[1] https://docs.microsoft.com/zh-cn/windows/desktop/Debug/pe-format

Signed-off-by: Bin Meng <bmeng.cn@gmail.com>
Reviewed-by: Heinrich Schuchardt <xypron.glpk@gmx.de>
Signed-off-by: Alexander Graf <agraf@suse.de>


# 7215787c 29-May-2018 Rick Chen <rick@andestech.com>

SPDX: Convert single license tags to Linux Kernel style

Fix license tags problem after apply patchs about
riscv: Enable efi_loader support.

Signed-off-by: Rick Chen <rick@andestech.com>
Signed-off-by: Rick Chen <rickchen36@gmail.com>
Cc: Greentime Hu <green.hu@gmail.com>


# 493d1e88 22-Apr-2018 Alexander Graf <agraf@suse.de>

riscv: Add EFI application infrastructure

The hello world binary and a few selftests require to build EFI target
binaries, not just the EFI host environment.

This patch adds all required files to generate an EFI binary for
RISC-V.

Signed-off-by: Alexander Graf <agraf@suse.de>