From 954275806d5352577849ddf1ad93f86d90a269b9 Mon Sep 17 00:00:00 2001 From: Alban Seurat Date: Tue, 26 Jan 2021 21:54:19 +0100 Subject: [PATCH] resolve issue on framebuffer --- kernel-high.img | Bin 94240 -> 94240 bytes mmio/src/console/fb.rs | 9 ++++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/kernel-high.img b/kernel-high.img index 688c481817d87b2cf3378582b853ceeb8bf97bb8..80610dd063321593be65bce648f20ac1268fe808 100755 GIT binary patch delta 6772 zcma(#33QZ2npJ-v=}ywQJ10qZ=k6qs0|L3z=_prX5;_>dp`^(}f{_~pMhAgc1MAZze(zp7{NtkzHCwK0Eo%d!eL{Xvx6< zhY4Y45%%Lcfc!$D%h8=g`bJbLCgFBDUu@^{yF!t!V!{+xkK-BwD>xGhal)&&EA*+D z7vYES#705}a?y(GouTaI6_oj#>DWxPNau`@lwWV9W8W^KV(4_2InQq7xgDR`qY!pXBBUw!ZIkec z3V!1xe2jvB0P#-r)YEPI9F{nXbcisd@%R(Jj{Omh#L)Chuq}$!a)cL0k6HEM#Kc5` zKP22^A!NuxlF=#^3p2{@vvOBkqFDf4jPxshbhpJ94X+Ev)WJBuf%${+$g~^Ro2lnI zZs1qZ{%bf=;i{0JcN<6?w?C0X#v>9G*B?O4_2xRyc!>SRd8k&+qKU9YHJyfmN7YG_ zz@Scvj={6>^Y}9e<7avn%GDXg8pPrbY;3t2gRSx0=+SzJ%sDXEUiP8IAIkg}DbxLE zKQ~fK#ty-LwTWJZtLoUuFEImk=prt!3#7uJ+Cu%DLO%hGCdYU`TJtSh@Ex9>>j+@{ zRzjVokoq{6@fDuI3SQSy_955b3{Pls=m}0YJcslSK`qHuLqKDqMx zhO}D3aTSK6OKTgut}^w1i=&H@mpTO7Sp4Y2=d{2=D(TzsUdXJNuQ9JNbzc4yXCBRw zP)G|&hcev^4KMO{VS~;@-vp+srF&plS3k915qMG&ct)AWn_u_n)V8r)+=vj{SS)Vz zB-H6+h0g_O)4!J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d=*woCmZNP`mEK8 zP3aGI+EDtQiUn)(a}~!1lb^th#t8CZ_|N$T%Up`7V8Py~;=z$~K*d#CWSz9yMNNjv zn-#~JWYoM>Md$I6iH~2^f`;S1q|`=bi(e@`c|h|RrZyhCtC8NOrF~NL_0$yIp*Hf* zH+6Ql-Li@7k;#Ux8fB|}3VPED1$8TEmb!DVjN(kV|9W~%AF*E95~4;+Z7-+@-t_YG zvWf?fd_o#rPb~$cS<#75#g5My#xKtZ;|XbeJ*|qKX}v*mHd9OV9jZ0_xg|d*q#eyP zGqFqcKA7Mjd|G<3nVM|de}cVLjlovQxdEder5?INM(NX%Z3DH?n-t6~U5}XgjSb3i z)cr{i_l}-?geC@VP`LQzB|mleHw#xla^8qDFUa-|yzdbCAZ+6!d6^PRE?6L2U7 ztg<=|z>U%uZ8X__MNOhS#E=&}pkJ-(); + let last_row = (self.width * self.height) as usize * mem::size_of::(); + ptr::copy((self.base_pointer + row_size) as *const u64, self.base_pointer as *mut u64, nb_of_u64 as usize); + ptr::write_bytes((self.base_pointer + last_row) as *mut u64, 0, row_size / mem::size_of::()); } } }