Skip to contentSkip to conversation

uefi: x86: uboot as uefi payload

U-Boot Markus Valentin 2 participants 6 messages Nov 30, 2016 – Dec 7, 2016

lore
Share & tools
lore
#0 lore raw

Hi,

im trying to run u-boot as uefi-payload for qemu this works totally fine.
?
My real target is a Minnowboard Turbot. I did use the minnowmax_defconfig enabled CONFIG_EFI, CONFIG_EFI_STUB and CONFIG_EFI_STUB_64BIT. The Board has the latest uefi by Intel installed(0.93, X64).

When i load U-Boot as payload for the board-uefi the efi_main function gets executed but the call to "cpu_call32" seems to get stuck ( i think its at the "retf"?arch/x86/cpu/call32.S:37).?

Debuglog:

Shell> u-boot-payload_64.efi
U-Boot EFI Payload?
gdt: 00000047, addr: 00000000784fd570
00: 00000000??00000000
08: 00cf9200??0000ffff
10: 00af9a00??0000ffff
18: 00cf9300??0000ffff
20: 00cf9a00??0000ffff
28: 00000000??00000000
30: 00cf9200??0000ffff
38: 00af9b00??0000ffff
40: 00000000??00000000
?32-bit code segment: 20
?page_table: 79313000
?EFI table at 78787018 size 00000760

Does anyone have experiences with this issue or with running u-boot as uefi-64 payload at all?

regard Markus
?

Signature · 3 lines
DENX Software Engineering GmbH,????? Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-60 Fax: (+49)-8142-66989-80 Email: mv at denx.de
#1 lore raw

Hi Markus,

Quoted 28 lines · Markus Valentin

Hi,

im trying to run u-boot as uefi-payload for qemu this works totally fine.

My real target is a Minnowboard Turbot. I did use the minnowmax_defconfig enabled CONFIG_EFI, CONFIG_EFI_STUB and CONFIG_EFI_STUB_64BIT. The Board has the latest uefi by Intel installed(0.93, X64).

When i load U-Boot as payload for the board-uefi the efi_main function gets executed but the call to "cpu_call32" seems to get stuck ( i think its at the "retf" arch/x86/cpu/call32.S:37).

Debuglog:

Shell> u-boot-payload_64.efi
U-Boot EFI Payload
gdt: 00000047, addr: 00000000784fd570

00: 00000000  00000000
08: 00cf9200  0000ffff
10: 00af9a00  0000ffff
18: 00cf9300  0000ffff
20: 00cf9a00  0000ffff
28: 00000000  00000000
30: 00cf9200  0000ffff
38: 00af9b00  0000ffff
40: 00000000  00000000
Quoted 6 lines

32-bit code segment: 20
page_table: 79313000
EFI table at 78787018 size 00000760

Does anyone have experiences with this issue or with running u-boot as uefi-64 payload at all?

I have used this on the original Minnowboard and it is used on some broadwell platforms.

I did hit a similar problem due to the 'ret' not generating the right instruction. I thought it was fixed but I suppose it is not impossible that the gcc toolchains might generate different op codes in different situations.

Which toolchain are you using?

Regards,
Simon

#2 lore raw

Hi Simon,
Am Mittwoch, den 30.11.2016, 19:20 -0700 schrieb Simon Glass:

Quoted 38 lines

Hi Markus,

Quoted 35 lines · Markus Valentin

Hi,

im trying to run u-boot as uefi-payload for qemu this works totally fine.

My real target is a Minnowboard Turbot. I did use the minnowmax_defconfig enabled CONFIG_EFI, CONFIG_EFI_STUB and CONFIG_EFI_STUB_64BIT. The Board has the latest uefi by Intel installed(0.93, X64).

When i load U-Boot as payload for the board-uefi the efi_main function
gets executed but the call to "cpu_call32" seems to get stuck ( i think
its at the "retf" arch/x86/cpu/call32.S:37).

Debuglog:

Shell> u-boot-payload_64.efi
U-Boot EFI Payload
gdt: 00000047, addr: 00000000784fd570
00: 00000000??00000000
08: 00cf9200??0000ffff
10: 00af9a00??0000ffff
18: 00cf9300??0000ffff
20: 00cf9a00??0000ffff
28: 00000000??00000000
30: 00cf9200??0000ffff
38: 00af9b00??0000ffff
40: 00000000??00000000
?32-bit code segment: 20
?page_table: 79313000
?EFI table at 78787018 size 00000760

