| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
The size of 'struct bregs' is not evenly divisible by four and where
the assembler placed a 'struct bregs' on the extra stack as part of
entering into the C functions it caused the C functions to run with a
non-aligned stack. It's technically not correct to use an unaligned
stack and it is certainly less efficient.
This patch avoids using BREGS_size (the sizeof struct bregs) and
instead introduces PUSHBREGS_size (the size of the general purpose
registers in struct bregs) in the assembler. Where the code actually
did use the %cs:%ip and flags, an extra 8 (instead of 6) bytes are
added to maintain a sane alignment.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
| |
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
| |
Create macros SAVEBREGS_POP_DSEAX and RESTOREBREGS_DSEAX for saving
and restoring the cpu state. These are similar to the existing
PUSHBREGS and POPBREGS macros.
This also fixes a bug in __farcall16 which inadvertently restored %ds
in %es and vice-versa.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
There's no need to clobber %ax in ENTRY_INTO32. Now that %eax isn't
clobbered, use ENTRY_INTO32 in entry_csm.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Set an appropriate elf entry point (entry_elf, entry_csm,
reset_vector) for each type of build (coreboot, csm, qemu). Use that
entry point when determining which sections to keep.
Also, remove the '.export.' mechanism to keep a section in the final
binary - it is no longer used.
This allows the build to slightly reduce the overall size as entry_elf
is no longer needed on non-coreboot builds and entry_csm is no longer
needed on non-csm builds.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
|
|
|
|
|
| |
I want to do this too, and can't bring myself to introduce yet another copy.
Signed-off-by: David Woodhouse <David.Woodhouse@intel.com>
Acked-by: Marc Jones <marc.jones@se-eng.com>
|
|
|
|
|
|
| |
It's difficult to have a uniform view of the stack when transition
modes, so pass the return address in a register. As a result, the
transition functions only access memory via the %cs selector now.
|
|
|
|
|
|
|
|
|
|
|
| |
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.
|
|
|
|
|
|
| |
Save/restore %ebp on irq entry.
Support saving and restoring %ebp on call16.
Enable display of %ebp in register dumps.
|
|
|
|
|
|
| |
The irq entry points now push the handler address and jump to a
function that does parameter setup. This reduces the code size
because the entry setup isn't repeated for every handler.
|
|
This allows the entry macros to be used in other assembler code.
|