Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
target/hppa: Skeleton support for hppa-softmmu
With the addition of default-configs/hppa-softmmu.mak, this will compile. It is not enabled with this patch, however. Signed-off-by: Helge Deller <deller@gmx.de> Signed-off-by: Richard Henderson <richard.henderson@linaro.org>
- Loading branch information
Showing
10 changed files
with
114 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
obj-y += machine.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
/* | ||
* QEMU HPPA hardware system emulator. | ||
* Copyright 2018 Helge Deller <deller@gmx.de> | ||
*/ | ||
|
||
#include "qemu/osdep.h" | ||
#include "qemu-common.h" | ||
#include "cpu.h" | ||
#include "hw/hw.h" | ||
#include "elf.h" | ||
#include "hw/loader.h" | ||
#include "hw/boards.h" | ||
#include "qemu/error-report.h" | ||
#include "sysemu/sysemu.h" | ||
#include "hw/timer/mc146818rtc.h" | ||
#include "hw/ide.h" | ||
#include "hw/timer/i8254.h" | ||
#include "hw/char/serial.h" | ||
#include "qemu/cutils.h" | ||
#include "qapi/error.h" | ||
|
||
|
||
static void machine_hppa_init(MachineState *machine) | ||
{ | ||
} | ||
|
||
static void machine_hppa_machine_init(MachineClass *mc) | ||
{ | ||
mc->desc = "HPPA generic machine"; | ||
mc->init = machine_hppa_init; | ||
mc->block_default_type = IF_SCSI; | ||
mc->max_cpus = 1; | ||
mc->is_default = 1; | ||
mc->default_ram_size = 512 * M_BYTE; | ||
mc->default_boot_order = "cd"; | ||
} | ||
|
||
DEFINE_MACHINE("hppa", machine_hppa_machine_init) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
obj-y += translate.o helper.o cpu.o op_helper.o gdbstub.o | ||
obj-y += translate.o helper.o cpu.o op_helper.o gdbstub.o mem_helper.o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
/* | ||
* HPPA memory access helper routines | ||
* | ||
* Copyright (c) 2017 Helge Deller | ||
* | ||
* This library is free software; you can redistribute it and/or | ||
* modify it under the terms of the GNU Lesser General Public | ||
* License as published by the Free Software Foundation; either | ||
* version 2 of the License, or (at your option) any later version. | ||
* | ||
* This library is distributed in the hope that it will be useful, | ||
* but WITHOUT ANY WARRANTY; without even the implied warranty of | ||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU | ||
* Lesser General Public License for more details. | ||
* | ||
* You should have received a copy of the GNU Lesser General Public | ||
* License along with this library; if not, see <http://www.gnu.org/licenses/>. | ||
*/ | ||
|
||
#include "qemu/osdep.h" | ||
#include "cpu.h" | ||
#include "exec/exec-all.h" | ||
#include "exec/helper-proto.h" | ||
#include "qom/cpu.h" | ||
|
||
#ifdef CONFIG_USER_ONLY | ||
int hppa_cpu_handle_mmu_fault(CPUState *cs, vaddr address, | ||
int size, int rw, int mmu_idx) | ||
{ | ||
HPPACPU *cpu = HPPA_CPU(cs); | ||
|
||
cs->exception_index = EXCP_SIGSEGV; | ||
cpu->env.ior = address; | ||
return 1; | ||
} | ||
#else | ||
hwaddr hppa_cpu_get_phys_page_debug(CPUState *cs, vaddr addr) | ||
{ | ||
/* Stub */ | ||
return addr; | ||
} | ||
|
||
void tlb_fill(CPUState *cs, target_ulong addr, MMUAccessType type, | ||
int mmu_idx, uintptr_t retaddr) | ||
{ | ||
/* Stub */ | ||
int prot = PAGE_READ | PAGE_WRITE | PAGE_EXEC; | ||
hwaddr phys = addr; | ||
|
||
/* Success! Store the translation into the QEMU TLB. */ | ||
tlb_set_page(cs, addr & TARGET_PAGE_MASK, phys & TARGET_PAGE_MASK, | ||
prot, mmu_idx, TARGET_PAGE_SIZE); | ||
} | ||
#endif /* CONFIG_USER_ONLY */ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters