Skip to content

Commit

Permalink
YOLO 9820
Browse files Browse the repository at this point in the history
  • Loading branch information
astarasikov committed Apr 28, 2019
1 parent 200780a commit a2d3780
Show file tree
Hide file tree
Showing 12 changed files with 425 additions and 34 deletions.
15 changes: 15 additions & 0 deletions build.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/bin/bash

./configure \
--target-list=aarch64-softmmu \
--disable-werror \
--disable-user \
--disable-sdl \
--disable-vnc \
--disable-virtfs \
--disable-cocoa \
--disable-xen \
--enable-capstone=git \
--disable-tcg-interpreter \
--enable-debug-tcg \
--enable-debug-info
2 changes: 2 additions & 0 deletions exec.c
Original file line number Diff line number Diff line change
Expand Up @@ -490,6 +490,8 @@ static MemoryRegionSection flatview_do_translate(FlatView *fv,
hwaddr page_mask = (hwaddr)(-1);
hwaddr plen = (hwaddr)(-1);

//fprintf(stderr, "%s: addr=%llx is_write=%d\n", __func__, addr, is_write);

if (plen_out) {
plen = *plen_out;
}
Expand Down
6 changes: 6 additions & 0 deletions gdbscript
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
target remote tcp::1234
set $pc = 0x8f000000

b *0x8f002c44
c
set *(int*)0x8f16403c = 0
10 changes: 10 additions & 0 deletions hw/arm/boot.c
Original file line number Diff line number Diff line change
Expand Up @@ -568,7 +568,9 @@ static void do_cpu_reset(void *opaque)
const struct arm_boot_info *info = env->boot_info;

cpu_reset(cs);
env->cp15.scr_el3 |= 0x8f000000;
if (info) {
printf("%s entry=%llx\n", __func__, info->entry);
if (!info->is_linux) {
int i;
/* Jump to the entry point. */
Expand Down Expand Up @@ -730,6 +732,7 @@ static uint64_t arm_load_elf(struct arm_boot_info *info, uint64_t *pentry,
Error *err = NULL;


printf("%s: info->kernel_filename=%x\n", __func__, info->kernel_filename);
load_elf_hdr(info->kernel_filename, &elf_header, &elf_is64, &err);
if (err) {
return ret;
Expand Down Expand Up @@ -961,6 +964,7 @@ static void arm_load_kernel_notify(Notifier *notifier, void *data)
exit(1);
}
info->entry = entry;
printf("%s: entry=%llx\n", __func__, entry);
if (is_linux) {
uint32_t fixupcontext[FIXUP_MAX];

Expand Down Expand Up @@ -1056,9 +1060,15 @@ void arm_load_kernel(ARMCPU *cpu, struct arm_boot_info *info)
{
CPUState *cs;

#if 0
info->load_kernel_notifier.cpu = cpu;
info->load_kernel_notifier.notifier.notify = arm_load_kernel_notify;
qemu_add_machine_init_done_notifier(&info->load_kernel_notifier.notifier);
#else
for (cs = CPU(cpu); cs; cs = CPU_NEXT(cs)) {
ARM_CPU(cs)->env.boot_info = info;
}
#endif

/* CPU objects (unlike devices) are not automatically reset on system
* reset, so we must always register a handler to do so. If we're
Expand Down
Loading

0 comments on commit a2d3780

Please sign in to comment.