public inbox for linux-arm-kernel@lists.infradead.org
 help / color / mirror / Atom feed
* Merging code with arch condition into head.S
@ 2016-08-18 10:35 Rafał Miłecki
  2016-08-18 10:47 ` Ard Biesheuvel
  0 siblings, 1 reply; 7+ messages in thread
From: Rafał Miłecki @ 2016-08-18 10:35 UTC (permalink / raw)
  To: linux-arm-kernel

Hi,

I'd like to ask for help with writing my arcm/arm/boot/compressed/head-foo.S.

There is probably a bug in bootloader on *a lot* market-available
devices that needs a very early fix executed during decompression. If
we don't implement it, Broadcom Northstar devices hang in 25% of tries
and BCM53573 devices don't boot at all.

The problem is ARCH_BCM_5301X is used with ARCH_MULTI_V7, so we really
shouldn't merge some extra code into head.S and execute it
unconditionally. I'd like to ask if you can suggest some idea for a
sane architecture check.

Ideally I'd read it from DT, but I don't think I can read machine
"compatible" from ASM. As alternative I could try reading SoC chip ID
from ChipCommon component which Broadcom always maps at 0x18000000.
Would that be safe enough? Could reading from such offset do any harm
on other devices?

Maybe you have some better ideas?

I was looking for similar solutions in the kernel, but I found none.
There are e.g. head-sa1100.S and head-sharpsl.S but they seem to be
used on architectures that don't use ARCH_MULTI_V7.

-- 
Rafa?

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2016-08-18 14:55 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-08-18 10:35 Merging code with arch condition into head.S Rafał Miłecki
2016-08-18 10:47 ` Ard Biesheuvel
2016-08-18 13:23   ` Rafał Miłecki
2016-08-18 13:47     ` Andrew Lunn
2016-08-18 14:19       ` Rafał Miłecki
2016-08-18 14:44         ` Andrew Lunn
2016-08-18 14:55           ` Jason Cooper

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox