riscvarchive / riscv-qemu

QEMU with RISC-V (RV64G, RV32G) Emulation Support
384 stars 154 forks source link

Question about the pointer to framebuffer #188

Closed LoveZJT closed 5 years ago

LoveZJT commented 5 years ago

I want to implement video_write function, but I can't find the pointer to framebuffer. I have read wiki and manual carefully, but I fail to find the answer. Maybe I missed something critical. So, where is the framebuffer, or which document should I seek for it. BTW, while using fromhost to read the down key, I found some key can't be captured, such as F1, Caps Lock, etc. How could I do?

gurjeet commented 5 years ago

@LoveZJT Did you find a solution for this problem?

LoveZJT commented 5 years ago

@gurjeet No. I have not found the address of the framebuffer yet. If you use x86 of qemu, the address of Video BIOS Extension is 0x4000. It includes some informaitions about VBE, such as framebuffer. You could find address of framebuffer in the struct. But the address isn't used for RISCV. So if you find the address of framebuffer, please @LoveZJT .Thx

gurjeet commented 5 years ago

@bonzini @pm215 @rth7680 @kraxel, you guys are by far the major contributors to this repo, so pinging you. Can you please provide a pointer as to how do we go about finding the pointer to the framebuffer, if one exists :)

jim-wilson commented 5 years ago

None of those people are contributors to this repo. They are contributors to the upstream repo, which is where all of the real work happens. Please do not annoy non-RISC-V developers with RISC-V specific questions. It makes us look bad.

RISC-V is an ISA, and ISAs don't have a framebuffer. The x86 ISA does not have a framebuffer either. Systems like a PC can have a frame buffer, and that is presumably what you are looking at in the x86 case, i.e. it isn't the "x86" framebuffer it is the "x86 PC" framebuffer. There is no equivalent hardware standard for RISC-V as yet, so there is no "RISC-V PC" framebuffer for you. But you can presumably try to use any graphics device with a RISC-V CPU, and then see the documentation for that graphics device for how to use it.

Instead of wasting your time here, and annoying innocent people, try looking at qemu.org, and maybe try one of these mailing lists

https://lists.gnu.org/mailman/listinfo/qemu-discuss
https://lists.nongnu.org/mailman/listinfo/qemu-riscv

This repo is probably the worst place where you can ask a qemu question because no one is here anymore.

gurjeet commented 5 years ago

@jim-wilson Sorry to have come across as an annoying person, if I did. I pinged those folks based on the number of commits to the repo; I didn't realize they're not affiliated with RISC-V. Is there a better way to find out who to reach out to in case of issues here?

That explanation of yours about differentiating between the ISA and the hardware makes total sense. @LoveZJT please follow Jim's advice and ask around on the QEMU mailing lists.

@LoveZJT also, please close this issue, as it simply cannot be addressed by the folks on this repo. Edit: I see that the issue is already closed.