Re: [edk2] Debugging UEFI bootloaders applications

2013-08-28 Thread galla rao
https://www.intel.in/content/dam/doc/manual/uefi-dev-kit-debugger-tool-manual.pdf
Sec 8.9

Debugging a standalone module

loaded in a UEFI shell using late attach


On Thu, Aug 29, 2013 at 11:13 AM, galla rao  wrote:

> Is it not possible to introduce *SerialPortWrite* Calls into Bootloaded
> code?
> Have you tried
> i think if you have JTAG debuggers like Arium/ITP/HDT
> through WINDBG you should be able to breakthrough
> I think if you have Tiano source level debugging macros you should be able
> to break into UEFI source
>
> Though i have never worked on bootloaders, that is my vague idea
>
> Any comments from experts?
>
>
>  On Thu, Aug 29, 2013 at 9:57 AM, cruxpot  wrote:
>
>>  Hi,
>>
>> I am trying to find the best way to debug EFI boot loaders at the
>> instruction level. I am trying to write one executed from an EFI shell that
>> passes off control to the Windows boot manager in Windows 8 (bootmgfw.efi)
>> and I seem to be unable to debug this binary as it passes off control to
>> winload.efi.
>>
>> I have only been able to create a debug entry in Windows 8 to debug
>> winload.efi after the virtual memory mapping has already taken place with
>> the SetMemoryMap and ExitBootServices calls. I want to be able to debug
>> this whole boot process of a UEFI Windows installation started from an EFI
>> shell application.
>>
>> Any insight would be appreciated. I have a Tunnel Mountain UEFI dev kit
>> system (with source-level debug ROM) and VMware with an EFI shell to play
>> with.
>>
>> Thanks,
>> Nick
>>
>>
>> --
>> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
>> Discover the easy way to master current and previous Microsoft
>> technologies
>> and advance your career. Get an incredible 1,500+ hours of step-by-step
>> tutorial videos with LearnDevNow. Subscribe today and save!
>>
>> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
>> ___
>> edk2-devel mailing list
>> edk2-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>>
>>
>
--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


Re: [edk2] Debugging UEFI bootloaders applications

2013-08-28 Thread galla rao
Is it not possible to introduce *SerialPortWrite* Calls into Bootloaded
code?
Have you tried
i think if you have JTAG debuggers like Arium/ITP/HDT
through WINDBG you should be able to breakthrough
I think if you have Tiano source level debugging macros you should be able
to break into UEFI source

Though i have never worked on bootloaders, that is my vague idea

Any comments from experts?


On Thu, Aug 29, 2013 at 9:57 AM, cruxpot  wrote:

> Hi,
>
> I am trying to find the best way to debug EFI boot loaders at the
> instruction level. I am trying to write one executed from an EFI shell that
> passes off control to the Windows boot manager in Windows 8 (bootmgfw.efi)
> and I seem to be unable to debug this binary as it passes off control to
> winload.efi.
>
> I have only been able to create a debug entry in Windows 8 to debug
> winload.efi after the virtual memory mapping has already taken place with
> the SetMemoryMap and ExitBootServices calls. I want to be able to debug
> this whole boot process of a UEFI Windows installation started from an EFI
> shell application.
>
> Any insight would be appreciated. I have a Tunnel Mountain UEFI dev kit
> system (with source-level debug ROM) and VMware with an EFI shell to play
> with.
>
> Thanks,
> Nick
>
>
> --
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
> ___
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>
>
--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


[edk2] Debugging UEFI bootloaders applications

2013-08-28 Thread cruxpot
Hi,

I am trying to find the best way to debug EFI boot loaders at the
instruction level. I am trying to write one executed from an EFI shell that
passes off control to the Windows boot manager in Windows 8 (bootmgfw.efi)
and I seem to be unable to debug this binary as it passes off control to
winload.efi.

I have only been able to create a debug entry in Windows 8 to debug
winload.efi after the virtual memory mapping has already taken place with
the SetMemoryMap and ExitBootServices calls. I want to be able to debug
this whole boot process of a UEFI Windows installation started from an EFI
shell application.

Any insight would be appreciated. I have a Tunnel Mountain UEFI dev kit
system (with source-level debug ROM) and VMware with an EFI shell to play
with.

Thanks,
Nick
--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


Re: [edk2] Mixed Section Types for PCD

2013-08-28 Thread Zeng, Star
Hi Chip,

FixedAtBuild PCD:
The value of this PCD type is determined
at build time and is stored in the code section of a module's PE image.

Yes, the PCD is required not to be configured as FixedAtBuild, if a driver that 
wants to do a set on the PCD.


Thanks.
Star
From: Chip Ueltschey [mailto:chipj...@gmail.com]
Sent: Thursday, August 29, 2013 10:42 AM
To: edk2-devel@lists.sourceforge.net
Subject: Re: [edk2] Mixed Section Types for PCD

Ok, interesting, thanks.

What if I have a driver that wants to do a set on the PCD.
The driver can't do that if the build is configured to use the PCD as 
FixedAtBuild.
Is there any way to detect this in the C code, or does this driver just require 
that the PCD not be configured as FixedAtBuild?

-chip

On Wed, Aug 28, 2013 at 5:51 PM, Andrew Fish 
mailto:af...@apple.com>> wrote:


On Aug 28, 2013, at 5:31 PM, Tim Lewis 
mailto:tim.le...@insyde.com>> wrote:


Chip -

It is legal. The types that are listed in the .dec file limit the types that a 
.dsc file can use. If none is specified in the .dsc file, then the first one 
will be used by default. So, for example, you may want to allow a .dsc file to 
support either Dynamic, DynamicEx or FixedAtBuild. So the .dec file lists all 
three. But if the .dsc file tries to use Patchable, it will fail.


