Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Assembly x86 > Re: Bootloader ...
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 5 of 8 Topic 4633 of 4728
Post > Topic >>

Re: Bootloader & Kernel(C)

by Frank Kotler <spamtrap@[EMAIL PROTECTED] > Apr 29, 2008 at 03:34 AM

Frank Kotler wrote:
> Frank Kotler wrote:
> 
> ...
>> Let me look at that DMIDecode... Maybe it'll give me some ideas... 
>> Meantime, "don't give up" is good advice! :)
> 
> I take it back. "Give up!" :)
> 
> Seriously, what I see in this code opens "/dev/mem" and memmaps it. Not 
> suitable at all to load from a bootsector. We may be able to crib some 
> "magic numbers" from it... maybe some "text"... Has Linux "done 
> something" to put this stuff in "/dev/mem", or is it "just there" at 
> bootup?

Naw, it's "just there". This little dos .com file finds the stuff that 
DMIDecode apparently decodes...

org 100h

         mov ax, 0F000h
         mov ds, ax

         xor si, si

search:
         cmp dword [si], '_SM_'
         jz found
         add si, 16
         cmp si, 0FFF0h
         jnz search
notfound:
         ; complain
         jmp exit
found:
         mov ah, 0Eh
         mov bx, 7
         mov cx, 600h
show:
         lodsb
         cmp al, ' '
         jae okay
         mov al, '.'
okay:
         int 10h
         loop show
exit:
         ret

Perhaps you can beat that C code into something that can be loaded from 
your bootsector - how good are you at this? I think *I'd* find it easier 
to do it in asm, using the C code as a guideline - we're not going to 
need to mmap "/dev/mem"... And specs from here:

http://www.dmtf.org/standards/smbios/

Beginning to look more "tedious" than "hard". What do you actually need 
to do? Are you committed to a C kernel? Need the complete display that 
the C code gives us? Or do you just need certain information about the 
hardware?

Best,
Frank
 




 8 Posts in Topic:
Bootloader & Kernel(C)
"steward110" &  2008-04-27 02:09:20 
Re: Bootloader & Kernel(C)
"steward110" &  2008-04-28 06:46:03 
Re: Bootloader & Kernel(C)
Frank Kotler <spamtra  2008-04-28 18:11:15 
Re: Bootloader & Kernel(C)
Frank Kotler <spamtra  2008-04-28 19:18:12 
Re: Bootloader & Kernel(C)
Frank Kotler <spamtra  2008-04-29 03:34:42 
Re: Bootloader & Kernel(C)
"steward110" &  2008-04-28 22:59:13 
Re: Bootloader & Kernel(C)
Frank Kotler <spamtra  2008-04-29 09:40:14 
Re: Bootloader & Kernel(C)
"Rod Pemberton"  2008-04-28 22:10:31 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Thu Jul 24 0:24:17 CDT 2008.