diff options
author | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2012-12-22 11:51:38 +0000 |
---|---|---|
committer | Jannis Pohlmann <jannis.pohlmann@codethink.co.uk> | 2012-12-22 11:51:38 +0000 |
commit | 8821237240c5374d83298b2da5ad88fa1e3c1ef7 (patch) | |
tree | e1bc03fa83c61165f48ffe3f528ac5496332872a /core/bootsect.inc | |
parent | 38dcca25c8855c95649e3f0b5b09fae862ed5c7a (diff) | |
parent | 7307d60063ee4303da4de45f9d984fdc8df92146 (diff) | |
download | syslinux-8821237240c5374d83298b2da5ad88fa1e3c1ef7.tar.gz |
Merge remote-tracking branch 'remotes/upstream/master' into baserock/morph
Diffstat (limited to 'core/bootsect.inc')
-rw-r--r-- | core/bootsect.inc | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/core/bootsect.inc b/core/bootsect.inc index 6c204096..9e47e1a5 100644 --- a/core/bootsect.inc +++ b/core/bootsect.inc @@ -1,7 +1,7 @@ ;; ----------------------------------------------------------------------- ;; ;; Copyright 1994-2009 H. Peter Anvin - All Rights Reserved -;; Copyright 2009 Intel Corporation; author: H. Peter Anvin +;; Copyright 2009-2012 Intel Corporation; author: H. Peter Anvin ;; ;; This program is free software; you can redistribute it and/or modify ;; it under the terms of the GNU General Public License as published by @@ -38,6 +38,7 @@ SuperSize equ $+1 load_bootsec: mov edi,free_high_memory mov [trackbuf+4],edi ; Copy from this address + mov eax,0xA0000 ; Maximum load xor dx,dx ; No padding mov bx,abort_check ; Don't print dots, but allow abort call load_high @@ -45,6 +46,9 @@ load_bootsec: sub edi,free_high_memory mov [trackbuf+8],edi ; Save length + cmp edi,0xA0000-7C00h + ja bs_too_big + mov eax,7C00h ; Entry point mov [trackbuf],eax ; Copy to this address @@ -237,3 +241,13 @@ replace_stub: .csip equ $-4 section .text16 +bs_too_big: + call close + mov si,err_bs_too_big + jmp abort_load + + section .data16 +err_bs_too_big db "Too large for a bootstrap (need LINUX instead of KERNEL?)" + db CR, LF, 0 + + section .text16 |