From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=134.134.136.31; helo=mga06.intel.com; envelope-from=liming.gao@intel.com; receiver=edk2-devel@lists.01.org Received: from mga06.intel.com (mga06.intel.com [134.134.136.31]) (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 697D5221ED76C for ; Mon, 25 Dec 2017 23:54:19 -0800 (PST) X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from orsmga007.jf.intel.com ([10.7.209.58]) by orsmga104.jf.intel.com with ESMTP/TLS/DHE-RSA-AES256-GCM-SHA384; 25 Dec 2017 23:59:13 -0800 X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.45,459,1508828400"; d="scan'208";a="5493154" Received: from shwde7172.ccr.corp.intel.com ([10.239.9.15]) by orsmga007.jf.intel.com with ESMTP; 25 Dec 2017 23:59:12 -0800 From: Liming Gao To: edk2-devel@lists.01.org Date: Tue, 26 Dec 2017 15:59:09 +0800 Message-Id: <1514275149-10652-1-git-send-email-liming.gao@intel.com> X-Mailer: git-send-email 2.8.0.windows.1 Subject: [Patch] BaseTools: Update SkuId checker to make sure it be valid UINT64 value X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 26 Dec 2017 07:54:19 -0000 Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Liming Gao Cc: Yonghong Zhu Cc: Signed-off-by: Bob Feng --- BaseTools/Source/Python/Common/Misc.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BaseTools/Source/Python/Common/Misc.py b/BaseTools/Source/Python/Common/Misc.py index 0374be0..f440008 100644 --- a/BaseTools/Source/Python/Common/Misc.py +++ b/BaseTools/Source/Python/Common/Misc.py @@ -2149,10 +2149,10 @@ class SkuClass(): for SkuName in SkuIds: SkuId = SkuIds[SkuName][0] skuid_num = int(SkuId,16) if SkuId.upper().startswith("0X") else int(SkuId) - if skuid_num > 0xFFFF: + if skuid_num > 0xFFFFFFFFFFFFFFFF: EdkLogger.error("build", PARAMETER_INVALID, - ExtraData = "SKU-ID [%s] must less than 65535" - % (SkuName)) + ExtraData = "SKU-ID [%s] value %s exceeds the max value of UINT64" + % (SkuName, SkuId)) self.AvailableSkuIds = sdict() self.SkuIdSet = [] -- 2.8.0.windows.1