diff options
| author | H. Peter Anvin <hpa@zytor.com> | 2009-04-13 19:11:30 -0700 |
|---|---|---|
| committer | H. Peter Anvin <hpa@zytor.com> | 2009-04-13 19:11:30 -0700 |
| commit | f2ebe30cefa59def4bc590f3ced08465b839430e (patch) | |
| tree | 383fb040cd3624aa2d531c8dcd7dfd51579fe16d /core/syslinux.ld | |
| parent | 3a1bc74b6c26b55a52459d9748375bf3aa15db37 (diff) | |
| download | syslinux-f2ebe30cefa59def4bc590f3ced08465b839430e.tar.gz | |
shuffler: work around KVM problem with the new shuffler
KVM uses V86 mode to simulate real mode. This causes problems with
the new shuffler. This changes the shuffler handover to be in
16-bit protected mode instead, and requires the stub to do the actual
entry to real mode. For the KVM hack to work, all segments must have:
(seg.base & 0xfff0000f) == 0 && seg.limit == 0xffff
As a result, we have to make sure the real-mode entry stub is
paragraph-aligned, lest we violate the first criterion.
Signed-off-by: H. Peter Anvin <hpa@zytor.com>
Diffstat (limited to 'core/syslinux.ld')
| -rw-r--r-- | core/syslinux.ld | 15 |
1 files changed, 14 insertions, 1 deletions
diff --git a/core/syslinux.ld b/core/syslinux.ld index 6f7f5a78..c1da230e 100644 --- a/core/syslinux.ld +++ b/core/syslinux.ld @@ -44,7 +44,7 @@ SECTIONS __bss_len = __bss_end - __bss_start; __bss_dwords = (__bss_len + 3) >> 2; - .config : AT (__config_lma) { + .config : AT (__config_lma) { __config_start = .; *(.config) __config_end = .; @@ -52,6 +52,15 @@ SECTIONS __config_len = __config_end - __config_start; __config_dwords = (__config_len + 3) >> 2; + . = ALIGN(16); + .replacestub : AT (__replacestub_lma) { + __replacestub_start = .; + *(.replacestub) + __replacestub_end = .; + } + __replacestub_len = __replacestub_end - __replacestub_start; + __replacestub_dwords = (__replacestub_len + 3) >> 2; + /* Stack */ STACK_BASE = 0x7c00 - STACK_LEN; @@ -99,6 +108,10 @@ SECTIONS __config_lma = .; . += SIZEOF(.config); + . = ALIGN(4); + __replacestub_lma = .; + . += SIZEOF(.replacestub); + /* ADV, must be the last intialized section */ . = ALIGN(512); |