This is the best way to think about it. Lets say I'm building for a ATM that 
does not have setup. In my DSC file I'll set a lot of the PCDs to FixedAtBuild. 
But some PC OEM that supports over-clockers may want to to make a large number 
of parameters configurable in setup. The concept of PCD is the driver has these 
generic hook points for configuration, but the platform builder gets to chose 
what knobs get exposed. In this example the CPU and Chipset drivers code does 
not have to change between the zero setup platform and the uber setup platform. 
That is the concept behind allowing the platform to chose the type of the PCD.


So Set will not work on FixedAtBuild, right, because it is defined as CONST. So 
you need to change the type in the .dsc file to Dynamic or DynamicEx or 
Patchable (actually, I'm not sure if Patchable generates a CONST or not)


Yes it does but Patchable is for a binary and the patching is done by a build 
tool.

Thanks,

Andrew Fish


Tim

From: Chip Ueltschey 
[mailto:chipjust@gmail.com]
Sent: Wednesday, August 28, 2013 5:26 PM
To: edk2-devel@lists.sourceforge.net
Subject: [edk2] Mixed Section Types for PCD

Is it legal to do this in a DEC file?
[PcdsFixedAtBuild,PcdsPatchableInModule,PcdsDynamic]

That seems suspect since a PcdsFixedAtBuild type will not allow set, but a 
PcdsDynamic will allow set.
What is AutoGen supposed to do?
Currently, I have an error where the C code wants to set a PCD in this section.

Thanks,
-chip
--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel

--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


Re: [edk2] Mixed Section Types for PCD

2013-08-28 Thread Chip Ueltschey
Ok, interesting, thanks.

What if I have a driver that wants to do a set on the PCD.
The driver can't do that if the build is configured to use the PCD as
FixedAtBuild.
Is there any way to detect this in the C code, or does this driver just
require that the PCD not be configured as FixedAtBuild?

-chip


On Wed, Aug 28, 2013 at 5:51 PM, Andrew Fish  wrote:

>
>
> On Aug 28, 2013, at 5:31 PM, Tim Lewis  wrote:
>
> Chip –
>
> It is legal. The types that are listed in the .dec file limit the types
> that a .dsc file can use. If none is specified in the .dsc file, then the
> first one will be used by default. So, for example, you may want to allow a
> .dsc file to support either Dynamic, DynamicEx or FixedAtBuild. So the .dec
> file lists all three. But if the .dsc file tries to use Patchable, it will
> fail.
>
>
>
> This is the best way to think about it. Lets say I'm building for a ATM
> that does not have setup. In my DSC file I'll set a lot of the PCDs to
> FixedAtBuild. But some PC OEM that supports over-clockers may want to to
> make a large number of parameters configurable in setup. The concept of PCD
> is the driver has these generic hook points for configuration, but the
> platform builder gets to chose what knobs get exposed. In this example the
> CPU and Chipset drivers code does not have to change between the zero setup
> platform and the uber setup platform. That is the concept behind allowing
> the platform to chose the type of the PCD.
>
> So Set will not work on FixedAtBuild, right, because it is defined as
> CONST. So you need to change the type in the .dsc file to Dynamic or
> DynamicEx or Patchable (actually, I’m not sure if Patchable generates a
> CONST or not)
>
>
>
> Yes it does but Patchable is for a binary and the patching is done by a
> build tool.
>
> Thanks,
>
> Andrew Fish
>
> Tim
>
> *From:* Chip Ueltschey [mailto:chipj...@gmail.com]
> *Sent:* Wednesday, August 28, 2013 5:26 PM
> *To:* edk2-devel@lists.sourceforge.net
> *Subject:* [edk2] Mixed Section Types for PCD
> ** **
> Is it legal to do this in a DEC file?
> [PcdsFixedAtBuild,PcdsPatchableInModule,PcdsDynamic]
> ** **
> That seems suspect since a PcdsFixedAtBuild type will not allow set, but a
> PcdsDynamic will allow set.
> What is AutoGen supposed to do?
> Currently, I have an error where the C code wants to set a PCD in this
> section.
> ** **
> Thanks,
> -chip
>
> --
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
>
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk___
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>
>
>
>
> --
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
> ___
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>
>
--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


Re: [edk2] Bios to UEFI migration doubt

2013-08-28 Thread Cameron Esfahani
Because your hypothetical system is missing CSM and legacy support?

They're there for a reason.  Specifically to run legacy operating systems.

As for documentation, try looking at some of the high level UEFI white papers 
which explain the differences between UEFI and a traditional BIOS.  I'm not 
sure where those are anymore, so I can't give you a link...

Cameron Esfahani
di...@apple.com

"There are times in the life of a nation when the only place a decent man can 
find himself is in prison."



On Aug 28, 2013, at 6:39 PM, Rafael Machado  
wrote:

>  Supose I have PXE boot DOS application that run on systems with the old bios 
> (not uefi systems). 
> My question is:
> 
> Will this application still work in a system with no CSM and legacy support ?
> 
> As far as I know the answer is no, but I didn't find any documentation 
> telling why does this happen. And I need to find some document to explain to 
> some clients the changes and why the current application will not work in a 
> near future.
> 
> Any help ?
> 

--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


[edk2] Bios to UEFI migration doubt

2013-08-28 Thread Rafael Machado
Hi everyone.

I have a question that is probably simple for those who have more knowledge
about UEFI.

 Supose I have PXE boot DOS application that run on systems with the old
bios (not uefi systems).
My question is:

Will this application still work in a system with no CSM and legacy support
?

As far as I know the answer is no, but I didn't find any documentation
telling why does this happen. And I need to find some document to explain
to some clients the changes and why the current application will not work
in a near future.

Any help ?

Thanks everyone.
Rafael R. Machado
--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


Re: [edk2] Mixed Section Types for PCD

2013-08-28 Thread Andrew Fish


On Aug 28, 2013, at 5:31 PM, Tim Lewis  wrote:

> Chip –
>  
> It is legal. The types that are listed in the .dec file limit the types that 
> a .dsc file can use. If none is specified in the .dsc file, then the first 
> one will be used by default. So, for example, you may want to allow a .dsc 
> file to support either Dynamic, DynamicEx or FixedAtBuild. So the .dec file 
> lists all three. But if the .dsc file tries to use Patchable, it will fail.
>  

This is the best way to think about it. Lets say I'm building for a ATM that 
does not have setup. In my DSC file I'll set a lot of the PCDs to FixedAtBuild. 
But some PC OEM that supports over-clockers may want to to make a large number 
of parameters configurable in setup. The concept of PCD is the driver has these 
generic hook points for configuration, but the platform builder gets to chose 
what knobs get exposed. In this example the CPU and Chipset drivers code does 
not have to change between the zero setup platform and the uber setup platform. 
That is the concept behind allowing the platform to chose the type of the PCD.  

> So Set will not work on FixedAtBuild, right, because it is defined as CONST. 
> So you need to change the type in the .dsc file to Dynamic or DynamicEx or 
> Patchable (actually, I’m not sure if Patchable generates a CONST or not)
>  

Yes it does but Patchable is for a binary and the patching is done by a build 
tool. 

Thanks,

Andrew Fish

> Tim
>  
> From: Chip Ueltschey [mailto:chipj...@gmail.com] 
> Sent: Wednesday, August 28, 2013 5:26 PM
> To: edk2-devel@lists.sourceforge.net
> Subject: [edk2] Mixed Section Types for PCD
>  
> Is it legal to do this in a DEC file?
> [PcdsFixedAtBuild,PcdsPatchableInModule,PcdsDynamic]
>  
> That seems suspect since a PcdsFixedAtBuild type will not allow set, but a 
> PcdsDynamic will allow set.
> What is AutoGen supposed to do?
> Currently, I have an error where the C code wants to set a PCD in this 
> section.
>  
> Thanks,
> -chip
> --
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk___
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel

--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


Re: [edk2] Mixed Section Types for PCD

2013-08-28 Thread Tim Lewis
Chip -

It is legal. The types that are listed in the .dec file limit the types that a 
.dsc file can use. If none is specified in the .dsc file, then the first one 
will be used by default. So, for example, you may want to allow a .dsc file to 
support either Dynamic, DynamicEx or FixedAtBuild. So the .dec file lists all 
three. But if the .dsc file tries to use Patchable, it will fail.

So Set will not work on FixedAtBuild, right, because it is defined as CONST. So 
you need to change the type in the .dsc file to Dynamic or DynamicEx or 
Patchable (actually, I'm not sure if Patchable generates a CONST or not)

Tim

From: Chip Ueltschey [mailto:chipj...@gmail.com]
Sent: Wednesday, August 28, 2013 5:26 PM
To: edk2-devel@lists.sourceforge.net
Subject: [edk2] Mixed Section Types for PCD

Is it legal to do this in a DEC file?
[PcdsFixedAtBuild,PcdsPatchableInModule,PcdsDynamic]

That seems suspect since a PcdsFixedAtBuild type will not allow set, but a 
PcdsDynamic will allow set.
What is AutoGen supposed to do?
Currently, I have an error where the C code wants to set a PCD in this section.

Thanks,
-chip
--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


Re: [edk2] Mixed Section Types for PCD

2013-08-28 Thread Carsey, Jaben
I believe that is ok, but the INF in the module must declare the PCD as a 
Dynamic one if it wants to use set.

-Jaben

From: Chip Ueltschey [mailto:chipj...@gmail.com]
Sent: Wednesday, August 28, 2013 5:26 PM
To: edk2-devel@lists.sourceforge.net
Subject: [edk2] Mixed Section Types for PCD

Is it legal to do this in a DEC file?
[PcdsFixedAtBuild,PcdsPatchableInModule,PcdsDynamic]

That seems suspect since a PcdsFixedAtBuild type will not allow set, but a 
PcdsDynamic will allow set.
What is AutoGen supposed to do?
Currently, I have an error where the C code wants to set a PCD in this section.

Thanks,
-chip
--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


[edk2] Mixed Section Types for PCD

2013-08-28 Thread Chip Ueltschey
Is it legal to do this in a DEC file?
[PcdsFixedAtBuild,PcdsPatchableInModule,PcdsDynamic]

That seems suspect since a PcdsFixedAtBuild type will not allow set, but a
PcdsDynamic will allow set.
What is AutoGen supposed to do?
Currently, I have an error where the C code wants to set a PCD in this
section.

Thanks,
-chip
--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


Re: [edk2] [PATCH] MdePkg/AArch64: Fixed some definitions in ProcessorBind.h

2013-08-28 Thread Gao, Liming
Olivier:
   The patch is good. Reviewed-by: Liming Gao 

From: Olivier Martin [mailto:olivier.mar...@arm.com]
Sent: Thursday, August 08, 2013 5:33 PM
To: Gao, Liming; Kinney, Michael D
Cc: edk2-devel@lists.sourceforge.net
Subject: [PATCH] MdePkg/AArch64: Fixed some definitions in ProcessorBind.h

Dear MdePkg maintainers,

Please find the attached patch that fixes some definitions of the AArch64 
ProcessorBind.h header file.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Olivier Martin 
olivier.mar...@arm.com

Best Regards,
Olivier
--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


Re: [edk2] [PATCH] MdePkg//BaseLib: Add Memory fence for AArch64

2013-08-28 Thread Gao, Liming
Olivier:
  Sorry for late response. For this patch, I don't find MemoryFence() 
implementation for ARM arch in BaseLib. Why only add it for AArch64?

Thanks
Liming
From: Olivier Martin [mailto:olivier.mar...@arm.com]
Sent: Thursday, August 08, 2013 5:02 PM
To: Gao, Liming; Kinney, Michael D
Cc: edk2-devel@lists.sourceforge.net
Subject: [PATCH] MdePkg//BaseLib: Add Memory fence for AArch64

Dear MdePkg maintainers,

Please find the attached patch that adds support for AArch64 MemoryFence() to 
BaseLib.

Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Harry Liebel mailto:harry.lie...@arm.com>>
Signed-off-by: Olivier Martin 
olivier.mar...@arm.com

Best Regards,
Olivier
--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


[edk2] Shell mode switch bug?

2013-08-28 Thread David F.
Using latest source to build shell 2.00 UEFI 2.31 (American
Megatrends, 0x0004028D) - booting the on an Intel mobo -  boots to the
shell (small window - intel graphic still showing outside the 80x25
window) - press enter to scroll the screen a bit then type "mode 128
40", enter "help", type "mode 80 25", enter "help" again - scrolls
some error text repeating .. pause key doesn't work so can't read it.

--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


[edk2] Console Output to Last column/row without scrolling?

2013-08-28 Thread David F.
Hi,

I have the need to output a complete line (all the way to the last
column) on the last row and have it not scroll - I didn't see anything
in the simple output protocol to disable scrolling??  How is it done?
Is there a Ex version of the output protocol?

TIA!!

--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


Re: [edk2] [efibootmgr PATCH 0/7] support virtio-blk and virtio-scsi under OVMF

2013-08-28 Thread Laszlo Ersek
On 08/28/13 16:32, Andrew Fish wrote:

> This form is a special case called out in the UEFI spec. It was
> requested to make booting more resilient to minor configuration
> changes. For example if a PCI card was removed and then placed in
> another PCI slot the full device path would no longer match, but this
> partial device path would match. So it is proper UEFIness to boot
> from a device path that starts with a HD() node, implementation
> deferred to the reader

Indeed. With the patch I just posted (so that QemuBootOrder wouldn't get
in the way) I can now freely switch between virtio-scsi and virtio-blk,
and the boot continues to work. I used to have to fix up the boot option
previously.

Also, the RHEL-6 guest installation (clicking the Reboot button) is
working fine now: if I'm placing the hard disk first in the qemu boot
order, the VM reboots into the freshly installed OS.

I'm closing  as NOTABUG.

Thanks again!
Laszlo

--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


[edk2] [PATCH] OvmfPkg: QemuBootOrder: expand relative device paths in UEFI boot options

2013-08-28 Thread Laszlo Ersek
The prefix matching logic in Match()
[OvmfPkg/Library/PlatformBdsLib/QemuBootOrder.c] expects UEFI boot options
to specify full (absolute) device paths. However, partial (relative)
device paths starting with a HD() node are valid for booting. By not
recognizing them, QemuBootOrder.c misses (and deletes) valid boot options
that would otherwise match the user's preference.

Just like BdsLibBootViaBootOption() expands such paths with the
BdsExpandPartitionPartialDevicePathToFull() function for booting, do the
same in QemuBootOrder.c for prefix matching.

This moves the very first call to
BdsExpandPartitionPartialDevicePathToFull() to an earlier point. The
following call tree explains it:

BdsEntry()  
[IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c]
  PlatformBdsPolicyBehavior()   
[OvmfPkg/Library/PlatformBdsLib/BdsPlatform.c]
SetBootOrderFromQemu()  
[OvmfPkg/Library/PlatformBdsLib/QemuBootOrder.c]
  Match()   
[OvmfPkg/Library/PlatformBdsLib/QemuBootOrder.c]
BdsExpandPartitionPartialDevicePathToFull() 
[IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c]
  BdsBootDeviceSelect() 
[IntelFrameworkModulePkg/Universal/BdsDxe/BdsEntry.c]
BdsLibBootViaBootOption()   
[IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c]
  BdsExpandPartitionPartialDevicePathToFull()   
[IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c]

This should be fine, for two reasons:

- the new, earlier call is still under BdsEntry(),

- BdsExpandPartitionPartialDevicePathToFull() expects to be called
  repeatedly, even with the same set of HD() device paths. This function
  implements its own caching for device paths, likely for performance
  reasons.

  That fits this patch well because whatever device paths we expand under
  PlatformBdsPolicyBehavior() can be quickly looked up in
  BdsBootDeviceSelect(), so no work (ie.
  BdsLibConnectAllDriversToAllControllers()) should be wasted.

Contributed-under: TianoCore Contribution Agreement 1.0

Signed-off-by: Laszlo Ersek 
---
 OvmfPkg/Library/PlatformBdsLib/QemuBootOrder.c |   29 
 1 files changed, 29 insertions(+), 0 deletions(-)

diff --git a/OvmfPkg/Library/PlatformBdsLib/QemuBootOrder.c 
b/OvmfPkg/Library/PlatformBdsLib/QemuBootOrder.c
index c9b8556..e9580b9 100644
--- a/OvmfPkg/Library/PlatformBdsLib/QemuBootOrder.c
+++ b/OvmfPkg/Library/PlatformBdsLib/QemuBootOrder.c
@@ -882,6 +882,34 @@ Match (
   }
 
   //
+  // Attempt to expand any relative UEFI device path starting with HD() to an
+  // absolute device path first. The logic imitates BdsLibBootViaBootOption().
+  // We don't have to free the absolute device path,
+  // BdsExpandPartitionPartialDevicePathToFull() has internal caching.
+  //
+  Result = FALSE;
+  if (DevicePathType (DevicePath) == MEDIA_DEVICE_PATH &&
+  DevicePathSubType (DevicePath) == MEDIA_HARDDRIVE_DP) {
+EFI_DEVICE_PATH_PROTOCOL *AbsDevicePath;
+CHAR16   *AbsConverted;
+
+AbsDevicePath = BdsExpandPartitionPartialDevicePathToFull (
+  (HARDDRIVE_DEVICE_PATH *) DevicePath);
+if (AbsDevicePath == NULL) {
+  goto Exit;
+}
+AbsConverted = ConvertDevicePathToText (AbsDevicePath, FALSE, FALSE);
+if (AbsConverted == NULL) {
+  goto Exit;
+}
+DEBUG ((DEBUG_VERBOSE,
+  "%a: expanded relative device path \"%s\" for prefix matching\n",
+  __FUNCTION__, Converted));
+FreePool (Converted);
+Converted = AbsConverted;
+  }
+
+  //
   // Is Translated a prefix of Converted?
   //
   Result = (BOOLEAN)(StrnCmp (Converted, Translated, TranslatedLength) == 0);
@@ -892,6 +920,7 @@ Match (
 Converted,
 Result ? "match" : "no match"
 ));
+Exit:
   FreePool (Converted);
   return Result;
 }
