minor: move mark_dirty into memcpy_into_svga_lfb

This commit is contained in:
Fabian
2025-08-14 13:55:53 -06:00
parent ab4440d28f
commit 2f040c0502
2 changed files with 2 additions and 2 deletions

View File

@@ -238,6 +238,8 @@ pub unsafe fn memcpy_no_mmap_or_dirty_check(src_addr: u32, dst_addr: u32, count:
pub unsafe fn memcpy_into_svga_lfb(src_addr: u32, dst_addr: u32, count: u32) {
dbg_assert!(src_addr < *memory_size);
dbg_assert!(in_svga_lfb(dst_addr));
dbg_assert!(Page::page_of(dst_addr) == Page::page_of(dst_addr + count - 1));
vga::mark_dirty(dst_addr);
ptr::copy_nonoverlapping(
mem8.offset(src_addr as isize),
vga_mem8.offset((dst_addr - VGA_LFB_ADDRESS) as isize),

View File

@@ -9,7 +9,6 @@
// ins 0 0 1/w
// outs 0 1 0
use crate::cpu;
use crate::cpu::arith::{cmp16, cmp32, cmp8};
use crate::cpu::cpu::{
get_seg, io_port_read16, io_port_read32, io_port_read8, io_port_write16, io_port_write32,
@@ -300,7 +299,6 @@ unsafe fn string_instruction(
phys_dst -= (count_until_end_of_page - 1) * size_bytes as u32;
}
if movs_into_svga_lfb {
cpu::vga::mark_dirty(phys_dst);
memory::memcpy_into_svga_lfb(
phys_src,
phys_dst,