mirror of
https://github.com/projectacrn/acrn-hypervisor.git
synced 2025-06-20 12:42:54 +00:00
hv: idt: separate the MACRO definition
For binutils <= 2.26: 'U' suffix for unsigned constant is not accepted by binutils assembler. This patch separates the MACRO definition for ASSEMBLER and non-ASSEMBLER code in idt.h Tracked-On: #2200 Signed-off-by: Shiqing Gao <shiqing.gao@intel.com>
This commit is contained in:
parent
862ed16ed7
commit
b489aec3e1
@ -11,16 +11,10 @@
|
|||||||
* IDT is defined in assembly so we handle exceptions as early as possible.
|
* IDT is defined in assembly so we handle exceptions as early as possible.
|
||||||
*/
|
*/
|
||||||
|
|
||||||
/* Interrupt Descriptor Table (LDT) selectors are 16 bytes on x86-64 instead of
|
#ifndef ASSEMBLER
|
||||||
* 8 bytes.
|
|
||||||
*/
|
|
||||||
#define X64_IDT_DESC_SIZE (0x10U)
|
|
||||||
/* Number of the HOST IDT entries */
|
/* Number of the HOST IDT entries */
|
||||||
#define HOST_IDT_ENTRIES (0x100U)
|
#define HOST_IDT_ENTRIES (0x100U)
|
||||||
/* Size of the IDT */
|
|
||||||
#define HOST_IDT_SIZE (HOST_IDT_ENTRIES * X64_IDT_DESC_SIZE)
|
|
||||||
|
|
||||||
#ifndef ASSEMBLER
|
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Definition of an 16 byte IDT selector.
|
* Definition of an 16 byte IDT selector.
|
||||||
@ -74,6 +68,15 @@ struct host_idt_descriptor {
|
|||||||
extern struct host_idt HOST_IDT;
|
extern struct host_idt HOST_IDT;
|
||||||
extern struct host_idt_descriptor HOST_IDTR;
|
extern struct host_idt_descriptor HOST_IDTR;
|
||||||
|
|
||||||
|
#else /* ASSEMBLER */
|
||||||
|
|
||||||
|
/* Interrupt Descriptor Table (LDT) selectors are 16 bytes on x86-64 instead of 8 bytes. */
|
||||||
|
#define X64_IDT_DESC_SIZE (0x10)
|
||||||
|
/* Number of the HOST IDT entries */
|
||||||
|
#define HOST_IDT_ENTRIES (0x100)
|
||||||
|
/* Size of the IDT */
|
||||||
|
#define HOST_IDT_SIZE (HOST_IDT_ENTRIES * X64_IDT_DESC_SIZE)
|
||||||
|
|
||||||
#endif /* end #ifndef ASSEMBLER */
|
#endif /* end #ifndef ASSEMBLER */
|
||||||
|
|
||||||
#endif /* IDT_H */
|
#endif /* IDT_H */
|
||||||
|
Loading…
Reference in New Issue
Block a user