diff options
| author | Michael Brown | 2006-08-31 15:25:45 +0200 |
|---|---|---|
| committer | Michael Brown | 2006-08-31 15:25:45 +0200 |
| commit | 78dd963c1fc423673a890c8b761e40906252bfef (patch) | |
| tree | 5cc88d8ad0757a8310ae1b9397ef2e51efc5e746 /src/arch | |
| parent | Hopefully fix gcc3 build issue (diff) | |
| download | ipxe-78dd963c1fc423673a890c8b761e40906252bfef.tar.gz ipxe-78dd963c1fc423673a890c8b761e40906252bfef.tar.xz ipxe-78dd963c1fc423673a890c8b761e40906252bfef.zip | |
Check to see if we've reached the end of the map before attempting to
skip past an empty region, otherwise we end up generating an infinitely
long e820 map. (Yes, there *are* real systems that provide e820 maps
with a zero-length region at the end...)
Diffstat (limited to 'src/arch')
| -rw-r--r-- | src/arch/i386/firmware/pcbios/e820mangler.S | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/arch/i386/firmware/pcbios/e820mangler.S b/src/arch/i386/firmware/pcbios/e820mangler.S index 89030a49e..21d1bb9a5 100644 --- a/src/arch/i386/firmware/pcbios/e820mangler.S +++ b/src/arch/i386/firmware/pcbios/e820mangler.S @@ -361,7 +361,12 @@ int15_e820: pushl %edx call split_e820 pushfw + /* Skip empty region checking if we've reached the end of the + * map or hit an error, to avoid a potential endless loop. + */ jc 1f + testl %ebx, %ebx + jz 1f /* Check for an empty region */ pushl %eax movl %es:8(%di), %eax |
