On 21 March 2017 at 12:12, Heyi Guo heyi.guo@linaro.org wrote:
Any comments?
在 3/16/2017 9:03 PM, Heyi Guo 写道:
Hi folks,
In "ArmPkg/Library/ArmMmuLib/AArch64/ArmMmuLibCore.c", line 262, I found below code which seems like a bug. Could you help to confirm?
262 TableAttributes = TT_TABLE_AP_NO_PERMISSION; 263 if (Attributes & TT_NS) { 264 TableAttributes = TT_TABLE_NS; 265 } 266
Why not a "|=" is used at line 264? Are TT_TABLE_AP_NO_PERMISSION and TT_TABLE_NS exclusive?
#define TT_TABLE_AP_NO_PERMISSION (0x0ULL << 61)
which is a roundabout way of writing '0', and so it does not really matter in practice (although I agree |= would be better, given that TT_TABLE_AP_MASK does not cover TT_TABLE_NS)