diff options
author | Simon Rettberg | 2023-10-06 18:37:21 +0200 |
---|---|---|
committer | Simon Rettberg | 2023-10-06 18:37:21 +0200 |
commit | 95a57769874a70456670984debc05084feb75f6b (patch) | |
tree | 9943c86b682e1b1d21a0439637b3849840a50137 /src/arch/x86/include/librm.h | |
parent | [efi] Remove old RDRAND hack; now officially supported (diff) | |
parent | [libc] Use wall clock time as seed for the (non-cryptographic) RNG (diff) | |
download | ipxe-95a57769874a70456670984debc05084feb75f6b.tar.gz ipxe-95a57769874a70456670984debc05084feb75f6b.tar.xz ipxe-95a57769874a70456670984debc05084feb75f6b.zip |
Merge branch 'master' into openslx
Diffstat (limited to 'src/arch/x86/include/librm.h')
-rw-r--r-- | src/arch/x86/include/librm.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/arch/x86/include/librm.h b/src/arch/x86/include/librm.h index 5196d390..40f07543 100644 --- a/src/arch/x86/include/librm.h +++ b/src/arch/x86/include/librm.h @@ -250,8 +250,10 @@ extern void remove_user_from_rm_stack ( userptr_t data, size_t size ); /* CODE_DEFAULT: restore default .code32/.code64 directive */ #ifdef __x86_64__ #define CODE_DEFAULT ".code64" +#define STACK_DEFAULT "q" #else #define CODE_DEFAULT ".code32" +#define STACK_DEFAULT "l" #endif /* LINE_SYMBOL: declare a symbol for the current source code line */ @@ -268,7 +270,7 @@ extern void remove_user_from_rm_stack ( userptr_t data, size_t size ); /* REAL_CODE: declare a fragment of code that executes in real mode */ #define REAL_CODE( asm_code_str ) \ - "push $1f\n\t" \ + "push" STACK_DEFAULT " $1f\n\t" \ "call real_call\n\t" \ TEXT16_CODE ( "\n1:\n\t" \ asm_code_str \ @@ -277,7 +279,7 @@ extern void remove_user_from_rm_stack ( userptr_t data, size_t size ); /* PHYS_CODE: declare a fragment of code that executes in flat physical mode */ #define PHYS_CODE( asm_code_str ) \ - "push $1f\n\t" \ + "push" STACK_DEFAULT " $1f\n\t" \ "call phys_call\n\t" \ ".section \".text.phys\", \"ax\", @progbits\n\t"\ "\n" LINE_SYMBOL "\n\t" \ |