Quoted 6 lines
Quoted 3 lines

Does anyone have experiences with this issue or with running u-boot as
uefi-64 payload at all?

I have used this on the original Minnowboard and it is used on some broadwell platforms.

Great so i should be able to get it working too.

Quoted 9 lines

I did hit a similar problem due to the 'ret' not generating the right instruction. I thought it was fixed but I suppose it is not impossible
that the gcc toolchains might generate different op codes in different
situations.

Which toolchain are you using?

Im using the gcc6 from Debian/testing,(6.2.0-13) and glibc6 2.24-5.?

Can you suggest a Toolchain? Mine is probably too "current"??

Regards?
Markus

Signature · 3 lines
DENX Software Engineering GmbH,????? Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-60 Fax: (+49)-8142-66989-80 Email: mv at denx.de
#3 lore raw

Hi Markus,

Quoted 55 lines · Markus Valentin

Hi Simon,
Am Mittwoch, den 30.11.2016, 19:20 -0700 schrieb Simon Glass:

Quoted 38 lines

Hi Markus,

Quoted 35 lines · Markus Valentin

Hi,

im trying to run u-boot as uefi-payload for qemu this works totally fine.

My real target is a Minnowboard Turbot. I did use the minnowmax_defconfig enabled CONFIG_EFI, CONFIG_EFI_STUB and CONFIG_EFI_STUB_64BIT. The Board has the latest uefi by Intel installed(0.93, X64).

When i load U-Boot as payload for the board-uefi the efi_main function
gets executed but the call to "cpu_call32" seems to get stuck ( i think
its at the "retf" arch/x86/cpu/call32.S:37).

Debuglog:

Shell> u-boot-payload_64.efi
U-Boot EFI Payload
gdt: 00000047, addr: 00000000784fd570

00: 00000000  00000000
08: 00cf9200  0000ffff
10: 00af9a00  0000ffff
18: 00cf9300  0000ffff
20: 00cf9a00  0000ffff
28: 00000000  00000000
30: 00cf9200  0000ffff
38: 00af9b00  0000ffff
40: 00000000  00000000

32-bit code segment: 20
page_table: 79313000
EFI table at 78787018 size 00000760

Quoted 6 lines
Quoted 3 lines

Does anyone have experiences with this issue or with running u-boot as
uefi-64 payload at all?

I have used this on the original Minnowboard and it is used on some broadwell platforms.

Great so i should be able to get it working too.

Quoted 8 lines

I did hit a similar problem due to the 'ret' not generating the right instruction. I thought it was fixed but I suppose it is not impossible
that the gcc toolchains might generate different op codes in different
situations.

Quoted 4 lines
Quoted 1 line

Which toolchain are you using?

Im using the gcc6 from Debian/testing,(6.2.0-13) and glibc6 2.24-5.

Can you suggest a Toolchain? Mine is probably too "current"?

I was using 4.9.0 now but I'm not sure if that is what I tested with. I'll try it again when I get a chance, but it will be a week or so as I am travelling.

Regards,
Simon

#4 lore raw

Hi Simon,

Quoted 62 lines · Simon Glass

Hi Markus,

Quoted 59 lines · Markus Valentin

Hi Simon,
Am Mittwoch, den 30.11.2016, 19:20 -0700 schrieb Simon Glass:

Quoted 40 lines

Hi Markus,

Quoted 36 lines · Markus Valentin

Hi,

im trying to run u-boot as uefi-payload for qemu this works totally fine.

My real target is a Minnowboard Turbot. I did use the minnowmax_defconfig enabled CONFIG_EFI, CONFIG_EFI_STUB and CONFIG_EFI_STUB_64BIT. The Board has the latest uefi by Intel installed(0.93, X64).

When i load U-Boot as payload for the board-uefi the efi_main function
gets executed but the call to "cpu_call32" seems to get stuck ( i think
its at the "retf" arch/x86/cpu/call32.S:37).

Debuglog:

Shell> u-boot-payload_64.efi
U-Boot EFI Payload
gdt: 00000047, addr: 00000000784fd570
00: 00000000??00000000
08: 00cf9200??0000ffff
10: 00af9a00??0000ffff
18: 00cf9300??0000ffff
20: 00cf9a00??0000ffff
28: 00000000??00000000
30: 00cf9200??0000ffff
38: 00af9b00??0000ffff
40: 00000000??00000000
?32-bit code segment: 20
?page_table: 79313000
?EFI table at 78787018 size 00000760

