All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Daney <ddaney.cavm@gmail.com>
To: Aaro Koskinen <aaro.koskinen@iki.fi>
Cc: Paul Martin <paul.martin@codethink.co.uk>, linux-mips@linux-mips.org
Subject: Re: [PATCH 0/6] MIPS: OCTEON: Patches to enable Little Endian
Date: Mon, 16 Mar 2015 15:02:42 -0700	[thread overview]
Message-ID: <55075302.5040904@gmail.com> (raw)
In-Reply-To: <20150316211032.GD586@fuloong-minipc.musicnaut.iki.fi>

On 03/16/2015 02:10 PM, Aaro Koskinen wrote:
> Hi,
>
> On Mon, Mar 16, 2015 at 12:44:50PM -0700, David Daney wrote:
>> On 03/16/2015 12:27 PM, Aaro Koskinen wrote:
>>> On Mon, Mar 16, 2015 at 10:39:40AM +0000, Paul Martin wrote:
>>>> On Fri, Mar 13, 2015 at 08:52:58PM +0200, Aaro Koskinen wrote:
>>>>> On Fri, Mar 13, 2015 at 05:34:52PM +0000, Paul Martin wrote:
>>>>>> Octeon II CPUs can switch from Big Endian to Little Endian freely
>>>>>> even in kernel/supervisor mode.
>>>>>
>>>>> You are enabling it on all OCTEONS. Is that valid? At least octeon-usb
>>>>> still needs to be fixed for little-endian mode.
>>>>
>>>> The USB works perfectly with the patches that were posted to this list
>>>> over the last couple of months.
>>>
>>> I was referring to driver for OCTEON+ USB controller in staging.
>>> ERPro uses EHCI, so it's different. Anyway, I can try to fix the most
>>> obvious issues myself e.g. bitfields.
>>
>> OCTEON Plus CPUs (i.e. those with afore mentioned USB controller) don't
>> really support Little-Endian operation, so it may not be worth doing
>> anything with that driver.
>>
>> There are several problems:
>>
>> 1) The system bootloader (u-boot) must have support for booting
>> Little-Endian.  EdgeRouter LITE doesn't have the proper support.  In theory
>> you could write a LE booting shim, but I am too lazy to explain what it must
>> do...
>
> Would it be possible to support kexec from BE kernel ==> LE kernel?
>

In theory it would.  This is essentially the LE booting shim idea:

1) Scramble up memory contents and certain data structures normally 
supplied by the boot loader to be in Little Endian access order.

2) Switch CPU to Little Endian mode.

3) Jump to real kernel entry point.

4) Hope all on-chip hardware units work in LE mode, as many haven't been 
tested.  Serial port, I2C, MDIO known to work, boot bus is known not to 
work, haven't tested PCI, Network, or USB.



> A.
>
>

  reply	other threads:[~2015-03-16 22:02 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-03-13 17:34 [PATCH 0/6] MIPS: OCTEON: Patches to enable Little Endian Paul Martin
2015-03-13 17:34 ` [PATCH 1/6] MIPS: OCTEON: Tell the kernel build system we can do " Paul Martin
2015-03-13 17:48   ` Sergei Shtylyov
2015-03-13 18:37   ` Aaro Koskinen
2015-03-13 17:34 ` [PATCH 2/6] MIPS: OCTEON: Ensure CPUs come up little endian Paul Martin
2015-03-13 18:44   ` Aaro Koskinen
2015-03-13 17:34 ` [PATCH 3/6] MIPS: OCTEON: Turn hardware bitfields and structures inside out Paul Martin
2015-03-13 17:34 ` [PATCH 4/6] MIPS: OCTEON: Set appropriate endianness in L2C registers Paul Martin
2015-03-13 17:34 ` [PATCH 5/6] MIPS: OCTEON: Reverse the order of register accesses to the FAU Paul Martin
2015-03-13 17:34 ` [PATCH 6/6] MIPS: OCTEON: Set up ethernet hardware for little endian Paul Martin
2015-03-13 18:52 ` [PATCH 0/6] MIPS: OCTEON: Patches to enable Little Endian Aaro Koskinen
2015-03-16 10:39   ` Paul Martin
2015-03-16 19:27     ` Aaro Koskinen
2015-03-16 19:44       ` David Daney
2015-03-16 21:10         ` Aaro Koskinen
2015-03-16 22:02           ` David Daney [this message]
2015-03-16 14:57   ` Paul Martin

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=55075302.5040904@gmail.com \
    --to=ddaney.cavm@gmail.com \
    --cc=aaro.koskinen@iki.fi \
    --cc=linux-mips@linux-mips.org \
    --cc=paul.martin@codethink.co.uk \
    /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.