* [U-Boot] Seperating MIPS processors
@ 2011-02-12 6:19 Aaron Williams
2011-02-12 16:29 ` Daniel Schwierzeck
0 siblings, 1 reply; 3+ messages in thread
From: Aaron Williams @ 2011-02-12 6:19 UTC (permalink / raw)
To: u-boot
Hi,
One thing that I have had to do in our Octeon port of U-Boot is to seperate
out the MIPS processors under /arch/mips/cpu much like has been done for ARM
and PowerPC.
I have no way of testing the other MIPS platforms, but I've seperated things
out as follows:
arch/mips/cpu/au1x00
arch/mips/cpu/incaip
arch/mips/cpu/mips32
arch/mips/cpu/octeon
arch/mips/cpu/purple
All of the code that's common between various 32-bit mips processors I put
under mips32 with only the processor specific files in the appropriate
directories. Is this how I should do it?
Right now I can't really use any of the other MIPS files for our Octeon
processor. There's just too many differences for this to make sense.
I basically have the following directory structure:
arch/mips/cpu/au1x00/au1x00_eth.c
arch/mips/cpu/au1x00/au1x00_serial.c
arch/mips/cpu/au1x00/au1x00_usb_ohci.c
arch/mips/cpu/au1x00/au1x00_usb_ohci.h
arch/mips/cpu/au1x00/config.mk
arch/mips/cpu/au1x00/Makefile
arch/mips/cpu/incaip
arch/mips/cpu/incaip/config.mk
arch/mips/cpu/incaip/incaip_clock.c
arch/mips/cpu/incaip/incaip_wdt.S
arch/mips/cpu/incaip/Makefile
arch/mips/cpu/mips32
arch/mips/cpu/mips32/asc_serial.c
arch/mips/cpu/mips32/asc_serial.h
arch/mips/cpu/mips32/cache.S
arch/mips/cpu/mips32/cpu.c
arch/mips/cpu/mips32/interrupts.c
arch/mips/cpu/mips32/start.S
arch/mips/cpu/octeon
arch/mips/cpu/octeon/asc_serial.c
arch/mips/cpu/octeon/asc_serial.h
arch/mips/cpu/octeon/au1x00_eth.c
arch/mips/cpu/octeon/au1x00_serial.c
arch/mips/cpu/octeon/commands
arch/mips/cpu/octeon/commands/cmd_ddr.c
arch/mips/cpu/octeon/commands/cmd_eeprom.c
arch/mips/cpu/octeon/commands/cmd_elf64.c
arch/mips/cpu/octeon/commands/cmd_octeon_bootloader.c
arch/mips/cpu/octeon/commands/cmd_octeon.c
arch/mips/cpu/octeon/commands/cmd_octeon_linux.c
arch/mips/cpu/octeon/commands/cmd_octeon_mem.c
arch/mips/cpu/octeon/commands/cmd_octeon_nand.c
arch/mips/cpu/octeon/commands/cmd_octeon_tlveeprom.c
arch/mips/cpu/octeon/commands/cmd_qlm.c
arch/mips/cpu/octeon/config.mk
arch/mips/cpu/octeon/cpu.c
arch/mips/cpu/octeon/cvmx
arch/mips/cpu/octeon/cvmx/Makefile
arch/mips/cpu/octeon/dfm.c
arch/mips/cpu/octeon/incaip_clock.c
arch/mips/cpu/octeon/incaip_wdt.S
arch/mips/cpu/octeon/interrupts.c
arch/mips/cpu/octeon/lib_octeon.c
arch/mips/cpu/octeon/lib_octeon_shared.c
arch/mips/cpu/octeon/Makefile
arch/mips/cpu/octeon/memcpy.c
arch/mips/cpu/octeon/memset.c
arch/mips/cpu/octeon/mips_linux.c
arch/mips/cpu/octeon/octeon_boot.c
arch/mips/cpu/octeon/octeon_cf.c
arch/mips/cpu/octeon/octeon_dram.c
arch/mips/cpu/octeon/octeon_eth.c
arch/mips/cpu/octeon/octeon_io.c
arch/mips/cpu/octeon/octeon_ipd_bp_enable.S
arch/mips/cpu/octeon/octeon_ipd_bp_verify.c
arch/mips/cpu/octeon/octeon_nand.c
arch/mips/cpu/octeon/octeon_pci.c
arch/mips/cpu/octeon/octeon_pcie.c
arch/mips/cpu/octeon/octeon_serial.c
arch/mips/cpu/octeon/start.S
arch/mips/cpu/purple
arch/mips/cpu/purple/config.mk
arch/mips/cpu/purple/Makefile
While it might be quite a while until I can get our stuff into the mainline,
it would certainly make things easier for me not to have to place our stuff in
the same directory as the other processors.
-Aaron
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] Seperating MIPS processors
2011-02-12 6:19 [U-Boot] Seperating MIPS processors Aaron Williams
@ 2011-02-12 16:29 ` Daniel Schwierzeck
2011-02-12 23:24 ` Aaron Williams
0 siblings, 1 reply; 3+ messages in thread
From: Daniel Schwierzeck @ 2011-02-12 16:29 UTC (permalink / raw)
To: u-boot
Hi,
On 02/12/2011 07:19 AM, Aaron Williams wrote:
> Hi,
>
> One thing that I have had to do in our Octeon port of U-Boot is to seperate
> out the MIPS processors under /arch/mips/cpu much like has been done for ARM
> and PowerPC.
I'd appreciate this separation as it would help me too in supporting new
Mips-based SoC's.
>
> I have no way of testing the other MIPS platforms, but I've seperated things
> out as follows:
>
> arch/mips/cpu/au1x00
> arch/mips/cpu/incaip
> arch/mips/cpu/mips32
> arch/mips/cpu/octeon
> arch/mips/cpu/purple
>
> All of the code that's common between various 32-bit mips processors I put
> under mips32 with only the processor specific files in the appropriate
> directories. Is this how I should do it?
Actually all existing CPU's are SoC's based on a Mips4k core. So I
think a better approach that fits into the common u-boot configuration
scheme is to have a structure like this:
arch/mips/cpu/mips4k/au1x00
arch/mips/cpu/mips4k/incaip
arch/mips/cpu/mips4k/purple
arch/mips/cpu/mips24k/...
arch/mips/cpu/mips34k/...
arch/mips/cpu/mips74k/...
arch/mips/cpu/octeon
The according lines in boards.cfg could be changed from:
dbau1000 mips mips dbau1x00 - - dbau1x00:DBAU1000
incaip_100MHz mips mips incaip - - incaip:CPU_CLOCK_RATE=100000000
purple mips mips - - -
to:
dbau1000 mips mips4k dbau1x00 - au1x00 dbau1x00:...
incaip_100MHz mips mips4k incaip - incaip incaip:...
purple mips mips4k - - purple
>
> Right now I can't really use any of the other MIPS files for our Octeon
> processor. There's just too many differences for this to make sense.
>
> I basically have the following directory structure:
>
...
>
> While it might be quite a while until I can get our stuff into the mainline,
> it would certainly make things easier for me not to have to place our stuff in
> the same directory as the other processors.
>
> -Aaron
I agree. Generally Mips lags behind the other archs in terms of some
features or config options because of the little support of boards and
SoC's. Introducing new CPU's like Octeon should give reason to improve
some parts.
Daniel
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] Seperating MIPS processors
2011-02-12 16:29 ` Daniel Schwierzeck
@ 2011-02-12 23:24 ` Aaron Williams
0 siblings, 0 replies; 3+ messages in thread
From: Aaron Williams @ 2011-02-12 23:24 UTC (permalink / raw)
To: u-boot
On 02/12/2011 08:29 AM, Daniel Schwierzeck wrote:
> Hi,
>
> On 02/12/2011 07:19 AM, Aaron Williams wrote:
>> Hi,
>>
>> One thing that I have had to do in our Octeon port of U-Boot is to
>> seperate
>> out the MIPS processors under /arch/mips/cpu much like has been done
>> for ARM
>> and PowerPC.
>
> I'd appreciate this separation as it would help me too in supporting
> new Mips-based SoC's.
>
>>
>> I have no way of testing the other MIPS platforms, but I've seperated
>> things
>> out as follows:
>>
>> arch/mips/cpu/au1x00
>> arch/mips/cpu/incaip
>> arch/mips/cpu/mips32
>> arch/mips/cpu/octeon
>> arch/mips/cpu/purple
>>
>> All of the code that's common between various 32-bit mips processors
>> I put
>> under mips32 with only the processor specific files in the appropriate
>> directories. Is this how I should do it?
>
> Actually all existing CPU's are SoC's based on a Mips4k core. So I
> think a better approach that fits into the common u-boot configuration
> scheme is to have a structure like this:
>
> arch/mips/cpu/mips4k/au1x00
> arch/mips/cpu/mips4k/incaip
> arch/mips/cpu/mips4k/purple
> arch/mips/cpu/mips24k/...
> arch/mips/cpu/mips34k/...
> arch/mips/cpu/mips74k/...
> arch/mips/cpu/octeon
>
> The according lines in boards.cfg could be changed from:
>
> dbau1000 mips mips dbau1x00 - - dbau1x00:DBAU1000
> incaip_100MHz mips mips incaip - - incaip:CPU_CLOCK_RATE=100000000
> purple mips mips - - -
>
> to:
>
> dbau1000 mips mips4k dbau1x00 - au1x00 dbau1x00:...
> incaip_100MHz mips mips4k incaip - incaip incaip:...
> purple mips mips4k - - purple
>
This looks reasonable to me. We have so little in common with the other
MIPS platforms to where even lib/board.c is unusable for us. The only
parts we share are some of the include files, and even there we have to
make a lot of extensions for 64-bit support.
>>
>> Right now I can't really use any of the other MIPS files for our Octeon
>> processor. There's just too many differences for this to make sense.
>>
>> I basically have the following directory structure:
>>
> ...
>>
>> While it might be quite a while until I can get our stuff into the
>> mainline,
>> it would certainly make things easier for me not to have to place our
>> stuff in
>> the same directory as the other processors.
>>
>> -Aaron
>
> I agree. Generally Mips lags behind the other archs in terms of some
> features or config options because of the little support of boards and
> SoC's. Introducing new CPU's like Octeon should give reason to improve
> some parts.
>
> Daniel
I hope one day to get our stuff into the mainline u-boot tree since we
are implementing quite a bit. So far I'm able to take advantage of just
about everything U-Boot has to offer with our SOC, but the biggest
problem remains the drivers due to some bad assumptions people make that
there's no difference between a pointer and a physical address. It's
even worse for us since all of our hardware is mapped above 4GB in
64-bit address space plus due to other requirements we use TLB mapping
to map U-Boot to the top of physical memory (which is often above 4GB).
Taking advantage of a 64-bit processor presents a lot of challenges for
U-Boot. A lot of our changes apply to 64-bit MIPS in general though we
also have a lot of specialized stuff for dealing with our SDK
environment (currently 16 cores, soon 32 cores).
Hopefully I can further expand MIPS support. I'd love to get kgdb
support working since this would be a big boon to our customers since we
support loading SDK applications on different cores independent of
operating systems (we also support multiple instances of Linux running
on different cores).
The biggest problem I see is that the toolchain we use is not publically
available. I might try doing what we did for the Linux kernel to create
a stripped-down SDK and get it working with the Debian toolchain.
-Aaron
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-02-12 23:24 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-12 6:19 [U-Boot] Seperating MIPS processors Aaron Williams
2011-02-12 16:29 ` Daniel Schwierzeck
2011-02-12 23:24 ` Aaron Williams
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox