summaryrefslogtreecommitdiff
path: root/com32/include/syslinux/disk.h
Commit message (Collapse)AuthorAgeFilesLines
* com32/disk: Code cleanup at disk_write_sectors and disk_read_sectors.Raphael S.Carvalho2013-09-301-0/+7
| | | | | | | | Pulled common code out of these functions into new ones. The functions chs_setup and ebios_setup were created for this purpose. Signed-off-by: Raphael S.Carvalho <raphael.scarv@gmail.com> Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* disklib: updates - lbacnt, bps, misc. thingsMichal Soltys2010-10-081-8/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | With this commit, disk_info structure provides additional fields, namely: lbacnt - total amount of sectors, either returned by 13h/48h or calculated from valid (or faked - 1/1/1) geometry bps - bytes per sector - returned by 13h/48h or equal to SECTOR disk_get_params() has been adjusted to call int13h/48h to get extended drive parameters - mentioned lbacnt and bps. We don't use geometry data returned by 13h/48h, as it can be quite a bit different from the data returned by 13h/08h. disk_write_verify_sector() and disk_write_sector() can deal with more than 1 sector now. Suffix has been renamed to _sectors(). disk_read_sectors() and disk_write_sectors() have been updated to check if we don't overflow bounce buffer, and don't try to read beyond lbacnt. All disk.c functions use 'bps' now, instead of hardcoded SECTOR. struct disk_ebios_dapa - uses packed attribute now. Signed-off-by: Michal Soltys <soltys@ziu.info>
* disklib: small fixes / addonsMichal Soltys2010-08-201-5/+6
| | | | | | | | | | | | | | | Functions disk_write_sector() and disk_write_verify_sector() take 64bit lba as an argument now - similary to disk_read_sectors(). Structure disk_info additionally provides cylinders, besides head and sector. Sanity checks during lba -> chs conversions have been adjusted to use cylinders. CX in cbios read/write code was not calculated properly. Minor signed/unsigned changes. Signed-off-by: Michal Soltys <soltys@ziu.info>
* chain.c32, libcom32: Move gpt_dump() as disk_gpt_header_dump()Shao Miller2010-07-101-0/+1
| | | | | | Moving portions of chain.c32 into libcom32. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* chain.c32, libcom32: Move struct gpt as disk_gpt_headerShao Miller2010-07-101-0/+27
| | | | | | | Also moved gpt_sig_magic as disk_gpt_sig_magic. Moving portions of chain.c32 into libcom32. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* chain.c32, libcom32: Move gpt_part_dump() as disk_gpt_part_dump()Shao Miller2010-07-101-0/+2
| | | | | | Moving portions of chain.c32 into libcom32. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* chain.c32, libcom32: Move guid_to_str() and str_to_guid()Shao Miller2010-07-101-13/+2
| | | | | | | Moving portions of chain.c32 into libcom32. There might be a better header for these to belong to. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* chain.c32, libcom32: Move struct gpt_part as disk_gpt_part_entryShao Miller2010-07-101-0/+10
| | | | | | Moving portions of chain.c32 into libcom32. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* chain.c32, libcom32: Move guid_le_walk_mapShao Miller2010-07-101-0/+13
| | | | | | | Moving portions of chain.c32 into libcom32. There might be a better header for guid_le_walk_map to belong to. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* chain.c32, libcom32: Move struct guidShao Miller2010-07-101-0/+14
| | | | | | | Moving portions of chain.c32 into libcom32. There might be a better header for struct guid to belong to. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* chain.c32, libcom32: Move struct mbr as disk_dos_mbrShao Miller2010-07-101-0/+10
| | | | | | | Also move mbr_sig_magic as disk_mbr_sig_magic macro. Moving portions of chain.c32 into libcom32. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* chain.c32, libcom32: Move mbr_part_dump() as disk_dos_part_dump()Shao Miller2010-07-101-0/+1
| | | | | | Moving portions of chain.c32 into libcom32. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* chain.c32, libcom32: Move struct part_entry as disk_dos_part_entryShao Miller2010-07-101-0/+10
| | | | | | Moving portions of chain.c32 into libcom32. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* chain.c32, libcom32: Move chs macros and chs typedef as disk_chsShao Miller2010-07-101-0/+11
| | | | | | Moving portions of chain.c32 into libcom32. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* libcom32 disk: A slight grunt of constipationShao Miller2010-07-101-6/+6
| | | | | | Add const qualifier because we can. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* chain.c32, libcom32: Move write_verify_sector() as disk_write_verify_sector()Shao Miller2010-07-101-0/+2
| | | | | | Moving portions of chain.c32 into libcom32. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* chain.c32, libcom32: Move write_sector() as disk_write_sector()Shao Miller2010-07-101-0/+2
| | | | | | Moving portions of chain.c32 into libcom32. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* chain.c32, libcom32: Move read_sectors() as disk_read_sectors()Shao Miller2010-07-101-0/+3
| | | | | | Moving portions of chain.c32 into libcom32. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* chain.c32, libcom32: Move struct ebios_dapa as disk_ebios_dapaShao Miller2010-07-101-0/+8
| | | | | | Moving portions of chain.c32 into libcom32. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* chain.c32, libcom32: Move get_disk_params() as disk_get_params()Shao Miller2010-07-101-0/+9
| | | | | | | Also moved struct diskinfo as disk_info. Moving portions of chain.c32 into libcom32. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* chain.c32, libcom32: Move int13_retry() as disk_int13_retry()Shao Miller2010-07-101-0/+4
| | | | | | Moving portions of chain.c32 into libcom32. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
* libcom32: Introduce disk header and moduleShao Miller2010-07-101-0/+41
An effort to move significant portions out of chain.c32 and into library is underway. We begin by simply moving SECTOR into a header and building a disk module. Note that some of this work will essentially duplicate some of what's found in Pierre-Alexandre Meyer's fine work in com32/gpllib/disk/. A difference would be the licensing, of course. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>