diff options
author | Paolo Bonzini <pbonzini@redhat.com> | 2015-05-20 16:03:33 +0200 |
---|---|---|
committer | Paolo Bonzini <pbonzini@redhat.com> | 2015-05-21 11:44:57 +0200 |
commit | edba90fb16ec7224da591ab8f83efe3673853a3f (patch) | |
tree | 61b37be2e6e96a2163878e2df98e1f638ce5590e /include/assembly.h | |
parent | d092feedb023a3d631a1cd549dd1d5c18d852ac7 (diff) | |
download | qboot-edba90fb16ec7224da591ab8f83efe3673853a3f.zip qboot-edba90fb16ec7224da591ab8f83efe3673853a3f.tar.gz qboot-edba90fb16ec7224da591ab8f83efe3673853a3f.tar.bz2 |
first commit
Based on x86/bios from lkvm
Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Diffstat (limited to 'include/assembly.h')
-rw-r--r-- | include/assembly.h | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/include/assembly.h b/include/assembly.h new file mode 100644 index 0000000..3601024 --- /dev/null +++ b/include/assembly.h @@ -0,0 +1,29 @@ +#ifndef ASSEMBLY_H_ +#define ASSEMBLY_H_ + +#define __ASSEMBLY__ + +#define ORG(x) \ + .section .fixedaddr._##x + +#define __ALIGN .p2align 4, 0x90 +#define ENTRY(name) \ + __ALIGN; \ + .globl name; \ + name: + +#define GLOBAL(name) \ + .globl name; \ + name: + +#define ENTRY_END(name) GLOBAL(name##_end) +#define END(name) GLOBAL(name##_end) + +/* + * gas produces size override prefix with which + * we are unhappy, lets make it hardcoded for + * 16 bit mode + */ +#define IRET .byte 0xcf + +#endif /* ASSEMBLY_H_ */ |