Re: Stupid cache question.
From: Ed Beroset (beroset_at_mindspring.com)
Date: 10/07/04
- Next message: InGenius People: "Deveice Driver Developer Ottawa"
- Previous message: Antonio: "Re: anyone interested in a standalone car mp3 player ?"
- In reply to: CBFalconer: "Re: Stupid cache question."
- Next in thread: Stan Katz: "Re: Stupid cache question."
- Reply: Stan Katz: "Re: Stupid cache question."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 07 Oct 2004 17:57:18 GMT
CBFalconer wrote:
> Neil Bradley wrote:
>
>>"Jim Stewart" <jstewart@jkmicro.com> wrote in message
>>
>>
>>>Has anyone ever tried to use a processer with
>>>on-board data cache without any ram, using the
>>>cache as the ram?
>>
>>This is how modern day Pentium based BIOSes work. They have the
>>ability to turn cache into real RAM - sure beats trying to do
>>memory sizing with no memory or stack!
>
> Tell us more, including how to do it.
I sure don't know how to do such a thing (explicitly use cache as RAM),
but programming without using RAM at all is certainly possible. On the
x86 platforms, for example, you can simulate subroutine calls by JMPing
directly to the "subroutine" after storing the return address in a
register, say EBX. Such a call would look something like this:
; simulated subroutine call
lea ebx, over ; load effective address of "over" label
jmp psuedosubr ; jmp to the pseudo-subroutine
over:
nop ; code continues
; simulated subroutine body
; obviously, there is no stack frame
nop ; do stuff
; ...
jmp [ebx] ; return from pseudo-subroutine
This avoids using RAM, but maintains some semblance of organization to
the code. It's probably pretty obvious how you could wrap all of this
into macros, and if we wanted to get really tricky, we might be able to
use another register (or bit of another register) to tell us whether
we're in psuedo-subroutine or real-subroutine mode and execute the
correct return accordingly. I doubt that would be worth much, though,
given any reasonable amount of ROM and RAM. The only purpose I know of
for such code is running before the memory hardware is set up to be
usable and/or if the requirement is to do RAM testing and diagnostics
before using the RAM. I don't think there's much sense in actually
building a completely RAM-less system.
Ed
- Next message: InGenius People: "Deveice Driver Developer Ottawa"
- Previous message: Antonio: "Re: anyone interested in a standalone car mp3 player ?"
- In reply to: CBFalconer: "Re: Stupid cache question."
- Next in thread: Stan Katz: "Re: Stupid cache question."
- Reply: Stan Katz: "Re: Stupid cache question."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|