From nobody Fri Dec 27 03:44:54 2024 Delivered-To: importer@patchew.org Received-SPF: none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) client-ip=198.145.21.10; envelope-from=edk2-devel-bounces@lists.01.org; helo=ml01.01.org; Authentication-Results: mx.zohomail.com; spf=none (zoho.com: 198.145.21.10 is neither permitted nor denied by domain of lists.01.org) smtp.mailfrom=edk2-devel-bounces@lists.01.org Return-Path: Received: from ml01.01.org (ml01.01.org [198.145.21.10]) by mx.zohomail.com with SMTPS id 1503253166632590.3496663231413; Sun, 20 Aug 2017 11:19:26 -0700 (PDT) Received: from [127.0.0.1] (localhost [IPv6:::1]) by ml01.01.org (Postfix) with ESMTP id 78F2521D18254; Sun, 20 Aug 2017 11:16:52 -0700 (PDT) Received: from mail.zytor.com (terminus.zytor.com [65.50.211.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id A6A372095DFF6 for ; Sun, 20 Aug 2017 11:16:50 -0700 (PDT) Received: from localhost.localdomain ([IPv6:2804:7f4:c480:955b:0:0:0:2]) (authenticated bits=0) by mail.zytor.com (8.15.2/8.15.2) with ESMTPSA id v7KIGt0d023554 (version=TLSv1.2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128 verify=NO); Sun, 20 Aug 2017 11:17:03 -0700 X-Original-To: edk2-devel@lists.01.org From: Paulo Alcantara To: edk2-devel@lists.01.org Date: Sun, 20 Aug 2017 15:15:52 -0300 Message-Id: <20170820181557.28761-2-pcacjr@zytor.com> X-Mailer: git-send-email 2.11.0 In-Reply-To: <20170820181557.28761-1-pcacjr@zytor.com> References: <20170820181557.28761-1-pcacjr@zytor.com> Subject: [edk2] [PATCH v2 1/6] MdePkg: Add UDF volume structure definitions X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Michael D Kinney , Laszlo Ersek , Liming Gao MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Errors-To: edk2-devel-bounces@lists.01.org Sender: "edk2-devel" X-ZohoMail: RSF_4 Z_629925259 SPT_0 Content-Type: text/plain; charset="utf-8" This patch adds basic volume structure definitions necessary to identify a valid UDF file system on a block device, as specified by OSTA Universal Disk Format Specification 2.60. Cc: Michael D Kinney Cc: Liming Gao Cc: Laszlo Ersek Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Paulo Alcantara --- MdePkg/Include/IndustryStandard/Udf.h | 60 +++++++++++++++++++++++++++++++= ++++ 1 file changed, 60 insertions(+) create mode 100644 MdePkg/Include/IndustryStandard/Udf.h diff --git a/MdePkg/Include/IndustryStandard/Udf.h b/MdePkg/Include/Industr= yStandard/Udf.h new file mode 100644 index 0000000000..a1f81fc769 --- /dev/null +++ b/MdePkg/Include/IndustryStandard/Udf.h @@ -0,0 +1,60 @@ +/** @file + OSTA Universal Disk Format (UDF) definition. + + Copyright (C) 2014-2017 Paulo Alcantara + + This program and the accompanying materials are licensed and made availa= ble + under the terms and conditions of the BSD License which accompanies this + distribution. The full text of the license may be found at + http://opensource.org/licenses/bsd-license.php + + THE PROGRAM IS DISTRIBUTED UNDER THE BSD LICENSE ON AN "AS IS" BASIS, WI= THOUT + WARRANTIES OR REPRESENTATIONS OF ANY KIND, EITHER EXPRESS OR IMPLIED. +**/ + +#ifndef _UDF_H_ +#define _UDF_H_ + +#define UDF_BEA_IDENTIFIER "BEA01" +#define UDF_NSR2_IDENTIFIER "NSR02" +#define UDF_NSR3_IDENTIFIER "NSR03" +#define UDF_TEA_IDENTIFIER "TEA01" + +#define UDF_LOGICAL_SECTOR_SHIFT 11 +#define UDF_LOGICAL_SECTOR_SIZE ((UINT64)(1ULL << UDF_LOGICAL_SECTOR_SHI= FT)) +#define UDF_VRS_START_OFFSET ((UINT64)(16ULL << UDF_LOGICAL_SECTOR_SH= IFT)) + +#define _GET_TAG_ID(_Pointer) \ + (((UDF_DESCRIPTOR_TAG *)(_Pointer))->TagIdentifier) + +#define IS_AVDP(_Pointer) \ + ((BOOLEAN)(_GET_TAG_ID (_Pointer) =3D=3D 2)) + +#pragma pack(1) + +typedef struct { + UINT16 TagIdentifier; + UINT16 DescriptorVersion; + UINT8 TagChecksum; + UINT8 Reserved; + UINT16 TagSerialNumber; + UINT16 DescriptorCRC; + UINT16 DescriptorCRCLength; + UINT32 TagLocation; +} UDF_DESCRIPTOR_TAG; + +typedef struct { + UINT32 ExtentLength; + UINT32 ExtentLocation; +} UDF_EXTENT_AD; + +typedef struct { + UDF_DESCRIPTOR_TAG DescriptorTag; + UDF_EXTENT_AD MainVolumeDescriptorSequenceExtent; + UDF_EXTENT_AD ReserveVolumeDescriptorSequenceExtent; + UINT8 Reserved[480]; +} UDF_ANCHOR_VOLUME_DESCRIPTOR_POINTER; + +#pragma pack() + +#endif --=20 2.11.0 _______________________________________________ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel