public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Joey Oravec <joravec@drewtech.com>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] FAT mbr on MMC or SD cards
Date: Mon, 18 Jun 2007 09:51:56 -0400	[thread overview]
Message-ID: <f562m3$pe6$1@sea.gmane.org> (raw)
In-Reply-To: 1182164674.15090.54.camel@Apollo

"Heiko Schocher" <hs@denx.de> wrote in message 
news:1182164674.15090.54.camel at Apollo...
> I am not sure if we can use EB:xx:90 or E9:xx:xx (Am I right, this is
> the "Jump instruction to boot code" on a PBR?) for deciding between
> a MBR and a VBR, because the First 446 Bytes from a MBR are only
> "Bootcode", whatever this means, and maybe there is a MBR with
> EB:xx:90 or E9:xx:xx in the First 3 Bytes ...

Correct, the Microsoft document says the beginning of a VBR will always be 
"a 3-byte intel x86 unconditional branch (jump) instruction that jumps to 
the start of the operating system bootstrap code". It says either form is 
acceptable but 0xEB is used more frequently.

None of the common MBRs start with a jump 
(http://mirror.href.com/thestarman/asm/mbr/), so it seems like a pretty 
decent heuristic.

Linux-2.6.20 in fs/partitions/msdos.c has a function msdos_partition() that 
checks for the 0xAA55 signature and a 0x80 active or 0x00 inactive boot 
indicator for each partition in the table. I'm not sure if that technique is 
any better or worse.

-joey 

  reply	other threads:[~2007-06-18 13:51 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <20070613212533.EA32A353B6D@atlas.denx.de>
2007-06-18 11:04 ` [U-Boot-Users] FAT mbr on MMC or SD cards Heiko Schocher
2007-06-18 13:51   ` Joey Oravec [this message]
2007-06-13 15:54 Joey Oravec
2007-06-13 18:41 ` Wolfgang Denk
2007-06-13 20:59   ` Joey Oravec

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='f562m3$pe6$1@sea.gmane.org' \
    --to=joravec@drewtech.com \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox