mirror of
https://github.com/AsahiLinux/m1n1
synced 2024-11-10 01:34:12 +00:00
fb: Fix FB junk leftover from stage1 in stage2
Signed-off-by: Hector Martin <marcan@marcan.st>
This commit is contained in:
parent
9741ff9b97
commit
83ac04c1a9
1 changed files with 5 additions and 1 deletions
6
src/fb.c
6
src/fb.c
|
@ -400,8 +400,12 @@ void fb_init(bool clear)
|
||||||
&orig_logo);
|
&orig_logo);
|
||||||
}
|
}
|
||||||
|
|
||||||
if (clear)
|
if (clear) {
|
||||||
memset32(fb.ptr, 0, fb.size);
|
memset32(fb.ptr, 0, fb.size);
|
||||||
|
} else {
|
||||||
|
// Workaround for m1n1 stage 1 framebuffer UAF bug
|
||||||
|
memset32(fb.ptr, 0, min(256, fb.size));
|
||||||
|
}
|
||||||
|
|
||||||
console.margin.rows = 2;
|
console.margin.rows = 2;
|
||||||
console.margin.cols = 4;
|
console.margin.cols = 4;
|
||||||
|
|
Loading…
Reference in a new issue