Why does the ARM PC register point to the instruction after the next one to be executed?

It’s a nasty bit of legacy abstraction leakage. The original ARM design had a 3-stage pipeline (fetch-decode-execute). To simplify the design they chose to have the PC read as the value currently on the instruction fetch address lines, rather than that of the currently executing instruction from 2 cycles ago. Since most PC-relative addresses are … Read more

How does the linux kernel manage less than 1GB physical memory?

Not all virtual (linear) addresses must be mapped to anything. If the code accesses unmapped page, the page fault is risen. The physical page can be mapped to several virtual addresses simultaneously. In the 4 GB virtual memory there are 2 sections: 0x0… 0xbfffffff – is process virtual memory and 0xc0000000 .. 0xffffffff is a … Read more

cross compiler ldd

This is a bit of a kluge, but it’s the best solution I could find, and it really works quite well for basic use – just save this script as “arm-none-linux-gnueabi-ldd” with your other cross tools. #!/bin/sh arm-none-linux-gnueabi-readelf -a $1 | grep “Shared library:”

Working of __asm__ __volatile__ (“” : : : “memory”)

asm volatile(“” ::: “memory”); creates a compiler level memory barrier forcing optimizer to not re-order memory accesses across the barrier. For example, if you need to access some address in a specific order (probably because that memory area is actually backed by a different device rather than a memory) you need to be able tell … Read more

arm gcc toolchain as arm-elf or arm-none-eabi, what is the difference?

Here is an excellent doc. Tool chains have a loose name convention like arch [-vendor] [-os] – eabi arch – refers to target architecture (which in our case is ARM) vendor – refers to toolchain supplier os – refers to the target operating system eabi – refers to Embedded Application Binary Interface some illustrations as … Read more

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)