Displaying 2 results from an estimated 2 matches for "build_gdt".
Did you mean:
build_gcc
2014 Feb 22
2
[PATCH] efi: off-by-one in gdt allocation
...efi/main.c
+++ b/efi/main.c
@@ -450,7 +450,7 @@ struct dt_desc {
uint64_t *base;
} __packed;
-struct dt_desc gdt = { 0x800, (uint64_t *)0 };
+struct dt_desc gdt = { 0x7ff, (uint64_t *)0 };
struct dt_desc idt = { 0, 0 };
static inline EFI_MEMORY_DESCRIPTOR *
@@ -852,12 +852,12 @@ static int build_gdt(void)
EFI_STATUS status;
/* Allocate gdt consistent with the alignment for architecture */
- status = emalloc(gdt.limit, __SIZEOF_POINTER__ , (EFI_PHYSICAL_ADDRESS *)&gdt.base);
+ status = emalloc(gdt.limit + 1, __SIZEOF_POINTER__ , (EFI_PHYSICAL_ADDRESS *)&gdt.base);
if (status !=...
2020 Mar 24
2
[PATCH] efi/main.c: include <efisetjmp.h>
...f load_error_buf;
| ^~~~~~~
syslinux/efi/main.c: In function ?local_boot?:
syslinux/efi/main.c:189:5: warning: implicit declaration of function ?longjmp? [-Wimplicit-function-declaration]
189 | longjmp(&load_error_buf, 1);
| ^~~~~~~
syslinux/efi/main.c: In function ?build_gdt?:
syslinux/efi/main.c:907:75: warning: taking address of packed member of ?struct dt_desc? may result in an unaligned pointer value [-Waddress-of-packed-member]
907 | status = emalloc(gdt.limit, __SIZEOF_POINTER__ , (EFI_PHYSICAL_ADDRESS *)&gdt.base);
|...