qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] stm32vldiscovery: allow overriding of RAM size


From: Lucas C. Villa Real
Subject: Re: [PATCH] stm32vldiscovery: allow overriding of RAM size
Date: Tue, 4 Apr 2023 13:39:23 -0300

On Tue, Apr 4, 2023 at 3:23 AM Alexandre IOOSS <erdnaxe@crans.org> wrote:
On 4/3/23 16:48, Lucas C. Villa Real wrote:
> On Mon, Apr 3, 2023 at 10:54 AM Peter Maydell <peter.maydell@linaro.org
> <mailto:peter.maydell@linaro.org>> wrote:
>
>     On Mon, 3 Apr 2023 at 13:51, Lucas Villa Real <lucasvr@gmail.com
>     <mailto:lucasvr@gmail.com>> wrote:
>      >
>      > stm32vldiscovery comes with 8KB of SRAM, which may be too low when
>      > running some workloads on QEMU. The command line argument "-m
>     mem_size"
>      > is not recognized by the current implementation, though, so one
>     cannot
>      > easily override the default memory size.
>      >
>      > This patch fixes that by adding a memory subregion according to the
>      > value provided on that command line argument. If absent, the default
>      > value of 8KB still applies.
>      >
>      > Signed-off-by: Lucas Villa Real <lucas@osdyne.com
>     <mailto:lucas@osdyne.com>>
>
>     Does the real hardware have (options for) more than 8K of SRAM here ?
>
>     thanks
>     -- PMM
>
>
> Yes, it's possible to add more (p)SRAM via the STM32F10xxx's FSMC
> (flexible static memory controller). The new memory is mapped to FSMC
> bank 1 at 0x6000_0000, though (as opposed to the embedded SRAM's fixed
> address at 0x2000_0000), as I have now realized. I'm happy to send an
> updated patch so that "-m mem_size" creates a memory subregion at
> 0x6000_0000 instead.
>
> Best regards,
> Lucas
>

Looking at the STM32F100xx reference manual page 494
(https://www.st.com/resource/en/reference_manual/rm0041-stm32f100xx-advanced-armbased-32bit-mcus-stmicroelectronics.pdf),
FSMC is only present on high-density value line devices only. This is
not the case of the STM32VLDISCOVERY which uses a STM32F100RB
(low/medium-density value line).

Correct me if I'm wrong, but I believe you cannot buy a STM32VLDISCOVERY
that could support FSMC or have more than 8KB of on-chip SRAM.

However, could it be a good idea to implement a generic STM32F100xx
machine in QEMU that is "high-density" by default and that could be
configured using command line options ? This could cover a wide range of
cases with a single machine.
 
Oh, you're right: FSMC is only featured on high-density STM32F100xx devices. Since I'm mostly dealing with QEMU (i.e., no real hardware) at this point in time I wasn't aware of that limitation. Thanks for the heads up.

Given that the current STM32 port doesn't implement many devices, I presume that adding support for a "high-density" machine would come down to making changes to the flash and register boundary addresses, mostly? If that's the case, then it makes sense to support such a generic machine. I've limited time to work on that, but I can give it a kick start and we can coordinate offline if that's OK with you.

Lucas






reply via email to

[Prev in Thread] Current Thread [Next in Thread]