diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2010-05-14 15:22:00 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2010-05-14 15:22:00 -0700 |
commit | 4f2568ba84172915df94995df4ad358d2f09cc0e (patch) | |
tree | c1a52d8f616b99065d9aac4c9e219c34abcf35e5 /core/comboot.inc | |
parent | 4c7ad2f6dfc8da45eaafd6898feb319b478dca53 (diff) | |
download | syslinux-4f2568ba84172915df94995df4ad358d2f09cc0e.tar.gz |
core: fix "sector size" confusionsyslinux-4.00-pre45
Fix the case where the "sector size" used by the pm filesystem driver
isn't the same thing as the SECTOR_SIZE/SECTOR_SHIFT macros used in
the assembly code. This is a per-device property, and in the
particular case of isolinux hybrid, they are not even currently the
same (for all others, they are the same for now, but not necessarily
in the future.)
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'core/comboot.inc')
-rw-r--r-- | core/comboot.inc | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/core/comboot.inc b/core/comboot.inc index 9255f8a0..b714dd4a 100644 --- a/core/comboot.inc +++ b/core/comboot.inc @@ -124,9 +124,8 @@ is_comboot_image: ; Now actually load the file... pop si ; File handle mov bx,100h ; Load at <seg>:0100h - mov cx,10000h >> SECTOR_SHIFT - ; Absolute maximum # of sectors - pm_call getfssec + mov cx,0FF00h ; Maximum number of bytes + pm_call getfsbytes cmp ecx,65536-256-2 ; Maximum size ja comboot_too_large @@ -586,7 +585,8 @@ comapi_derinfo: %else ; Physical medium... - mov P_CL,SECTOR_SHIFT + mov al,[SectorShift] + mov P_CL,al mov al,[DriveNumber] mov P_DL,al mov P_FS,cs |