Re: [Qemu-devel] Memory on stellaris board

2016-03-11 Thread Peter Maydell
On 11 March 2016 at 21:12, Aurelio Remonda wrote: > I don't quite understand what you mean with non-round-number, are you > suggesting > we only accept for example: > 64K-128K-256K-512K-1024k(or 1M)-2048K(or 2M) > 4096K(or 4M)-8192K(or 8M)-16384K(or 16M) > If that's the case we will never have, f

Re: [Qemu-devel] Memory on stellaris board

2016-03-11 Thread Aurelio Remonda
I don't quite understand what you mean with non-round-number, are you suggesting we only accept for example: 64K-128K-256K-512K-1024k(or 1M)-2048K(or 2M) 4096K(or 4M)-8192K(or 8M)-16384K(or 16M) If that's the case we will never have, for example, the exact default dc0 value (0x00ff007f) because you

Re: [Qemu-devel] Memory on stellaris board

2016-03-09 Thread Peter Maydell
On 10 March 2016 at 07:23, Aurelio Remonda wrote: > > El 9 mar. 2016 8:25 PM, "Peter Maydell" escribió: >> You should reject unworkable ram sizes rather than silently >> changing what the user asked for; this matches our preferred >> approach where the user asks for more RAM than the board >> can

Re: [Qemu-devel] Memory on stellaris board

2016-03-09 Thread Aurelio Remonda
El 9 mar. 2016 8:25 PM, "Peter Maydell" escribió: > > On 10 March 2016 at 03:56, Aurelio Remonda > wrote: > > > > > > On Mon, Mar 7, 2016 at 8:37 PM, Peter Maydell > > wrote: > >> > >> On 8 March 2016 at 02:58, Aurelio Remonda > >> wrote: > >> > Hello, sorry for taking so long, I am working on

Re: [Qemu-devel] Memory on stellaris board

2016-03-09 Thread Peter Maydell
On 10 March 2016 at 03:56, Aurelio Remonda wrote: > > > On Mon, Mar 7, 2016 at 8:37 PM, Peter Maydell > wrote: >> >> On 8 March 2016 at 02:58, Aurelio Remonda >> wrote: >> > Hello, sorry for taking so long, I am working on this again. >> > About your last response, I was looking at the struct >>

Re: [Qemu-devel] Memory on stellaris board

2016-03-09 Thread Aurelio Remonda
On Mon, Mar 7, 2016 at 8:37 PM, Peter Maydell wrote: > > On 8 March 2016 at 02:58, Aurelio Remonda > wrote: > > Hello, sorry for taking so long, I am working on this again. > > About your last response, I was looking at the struct stellaris_board_info > > ,which contains > > dc0, and this entire

Re: [Qemu-devel] Memory on stellaris board

2016-03-07 Thread Peter Maydell
On 8 March 2016 at 02:58, Aurelio Remonda wrote: > Hello, sorry for taking so long, I am working on this again. > About your last response, I was looking at the struct stellaris_board_info > ,which contains > dc0, and this entire struct is const. If we need to calculate dc0 based on > the provided

Re: [Qemu-devel] Memory on stellaris board

2016-03-07 Thread Aurelio Remonda
On Thu, Feb 11, 2016 at 10:01 AM, Peter Maydell wrote: > On 11 February 2016 at 12:46, Aurelio Remonda > wrote: > > On Fri, Feb 5, 2016 at 2:00 PM, Peter Maydell > wrote: > >> The right way to do this is to set the MachineClass default_ram_size > >> to what you want your default value to be. Th

Re: [Qemu-devel] Memory on stellaris board

2016-02-11 Thread Peter Maydell
On 11 February 2016 at 12:46, Aurelio Remonda wrote: > On Fri, Feb 5, 2016 at 2:00 PM, Peter Maydell > wrote: >> 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 gue

Re: [Qemu-devel] Memory on stellaris board

2016-02-11 Thread Aurelio Remonda
On Fri, Feb 5, 2016 at 2:00 PM, Peter Maydell wrote: > On 5 February 2016 at 16:55, Aurelio Remonda > wrote: >> Im making something like this: >> >> if (ram_size == 0x800) /* default value, means whitout -m flag */ >>{ >> sram_size = ((board->dc0 >> 18) + * 1024; >> } >> el

Re: [Qemu-devel] Memory on stellaris board

2016-02-05 Thread Peter Maydell
On 5 February 2016 at 16:55, Aurelio Remonda wrote: > Im making something like this: > > if (ram_size == 0x800) /* default value, means whitout -m flag */ >{ > sram_size = ((board->dc0 >> 18) + * 1024; > } > else if (ram_size >= UINT_MAX) /* more than 4GB */ > sram_size =

Re: [Qemu-devel] Memory on stellaris board

2016-02-05 Thread Aurelio Remonda
El 5 feb. 2016 1:24 PM, "Peter Maydell" escribió: > On 5 February 2016 at 16:09, Aurelio Remonda > wrote: > > Hello, im working on this feature right now. > > i have a working patch but maybe I can make some changes to make it look > better: > > for example in some point i check ram_size like th

Re: [Qemu-devel] Memory on stellaris board

2016-02-05 Thread Peter Maydell
On 5 February 2016 at 16:09, Aurelio Remonda wrote: > Hello, im working on this feature right now. > i have a working patch but maybe I can make some changes to make it look > better: > for example in some point i check ram_size like this: > if (ram_size == 0x800) > Maybe if i make ram_addr_t

Re: [Qemu-devel] Memory on stellaris board

2016-02-05 Thread Aurelio Remonda
Hello, im working on this feature right now. i have a working patch but maybe I can make some changes to make it look better: for example in some point i check ram_size like this: if (ram_size == 0x800) Maybe if i make ram_addr_t default_ram_size global (is a local variable of set_memory_option

Re: [Qemu-devel] Memory on stellaris board

2016-02-03 Thread Aurelio Remonda
On Wed, Feb 3, 2016 at 10:34 AM, Peter Maydell wrote: > On 3 February 2016 at 13:00, Aurelio Remonda > wrote: >> Hello, i was trying to understand how does the sram and flash size >> works on lm3s6965evb, i found a hardcoded 0x00ff007f as dc0 value and >> how flash_size and sram_size are calculat

Re: [Qemu-devel] Memory on stellaris board

2016-02-03 Thread Peter Maydell
On 3 February 2016 at 13:00, Aurelio Remonda wrote: > Hello, i was trying to understand how does the sram and flash size > works on lm3s6965evb, i found a hardcoded 0x00ff007f as dc0 value and > how flash_size and sram_size are calculated based on that hexadecimal. > I mean this: > > flash_size =

[Qemu-devel] Memory on stellaris board

2016-02-03 Thread Aurelio Remonda
Hello, i was trying to understand how does the sram and flash size works on lm3s6965evb, i found a hardcoded 0x00ff007f as dc0 value and how flash_size and sram_size are calculated based on that hexadecimal. I mean this: flash_size = (((board->dc0 & 0x) + 1) << 1) * 1024; sram_size = ((board->