mirror of
https://github.com/Motorhead1991/qemu.git
synced 2025-07-27 20:33:54 -06:00
bsd-user: start to move target CPU functions to target_arch*
Move the CPU functions into target_arch_cpu.c that are unique to each CPU. These are defined in target_arch.h. Signed-off-by: Stacey Son <sson@FreeBSD.org> Signed-off-by: Warner Losh <imp@bsdimp.com> Reviewed-by: Richard Henderson <richard.henderson@linaro.org>
This commit is contained in:
parent
01a298a57e
commit
e2a7472918
7 changed files with 218 additions and 43 deletions
|
@ -72,13 +72,6 @@ void gemu_log(const char *fmt, ...)
|
|||
va_end(ap);
|
||||
}
|
||||
|
||||
#if defined(TARGET_I386)
|
||||
int cpu_get_pic_interrupt(CPUX86State *env)
|
||||
{
|
||||
return -1;
|
||||
}
|
||||
#endif
|
||||
|
||||
void fork_start(void)
|
||||
{
|
||||
}
|
||||
|
@ -94,11 +87,6 @@ void fork_end(int child)
|
|||
/***********************************************************/
|
||||
/* CPUX86 core interface */
|
||||
|
||||
uint64_t cpu_get_tsc(CPUX86State *env)
|
||||
{
|
||||
return cpu_get_host_ticks();
|
||||
}
|
||||
|
||||
static void write_dt(void *ptr, unsigned long addr, unsigned long limit,
|
||||
int flags)
|
||||
{
|
||||
|
@ -570,29 +558,6 @@ int main(int argc, char **argv)
|
|||
*/
|
||||
guest_base = HOST_PAGE_ALIGN(guest_base);
|
||||
|
||||
/*
|
||||
* Read in mmap_min_addr kernel parameter. This value is used
|
||||
* When loading the ELF image to determine whether guest_base
|
||||
* is needed.
|
||||
*
|
||||
* When user has explicitly set the quest base, we skip this
|
||||
* test.
|
||||
*/
|
||||
if (!have_guest_base) {
|
||||
FILE *fp;
|
||||
|
||||
fp = fopen("/proc/sys/vm/mmap_min_addr", "r");
|
||||
if (fp != NULL) {
|
||||
unsigned long tmp;
|
||||
if (fscanf(fp, "%lu", &tmp) == 1) {
|
||||
mmap_min_addr = tmp;
|
||||
qemu_log_mask(CPU_LOG_PAGE, "host mmap_min_addr=0x%lx\n",
|
||||
mmap_min_addr);
|
||||
}
|
||||
fclose(fp);
|
||||
}
|
||||
}
|
||||
|
||||
if (loader_exec(filename, argv + optind, target_environ, regs, info,
|
||||
&bprm) != 0) {
|
||||
printf("Error loading %s\n", filename);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue