From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-pg1-f171.google.com (mail-pg1-f171.google.com [209.85.215.171]) by mx.groups.io with SMTP id smtpd.web11.4498.1623289396564132850 for ; Wed, 09 Jun 2021 18:43:16 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@gmail.com header.s=20161025 header.b=E4RvkDnv; spf=pass (domain: gmail.com, ip: 209.85.215.171, mailfrom: kuqin12@gmail.com) Received: by mail-pg1-f171.google.com with SMTP id i34so14807897pgl.9 for ; Wed, 09 Jun 2021 18:43:16 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IeE8YJftSeA/s8e5IX6x304iAn7sBxcjDj35uNqAoz0=; b=E4RvkDnvMTAaZOzeDXEYkj86zh5F+2ofRUHSxZIotW05m3ZOaYVIPsBXIpN2jOgXQb 7C8nRfzizao7A978IzmRFjRCEczs/IlqY0Z7IqgwLLq1y/lUOYpsKlqf9/Hs5xYGMeHg BJgtxrnLrer3MMPEiTV6ZABwSvNaHbIXYjAqyDsz6AxwKFPhRqW9ClS5y01F1t9dudhk Rp7rDzu2M1CmBhn7ikzr7Ih9amvjda9ZNXWIBG5jfXq8hpmqUE1BYTx//ApOTTb5efoZ 9120b5mTAGKFHwI7VbE81gkOFcTqXYrTZ7mGT0uRFKHtJxHcc6C9KSyGiXX0dQO+2ydS 1XAA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IeE8YJftSeA/s8e5IX6x304iAn7sBxcjDj35uNqAoz0=; b=Ss3uOmCueYq4h46vyjaqxQENFMcn4XvbYngnHF3xRhEIFcfHIWVqMA4yJw+OXvXn6z nZrwJPdA+b6lzgDurdpN94rSF6OIeiINa6DiWWFB2EX5O9+yT35+rR+RDWDHfE8NJt7/ LmHVQAlnCVttUqF8iHiI5R6rby1IXBART9I1fhy/6H+Cuh9sx9NCVm9O/9F0/hJwCCkU acRwYCbg1HbaZKsssrEI1JocDLCknEAuCrxULsoYZclgSHlEyE8LV/fF45VF+0fhVja/ NxyEQTDJvhdu2uH1KPAK+LpZ5dtNi3sYtDc1tJCeGakOVjGnocTjix+WcgCEoeTxIvhv akUQ== X-Gm-Message-State: AOAM531QqZDjv+PoFgXblaj58yrIX+fb2FSCXLi1LtlGybHh6rnN0INv sq/fsR+S8WpR06gJb/XLBiFpXrd3xUhWYQ== X-Google-Smtp-Source: ABdhPJzuGniuWHa4//qHpcXeDcgNzFl21kqIy384r2qIC5lKkkOnWNaljIr1Oj0NdDRwCqRfd5Yjpg== X-Received: by 2002:a05:6a00:15d4:b029:2ea:75b:60f5 with SMTP id o20-20020a056a0015d4b02902ea075b60f5mr627352pfu.4.1623289395958; Wed, 09 Jun 2021 18:43:15 -0700 (PDT) Return-Path: Received: from localhost.localdomain ([50.35.88.161]) by smtp.gmail.com with ESMTPSA id p20sm624990pff.204.2021.06.09.18.43.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 09 Jun 2021 18:43:15 -0700 (PDT) From: "Kun Qin" To: devel@edk2.groups.io Cc: Michael D Kinney , Liming Gao , Zhiguang Liu Subject: [PATCH v1 5/5] MdePkg: MmCommunication: Extend MessageLength field size to UINT64 Date: Wed, 9 Jun 2021 18:42:59 -0700 Message-Id: <20210610014259.1151-6-kuqin12@gmail.com> X-Mailer: git-send-email 2.31.1.windows.1 In-Reply-To: <20210610014259.1151-1-kuqin12@gmail.com> References: <20210610014259.1151-1-kuqin12@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3398 REF: https://bugzilla.tianocore.org/show_bug.cgi?id=3430 The MessageLength field of EFI_MM_COMMUNICATE_HEADER, as a generic definition, could be used for both PEI and DXE MM communication. On a system that supports PEI MM launch, but operates PEI in 32bit mode and MM foundation in 64bit, the current EFI_MM_COMMUNICATE_HEADER definition will cause structure parse error due to UINTN used. This change removes the architecture dependent field by extending this field definition as UINT64. Cc: Michael D Kinney Cc: Liming Gao Cc: Zhiguang Liu Signed-off-by: Kun Qin --- MdePkg/Include/Protocol/MmCommunication.h | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/MdePkg/Include/Protocol/MmCommunication.h b/MdePkg/Include/Protocol/MmCommunication.h index 34c3e2b5a9e3..24d88d3e0b68 100644 --- a/MdePkg/Include/Protocol/MmCommunication.h +++ b/MdePkg/Include/Protocol/MmCommunication.h @@ -26,7 +26,8 @@ typedef struct { /// /// Describes the size of Data (in bytes) and does not include the size of the header. /// - UINTN MessageLength; + /// BZ3398: Make MessageLength the same size in EFI_MM_COMMUNICATE_HEADER for both IA32 and X64. + UINT64 MessageLength; /// /// Designates an array of bytes that is MessageLength in size. /// -- 2.31.1.windows.1