Quoted 6 lines
Quoted 3 lines

Does anyone have experiences with this issue or with running u-boot as
uefi-64 payload at all?

I have used this on the original Minnowboard and it is used on some broadwell platforms.

Great so i should be able to get it working too.

Quoted 9 lines

I did hit a similar problem due to the 'ret' not generating the right instruction. I thought it was fixed but I suppose it is not impossible
that the gcc toolchains might generate different op codes in different
situations.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

Which toolchain are you using?

Im using the gcc6 from Debian/testing,(6.2.0-13) and glibc6 2.24-5.

Can you suggest a Toolchain? Mine is probably too "current"?

I was using 4.9.0 now but I'm not sure if that is what I tested with. I'll try it again when I get a chance, but it will be a week or so as I am travelling.

I was not a matter of the the toolchain my SYS_TEXT_BASE was wrong? (0xfff00000) for unknown reason. ?

Once i created my own defconfig-file which sets the required KConfig- variables, the default from board/intel/minnowmax/Kconfig gets properly applied ?I did use menuconfig before which did somehow not? put the changes to the .config file.

Regards
Markus

Signature · 3 lines
DENX Software Engineering GmbH,????? Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-60 Fax: (+49)-8142-66989-80 Email: mv at denx.de
#5 lore raw

Hi Markus,

Quoted 73 lines · Markus Valentin

Hi Simon,

Quoted 62 lines · Simon Glass

Hi Markus,

Quoted 59 lines · Markus Valentin

Hi Simon,
Am Mittwoch, den 30.11.2016, 19:20 -0700 schrieb Simon Glass:

Quoted 40 lines

Hi Markus,

Quoted 36 lines · Markus Valentin

Hi,

im trying to run u-boot as uefi-payload for qemu this works totally fine.

My real target is a Minnowboard Turbot. I did use the minnowmax_defconfig enabled CONFIG_EFI, CONFIG_EFI_STUB and CONFIG_EFI_STUB_64BIT. The Board has the latest uefi by Intel installed(0.93, X64).

When i load U-Boot as payload for the board-uefi the efi_main function
gets executed but the call to "cpu_call32" seems to get stuck ( i think
its at the "retf" arch/x86/cpu/call32.S:37).

Debuglog:

Shell> u-boot-payload_64.efi
U-Boot EFI Payload
gdt: 00000047, addr: 00000000784fd570

00: 00000000  00000000
08: 00cf9200  0000ffff
10: 00af9a00  0000ffff
18: 00cf9300  0000ffff
20: 00cf9a00  0000ffff
28: 00000000  00000000
30: 00cf9200  0000ffff
38: 00af9b00  0000ffff
40: 00000000  00000000

32-bit code segment: 20
page_table: 79313000
EFI table at 78787018 size 00000760

Quoted 6 lines
Quoted 3 lines

Does anyone have experiences with this issue or with running u-boot as
uefi-64 payload at all?

I have used this on the original Minnowboard and it is used on some broadwell platforms.

Great so i should be able to get it working too.

Quoted 9 lines

I did hit a similar problem due to the 'ret' not generating the right instruction. I thought it was fixed but I suppose it is not impossible
that the gcc toolchains might generate different op codes in different
situations.

Quoted 8 lines
Quoted 4 lines
Quoted 1 line

Which toolchain are you using?

Im using the gcc6 from Debian/testing,(6.2.0-13) and glibc6 2.24-5.

Can you suggest a Toolchain? Mine is probably too "current"?

I was using 4.9.0 now but I'm not sure if that is what I tested with. I'll try it again when I get a chance, but it will be a week or so as I am travelling.

Quoted 7 lines

I was not a matter of the the toolchain my SYS_TEXT_BASE was wrong (0xfff00000) for unknown reason.

Once i created my own defconfig-file which sets the required KConfig- variables, the default from board/intel/minnowmax/Kconfig gets properly applied I did use menuconfig before which did somehow not put the changes to the .config file.

That's the base used for U-Boot running from ROM. I thought it would be relocatable to the text base would not matter, but indeed, that value seems more like a ROM value than a RAM value.

Anyway I'm please you have it running.

Regards,
Simon