BRBFCR_EL1, Branch Record Buffer Function Control Register
The BRBFCR_EL1 characteristics are:
Purpose
Functional controls for the Branch Record Buffer.
Configuration
This register is present only when FEAT_BRBE is implemented. Otherwise, direct accesses to BRBFCR_EL1 are UNDEFINED.
Attributes
BRBFCR_EL1 is a 64-bit register.
Field descriptions
The BRBFCR_EL1 bit assignments are:
63 | 62 | 61 | 60 | 59 | 58 | 57 | 56 | 55 | 54 | 53 | 52 | 51 | 50 | 49 | 48 | 47 | 46 | 45 | 44 | 43 | 42 | 41 | 40 | 39 | 38 | 37 | 36 | 35 | 34 | 33 | 32 |
RES0 | |||||||||||||||||||||||||||||||
RES0 | BANK | RES0 | DIRCALL | INDCALL | RTN | INDIRECT | DIRECT | EnI | RES0 | PAUSED | LASTFAILED | RES0 | |||||||||||||||||||
31 | 30 | 29 | 28 | 27 | 26 | 25 | 24 | 23 | 22 | 21 | 20 | 19 | 18 | 17 | 16 | 15 | 14 | 13 | 12 | 11 | 10 | 9 | 8 | 7 | 6 | 5 | 4 | 3 | 2 | 1 | 0 |
Bits [63:30]
Reserved, RES0.
BANK, bits [29:28]
Branch record buffer bank access control.
BANK | Meaning |
---|---|
0b00 |
Select branch records 0 to 31. |
0b01 |
Select branch records 32 to 63. |
All other values are reserved.
On a Warm reset, this field resets to an architecturally UNKNOWN value.
Bits [27:22]
Reserved, RES0.
DIRCALL, bit [21]
Match on direct branch with link instructions.
DIRCALL | Meaning |
---|---|
0b0 |
Do not match on direct branch with link instructions. |
0b1 |
Match on direct branch with link instructions. |
On a Warm reset, this field resets to an architecturally UNKNOWN value.
INDCALL, bit [20]
Match on indirect branch with link instructions.
INDCALL | Meaning |
---|---|
0b0 |
Do not match on indirect branch with link instructions. |
0b1 |
Match on indirect branch with link instructions. |
On a Warm reset, this field resets to an architecturally UNKNOWN value.
RTN, bit [19]
Match on function return instructions.
RTN | Meaning |
---|---|
0b0 |
Do not match on function return instructions. |
0b1 |
Match on function return instructions. |
On a Warm reset, this field resets to an architecturally UNKNOWN value.
INDIRECT, bit [18]
Match on indirect branch instructions.
INDIRECT | Meaning |
---|---|
0b0 |
Do not match on indirect branch instructions. |
0b1 |
Match on indirect branch instructions. |
On a Warm reset, this field resets to an architecturally UNKNOWN value.
DIRECT, bit [17]
Match on direct branch instructions.
DIRECT | Meaning |
---|---|
0b0 |
Do not match on direct branch instructions. |
0b1 |
Match on direct branch instructions. |
On a Warm reset, this field resets to an architecturally UNKNOWN value.
EnI, bit [16]
Include or exclude matches.
EnI | Meaning |
---|---|
0b0 |
Include records for matches, and exclude records for non-matches. |
0b1 |
Exclude records for matches, and include records for non-matches. |
On a Warm reset, this field resets to an architecturally UNKNOWN value.
Bits [15:8]
Reserved, RES0.
PAUSED, bit [7]
Branch recording Paused status.
PAUSED | Meaning |
---|---|
0b0 |
Branch recording is not Paused. |
0b1 |
Branch recording is Paused. |
On a Warm reset, this field resets to an architecturally UNKNOWN value.
LASTFAILED, bit [6]
When FEAT_TME is implemented:
When FEAT_TME is implemented:
The last transaction failed.
LASTFAILED | Meaning |
---|---|
0b0 |
Indicates that a transaction did not fail since the last Branch record was generated. |
0b1 |
Indicates that a transaction failed since the last Branch record was generated. |
On a Warm reset, this field resets to an architecturally UNKNOWN value.
Otherwise:
Otherwise:
Reserved, RES0.
Bits [5:0]
Reserved, RES0.
Accessing the BRBFCR_EL1
Accesses to this register use the following encodings:
MRS <Xt>, BRBFCR_EL1
op0 | op1 | CRn | CRm | op2 |
---|---|---|---|---|
0b10 | 0b001 | 0b1001 | 0b0000 | 0b001 |
if PSTATE.EL == EL0 then UNDEFINED; elsif PSTATE.EL == EL1 then if Halted() && HaveEL(EL3) && EDSCR.SDD == '1' && boolean IMPLEMENTATION_DEFINED "EL3 trap priority when SDD == '1'" && MDCR_EL3.SBRBE != '11' && SCR_EL3.NS == '0' then UNDEFINED; elsif Halted() && HaveEL(EL3) && EDSCR.SDD == '1' && boolean IMPLEMENTATION_DEFINED "EL3 trap priority when SDD == '1'" && MDCR_EL3.SBRBE == 'x0' && SCR_EL3.NS == '1' then UNDEFINED; elsif EL2Enabled() && ((HaveEL(EL3) && SCR_EL3.FGTEn == '0') || HDFGRTR_EL2.nBRBCTL == '0') then AArch64.SystemAccessTrap(EL2, 0x18); elsif HaveEL(EL3) && MDCR_EL3.SBRBE != '11' && SCR_EL3.NS == '0' then if Halted() && EDSCR.SDD == '1' then UNDEFINED; else AArch64.SystemAccessTrap(EL3, 0x18); elsif HaveEL(EL3) && MDCR_EL3.SBRBE == 'x0' && SCR_EL3.NS == '1' then if Halted() && EDSCR.SDD == '1' then UNDEFINED; else AArch64.SystemAccessTrap(EL3, 0x18); else return BRBFCR_EL1; elsif PSTATE.EL == EL2 then if Halted() && HaveEL(EL3) && EDSCR.SDD == '1' && boolean IMPLEMENTATION_DEFINED "EL3 trap priority when SDD == '1'" && MDCR_EL3.SBRBE != '11' && SCR_EL3.NS == '0' then UNDEFINED; elsif Halted() && HaveEL(EL3) && EDSCR.SDD == '1' && boolean IMPLEMENTATION_DEFINED "EL3 trap priority when SDD == '1'" && MDCR_EL3.SBRBE == 'x0' && SCR_EL3.NS == '1' then UNDEFINED; elsif HaveEL(EL3) && MDCR_EL3.SBRBE != '11' && SCR_EL3.NS == '0' then if Halted() && EDSCR.SDD == '1' then UNDEFINED; else AArch64.SystemAccessTrap(EL3, 0x18); elsif HaveEL(EL3) && MDCR_EL3.SBRBE == 'x0' && SCR_EL3.NS == '1' then if Halted() && EDSCR.SDD == '1' then UNDEFINED; else AArch64.SystemAccessTrap(EL3, 0x18); else return BRBFCR_EL1; elsif PSTATE.EL == EL3 then return BRBFCR_EL1;
MSR BRBFCR_EL1, <Xt>
op0 | op1 | CRn | CRm | op2 |
---|---|---|---|---|
0b10 | 0b001 | 0b1001 | 0b0000 | 0b001 |
if PSTATE.EL == EL0 then UNDEFINED; elsif PSTATE.EL == EL1 then if Halted() && HaveEL(EL3) && EDSCR.SDD == '1' && boolean IMPLEMENTATION_DEFINED "EL3 trap priority when SDD == '1'" && MDCR_EL3.SBRBE != '11' && SCR_EL3.NS == '0' then UNDEFINED; elsif Halted() && HaveEL(EL3) && EDSCR.SDD == '1' && boolean IMPLEMENTATION_DEFINED "EL3 trap priority when SDD == '1'" && MDCR_EL3.SBRBE == 'x0' && SCR_EL3.NS == '1' then UNDEFINED; elsif EL2Enabled() && ((HaveEL(EL3) && SCR_EL3.FGTEn == '0') || HDFGWTR_EL2.nBRBCTL == '0') then AArch64.SystemAccessTrap(EL2, 0x18); elsif HaveEL(EL3) && MDCR_EL3.SBRBE != '11' && SCR_EL3.NS == '0' then if Halted() && EDSCR.SDD == '1' then UNDEFINED; else AArch64.SystemAccessTrap(EL3, 0x18); elsif HaveEL(EL3) && MDCR_EL3.SBRBE == 'x0' && SCR_EL3.NS == '1' then if Halted() && EDSCR.SDD == '1' then UNDEFINED; else AArch64.SystemAccessTrap(EL3, 0x18); else BRBFCR_EL1 = X[t]; elsif PSTATE.EL == EL2 then if Halted() && HaveEL(EL3) && EDSCR.SDD == '1' && boolean IMPLEMENTATION_DEFINED "EL3 trap priority when SDD == '1'" && MDCR_EL3.SBRBE != '11' && SCR_EL3.NS == '0' then UNDEFINED; elsif Halted() && HaveEL(EL3) && EDSCR.SDD == '1' && boolean IMPLEMENTATION_DEFINED "EL3 trap priority when SDD == '1'" && MDCR_EL3.SBRBE == 'x0' && SCR_EL3.NS == '1' then UNDEFINED; elsif HaveEL(EL3) && MDCR_EL3.SBRBE != '11' && SCR_EL3.NS == '0' then if Halted() && EDSCR.SDD == '1' then UNDEFINED; else AArch64.SystemAccessTrap(EL3, 0x18); elsif HaveEL(EL3) && MDCR_EL3.SBRBE == 'x0' && SCR_EL3.NS == '1' then if Halted() && EDSCR.SDD == '1' then UNDEFINED; else AArch64.SystemAccessTrap(EL3, 0x18); else BRBFCR_EL1 = X[t]; elsif PSTATE.EL == EL3 then BRBFCR_EL1 = X[t];