Hi all,
I am trying to run aarch32 armv8r binary on Xen as domU guest and I am getting a data abort.
I have changed the memory address in dts node as follows (based on my fvp address) :-
- dram0: memory@0 {
+ dram0: memory@30000000 {
compatible = "mmio-dram";
- reg = <0x0 DT_SIZE_M(128)>;
+ reg = <0x30000000 DT_SIZE_M(128)>;
};
I need some pointers to debug the data abort.
The disassembly of our interest is :-
static int pl011_init(const struct device *dev)
{
30001ec8: e92d41f0 push {r4, r5, r6, r7, r8, lr}
const struct pl011_config *config = dev->config;
struct pl011_data *data = dev->data;
30001ecc: e5906010 ldr r6, [r0, #16]
{
30001ed0: e1a04000 mov r4, r0
/*
* If working in SBSA mode, we assume that UART is already configured,
* or does not require configuration at all (if UART is emulated by
* virtualization software).
*/
if (!data->sbsa) {
30001ed4: e5d67004 ldrb r7, [r6, #4]
30001ed8: e3570000 cmp r7, #0
30001edc: 1a000025 bne 30001f78 <pl011_init+0xb0>
const struct pl011_config *config = dev->config;
30001ee0: e5902004 ldr r2, [r0, #4]
return (volatile struct pl011_regs *const)DEVICE_MMIO_GET(dev);
30001ee4: e5925000 ldr r5, [r2] <<<<<<<<<<<----------------------------- The value of r5 is 0 and r2 is 0x300005d14
uint64_t bauddiv = (((uint64_t)clk) << PL011_FBRD_WIDTH)
30001ee8: e5921004 ldr r1, [r2, #4]
get_uart(dev)->cr &= ~PL011_CR_UARTEN;
30001eec: e5953030 ldr r3, [r5, #48] ; 0x30 <<<<<<<<<<<---------------------------- Data abort occurs here as r5 is 0
I can see that “DEVICE_MMIO_MAP(dev, K_MEM_CACHE_NONE);” becomes a nop as DEVICE_MMIO_IS_IN_RAM is undefined.
I do not understand how it is supposed to find the device address. The dtb is loaded at 0x38000000. This does not fall in the range of r2’s value.
Please provide some pointers.
Kind regards,
Ayan