summaryrefslogtreecommitdiff
path: root/com32/lib
Commit message (Collapse)AuthorAgeFilesLines
* setup_data: if nothing to load and version < 2.09, no harm no foulH. Peter Anvin2012-06-291-3/+3
| | | | | | If the setup_data is empty, it is okay if the version is < 2.09. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* setup_data: check to make sure kernel version >= 0x0209H. Peter Anvin2012-06-291-0/+7
| | | | | | Versions before 2.09 had no setup_data support. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* Change fdt-specific loader into a generic setup_data loaderH. Peter Anvin2012-06-294-55/+75
| | | | | | | Make it a generic setup_data loader keyed by type. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com> Cc: Thierry Reding <thierry.reding@avionic-design.de>
* com32: Add device tree supportThierry Reding2012-06-293-2/+71
| | | | | | | | This commit adds support for passing a Flattened Device Tree (FDT) blob to the Linux kernel. Signed-off-by: Thierry Reding <thierry.reding@avionic-design.de> Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* com32.ld: handle .init_array and .fini_arraysyslinux-4.06-pre5H. Peter Anvin2012-05-281-23/+10
| | | | | | | Handle constructors/destructors via .init_array and .fini_array, as generated by newer gccs. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* COM32: add DHCP pack/unpack functionsH. Peter Anvin2012-05-273-1/+283
| | | | Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* Merge branch 'chaindev'H. Peter Anvin2012-03-262-1/+537
|\
| * Merge remote-tracking branch 'origin/master' into chaindevMichal Soltys2011-08-029-101/+40
| |\ | | | | | | | | | | | | Conflicts: com32/modules/chain.c
| * \ Merge branch 'master' into chaindevMichal Soltys2011-05-049-101/+107
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: com32/Makefile com32/modules/chain.c Note: add ReactOS' stuff introduced in old chain.c Signed-off-by: Michal Soltys <soltys@ziu.info>
| * \ \ Merge branch 'master' into chaindevMichal Soltys2011-03-301-7/+20
| |\ \ \
| * \ \ \ Merge branch 'master' into chaindevMichal Soltys2011-03-184-19/+10
| |\ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: com32/modules/chain.c
| * \ \ \ \ Merge branch 'master' into chaindevMichal Soltys2011-03-076-52/+85
| |\ \ \ \ \
| * \ \ \ \ \ Merge branch 'master' into chaindevMichal Soltys2010-12-091-2/+4
| |\ \ \ \ \ \
| * \ \ \ \ \ \ Merge branch 'master' into chaindevMichal Soltys2010-11-181-18/+7
| |\ \ \ \ \ \ \
| * \ \ \ \ \ \ \ Merge branch 'master' into chaindevMichal Soltys2010-10-251-18/+27
| |\ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: com32/modules/chain.c Changes to DRMK imported into commented-out section of com32/chain/mangle.c Signed-off-by: Michal Soltys <soltys@ziu.info>
| * \ \ \ \ \ \ \ \ Merge branch 'master' into chaindevMichal Soltys2010-10-141-2/+2
| |\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: com32/modules/chain.c
| * | | | | | | | | | disklib: make CHS calculation match core/fs/diskio.cdisklibMichal Soltys2010-10-131-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Signed-off-by: Michal Soltys <soltys@ziu.info>
| * | | | | | | | | | disklib: updates to params/read/write functionsMichal Soltys2010-10-121-38/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | disk_get_params(): Don't bail out if we fail int13h/48h call in ebios == 1 case. Regular CHS might still be enough. disk_read_sectors(), disk_write_sectors(): We don't need separate cases for valid and invalid cbios with the data prepared by the current disk_get_params() function. Signed-off-by: Michal Soltys <soltys@ziu.info>
| * | | | | | | | | | disklib: updates - lbacnt, bps, misc. thingsMichal Soltys2010-10-081-65/+104
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-10/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-0/+117
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 mbr_part_dump() as disk_dos_part_dump()Shao Miller2010-07-101-0/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-5/+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/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+69
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Moving portions of chain.c32 into libcom32. Signed-off-by: Shao Miller <shao.miller@yrdsb.edu.on.ca>
| * | | | | | | | | | libcom32 disk: Trivial formatting fix-upShao Miller2010-07-101-3/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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/+23
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-102-1/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* | | | | | | | | | | com32/lib/pci/scan.c: Fix free_pci_domain()Henri Roosen2012-03-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | free_pci_domain is releasing the memory too early; should be out of the for loops, because in the loop the memory is still dereferenced.
* | | | | | | | | | | strreplace: additional cleanupsH. Peter Anvin2012-02-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Additional formatting cleanups. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | | | | | | | | strreplace: clean up and simplifyH. Peter Anvin2012-02-061-20/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clean up and simplify strreplace(); in particular there is no need to call strlen() repeatedly on the same strings. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | | | | | | | | Merge remote-tracking branch 'hpa/master'Erwan Velu2011-07-119-101/+40
|\ \ \ \ \ \ \ \ \ \ \ | | |_|_|_|_|_|_|_|_|/ | |/| | | | | | | | |
| * | | | | | | | | | com32: make syslinux_dump_*() pure debugging functionsH. Peter Anvin2011-06-275-38/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the syslinux_dump_*() functions pure debugging functions; that is the way that they are used anyway, and this way they log to the same place as dprintf. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | | | | | | | | | Use <dprintf.h> instead of an ad hoc definitionH. Peter Anvin2011-06-274-46/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of using ad hoc definitions of dprintf, dprintf2, vdprintf and vdprintf2, use <dprintf.h> everywhere possible. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | | | | | | | | | lib/shuffle: use <dprintf.h>H. Peter Anvin2011-06-201-17/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Another straggler not yet using <dprintf.h> for debugging. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | | | | | | | | | dprintf: add the ability to log to stdioH. Peter Anvin2011-06-202-0/+6
| | |_|_|_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Add the ability to redirect dprintf to stdio when there is no other choice. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | | | | | | | strreplace: Fixing includesErwan Velu2011-06-061-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Stdlib was missing for malloc definition
* | | | | | | | | | string: Adding strreplaceErwan Velu2011-04-272-0/+54
|/ / / / / / / / /
* | | | | | | | | Merge remote-tracking branch 'mfleming/for-hpa/makefile-cleanup'H. Peter Anvin2011-04-262-82/+3
|\ \ \ \ \ \ \ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Resolved Conflicts: com32/hdt/Makefile com32/sysdump/Makefile Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | | | | | | | | Makefile: Move Makefile fragments into mk/Matt Fleming2011-04-072-82/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Move the MCONFIG files into a mk/ directory and give them more descriptive names. This is purely a cosmetic change to make the 'include' directives a bit more coherent by making it obvious exactly which MCONFIG file we're including. For example, in com32/lua/src/Makefile we exchange the line, include ../../MCONFIG for the much more comprehensible, include $(MAKEDIR)/com32.mk Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
* | | | | | | | | | com32: inet_ntoa() takes struct in_addrH. Peter Anvin2011-04-251-6/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The standard definition for inet_ntoa() is to take struct in_addr, and not doing that causes a conflict on the lwip branch. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* | | | | | | | | | Merge remote branch 'hpa/master' into libuploadErwan Velu2011-04-114-16/+29
|\ \ \ \ \ \ \ \ \ \ | |/ / / / / / / / /
| * | | | | | | | | tinyjpeg: change DEBUG to JPEG_DEBUGH. Peter Anvin2011-04-042-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Rename the debugging option for tinyjpeg to JPEG_DEBUG to avoid conflict with the global dprintf option. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
| * | | | | | | | | com32: fix range handling in vsscanfH. Peter Anvin2011-04-041-6/+6
| | |_|_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix multiple errors in building the bitmap for ranges in %[. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
| * | | | | | | | linux.c32: For protocol 2.10+, use init_size when relocatingH. Peter Anvin2011-03-181-7/+20
| | |_|_|_|_|_|/ | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we have to relocate the kernel, use the init_size parameter if it is available, rather than an arbitrary fudge factor. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
* | | | | | | | inet: Adding inet_ntoa()Erwan Velu2011-03-222-0/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Adding inet_ntoa() as it could be useful to print pxe_boot_t structure