* Atmel at91x40 ("EB01" eval board) resurected
@ 2011-12-23 3:18 Phil Budne
2011-12-30 1:14 ` Greg Ungerer
2012-03-17 15:43 ` Thomas Petazzoni
0 siblings, 2 replies; 5+ messages in thread
From: Phil Budne @ 2011-12-23 3:18 UTC (permalink / raw)
To: linux-arm-kernel
I'm new here, so please excuse any protocol violations!
I decided to see if I could bring up current kernel sources under
skyeye (at91x40 simulation).
I've also been working on a port to the more modern AT91SAM7SE using QEMU.
Attached are:
diffs from sources from git://github.com/at91linux/linux-at91.git
master branch (current as of 12/21/11)
many of the changes are in generic arch/arm files.
Tested on Simulated at91x40xxx "EB01" board
kernel built using attached defconfig file.
4M of RAM at 0x1000000
XIP kernel loaded in 4M (of "flash") at 0x1400000
root filesystem is a compiled in initramfs
too much pain to build ROMfs and map;
(drivers/mtd/maps/uclinux.c requires rootfs appended after kernel
"uClinux" 11/11/11 dist uclinux.c allows rootfs image at fixed location)
new file attached: mach/arm/mach-at91/at91x40_devices.c
Runs on locally modified skyeye
based on skyeye-v1.2_Rel.tar (had trouble building latest release)
adds interrupt driven UART output
tweaked for programmed I/O UART input
fix for loading XIP data section (load at physical, not virtual address)
Problems:
repeated "free" commands show loss of 12K each time (see atached typescript)
same sh binary (from skyeye test suite)
does not exhibit this on 2.6 and 2.4 kernels (from the skyeye test suite).
breakpointing sys_munmap shows len==0 (could it be an ABI issue?)
-------------- next part --------------
Script started on Wed 21 Dec 2011 06:04:55 PM EST
phil at phil-laptop:~/arm/git/linux-at91$ head -5 Makefile
VERSION = 3
PATCHLEVEL = 2
SUBLEVEL = 0
EXTRAVERSION = -rc3
NAME = Saber-toothed Squirrel
phil at phil-laptop:~/arm/git/linux-at91$ size x40/vmlinux
text data bss dec hex filename
827292 171320 25280 1023892 f9f94 x40/vmlinux
phil at phil-laptop:~/arm/git/linux-at91$ ./skyeye -e x40/vmlinux
arch: arm
cpu info: armv3, arm7tdmi, 41007700, fff8ff00, 0
mach info: name at91, mach_init addr 0x8057760
SKYEYE: use arm7100 mmu ops
exec file "x40/vmlinux"'s format is elf32-little.
load section .head.text: addr = 0x01400000 size = 0x0000005c.
load section .text: addr = 0x01400060 size = 0x000a0000.
load section .rodata: addr = 0x014a1000 size = 0x0001e780.
load section __param: addr = 0x014bf780 size = 0x00000080.
not load section __modver: addr = 0x014bf800 size = 0x00000800 .
load section .init.text: addr = 0x014c0000 size = 0x0000b534.
load section .init.proc.info: addr = 0x014cb534 size = 0x0000016c.
load section .init.arch.info: addr = 0x014cb6a0 size = 0x0000003c.
load section .init.tagtable: addr = 0x014cb6dc size = 0x00000040.
load section .init.data: addr = 0x014cb71c size = 0x0001a538.
load section .data: lma = 0x014e6000 (vma = 0x01008000) size = 0x0000f800.
load section .notes: addr = 0x01017800 size = 0x00000024.
not load section .bss: addr = 0x01017840 size = 0x00005ac0 .
not load section .comment: addr = 0x00000000 size = 0x0000002a .
not load section .ARM.attributes: addr = 0x00000000 size = 0x0000002a .
not load section .debug_line: addr = 0x00000000 size = 0x0007e2af .
not load section .debug_info: addr = 0x00000000 size = 0x0063a524 .
not load section .debug_abbrev: addr = 0x00000000 size = 0x0004afc4 .
not load section .debug_aranges: addr = 0x00000000 size = 0x000033c0 .
not load section .debug_ranges: addr = 0x00000000 size = 0x0001d7c8 .
not load section .debug_pubnames: addr = 0x00000000 size = 0x000122dd .
not load section .debug_pubtypes: addr = 0x00000000 size = 0x000a9c57 .
not load section .debug_str: addr = 0x00000000 size = 0x00036622 .
not load section .debug_frame: addr = 0x00000000 size = 0x00029b90 .
not load section .debug_loc: addr = 0x00000000 size = 0x0010e6e5 .
start addr is set to 0x01400000 by exec file.
Linux version 3.2.0-rc3-12776-g401d006-dirty (phil at phil-laptop) (gcc version 4.5.2 (Ubuntu/Linaro 4.5.2-8ubuntu3) ) #63 Wed Dec 21 18:01:29 EST 2011
CPU: ARM7TDMI [41807700] revision 0 (ARMv4T), cr=00000000
CPU: VIVT data cache, VIVT instruction cache
Machine: Atmel AT91 EB01
Built 1 zonelists in Zone order, mobility grouping off. Total pages: 1016
Kernel command line:
PID hash table entries: 16 (order: -6, 64 bytes)
Dentry cache hash table entries: 1024 (order: 0, 4096 bytes)
Inode-cache hash table entries: 1024 (order: 0, 4096 bytes)
Memory: 4MB = 4MB total
Memory: 3924k/3924k available, 172k reserved, 0K highmem
Virtual kernel memory layout:
vector : 0x00000000 - 0x00001000 ( 4 kB)
fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB)
vmalloc : 0x00000000 - 0xffffffff (4095 MB)
lowmem : 0x01000000 - 0x01400000 ( 4 MB)
modules : 0x01000000 - 0x01400000 ( 4 MB)
.text : 0x01400000 - 0x014c0000 ( 768 kB)
.init : 0x0100a000 - 0x0100d000 ( 12 kB)
.data : 0x01008000 - 0x01017800 ( 62 kB)
.bss : 0x01017824 - 0x0101d300 ( 23 kB)
NR_IRQS:192
AT91: 0 gpio irqs in 0 banks
Calibrating delay loop... 15.79 BogoMIPS (lpj=78976)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 512
atmel_usart.1: ttyS0 at MMIO 0xfffd0000 (irq = 2) is a ATMEL_SERIAL
console [ttyS0] enabled
atmel_usart.2: ttyS1 at MMIO 0xfffcc000 (irq = 3) is a ATMEL_SERIAL
Freeing init memory: 12K
Shell invoked to run file: /etc/rc
Command:
Command: hostname skyeye
Command: mount -t proc proc /proc
Command: mkdir /var/lock /var/log /var/run /var/tmp
Command: cat /etc/motd
Welcome to
____ _ _
/ __| ||_|
_ _| | | | _ ____ _ _ _ _
| | | | | | || | _ \| | | |\ \/ /
| |_| | |__| || | | | | |_| |/ \
| ___\____|_||_|_| |_|\____|\_/\_/
| |
|_|
For further information check:
http://www.uclinux.org/
Execution Finished, Exiting
Sash command shell (version 1.1.1)
/> free
MemTotal: 3936 kB
MemFree: 3308 kB
Buffers: 0 kB
/> free
MemTotal: 3936 kB
MemFree: 3296 kB
Buffers: 0 kB
/> free
MemTotal: 3936 kB
MemFree: 3284 kB
Buffers: 0 kB
/> ls -l /*
/bin:
-rwxr-xr-x 1 1000 1000 32152 Dec 20 2011 init
-rwxr-xr-x 1 1000 1000 70264 Dec 20 2011 sh
/dev:
crw------- 1 1000 0 5, 1 Jan 1 00:00 console
crw------- 1 1000 0 5, 64 Dec 21 2011 cua0
crw------- 1 1000 0 5, 65 Dec 21 2011 cua1
crw------- 1 1000 0 1, 2 Dec 21 2011 kmem
crw------- 1 1000 0 1, 1 Dec 21 2011 mem
crw------- 1 1000 0 1, 3 Dec 21 2011 null
crw------- 1 1000 0 1, 8 Dec 21 2011 random
crw------- 1 1000 0 5, 0 Dec 21 2011 tty
crw------- 1 1000 0 4, 0 Dec 21 2011 tty0
crw------- 1 1000 0 4, 1 Dec 21 2011 tty1
crw------- 1 1000 0 4, 2 Dec 21 2011 tty2
crw------- 1 1000 0 4, 3 Dec 21 2011 tty3
crw------- 1 1000 0 4, 64 Dec 21 2011 ttyS0
crw------- 1 1000 0 4, 65 Dec 21 2011 ttyS1
crw------- 1 1000 0 4, 66 Dec 21 2011 ttyS2
crw------- 1 1000 0 4, 67 Dec 21 2011 ttyS3
crw------- 1 1000 0 1, 9 Dec 21 2011 urandom
crw------- 1 1000 0 1, 5 Dec 21 2011 zero
/etc:
-rw-r--r-- 1 1000 1000 49 Dec 21 2011 inittab
-rw-r--r-- 1 1000 1000 296 Dec 11 2011 motd
-rw-r--r-- 1 1000 1000 21 Dec 11 2011 passwd
-rwxr-xr-x 1 1000 1000 134 Dec 20 2011 rc
lrwxrwxrwx 1 1000 1000 8 Dec 21 2011 /init -> bin/init
/proc:
dr-xr-xr-x 6 0 0 0 Jan 1 00:00 1
dr-xr-xr-x 6 0 0 0 Jan 1 00:00 10
dr-xr-xr-x 6 0 0 0 Jan 1 00:00 11
dr-xr-xr-x 6 0 0 0 Jan 1 00:00 13
dr-xr-xr-x 6 0 0 0 Jan 1 00:00 2
dr-xr-xr-x 6 0 0 0 Jan 1 00:00 3
dr-xr-xr-x 6 0 0 0 Jan 1 00:00 4
dr-xr-xr-x 6 0 0 0 Jan 1 00:00 5
dr-xr-xr-x 6 0 0 0 Jan 1 00:00 6
dr-xr-xr-x 6 0 0 0 Jan 1 00:00 7
dr-xr-xr-x 6 0 0 0 Jan 1 00:00 8
dr-xr-xr-x 6 0 0 0 Jan 1 00:00 9
-r--r--r-- 1 0 0 0 Jan 1 00:00 buddyinfo
dr-xr-xr-x 2 0 0 0 Jan 1 00:00 bus
-r--r--r-- 1 0 0 0 Jan 1 00:00 cmdline
-r--r--r-- 1 0 0 0 Jan 1 00:00 consoles
-r--r--r-- 1 0 0 0 Jan 1 00:00 cpuinfo
-r--r--r-- 1 0 0 0 Jan 1 00:00 devices
dr-xr-xr-x 2 0 0 0 Jan 1 00:00 driver
-r--r--r-- 1 0 0 0 Jan 1 00:00 execdomains
-r--r--r-- 1 0 0 0 Jan 1 00:00 filesystems
dr-xr-xr-x 3 0 0 0 Jan 1 00:00 fs
-r--r--r-- 1 0 0 0 Jan 1 00:00 interrupts
-r--r--r-- 1 0 0 0 Jan 1 00:00 iomem
-r--r--r-- 1 0 0 0 Jan 1 00:00 ioports
dr-xr-xr-x 34 0 0 0 Jan 1 00:00 irq
-r--r--r-- 1 0 0 0 Jan 1 00:00 kallsyms
-r-------- 1 0 0 0 Jan 1 00:00 kmsg
-r--r--r-- 1 0 0 0 Jan 1 00:00 loadavg
-r--r--r-- 1 0 0 0 Jan 1 00:00 locks
-r--r--r-- 1 0 0 0 Jan 1 00:00 maps
-r--r--r-- 1 0 0 0 Jan 1 00:00 meminfo
-r--r--r-- 1 0 0 0 Jan 1 00:00 misc
lrwxrwxrwx 1 0 0 11 Jan 1 00:00 mounts
-r--r--r-- 1 0 0 0 Jan 1 00:00 pagetypeinfo
lrwxrwxrwx 1 0 0 64 Jan 1 00:00 self
-r--r--r-- 1 0 0 0 Jan 1 00:00 softirqs
-r--r--r-- 1 0 0 0 Jan 1 00:00 stat
dr-xr-xr-x 1 0 0 0 Jan 1 00:00 sys
-r--r--r-- 1 0 0 0 Jan 1 00:00 timer_list
dr-xr-xr-x 4 0 0 0 Jan 1 00:00 tty
-r--r--r-- 1 0 0 0 Jan 1 00:00 uptime
-r--r--r-- 1 0 0 0 Jan 1 00:00 version
-r--r--r-- 1 0 0 0 Jan 1 00:00 vmstat
-r--r--r-- 1 0 0 0 Jan 1 00:00 zoneinfo
lrwxrwxrwx 1 1000 1000 4 Dec 21 2011 /sbin -> /bin
lrwxrwxrwx 1 1000 1000 8 Dec 21 2011 /tmp -> /var/tmp
/var:
drwxr-xr-x 2 0 0 0 Jan 1 00:00 lock
drwxr-xr-x 2 0 0 0 Jan 1 00:00 log
drwxr-xr-x 2 0 0 0 Jan 1 00:00 run
drwxr-xr-x 2 0 0 0 Jan 1 00:00 tmp
/> cat /etc/inittab
# inet:unknown:/bin/inetd
# boa:unknown:/bin/boa
/> cat /etc/rc
#!/bin/sh
hostname skyeye
mount -t proc proc /proc
#mount -t tmpfs tmp /var
mkdir /var/lock /var/log /var/run /var/tmp
cat /etc/motd
/> ^C
phil at phil-laptop:~/arm/git/linux-at91$ exit
Script done on Wed 21 Dec 2011 06:07:20 PM EST
-------------- next part --------------
A non-text attachment was scrubbed...
Name: diff
Type: application/octet-stream
Size: 6118 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20111222/f072d61d/attachment-0002.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: defconfig
Type: application/octet-stream
Size: 1557 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20111222/f072d61d/attachment-0003.obj>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: at91x40_devices.c
Type: text/x-csrc
Size: 3814 bytes
Desc: not available
URL: <http://lists.infradead.org/pipermail/linux-arm-kernel/attachments/20111222/f072d61d/attachment-0001.bin>
^ permalink raw reply [flat|nested] 5+ messages in thread
* Atmel at91x40 ("EB01" eval board) resurected
2011-12-23 3:18 Atmel at91x40 ("EB01" eval board) resurected Phil Budne
@ 2011-12-30 1:14 ` Greg Ungerer
2012-01-07 12:07 ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-17 15:43 ` Thomas Petazzoni
1 sibling, 1 reply; 5+ messages in thread
From: Greg Ungerer @ 2011-12-30 1:14 UTC (permalink / raw)
To: linux-arm-kernel
Hi Phil,
On 23/12/11 13:18, Phil Budne wrote:
> I'm new here, so please excuse any protocol violations!
>
> I decided to see if I could bring up current kernel sources under
> skyeye (at91x40 simulation).
> I've also been working on a port to the more modern AT91SAM7SE using QEMU.
>
> Attached are:
>
> diffs from sources from git://github.com/at91linux/linux-at91.git
> master branch (current as of 12/21/11)
> many of the changes are in generic arch/arm files.
>
> Tested on Simulated at91x40xxx "EB01" board
> kernel built using attached defconfig file.
There is an at91x40 defconfig in arch/arm/configs/at91x40_defconfig.
Did you start with that?
I notice that the processor ID you have in your defconfig is quite
different to the one in there...
> 4M of RAM at 0x1000000
> XIP kernel loaded in 4M (of "flash") at 0x1400000
> root filesystem is a compiled in initramfs
> too much pain to build ROMfs and map;
> (drivers/mtd/maps/uclinux.c requires rootfs appended after kernel
> "uClinux" 11/11/11 dist uclinux.c allows rootfs image at fixed location)
>
>
> new file attached: mach/arm/mach-at91/at91x40_devices.c
>
> Runs on locally modified skyeye
> based on skyeye-v1.2_Rel.tar (had trouble building latest release)
> adds interrupt driven UART output
> tweaked for programmed I/O UART input
> fix for loading XIP data section (load at physical, not virtual address)
>
> Problems:
> repeated "free" commands show loss of 12K each time (see atached typescript)
> same sh binary (from skyeye test suite)
> does not exhibit this on 2.6 and 2.4 kernels (from the skyeye test suite).
> breakpointing sys_munmap shows len==0 (could it be an ABI issue?)
Some comments on the changes below. Ultimately though you need to break this
single diff up into well defined logical changes. In other words make a patch
series out of it.
> diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
> index a8997d7..fcb5757 100644
> --- a/arch/arm/include/asm/memory.h
> +++ b/arch/arm/include/asm/memory.h
> @@ -116,6 +116,8 @@
> #define MODULES_END (END_MEM)
> #define MODULES_VADDR (PHYS_OFFSET)
>
> +#define XIP_VIRT_ADDR(physaddr) (physaddr)
> +
> #endif /* !CONFIG_MMU */
>
> /*
> diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
> index 3448a3f..a63102b 100644
> --- a/arch/arm/kernel/setup.c
> +++ b/arch/arm/kernel/setup.c
> @@ -60,8 +60,12 @@
> #include "tcm.h"
>
> #ifndef MEM_SIZE
> +#ifdef CONFIG_DRAM_SIZE
> +#define MEM_SIZE CONFIG_DRAM_SIZE
> +#else
> #define MEM_SIZE (16*1024*1024)
> #endif
> +#endif
>
> #if defined(CONFIG_FPE_NWFPE) || defined(CONFIG_FPE_FASTFPE)
> char fpe_type[8];
> diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
> index 20b3041..26c7411 100644
> --- a/arch/arm/kernel/vmlinux.lds.S
> +++ b/arch/arm/kernel/vmlinux.lds.S
> @@ -288,6 +288,7 @@ SECTIONS
> NOTES
>
> BSS_SECTION(0, 0, 0)
> + _ebss = .; /* uClinux MTD */
You don't need this if you are not using the MTD/uclinux.o driver.
And your defconfig doesn't have this enabled.
> _end = .;
>
> STABS_DEBUG
> diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
> index 242174f..babb6c6 100644
> --- a/arch/arm/mach-at91/Makefile
> +++ b/arch/arm/mach-at91/Makefile
> @@ -19,7 +19,7 @@ obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl.o at91sam926x_time.o at91sam9rl_devi
> obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o at91sam9_alt_reset.o
> obj-$(CONFIG_ARCH_AT91SAM9G45) += at91sam9g45.o at91sam926x_time.o at91sam9g45_devices.o sam9_smc.o
> obj-$(CONFIG_ARCH_AT91CAP9) += at91cap9.o at91sam926x_time.o at91cap9_devices.o sam9_smc.o
> -obj-$(CONFIG_ARCH_AT91X40) += at91x40.o at91x40_time.o
> +obj-$(CONFIG_ARCH_AT91X40) += at91x40.o at91x40_time.o at91x40_devices.o
>
> # AT91RM9200 board-specific support
> obj-$(CONFIG_MACH_ONEARM) += board-1arm.o
> diff --git a/arch/arm/mach-at91/at91x40.c b/arch/arm/mach-at91/at91x40.c
> index 56ba3bd..4d5a475 100644
> --- a/arch/arm/mach-at91/at91x40.c
> +++ b/arch/arm/mach-at91/at91x40.c
> @@ -73,6 +73,6 @@ void __init at91x40_init_interrupts(unsigned int priority[NR_AIC_IRQS])
> if (!priority)
> priority = at91x40_default_irq_priority;
>
> - at91_aic_init(priority);
> + at91_init_interrupts(priority);
> }
>
> diff --git a/arch/arm/mach-at91/board-eb01.c b/arch/arm/mach-at91/board-eb01.c
> index d2023f2..902ade9 100644
> --- a/arch/arm/mach-at91/board-eb01.c
> +++ b/arch/arm/mach-at91/board-eb01.c
> @@ -38,6 +38,21 @@ static void __init at91eb01_init_irq(void)
> static void __init at91eb01_init_early(void)
> {
> at91x40_initialize(40000000);
> +
> + /* USART0 ttyS0. (Rx & Tx only) */
> + at91_register_uart(AT91X40_ID_USART0, 0, 0);
> +
> + /* USART1 ttyS1. (Rx & Tx only) */
> + at91_register_uart(AT91X40_ID_USART1, 1, 0);
> +
> + /* set serial console to ttyS0 (USART0) */
> + at91_set_serial_console(0);
> +}
> +
> +static void __init at91eb01_init_machine(void)
> +{
> + /* Serial */
> + at91_add_device_serial();
> }
>
> MACHINE_START(AT91EB01, "Atmel AT91 EB01")
> @@ -45,5 +60,5 @@ MACHINE_START(AT91EB01, "Atmel AT91 EB01")
> .timer = &at91x40_timer,
> .init_early = at91eb01_init_early,
> .init_irq = at91eb01_init_irq,
> + .init_machine = at91eb01_init_machine,
> MACHINE_END
> -
> diff --git a/arch/arm/mach-at91/include/mach/at91x40.h b/arch/arm/mach-at91/include/mach/at91x40.h
> index a152ff8..8d3c57c 100644
> --- a/arch/arm/mach-at91/include/mach/at91x40.h
> +++ b/arch/arm/mach-at91/include/mach/at91x40.h
> @@ -34,8 +34,8 @@
>
> #define AT91_EBI (0xffe00000 - AT91_BASE_SYS) /* External Bus Interface */
> #define AT91_SF (0xfff00000 - AT91_BASE_SYS) /* Special Function */
> -#define AT91_USART1 (0xfffcc000 - AT91_BASE_SYS) /* USART 1 */
> -#define AT91_USART0 (0xfffd0000 - AT91_BASE_SYS) /* USART 0 */
> +#define AT91_USART1 0xfffcc000 /* USART 1 */
> +#define AT91_USART0 0xfffd0000 /* USART 0 */
You probably want to leave these as they were. Modify your resource defines
in at91x40_devices.c and add AT91_BASE_SYS to the AT91_USARTx values. That
is more consistent with all other users of these defines.
> #define AT91_TC (0xfffe0000 - AT91_BASE_SYS) /* Timer Counter */
> #define AT91_PIOA (0xffff0000 - AT91_BASE_SYS) /* PIO Controller A */
> #define AT91_PS (0xffff4000 - AT91_BASE_SYS) /* Power Save */
> diff --git a/arch/arm/mm/nommu.c b/arch/arm/mm/nommu.c
> index 941a98c..f58be4a 100644
> --- a/arch/arm/mm/nommu.c
> +++ b/arch/arm/mm/nommu.c
> @@ -19,12 +19,17 @@
>
> void __init arm_mm_memblock_reserve(void)
> {
> +// causes death by BUG() in mm/bootmem.c mark_bootmem() if outside "DRAM"
> +// (ie; if using SoC internal SRAM at 0 for vectors, with DRAM elsewhere)
> +// so make sure vectors are in DRAM!! [not tested with REMAP_VECTORS_TO_RAM]
> +#if CONFIG_VECTORS_BASE >= CONFIG_DRAM_BASE
> /*
> * Register the exception vector page.
> * some architectures which the DRAM is the exception vector to trap,
> * alloc_page breaks with error, although it is not NULL, but "0."
> */
> memblock_reserve(CONFIG_VECTORS_BASE, PAGE_SIZE);
> +#endif
> }
I need to look back at some of my older working examples to see why
this is a problem now.
> void __init sanity_check_meminfo(void)
> @@ -38,6 +43,12 @@ void __init sanity_check_meminfo(void)
> void __init paging_init(struct machine_desc *mdesc)
> {
> bootmem_init();
> +
> + /*
> + * on mach-at91, used to setup "boot_soc"
> + */
> + if (mdesc->map_io)
> + mdesc->map_io();
> }
>
> /*
> diff --git a/arch/arm/mm/proc-arm7tdmi.S b/arch/arm/mm/proc-arm7tdmi.S
> index 7e0e1fe..bf9b36d 100644
> --- a/arch/arm/mm/proc-arm7tdmi.S
> +++ b/arch/arm/mm/proc-arm7tdmi.S
> @@ -66,7 +66,6 @@ __arm7tdmi_setup:
> string cpu_elf_name, "v4"
> string cpu_arm7tdmi_name, "ARM7TDMI"
> string cpu_triscenda7_name, "Triscend-A7x"
> - string cpu_at91_name, "Atmel-AT91M40xxx"
> string cpu_s3c3410_name, "Samsung-S3C3410"
> string cpu_s3c44b0x_name, "Samsung-S3C44B0x"
> string cpu_s3c4510b_name, "Samsung-S3C4510B"
> @@ -101,8 +100,9 @@ __\name\()_proc_info:
> cpu_arm7tdmi_name
> arm7tdmi_proc_info triscenda7, 0x0001d2ff, 0x0001ffff, \
> cpu_triscenda7_name, extra_hwcaps=HWCAP_THUMB
> - arm7tdmi_proc_info at91, 0x14000040, 0xfff000e0, \
> - cpu_at91_name, extra_hwcaps=HWCAP_THUMB
> + // arm7tdmi entry with bit for V4T, HWCAP_THUMB
> + arm7tdmi_proc_info arm7tdmi_too, 0x41807700, 0xfff8ff00, \
> + cpu_arm7tdmi_name, extra_hwcaps=HWCAP_THUMB
Does skyeye report a processor ID of 0x4180770 when running?
I have used skyeye to run this code in before, and I don't recall
having to change this.
Regards
Greg
------------------------------------------------------------------------
Greg Ungerer -- Principal Engineer EMAIL: gerg at snapgear.com
SnapGear Group, McAfee PHONE: +61 7 3435 2888
8 Gardner Close FAX: +61 7 3217 5323
Milton, QLD, 4064, Australia WEB: http://www.SnapGear.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Atmel at91x40 ("EB01" eval board) resurected
2011-12-30 1:14 ` Greg Ungerer
@ 2012-01-07 12:07 ` Jean-Christophe PLAGNIOL-VILLARD
0 siblings, 0 replies; 5+ messages in thread
From: Jean-Christophe PLAGNIOL-VILLARD @ 2012-01-07 12:07 UTC (permalink / raw)
To: linux-arm-kernel
On 11:14 Fri 30 Dec , Greg Ungerer wrote:
> Hi Phil,
>
> On 23/12/11 13:18, Phil Budne wrote:
> >I'm new here, so please excuse any protocol violations!
> >
> >I decided to see if I could bring up current kernel sources under
> >skyeye (at91x40 simulation).
> >I've also been working on a port to the more modern AT91SAM7SE using QEMU.
> >
> >Attached are:
> >
> >diffs from sources from git://github.com/at91linux/linux-at91.git
> > master branch (current as of 12/21/11)
> > many of the changes are in generic arch/arm files.
> >
> >Tested on Simulated at91x40xxx "EB01" board
> >kernel built using attached defconfig file.
>
> There is an at91x40 defconfig in arch/arm/configs/at91x40_defconfig.
> Did you start with that?
>
> I notice that the processor ID you have in your defconfig is quite
> different to the one in there...
>
>
> >4M of RAM at 0x1000000
> >XIP kernel loaded in 4M (of "flash") at 0x1400000
> >root filesystem is a compiled in initramfs
> > too much pain to build ROMfs and map;
> > (drivers/mtd/maps/uclinux.c requires rootfs appended after kernel
> > "uClinux" 11/11/11 dist uclinux.c allows rootfs image at fixed location)
> >
> >
> >new file attached: mach/arm/mach-at91/at91x40_devices.c
> >
> >Runs on locally modified skyeye
> > based on skyeye-v1.2_Rel.tar (had trouble building latest release)
> > adds interrupt driven UART output
> > tweaked for programmed I/O UART input
> > fix for loading XIP data section (load at physical, not virtual address)
> >
> >Problems:
> > repeated "free" commands show loss of 12K each time (see atached typescript)
> > same sh binary (from skyeye test suite)
> > does not exhibit this on 2.6 and 2.4 kernels (from the skyeye test suite).
> > breakpointing sys_munmap shows len==0 (could it be an ABI issue?)
>
> Some comments on the changes below. Ultimately though you need to break this
> single diff up into well defined logical changes. In other words make a patch
> series out of it.
>
>
> >diff --git a/arch/arm/include/asm/memory.h b/arch/arm/include/asm/memory.h
> >index a8997d7..fcb5757 100644
> >--- a/arch/arm/include/asm/memory.h
> >+++ b/arch/arm/include/asm/memory.h
> >@@ -116,6 +116,8 @@
> > #define MODULES_END (END_MEM)
> > #define MODULES_VADDR (PHYS_OFFSET)
> >
> >+#define XIP_VIRT_ADDR(physaddr) (physaddr)
> >+
> > #endif /* !CONFIG_MMU */
> >
> > /*
> >diff --git a/arch/arm/kernel/setup.c b/arch/arm/kernel/setup.c
> >index 3448a3f..a63102b 100644
> >--- a/arch/arm/kernel/setup.c
> >+++ b/arch/arm/kernel/setup.c
> >@@ -60,8 +60,12 @@
> > #include "tcm.h"
> >
> > #ifndef MEM_SIZE
> >+#ifdef CONFIG_DRAM_SIZE
> >+#define MEM_SIZE CONFIG_DRAM_SIZE
> >+#else
> > #define MEM_SIZE (16*1024*1024)
> > #endif
> >+#endif
> >
> > #if defined(CONFIG_FPE_NWFPE) || defined(CONFIG_FPE_FASTFPE)
> > char fpe_type[8];
> >diff --git a/arch/arm/kernel/vmlinux.lds.S b/arch/arm/kernel/vmlinux.lds.S
> >index 20b3041..26c7411 100644
> >--- a/arch/arm/kernel/vmlinux.lds.S
> >+++ b/arch/arm/kernel/vmlinux.lds.S
> >@@ -288,6 +288,7 @@ SECTIONS
> > NOTES
> >
> > BSS_SECTION(0, 0, 0)
> >+ _ebss = .; /* uClinux MTD */
>
> You don't need this if you are not using the MTD/uclinux.o driver.
> And your defconfig doesn't have this enabled.
>
>
> > _end = .;
> >
> > STABS_DEBUG
> >diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
> >index 242174f..babb6c6 100644
> >--- a/arch/arm/mach-at91/Makefile
> >+++ b/arch/arm/mach-at91/Makefile
> >@@ -19,7 +19,7 @@ obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl.o at91sam926x_time.o at91sam9rl_devi
> > obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o at91sam9_alt_reset.o
> > obj-$(CONFIG_ARCH_AT91SAM9G45) += at91sam9g45.o at91sam926x_time.o at91sam9g45_devices.o sam9_smc.o
> > obj-$(CONFIG_ARCH_AT91CAP9) += at91cap9.o at91sam926x_time.o at91cap9_devices.o sam9_smc.o
> >-obj-$(CONFIG_ARCH_AT91X40) += at91x40.o at91x40_time.o
> >+obj-$(CONFIG_ARCH_AT91X40) += at91x40.o at91x40_time.o at91x40_devices.o
> >
> > # AT91RM9200 board-specific support
> > obj-$(CONFIG_MACH_ONEARM) += board-1arm.o
> >diff --git a/arch/arm/mach-at91/at91x40.c b/arch/arm/mach-at91/at91x40.c
> >index 56ba3bd..4d5a475 100644
> >--- a/arch/arm/mach-at91/at91x40.c
> >+++ b/arch/arm/mach-at91/at91x40.c
> >@@ -73,6 +73,6 @@ void __init at91x40_init_interrupts(unsigned int priority[NR_AIC_IRQS])
> > if (!priority)
> > priority = at91x40_default_irq_priority;
> >
> >- at91_aic_init(priority);
> >+ at91_init_interrupts(priority);
> > }
> >
> >diff --git a/arch/arm/mach-at91/board-eb01.c b/arch/arm/mach-at91/board-eb01.c
> >index d2023f2..902ade9 100644
> >--- a/arch/arm/mach-at91/board-eb01.c
> >+++ b/arch/arm/mach-at91/board-eb01.c
> >@@ -38,6 +38,21 @@ static void __init at91eb01_init_irq(void)
> > static void __init at91eb01_init_early(void)
> > {
> > at91x40_initialize(40000000);
> >+
> >+ /* USART0 ttyS0. (Rx & Tx only) */
> >+ at91_register_uart(AT91X40_ID_USART0, 0, 0);
> >+
> >+ /* USART1 ttyS1. (Rx & Tx only) */
> >+ at91_register_uart(AT91X40_ID_USART1, 1, 0);
> >+
> >+ /* set serial console to ttyS0 (USART0) */
> >+ at91_set_serial_console(0);
> >+}
> >+
> >+static void __init at91eb01_init_machine(void)
> >+{
> >+ /* Serial */
> >+ at91_add_device_serial();
> > }
> >
> > MACHINE_START(AT91EB01, "Atmel AT91 EB01")
> >@@ -45,5 +60,5 @@ MACHINE_START(AT91EB01, "Atmel AT91 EB01")
> > .timer = &at91x40_timer,
> > .init_early = at91eb01_init_early,
> > .init_irq = at91eb01_init_irq,
> >+ .init_machine = at91eb01_init_machine,
> > MACHINE_END
> >-
> >diff --git a/arch/arm/mach-at91/include/mach/at91x40.h b/arch/arm/mach-at91/include/mach/at91x40.h
> >index a152ff8..8d3c57c 100644
> >--- a/arch/arm/mach-at91/include/mach/at91x40.h
> >+++ b/arch/arm/mach-at91/include/mach/at91x40.h
> >@@ -34,8 +34,8 @@
> >
> > #define AT91_EBI (0xffe00000 - AT91_BASE_SYS) /* External Bus Interface */
> > #define AT91_SF (0xfff00000 - AT91_BASE_SYS) /* Special Function */
> >-#define AT91_USART1 (0xfffcc000 - AT91_BASE_SYS) /* USART 1 */
> >-#define AT91_USART0 (0xfffd0000 - AT91_BASE_SYS) /* USART 0 */
> >+#define AT91_USART1 0xfffcc000 /* USART 1 */
> >+#define AT91_USART0 0xfffd0000 /* USART 0 */
>
> You probably want to leave these as they were. Modify your resource defines
> in at91x40_devices.c and add AT91_BASE_SYS to the AT91_USARTx values. That
> is more consistent with all other users of these defines.
drop AT91_BASE_SYS
I'm dropping it an AT91
don't use at91_sys_read/write too
Best Regards,
J.
^ permalink raw reply [flat|nested] 5+ messages in thread
* Atmel at91x40 ("EB01" eval board) resurected
2011-12-23 3:18 Atmel at91x40 ("EB01" eval board) resurected Phil Budne
2011-12-30 1:14 ` Greg Ungerer
@ 2012-03-17 15:43 ` Thomas Petazzoni
2012-03-19 5:01 ` Greg Ungerer
1 sibling, 1 reply; 5+ messages in thread
From: Thomas Petazzoni @ 2012-03-17 15:43 UTC (permalink / raw)
To: linux-arm-kernel
Hello Phil,
Le Thu, 22 Dec 2011 22:18:53 -0500,
Phil Budne <phil@ultimate.com> a ?crit :
> I decided to see if I could bring up current kernel sources under
> skyeye (at91x40 simulation).
Very interesting, thanks. Your patches indeed allow the AT91x40 kernel
to boot under SkyEye, while the unpatched Linux kernel does not,
apparently.
Greg, it seems you are saying that the mainline kernel, unchanged,
boots under SkyEye. Could you share your kernel configuration and
SkyEye configuration?
> Runs on locally modified skyeye
> based on skyeye-v1.2_Rel.tar (had trouble building latest release)
> adds interrupt driven UART output
> tweaked for programmed I/O UART input
> fix for loading XIP data section (load at physical, not virtual address)
Would you mind publishing your changes to SkyEye? So far, I'm blocked
because of the lack of interrupt driver UART output.
Do you plan on further pushing those AT91x40 changes?
Thanks for your work,
Thomas Petazzoni
--
Thomas Petazzoni, Free Electrons
Kernel, drivers, real-time and embedded Linux
development, consulting, training and support.
http://free-electrons.com
^ permalink raw reply [flat|nested] 5+ messages in thread
* Atmel at91x40 ("EB01" eval board) resurected
2012-03-17 15:43 ` Thomas Petazzoni
@ 2012-03-19 5:01 ` Greg Ungerer
0 siblings, 0 replies; 5+ messages in thread
From: Greg Ungerer @ 2012-03-19 5:01 UTC (permalink / raw)
To: linux-arm-kernel
Hi Thomas,
On 18/03/12 01:43, Thomas Petazzoni wrote:
> Le Thu, 22 Dec 2011 22:18:53 -0500,
> Phil Budne<phil@ultimate.com> a ??crit :
>
>> I decided to see if I could bring up current kernel sources under
>> skyeye (at91x40 simulation).
>
> Very interesting, thanks. Your patches indeed allow the AT91x40 kernel
> to boot under SkyEye, while the unpatched Linux kernel does not,
> apparently.
>
> Greg, it seems you are saying that the mainline kernel, unchanged,
> boots under SkyEye.
No, I didn't mean to imply that in my response (
http://lists.infradead.org/pipermail/linux-arm-kernel/2011-December/078670.html).
It has worked in the past, but I haven't run it for a few kernel
versions now.
I was hoping that Phil would respond to the couple of questions I
had about differences, but he never did.
> Could you share your kernel configuration and
> SkyEye configuration?
Yeah, its in mainline. Its one of the defconfigs:
arch/arm/configs/at91x40_defconfig
>> Runs on locally modified skyeye
>> based on skyeye-v1.2_Rel.tar (had trouble building latest release)
>> adds interrupt driven UART output
>> tweaked for programmed I/O UART input
>> fix for loading XIP data section (load at physical, not virtual address)
>
> Would you mind publishing your changes to SkyEye? So far, I'm blocked
> because of the lack of interrupt driver UART output.
>
> Do you plan on further pushing those AT91x40 changes?
It would be really nice to get Phil's changes in a form that can be
applied to mainline.
Regards
Greg
------------------------------------------------------------------------
Greg Ungerer -- Principal Engineer EMAIL: gerg at snapgear.com
SnapGear Group, McAfee PHONE: +61 7 3435 2888
8 Gardner Close FAX: +61 7 3217 5323
Milton, QLD, 4064, Australia WEB: http://www.SnapGear.com
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2012-03-19 5:01 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-12-23 3:18 Atmel at91x40 ("EB01" eval board) resurected Phil Budne
2011-12-30 1:14 ` Greg Ungerer
2012-01-07 12:07 ` Jean-Christophe PLAGNIOL-VILLARD
2012-03-17 15:43 ` Thomas Petazzoni
2012-03-19 5:01 ` Greg Ungerer
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).