@@ -1765,6 +1765,8 @@ _LVOUnlockContextList EQU -216
1765
1765
_LVOSetPropertyList EQU -228
1766
1766
_LVORebuildTreesA EQU -360
1767
1767
1768
+ BUG "SetMMU(addr:%lx size:%lx flags:%lx)" ,a0 ,d0 ,d1
1769
+
1768
1770
movem .l d2 -d7 /a2 -a5 ,-(sp )
1769
1771
1770
1772
movem .l d0 /a0 ,-(sp ) ; (sp),4(sp) = size,addr
@@ -1787,6 +1789,7 @@ _LVORebuildTreesA EQU -360
1787
1789
.done
1788
1790
PERMIT
1789
1791
1792
+ BUG "mmu.library = %lx" ,d2
1790
1793
tst .l d2
1791
1794
bne.b .mmulib_ok
1792
1795
@@ -1799,25 +1802,31 @@ _LVORebuildTreesA EQU -360
1799
1802
tst .b d0
1800
1803
bne.b .mmu_ok
1801
1804
1805
+ BUG "GetMMUType = <none>"
1802
1806
pea .nommu(pc )
1803
1807
bra .failed
1804
1808
1805
1809
.mmu_ok
1806
1810
sub.b #'0' ,d0
1811
+ BUG "GetMMUType = 680%ld0" ,d0
1807
1812
1808
1813
; Get contexts
1809
1814
CALLLIB _LVODefaultContext
1815
+ BUG "DefaultContext = %lx" ,d0
1810
1816
movea.l d0 ,a5 ; a5 = ctx
1811
1817
move.l d0 ,a0
1812
1818
CALLLIB _LVOSuperContext
1819
+ BUG "SuperContext = %lx" ,d0
1813
1820
movea.l d0 ,a4 ; a4 = sctx
1814
1821
1815
1822
move.l a5 ,d0
1816
1823
CALLLIB _LVOGetPageSize
1824
+ BUG "GetPageSize (ctx) = %lx (%ld bytes)" ,d0 ,d0
1817
1825
move.l d0 ,d7 ; d7 = pagesize
1818
1826
1819
1827
move.l a4 ,d0
1820
1828
CALLLIB _LVOGetPageSize
1829
+ BUG "GetPageSize (sctx) = %lx (%ld bytes)" ,d0 ,d0
1821
1830
cmp.l d0 ,d7
1822
1831
beq.b .page_ok
1823
1832
@@ -1828,6 +1837,8 @@ _LVORebuildTreesA EQU -360
1828
1837
; adjust address and size to match page size
1829
1838
movem .l (sp ),d0 /d1
1830
1839
1840
+ BUG "Requested region = %lx,%lx" ,d1 ,d0
1841
+
1831
1842
move.l d7 ,d6
1832
1843
subq.l #1 ,d6
1833
1844
not.l d6
@@ -1838,6 +1849,8 @@ _LVORebuildTreesA EQU -360
1838
1849
add.l d7 ,d0
1839
1850
and.l d6 ,d0
1840
1851
1852
+ BUG "Aligned region = %lx,%lx" ,d1 ,d0
1853
+
1841
1854
movem .l d0 /d1 ,(sp ) ; (sp),4(sp) = adjusted size/addr
1842
1855
1843
1856
; Lock contexts
@@ -1850,6 +1863,7 @@ _LVORebuildTreesA EQU -360
1850
1863
; Get mapping
1851
1864
move.l a5 ,a0
1852
1865
CALLLIB _LVOGetMapping (ctx)
1866
+ BUG "ctx mapping = %lx" ,d0
1853
1867
move.l d0 ,d5 ; d5 = ctx mapping
1854
1868
bne.b .ctx_ok
1855
1869
@@ -1858,6 +1872,7 @@ _LVORebuildTreesA EQU -360
1858
1872
1859
1873
.ctx_ok move.l a4 ,a0
1860
1874
CALLLIB _LVOGetMapping (sctx)
1875
+ BUG "sctx mapping = %lx" ,d0
1861
1876
move.l d0 ,d4 ; d4 = ctx mapping
1862
1877
bne.b .sctx_ok
1863
1878
@@ -1869,7 +1884,9 @@ _LVORebuildTreesA EQU -360
1869
1884
move.l a5 ,a0
1870
1885
move.l d7 ,a1
1871
1886
lea .tagDone,a2
1887
+ BUG "GetPropertiesA = %lx,%lx,%lx" ,a0 ,a1 ,(a2 )
1872
1888
CALLLIB _LVOGetPropertiesA (ctx,from,TAG_DONE)
1889
+ BUG "GetPropertiesA => %lx" ,d0
1873
1890
move.l d0 ,(sp ) ; (sp) = old flags (ctx)
1874
1891
1875
1892
move.l a5 ,a0
@@ -1878,6 +1895,7 @@ _LVORebuildTreesA EQU -360
1878
1895
move.l d6 ,d0
1879
1896
move.l d7 ,a1
1880
1897
lea .tagDone(pc ),a2
1898
+ BUG "SetPropertiesA = %lx,%lx,%lx %lx,%lx %lx" ,a0 ,d1 ,d2 ,a1 ,d0 ,(a2 )
1881
1899
CALLLIB _LVOSetPropertiesA (ctx,flags,mask,from,size,TAG_DONE)
1882
1900
tst .b d0
1883
1901
beq .revert
@@ -1886,7 +1904,9 @@ _LVORebuildTreesA EQU -360
1886
1904
move.l d7 ,a1
1887
1905
movem .l (sp ),d0 /a1
1888
1906
lea .tagDone,a2
1907
+ BUG "GetPropertiesA = %lx,%lx,%lx" ,a0 ,a1 ,(a2 )
1889
1908
CALLLIB _LVOGetPropertiesA (sctx,from,TAG_DONE)
1909
+ BUG "GetPropertiesA => %lx" ,d0
1890
1910
move.l d0 ,4 (sp ) ; 4(sp) = old flags (sctx)
1891
1911
1892
1912
move.l a4 ,a0
@@ -1895,6 +1915,7 @@ _LVORebuildTreesA EQU -360
1895
1915
move.l d6 ,d0
1896
1916
move.l d7 ,a1
1897
1917
lea .tagDone(pc ),a2
1918
+ BUG "SetPropertiesA = %lx,%lx,%lx %lx,%lx %lx" ,a0 ,d1 ,d2 ,a1 ,d0 ,(a2 )
1898
1919
CALLLIB _LVOSetPropertiesA (sctx,flags,mask,from,size,TAG_DONE)
1899
1920
tst .b d0
1900
1921
beq .revert
@@ -1904,6 +1925,7 @@ _LVORebuildTreesA EQU -360
1904
1925
move.l a4 ,4 (sp )
1905
1926
clr.l 8 (sp )
1906
1927
move.l sp ,a0
1928
+ BUG "RebuildTreesA = %lx,%lx,%lx" ,(a0 ),4 (a0 ),8 (a0 )
1907
1929
CALLLIB _LVORebuildTreesA (ctx,sctx,NULL)
1908
1930
add.w #4 *3 ,sp
1909
1931
tst .b d0
@@ -1913,47 +1935,58 @@ _LVORebuildTreesA EQU -360
1913
1935
pea .cleanup(pc )
1914
1936
move.l a5 ,a0
1915
1937
move.l d5 ,a1
1938
+ BUG "SetPropertyList = %lx,%lx" ,a0 ,a1
1916
1939
CALLLIB _LVOSetPropertyList (ctx,ctxl)
1917
1940
move.l a4 ,a0
1918
1941
move.l d4 ,a1
1942
+ BUG "SetPropertyList = %lx,%lx" ,a0 ,a1
1919
1943
CALLLIB _LVOSetPropertyList (sctx,sctxl)
1920
1944
1921
1945
.failed
1946
+ BUG "Failure!"
1922
1947
moveq .l #-1 ,d0
1923
1948
move.l d0 ,4 (sp ) ; set return values
1924
1949
move.l d0 ,8 (sp )
1925
1950
rts
1926
1951
1927
1952
.success
1953
+ BUG "Success!"
1928
1954
1929
1955
.cleanup
1930
1956
move.l a4 ,a0
1931
1957
move.l d4 ,a1
1958
+ ; BUG "ReleaseMapping = %lx,%lx",a0,a1
1932
1959
CALLLIB _LVOReleaseMapping (sctx,sctxl)
1933
1960
1934
1961
.release
1935
1962
move.l a5 ,a0
1936
1963
move.l d5 ,a1
1964
+ ; BUG "ReleaseMapping = %lx,%lx",a0,a1
1937
1965
CALLLIB _LVOReleaseMapping (ctx,ctxl)
1938
1966
1939
1967
.unlock
1940
1968
1941
1969
; Unlock contexts
1942
1970
movea.l a4 ,a0
1971
+ ; BUG "UnlockMMUContext = %lx",a0
1943
1972
CALLLIB _LVOUnlockMMUContext (sctx)
1944
1973
movea.l a5 ,a0
1974
+ ; BUG "UnlockMMUContext = %lx",a0
1945
1975
CALLLIB _LVOUnlockMMUContext (ctx)
1976
+ ; BUG "UnlockContextList"
1946
1977
CALLLIB _LVOUnlockContextList
1947
1978
1948
1979
.nommu
1949
1980
1950
1981
move.l a6 ,a1
1951
1982
move.l 4 .w,a6
1983
+ ; BUG "CloseLibrary = %lx",a1
1952
1984
CALLLIB _LVOCloseLibrary
1953
1985
1954
1986
.exit:
1955
1987
movem .l (sp )+,d0 /d1
1956
1988
movem .l (sp )+,d2 -d7 /a2 -a5
1989
+ ; BUG "DONE"
1957
1990
rts
1958
1991
1959
1992
.mmuName dc.b "mmu.library" ,0
0 commit comments