Fix copy_to_secondary

This commit is contained in:
pjht 2024-03-19 13:38:41 -05:00
parent 4b67fd4695
commit 1749a11283
Signed by: pjht
GPG Key ID: CA239FC6934E6F3A

View File

@ -387,11 +387,11 @@ vmem_map_free_to:
; Copies the range of page mappings at address a0 in the primary space with length d0 to the secondary space starting at address a1 ; Copies the range of page mappings at address a0 in the primary space with length d0 to the secondary space starting at address a1
public vmem_copy_to_secondary public vmem_copy_to_secondary
vmem_copy_to_secondary: vmem_copy_to_secondary:
move.l d0, -(a7) movem.l d0/a1, -(a7)
; Get the mapping pointer for the start page in the primary address space ; Get the mapping pointer for the start page in the primary address space
move.l #0, d0 move.l #0, d0
bsr.w vmem_get_map_ptr bsr.w vmem_get_map_ptr
move.l (a7)+, d0 movem.l (a7)+, d0/a1
subi.l #1, d0 ; Subtract 1 to account for the extra loop done by dbra subi.l #1, d0 ; Subtract 1 to account for the extra loop done by dbra
vmem_cts_loop: vmem_cts_loop:
; Read the next page mapping and increment the pointer ; Read the next page mapping and increment the pointer