Re: [edk2] Enabling boot menu via serial & PXE boot in CorebootPayloadPkg
Hi Benjamin, >Hi Cameron, > >> >I get serial output from edk2 with the release build and the debug build. >> >However this serial output does not include the boot menu, I just get >> >progress and error codes (and debug messages in debug mode). >> >I have attached a runtime log of a recent debug build. > >From your log, I cannot see the below prompt message: > >"F2 or Down to enter Boot Manager Menu. >ENTER to boot directly." > >With my system, there is above message shown in serial. When I press F2 >upon the message, the boot manager is shown. > >The message is printed in PlatformBootManagerAfterConsole() in >CorebootPayloadPkg\Library\PlatformBootManagerLib\PlatformBootManage >r.c. >Not sure what went wrong, but you might add some debug message to trace >the execution flow. > >Or, have you been able to boot to UEFI Shell? If yes, you may type "exit" >from the Shell prompt, and boot manager should show up. > >Thanks, > >- ben I managed to work out the problem. Coreboot applies patches to the edk2 source after the git fetch, one of these changes the BdsDxe provider from MdeModulePkg to IntelFrameworkModulePkg [1]. Changing it back to MdeModulePkg fixed the issue. [1] https://github.com/coreboot/coreboot/blob/master/payloads/external/tianocore/patches/02_CorebootPayloadPkg_bds.patch Thanks again for your help, Cameron Cameron Craig | Graduate Software Engineer | Exterity Limited tel: +44 1383 828 250 | fax: | mobile: e: cameron.cr...@exterity.com | w: www.exterity.com __ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com __ ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] Enabling boot menu via serial & PXE boot in CorebootPayloadPkg
Hi Cameron, > >I get serial output from edk2 with the release build and the debug build. > >However this serial output does not include the boot menu, I just get > >progress > >and error codes (and debug messages in debug mode). > >I have attached a runtime log of a recent debug build. >From your log, I cannot see the below prompt message: "F2 or Down to enter Boot Manager Menu. ENTER to boot directly." With my system, there is above message shown in serial. When I press F2 upon the message, the boot manager is shown. The message is printed in PlatformBootManagerAfterConsole() in CorebootPayloadPkg\Library\PlatformBootManagerLib\PlatformBootManager.c. Not sure what went wrong, but you might add some debug message to trace the execution flow. Or, have you been able to boot to UEFI Shell? If yes, you may type "exit" from the Shell prompt, and boot manager should show up. Thanks, - ben ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] Enabling boot menu via serial & PXE boot in CorebootPayloadPkg
Added log as attachment. > Cameron Craig | Graduate Software Engineer | Exterity Limited tel: +44 1383 828 250 | fax: | mobile: e: cameron.cr...@exterity.com | w: www.exterity.com -Original Message- >From: Cameron Craig >Sent: 01 December 2017 10:23 >To: 'You, Benjamin'; 'edk2-devel@lists.01.org' >Subject: RE: [edk2] Enabling boot menu via serial & PXE boot in >CorebootPayloadPkg > >Hi Benjamin, > >>> Interestingly, my debug build was complaining that it ran out of room >>> when attempting to fit everything in the UEFIPAYLOAD. >>> When I strip out the network additions and keep DEBUG on, Tianocore >>> builds but errors at runtime: >>> ``` >>> Failed to add memory space :0xFEE0 0x10 ``` I'm guessing I >>> can increase the size of a region somewhere to avoid this issue? >> >>There has been a recent fix for this issue by commit e2ef8b9a68. Could >>you please have a try? > >Nice! I tried that fix and can now run the debug build. > >>> I get serial output from coreboot and edk2, just not the boot menu. >> >>I will double check whether there is an issue with enabling serial with >>release build. > >I get serial output from edk2 with the release build and the debug build. >However this serial output does not include the boot menu, I just get progress >and error codes (and debug messages in debug mode). >I have attached a runtime log of a recent debug build. >Given that I do get serial output I'm hoping that getting a boot menu via >serial >is not far away. > >Thanks for the help so far! > >Cheers, >Cameron __ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com __ PROGRESS CODE: V03020003 I0 Loading PEIM at 0x08143C0 EntryPoint=0x0814600 CbSupportPeim.efi PROGRESS CODE: V03020002 I0 0. - 0FFF [10] 1. 1000 - 0009 [01] 2. 000A - 000F [02] 3. 0010 - 0FFF [01] 4. 1000 - 12150FFF [02] 5. 12151000 - 7AB25FFF [01] 6. 7AB26000 - 7AFF [10] 7. 7B00 - 7FFF [02] 8. D000 - D0FF [02] 9. E000 - EFFF [02] 10. FED1 - FED17FFF [02] Low memory 0x7AB26000 SystemLowMemTop 0x8000 PeiMemBase: 0x76B2. PeiMemSize: 0x400. PeiInstallPeiMemory MemoryBegin 0x76B2, MemoryLength 0x400 Found one valid fv : 0x3E0083. Install PPI: 49EDB1C1-BF21-4761-BB12-EB0031AABB39 Notify: PPI Guid: 49EDB1C1-BF21-4761-BB12-EB0031AABB39, Peim notify entry point: 807D48 The 1th FV start address is 0x083, size is 0x003E, handle is 0x83 Install PPI: 7408D748-FC8C-4EE6-9288-C4BEC092A410 Actual Coreboot header: 7AB5B000. Find CbMemTable Id 0x41435049, base 7AB37000, size 0x24000 Find CbMemTable Id 0x534D4254, base 7AB26000, size 0x800 Detected Acpi Table at 0x7AB37000, length 0x24000 Detected Smbios Table at 0x7AB26000, length 0x800 Create system table info guid hob Find CbMemTable Id 0x41435049, base 7AB37000, size 0x24000 Find Rsdp at 7AB37000 Find Rsdt 0x7AB37030, Xsdt 0x7AB370E0 PmCtrl Reg 0x404 PmTimer Reg 0x408 Reset Reg 0xCF9 Reset Value 0x6 PmEvt Reg 0x400 PmGpeEn Reg 0x430 Create acpi board info guid hob Found coreboot video frame buffer information physical_address: 0xB000 x_resolution: 0x400 y_resolution: 0x300 bits_per_pixel: 0x20 bytes_per_line: 0x1000 red_mask_size: 0x8 red_mask_pos: 0x10 green_mask_size: 0x8 green_mask_pos: 0x8 blue_mask_size: 0x8 blue_mask_pos: 0x0 reserved_mask_size: 0x18 reserved_mask_pos: 0x18 Create frame buffer info guid hob PROGRESS CODE: V03020003 I0 Temp Stack : BaseAddress=0x88000 Length=0x8000 Temp Heap : BaseAddress=0x8 Length=0x8000 Total temporary memory:65536 bytes. temporary memory stack ever used: 32768 bytes. temporary memory heap used: 3880 bytes. Old Stack size 32768, New stack size 131072 Stack Hob: BaseAddress=0x76B2 Length=0x2 Heap Offset = 0x76AC Stack Offset = 0x76AB Loading PEIM at 0x0007AB14000 EntryPoint=0x0007AB1BE10 PeiCore.efi Reinstall PPI: 8C8CE578-8A3D-4F1C-9935-896185C32DD3 Reinstall PPI: 5473C07A-3DCB-4DCA-BD6F-1E9689E7349A Reinstall PPI: B9E0ABFE-5979-4914-977F-6DEE78C278A6 Install PPI: F894643D-C449-42D1-8EA8-85BDD8C65BDE Loading PEIM at 0x0007AB0F000 EntryPoint=0x0007AB10103 DxeIpl.efi PROGRESS CODE: V03020002 I0 PROGRESS CODE: V03020003 I0 Install PPI: 1A36E4E7-FAB6-476A-8E75-695A0576FDD7 Install PPI: 0AE8CE5D-E448-4437-A8D7-EBF5F194F731 DXE IPL Entry Loading PEIM at 0x0007AAE7000 EntryPoint=0x0007AAE7240 DxeCore.efi PROGRESS CODE: V03021
Re: [edk2] Enabling boot menu via serial & PXE boot in CorebootPayloadPkg
Hi Benjamin, >> Interestingly, my debug build was complaining that it ran out of room >> when attempting to fit everything in the UEFIPAYLOAD. >> When I strip out the network additions and keep DEBUG on, Tianocore >> builds but errors at runtime: >> ``` >> Failed to add memory space :0xFEE0 0x10 ``` I'm guessing I can >> increase the size of a region somewhere to avoid this issue? > >There has been a recent fix for this issue by commit e2ef8b9a68. Could you >please have a try? Nice! I tried that fix and can now run the debug build. >> I get serial output from coreboot and edk2, just not the boot menu. > >I will double check whether there is an issue with enabling serial with release >build. I get serial output from edk2 with the release build and the debug build. However this serial output does not include the boot menu, I just get progress and error codes (and debug messages in debug mode). I have attached a runtime log of a recent debug build. Given that I do get serial output I'm hoping that getting a boot menu via serial is not far away. Thanks for the help so far! Cheers, Cameron Cameron Craig | Graduate Software Engineer | Exterity Limited tel: +44 1383 828 250 | fax: | mobile: e: cameron.cr...@exterity.com | w: www.exterity.com __ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com __ ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] Enabling boot menu via serial & PXE boot in CorebootPayloadPkg
Hi, Cameron, > Interestingly, my debug build was complaining that it ran out of room when > attempting to fit everything in the UEFIPAYLOAD. > When I strip out the network additions and keep DEBUG on, Tianocore builds but > errors at runtime: > ``` > Failed to add memory space :0xFEE0 0x10 > ``` > I'm guessing I can increase the size of a region somewhere to avoid this > issue? There has been a recent fix for this issue by commit e2ef8b9a68. Could you please have a try? > I get serial output from coreboot and edk2, just not the boot menu. I will double check whether there is an issue with enabling serial with release build. Thanks, - ben ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] Enabling boot menu via serial & PXE boot in CorebootPayloadPkg
Hi Benjamin, Thanks for the pointers. >> On networking, you might refer to the Minnow Board v3 source tree, at >> https://github.com/tianocore/edk2-platforms/tree/devel-MinnowBoard3- >> UDK2017 >> >> Minnow Board v3 uses the same SOC as Leaf Hill. You might look at >> Platform/BroxtonPlatformPkg/PlatformPkg.fdf file for a reference on >> which components are used for network / PXE. Network boot/PXE is now functioning, I just had to link in the UNDI driver in edk2 rather than loading via USB. It's just the serial boot menu I'm trying to get working now. >BTW, please use debug build for Coreboot Payload, such that debug >information can be shown in serial console from the very early stage in the >Payload's execution. This would help validating the functioning of serial. Interestingly, my debug build was complaining that it ran out of room when attempting to fit everything in the UEFIPAYLOAD. When I strip out the network additions and keep DEBUG on, Tianocore builds but errors at runtime: ``` Failed to add memory space :0xFEE0 0x10 ``` I'm guessing I can increase the size of a region somewhere to avoid this issue? >> Have you seen serial output info during Coreboot? If the answer is no, >> then Coreboot should be tweaked. If the answer is yes, but you cannot >> see serial output in Coreboot Payload, then probably the above call >> sequence needs to be checked. If you do not have a debugger, one way >> to trace code flow is to insert raw serial outputs in the code flow. I get serial output from coreboot and edk2, just not the boot menu. >> This should be doable since Coreboot already does serial output. Once >> the serial output functions correctly in the Coreboot Payload, Boot >> Menu / UI through serial should be automatically supported. That's not happening in my case. I'm currently trying to get the debug build to run. Cheers, Cameron Cameron Craig | Graduate Software Engineer | Exterity Limited tel: +44 1383 828 250 | fax: | mobile: e: cameron.cr...@exterity.com | w: www.exterity.com __ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com __ ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] Enabling boot menu via serial & PXE boot in CorebootPayloadPkg
Hi Cameron, BTW, please use debug build for Coreboot Payload, such that debug information can be shown in serial console from the very early stage in the Payload's execution. This would help validating the functioning of serial. Thanks, - ben > -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of You, > Benjamin > Sent: Saturday, November 25, 2017 11:25 PM > To: Cameron Craig <cameron.cr...@exterity.com>; 'edk2-devel@lists.01.org' > <edk2-devel@lists.01.org> > Subject: Re: [edk2] Enabling boot menu via serial & PXE boot in > CorebootPayloadPkg > > Hi Cameron, > > CorebootPayloadPkg does support serial output as user interface. To enable > serial, the CorebootPayloadPkg retrieves serial information from Coreboot > through CorebootModulePkg\Library\CbParseLib\CbParseLib.c => > CbParseSerialInfo(), which is called by CorebootPayloadPkg\Library\ > PlatformHookLib\PlatformHookLib.c => PlatformHookSerialPortInitialize(), > which is in turn called by CorebootModulePkg\Library\BaseSerialPortLib16550 > \BaseSerialPortLib16550.c ==> SerialPortInitialize(). > > Have you seen serial output info during Coreboot? If the answer is no, then > Coreboot should be tweaked. If the answer is yes, but you cannot see serial > output in Coreboot Payload, then probably the above call sequence needs to > be checked. If you do not have a debugger, one way to trace code flow is to > insert raw serial outputs in the code flow. This should be doable since > Coreboot already does serial output. Once the serial output functions > correctly in the Coreboot Payload, Boot Menu / UI through serial should be > automatically supported. > > On networking, you might refer to the Minnow Board v3 source tree, at > https://github.com/tianocore/edk2-platforms/tree/devel-MinnowBoard3- > UDK2017 > > Minnow Board v3 uses the same SOC as Leaf Hill. You might look at > Platform/BroxtonPlatformPkg/PlatformPkg.fdf file for a reference on which > components are used for network / PXE. > > Thanks, > > - ben > > > -Original Message- > > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of > > Cameron Craig > > Sent: Friday, November 24, 2017 5:16 PM > > To: 'edk2-devel@lists.01.org' <edk2-devel@lists.01.org> > > Subject: [edk2] Enabling boot menu via serial & PXE boot in > CorebootPayloadPkg > > > > Hi all, > > > > I'm new to this list and new to edk2 integration. > > Currently I'm working on an Intel Leaf Hill CRB, attempting to produce a > > coreboot payload consisting of a Tianocore EDKII UDK 2017 UEFI boot > manager. > > > > I have basic functionality, but a few useful features are currently missing > > from > > my build: > > > > 1. User interface via serial. > > We will not have the luxury of a video output so need to be able to navigate > the > > boot menu etc. via serial. > > In an ideal world I would be looking for a Boolean value to toggle :) But I > > imagine there might be a little more to it. > > > > 2. PXE Boot. > > So far I have sources and built an UNDI driver and pinged a local network > device. > > I have also attempted to enable the necessary features for PXE boot [1]. > > But I get an error message: > > ``` > > $ ipconfig > > MAC Address: > > Broadcast MAC: FF FF FF FF FF FF > > ipconfig: Locate protocol error: 'PXE base code protocol' > > ``` > > So I'm thinking some drivers are not being loaded? > > > > Any suggestions for enabling these features would be greatly appreciated. > > > > [1] https://github.com/tianocore/tianocore.github.io/wiki/NetworkPkg- > > Getting-Started-Guide -> FEATURES ENABLING > > > > Cheers, > > Cameron > > > > > > Cameron Craig | Graduate Software Engineer | Exterity Limited > > tel: +44 1383 828 250 | fax: | mobile: > > e: cameron.cr...@exterity.com | w: www.exterity.com > > > > Exterity is a leading provider of IP Video and Digital Signage solutions > > that > helps > > organizations to harness the power of video to communicate, educate and > > entertain. Our end-to-end solutions enable you to take TV and video content > > directly from any source and manage its delivery, live or on demand, to any > > connected device via your existing network. For more information or to > > schedule a product demonstration, contact Exterity on +44(0)1383 828 250 or > > visit www.exterity.com > > > > Legal Notice > > Unless expressly stated otherwise, this message is confidential and may be > > privileg
Re: [edk2] Enabling boot menu via serial & PXE boot in CorebootPayloadPkg
Hi Cameron, CorebootPayloadPkg does support serial output as user interface. To enable serial, the CorebootPayloadPkg retrieves serial information from Coreboot through CorebootModulePkg\Library\CbParseLib\CbParseLib.c => CbParseSerialInfo(), which is called by CorebootPayloadPkg\Library\ PlatformHookLib\PlatformHookLib.c => PlatformHookSerialPortInitialize(), which is in turn called by CorebootModulePkg\Library\BaseSerialPortLib16550 \BaseSerialPortLib16550.c ==> SerialPortInitialize(). Have you seen serial output info during Coreboot? If the answer is no, then Coreboot should be tweaked. If the answer is yes, but you cannot see serial output in Coreboot Payload, then probably the above call sequence needs to be checked. If you do not have a debugger, one way to trace code flow is to insert raw serial outputs in the code flow. This should be doable since Coreboot already does serial output. Once the serial output functions correctly in the Coreboot Payload, Boot Menu / UI through serial should be automatically supported. On networking, you might refer to the Minnow Board v3 source tree, at https://github.com/tianocore/edk2-platforms/tree/devel-MinnowBoard3-UDK2017 Minnow Board v3 uses the same SOC as Leaf Hill. You might look at Platform/BroxtonPlatformPkg/PlatformPkg.fdf file for a reference on which components are used for network / PXE. Thanks, - ben > -Original Message- > From: edk2-devel [mailto:edk2-devel-boun...@lists.01.org] On Behalf Of > Cameron Craig > Sent: Friday, November 24, 2017 5:16 PM > To: 'edk2-devel@lists.01.org' <edk2-devel@lists.01.org> > Subject: [edk2] Enabling boot menu via serial & PXE boot in CorebootPayloadPkg > > Hi all, > > I'm new to this list and new to edk2 integration. > Currently I'm working on an Intel Leaf Hill CRB, attempting to produce a > coreboot payload consisting of a Tianocore EDKII UDK 2017 UEFI boot manager. > > I have basic functionality, but a few useful features are currently missing > from > my build: > > 1. User interface via serial. > We will not have the luxury of a video output so need to be able to navigate > the > boot menu etc. via serial. > In an ideal world I would be looking for a Boolean value to toggle :) But I > imagine there might be a little more to it. > > 2. PXE Boot. > So far I have sources and built an UNDI driver and pinged a local network > device. > I have also attempted to enable the necessary features for PXE boot [1]. > But I get an error message: > ``` > $ ipconfig > MAC Address: > Broadcast MAC: FF FF FF FF FF FF > ipconfig: Locate protocol error: 'PXE base code protocol' > ``` > So I'm thinking some drivers are not being loaded? > > Any suggestions for enabling these features would be greatly appreciated. > > [1] https://github.com/tianocore/tianocore.github.io/wiki/NetworkPkg- > Getting-Started-Guide -> FEATURES ENABLING > > Cheers, > Cameron > > > Cameron Craig | Graduate Software Engineer | Exterity Limited > tel: +44 1383 828 250 | fax: | mobile: > e: cameron.cr...@exterity.com | w: www.exterity.com > > Exterity is a leading provider of IP Video and Digital Signage solutions that > helps > organizations to harness the power of video to communicate, educate and > entertain. Our end-to-end solutions enable you to take TV and video content > directly from any source and manage its delivery, live or on demand, to any > connected device via your existing network. For more information or to > schedule a product demonstration, contact Exterity on +44(0)1383 828 250 or > visit www.exterity.com > > Legal Notice > Unless expressly stated otherwise, this message is confidential and may be > privileged. It is intended for the addressee(s) only. Access to this e-mail by > anyone else is unauthorized. If you are not an addressee, any disclosure or > copying of the contents of this e-mail or any action taken (or not taken) in > reliance on it is unauthorized and may be unlawful. If you are not an > addressee, > please inform the sender immediately. > > Exterity Limited is registered in Scotland under No. 225313 with its > registered > office at Ridge Way, Hillend Industrial Park, Dalgety Bay, KY11 9JD. > > > _ > _ > This email has been scanned by the Symantec Email Security.cloud service. > For more information please visit http://www.symanteccloud.com > _ > _ > ___ > edk2-devel mailing list > edk2-devel@lists.01.org > https://lists.01.org/mailman/listinfo/edk2-devel ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] Enabling boot menu via serial & PXE boot in CorebootPayloadPkg
Hi all, I'm new to this list and new to edk2 integration. Currently I'm working on an Intel Leaf Hill CRB, attempting to produce a coreboot payload consisting of a Tianocore EDKII UDK 2017 UEFI boot manager. I have basic functionality, but a few useful features are currently missing from my build: 1. User interface via serial. We will not have the luxury of a video output so need to be able to navigate the boot menu etc. via serial. In an ideal world I would be looking for a Boolean value to toggle :) But I imagine there might be a little more to it. 2. PXE Boot. So far I have sources and built an UNDI driver and pinged a local network device. I have also attempted to enable the necessary features for PXE boot [1]. But I get an error message: ``` $ ipconfig MAC Address: Broadcast MAC: FF FF FF FF FF FF ipconfig: Locate protocol error: 'PXE base code protocol' ``` So I'm thinking some drivers are not being loaded? Any suggestions for enabling these features would be greatly appreciated. [1] https://github.com/tianocore/tianocore.github.io/wiki/NetworkPkg-Getting-Started-Guide -> FEATURES ENABLING Cheers, Cameron Cameron Craig | Graduate Software Engineer | Exterity Limited tel: +44 1383 828 250 | fax: | mobile: e: cameron.cr...@exterity.com | w: www.exterity.com Exterity is a leading provider of IP Video and Digital Signage solutions that helps organizations to harness the power of video to communicate, educate and entertain. Our end-to-end solutions enable you to take TV and video content directly from any source and manage its delivery, live or on demand, to any connected device via your existing network. For more information or to schedule a product demonstration, contact Exterity on +44(0)1383 828 250 or visit www.exterity.com Legal Notice Unless expressly stated otherwise, this message is confidential and may be privileged. It is intended for the addressee(s) only. Access to this e-mail by anyone else is unauthorized. If you are not an addressee, any disclosure or copying of the contents of this e-mail or any action taken (or not taken) in reliance on it is unauthorized and may be unlawful. If you are not an addressee, please inform the sender immediately. Exterity Limited is registered in Scotland under No. 225313 with its registered office at Ridge Way, Hillend Industrial Park, Dalgety Bay, KY11 9JD. __ This email has been scanned by the Symantec Email Security.cloud service. For more information please visit http://www.symanteccloud.com __ ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel