public inbox for ecos-discuss@sourceware.org
 help / color / mirror / Atom feed
* RE: [ECOS] i386 Memory Size Problem, Bug 1000060
@ 2003-12-10 18:17 kevin_lemay
  2003-12-10 18:42 ` Nick Garnett
  0 siblings, 1 reply; 4+ messages in thread
From: kevin_lemay @ 2003-12-10 18:17 UTC (permalink / raw)
  To: nickg; +Cc: ecos-discuss

Nick,

I am really close to having this fixed. I have the new BIOS calls working to retrieve the BIOS memory map (e820), placing the data in the upper area of the 640K.

The problem now, is that some BIOS (including mine) actually use that area for an extended BIOS area. I am looking for a good location to store my 648 bytes. It works on my machine, but I am looking for a safe area to use lower in memory.

Does anyone have a memory map for how redboot uses ram on the i386 platform? It is not obvious from looking at the code.

Any help would be appreciated,

Kevin

-----Original Message-----
From: nickg@miso.calivar.com [mailto:nickg@miso.calivar.com]On Behalf Of
Nick Garnett
Sent: Wednesday, December 03, 2003 2:29 AM
To: LEMAY,KEVIN (A-Roseville,ex1)
Cc: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] i386 Memory Size Problem


<kevin_lemay@agilent.com> writes:

> It appears that Linux uses hard coded memory addresses to store the
> memory map and size, switches to protected mode and then accesses
> the saved data in ram.
> 
> I attempted to use this same method, but it does not appear to be
> running. I added new character outputs to the display during boot
> which do not appear. Any ideas on what I am doing wrong?

Maybe you have chosen some inconvenient addresses. Does the
application work if it does not access the saved memory sizes, just
uses the CMOS values? You mentioned previously that you were putting
the sizes at 1Mb and that it worked, what have you changed since then?
Make sure that your debug outputs are not corrupting things
themselves.

I'm not sure what else I can suggest.

-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com      The eCos and RedBoot experts


--
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] i386 Memory Size Problem, Bug 1000060
  2003-12-10 18:17 [ECOS] i386 Memory Size Problem, Bug 1000060 kevin_lemay
@ 2003-12-10 18:42 ` Nick Garnett
  0 siblings, 0 replies; 4+ messages in thread
From: Nick Garnett @ 2003-12-10 18:42 UTC (permalink / raw)
  To: kevin_lemay; +Cc: ecos-discuss

<kevin_lemay@agilent.com> writes:

> Nick,
> 
> I am really close to having this fixed. I have the new BIOS calls working to retrieve the BIOS memory map (e820), placing the data in the upper area of the 640K.
> 
> The problem now, is that some BIOS (including mine) actually use that area for an extended BIOS area. I am looking for a good location to store my 648 bytes. It works on my machine, but I am looking for a safe area to use lower in memory.
> 
> Does anyone have a memory map for how redboot uses ram on the i386 platform? It is not obvious from looking at the code.
> 
> Any help would be appreciated,
> 

From memory:

0x0000..0x1000  is left empty, in theory for so that the BIOS data in
                low memory can be accessed

0x1000..0x2000  contains the IDT, VSR table and virtual vector table

0x2000..0x3000  is where the SMP startup trampoline is placed for the
                secondary CPUs

0x3000          is where RedBoot actually starts


Your best bet is probably to put your data somewhere in the first 4k,
at 0x1c00 maybe.

-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com      The eCos and RedBoot experts


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [ECOS] i386 Memory Size Problem, Bug 1000060
  2003-12-10 20:54 kevin_lemay
@ 2003-12-11 15:30 ` Nick Garnett
  0 siblings, 0 replies; 4+ messages in thread
From: Nick Garnett @ 2003-12-11 15:30 UTC (permalink / raw)
  To: kevin_lemay; +Cc: ecos-discuss, jim_pickrell

<kevin_lemay@agilent.com> writes:

> Nick,
> 
> Everything works! I used 0x1d00 for the data since I found the
> virtual vector table at 0x1c00 in the .ld file.

Yep that should be OK.

> 
> These changes fix two problems.
> 
>   1. Find Extended memory > 64 Mb
>   2. If the BIOS uses some of the high addressed base memory. Do not make this available
>      for eCos by reporting a smaller memory size.
>
> Can you check the following files for me? (3 files, i386.ld, pcmb.inc, pcmb_misc.c)

That mostly looks fine. I would prefer to see i386_memory_Map be
called hal_i386_memory_map or even cyg_hal_i386_memory_map for
consistency. (And, yes, I know that idtStart doesn't obey the rules,
but we should at least make all new code conform, even if we've not
got round to fixing some of the old stuff yet :-).

The next thing to do is to put together a proper patch against the
current CVS repository. Take a look at the following page for all the
info you should need about submitting a patch.

http://sources.redhat.com/ecos/patches.html


These changes are large enough to need an assignment.


> 
> Can I close out my own bug on the tracking system?

I'll close it when we have an assigned patch we can commit.


-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com      The eCos and RedBoot experts


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

* RE: [ECOS] i386 Memory Size Problem, Bug 1000060
@ 2003-12-10 20:54 kevin_lemay
  2003-12-11 15:30 ` Nick Garnett
  0 siblings, 1 reply; 4+ messages in thread
From: kevin_lemay @ 2003-12-10 20:54 UTC (permalink / raw)
  To: nickg; +Cc: ecos-discuss, jim_pickrell

[-- Attachment #1: Type: text/plain, Size: 2761 bytes --]

Nick,

Everything works! I used 0x1d00 for the data since I found the virtual vector table at 0x1c00 in the .ld file.

These changes fix two problems.

  1. Find Extended memory > 64 Mb
  2. If the BIOS uses some of the high addressed base memory. Do not make this available
     for eCos by reporting a smaller memory size.

Can you check the following files for me? (3 files, i386.ld, pcmb.inc, pcmb_misc.c)

Can I close out my own bug on the tracking system?

Kevin

-----Original Message-----
From: ecos-discuss-owner@sources.redhat.com
[mailto:ecos-discuss-owner@sources.redhat.com]On Behalf Of LEMAY,KEVIN
(A-Roseville,ex1)
Sent: Wednesday, December 10, 2003 10:17 AM
To: nickg@ecoscentric.com
Cc: ecos-discuss@sources.redhat.com
Subject: RE: [ECOS] i386 Memory Size Problem, Bug 1000060


Nick,

I am really close to having this fixed. I have the new BIOS calls working to retrieve the BIOS memory map (e820), placing the data in the upper area of the 640K.

The problem now, is that some BIOS (including mine) actually use that area for an extended BIOS area. I am looking for a good location to store my 648 bytes. It works on my machine, but I am looking for a safe area to use lower in memory.

Does anyone have a memory map for how redboot uses ram on the i386 platform? It is not obvious from looking at the code.

Any help would be appreciated,

Kevin

-----Original Message-----
From: nickg@miso.calivar.com [mailto:nickg@miso.calivar.com]On Behalf Of
Nick Garnett
Sent: Wednesday, December 03, 2003 2:29 AM
To: LEMAY,KEVIN (A-Roseville,ex1)
Cc: ecos-discuss@sources.redhat.com
Subject: Re: [ECOS] i386 Memory Size Problem


<kevin_lemay@agilent.com> writes:

> It appears that Linux uses hard coded memory addresses to store the
> memory map and size, switches to protected mode and then accesses
> the saved data in ram.
> 
> I attempted to use this same method, but it does not appear to be
> running. I added new character outputs to the display during boot
> which do not appear. Any ideas on what I am doing wrong?

Maybe you have chosen some inconvenient addresses. Does the
application work if it does not access the saved memory sizes, just
uses the CMOS values? You mentioned previously that you were putting
the sizes at 1Mb and that it worked, what have you changed since then?
Make sure that your debug outputs are not corrupting things
themselves.

I'm not sure what else I can suggest.

-- 
Nick Garnett                    eCos Kernel Architect
http://www.ecoscentric.com      The eCos and RedBoot experts


-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss


[-- Attachment #2: bug_1000060.tar --]
[-- Type: application/x-tar, Size: 40960 bytes --]

[-- Attachment #3: Type: text/plain, Size: 146 bytes --]

-- 
Before posting, please read the FAQ: http://sources.redhat.com/fom/ecos
and search the list archive: http://sources.redhat.com/ml/ecos-discuss

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2003-12-11 14:38 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-12-10 18:17 [ECOS] i386 Memory Size Problem, Bug 1000060 kevin_lemay
2003-12-10 18:42 ` Nick Garnett
2003-12-10 20:54 kevin_lemay
2003-12-11 15:30 ` Nick Garnett

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).