DragonFly BSD
DragonFly users List (threaded) for 2005-05
[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]

Re: locore.s' history?

From: Max Okumoto <okumoto@xxxxxxxx>
Date: Tue, 10 May 2005 09:57:52 -0700

Thomas E. Spanjaard wrote:
Zera William Holladay wrote:

Hi, I've been reading "Operating System Source Code Secrets Volume."  The
authors imply (I can't remember the exact quote) that locore has a
history.  Does anyone know where this name came from, or where it first
appeared?  My intuition tells me "locore" means low memory (as in old
magnetic core memory)?  Just curious.

"locore" means "low core", and core refers to the RAM which used to be magnetic drums. It was called "core memory" because it was closer to the processing hardware than the tapes, disks et al. It got this name due to the place in the memory address space where the code in this file got loaded: the lowermost part of RAM, address 0 usually. This was some requirement in the early days, although I'm not sure why.

        -- Thomas E. Spanjaard

Some of the older processors initialized the PC (program counter) to zero when reset. Thus people put the 'boot' code a location zero. Thus the firmware rom was initially mapped starting at location 0.

There was a hardware trick where writes to low memory was read mapped
to the boot firmware, and write mapped to ram.  The first thing the
boot code did was to copy itself to the same location.

	char	*mem = 0;
	for (int i = 0; i < size_of_rom; ++) {
		mem[i] = mem[i];


After the copy was done it would unmap the rom, and then would execute
out of 'fast ram'. (Roms in the past where really slow)

I think the 68k from motorola did that.


[Date Prev][Date Next]  [Thread Prev][Thread Next]  [Date Index][Thread Index]