aboutsummaryrefslogtreecommitdiffstats
path: root/memdisk/e820func.c
diff options
context:
space:
mode:
Diffstat (limited to 'memdisk/e820func.c')
-rw-r--r--memdisk/e820func.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/memdisk/e820func.c b/memdisk/e820func.c
index 3087d33e..57ab0fca 100644
--- a/memdisk/e820func.c
+++ b/memdisk/e820func.c
@@ -28,10 +28,14 @@ int nranges;
void e820map_init(void)
{
+ struct e820range *rp = ranges;
+ unsigned int rdw = sizeof(ranges) >> 2;
nranges = 1;
- asm volatile("cld ; rep ; stosl %0,%%es:(%1)"
- :: "a" (0), "D" (ranges), "c" (sizeof(ranges) >> 2)
- : "edi", "ecx");
+
+ asm volatile("cld ; rep ; stosl %2,%%es:(%0)"
+ : "+D" (rp), "+c" (rdw)
+ : "a" (0)
+ : "memory");
ranges[1].type = -1;
}