9fans - fans of the OS Plan 9 from Bell Labs
 help / color / mirror / Atom feed
* [9fans] e820 scan from 9load
@ 2007-10-15 19:13 erik quanstrom
  0 siblings, 0 replies; only message in thread
From: erik quanstrom @ 2007-10-15 19:13 UTC (permalink / raw)
  To: 9fans

i had a need the other day to do an e820 scan from
a kernel without the plan 9 realmode business.  since
switching back to realmode seems a bit problematic,
and i have no need for realmode in the stuff i'm doing,
i wanted to do it before the switch to protected mode,
which happens in 9load.  so i added it to 9load's l.s.
(adventures in programming in machine language.)

l.s does the e820 calls to get the memory map and stuffs
them in a safeish place in low memory and stores the count
of records.  this is enough to avoid the 820 scan later
on.  the stuff in e820.c is not necessary.  it just exports
the memory ranges from the  e820 scan in a conf variable,
"e820" and optionally prints out the results of the scan.
(*e820print)

source is in /n/sources/contrib/quanstro/9loadaoe/
i don't know if you can rightly call real820.s "source",
but the meat of the operation is there.

enjoy.

- erik


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2007-10-15 19:13 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-10-15 19:13 [9fans] e820 scan from 9load erik quanstrom

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 NNTP newsgroup(s).