From: Peter Tyser <ptyser@xes-inc.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH V2] arm: Tegra2: add support for A9 CPU init
Date: Fri, 25 Mar 2011 11:02:30 -0500 [thread overview]
Message-ID: <1301068950.24947.237.camel@petert> (raw)
In-Reply-To: <1300492605-15129-1-git-send-email-twarren@nvidia.com>
Hi Tom,
Things look pretty good. Minor comments/questions below.
<snip>
> +/*
> + * TBD: Move cold_boot() to assembly file.
> + * Values/offsets of the table vars make this difficult.
> + */
> +
> +void cold_boot(void)
> +{
> + asm volatile(
> + "msr cpsr_c, #0xD3 \n"
> + /*
> + * Check current processor: CPU or AVP?
> + * If CPU, go to CPU boot code, else continue on AVP path.
> + */
> + "mov r0, %0 \n"
> + "ldrb r2, [r0, %1] \n"
> + /* are we the CPU? */
> + "cmp r2, %2 \n"
> + "mov sp, %3 \n"
> + /* yep, we are the CPU */
> + "bxeq %4 \n"
> +
> + /* AVP initialization follows this path */
> + "mov sp, %5 \n"
> + /* Init and start CPU */
> + "b startup_cpu \n"
> + :
> + : "i"(NV_PA_PG_UP_BASE),
> + "i"(PG_UP_TAG_0),
> + "r"(proc_tag),
> + "r"(cpu_boot_stack),
> + "r"(_armboot_start),
> + "r"(avp_boot_stack)
> + : "r0", "r2", "cc", "lr"
> + );
> +}
What errors did you encounter when this was in the assembly file? It'd
be nice to put it there now. Likely it will never get fixed if it
doesn't implemented correctly off the bat. If you post the errors
perhaps someone on the list can provide insight.
<snip>
> +.globl startup_cpu
> +startup_cpu:
> + @ Initialize the AVP, clocks, and memory controller
> + @ SDRAM is guaranteed to be on at this point
> +
> + ldr r0, =cold_boot @ R0 = reset vector for CPU
> + bl start_cpu @ start the CPU
> +
> + @ Transfer control to the AVP code */
> + bl halt_avp
> +
> + @ Should never get here
> +_loop_forever2:
> + b _loop_forever2
> +
> +.globl cache_configure
> +cache_configure:
> + stmdb r13!,{r14}
> +@ /* invalidate instruction cache */
It looks like there's a combination of comment forms @, @ */, and @ /*
*/. Is there a reason not to use the normal /* */ universally?
Best,
Peter
next prev parent reply other threads:[~2011-03-25 16:02 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-18 23:56 [U-Boot] [PATCH V2] arm: Tegra2: add support for A9 CPU init Tom Warren
2011-03-25 16:02 ` Peter Tyser [this message]
2011-03-25 16:16 ` Tom Warren
2011-03-25 17:22 ` Peter Tyser
2011-03-25 18:05 ` Tom Warren
2011-03-25 19:56 ` Peter Tyser
2011-03-25 22:36 ` Alessandro Rubini
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=1301068950.24947.237.camel@petert \
--to=ptyser@xes-inc.com \
--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