diff options
author | marius <marius@FreeBSD.org> | 2008-02-11 21:40:22 +0000 |
---|---|---|
committer | marius <marius@FreeBSD.org> | 2008-02-11 21:40:22 +0000 |
commit | e3f122733ae5a2ff4d38fe7d3a3da82749c22f68 (patch) | |
tree | 814f948cac37d67f157adf62c45a7df508264d4e /sys/sparc64/include | |
parent | dfed0500c5d7d73e1e6dc1ed19f08dd844e57a3a (diff) | |
download | FreeBSD-src-e3f122733ae5a2ff4d38fe7d3a3da82749c22f68.zip FreeBSD-src-e3f122733ae5a2ff4d38fe7d3a3da82749c22f68.tar.gz |
The Sun disk label only uses 16-bit fields for cylinders, heads and
sectors so the geometry of large IDE disks has to be adjusted. This
corresponds to what the OpenSolaris dad(7D) driver does except that
the latter only tweaks sectors and effectively limits the mediasize
to 128GB so the cylinders and heads fields won't ever overflow. Not
limiting the mediasize is a compromise between allowing to use Sun
disk label as far as possible and being able to use the entire disk
with another disk label.
This allows to use the full capacity of large IDE disks if they were
not labeled under (Open)Solaris (in both ways of the meaning).
MFC after: 2 weeks
Diffstat (limited to 'sys/sparc64/include')
-rw-r--r-- | sys/sparc64/include/md_var.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/sys/sparc64/include/md_var.h b/sys/sparc64/include/md_var.h index 34a3437..69c6d69 100644 --- a/sys/sparc64/include/md_var.h +++ b/sys/sparc64/include/md_var.h @@ -60,4 +60,17 @@ cpu_block_zero_t spitfire_block_zero; extern cpu_block_copy_t *cpu_block_copy; extern cpu_block_zero_t *cpu_block_zero; +/* + * Given that the Sun disk label only uses 16-bit fields for cylinders, + * heads and sectors we might need to adjust the geometry of large IDE + * disks. + * We have to have a knowledge that a device_t is a struct device * here + * to avoid including too many things from this file. + */ +struct disk; +struct device; +void sparc64_ad_firmware_geom_adjust(struct device *dev, struct disk *disk); +#define ad_firmware_geom_adjust(dev, dsk) \ + sparc64_ad_firmware_geom_adjust(dev, dsk) + #endif /* !_MACHINE_MD_VAR_H_ */ |