-- 
1.7.1


--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


Re: [edk2] [efibootmgr PATCH 0/7] support virtio-blk and virtio-scsi under OVMF

2013-08-28 Thread Andrew Fish

On Aug 28, 2013, at 7:17 AM, Laszlo Ersek  wrote:

> On 08/28/13 14:52, Laszlo Ersek wrote:
> 
>> This filters the UEFI boot option list to those that the user requested
>> via fw_cfg, reorders them, and kills off the (non-requested) rest. UEFI
>> boot options of the form
>> 
>>  
>> HD(1,800,4e000,87f09d6f-dc40-4eaf-b90b-9c2c7d4ffdb5)File(\EFI\opensuse\grubx64.efi)
>> 
>> don't match *any* output from the OFW->UEFI device path translation,
>> hence they are always removed. I assumed that would be no problem, since
>> such (root-less, ie. relative) device paths should be unbootable anyway.
>> Apparently edk2 can boot them nonetheless?
> 
> Sigh. Yes, that's the case. See BdsLibBootViaBootOption() in
> "IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c":
> 

This form is a special case called out in the UEFI spec. It was requested to 
make booting more resilient to minor configuration changes. For example if a 
PCI card was removed and then placed in another PCI slot the full device path 
would no longer match, but this partial device path would match. So it is 
proper UEFIness to boot from a device path that starts with a HD() node, 
implementation deferred to the reader

