Skip to content

chp3之前用户态 println! 有问题 #59

Open
@LimingFang

Description

@LimingFang

(我目前在写 chp3。
背景:“锯齿螈”内核(就是先一次性加载所有程序,然后顺序运行),ch3分支。
问题概述:假设每个程序是2MB,一共两个程序。那么它们在链接时会在0x8020_0000上面一点,但是运行前会分别被拷贝到[0x8040_0000,0x8060_0000)和[0x8060_0000,0x8080_0000)。然后修改第二个用户程序,只需要改成println!("{}",1),然后在fs.rs里打印缓冲区起始地址,会发现它并不在[0x8060_0000,0x8080_0000)之间,而是0x8020_0000上一点(即链接的位置)。
WX20220320-223258@2x
image
image

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions