[SeaBIOS] Re: Malloc Question
On Fri, Aug 25, 2023 at 10:36:04PM +0100, Kieran Kunhya wrote: > Hello, > > I'm trying to update this patch for 2017 as I have the same issue as the > author in that I can't use the KVM virtual keyboard and a physical keyboard > at the same time: > https://patchew.org/Seabios/20171215100946.58298-1-stef.van...@prodrive-technologies.com/ > > I have implemented a linked list as recommended but this has not worked as > expected. Assuming I have not made an obvious mistake, I think maybe this > patch is not working because I'm using the wrong malloc. Which one should I > be using? There is some documentation in docs/Memory_Model.md (also at https://www.seabios.org/Memory_Model ). Since the usb keyboard code is using GET_GLOBAL() to dereference pointers, the memory would likely need to be allocated with malloc_fseg(). -Kevin ___ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-le...@seabios.org
[SeaBIOS] Re: Malloc Question
Hi Paul, Thanks for the response. On Mon, 28 Aug 2023 at 10:07, Paul Menzel wrote: > [CC: +Kevin. +Stef] > > How can this be tested? > I have been using QEMU: sudo ./qemu-system-i386 -bios ~/seabios/out/bios.bin -vnc :0 -device usb-ehci -device usb-kbd -chardev stdio,id=seabios -device isa-debugcon,iobase=0x402,chardev=seabios and sudo ./qemu-system-i386 -bios ~/seabios/out/bios.bin -vnc :0 -device usb-ehci -device usb-kbd -device usb-ehci -device usb-kbd -chardev stdio,id=seabios -device isa-debugcon,iobase=0x402,chardev=seabios Or you can use a machine with SeaBIOS and two keyboards plugged in. > > Assuming I have not made an obvious mistake, I think maybe this patch > > is not working because I'm using the wrong malloc. Which one should > > I be using? > > > > Thanks for your help. > > Thank you for working on this. I think it’d be better if you send the > patch inline maybe using `git format-patch` and `git send-email`, which > might be better for discussion this on the list. > I will do this, thanks. Regards, Kieran Kunhya ___ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-le...@seabios.org
[SeaBIOS] Re: Malloc Question
[CC: +Kevin. +Stef] Dear Kieran, Am 25.08.23 um 23:36 schrieb Kieran Kunhya: I'm trying to update this patch for 2017 as I have the same issue as the author in that I can't use the KVM virtual keyboard and a physical keyboard at the same time: https://patchew.org/Seabios/20171215100946.58298-1-stef.van...@prodrive-technologies.com/ I have implemented a linked list as recommended but this has not worked as> expected. How can this be tested? Assuming I have not made an obvious mistake, I think maybe this patch is not working because I'm using the wrong malloc. Which one should I be using? Thanks for your help. Thank you for working on this. I think it’d be better if you send the patch inline maybe using `git format-patch` and `git send-email`, which might be better for discussion this on the list. Kind regards, Paul ___ SeaBIOS mailing list -- seabios@seabios.org To unsubscribe send an email to seabios-le...@seabios.org