Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 15 Apr 95 19:48 CDT
From:      uhclem@nemesis.lonestar.org (Frank Durda IV)
To:        freebsd-current@FreeBSD.org, davidg@Root.COM
Cc:        uhclem@nemesis.lonestar.org
Subject:   Re: Memory init pattern 
Message-ID:  <m0s0IWA-0004vvC@nemesis.lonestar.org>

next in thread | raw e-mail | index | archive | help
[3]David Greenman <davidg@Root.COM> writes:
[3]   If we cared about religious concerns, we wouldn't be using the "daemon"
[3]mascott.

Yeah, but why add potential fuel?  The prime goal (I am told) is to try to
improve the standing of FreeBSD, and a microscopic change like this
will just eliminate any potential ill will that might result.


[3]   There is already substantial precedence of 0xdeadbeef in the kernel.
[3]It is the value used by the memory allocator to fill memory with when
[3]using options DIAGNOSTIC in the kernel - for the same purpose we're
[3]proposing here. I'd prefer to continue using this value as it is easily
[3]identified in trap/panic and other diagnostic messages (as well as
[3]easily spotted in the debugger).

Already in use doesn't mean "perfect and can't be better" way to do
things.  Since this did cause even Microsoft PR problems, it seems
silly to not avoid the same mistake if it costs nothing. 

Hey, I'm not suggesting filling memory with zeros or all "U"s (ala WATFIV),
just pick something that doesn't mean anything in any language or culture.
Save the FreeBSD PR people some headaches later.  (I agree - we do have
enough controversy now just with the daemon logo unfortunately.)


[2]What has happened more recently is that TI has been suing computer
[2]makers for performing power-on diagnostics and the memory test
[2](not the initialization) was considered to be one of them.  That is

[3]   Operating system startup memory tests have been done for longer
[3]than TI has been in business (even late 60's DEC machines did this).


True, but since nobody bothered to publish any papers on something
that seemed obvious, TI was able to come on in in the late '70s and
patent it.  Just like DEC got a patent on circular queues and ring
buffers in 1983 which were in use how much earlier?  Yet another reason
why software-related patents are a bad idea.

The original point of this was to explain why some BIOSes out there
neglect to do a good memory test and/or fully prime the parity bits. 
A reason above and beyond the usual "they were cheap and/or in a hurry".


[2>Also, any pattern written must be unique across adjacent two 32-bit
[2]values.  In other words, don't write 0x12345678 and in the next 32 bits
[2]write 0x12345678.  You are setting yourself up for ghosting in 64/32-bit

[3]I disagree. We're not trying to use this to size memory.

That is true.  However if you don't have accurate size information,
using a proper pattern will detect that, or will detect a gap that
perhaps the BIOS didn't notice.   We probably don't care about picking
64 bytes out here and there like the more desperate DOS memory managers
are though. 

By the way, I have seen no description of how FreeBSD uses PC memory, ie
what 0-640K gets used for, does the kernel load there or higher,
is the kernel relocated, etc.  Is there a paper on this?


[3]What we're proposing is filling memory with a known pattern as a
[3]diagnostic aid in finding usage of uninitialized memory.

Fine.  I still Strongly recommend picking something that doesn't mean
anything or is otherwise harmless in meaning, such as 0xbad1bad2.
Still easy to spot or search for - and no one can complain.


By the way, Tandy accidentally left the message "Hello there you rummy
buzzard" in an unallocated sector on one of its distribution disks about
ten years ago.  (It was the deleted contents of a test file.  On the
master disk???  Yes.)  Here in the USA that phrase is nonsense.  But
someone in the UK came across the sector with a disk zapper, mentioned the
message he found in the letters column some UK magazine and Tandy was
immediately flooded with letters and boycotts from people all over the UK
who were highly offended by this phrase being on a computer disk even
though they couldn't see it with any of the included tools.  Most of these
letters came from people who didn't even own a computer or that model.
I rest my case.   :-)

(To anyone reading the above in the UK - I apologize.)


Frank Durda IV <uhclem@nemesis.lonestar.org>|"The Knights who say "LETNi"
or  uhclem%nemesis@trsvax.ast.com (Internet)| demand...  A SEGMENT REGISTER!!!"
...letni!rwsys!nemesis!uhclem               |"A what?"
...decvax!trsvax.fw.ast.com!nemesis!uhclem  |"LETNi! LETNi! LETNi!"  - 1983




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?m0s0IWA-0004vvC>