klange wrote:Under the menu labeled 视图, can you select "compatmonitor0", enter the command "info tlb", and post the results?
Help! I can't write at 0xFE000000
-
- Member
- Posts: 104
- Joined: Tue Aug 17, 2021 10:40 am
- Libera.chat IRC: visitor
- Location: CN
- Contact:
Re: Help! I can't write at 0xFE000000
My github: https://github.com/nifanfa
Re: Help! I can't write at 0xFE000000
It does look like you are successfully mapping 0xFD000000, but I suspect that QEMU is ignoring either your writes or your reads to the region since you don't actually have a framebuffer set up. It's also possible something is going wrong with your pointer code - native C# stuff is a mysterious black box to me.
-
- Member
- Posts: 104
- Joined: Tue Aug 17, 2021 10:40 am
- Libera.chat IRC: visitor
- Location: CN
- Contact:
Re: Help! I can't write at 0xFE000000
no it just my compiler converted the c# to nasm not c# native thingsklange wrote:It does look like you are successfully mapping 0xFD000000, but I suspect that QEMU is ignoring either your writes or your reads to the region since you don't actually have a framebuffer set up. It's also possible something is going wrong with your pointer code - native C# stuff is a mysterious black box to me.
My github: https://github.com/nifanfa
-
- Member
- Posts: 104
- Joined: Tue Aug 17, 2021 10:40 am
- Libera.chat IRC: visitor
- Location: CN
- Contact:
Re: Help! I can't write at 0xFE000000
I also tried pmemsave to make a memory dump. The value is true zero.klange wrote:It does look like you are successfully mapping 0xFD000000, but I suspect that QEMU is ignoring either your writes or your reads to the region since you don't actually have a framebuffer set up. It's also possible something is going wrong with your pointer code - native C# stuff is a mysterious black box to me.
My github: https://github.com/nifanfa
Re: Help! I can't write at 0xFE000000
Is the frame buffer mapped as cached, write-back? What if you try to write to it before/without enabling the paging?
Edit: The top-left corner of the VM display, before and after "set {char}0xfd000000=0xaa" from gdb:
Before:
After:
Edit: The top-left corner of the VM display, before and after "set {char}0xfd000000=0xaa" from gdb:
Before:
After:
-
- Member
- Posts: 104
- Joined: Tue Aug 17, 2021 10:40 am
- Libera.chat IRC: visitor
- Location: CN
- Contact:
Re: Help! I can't write at 0xFE000000
if you disable paging you are no longer in long modelinuxyne wrote:Is the frame buffer mapped as cached, write-back? What if you try to write to it before/without enabling the paging?
Edit: The top-left corner of the VM display, before and after "set {char}0xfd000000=0xaa" from gdb:
Before:
After:
My github: https://github.com/nifanfa
-
- Member
- Posts: 104
- Joined: Tue Aug 17, 2021 10:40 am
- Libera.chat IRC: visitor
- Location: CN
- Contact:
Re: Help! I can't write at 0xFE000000
when i enable qemu debug and write to 0xe0000000 it displaysklange wrote:It does look like you are successfully mapping 0xFD000000, but I suspect that QEMU is ignoring either your writes or your reads to the region since you don't actually have a framebuffer set up. It's also possible something is going wrong with your pointer code - native C# stuff is a mysterious black box to me.
Code: Select all
Invalid access at addr 0xE0000000, size 8, region '(null)', reason: rejected
My github: https://github.com/nifanfa
-
- Member
- Posts: 5563
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Help! I can't write at 0xFE000000
This error means you have mapped that address correctly in your page tables, but QEMU is ignoring your reads and writes because there's nothing at that address.nifanfa wrote:when i enable qemu debug and write to 0xe0000000 it displaysCode: Select all
Invalid access at addr 0xE0000000, size 8, region '(null)', reason: rejected
It sounds like your code to map the page tables works fine. You don't see anything appear when you write to the linear frame buffer because there is no linear frame buffer in text mode.
-
- Member
- Posts: 104
- Joined: Tue Aug 17, 2021 10:40 am
- Libera.chat IRC: visitor
- Location: CN
- Contact:
Re: Help! I can't write at 0xFE000000
Octocontrabass wrote:This error means you have mapped that address correctly in your page tables, but QEMU is ignoring your reads and writes because there's nothing at that address.nifanfa wrote:when i enable qemu debug and write to 0xe0000000 it displaysCode: Select all
Invalid access at addr 0xE0000000, size 8, region '(null)', reason: rejected
It sounds like your code to map the page tables works fine. You don't see anything appear when you write to the linear frame buffer because there is no linear frame buffer in text mode.
My github: https://github.com/nifanfa
-
- Member
- Posts: 104
- Joined: Tue Aug 17, 2021 10:40 am
- Libera.chat IRC: visitor
- Location: CN
- Contact:
Re: Help! I can't write at 0xFE000000
0xC0000000 - 0xFFFFFFFF are inaccessiblenifanfa wrote:Octocontrabass wrote:This error means you have mapped that address correctly in your page tables, but QEMU is ignoring your reads and writes because there's nothing at that address.nifanfa wrote:when i enable qemu debug and write to 0xe0000000 it displaysCode: Select all
Invalid access at addr 0xE0000000, size 8, region '(null)', reason: rejected
It sounds like your code to map the page tables works fine. You don't see anything appear when you write to the linear frame buffer because there is no linear frame buffer in text mode.
My github: https://github.com/nifanfa
-
- Member
- Posts: 5563
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Help! I can't write at 0xFE000000
What happens if you use the framebuffer address provided by your bootloader instead of 0xFD000000?
-
- Member
- Posts: 104
- Joined: Tue Aug 17, 2021 10:40 am
- Libera.chat IRC: visitor
- Location: CN
- Contact:
Re: Help! I can't write at 0xFE000000
The address which provided by boot loader is 0xFE000000 but it still not workOctocontrabass wrote:What happens if you use the framebuffer address provided by your bootloader instead of 0xFD000000?
My github: https://github.com/nifanfa
-
- Member
- Posts: 5563
- Joined: Mon Mar 25, 2013 7:01 pm
Re: Help! I can't write at 0xFE000000
Are you halting the CPU after you write to the framebuffer? Some versions of QEMU will not display screen updates that happen shortly before the CPU halts.
What type of framebuffer did you request in your multiboot header?
What type of framebuffer did you request in your multiboot header?
-
- Member
- Posts: 104
- Joined: Tue Aug 17, 2021 10:40 am
- Libera.chat IRC: visitor
- Location: CN
- Contact:
Re: Help! I can't write at 0xFE000000
forget about the framebuffer. the real problem is that it can't access 0xc0000000-0xffffffffOctocontrabass wrote:Are you halting the CPU after you write to the framebuffer? Some versions of QEMU will not display screen updates that happen shortly before the CPU halts.
What type of framebuffer did you request in your multiboot header?
i just tried to map the bar0 that provided by a pci device. it occured the same problem
Code: Select all
Invalid access at addr 0xFD000000, size 8, region '(null)', reason: rejected
My github: https://github.com/nifanfa
-
- Member
- Posts: 104
- Joined: Tue Aug 17, 2021 10:40 am
- Libera.chat IRC: visitor
- Location: CN
- Contact:
Re: Help! I can't write at 0xFE000000
i can access 0xFD000000 before entering long modeOctocontrabass wrote:Are you halting the CPU after you write to the framebuffer? Some versions of QEMU will not display screen updates that happen shortly before the CPU halts.
What type of framebuffer did you request in your multiboot header?
My github: https://github.com/nifanfa