Thanks,

Andrew Fish

>  //
>  // If it's Device Path that starts with a hard drive path, append it with 
> the front part to compose a
>  // full device path
>  //
>  WorkingDevicePath = NULL;
>  if ((DevicePathType (DevicePath) == MEDIA_DEVICE_PATH) &&
>  (DevicePathSubType (DevicePath) == MEDIA_HARDDRIVE_DP)) {
>WorkingDevicePath = BdsExpandPartitionPartialDevicePathToFull (
>  (HARDDRIVE_DEVICE_PATH *)DevicePath
>  );
>if (WorkingDevicePath != NULL) {
>  DevicePath = WorkingDevicePath;
>}
>  }
> 
> The simple StrnCmp() call in Match()
> [OvmfPkg/Library/PlatformBdsLib/QemuBootOrder.c] regresses this logic,
> because it kills the relative devpath -- starting with HD(...) -- before
> it could reach the quoted completion.
> 
> I'm not sure how to resolve this -- even in theory. The OpenFirmware
> device paths end *exactly before* the HD() part -- they simply don't
> contain the necessary information. The output of *any* OFW->UEFI
> translation can be matched *only* against the leading UEFI device
> sub-path. Which the HD(...) format currently prepared by efibootmgr
> lacks.
> 
> It could be worked around, maybe, by completing the relative devpath
> (with BdsExpandPartitionPartialDevicePathToFull(), see above) before
> matching it against the output of the OFW->UEFI translation.
> 
> Laszlo
> 
> --
> Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
> Discover the easy way to master current and previous Microsoft technologies
> and advance your career. Get an incredible 1,500+ hours of step-by-step
> tutorial videos with LearnDevNow. Subscribe today and save!
> http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
> ___
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel


