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:34:06 +0100 [thread overview]
Message-ID: <542c6d12-2c19-40cf-2fb1-a250b115ef2b@advancedtelematic.com> (raw)
In-Reply-To: <ae876253-6a29-eacb-b990-860146a297b2@advancedtelematic.com>
Hooray, changing SYS_CAR_ADDR to 0x10000 in arch/x86/cpu/qemu/Kconfig
does the trick. Bin, what do you think about it?
Best regards,
Anton Gerasimov
On 11/10/2017 06:25 PM, Anton Gerasimov wrote:
> Yes, apparently 0xdfffc is in ROM area for QEMU (0xc0000 -- 0xe0000,
> defined in include/hw/loader.h). The next thing to figure out is why
> u-boot uses it as a stack area.
>
> Best regards,
> Anton Gerasimov
>
> On 11/10/2017 06:04 PM, Anton Gerasimov wrote:
>> 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
next prev parent reply other threads:[~2017-11-10 17:35 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
2017-11-10 17:25 ` Anton Gerasimov
2017-11-10 17:34 ` Anton Gerasimov [this message]
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=542c6d12-2c19-40cf-2fb1-a250b115ef2b@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).