增加C代码中有关isa的宏
This commit is contained in:
parent
843ab95aa0
commit
4daa4bedc5
|
@ -7,7 +7,7 @@
|
||||||
|
|
||||||
#include <kernel/arch/x86_64/kernel.h>
|
#include <kernel/arch/x86_64/kernel.h>
|
||||||
|
|
||||||
#define ISA_STRING "x86_64"
|
#define ISA_NAME "x86_64"
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
|
@ -123,8 +123,8 @@ bool memm_map_pageframes_to(
|
||||||
}
|
}
|
||||||
|
|
||||||
map_pageframe_to(target, physical, user, write, align);
|
map_pageframe_to(target, physical, user, write, align);
|
||||||
usize step = min(size, (usize)align * MEMM_PAGE_SIZE);
|
|
||||||
|
|
||||||
|
usize step = min(size, (usize)align * MEMM_PAGE_SIZE);
|
||||||
size -= step;
|
size -= step;
|
||||||
target += step;
|
target += step;
|
||||||
physical += step;
|
physical += step;
|
||||||
|
|
|
@ -65,7 +65,7 @@ void get_frame_buffer_with_bootinfo(framebuffer *fb, bootinfo_t *bootinfo)
|
||||||
fb->width = fbinfo->framebuffer_width;
|
fb->width = fbinfo->framebuffer_width;
|
||||||
fb->height = fbinfo->framebuffer_height;
|
fb->height = fbinfo->framebuffer_height;
|
||||||
fb->pixsize = fbinfo->framebuffer_bpp / 8;
|
fb->pixsize = fbinfo->framebuffer_bpp / 8;
|
||||||
fb->pixtype = rgb;
|
fb->pixtype = rgb; // 绝大多数显示器配置都是rgb,不需要特意判断
|
||||||
memm_map_pageframes_to(
|
memm_map_pageframes_to(
|
||||||
(u64)fb->pointer, (u64)fb->pointer,
|
(u64)fb->pointer, (u64)fb->pointer,
|
||||||
fb->width * fb->height * fb->pixsize,
|
fb->width * fb->height * fb->pixsize,
|
||||||
|
|
Reference in New Issue