mirror of
https://github.com/brain-hackers/u-boot-brain
synced 2024-09-30 00:20:44 +09:00
efi_stub: Fix GDT_NOTSYS check
The get_codeseg32() wants to know if a passed in descriptor has flag GDT_NOTSYS set (desc & GDT_NOTSYS), not whether desc and GDT_NOTSYS are not != 0 (desk && GDT_NOTSYS). This is an obvious typo. Fix it up. Signed-off-by: Alexander Graf <agraf@suse.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
This commit is contained in:
parent
81cf7c8d45
commit
14d61d4e57
@ -182,7 +182,7 @@ static int get_codeseg32(void)
|
|||||||
<< 16;
|
<< 16;
|
||||||
base <<= 12; /* 4KB granularity */
|
base <<= 12; /* 4KB granularity */
|
||||||
limit <<= 12;
|
limit <<= 12;
|
||||||
if ((desc & GDT_PRESENT) && (desc && GDT_NOTSYS) &&
|
if ((desc & GDT_PRESENT) && (desc & GDT_NOTSYS) &&
|
||||||
!(desc & GDT_LONG) && (desc & GDT_4KB) &&
|
!(desc & GDT_LONG) && (desc & GDT_4KB) &&
|
||||||
(desc & GDT_32BIT) && (desc & GDT_CODE) &&
|
(desc & GDT_32BIT) && (desc & GDT_CODE) &&
|
||||||
CONFIG_SYS_TEXT_BASE > base &&
|
CONFIG_SYS_TEXT_BASE > base &&
|
||||||
|
Loading…
Reference in New Issue
Block a user