public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: "wang xiaofeng" <winggundum82@163.com>
To: "Andrew Fish" <afish@apple.com>
Cc: edk2-devel@lists.01.org
Subject: Re: Issue of step by step debugging of OVMF SEC code in QEMU
Date: Fri, 4 Aug 2017 11:26:16 +0800 (CST)	[thread overview]
Message-ID: <658f46e8.3e64.15dab478377.Coremail.winggundum82@163.com> (raw)
In-Reply-To: <14E6BF08-E850-4DBD-BA6E-EE1ED90B97AA@apple.com>

HI Andrew,
     How can I adjust the debugger to correct mode? Or I have to enable the debug after swtich to protected mode?








At 2017-08-04 10:57:16, "Andrew Fish" <afish@apple.com> wrote:
>The reset vector is 16-bit real mode, so you have the debugger in the wrong mode. The code should transition to 32 bit protected early in the flow.
>
>Sent from my iPhone
>
>> On Aug 3, 2017, at 7:47 PM, wang xiaofeng <winggundum82@163.com> wrote:
>> 
>> Hello,
>>       I am tring to add my own SEC code base on OVMF and run on QEMU. Since the code cannot run I need to step to step trace the assembly code .
>>      The hang point is very early before I can use either UDK or debug serial output. I tried to use gdb to connect to QEMU.I start gdb in another terminal, and issue the following commands:
>>  (gdb) set architecture i386:x86-64:intel
>>  (gdb) target remote localhost:1234
>>   It really stops at the bios first instruction at 0XFFFFFFF0. But gdb shows eip= 0xFFF0 and CS=0xF000(why it not be 0xfff0). After I trigger the command "display /i $pc"
>>   It shows the assembly code in 0xFFF0 instead of    0XFFFFFFF0, so the information is incorrect.
>>   Anyone knows how to corrently debug the SEC code ? Other debug tool is also ok.
>>   Thanks in advance!
>> 
>> 
>> 
>> _______________________________________________
>> 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
\x16&#65533;&

  parent reply	other threads:[~2017-08-04  3:24 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-03 23:11 [PATCH v3 0/1] Use BusMasterCommonBuffer to map FW_CFG_DMA_ACCESS Brijesh Singh
2017-08-03 23:11 ` [PATCH v3 1/1] OvmfPkg/QemuFwCfgLib: " Brijesh Singh
2017-08-04  2:47   ` Issue of step by step debugging of OVMF SEC code in QEMU wang xiaofeng
     [not found]     ` <14E6BF08-E850-4DBD-BA6E-EE1ED90B97AA@apple.com>
2017-08-04  3:26       ` wang xiaofeng [this message]
2017-08-04  3:41         ` wang xiaofeng
2017-08-04  4:35           ` Andrew Fish
2017-08-05  1:32   ` [PATCH v3 1/1] OvmfPkg/QemuFwCfgLib: Use BusMasterCommonBuffer to map FW_CFG_DMA_ACCESS Laszlo Ersek
2017-08-04 23:07 ` [PATCH v3 0/1] " Laszlo Ersek

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=658f46e8.3e64.15dab478377.Coremail.winggundum82@163.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox