projects
/
bootcensus
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
interrupts, timer, keyboard, segments, lots of kernel code
[bootcensus]
/
src
/
asmops.h
diff --git
a/src/asmops.h
b/src/asmops.h
index
2578467
..
3ce2f17
100644
(file)
--- a/
src/asmops.h
+++ b/
src/asmops.h
@@
-7,6
+7,11
@@
#define disable_intr() asm volatile("cli")
#define halt_cpu() asm volatile("hlt")
+#define CALLER_EIP(eip) \
+ asm volatile( \
+ "mov (%%esp), %0\n\t" \
+ : "=a" ((uint32_t)eip))
+
static inline uint8_t inb(uint16_t port)
{
uint8_t res;