aboutsummaryrefslogtreecommitdiffstats
path: root/com32/modules/meminfo.c
Commit message (Collapse)AuthorAgeFilesLines
* com32: change '%llx' to use PRIx64Martin Str|mberg2015-01-051-2/+2
| | | | | | | | | | | | Get rid of printf format warning format ‘%llx’ expects type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ Use <inttypes.h> PRIx64 instead of llx to get rid of gcc warning format ‘%llx’ expects type ‘long long unsigned int’, but argument 2 has type ‘uint64_t’ Author: Martin Str|mberg <ams@ludd.ltu.se> Signed-off-by: Gene Cumm <gene.cumm@gmail.com>
* com32sys_t inreg shall be zeroified prior intcallErwan Velu2014-01-221-0/+2
| | | | | | | | | | | As per commit f775e740a3a817a4ff5ba26bea99dbfd735456b3, inreg parameters of intcall() shall be zeroified. Having unclean inreg could trigger bad behaviors on some hosts. This patch is about adding memset() calls prior any intcall() : - some intcall didn't had any memset at all - some successive intcall() calls didn't memset inreg in between calls
* Mark unused function parameters as __unusedMatt Fleming2012-04-171-1/+1
| | | | | | | | | | | Move the __unused tag from com32/hdt/ to com32/include/klibc/ so that it can be used by the entire code base, and mark unused function parameters as __unused to stop the following kind of build warning, elflink/load_env32.c: In function ‘load_env32’: elflink/load_env32.c:107:30: warning: unused parameter ‘regs’ Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* meminfo: If we allocate with lmalloc() we should free with lfree()Matt Fleming2012-04-171-4/+4
| | | | | | | | | | | | | | | Since commit 74518b8b691c ("elflink: Make ELF the default object format") we've been using lmalloc() with free() instead of lfree(). This bug was pointed out by the following build warnings, meminfo.c: In function ‘dump_e820’: meminfo.c:93:5: warning: implicit declaration of function ‘free’ meminfo.c:93:5: warning: incompatible implicit declaration of built-in function ‘free’ vesainfo.c: In function ‘print_modes’: vesainfo.c:82:2: warning: implicit declaration of function ‘free’ vesainfo.c:82:2: warning: incompatible implicit declaration of built-in function ‘free’ Signed-off-by: Matt Fleming <matt.fleming@intel.com>
* elflink: Make ELF the default object formatMatt Fleming2011-04-261-6/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | com32/elflink/modules was originally created to house ELF modules and keep them separate from the COM32 modules as the elflink branch was being developed. However, this has inadvertently created a maintenance nightmare because code was copied from elsewhere in the tree into com32/elflink/modules, resulting in duplication. Bug fixes have been going into the original code but have not been merged onto the elflink branch, leaving the duplicate code in com32/elflink/modules buggy. So let's delete this directory. There really is no reason to keep ELF and COM32 modules separate because there's no reason to need both COM32 and ELF modules to coexist. ELF is a far superior object file format and all modules are not emitted as ELF objects. Now that we're outputting ELF modules we can use dynamic memory instead of the cs_bounce bounce buffer. This commit requires a certain amount of shuffling for some files. quicksort.c isn't a module and belongs as part of the util library. cli.h belongs in com32/include so that other modules can make use of the cli code in ldlinux.c32. All libraries are now ELF shared libraries which are only loaded to fixup unresolved symbols for executable modules and renamed from *.a to *.c32. This reduces the runtime memory footprint because libraries are only loaded when needed and because every executable no longer gets its own copy of code/data (as it would if linking with a static library). Also, remove MINLIBOBJS from libcom32.c32 because it is already part of libcom32min.a and we don't want to have any duplicate symbols between the core (which links with libcom32min.a) and libcom32.c32. Welcome to the New World Order of ELF modules! Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
* com32: console is already initialised when we enter main()Matt Fleming2011-04-261-2/+0
| | | | | | | | | There's no need to initialise the console when we enter main() as ldlinux.c32 will already have initialised it for us. Leaving the calls to openconsole() causes the console settings to be reset whenever we run a module. Signed-off-by: Matt Fleming <matt.fleming@linux.intel.com>
* Run Nindent on com32/modules/meminfo.cH. Peter Anvin2009-05-291-78/+79
| | | | | | | | | Automatically reformat com32/modules/meminfo.c using Nindent. Do this for all files except HDT, gPXE and externally maintained libraries (zlib, tinyjpeg, libpng). Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* meminfo: distinguish between no flags and flags=1syslinux-3.81-pre7H. Peter Anvin2009-05-201-5/+10
| | | | | | | For debugging reasons it's important to know if we have no flags at all or if we get flags = 1. Print [-] in the case of no flags at all. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* meminfo: update to deal with ACPI 3 and other braindamageH. Peter Anvin2008-10-131-3/+14
| | | | | | | | | Add support for ACPI 3 and certain broken e820 implementations in the meminfo program. Some e820 implementations expect the buffer to remain the same between different invocations, despite the fact that there is absolutely no guarantee to that effect in the spec. Signed-off-by: H. Peter Anvin <hpa@zytor.com>
* meminfo.c32: a program to dump out the system memory mapH. Peter Anvin2008-01-221-0/+109
Handy little utility for dumping out the system memory map. Changes no other code.