summaryrefslogtreecommitdiff
path: root/lib/efi
diff options
context:
space:
mode:
authorAlexander Graf <agraf@suse.de>2017-12-04 16:33:26 +0100
committerBin Meng <bmeng.cn@gmail.com>2018-03-30 16:05:07 +0800
commit14d61d4e577c57ba77b826c6cc9d99a0b3f3fc37 (patch)
tree469ac868ac9cb602034fa0505b70d8e87981a098 /lib/efi
parent81cf7c8d45935a295991fe2cd1df286f0f47511f (diff)
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>
Diffstat (limited to 'lib/efi')
-rw-r--r--lib/efi/efi_stub.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/efi/efi_stub.c b/lib/efi/efi_stub.c
index 2e8d409d31a..205aa199472 100644
--- a/lib/efi/efi_stub.c
+++ b/lib/efi/efi_stub.c
@@ -182,7 +182,7 @@ static int get_codeseg32(void)
<< 16;
base <<= 12; /* 4KB granularity */
limit <<= 12;
- if ((desc & GDT_PRESENT) && (desc && GDT_NOTSYS) &&
+ if ((desc & GDT_PRESENT) && (desc & GDT_NOTSYS) &&
!(desc & GDT_LONG) && (desc & GDT_4KB) &&
(desc & GDT_32BIT) && (desc & GDT_CODE) &&
CONFIG_SYS_TEXT_BASE > base &&