Age | Commit message (Collapse) | Author | Files | Lines |
|
Using "> /dev/fd/2" causes stderr to get truncated, which is mangles the log
file if the user happens to have redirected it there.
Use ">&2" instead which redirects to the already open stderr and doesn't
truncate it.
Reported-by: Tim Deegan <tim@xen.org>
Tested-by: Tim Deegan <tim@xen.org>
Signed-off-by: Ian Campbell <ian.campbell@citrix.com>
|
|
Move the build version generation to a script in tools/ and enhance
the system to call "git describe" when it appears the user has a git
repo. Also, allow the version to be extracted from a ".version" file
for use in official tar releases.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Perform post-processing of the vgabios assembler to remove certain
instructions that gcc generates and x86emu can't handle.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Gcc seems to handle passing structs by value if they are 4 bytes in
size instead of 3 bytes. So, add a pad byte to struct carattr and
struct cursorpos.
Reorganize set_cursor_pos(), verify_scroll(), and handle_1013() so
there are less live variables.
Don't inline the VBE functions into the main handler code. Code
calling VBE functions are newer and are more likely to provide
adequate stack space - inlining can cause more stack usage for older
functions (which may be stack constrained).
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Some versions of gcc appear to define these sections even though they
aren't used in the code.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
This patch makes buildrom.py check if a PCI is present in the ROM,
and fills in the image size field.
Signed-off-by: Julian Pidancet <julian.pidancet@gmail.com>
|
|
Add ACPI_EXTRACT_ALL_CODE directive, to support extracting
AML code from listing into a named array. Use that instead including C
file generated by iasl, this makes it possible to include multiple AML
tables without resorting to preprocessor tricks.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
Use iasl -l flag to produce a mixed listing, where a
source line is followed by matching AML.
Add a tool tools/acpi_extract.py to process this
listing. The tool looks for ACPI_EXTRACT tags
in the ASL source and outputs matching AML offsets
in an array.
To make these directives pass through ASL without affecting AML,
and to make it possible to match AML to source exactly,
add a preprocessing stage, which prepares input for iasl,
and puts each ACPI_EXTRACT tag within a comment,
on a line by itself.
Signed-off-by: Michael S. Tsirkin <mst@redhat.com>
|
|
Use a more consistent naming that matches entry_xxx to handle_xxx
where possible.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Some serial ports have slightly different timing. These timing
variations result in less accurate boot time reporting. So, add a
calibration mechanism to the tool so that one can determine how much
time a specific machine's serial port uses.
Also, extend the main part of the tool to allow the user to specify
an exact timing parameter.
|
|
|
|
Add a build test to ensure that LD can properly align sections.
|
|
Always emit CONFIG_X definitions in autoconf.h - set them to 0 when
they are disabled.
|
|
|
|
This is a pure copy of the tool from the Linux v2.6.38-rc2
scripts/kconfig/ directory.
|
|
Some binutils (report of 2.20.1) don't create dummy symbols for each
section - work around that.
|
|
The compiler can get confused when referencing a C function in a
different mode. (It reasonably assumes that the C function in the
current mode is desired.) To avoid this compiler confusion, introduce
symbol prefixes (_cfunc16_, _cfunc32flat_, _cfunc32seg_) that must be
used on C function symbols that are referenced from other compilation
modes.
This makes it less likely compiler confusion will occur. It will also
makes it easier to implement and use vtable like operation structures.
|
|
|
|
|
|
Enable rom size to be over 128K.
Apparently, only the first 128K of the rom are mirrored to the
0xc0000-0xfffff area under qemu, so make sure to copy the rom (via
make_bios_writable) in the non-init part of the startup code. This
ensure the copy code is itself available.
|
|
Add support for determining which relocations need to be adjusted to
relocate the "32bit flat init" code. Place those relocations in the
output object.
|
|
Enhance tools/layoutrom.py code so that it can detect which sections
are used from the "32bit flat" runtime code. All other "32bit flat"
sections can then be assured to be initialization code only.
This is in preparation for relocating the 32bit initialization code.
|
|
Using classes and updating the values in the classes makes the code
easier to understand.
|
|
Use the builtin startswith() string method instead of implementing it
manually.
|
|
Add option parsing support to tool.
Enable option (-f) to read from a pipe - which is useful when
redirecting qemu's debugging log to a pipe with:
-chardev pipe,id=seabios,path=seabioslog -device isa-debugcon,iobase=0x402,chardev=seabios
|
|
|
|
Add tool for converting the output from hexdump() back into its
original binary form. This can be useful for use with tools such as
hexdump and objdump.
|
|
Handle cases where objdump shows an call to an unknown address.
Also, simplify implemention of orderfuncs() - use funcion addreses
instead of function names as keys.
|
|
Enhance tools/layoutrom.py to explicitly set those symbols that
resolve to a different code chunk (eg, 16, 32seg, 32flat). This
eliminates the need to link the code chunks multiple times.
This patch reduces the dependency on binutils behavior and makes the
build simpler to understand.
|
|
Add explicit tracking of functions that switch stacks.
Add new tracking of "yield" points -- areas in the code that appear to
hand control to third-party code which may use arbitrary stack space.
Try to arrange the output so that functions that call each other are
near each other.
|
|
Now, assigning a value to a global is needed to triger ICE.
|
|
Force functions intended for other code segments to be discarded
during link - this will cause a link error if it used.
Clean up rom layout code to ensure discarded sections are not used.
|
|
Create a new code blob (code32seg) with support for 32bit functions
that need to utilize explicit segment accesses.
This code blob uses global variables relative to %gs and with a
dynamic code offset (determined by get_global_offset()).
Add BIOS32 structure and code.
Add code for 32bit PCI BIOS code.
|
|
A relative PC jump can't exceed 32K, but .text16 can be bigger than 32K.
Separate out .text16 into data sections (.data16) and code (.text16).
Place text and fixed sections together at end of f-segment.
This reduces 16bit text size to ~28K which fixes build errors for now.
|
|
Try to account for time related to the host sending blocks of data to
the script.
|
|
There is also a start bit, so 8N1 serial should use 10 bits to a byte.
|
|
|
|
The Fedora Core 12 distro throws an internal compiler error due to a
bug in gcc. Look for this case and avoid using -combine if found.
|
|
If rom is over 64K then use part of e-segment for 32bit code.
Push 32bit code as high as it can go in the f-segment.
Do version building before layoutrom.py - this way layoutrom knows
full size of rom.
Make layoutrom.py build the full ld script - remove now unused ld
scripts that just imported the output of layoutrom.py.
Also, use "objdump" instead of "nm" - reduce toolchain requirements.
Enhance tools/checkrom.py so that it can pad bios.bin to size qemu is
happy with.
Also, add dependencies to build rules for local tools - if tool
changes automatically rerun it.
Make sure option roms don't overwrite the 32bit code (should the 32bit
code be in the e-segment).
Make sure shadow code works even if part of the code is in the
e-segment.
|
|
Handle case where there are no rodata sections.
|
|
A 'movl %esp,%ebp' can occur in the preamble - note for proper stack
usage checking.
|
|
|
|
Add 'extern' decl before variable test - some older compilers wont
mark a variable visible if an extern decl precedes it.
|
|
|
|
Enhance build to detect and avoid gcc with broken -fwhole-program
Also, remove workaround for older gcc that mess up global exports.
|
|
Suppress __attribute__((externally_visible)) when no -fwhole-program
Add switch hack for compilers without -fno-jump-tables
Define memcpy() function (for compilers without -minline-all-stringops).
Define call16_simpint as a macro (a param needs to be inlined).
Make sure s3_resume is only defined in 32bit mode.
|
|
Implement -ffunction-sections and -fdata-sections in both 32bit and
16bit code.
Make sure all sections have unique names (even asm and discarded
sections).
Enhance tools/layoutrom.py script to find all sections reachable from
exported 16bit code - prune all other sections.
Mark sections with "export" if they can be visible outside of code -
these sections wont be dropped when pruning unused sections.
|
|
Tighten regex so that pushaw doesn't confuse parser.
|
|
Make was stripping the relocated 16bit code - keep the unstripped
16bit code so that checkstack can parse it.
|