--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


Re: [edk2] [efibootmgr PATCH 0/7] support virtio-blk and virtio-scsi under OVMF

2013-08-28 Thread Laszlo Ersek
On 08/28/13 14:52, Laszlo Ersek wrote:

> This filters the UEFI boot option list to those that the user requested
> via fw_cfg, reorders them, and kills off the (non-requested) rest. UEFI
> boot options of the form
> 
>   
> HD(1,800,4e000,87f09d6f-dc40-4eaf-b90b-9c2c7d4ffdb5)File(\EFI\opensuse\grubx64.efi)
> 
> don't match *any* output from the OFW->UEFI device path translation,
> hence they are always removed. I assumed that would be no problem, since
> such (root-less, ie. relative) device paths should be unbootable anyway.
> Apparently edk2 can boot them nonetheless?

Sigh. Yes, that's the case. See BdsLibBootViaBootOption() in
"IntelFrameworkModulePkg/Library/GenericBdsLib/BdsBoot.c":

  //
  // If it's Device Path that starts with a hard drive path, append it with the 
front part to compose a
  // full device path
  //
  WorkingDevicePath = NULL;
  if ((DevicePathType (DevicePath) == MEDIA_DEVICE_PATH) &&
  (DevicePathSubType (DevicePath) == MEDIA_HARDDRIVE_DP)) {
WorkingDevicePath = BdsExpandPartitionPartialDevicePathToFull (
  (HARDDRIVE_DEVICE_PATH *)DevicePath
  );
if (WorkingDevicePath != NULL) {
  DevicePath = WorkingDevicePath;
}
  }

The simple StrnCmp() call in Match()
[OvmfPkg/Library/PlatformBdsLib/QemuBootOrder.c] regresses this logic,
because it kills the relative devpath -- starting with HD(...) -- before
it could reach the quoted completion.

I'm not sure how to resolve this -- even in theory. The OpenFirmware
device paths end *exactly before* the HD() part -- they simply don't
contain the necessary information. The output of *any* OFW->UEFI
translation can be matched *only* against the leading UEFI device
sub-path. Which the HD(...) format currently prepared by efibootmgr
lacks.

It could be worked around, maybe, by completing the relative devpath
(with BdsExpandPartitionPartialDevicePathToFull(), see above) before
matching it against the output of the OFW->UEFI translation.

