[U-Boot] [PATCH 36/48] x86: Add an enum for some commonly-used GDT bits
Bin Meng
bmeng.cn at gmail.com
Fri Jul 24 08:11:19 CEST 2015
Hi Simon,
On Wed, Jul 22, 2015 at 11:49 PM, Simon Glass <sjg at chromium.org> wrote:
> Rather than add these as open-coded values, create an enum with the commonly
> used flags.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> arch/x86/include/asm/cpu.h | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/arch/x86/include/asm/cpu.h b/arch/x86/include/asm/cpu.h
> index 08284ee..b96513d 100644
> --- a/arch/x86/include/asm/cpu.h
> +++ b/arch/x86/include/asm/cpu.h
> @@ -27,6 +27,16 @@ enum {
> X86_VENDOR_UNKNOWN = 0xff
> };
>
> +/* Global descriptor table (GDT) bits */
> +enum {
> + GDT_4GB = 1ULL << 55,
I think it should be GDT_4KB
> + GDT_32BIT = 1ULL << 54,
> + GDT_LONG = 1ULL << 53,
> + GDT_PRESENT = 1ULL << 47,
> + GDT_NOTSYS = 1ULL << 44,
> + GDT_CODE = 1ULL << 43,
> +};
> +
> struct cpuid_result {
> uint32_t eax;
> uint32_t ebx;
> --
Regards,
Bin
More information about the U-Boot
mailing list