Fix call_pal() prototype for alpha system emulation
PATCH 1/1 Fix call_pal() prototype for alpha system emulation
Hi,
- Fix call_pal() function prototype which is different depending of CONFIG_USER_ONLY.
- Add cpu_reset() function, required for system emulation
Hervé
cpu.h +4 -0
@@ -411,7 +411,11 @@int cpu_alpha_mtpr (CPUState *env,int iprn,uint64_t val,uint64_t *oldvalp);void cpu_loop_exit (void );void pal_init (CPUState *env); +#if !defined (CONFIG_USER_ONLY ) +void call_pal (CPUState *env); +#else void call_pal (CPUState *env,int palcode); +#endif #define CPU_PC_FROM_TB (env, tb) env->pc = tb->pc
translate.c +4 -0
@@ -2138,6 +2138,10 @@return env; } +void cpu_reset (CPUAlphaState *env) +{ +} +void gen_pc_load (CPUState *env,TranslationBlock *tb,unsigned long searched_pc,int pc_pos,void *puc) {
Quoted 4 lines · Hervé Poussineau
Hi,
- Fix
call_pal()function prototype which is different depending ofCONFIG_USER_ONLY.
I have applied this part.
Quoted 1 line
- Add
cpu_reset()function, required for system emulation
This is wrong, this has to be defined in hw/ along with the machine code.
Quoted 33 lines
Hervé
Index:
target-alpha/cpu.h
===================================================================cpu.h +4
-0@@ -411,7 +411,11 @@int cpu_alpha_mtpr (CPUState *env,int iprn,uint64_t val,uint64_t *oldvalp);void cpu_loop_exit (void );void pal_init (CPUState *env); +#if !defined (CONFIG_USER_ONLY ) +void call_pal (CPUState *env); +#else void call_pal (CPUState *env,int palcode); +#endif #define CPU_PC_FROM_TB (env, tb) env->pc = tb->pcIndex:
target-alpha/translate.c
===================================================================translate.c +4
-0@@ -2138,6 +2138,10 @@return env; } +void cpu_reset (CPUAlphaState *env) +{ +} +void gen_pc_load (CPUState *env,TranslationBlock *tb,unsigned long searched_pc,int pc_pos,void *puc) {
Signature · 4 lines
.''`. Aurelien Jarno | GPG: 1024D/F1BCDB73 : :' : Debian developer | Electrical Engineer `. `' [email protected] | [email protected] `- people.debian.org/~aurel32 | www.aurel32.net
Quoted 5 lines · Aurelien Jarno
Quoted 2 lines
- Add
cpu_reset()function, required for system emulationThis is wrong, this has to be defined in hw/ along with the machine code.
All of the CPUs have cpu_reset in their respective translate.c or helper.c which gets called by the machine definition in hw/.
Laurent