[PATCH] 8xx: tlbie debugging aid (try #2)
On Jun 27, 2005, at 10:56 AM, Marcelo Tosatti wrote: > Note: this was just a test module doing tlbie(0xc100)... > Hum, it should also print out the address in question... Oh, I see. I thought it was a bug with loading a module in general, since it allocates from vmalloc() space. >> How much real memory on your board? > > 128M No problem. >> We need to ensure VMALLOC_START is beyond >> the pinned entries. > > Right now VMALLOC_START is before the IMMR pinned space. Sorry, I wasn't clear :-) I meant we need to ensure VMALLOC_START is beyond the pinned _data_ area. > Oh! What are the side effects of such pinning as the > code is today? The code maps 24M of data space, plus 8M of IMMR (and anything that follows). So, if you don't have enough real memory, you can end up with both a pinned entry and vmalloc() trying to share the same VM space, which is a bad thing. The problem depends on the amount of real memory, plus the "offset" hole of the vmalloc() space. > For what purpose? Sorry I don't get you, please be more > verbose. Just to prevent what I mentioned in the previous paragraph. Since you have lots of real memory, this doesn't affect you. Thanks. -- Dan
[PATCH] 8xx: map_page() skip pinned region and tlbie debugging aid
On Jun 27, 2005, at 9:39 AM, Marcelo Tosatti wrote: > Bullshit, map_page()'s call for flush_HPTE() is conditioned by > "mem_init_done", > and mapin_ram() is called before mem_init_done is set. Excuse me? >> The IMMR space is a 16kB window (correct?), so I wonder if it might >> be better to the use occupied pinned slot for another more accessed >> region (an 8MB one preferably!). > > Thats still some food for thought... Actually, most 8xx systems map the IMMR, plus other external devices (including flash memory), into a packed space at the top of the address range. The 8M mapping catches the IMMR space, but also many of these other devices subject to ioremap(). In some systems, they trade off mapping the IMMR, or data pages, to get an additional 8M of peripheral IO space. The data space pinning is the big trade off right now. You can pin 4 entries, or 32M of space. If you only have 16M of real memory, the other two 8M entries can be used to cover IO space. This is one (of a a few) advantages of using dynamic large pages instead of pinned entries. You could map more 8M spaces for IO. The problem is all of these have been custom initialization and mapping code. You see, this just keeps growing in features and complexity :-) It would be nice for ioremap() to consider multiple, dynamic 8M pages on 8xx like it does BATs on traditional PPC. It will do this someday soon. Perhaps I should go back and push some of this dynamic 8M page stuff. It would eliminate the tlbie() problems, give us more flexibility. Damn, not enough hours in a day Thanks. -- Dan
[PATCH] 8xx: tlbie debugging aid (try #2)
On Jun 27, 2005, at 10:28 AM, Marcelo Tosatti wrote: > it yields > > _tlbie on pinned range: c000-c180 > Badness in _tlbie at arch/ppc/mm/pgtable.c:527 > Call trace: > [c0005530] dump_stack+0x18/0x28 > [c0003628] check_bug_trap+0x84/0xac > [c00037b0] ProgramCheckException+0x160/0x1a0 > [c0002d50] ret_from_except_full+0x0/0x4c > [c000a91c] _tlbie+0x94/0xa0 > [c902f018] alloc_init_module+0x18/0x40 [alloc] > [c002c4ac] sys_init_module+0x224/0x324 > [c00026f0] ret_from_syscall+0x0/0x44 How much real memory on your board? We need to ensure VMALLOC_START is beyond the pinned entries. We should make all of the code much smarter to pin on the real space that is on the board. For testing now, just make VMALLOC_OFFSET 32M, which will push the start to the 32M boundary after the kernel. Thanks. -- Dan
Announcing mpc8260sar.sourceforge.net
Hi all, This email is to announce a new project on sourceforge.net Homepage: http://mpc8260sar.sourceforge.net Summary:an ATM driver for the PowerQUICCII Notes: This driver was based on code taken from http://atm8260.sourceforge.net which is a port of my orignal PQI driver - http://mpc860sar.sourceforge.net - to the PQII. The driver is presented in the form of a patch against Denx's linuxppc_2_4_devel tree. Currently the only supported platforms are the PM826/PM828 miriac power modules with CR826 carrier. However, I've added a framework which I hope will allow for support of other platforms in the future. I chose to create a new project rather than attempt to join the old atm8260 project. I did this because I felt that the changes I made to the code were large enough to warrant a new project rather than sending a patch to the old one. I also found that the code in atm8260 CVS seemed to have a lot missing and wouldn't compile. Anyway, having said this, I found that project enormously helpful and I hope that I do not offend anybody by starting a new project. Please see the site for a list of features added. Alex
ppc405 kernel debugging
Hi, I try to boot a linux kernel (2.6.12) on a custom hardware (memec ff1152 board). If I use the xmd tool to download the zImage.elf I have the following messages : loaded at: 0040 0047813C board data at: 00476124 0047613C relocated to: 004051D4 004051EC zimage at: 004059E5 00475A06 avail ram: 00479000 0400 Linux/PPC load: console=ttyS0,9600 root=/dev/nfs ip=dhcp Uncompressing Linux...done. Now booting the kernel closing serial id mach(): done MMU:enter MMU:hw init MMU:mapin MMU:setio ml300_map_io:enter ml300_map_io:exit MMU:exit Starting with uboot I get (uImage) : Filename 'ubootimage'. Load address: 0x40 Loading: # # done Bytes transferred = 458849 (70061 hex) => bootm 0x40 ## Booting image at 0040 ... Image Name: Linux-2.6.12-bitsim Image Type: PowerPC Linux Kernel Image (gzip compressed) Data Size:458785 Bytes = 448 kB Load Address: Entry Point: Verifying Checksum ... OK Uncompressing Kernel Image ... OK id mach(): done MMU:enter MMU:hw init MMU:mapin Does somebody know how to go further ? In xilinx_ml300.c file, it seems that the following call is start_kernel, but I don't know how to really debug at this point... I had a try with print_char function but without much success... I have a very small config file for the kernel, don't know to have a smaller one... kernel version : 2.6.12 gcc : 3.3.6 binutils : 2.14 Thanks in advance for any help... xavier -- next part -- # # Automatically generated make config: don't edit # Linux kernel version: 2.6.12 # Mon Jun 27 12:53:17 2005 # CONFIG_MMU=y CONFIG_GENERIC_HARDIRQS=y CONFIG_RWSEM_XCHGADD_ALGORITHM=y CONFIG_GENERIC_CALIBRATE_DELAY=y CONFIG_HAVE_DEC_LOCK=y CONFIG_PPC=y CONFIG_PPC32=y CONFIG_GENERIC_NVRAM=y CONFIG_SCHED_NO_NO_OMIT_FRAME_POINTER=y # # Code maturity level options # CONFIG_EXPERIMENTAL=y CONFIG_CLEAN_COMPILE=y CONFIG_BROKEN_ON_SMP=y CONFIG_INIT_ENV_ARG_LIMIT=32 # # General setup # CONFIG_LOCALVERSION="-bitsim" # CONFIG_SWAP is not set # CONFIG_SYSVIPC is not set # CONFIG_BSD_PROCESS_ACCT is not set # CONFIG_SYSCTL is not set # CONFIG_AUDIT is not set # CONFIG_HOTPLUG is not set # CONFIG_IKCONFIG is not set CONFIG_EMBEDDED=y CONFIG_KALLSYMS=y # CONFIG_KALLSYMS_ALL is not set # CONFIG_KALLSYMS_EXTRA_PASS is not set CONFIG_PRINTK=y CONFIG_BUG=y CONFIG_BASE_FULL=y CONFIG_FUTEX=y CONFIG_EPOLL=y CONFIG_CC_OPTIMIZE_FOR_SIZE=y # CONFIG_SHMEM is not set CONFIG_CC_ALIGN_FUNCTIONS=0 CONFIG_CC_ALIGN_LABELS=0 CONFIG_CC_ALIGN_LOOPS=0 CONFIG_CC_ALIGN_JUMPS=0 CONFIG_TINY_SHMEM=y CONFIG_BASE_SMALL=0 # # Loadable module support # CONFIG_MODULES=y CONFIG_MODULE_UNLOAD=y CONFIG_MODULE_FORCE_UNLOAD=y CONFIG_OBSOLETE_MODPARM=y CONFIG_MODVERSIONS=y # CONFIG_MODULE_SRCVERSION_ALL is not set CONFIG_KMOD=y # # Processor # # CONFIG_6xx is not set CONFIG_40x=y # CONFIG_44x is not set # CONFIG_POWER3 is not set # CONFIG_POWER4 is not set # CONFIG_8xx is not set # CONFIG_E500 is not set # CONFIG_MATH_EMULATION is not set # CONFIG_CPU_FREQ is not set CONFIG_4xx=y # # IBM 4xx options # # CONFIG_ASH is not set # CONFIG_BUBINGA is not set # CONFIG_CPCI405 is not set # CONFIG_EP405 is not set # CONFIG_OAK is not set # CONFIG_REDWOOD_5 is not set # CONFIG_REDWOOD_6 is not set # CONFIG_SYCAMORE is not set # CONFIG_WALNUT is not set CONFIG_XILINX_ML300=y CONFIG_IBM405_ERR77=y CONFIG_IBM405_ERR51=y CONFIG_XILINX_OCP=y CONFIG_VIRTEX_II_PRO=y CONFIG_EMBEDDEDBOOT=y # CONFIG_PPC4xx_DMA is not set CONFIG_PPC_GEN550=y # CONFIG_PM is not set CONFIG_UART0_TTYS0=y # CONFIG_UART0_TTYS1 is not set CONFIG_NOT_COHERENT_CACHE=y # # Platform options # # CONFIG_PC_KEYBOARD is not set # CONFIG_SMP is not set # CONFIG_PREEMPT is not set # CONFIG_HIGHMEM is not set CONFIG_BINFMT_ELF=y # CONFIG_BINFMT_MISC is not set CONFIG_CMDLINE_BOOL=y CONFIG_CMDLINE="console=ttyS0,9600 root=/dev/nfs ip=dhcp" CONFIG_ISA_DMA_API=y # # Bus options # # CONFIG_PCI is not set # CONFIG_PCI_DOMAINS is not set # # PCCARD (PCMCIA/CardBus) support # # CONFIG_PCCARD is not set # # Advanced setup # # CONFIG_ADVANCED_OPTIONS is not set # # Default settings for advanced configuration options are used # CONFIG_HIGHMEM_START=0xfe00 CONFIG_LOWMEM_SIZE=0x3000 CONFIG_KERNEL_START=0xc000 CONFIG_TASK_SIZE=0x8000 CONFIG_CONSISTENT_START=0xff10 CONFIG_CONSISTENT_SIZE=0x0020 CONFIG_BOOT_LOAD=0x0040 # # Device Drivers # # # Generic Driver Options # CONFIG_STANDALONE=y CONFIG_PREVENT_FIRMWARE_BUILD=y # CONFIG_FW_LOADER is not set CONFIG_DEBUG_DRIVER=y # # Memory Technology Devices (MTD) # # CONFIG_MTD is not set # # Parallel port support # # CONFIG_PARPORT is not set # # Plug and Play support # # # Block devices # # CONFIG_BLK_DEV_FD is not set # CONFIG_BLK_DEV_COW_COMMON is not set # CONFIG_BLK_DEV_LOOP is not set # CONFIG_BLK_DEV_RAM is not set CONFIG_BLK_DEV_RAM_COUNT=16 CONFIG_INIT
cpm_uart: use dpram for early console
Panto, Kumar, Can something semantically equivalent to this be merged please. m8xx_cpm_hostalloc() can't rely on using the coherent DMA allocator early on boot because the VM is not fully up yet. The current code relies on the "bootmem_page" allocated by m8xx_cpm_reset(), which must be killed. --- cpm_uart_cpm1.c.orig2005-06-27 17:51:53.0 -0300 +++ cpm_uart_cpm1.c 2005-06-27 17:55:45.0 -0300 @@ -155,7 +155,7 @@ memsz = L1_CACHE_ALIGN(pinfo->rx_nrfifos * pinfo->rx_fifosize) + L1_CACHE_ALIGN(pinfo->tx_nrfifos * pinfo->tx_fifosize); if (is_con) { - mem_addr = (u8 *) m8xx_cpm_hostalloc(memsz); + mem_addr = (u8 *) cpm_dpram_addr(cpm_dpalloc(memsz, 8)); dma_addr = 0; } else mem_addr = dma_alloc_coherent(NULL, memsz, &dma_addr,
[PATCH] 8xx: tlbie debugging aid (try #2)
Hi Dan, On Mon, Jun 27, 2005 at 04:18:14PM -0400, Dan Malek wrote: > > On Jun 27, 2005, at 10:28 AM, Marcelo Tosatti wrote: > > >it yields > > > >_tlbie on pinned range: c000-c180 > >Badness in _tlbie at arch/ppc/mm/pgtable.c:527 > >Call trace: > > [c0005530] dump_stack+0x18/0x28 > > [c0003628] check_bug_trap+0x84/0xac > > [c00037b0] ProgramCheckException+0x160/0x1a0 > > [c0002d50] ret_from_except_full+0x0/0x4c > > [c000a91c] _tlbie+0x94/0xa0 > > [c902f018] alloc_init_module+0x18/0x40 [alloc] > > [c002c4ac] sys_init_module+0x224/0x324 > > [c00026f0] ret_from_syscall+0x0/0x44 Note: this was just a test module doing tlbie(0xc100)... Hum, it should also print out the address in question... > How much real memory on your board? 128M > We need to ensure VMALLOC_START is beyond > the pinned entries. Right now VMALLOC_START is before the IMMR pinned space. > We should make all of the code > much smarter to pin on the real space that is on > the board. Oh! What are the side effects of such pinning as the code is today? The only issue I see with pinning virtual address translations farther the the physical addresses (real space) is that we lose some virtual space, but nothing more than that. Is it only that? > For testing now, just make VMALLOC_OFFSET > 32M, which will push the start to the 32M boundary > after the kernel. For what purpose? Sorry I don't get you, please be more verbose.
ppc32: problems boot the Linux for SBS/K2 board.
Hi, We had a SBS/K2 board,which had an IBM PowerPC 750 processor with cPCI interface. The old kernel on the boards worked quite well with Vxworks BSP and Linux 2.4.2 kernel. But it failed to boot with the new kernel version 2.6.8(I had tested other versions too). Here is the message I got from the HyperTerminal. - Attaching to ATA disk device... done. Loading /ata0/tftpboot/zImage.elf...1425876 Starting at 0x80... id mach(): done MMU:enter MMU:hw init hash:enter hash:find piece hash:patch hash:done MMU:mapin MMU:setio MMU:exit setup_arch: enter setup_arch: bootmem arch: exit --- What's the problems of these failure? Does anybody here had succeeded booting the 2.6 kernel for SBS/K2 boards? Thanks in advanced! Jianjie Ma 2005.6.27 -- next part -- An HTML attachment was scrubbed... URL: http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20050627/fffd3d2c/attachment.htm
AW: U_BOOT console baudrate mismatch
Hello Susheel Raj > the console with baud 38400 and i think u-boot default > baudrate is 115200 or 19200 (i am not sure)... where > should i need to change any sort of help or > redirections is greatly appreciated... There is an environment setting baudrate you can change. For informations read the DULG at the homepage from denx www.denx.de regards achim
[PATCH] PPC32 mem_pieces interface cleanup
Guys, As an initial step towards getting the OF Flat Dev tree handled in the PPC32 tree, this patch cleans up some of the interface parts of the very early mem_pieces manager and adds some PPC64-LMB-like routines as well. It has been built and booted on 85xx and pmac boards. Thanks, jdl Signed-off-by: Jon Loeliger Signed-off-by: Kumar Gala -- next part -- A non-text attachment was scrubbed... Name: mem_pieces_cleanup.patch Type: text/x-patch Size: 9638 bytes Desc: not available Url : http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20050627/ac4ea497/attachment.bin
[PATCH] 8xx: tlbie debugging aid (try #2)
On Sat, Jun 25, 2005 at 06:24:47PM -0400, Dan Malek wrote: > We really want to see this generate an error. We shouldn't be > calling this on any of the pinned spaces. In the case of initially > mapping the kernel space, we should set up the page tables but > not call this far down that we get here. How about the following addressing your comments: 1) handles more than a single contiguous region by having a list_head (I thought of a binary tree for storing the ranges but sounds like overkill at first given the small amount of pinned regions). 2) implement as C code. it yields _tlbie on pinned range: c000-c180 Badness in _tlbie at arch/ppc/mm/pgtable.c:527 Call trace: [c0005530] dump_stack+0x18/0x28 [c0003628] check_bug_trap+0x84/0xac [c00037b0] ProgramCheckException+0x160/0x1a0 [c0002d50] ret_from_except_full+0x0/0x4c [c000a91c] _tlbie+0x94/0xa0 [c902f018] alloc_init_module+0x18/0x40 [alloc] [c002c4ac] sys_init_module+0x224/0x324 [c00026f0] ret_from_syscall+0x0/0x44 diff --git a/arch/ppc/Kconfig b/arch/ppc/Kconfig --- a/arch/ppc/Kconfig +++ b/arch/ppc/Kconfig @@ -1296,6 +1296,11 @@ config BOOT_LOAD config PIN_TLB bool "Pinned Kernel TLBs (860 ONLY)" depends on ADVANCED_OPTIONS && 8xx + +config DEBUG_PIN_TLBIE + bool "Check for overlapping TLB invalidates inside the pinned area" + depends on ADVANCED_OPTIONS && 8xx && PIN_TLB + endmenu source "drivers/Kconfig" diff --git a/arch/ppc/kernel/misc.S b/arch/ppc/kernel/misc.S --- a/arch/ppc/kernel/misc.S +++ b/arch/ppc/kernel/misc.S @@ -494,7 +494,7 @@ _GLOBAL(_tlbia) /* * Flush MMU TLB for a particular address */ -_GLOBAL(_tlbie) +_GLOBAL(__tlbie) #if defined(CONFIG_40x) tlbsx. r3, 0, r3 bne 10f diff --git a/arch/ppc/mm/pgtable.c b/arch/ppc/mm/pgtable.c --- a/arch/ppc/mm/pgtable.c +++ b/arch/ppc/mm/pgtable.c @@ -32,6 +32,7 @@ #include #include #include +#include #include "mmu_decl.h" @@ -469,3 +470,48 @@ exit: return ret; } +#ifndef CONFIG_DEBUG_PIN_TLBIE + +void _tlbie(unsigned long address) +{ + __tlbie(address); +} + +#else +LIST_HEAD(pin_range_root); + +static struct pinned_range kernelbase = { + start: KERNELBASE, + end:KERNELBASE+0x180, +}; + +static struct pinned_range immr = { + start: IMMR, + end:IMMR+0x80, +}; + +inline void register_pinned_entries(void) +{ + list_add(&kernelbase.pin_list, &pin_range_root); + list_add(&immr.pin_list, &pin_range_root); +} + +void _tlbie(unsigned long address) +{ +struct list_head *l; +struct pinned_range *r; + +list_for_each(l, &pin_range_root) { +r = list_entry(l, struct pinned_range, pin_list); + +if (address < r->start) +continue; +if (address >= r->end) +continue; +printk("_tlbie on pinned range: %lx-%lx\n", r->start, r->end); +WARN_ON(1); +} + + __tlbie(address); +} +#endif diff --git a/include/asm-ppc/tlb.h b/include/asm-ppc/tlb.h --- a/include/asm-ppc/tlb.h +++ b/include/asm-ppc/tlb.h @@ -18,6 +18,18 @@ #include #include +#ifdef CONFIG_DEBUG_PIN_TLBIE +struct pinned_range { + unsigned long start, end; + struct list_head pin_list; +}; +inline void register_pinned_entries(void); +#else +inline void register_pinned_entries(void) +{ + return; +} +#endif #ifdef CONFIG_PPC_STD_MMU /* Classic PPC with hash-table based MMU... */ diff --git a/include/asm-ppc/tlbflush.h b/include/asm-ppc/tlbflush.h --- a/include/asm-ppc/tlbflush.h +++ b/include/asm-ppc/tlbflush.h @@ -13,9 +13,14 @@ #include #include +extern void __tlbie(unsigned long address); extern void _tlbie(unsigned long address); extern void _tlbia(void); +#ifdef CONFIG_DEBUG_PIN_TLBIE +extern struct list_head pin_range_root; +#endif + #if defined(CONFIG_4xx) #ifndef CONFIG_44x
[PATCH] 8xx: map_page() skip pinned region and tlbie debugging aid
On Sun, Jun 26, 2005 at 11:30:04AM -0300, Marcelo Tosatti wrote: > > Hi Dan, > > On Sat, Jun 25, 2005 at 06:24:47PM -0400, Dan Malek wrote: > > > > On Jun 25, 2005, at 10:53 AM, Marcelo Tosatti wrote: > > > > >Dan: I dont think ioremap() is an issue because it never works inside > > >the > > >kernel's static virtual address space (which is the only one we're > > >interested > > >in having pinned at the moment). > > > > Take a close look at the initialization code. I believe it also > > pins the IMMR space, which is subject to ioremap(). > > OK. Now that makes me think that the IMMR pinned entry is also always > thrashed by the tlbie at map_page() :( Bullshit, map_page()'s call for flush_HPTE() is conditioned by "mem_init_done", and mapin_ram() is called before mem_init_done is set. > The IMMR space is a 16kB window (correct?), so I wonder if it might > be better to the use occupied pinned slot for another more accessed > region (an 8MB one preferably!). Thats still some food for thought...
ppc32: problems boot the Linux for SBS/K2 board.
Hi, We had a SBS/K2 board,which had an IBM PowerPC 750 processor with cPCI interface. The old kernel on the boards worked quite well with Vxworks BSP and Linux 2.4.2 kernel. But it failed to boot with the new kernel version 2.6.8(I had tested other versions too). Here is the message I got from the HyperTerminal. - Attaching to ATA disk device... done. Loading /ata0/tftpboot/zImage.elf...1425876 Starting at 0x80... id mach(): done MMU:enter MMU:hw init hash:enter hash:find piece hash:patch hash:done MMU:mapin MMU:setio MMU:exit setup_arch: enter setup_arch: bootmem arch: exit --- What's the problems of these failure? Does anybody here had succeeded booting the 2.6 kernel for SBS/K2 boards? Thanks in advanced! Jianjie Ma 2005.6.27 -- next part -- An HTML attachment was scrubbed... URL: http://ozlabs.org/pipermail/linuxppc-embedded/attachments/20050627/4644b866/attachment.htm
U_BOOT console baudrate mismatch
Hi all, I am a newbie in this area and i am here hoping some help from our friendly programmers. I am working with PwerPc processor MPC5200 with the board that was produced in our company. Rightnow we have U_BOOT-1.1.1 and the problem is that it doesnt print wel on the console. I have no hands on experience in workin with u-boot... the messages look very ugly like this U-Boot 1.1.1 (Ju�23 2005 - 11:29:29) CPU: MPC5200 (JTAG ID 0001101d) at 396 .Hz .us 132 MH IPB 66 MHz, PCI 33 .Hz Boardo Mitron .CT3 .F..SH: 4 M. .In:ser�ld FPGA binary image Out: serial Err: serial NAND: --- Bus --> 132MH IPB ---> 66 MH PCI ---> 33 MH FLASH --> 4M and so on.. my server machine to which the board is connected has the console with baud 38400 and i think u-boot default baudrate is 115200 or 19200 (i am not sure)... where should i need to change any sort of help or redirections is greatly appreciated... thanks a lot for you replies in advance Yahoo! Sports Rekindle the Rivalries. Sign up for Fantasy Football http://football.fantasysports.yahoo.com