Laszlo

--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


Re: [edk2] [efibootmgr PATCH 0/7] support virtio-blk and virtio-scsi under OVMF

2013-08-28 Thread Laszlo Ersek
On 08/28/13 13:53, Michael Chang wrote:

> Do you have any suggestions on why it cannot be reproduce on my side ?
> Finally provide my virt-install options for reference.
>
> virt-install --connect qemu:///system --name vmos123efi
> --virt-type=kvm --os-type=linux --os-variant=opensuse12 --disk
> path=/dev/system/vmos123efi --network bridge=br0,model=virtio
> --cdrom=/home/linux/Downloads/openSUSE-12.3-DVD-x86_64.iso --vcpus=4
> --ram 1024 --boot loader=/home/linux/OVMF/OVMF-f1f4721.fd

Hm. This seems to suggest that edk2 can actually boot a
non-root-anchored (ie. relative) device path such as

  
HD(1,800,4e000,87f09d6f-dc40-4eaf-b90b-9c2c7d4ffdb5)File(\EFI\opensuse\grubx64.efi)

and that the difference between the symptoms we're seeing could be
rooted in the boot order handling
("OvmfPkg/Library/PlatformBdsLib/QemuBootOrder.c").

SetBootOrderFromQemu() implements the following nested loop:

  for each entry OFW in the fw_cfg boot order list:
translate the OpenFirmware device path OFW
to the UEFI device path DP_PREFIX
for each entry BOOT in the UEFI boot option list
  if DP_PREFIX is a prefix of BOOT:
append BOOT to the new boot order
  replace the current boot order with the new boot order

Basically, it loads the boot order specification from qemu, from the
"bootorder" fw_cfg file. That file contains device paths in OpenFirmware
format. Each entry there is converted to a UEFI device path prefix, and
looked up in the UEFI boot option list. If there's a match, the matching
UEFI boot option is appended to the new boot order.

This filters the UEFI boot option list to those that the user requested
via fw_cfg, reorders them, and kills off the (non-requested) rest. UEFI
boot options of the form

  
HD(1,800,4e000,87f09d6f-dc40-4eaf-b90b-9c2c7d4ffdb5)File(\EFI\opensuse\grubx64.efi)

don't match *any* output from the OFW->UEFI device path translation,
hence they are always removed. I assumed that would be no problem, since
such (root-less, ie. relative) device paths should be unbootable anyway.
Apparently edk2 can boot them nonetheless?

Note that when you configure a boot option in the OVMF TUI, that is
also an absolute device path.

(
  For example, consider the following boot order set in virt-manager:

(1) Hard Disk
(2) CDROM
(3) Network (PXE)

  In the domain XML this corresponds to


  ...
  
...



  
  ...


  Which libvirt in turn translates to the following qemu command line
  options:

-device 
scsi-hd,bus=scsi0.0,channel=0,scsi-id=5,lun=6,drive=drive-scsi0-0-5-6,id=scsi0-0-5-6,bootindex=1

 ^^^
-device 
ide-drive,bus=ide.1,unit=0,drive=drive-ide0-1-0,id=ide0-1-0,bootindex=2

^^^

-device 
virtio-net-pci,netdev=hostnet0,id=net0,mac=52:54:00:57:e2:b3,bus=pci.0,addr=0x3,bootindex=3

^^^

  Which in turn :) translates to the following contents in the
  "bootorder" fw_cfg file:

/pci@i0cf8/scsi@4/channel@0/disk@5,6
/pci@i0cf8/ide@1,1/drive@1/disk@0
/pci@i0cf8/ethernet@3/ethernet-phy@0

  As a result, SetBootOrderFromQemu() does the following:

SetBootOrderFromQemu: FwCfg:
/pci@i0cf8/scsi@4/channel@0/disk@5,6
/pci@i0cf8/ide@1,1/drive@1/disk@0
/pci@i0cf8/ethernet@3/ethernet-phy@0
SetBootOrderFromQemu: FwCfg: 

  Here the fw_cfg contents is dumped.

ParseOfwNode: DriverName="pci" UnitAddress="i0cf8" DeviceArguments=""
ParseOfwNode: DriverName="scsi" UnitAddress="4" DeviceArguments=""
ParseOfwNode: DriverName="channel" UnitAddress="0" DeviceArguments=""
ParseOfwNode: DriverName="disk" UnitAddress="5,6" DeviceArguments=""
TranslateOfwPath: success: "PciRoot(0x0)/Pci(0x4,0x0)/Scsi(0x5,0x6)"

  First entry (virtio-scsi disk, "/pci@i0cf8/scsi@4/channel@0/disk@5,6")
  has been translated from OFW to UEFI. No we enter the inner loop.

Match: against 
"PciRoot(0x0)/Pci(0x4,0x0)/Scsi(0x5,0x6)/HD(1,GPT,87B09CBE-32B9-4737-8ECC-C1E65702CFB6,0x800,0x64000)/\EFI\redhat\grub.efi":
 match

  A match was immediately found; this is placed as first boot option
  into BootOrder. We return to the outer loop.

ParseOfwNode: DriverName="pci" UnitAddress="i0cf8" DeviceArguments=""
ParseOfwNode: DriverName="ide" UnitAddress="1,1" DeviceArguments=""
ParseOfwNode: DriverName="drive" UnitAddress="1" DeviceArguments=""
ParseOfwNode: DriverName="disk" UnitAddress="0" DeviceArguments=""
TranslateOfwPath: success: 
"PciRoot(0x0)/Pci(0x1,0x1)/Ata(Secondary,Master,0x0)"

  Second OFW entry (IDE CD-ROM, "/pci@i0cf8/ide@1,1/drive@1/disk@0") has
  been translated, we enter the inner loop.

Match: against 
"PciRoot(0x0)/Pci(0x4,0x0)/Scsi(0x5,0x6)/HD(1,GPT,87B09CBE-32B9-4737-8ECC-C1

Re: [edk2] [Qemu-devel] OVMF hung on qemu 1.6.0 with KVM

2013-08-28 Thread Laszlo Ersek
On 08/28/13 13:49, Andreas Färber wrote:
> Am 28.08.2013 13:45, schrieb Laszlo Ersek:
>> (qemu-devel CC'd)
>>
>> On 08/28/13 12:35, Gary Ching-Pang Lin wrote:
>>> Hi,
>>>
>>> I recently updated qemu to 1.6.0 and found OVMF just showed a blank
>>> screen when kvm was enabled. I tried to dump OVMF log with the
>>> following commond but nothing was stored in debug.log.
>>>
>>> qemu-system-x86_64 -s -enable-kvm -bios OVMF.fd -debugcon file:debug.log 
>>> -global isa-debugcon.iobase=0x402
>>>
>>> The kvm trace was recorded with "trace-cmd record -b 2 -e kvm"
>>> and uploaded to the following link:
>>> https://docs.google.com/file/d/0B9hbtlc_aK_gcGh2TDZLUVlzWWc/edit?usp=sharing
>>>
>>> I found a similar case with kernel < 3.9, but I already upgraded linux
>>> kernel to 3.10.5, so this may be another bug.
>>
>> Well, the usual first response in cases like this is...
>>
>> Can you bisect qemu? :)
> 
> We had a similar report:
> https://bugzilla.novell.com/show_bug.cgi?id=835895

Well that's sorta the same report, considering you and Gary both work
for SUSE, and the Novell BZ seems to imply the build in question was Gary's:

> qemu 1.6.0 fails to run the tianocore firmware
> (home:gary_lin:UEFI/OVMF) properly. This worked with previous qemu

> versions:

:)

> 
> git-bisect said:
> 235e8982ad393e5611cb892df54881c872eea9e1 is the first bad commit
> commit 235e8982ad393e5611cb892df54881c872eea9e1
> Author: Jordan Justen 
> Date:   Wed May 29 01:27:26 2013 -0700
> 
> kvm: support using KVM_MEM_READONLY flag for regions
> 
> For readonly memory regions and rom devices in romd_mode,
> we make use of the KVM_MEM_READONLY. A slot that uses
> KVM_MEM_READONLY can be read from and code can execute from the
> region, but writes will exit to qemu.
> 
> For rom devices with !romd_mode, we force the slot to be
> removed so reads or writes to the region will exit to qemu.
> (Note that a memory region in this state is not executable
> within kvm.)
> 
> v7:
>  * Update for readable => romd_mode rename (5f9a5ea1)
> 
> Signed-off-by: Jordan Justen 
> Reviewed-by: Xiao Guangrong  (v4)
> Reviewed-by: Paolo Bonzini  (v5)
> Message-id: 1369816047-16384-4-git-send-email-jordan.l.jus...@intel.com
> Signed-off-by: Anthony Liguori 
> 
> 
> Any hints or patches welcome. :)

Hm. LP 1212402  probably
concerns the "similar case with kernel < 3.9" mentioned by Gary, and is
likely not revelant here.


Gary & Ludwig, can you confirm that your OVMF build includes SVN r14494?

Author: Jordan Justen 
Date:   Thu Jul 18 22:51:27 2013 +

OvmfPkg/Sec: Build identity mapped pages in RAM for X64

This is based on MdeModulePkg/Core/DxeIplPeim/X64/VirtualMemory.c.

Previously we would run using page tables built into the
firmware device.

If a flash memory is available, it is unsafe for the page
tables to be stored in memory since the processor may try
to write to the page table data structures.

Additionally, when KVM ROM support is enabled for the
firmware device, then PEI fails to boot when the page
tables are in the firmware device.

Thanks
Laszlo

--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


Re: [edk2] [efibootmgr PATCH 0/7] support virtio-blk and virtio-scsi under OVMF

2013-08-28 Thread Michael Chang
Hi Laszlo,

I have read the bug report, and confirmed that my efibootmgr possesses
the same problem.

BootCurrent: 0004
BootOrder: 0005,,0001,0002,0003,0004
Boot* EFI DVD/CDROM ACPI(a0341d0,0)PCI(1,1)ATAPI(1,0,0)
Boot0001* EFI FloppyACPI(a0341d0,0)PCI(1,0)ACPI(60441d0,0)
Boot0002* EFI Floppy 1  ACPI(a0341d0,0)PCI(1,0)ACPI(60441d0,1)
Boot0003* EFI Network   ACPI(a0341d0,0)PCI(3,0)MAC(52540076e9a3,1)
Boot0004* EFI Internal ShellMM(b,3fb0e000,3ffbdfff)
Boot0005* opensuse
HD(1,800,4e000,87f09d6f-dc40-4eaf-b90b-9c2c7d4ffdb5)File(\EFI\opensuse\grubx64.efi)

However I did not stumble into the problem. I checked with my EFI
preboot environment to make sure that virtio-blk DXE driver were
really in use to manage my disk.

> drivers

T   D
D   Y C I
R   P F A
V  VERSION  E G G #D #C DRIVER NAME IMAGE NAME
==  = = = == == === ===

45 0010 D - -  1  - Virtio Block Driver VirtioBlkDxe
46 0010 ? - -  -  - Virtio SCSI Host Driver VirtioScsiDxe

> dh -d 45

 45: Image(VirtioBlkDxe) ImageDevPath
(..3CA9-4F93-BA2E-4780ED3E03B5))DriverBinding ComponentName
ComponentName2
 Driver Name: Virtio Block Driver
 Image Name : FvFile(11D92DFB-3CA9-4F93-BA2E-4780ED3E03B5)
 Driver Version : 0010
 Driver Type: DEVICE
 Configuration  : NO
 Diagnostics: NO
 Managing   :
   Ctrl[81] : PciRoot(0x0)/Pci(0x4,0x0)

> map fs0

Device mapping table
  fs0:HardDisk - Alias hd21b blk0
  
PciRoot(0x0)/Pci(0x4,0x0)/HD(1,GPT,87F09D6F-DC40-4EAF-B90B-9C2C7D4FFDB5,0x800,0x4E000)

Do you have any suggestions on why it cannot be reproduce on my side ?
Finally provide my virt-install options for reference.

virt-install --connect qemu:///system --name vmos123efi
--virt-type=kvm --os-type=linux --os-variant=opensuse12 --disk
path=/dev/system/vmos123efi --network bridge=br0,model=virtio
--cdrom=/home/linux/Downloads/openSUSE-12.3-DVD-x86_64.iso --vcpus=4
--ram 1024 --boot loader=/home/linux/OVMF/OVMF-f1f4721.fd

Thanks,
Michael

2013/8/27 Laszlo Ersek :
> OVMF is "UEFI boot firmware for virtual machines", hence a new use case
> for efibootmgr [1] [2]. A virtual machine can have virtio-blk and
> virtio-scsi disks, and OVMF supports them with the VirtioBlkDxe and
> VirtioScsiDxe drivers. Let's recognize such disks, and produce correct
> boot options for them.
>
> [1] http://sourceforge.net/apps/mediawiki/tianocore/index.php?title=OVMF_FAQ
> [2] http://www.linux-kvm.org/page/OVMF
>
> Posting to edk2-devel for lack of a dedicated efibootmgr list.
>
> Related RHBZ: https://bugzilla.redhat.com/show_bug.cgi?id=998611
>
> Laszlo Ersek (7):
>   disk_info_from_fd(): get major/minor from buf.st_rdev
>   disk_get_pci(): expose detected interface type
>   produce virtio-blk device paths under EDD 3.0
>   disk_info_from_fd(): group output parameters into struct disk_info
>   disk_get_virt_pci(): generalize to arbitrary major & minor device
> numbers
>   prevent out-of-bounds access with SCSI_IOCTL_GET_PCI
>   produce virtio-scsi device paths under EDD 3.0
>
>  src/include/disk.h|   21 +++--
>  src/include/scsi_ioctls.h |6 +-
>  src/lib/disk.c|  217 
> ++---
>  src/lib/efi.c |   21 +++--
>  src/lib/scsi_ioctls.c |   17 +++-
>  5 files changed, 191 insertions(+), 91 deletions(-)
>
>
> --
> Introducing Performance Central, a new site from SourceForge and
> AppDynamics. Performance Central is your source for news, insights,
> analysis and resources for efficient Application Performance Management.
> Visit us today!
> http://pubads.g.doubleclick.net/gampad/clk?id=48897511&iu=/4140/ostg.clktrk
> ___
> edk2-devel mailing list
> edk2-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/edk2-devel
>

--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


Re: [edk2] OVMF hung on qemu 1.6.0 with KVM

2013-08-28 Thread Laszlo Ersek
(qemu-devel CC'd)

On 08/28/13 12:35, Gary Ching-Pang Lin wrote:
> Hi,
> 
> I recently updated qemu to 1.6.0 and found OVMF just showed a blank
> screen when kvm was enabled. I tried to dump OVMF log with the
> following commond but nothing was stored in debug.log.
> 
> qemu-system-x86_64 -s -enable-kvm -bios OVMF.fd -debugcon file:debug.log 
> -global isa-debugcon.iobase=0x402
> 
> The kvm trace was recorded with "trace-cmd record -b 2 -e kvm"
> and uploaded to the following link:
> https://docs.google.com/file/d/0B9hbtlc_aK_gcGh2TDZLUVlzWWc/edit?usp=sharing
> 
> I found a similar case with kernel < 3.9, but I already upgraded linux
> kernel to 3.10.5, so this may be another bug.

Well, the usual first response in cases like this is...

Can you bisect qemu? :)

Laszlo


--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


Re: [edk2] which Linux distro to use with current UDK?

2013-08-28 Thread Laszlo Ersek
On 08/27/13 23:30, Blibbet wrote:
> Hi,
> 
> I need to setup a VirtualBox-based VM of a Linux distro, and then setup 
> EDK-II/UDK and some samples sources, for use in a class.
> 
> The wiki still recommends Ubuntu 10.10. But that's a very old release.
> 
> Are there any issues using the current UDK with Ubuntu 13.04 (Raring 
> Ringtail), or 12.10 (Quantal Quetzal)?
> 
> Ubuntu aside, is there another good distro that works well with the UDK? 
> Perhaps Fedora, or another active Linux-based UEFI Forum member?

Since this is for school... you could try Scientific Linux 6.4.

http://en.wikipedia.org/wiki/Scientific_Linux

Laszlo


--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel


[edk2] OVMF hung on qemu 1.6.0 with KVM

2013-08-28 Thread Gary Ching-Pang Lin
Hi,

I recently updated qemu to 1.6.0 and found OVMF just showed a blank
screen when kvm was enabled. I tried to dump OVMF log with the
following commond but nothing was stored in debug.log.

qemu-system-x86_64 -s -enable-kvm -bios OVMF.fd -debugcon file:debug.log 
-global isa-debugcon.iobase=0x402

The kvm trace was recorded with "trace-cmd record -b 2 -e kvm"
and uploaded to the following link:
https://docs.google.com/file/d/0B9hbtlc_aK_gcGh2TDZLUVlzWWc/edit?usp=sharing

I found a similar case with kernel < 3.9, but I already upgraded linux
kernel to 3.10.5, so this may be another bug.

Cheers,

Gary Lin

--
Learn the latest--Visual Studio 2012, SharePoint 2013, SQL 2012, more!
Discover the easy way to master current and previous Microsoft technologies
and advance your career. Get an incredible 1,500+ hours of step-by-step
tutorial videos with LearnDevNow. Subscribe today and save!
http://pubads.g.doubleclick.net/gampad/clk?id=58040911&iu=/4140/ostg.clktrk
___
edk2-devel mailing list
edk2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/edk2-devel