Age | Commit message (Collapse) | Author | Files | Lines |
|
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Add wrappers for the FLATPTR_* functions for the parisc architecture.
Signed-off-by: Helge Deller <deller@gmx.de>
|
|
Move the inb(), insb(), etc. code from ioport.h to x86.h. Move the
PORT_* definitions to their appropriate hardware files.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
The segoff_s definition is used by a number of header files that would
not otherwise need farptr.h, so move it to a more central location.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Use 'lo' to mean the low bits and 'hi' to mean the high bits of a
64bit value.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
It appears that gcc does a better job of optimization when the
SET_SEG() segment assignment assembler code is contained in an inline
function. With the code in a function gcc appears to be able to
optimize out many redundant segment register loads. Removing some of
these unnecessarily loads makes the code both smaller and faster.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
|
|
Omitting "void" leads to a K&R style declaration which was not intended.
|
|
Extract out addr32 to a parameter to the READx/WRITEx_SEG macros.
|
|
Prepare for support of segmented 32bit code.
Add new MODESEGMENT definition, and clarify existing 32bit mode defs.
|
|
Introduce 'struct segoff_s' to more places.
|
|
Complete the initial implementation of PMM.
Default new PMM code to be enabled.
Move malloc code from memmap.c to pmm.c.
Define new malloc zones for PMM (ZoneTmpLow and ZoneTmpHigh).
Change default READ/WRITE_SEG macros to use 32bit pointers (the 16bit
PMM code use "big real" mode and requires 32bit accesses).
Allow pmm allocations to occur during bcv executions also.
Add low-memory clearing before boot.
Also, align the default f-seg memory.
|
|
Cast is needed when pulling pointers or other non-int types.
|
|
Gcc is reporting a spurious unused variable warning - work around it.
|
|
Add ASSERT16/ASSERT32 macros to farptr.h.
Use those macros in place of open-coded checks.
Add "noreturn" attribute to functions to reduce compiler warnings.
Add ASSERT32 to smp_probe() to eliminate 16bit assembler warnings.
|
|
This is a minor optimization that can improve gcc code generation.
|
|
The term "far pointer" is used in many 16bit specs, and it is
different from what MAKE_FARPTR creates. So, use the term "flat
pointer" in the code to distinguish between the two meanings.
Also, use the suffix "_fl" consistently when working with "flat
pointers".
|
|
Change license of contributions from Kevin O'Connor from GPLv3 to
LGPLv3 (or later). Since the work as a whole is based on Kevin's
contributions and the "bochs bios" which has a license of LGPL (v2 or
later), this effectively makes the work as a whole available under
LGPLv3 (or later).
|
|
This reduces stack usage (old dos programs don't provide much space).
|
|
Detect types by size instead of by comparison to different integer types.
This allows pointers and other types to be directly accessed.
Note that this does slightly pessimize 64bit accesses.
|
|
When in 32bit mode - just define it to 0.
|
|
Use 64bit integers for sector and lba values.
|
|
The variable was marked as an input instead of an output.
This could cause gcc bugs - it also forced the asm to be volatile.
|
|
Instead of using volatile, use a dummy variable definition so the
compiler can track the link between segment updates and accesses.
This gives gcc more flexibility in instruction scheduling.
Also update GET/SET_VAR macros to support signed integer variants.
|
|
|
|
Rename MAKE_32_PTR to MAKE_FARPTR.
Rename PTR_TO_SEG to FARPTR_TO_SEG.
Rename PTR_TO_OFFSET to FARPTR_TO_OFFSET.
|
|
Using 32bit pointers makes the code a little simpler. It also allows
the code to be used from 32 bit mode. It does require all callers to
encode the segment/offset into an absolute address. The ins/outs
functions also need to know how to convert from 32bit back to
segment/offset addresses.
The change also includes a minor cleanup of the macros in farptr.h.
|
|
The (val) parameter needs to be evaluated before setting the segment.
|
|
Use "string ops" to simplify port accesses.
Always run "cld" on entry to C code.
|
|
Add include guards to header files.
Disable stack protector on gcc versions with that option.
Fix lds bug in src/rombios32.lds.S
Don't forward declare "struct bregs;" - it may be confusing gcc on some versions.
|
|
|
|
|
|
|