From: Siarhei Siamashka <siarhei.siamashka@gmail.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] BeagleBoard B7 (OMAP3530) fails to boot with the current U-Boot master branch
Date: Sun, 5 Mar 2017 14:51:54 +0200 [thread overview]
Message-ID: <20170305145154.757a4636@i7> (raw)
Hello All,
I have just unexpectedly found an old Beagleboard B7 in my closet and
tried to compile the current U-Boot master branch for it. Appears that
it is broken since almost 2 years ago:
https://lists.denx.de/pipermail/u-boot/2015-July/220332.html
https://lists.denx.de/pipermail/u-boot/2016-May/253777.html
And after trying to narrow it down, looks like the failure happens in
the prcm_init() function from 'arch/arm/mach-omap2/omap3/clock.c' when
it is compiled as Thumb2. At least the SPL can successfully boot after
the following change (GCC6 is needed for this pragma):
diff --git a/arch/arm/mach-omap2/omap3/clock.c b/arch/arm/mach-omap2/omap3/clock.c
index 006969e..8064fa6 100644
--- a/arch/arm/mach-omap2/omap3/clock.c
+++ b/arch/arm/mach-omap2/omap3/clock.c
@@ -592,6 +592,8 @@ static void iva_init_36xx(u32 sil_index, u32 clk_index)
wait_on_value(ST_IVA2_CLK, 1, &prcm_base->idlest_pll_iva2, LDELAY);
}
+#pragma GCC target ("arm")
+
/******************************************************************************
* prcm_init() - inits clocks for PRCM as defined in clocks.h
* called from SRAM, or Flash (using temp SRAM stack).
@@ -700,6 +702,8 @@ void prcm_init(void)
sdelay(5000);
}
+#pragma GCC target ("thumb")
+
/*
* Enable usb ehci uhh, tll clocks
*/
Now it's very interesting to figure out what exactly is wrong
there. OMAP3530 and DM3730 have different code paths in this
function, so it's not very surprising that only OMAP3530 is
broken.
Yes, I know that OMAP3530 has a very old and buggy Cortex-A8 core.
But I tried to apply all the Thumb2 related errata workarounds early
in 'arch/arm/cpu/armv7/start.S'. And also enforced single-issue
execution (bit 10 in the AUXCR) as a workaround for the most nasty
erratum (657417: A 32-bit branch instruction that spans two 4K regions
can result in an incorrect operation) just because I don't fully trust
the linker.
--
Best regards,
Siarhei Siamashka
next reply other threads:[~2017-03-05 12:51 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-05 12:51 Siarhei Siamashka [this message]
2017-03-05 14:27 ` [U-Boot] BeagleBoard B7 (OMAP3530) fails to boot with the current U-Boot master branch Tom Rini
2017-03-06 2:21 ` Siarhei Siamashka
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=20170305145154.757a4636@i7 \
--to=siarhei.siamashka@gmail.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