Move the generic function and variable definitions from vgabios.h to a
new file vgautil.h. This reduces the size and complexity of
vgabios.h.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The POST phase has to invoke many initialization functions, and these
functions can have complex inter-dependencies. Try to categorize the
functions into 4 classes:
preinit - functions called very early in POST where function ordering
is very important and the code has limited access to other
interfaces.
init - functions that initialize internal interfaces and standard
external interfaces. This code is generally not dependent on
particular hardware and typically does not communicate directly
with any hardware devices.
setup - functions which access hardware or are dependent on particular
hardware or platform devices.
prepboot - functions that finalize internal interfaces and that
prepare for the boot phase.
This patch attempts to normalize the suffixes - functions that used
_init(), _setup(), _finalize(), or similar that did not follow the
above pattern were renamed. Other than function name changes, there
should be no code impact to this patch.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
The geode hardware can be configured to use different
outputs. This patch adds support this feature based on
the current .config
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
The Flat Panel Display Controller belongs to the Video
Processor unit but its register are starting at offset
0x400. Provide functions to work with fp register.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
This change introduces some helper functions, which are making
the code more readable and easier to debug.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
There is no reason to have a return code for vp_setup()
and dc_setup(). So get rid of them.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
It is possible to read out the framebuffer size via msr. The size
information is needed for VESA later.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
As the access the DC registers via memory, we dont need to
work with the extended CRTC register to setup the DC-VGA-mapping.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
As we access teh DC registers via memory we do not need all
the DC-VGA-mapping functions anymore.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
There is no reason to access the DC registers via VGA
memory mapping if we could the access via memory.
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Create a wrapper (stdvga_override_crtc) so the Geode code doesn't need
to access the stdvga mode tables directly.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>
Extract out the fields in 'struct vgamode_s' that are used in the main
code. The remaining fields are specific to the standard vga hardware
driver.
Signed-off-by: Kevin O'Connor <kevin@koconnor.net>