• Andrew Morton's avatar
    [PATCH] EDD: read disk80 MBR signature, export through edd module · e100952f
    Andrew Morton authored
    From: Matt Domsch <Matt_Domsch@dell.com>
    
    
    There are 4 bytes in the MSDOS master boot record, at offset 0x1b8,
    which may contain a per-system-unique signature.  By first writing a unique
    signature to each disk in the system, then rebooting, and then reading the
    MBR to get the signature for the boot disk (int13 dev 80h), userspace may
    use it to compare against disks it knows as named /dev/[hs]d[a-z], and thus
    determine which disk is the BIOS boot disk, thus where the /boot, / and
    boot loaders should be placed.
    
    This is useful in the case where the BIOS is not EDD3.0 compliant, thus
    doesn't provide the PCI bus/dev/fn and IDE/SCSI location of the boot disk,
    yet you need to know which disk is the boot disk.  It's most useful in OS
    installers.
    
    This patch retrieves the signature from the disk in setup.S, stores it in a
    space reserved in the empty_zero_page, copies it somewhere safe in setup.c,
    and exports it via /sys/firmware/edd/int13_disk80/mbr_signature in edd.c.
    Code is covered under CONFIG_EDD=[ym].
    e100952f
edd.h 4.76 KB