[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug 811683] Re: 7400, 7410, 7450 cpus vector have wrong exception prefi

From: till
Subject: [Bug 811683] Re: 7400, 7410, 7450 cpus vector have wrong exception prefix at reset
Date: Sun, 09 Aug 2020 17:05:19 -0000

Yes, it is a CPU feature, and yes you can select the exception vector
prefix with the MSR[IP] bit which should be set by a hardware reset. The
initial value seems wrong in qemu but that seems to fixed by the
machine-specific initialization. The 'none' machine, however, just uses
generic code and does not do anything PPC-specific. This means that

 - the MSR and probably other registers, too, are not initialized to what the 
   documentation specifies as reset values.
 - the time-base is not initialized at all (and this leads to a segfault when 
you start the
   ppc 'none' machine)
 - probably other things are not properly initialized. I wonder, e.g., about 
the MMU...

It seems that all registers are simply initialized to zero. Then, there seems 
to be a 'reset' function which initializes the registers to the proper reset 
values (well - sort of bug 812398 reports that HID0 is not properly initialized 
by some CPU flavours). However, that reset function
is not executed by the 'none' machine initialization....

You received this bug notification because you are a member of qemu-
devel-ml, which is subscribed to QEMU.

  7400,7410,7450 cpus vector have wrong exception prefix at reset

Status in QEMU:

Bug description:
  I have a proprietary ROM implementing system calls that are executed
  via the 'SC' instruction.

  I use qemu-0.14.1,

  qemu-system-ppc -M prep -cpu $CPU -bios my_bios -kernel my_kernel

  That works fine on a 604 (CPU=0x00040103) - but does not on an emulated 7400 
(CPU=0x000c0209) or 7450 (CPU=0x80000201). I found that the emulator jumps to 
0x00000c00 instead of 0xfff00c00.
  Probably this is due to a wrong setting in target-ppc/translate_init.c:

  init_excp_604() correctly sets env->hreset_vector=0xfff00000UL;


  init_excp_7400() says env->hreset_vector=0x00000000UL;

  which seems wrong. (the 7400 manual says a hard-reset jumps initializes the
  prefix to 0xfff00000.)

  Likewise, init_excp_7450() (and probably other, related CPUs) are

  Indeed, when I change the value in init_excp_7400() to 0xfff00000UL then
  everything works as expected for me.

To manage notifications about this bug go to:

reply via email to

[Prev in Thread] Current Thread [Next in Thread]