All of lore.kernel.org
 help / color / mirror / Atom feed
From: Evgeny Voevodin <e.voevodin@samsung.com>
To: Peter Maydell <peter.maydell@linaro.org>
Cc: kyungmin.park@samsung.com, m.kozlov@samsung.com,
	jehyung.lee@samsung.com, qemu-devel@nongnu.org,
	d.solodkiy@samsung.com
Subject: Re: [Qemu-devel] [PATCH v8 2/8] ARM: Samsung exynos4210-based boards emulation
Date: Thu, 19 Jan 2012 17:15:14 +0400	[thread overview]
Message-ID: <4F181762.9070100@samsung.com> (raw)
In-Reply-To: <CAFEAcA-+cgPu66AvLQSa8tObZeCG5vZtFFLFgiFWOAwzNiySAg@mail.gmail.com>

On 01/19/2012 04:19 PM, Peter Maydell wrote:
> On 19 January 2012 08:31, Evgeny Voevodin<e.voevodin@samsung.com>  wrote:
>
>> +    /*
>> +     * Secondary CPU startup code will be placed here.
>> +     */
>> +    memory_region_init_ram(&s->hack_mem, "exynos4210.hack", 0x1000);
>> +    memory_region_add_subregion(system_mem, EXYNOS4210_SMP_BOOT_ADDR,
>> +&s->hack_mem);
> I've been thinking about this 'hack' memory region, because I figured
> out that we didn't actually need it on vexpress (or realview, though
> I haven't submitted a patch to fix that yet). Basically the idea is that
> we need to put the secondary CPU startup code somewhere where Linux
> won't trash it before the secondary cores get started properly. However
> this requirement exists also for the real hardware. So the right thing
> to do here is identify where the real hardware's boot ROM puts the
> secondary CPU holding pen code, and use the same thing. (On vexpress
> this is in an area of SDRAM). What does the Exynos4 hardware/bootrom do
> here?
>
In our case it is not a hack. Secondary CPU boot loader resides in ROM 
memory.
And we have mapped a region in the ROM to place our boot-loader code there.
Here all is correct.
>> +    /*
>> +     * Hack: Map SECOND_CPU_BOOTREG, because it is in PMU USER5 register.
>> +     */
>> +    memory_region_init_ram(&s->bootreg_mem, "exynos4210.bootreg", 0x4);
>> +    memory_region_add_subregion(system_mem, EXYNOS4210_SECOND_CPU_BOOTREG,
>> +&s->bootreg_mem);
> If this was modelled as an actual register in a device model with a reset
> function we wouldn't have needed the code in arm_boot.c:do_cpu_reset()
> that clears smp_bootreg_addr. I think that's an argument for implementing
> this as an actual qdev device, however minimal (one that implements
> exactly one register would do) rather than as a bit of RAM.
>
Boot reg could be in the RAM on other platforms and code which is 
monitoring this address
is awaiting a non-zero value here. If we would not clear this region, wrong
boot address for secondary CPU will be read. So, code to clear this region
should be at reset function anyway.
I think that it is a matter of current board how to manage boot address -
map a region or implement a device.

>> +static QEMUMachine nuri_machine = {
>> +        .name = "nuri",
>> +        .desc = "Samsung NURI board (Exynos4210)",
>> +        .init = nuri_init,
>> +        .max_cpus = EXYNOS4210_MAX_CPUS,
>> +};
>> +
>> +static QEMUMachine smdkc210_machine = {
>> +        .name = "smdkc210",
>> +        .desc = "Samsung SMDKC210 board (Exynos4210)",
>> +        .init = smdkc210_init,
>> +        .max_cpus = EXYNOS4210_MAX_CPUS,
>> +};
> Indentation in these is still wrong.
>
Sorry, will fix.
> -- PMM
>


-- 
Kind regards,
Evgeny Voevodin,
Leading Software Engineer,
ASWG, Moscow R&D center, Samsung Electronics
e-mail: e.voevodin@samsung.com

  reply	other threads:[~2012-01-19 13:15 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-01-19  8:31 [Qemu-devel] [PATCH v8 0/8] ARM: Samsung Exynos4210-based boards support Evgeny Voevodin
2012-01-19  8:31 ` [Qemu-devel] [PATCH v8 1/8] ARM: exynos4210: IRQ subsystem support Evgeny Voevodin
2012-01-19 12:05   ` Peter Maydell
2012-01-19  8:31 ` [Qemu-devel] [PATCH v8 2/8] ARM: Samsung exynos4210-based boards emulation Evgeny Voevodin
2012-01-19 12:19   ` Peter Maydell
2012-01-19 13:15     ` Evgeny Voevodin [this message]
2012-01-19 13:26       ` Peter Maydell
2012-01-19 13:17   ` Andreas Färber
2012-01-20  7:18     ` Kyungmin Park
2012-01-19  8:31 ` [Qemu-devel] [PATCH v8 3/8] ARM: exynos4210: UART support Evgeny Voevodin
2012-01-19 12:35   ` Peter Maydell
2012-01-19  8:31 ` [Qemu-devel] [PATCH v8 4/8] ARM: exynos4210: PWM support Evgeny Voevodin
2012-01-19 12:40   ` Peter Maydell
2012-01-19  8:31 ` [Qemu-devel] [PATCH v8 5/8] ARM: exynos4210: MCT support Evgeny Voevodin
2012-01-19 12:46   ` Peter Maydell
2012-01-19  8:31 ` [Qemu-devel] [PATCH v8 6/8] hw/lan9118: Add basic 16-bit mode support Evgeny Voevodin
2012-01-19 12:41   ` Peter Maydell
2012-01-19  8:31 ` [Qemu-devel] [PATCH v8 7/8] hw/exynos4210.c: Add LAN support for SMDKC210 Evgeny Voevodin
2012-01-19  8:31 ` [Qemu-devel] [PATCH v8 8/8] Exynos4210: added display controller implementation Evgeny Voevodin
2012-01-19 12:44   ` Peter Maydell

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=4F181762.9070100@samsung.com \
    --to=e.voevodin@samsung.com \
    --cc=d.solodkiy@samsung.com \
    --cc=jehyung.lee@samsung.com \
    --cc=kyungmin.park@samsung.com \
    --cc=m.kozlov@samsung.com \
    --cc=peter.maydell@linaro.org \
    --cc=qemu-devel@nongnu.org \
    /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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.