qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Anton Gerasimov <anton@advancedtelematic.com>
To: Bin Meng <bmeng.cn@gmail.com>, Igor Mammedov <imammedo@redhat.com>
Cc: U-Boot Mailing List <u-boot@lists.denx.de>, qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [U-Boot] Support of latest qemux86-64
Date: Fri, 10 Nov 2017 18:04:52 +0100	[thread overview]
Message-ID: <1cc32460-6067-0c1c-0182-eb17933293d9@advancedtelematic.com> (raw)
In-Reply-To: <CAEUhbmXJZnLZgx8b2ZHV1wfqZvO=agSsp0Yvi7FQQfV6MM1cnA@mail.gmail.com>

New guess:

in the most safe configuration of u-boot (CONFIG_SMP=n, lacpi disabled)
with Igor's patch applied `qemu-system-i386 -bios /path/to/uboot.rom`
fails on the first 'ret' instruction. GDB shows that memory at $esp
(0xdfffc at the entrance to board_init_f_mem) and everything around it
is zero despite 'call' and 'push' instructions executed. If you go one
commit before the breaking one it works fine, stuff gets put onto stack.
Could it that be that stack itself is in this 'readonly' area?

Thanks,
Anton Gerasimov

On 11/09/2017 02:58 AM, Bin Meng wrote:
> On Wed, Nov 8, 2017 at 9:05 PM, Anton Gerasimov
> <anton@advancedtelematic.com> wrote:
>> Adding Igor Mammedov to the loop.
>>
> Really add Igor Mammedov.
>
> Igor, can you help look at this?
>
>> On 11/08/2017 01:59 PM, Anton Gerasimov wrote:
>>> To whoever might be interested: I've bisected qemu and the breaking
>>> commit is 208fa0e43645edd0b0d8f838857dfc79daff40a8 (pc: make 'pc.rom'
>>> readonly when machine has PCI enabled). It's just three lines added,
>>> I'll paste the whole patch here. Not quite sure what can we do here though.
>>>
>>>
>>>   diff --git a/hw/i386/pc.c b/hw/i386/pc.c
>>>   index 22e16031b0..59435390ba 100644
>>>   --- a/hw/i386/pc.c
>>>   +++ b/hw/i386/pc.c
>>>   @@ -1443,6 +1443,9 @@ void pc_memory_init(PCMachineState *pcms,
>>>        option_rom_mr = g_malloc(sizeof(*option_rom_mr));
>>>        memory_region_init_ram(option_rom_mr, NULL, "pc.rom", PC_ROM_SIZE,
>>>                               &error_fatal);
>>>   +    if (pcmc->pci_enabled) {
>>>   +        memory_region_set_readonly(option_rom_mr, true);
>>>   +    }
>>>        memory_region_add_subregion_overlap(rom_memory,
>>>                                            PC_ROM_MIN_VGA,
>>>                                            option_rom_mr,
>>>
>>>
> Regards,
> Bin


-- 
Anton Gerasimov, ATS Advanced Telematic Systems GmbH
Kantstrasse 162, 10623 Berlin
Managing Directors: Dirk Pöschl, Armin G. Schmidt
Register Court: HRB 151501 B, Amtsgericht Charlottenburg

  reply	other threads:[~2017-11-10 17:06 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <cb94e9b2-d7c6-68ab-bb25-42f7d8113e03@advancedtelematic.com>
2017-11-06  1:55 ` [Qemu-devel] [U-Boot] Support of latest qemux86-64 Bin Meng
2017-11-08 12:59   ` Anton Gerasimov
2017-11-08 13:05     ` Anton Gerasimov
2017-11-09  1:58       ` Bin Meng
2017-11-10 17:04         ` Anton Gerasimov [this message]
2017-11-10 17:25           ` Anton Gerasimov
2017-11-10 17:34             ` Anton Gerasimov
2017-11-13  3:16               ` Bin Meng

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-all 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=1cc32460-6067-0c1c-0182-eb17933293d9@advancedtelematic.com \
    --to=anton@advancedtelematic.com \
    --cc=bmeng.cn@gmail.com \
    --cc=imammedo@redhat.com \
    --cc=qemu-devel@nongnu.org \
    --cc=u-boot@lists.denx.de \
    /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;
as well as URLs for NNTP newsgroup(s).