From 0b46a85e47873c75137128bc54411214f886368f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Axel=20D=C3=B6rfler?= Date: Thu, 22 Apr 2010 12:12:32 +0000 Subject: [PATCH] * Added missing definitions to support the concept of physical vs. logical block sizes. git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@36411 a95241bf-73f2-0310-859d-f6bbb57e9c96 --- .../kernel/bus_managers/ata/ATAInfoblock.h | 30 +++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) diff --git a/src/add-ons/kernel/bus_managers/ata/ATAInfoblock.h b/src/add-ons/kernel/bus_managers/ata/ATAInfoblock.h index 51c9ca5d9d..341a307c57 100644 --- a/src/add-ons/kernel/bus_managers/ata/ATAInfoblock.h +++ b/src/add-ons/kernel/bus_managers/ata/ATAInfoblock.h @@ -1,12 +1,15 @@ /* + * Copyright 2010, Michael Lotz, mmlr@mlotz.ch. * Copyright 2009, Michael Lotz, mmlr@mlotz.ch. * Distributed under the terms of the MIT License. */ #ifndef ATA_INFOBLOCK_H #define ATA_INFOBLOCK_H + #include + #define ATA_WORD_0_ATA_DEVICE 0 #define ATA_WORD_0_ATAPI_DEVICE 2 #define ATA_WORD_0_CFA_MAGIC 0x848a @@ -291,7 +294,22 @@ typedef struct ata_device_infoblock { uint16 word_95_99_reserved[5]; uint64 lba48_sector_count; - uint16 word_104_126_reserved[23]; + uint16 word_104_105_reserved[2]; + + LBITFIELD6( + logical_sectors_per_physical_sector : 4, // 2^x exponent + word_106_bit_4_11_reserved : 8, + logical_sector_not_512_bytes : 1, + multiple_logical_per_physical_sectors : 1, + word_106_bit_14_one : 1, + word_106_bit_15_zero : 1 + ); + + uint16 word_107_116_reserved[10]; + + uint32 logical_sector_size; // in words, see 106 + + uint16 word_119_126_reserved[8]; LBITFIELD2( removable_media_status_supported_2 : 2, // 1 = supported @@ -322,7 +340,15 @@ typedef struct ata_device_infoblock { uint16 word_161_175_reserved_compact_flash_assoc[15]; uint16 current_media_serial_number[30]; - uint16 word_206_254_reserved[49]; + uint16 word_206_208_reserved[3]; + + LBITFIELD3( + logical_sector_offset : 14, + word_209_bit_14_one : 1, + word_209_bit_15_zero : 1 + ); + + uint16 word_210_254_reserved[45]; LBITFIELD2( signature : 8,