LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer
User Name
Password
Linux - Embedded & Single-board computer This forum is for the discussion of Linux on both embedded devices and single-board computers (such as the Raspberry Pi, BeagleBoard and PandaBoard). Discussions involving Arduino, plug computers and other micro-controller like devices are also welcome.

Notices


Reply
  Search this Thread
Old 12-22-2009, 09:44 AM   #1
fguihot
LQ Newbie
 
Registered: Dec 2009
Posts: 4

Rep: Reputation: 0
[uboot] MPC8360 increase flash memory


Hi everybody

I'm a beginner in embedded linux, and I've got a problem.
I'm with a board with a MPC8360, 16Mb of flash memory, and 256Mb of DDR2.
I boot the board from flash, with uboot 1.3.0-rc2.
Everything works great, and I can erase and copy some stuff in the flash memory, with the uboot shell, and erase and cp command.
The flash memory map was from 0xFC00_0000 to 0xFCFF_FFFF, and was managed with LBC0.
the register were
LBLAWAR0 = 0x80000017 ;16Mb flash
LBLAWBAR0 = 0xfc000000 ;flash base address
OR0 = 0xff000ca1 ;address mask 0xFF
BR0 = 0xfc001001 ; address 0xFC

I decided to increase the flash size from 16Mb to 32Mb.
The new memory map is from 0xFC00_0000 to 0xFDFF_FFFF.I have made some few changes in the uboot :
LBLAWAR0 = 0x80000018 ;32Mb flash
LBLAWBAR0 = 0xfc000000 ;flash base address
OR0 = 0xfe000ca1 ;address mask 0xFE
BR0 = 0xfc001001 ; address 0xFC

It go to the shell from the uboot, but when I try to acess to the 16MLb-32Mb of the flash, the uboot hang with the message :

Bad trap at PC: ffd5c34, SR: b032, vector=300

NIP: 0FFD5C34 XER: 20000000 LR: 0FFD5C34 REGS: 0ffaabc8 TRAP: 0300 DAR: FD000000

MSR: 0000b032 EE: 1 PR: 0 FP: 1 ME: 1 IR/DR: 11

DSIR: 0ffeded8



GPR00: 0FFD5C34 0FFAACB8 00000080 00000000 00000030 00000010 FFFFFFF8 00000007

GPR08: 00000041 00000020 FFFFFFFF 00000004 00000000 E0110000 0FFFE000 13FCB000

GPR16: 00000000 00000000 00000000 0000000B 00000000 00000000 00000001 FC000002

GPR24: FD000000 0FFFDD80 FD000000 04040000 0FFAAF4C 0FFAAF4C 0FFFE4F4 0FFFE7B0

Call backtrace:

0FFD5C34 0FFD4938 0FFE2CC4 0FFDE11C 0FFE36FC 0FFE3A1C 0FFE3CA8

0FFE4D18 0FFE4EF4 0FFD7014 0FFCFEE8 0FFCE73C

Exception in kernel pc ffd5c34 signal 0

Resetting the board.


There seem to be a problem with the configuration register, but I couldn't spot it.
Does anyone have an idea ?
 
Old 01-04-2010, 01:33 AM   #2
mattheww
LQ Newbie
 
Registered: Jul 2003
Location: oxford,uk
Distribution: redhat mainly
Posts: 5

Rep: Reputation: 0
Data Access exception

Hi
It looks like you need to update the DBAT registers for that area too, as you are getting a Data access violation (exeption 0x300)

I dont have the uboot source in front of me but I think DBAT0/IBAT0 are used for flash. You will need to expand their range to 32MBytes too.

Matt
 
Old 01-05-2010, 02:40 AM   #3
fguihot
LQ Newbie
 
Registered: Dec 2009
Posts: 4

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by mattheww View Post
Hi
It looks like you need to update the DBAT registers for that area too, as you are getting a Data access violation (exeption 0x300)

I dont have the uboot source in front of me but I think DBAT0/IBAT0 are used for flash. You will need to expand their range to 32MBytes too.

Matt
Thanks for your answer !!!

It is correct, the problem came from the MMU setup, and the cache size for the flash. It is IBAT3 and DBAT3 which are used for the flash, and expanding the cache to 32M resolved my problem...

Thanks,
Fabrice
 
  


Reply

Tags
flash, uboot


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need to increase shared memory on Fedora 10 emmalg Fedora 12 06-17-2009 03:19 AM
how to increase video memory? kavinchat Linux - Hardware 3 10-31-2008 09:53 AM
how to increase memory for applications in x husrah Linux - Newbie 2 10-29-2006 02:25 PM
Missing memory in USB stick, flash memory, removable hd etc bamboo_spider Linux - Newbie 3 06-14-2006 05:39 PM
want to increase memory shukla_chanchal Linux - General 8 11-02-2005 03:33 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware > Linux - Embedded & Single-board computer

All times are GMT -5. The time now is 04:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration