| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
| |
functions to obtain the address and size of the bitmap splash image.
Sponsored by: Juniper Networks.
|
|
|
|
|
|
|
| |
when the original offset is bigger than size of one page. X86BIOS macros
cannot be used here because it is assumed address is only linear in a page.
Tested by: netchild
|
|
|
|
|
| |
a case where video ROM for an IGP is too tightly coupled with system BIOS
to get relocated.
|
|
|
|
|
|
|
|
| |
not change interrupt vector if it is not pointing the ROM itself. Actually,
we just fail shadowing altogether if that is the case because the shadowed
copy will be useless for sure and POST may not be relocatable or useful.
While I'm here, fix a debugging message under bootverbose, really. r211829
fixed one case but broke another. Mea Culpa.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
supported by many BIOSes to improve performance of VESA BIOS calls for real
mode OSes but it is not our intention here. However, this may help some
platforms where the video ROMs are inaccessible after suspend, for example.
Note it may consume up to 64K bytes of contiguous memory depending on video
controller model when it is enabled. This feature can be disabled by
setting zero to 'debug.vesa.shadow_rom' loader tunable via loader(8) or
loader.conf(5). The default is 1 (enabled), for now.
|
|
|
|
| |
spltty() calls while I am here.
|
| |
|
|
|
|
| |
we reset DAC mode and restore palette data while we are resuming always.
|
|
|
|
| |
Submitted by: Yamagi Burmeister (lists at yamagi dot org)
|
|
|
|
| |
Submitted by: Yamagi Burmeister (lists at yamagi dot org)
|
| |
|
|
|
|
|
| |
from VESA BIOS initialization. All other malloc(9) uses in the function is
blocking any way.
|
|
|
|
|
|
|
|
|
| |
FPU registers for copying. Remove the switch table and jumps from
bcopy/bzero/... to the actual implementation.
As a side-effect, i486-optimized bzero is removed.
Reviewed by: bde
Tested by: pho (previous version)
|
| |
|
|
|
|
|
|
|
|
| |
free(9) and it can cause kernel panic when there are multiple graphics
controllers in the system.
Tested by: Brandon Gooch (jamesbrandongooch at gmail dot com)
MFC after: 3 days
|
| |
|
|
|
|
|
| |
VBE function. Most problems should be corrected by the mode table sanity
check and we only need the paranoid in extremely rare cases.
|
| |
|
| |
|
|
|
|
|
|
|
| |
First, we compare mode table data against minimum value. If the mode table
does not make sense, we set the minimum in the mode info. When we actually
set the mode, we try VESA BIOS function and compare it against the previous
value. If it makes more sense, update the information.
|
|
|
|
|
| |
in 6-bit mode. Although we have to check non-VGA compatibility bit here,
it seems there are too many broken VESA BIOSes out to rely on it.
|
|
|
|
|
| |
Although we do not use them all directly, it seems VGA render may access
unmapped memory region and cause kernel panic.
|
|
|
|
|
|
|
|
|
| |
- Add a separate palette data for 8-bit DAC mode when SC_PIXEL_MODE is set
and fill it up with default gray-scale palette data for text. Now we don't
have to set `hint.sc.0.vesa_mode' to get the default palette data.
- Add a new adapter flag, V_ADP_DAC8 to track whether the controller is
using 8-bit palette format and load correct palette when switching modes.
- Set 8-bit DAC mode only for non-VGA compatible graphics mode.
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
not reflect actual number of bytes when it was not exactly width * bpp * 8.
|
|
|
|
| |
Reported by: Marc UBM Bocklet (ubm dot freebsd at googlemail dot com)
|
|
|
|
|
|
|
|
| |
format is higher than 6-bit instead of relying VGA compatibility flag.
This fixes palette problem of NVIDIA GeForce 6600. Reduce code differences
between palette load/save functions while we are here.
Tested by: danfe
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This replaces d_mmap() with the d_mmap2() implementation and also
changes the type of offset to vm_ooffset_t.
Purge d_mmap2().
All driver modules will need to be rebuilt since D_VERSION is also
bumped.
Reviewed by: jhb@
MFC after: Not in this lifetime...
|
|
|
|
| |
- Test a cheaper function first.
|
|
|
|
|
|
|
| |
- Add a proxy driver vgapm to help vgapci to save/load VGA state.
- Move device_set_desc() to the right place while we are here.
Reviewed by: jhb
|
|
|
|
|
|
| |
itself to an associated PCI device if it exists. It is little bit hackish
but it should fix build without frame buffer driver since r198964.
Fix some style(9) nits in vga_isa.c while we are here.
|
|
|
|
|
| |
It was not working because we were saving its state after the device was
powered down. Simplify vesa_load_state() as the culprit is fixed now.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
| |
- VBE 3.0 says palette format resets to 6-bit mode when video mode changes.
We simply set 8-bit mode when we switch modes if the adapter supports it.
- VBE 3.0 also says if the mode is not VGA compatible, we must use VBE
function to save/restore palette. Otherwise, VGA function may be used.
Thus, reinstate the save/load palette functions only for non-VGA compatible
modes regardless of its palette format.
- Let vesa(4) set VESA modes even if vga(4) claims to support it.
- Reset default palette if VESA pixel mode is set initially.
- Fix more style nits.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
function may not work properly if we don't. Turn off hardware cursor as
vesa_set_mode() does.
- Add VBE 3.0 specific fields in VESA mode structure and pack it. Note
the padding is 190 bytes although VBE 3.0 says 189 bytes. It must be wrong
because the size of structure becomes 255 bytes and the specification says
it must be 256 bytes in total. In fact, an example code in the spec. does
it right, though. While we are at it, fix some i386-isms.
- Remove state buffer size limitation. It is no longer necessary since
sys/compat/x86bios/x86bios.c r198251.
- Move int 0x10 vector test into vesa_bios_post() as we always do it anyway.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
- Do not map entire real mode memory (1MB). Instead, we map IVT/BDA and
ROM area separately. Most notably, ROM area is mapped as device memory
(uncacheable) as it should be. User memory is dynamically allocated and
free'ed with contigmalloc(9) and contigfree(9). Remove now redundant and
potentially dangerous x86bios_alloc.c. If this emulator ever grows to
support non-PC hardware, we may implement it with rman(9) later.
- Move all host-specific initializations from x86emu_util.c to x86bios.c and
remove now unnecessary x86emu_util.c. Currently, non-PC hardware is not
supported. We may use bus_space(9) later when the KPI is fixed.
- Replace all bzero() calls for emulated registers with more obviously named
x86bios_init_regs(). This function also initializes DS and SS properly.
- Add x86bios_get_intr(). This function checks if the interrupt vector is
available for the platform. It is not necessary for PC-compatible hardware
but it may be needed later. ;-)
- Do not try turning off monitor if DPMS does not support the state.
- Allocate stable memory for VESA OEM strings instead of just holding
pointers to them. They may or may not be accessible always. Fix a memory
leak of video mode table while I am here.
- Add (experimental) BIOS POST call for vesa(4). This function calls VGA
BIOS POST code from the current VGA option ROM. Some video controllers
cannot save and restore the state properly even if it is claimed to be
supported. Usually the symptom is blank display after resuming from suspend
state. If the video mode does not match the previous mode after restoring,
we try BIOS POST and force the known good initial state. Some magic was
taken from NetBSD (and it was taken from vbetool, I believe.)
- Add a loader tunable for vgapci(4) to give a hint to dpms(4) and vesa(4)
to identify who owns the VESA BIOS. This is very useful for multi-display
adapter setup. By default, the POST video controller is automatically
probed and the tunable "hw.pci.default_vgapci_unit" is set to corresponding
vgapci unit number. You may override it from loader but it is very unlikely
to be necessary. Unfortunately only AGP/PCI/PCI-E controllers can be
matched because ISA controller does not have necessary device IDs.
- Fix a long standing bug in state save/restore function. The state buffer
pointer should be ES:BX, not ES:DI according to VBE 3.0. If it ever worked,
that's because BX was always zero. :-)
- Clean up register initializations more clearer per VBE 3.0.
- Fix a lot of style issues with vesa(4).
|
|
|
|
|
|
|
| |
memory to support them. Some adapters have expansible memory slots but
video mode table is static. In this case, unusable modes may be reported.
Submitted by: paradox (ddkprog yahoo com) (initial patch)
|
| |
|
|
|
|
|
|
|
| |
vesa_bios_get_line_length() in graphics mode. Always calculate the value
from known video info instead.
Submitted by: paradox (ddkprog yahoo com)
|
|
|
|
|
|
|
| |
- Change x86biosCall() to more appropriate x86bios_intr().[1]
Discussed with: delphij, paradox (ddkprog yahoo com)
Submitted by: paradox (ddkprog yahoo com)[1]
|
|
|
|
|
|
| |
It may not be optimal but it is clearly better than the old place.
OK'ed by: delphij, paradox (ddkprog yahoo com)
|
|
|
|
|
|
| |
emulator. This fixes VESA related freeze observed on some systems.
Submitted by: paradox <ddkprog yahoo com>
|