提交 2345f1c0 编写于 作者: A Alexander Graf

PPC: Ignore writes to L2CR

The L2CR register contains a number of bits that either impose configuration
which we can't deal with or mean "something is in progress until the bit is
0 again".

Since we don't model the former and we do want to accomodate guests using the
latter semantics, let's just ignore writes to L2CR. That way guests always read
back 0 and are usually happy with that.
Signed-off-by: NAlexander Graf <agraf@suse.de>
上级 0d54a502
...@@ -1381,7 +1381,7 @@ static void gen_spr_74xx (CPUPPCState *env) ...@@ -1381,7 +1381,7 @@ static void gen_spr_74xx (CPUPPCState *env)
/* XXX : not implemented */ /* XXX : not implemented */
spr_register(env, SPR_L2CR, "L2CR", spr_register(env, SPR_L2CR, "L2CR",
SPR_NOACCESS, SPR_NOACCESS, SPR_NOACCESS, SPR_NOACCESS,
&spr_read_generic, &spr_write_generic, &spr_read_generic, NULL,
0x00000000); 0x00000000);
/* Not strictly an SPR */ /* Not strictly an SPR */
vscr_init(env, 0x00010000); vscr_init(env, 0x00010000);
...@@ -5169,7 +5169,7 @@ static void init_proc_750 (CPUPPCState *env) ...@@ -5169,7 +5169,7 @@ static void init_proc_750 (CPUPPCState *env)
/* XXX : not implemented */ /* XXX : not implemented */
spr_register(env, SPR_L2CR, "L2CR", spr_register(env, SPR_L2CR, "L2CR",
SPR_NOACCESS, SPR_NOACCESS, SPR_NOACCESS, SPR_NOACCESS,
&spr_read_generic, &spr_write_generic, &spr_read_generic, NULL,
0x00000000); 0x00000000);
/* Time base */ /* Time base */
gen_tbl(env); gen_tbl(env);
...@@ -5232,7 +5232,7 @@ static void init_proc_750cl (CPUPPCState *env) ...@@ -5232,7 +5232,7 @@ static void init_proc_750cl (CPUPPCState *env)
/* XXX : not implemented */ /* XXX : not implemented */
spr_register(env, SPR_L2CR, "L2CR", spr_register(env, SPR_L2CR, "L2CR",
SPR_NOACCESS, SPR_NOACCESS, SPR_NOACCESS, SPR_NOACCESS,
&spr_read_generic, &spr_write_generic, &spr_read_generic, NULL,
0x00000000); 0x00000000);
/* Time base */ /* Time base */
gen_tbl(env); gen_tbl(env);
...@@ -5418,7 +5418,7 @@ static void init_proc_750cx (CPUPPCState *env) ...@@ -5418,7 +5418,7 @@ static void init_proc_750cx (CPUPPCState *env)
/* XXX : not implemented */ /* XXX : not implemented */
spr_register(env, SPR_L2CR, "L2CR", spr_register(env, SPR_L2CR, "L2CR",
SPR_NOACCESS, SPR_NOACCESS, SPR_NOACCESS, SPR_NOACCESS,
&spr_read_generic, &spr_write_generic, &spr_read_generic, NULL,
0x00000000); 0x00000000);
/* Time base */ /* Time base */
gen_tbl(env); gen_tbl(env);
...@@ -5485,7 +5485,7 @@ static void init_proc_750fx (CPUPPCState *env) ...@@ -5485,7 +5485,7 @@ static void init_proc_750fx (CPUPPCState *env)
/* XXX : not implemented */ /* XXX : not implemented */
spr_register(env, SPR_L2CR, "L2CR", spr_register(env, SPR_L2CR, "L2CR",
SPR_NOACCESS, SPR_NOACCESS, SPR_NOACCESS, SPR_NOACCESS,
&spr_read_generic, &spr_write_generic, &spr_read_generic, NULL,
0x00000000); 0x00000000);
/* Time base */ /* Time base */
gen_tbl(env); gen_tbl(env);
...@@ -5557,7 +5557,7 @@ static void init_proc_750gx (CPUPPCState *env) ...@@ -5557,7 +5557,7 @@ static void init_proc_750gx (CPUPPCState *env)
/* XXX : not implemented (XXX: different from 750fx) */ /* XXX : not implemented (XXX: different from 750fx) */
spr_register(env, SPR_L2CR, "L2CR", spr_register(env, SPR_L2CR, "L2CR",
SPR_NOACCESS, SPR_NOACCESS, SPR_NOACCESS, SPR_NOACCESS,
&spr_read_generic, &spr_write_generic, &spr_read_generic, NULL,
0x00000000); 0x00000000);
/* Time base */ /* Time base */
gen_tbl(env); gen_tbl(env);
...@@ -5693,7 +5693,7 @@ static void init_proc_755 (CPUPPCState *env) ...@@ -5693,7 +5693,7 @@ static void init_proc_755 (CPUPPCState *env)
/* XXX : not implemented */ /* XXX : not implemented */
spr_register(env, SPR_L2CR, "L2CR", spr_register(env, SPR_L2CR, "L2CR",
SPR_NOACCESS, SPR_NOACCESS, SPR_NOACCESS, SPR_NOACCESS,
&spr_read_generic, &spr_write_generic, &spr_read_generic, NULL,
0x00000000); 0x00000000);
/* XXX : not implemented */ /* XXX : not implemented */
spr_register(env, SPR_L2PMCR, "L2PMCR", spr_register(env, SPR_L2PMCR, "L2PMCR",
...@@ -6524,7 +6524,7 @@ static void init_proc_970 (CPUPPCState *env) ...@@ -6524,7 +6524,7 @@ static void init_proc_970 (CPUPPCState *env)
/* XXX : not implemented */ /* XXX : not implemented */
spr_register(env, SPR_L2CR, "L2CR", spr_register(env, SPR_L2CR, "L2CR",
SPR_NOACCESS, SPR_NOACCESS, SPR_NOACCESS, SPR_NOACCESS,
&spr_read_generic, &spr_write_generic, &spr_read_generic, NULL,
0x00000000); 0x00000000);
/* Memory management */ /* Memory management */
/* XXX: not correct */ /* XXX: not correct */
...@@ -6624,7 +6624,7 @@ static void init_proc_970FX (CPUPPCState *env) ...@@ -6624,7 +6624,7 @@ static void init_proc_970FX (CPUPPCState *env)
/* XXX : not implemented */ /* XXX : not implemented */
spr_register(env, SPR_L2CR, "L2CR", spr_register(env, SPR_L2CR, "L2CR",
SPR_NOACCESS, SPR_NOACCESS, SPR_NOACCESS, SPR_NOACCESS,
&spr_read_generic, &spr_write_generic, &spr_read_generic, NULL,
0x00000000); 0x00000000);
/* Memory management */ /* Memory management */
/* XXX: not correct */ /* XXX: not correct */
...@@ -6736,7 +6736,7 @@ static void init_proc_970GX (CPUPPCState *env) ...@@ -6736,7 +6736,7 @@ static void init_proc_970GX (CPUPPCState *env)
/* XXX : not implemented */ /* XXX : not implemented */
spr_register(env, SPR_L2CR, "L2CR", spr_register(env, SPR_L2CR, "L2CR",
SPR_NOACCESS, SPR_NOACCESS, SPR_NOACCESS, SPR_NOACCESS,
&spr_read_generic, &spr_write_generic, &spr_read_generic, NULL,
0x00000000); 0x00000000);
/* Memory management */ /* Memory management */
/* XXX: not correct */ /* XXX: not correct */
...@@ -6836,7 +6836,7 @@ static void init_proc_970MP (CPUPPCState *env) ...@@ -6836,7 +6836,7 @@ static void init_proc_970MP (CPUPPCState *env)
/* XXX : not implemented */ /* XXX : not implemented */
spr_register(env, SPR_L2CR, "L2CR", spr_register(env, SPR_L2CR, "L2CR",
SPR_NOACCESS, SPR_NOACCESS, SPR_NOACCESS, SPR_NOACCESS,
&spr_read_generic, &spr_write_generic, &spr_read_generic, NULL,
0x00000000); 0x00000000);
/* Memory management */ /* Memory management */
/* XXX: not correct */ /* XXX: not correct */
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册