mirror of
https://github.com/joncampbell123/dosbox-x.git
synced 2025-05-09 20:01:19 +08:00
Fix bug where S3 LFB base alignment can misalign and cause disabling of PCI VGA if clipping against system memory
This commit is contained in:
parent
c4093eda69
commit
be88cbc919
@ -768,6 +768,10 @@ void VGA_Reset(Section*) {
|
||||
enable_pci_vga = false;
|
||||
}
|
||||
|
||||
/* must not overlap system RAM */
|
||||
if (S3_LFB_BASE < (MEM_TotalPages()*4096))
|
||||
S3_LFB_BASE = (MEM_TotalPages()*4096);
|
||||
|
||||
if (enable_pci_vga && has_pcibus_enable()) {
|
||||
/* must be 32MB aligned (PCI) */
|
||||
S3_LFB_BASE += 0x0FFFFFFUL;
|
||||
@ -779,10 +783,6 @@ void VGA_Reset(Section*) {
|
||||
S3_LFB_BASE &= ~0xFFFFUL;
|
||||
}
|
||||
|
||||
/* must not overlap system RAM */
|
||||
if (S3_LFB_BASE < (MEM_TotalPages()*4096))
|
||||
S3_LFB_BASE = (MEM_TotalPages()*4096);
|
||||
|
||||
/* if the constraints we imposed make it impossible to maintain the alignment required for PCI,
|
||||
* then just switch off PCI VGA emulation. */
|
||||
if (IS_VGA_ARCH && enable_pci_vga && has_pcibus_enable()) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user