openpower-cores / a2i

Other
243 stars 40 forks source link

About the payload bits of msgsnd instruction #48

Closed zhaoxiahust closed 2 years ago

zhaoxiahust commented 2 years ago

Hi, As mentioned in 7.7.2 Doorbell Message Filtering, if the 37 bit of payload is set, the message is accepted by all processors regardless of the value of the PIR register and the value of PIRTAG.

However, if you look at the xuq_spr_cspr.vhdl file, the doorbell signal is created as shown below.

set_dbell(t) <= lsu_xu_dbell_val_q and lsu_xu_dbell_type_q = "00000" and lsu_xu_dbell_lpid_match_q and (lsu_xu_dbell_brdcast_q or (dbell_pir_match and dbell_pir_thread(t))); It is clear that lsu_xu_dbell_brdcast_q can only affect pir comparision. In other words, if broadcast is set in the message but the LPIDTAG does not match, the message cannot be accepted.

Any comments?

openpowerwtf commented 2 years ago

This defines the behavior for set_dbell (p. 358).

If a DBELL message is received by a processor, the message is accepted if one of the following conditions exist: • The message is for this partition (payload LPIDTAG = LPIDR). • The message is for all partitions (payload LPIDTAG = 0). If a DBELL message is accepted, a processor doorbell exception is generated if one of the following condi- tions exist: • This is a broadcast message (payload BRDCAST = 1). • The message is intended for this processor (PIR 50:63 = payload PIRTAG) .

Seems like the bit 37 definition should reflect that; it is talking about both acceptance and generation. Instead of:

The message is accepted by all processors regardless of the value of the PIR register and the value of PIRTAG.

it should say something like:

If the message is accepted, this bit determines under what conditions an exception is generated.

zhaoxiahust commented 2 years ago

Got it! Thanks!