What is the tlbiel instruction and what does it do?

I recently got acquainted with an instruction called tlbiel , and I am curious what this means and what purpose it serves. After an intensive Google search, I saw one IBM document that prompted me to believe in a hypervisor. The current instruction I came across is tlbiel r3, 1 , and after studying the operation code ( 0x7C201A24 ), I came to the conclusion that it roughly translates to mtspr 3, 1 ; the only difference is that the expected value of 467 at 21-30 in the mtspr operating code has changed to 274. However, before tlbiel is executed, the commands li r3, 0x3FF and sldi r3, r3, 32 are entered immediately before r3 contains 0x00003FF000000000 .

As far as I know, there is no SPR with a value of 3 and generally there is no real documentation on tlbiel (what can I find). What does this instruction do?

+5
source share
1 answer

tlbiel - "TLB Invalidate Entry Local": it cancels the entry in TLB [Buffer Look-side Buffer]. Since the comments on the alleged issue are related to the regular TLB, it is "local" because it only invalidates the TLB entries in the thread executing the tlbiel instruction.

For more information, the usual source is Power ISA. It explains the instruction in very fine detail, including what it does with the register you specify.

There are several versions of ISA floating around. The two most convenient for searching are:

You will need to sign an IBM ID to download files, but they are free. If you are developing an assembler level on a PowerPC chip, these are absolutely invaluable resources.

A few last things:

  • You mentioned that you are running an Xbox 360. This supports a slightly different set of commands. If you can find an ISA that matches this particular processor, all the better: while most things stay the same, some of the details change. (I have no experience with anything older than Power8 - so sorry I can't be more specific here!)
  • The Linux kernel is by far the best open source documentation on how to do low-level stuff on Power processors. There is code that deals with the invalidity of TLB, and especially when tlbiel is sufficient and when a non-local version is required.
+6
source

Source: https://habr.com/ru/post/1260379/


All Articles