[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] Memory on stellaris board
From: |
Aurelio Remonda |
Subject: |
Re: [Qemu-devel] Memory on stellaris board |
Date: |
Thu, 11 Feb 2016 09:46:29 -0300 |
On Fri, Feb 5, 2016 at 2:00 PM, Peter Maydell <address@hidden> wrote:
> On 5 February 2016 at 16:55, Aurelio Remonda
> <address@hidden> wrote:
>> Im making something like this:
>>
>> if (ram_size == 0x8000000) /* default value, means whitout -m flag */
>> {
>> sram_size = ((board->dc0 >> 18) + * 1024;
>> }
>> else if (ram_size >= UINT_MAX) /* more than 4GB */
>> sram_size = UINT_MAX;
>> else
>> sram_size = ram_size
>>
>> So in case someone does not use the -m flag i want to be sure the ram is
>> calculated like it was before.
>
> The right way to do this is to set the MachineClass default_ram_size
> to what you want your default value to be. Then you should calculate
> the dc0 etc values to expose to the guest based on the ram size
> (which might be the default or might be user specified).
But stellaris board has a hardcoded dc0 value, when you place the -m flag
with for example 256M you shouldn't calculate any sram_size from dc0, you
just assign that as your ram size.
> If the user asks for a value that you can't handle (eg it is too big)
> then you should report the problem (via error_report()) and exit.
Fair enough.
Thank you!
--
Aurelio Remonda
Software Engineer
San Lorenzo 47, 3rd Floor, Office 5
Córdoba, Argentina
Phone: +54-351-4217888 / 4218211
- [Qemu-devel] Memory on stellaris board, Aurelio Remonda, 2016/02/03
- Re: [Qemu-devel] Memory on stellaris board, Peter Maydell, 2016/02/03
- Re: [Qemu-devel] Memory on stellaris board, Aurelio Remonda, 2016/02/03
- Re: [Qemu-devel] Memory on stellaris board, Aurelio Remonda, 2016/02/05
- Re: [Qemu-devel] Memory on stellaris board, Peter Maydell, 2016/02/05
- Re: [Qemu-devel] Memory on stellaris board, Aurelio Remonda, 2016/02/05
- Re: [Qemu-devel] Memory on stellaris board, Peter Maydell, 2016/02/05
- Re: [Qemu-devel] Memory on stellaris board,
Aurelio Remonda <=
- Re: [Qemu-devel] Memory on stellaris board, Peter Maydell, 2016/02/11