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: Alexandre IOOSS
Subject: Re: [PATCH] stm32vldiscovery: allow overriding of RAM size
Date: Tue, 4 Apr 2023 08:22:59 +0200
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.9.0

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.

Thanks,
--
Alexandre

Attachment: OpenPGP_signature
Description: OpenPGP digital signature


reply via email to

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