X-Git-Url: https://git.proxmox.com/?p=mirror_edk2.git;a=blobdiff_plain;f=UefiCpuPkg%2FCpuDxe%2FCpuGdt.c;h=32f45a535d30e192dca49c2c79b8848804a8a918;hp=b6d8ffb75dbba6715fc5f28c5bf2ae7d56fcd3e8;hb=0677cc4925d580f7016ac092dc591be0ebe03495;hpb=a47463f28382bffcedacde0d96965977261d114a diff --git a/UefiCpuPkg/CpuDxe/CpuGdt.c b/UefiCpuPkg/CpuDxe/CpuGdt.c old mode 100755 new mode 100644 index b6d8ffb75d..32f45a535d --- a/UefiCpuPkg/CpuDxe/CpuGdt.c +++ b/UefiCpuPkg/CpuDxe/CpuGdt.c @@ -2,8 +2,8 @@ C based implemention of IA32 interrupt handling only requiring a minimal assembly interrupt entry point. - Copyright (c) 2006 - 2009, Intel Corporation - All rights reserved. This program and the accompanying materials + Copyright (c) 2006 - 2010, Intel Corporation. All rights reserved.
+ This program and the accompanying materials are licensed and made available under the terms and conditions of the BSD License which accompanies this distribution. The full text of the license may be found at http://opensource.org/licenses/bsd-license.php @@ -26,14 +26,13 @@ // Global Descriptor Entry structures // -typedef -struct _GDT_ENTRY { - UINT16 limit15_0; - UINT16 base15_0; - UINT8 base23_16; - UINT8 type; - UINT8 limit19_16_and_flags; - UINT8 base31_24; +typedef struct _GDT_ENTRY { + UINT16 Limit15_0; + UINT16 Base15_0; + UINT8 Base23_16; + UINT8 Type; + UINT8 Limit19_16_and_flags; + UINT8 Base31_24; } GDT_ENTRY; typedef @@ -162,11 +161,12 @@ STATIC GDT_ENTRIES GdtTemplate = { }; /** - Initialize Global Descriptor Table + Initialize Global Descriptor Table. **/ VOID InitGlobalDescriptorTable ( + VOID ) { GDT_ENTRIES *gdt; @@ -188,7 +188,7 @@ InitGlobalDescriptorTable ( // Write GDT register // gdtPtr.Base = (UINT32)(UINTN)(VOID*) gdt; - gdtPtr.Limit = sizeof (GdtTemplate) - 1; + gdtPtr.Limit = (UINT16) (sizeof (GdtTemplate) - 1); AsmWriteGdtr (&gdtPtr); //