Re: [edk2] [PATCH v2 2/6] MdeModulePkg/DxeIpl: Implement NULL pointer detection

2017-09-25 Thread Wang, Jian J
Good catch. Thanks for the feedback. > -Original Message- > From: Yao, Jiewen > Sent: Monday, September 25, 2017 4:51 PM > To: Wang, Jian J ; edk2-devel@lists.01.org > Cc: Zeng, Star ; Dong, Eric ; Laszlo > Ersek

Re: [edk2] [PATCH v2 2/6] MdeModulePkg/DxeIpl: Implement NULL pointer detection

2017-09-25 Thread Yao, Jiewen
Hi I do not think NULL pointer is related to NX. As long as NullPointer PCD is true and IA32PAE is supported, we can build page table. +BuildPageTablesIa32Pae = (BOOLEAN) (IsIa32PaeSupport () +&& IsExecuteDisableBitAvailable () +

[edk2] [PATCH v2 2/6] MdeModulePkg/DxeIpl: Implement NULL pointer detection

2017-09-20 Thread Jian J Wang
NULL pointer detection is done by making use of paging mechanism of CPU. During page table setup, if enabled, the first 4-K page (0-4095) will be marked as NOT PRESENT. Any code which unintentionally access memory between 0-4095 will trigger a Page Fault exception which warns users that there's