Re: [PATCH v5 1/2] semihosting/arm-compat: replace heuristic for softmmu SYS_HEAPINFO

2022-02-21 Thread Alex Bennée
Peter Maydell writes: > On Mon, 21 Feb 2022 at 17:06, Alex Bennée wrote: >> >> >> Peter Maydell writes: >> >> > On Thu, 10 Feb 2022 at 11:30, Alex Bennée wrote: >> >> >> >> The previous numbers were a guess at best and rather arbitrary without >> >> taking into account anything that might be

Re: [PATCH v5 1/2] semihosting/arm-compat: replace heuristic for softmmu SYS_HEAPINFO

2022-02-21 Thread Peter Maydell
On Mon, 21 Feb 2022 at 17:06, Alex Bennée wrote: > > > Peter Maydell writes: > > > On Thu, 10 Feb 2022 at 11:30, Alex Bennée wrote: > >> > >> The previous numbers were a guess at best and rather arbitrary without > >> taking into account anything that might be loaded. Instead of using > >> guess

Re: [PATCH v5 1/2] semihosting/arm-compat: replace heuristic for softmmu SYS_HEAPINFO

2022-02-21 Thread Alex Bennée
Peter Maydell writes: > On Thu, 10 Feb 2022 at 11:30, Alex Bennée wrote: >> >> The previous numbers were a guess at best and rather arbitrary without >> taking into account anything that might be loaded. Instead of using >> guesses based on the state of registers implement a new function that:

Re: [PATCH v5 1/2] semihosting/arm-compat: replace heuristic for softmmu SYS_HEAPINFO

2022-02-15 Thread Peter Maydell
On Thu, 10 Feb 2022 at 11:30, Alex Bennée wrote: > > The previous numbers were a guess at best and rather arbitrary without > taking into account anything that might be loaded. Instead of using > guesses based on the state of registers implement a new function that: > > a) scans the MemoryRegions

Re: [PATCH v5 1/2] semihosting/arm-compat: replace heuristic for softmmu SYS_HEAPINFO

2022-02-12 Thread Peter Maydell
On Fri, 11 Feb 2022 at 16:18, Philippe Mathieu-Daudé wrote: > For user-mode, this patch makes sense. For system-mode it is > not obvious to make sense of SYS_HEAPINFO (except focusing in > cores targeting embedded systems eventually). The main user of semihosting in system mode is standalone bina

Re: [PATCH v5 1/2] semihosting/arm-compat: replace heuristic for softmmu SYS_HEAPINFO

2022-02-11 Thread Philippe Mathieu-Daudé via
On 11/2/22 14:22, Alex Bennée wrote: Peter Maydell writes: On Thu, 10 Feb 2022 at 11:48, Philippe Mathieu-Daudé wrote: Hi Alex, On 10/2/22 12:30, Alex Bennée wrote: The previous numbers were a guess at best and rather arbitrary without taking into account anything that might be loaded. I

Re: [PATCH v5 1/2] semihosting/arm-compat: replace heuristic for softmmu SYS_HEAPINFO

2022-02-11 Thread Alex Bennée
Peter Maydell writes: > On Thu, 10 Feb 2022 at 11:48, Philippe Mathieu-Daudé wrote: >> >> Hi Alex, >> >> On 10/2/22 12:30, Alex Bennée wrote: >> > The previous numbers were a guess at best and rather arbitrary without >> > taking into account anything that might be loaded. Instead of using >>

Re: [PATCH v5 1/2] semihosting/arm-compat: replace heuristic for softmmu SYS_HEAPINFO

2022-02-11 Thread Peter Maydell
On Thu, 10 Feb 2022 at 11:48, Philippe Mathieu-Daudé wrote: > > Hi Alex, > > On 10/2/22 12:30, Alex Bennée wrote: > > The previous numbers were a guess at best and rather arbitrary without > > taking into account anything that might be loaded. Instead of using > > guesses based on the state of reg

Re: [PATCH v5 1/2] semihosting/arm-compat: replace heuristic for softmmu SYS_HEAPINFO

2022-02-10 Thread Philippe Mathieu-Daudé via
Hi Alex, On 10/2/22 12:30, Alex Bennée wrote: The previous numbers were a guess at best and rather arbitrary without taking into account anything that might be loaded. Instead of using guesses based on the state of registers implement a new function that: a) scans the MemoryRegions for the la

[PATCH v5 1/2] semihosting/arm-compat: replace heuristic for softmmu SYS_HEAPINFO

2022-02-10 Thread Alex Bennée
The previous numbers were a guess at best and rather arbitrary without taking into account anything that might be loaded. Instead of using guesses based on the state of registers implement a new function that: a) scans the MemoryRegions for the largest RAM block b) iterates through all "ROM" blo