Add volatile qualifier to page table related variable to prevent
compiler from optimizing away the variables which may lead to
unexpected result.
Signed-off-by: Zhou Jianfeng
Cc: Ray Ni
Cc: Laszlo Ersek
Cc: Rahul Kumar
Cc: Gerd Hoffmann
---
UefiCpuPkg/Library/CpuPageTableLib
Some IN OUT parameters in CpuPageTableMap.c were mistakenly marked as IN.
"IN" replaced with "IN OUT" in the following interfaces:
PageTableLibSetPte4K(): Pte4K
PageTableLibSetPleB(): PleB
PageTableLibSetPle(): Ple
PageTableLibSetPnle(): Pnle
Signed-off-by: Zhou Jian
rmance is acceptable.
> IN OUT volatile IA32_PAGE_NON_LEAF_ENTRY *Pnle
> and similar. Then the existent assignment expressions
> Pnle->Uint64 = LocalPnle.Uint64;
> don't have to be changed.
agree that such improvement would have the same effect, and the code would be a
little more gra
Some IN OUT parameters in CpuPageTableMap.c were mistakenly marked as IN.
"IN" replaced with "IN OUT" in the following interfaces:
PageTableLibSetPte4K(): Pte4K
PageTableLibSetPleB(): PleB
PageTableLibSetPle(): Ple
PageTableLibSetPnle(): Pnle
Reviewed-by: Ray Ni
Signed-o
Add volatile qualifier to page table related variable to prevent
compiler from optimizing away the variables which may lead to
unexpected result.
Signed-off-by: Zhou Jianfeng
Cc: Ray Ni
Cc: Laszlo Ersek
Cc: Rahul Kumar
Cc: Gerd Hoffmann
Cc: Pedro Falcato
Cc: Zhang Di
Cc: Tan Dun
eax, 0x1
or [rcx], eax
Thanks & Regards,
Zhou Jianfeng
-Original Message-
From: Michael Brown
Sent: Friday, February 23, 2024 7:59 PM
To: devel@edk2.groups.io; Zhou, Jianfeng
Cc: Ni, Ray ; Laszlo Ersek ; Kumar, Rahul
R ; Gerd Hoffmann ; Pedro Falcato
; Zhang, Di ; Tan,
Add volatile qualifier to page table related variable to prevent
compiler from optimizing away the variables which may lead to
unexpected result.
Signed-off-by: Zhou Jianfeng
Cc: Ray Ni
Cc: Laszlo Ersek
Cc: Rahul Kumar
Cc: Gerd Hoffmann
Cc: Pedro Falcato
Cc: Zhang Di
Cc: Tan Dun
Cc