[libre-riscv-dev] [Bug 186] Create decoder for SOC: Power ISA and RISC-V
bugzilla-daemon at libre-riscv.org
bugzilla-daemon at libre-riscv.org
Thu Mar 26 05:40:30 GMT 2020
http://bugs.libre-riscv.org/show_bug.cgi?id=186
--- Comment #111 from Luke Kenneth Casson Leighton <lkcl at lkcl.net> ---
deep breath....
install dependencies (saves messing about) with
apt-get build-dep qemu
git clone from here:
[remote "origin"]
url = https://github.com/legoater/qemu.git
fetch = +refs/heads/*:refs/remotes/origin/*
git checkout this branch:
* origin/powernv-next
configure/build with this:
./configure --enable-system
--target-list=ppc64-softmmu,ppc64-linux-user,ppc64le-linux-user
edit hw/ppc/pnv.c and comment out these lines:
/*
if (qemu_uuid_set) {
_FDT((fdt_property_string(fdt, "system-id", buf)));
}
*/
run python3 domstart.py (files to be attached shortly)
dump the state to a file:
virsh # dump Linux-0.2 mem.hex --memory-only --crash
objdump the results with this:
objdump -x mem.hex
which gives the following (including regfile and memory):
architecture: powerpc:common64, flags 0x00000000:
start address 0x0000000000000000
Program Header:
NOTE off 0x00000000000000b0 vaddr 0x0000000000000000 paddr
0x0000000000000000 align 2**0
filesz 0x0000000000000710 memsz 0x0000000000000710 flags ---
LOAD off 0x00000000000007c0 vaddr 0x0000000000000000 paddr
0x0000000000000000 align 2**0
filesz 0x0000000040000000 memsz 0x0000000040000000 flags ---
Sections:
Idx Name Size VMA LMA File off Algn
0 note0 00000710 0000000000000000 0000000000000000 000000b0 2**0
CONTENTS, READONLY
1 .reg/0 00000180 0000000000000000 0000000000000000 00000134 2**2
CONTENTS
2 .reg 00000180 0000000000000000 0000000000000000 00000134 2**2
CONTENTS
3 .reg2/0 00000108 0000000000000000 0000000000000000 000002d0 2**2
CONTENTS
4 .reg2 00000108 0000000000000000 0000000000000000 000002d0 2**2
CONTENTS
5 load1 40000000 0000000000000000 0000000000000000 000007c0 2**0
CONTENTS, ALLOC, LOAD, READONLY
and thus can be parsed with python elf libraries mentioned in previous
comments.
--
You are receiving this mail because:
You are on the CC list for the bug.
More information about the libre-riscv-dev
mailing list