From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-wm1-f68.google.com (mail-wm1-f68.google.com [209.85.128.68]) by mx.groups.io with SMTP id smtpd.web11.167.1573750506543994990 for ; Thu, 14 Nov 2019 08:55:06 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@akeo-ie.20150623.gappssmtp.com header.s=20150623 header.b=z+vxMYI2; spf=none, err=permanent DNS error (domain: akeo.ie, ip: 209.85.128.68, mailfrom: pete@akeo.ie) Received: by mail-wm1-f68.google.com with SMTP id 8so6718642wmo.0 for ; Thu, 14 Nov 2019 08:55:06 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=akeo-ie.20150623.gappssmtp.com; s=20150623; h=subject:to:cc:references:from:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=RtH6QPwhVjkOxhbYOj9BhOWz51csokvIzNgjV0Y73wk=; b=z+vxMYI2PjFUc4sUE3rl5q5R4BDf01yFeC63JW55oKPPKA1hsuIarGWWVQdkWBowZ9 4UgrEDwERrxHMHRibvrzltI3FOTLmw7yL5iakYt4xuU4CqxMCGMnUJDIFgi2frdBaU9X vTXux6+5iWLrRm+SUSbq1trVcGNy0kvw2UEG1o9pqPuTiSA7WjBHWPjjTN5Qf4ZUgBwX ofxCH1T2kdP1AtN2gJGAleJNBN6uD4yxxs9sGiUvEBVNG5C4orN5NYvkXIjrU7n/Tz9Z cDjJrAOXXEFQ1+Wroz3VbOZDjA/faV5vqEXKdvtXAfKKNPEFQeCVqrxa3afhXY0QQ+ST OqtA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:subject:to:cc:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=RtH6QPwhVjkOxhbYOj9BhOWz51csokvIzNgjV0Y73wk=; b=eYT94zekQQiG7+79nypMaHf9xQW0EQm34x3irrbQ/aP1/qB7XvgjSgU1yUAVS1iF6O bc2ogbiklfz7nTyoH+FK7Zb8HK786ymr8uqkw57t4HyrgHotLGDqe1n8xpWGB1AURC0Y XEz/yzMef5Qq7u3Aq0NJZ6DkBME6P4cSu1OWFGPPeA9+xNdXvJsKa+/WAkPuxJRhZx7r m61NsQ3V+nrC9jBjad3pyDVUlA5v7qvKkuhI253tEicQ45dNIwOcm8b1et0ojj+9zkD3 UG6NaP/pUoRm426pbKzhTaZNZFa8UZNP/IEt3Ifz3BG1iuHP1Jmy9XgwywRxKWnBArNj Vx8g== X-Gm-Message-State: APjAAAVsXQbIK6fAXCLUk5KPSKhdrE006rIh9utKFE8AfO2gDzWK8GlD zCmghP18exqsPlcDsR9FWSJXGw== X-Google-Smtp-Source: APXvYqyCQQ4wizIl1yYBzpsaSePwQdQjL2LXkBpH/ym7WKGthmQQ336Co9LomqhfI6Jb19pBiNQlHg== X-Received: by 2002:a1c:7f44:: with SMTP id a65mr8764918wmd.19.1573750504999; Thu, 14 Nov 2019 08:55:04 -0800 (PST) Return-Path: Received: from [10.0.0.122] ([84.203.67.47]) by smtp.googlemail.com with ESMTPSA id a8sm6449258wme.11.2019.11.14.08.55.03 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 14 Nov 2019 08:55:04 -0800 (PST) Subject: Re: [edk2-devel] [edk2-platforms][PATCH 1/8] Platform/RPi: Add model family detection To: Michael Brown , devel@edk2.groups.io Cc: ard.biesheuvel@linaro.org, leif.lindholm@linaro.org, philmd@redhat.com References: <20191114160740.10072-1-pete@akeo.ie> <20191114160740.10072-2-pete@akeo.ie> <93ee6d22-1482-7c57-64ce-9524d70612dc@ipxe.org> From: "Pete Batard" Message-ID: Date: Thu, 14 Nov 2019 16:55:01 +0000 User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64; rv:60.0) Gecko/20100101 Thunderbird/60.9.1 MIME-Version: 1.0 In-Reply-To: <93ee6d22-1482-7c57-64ce-9524d70612dc@ipxe.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-GB Content-Transfer-Encoding: 8bit Hi Michael, On 2019.11.14 16:36, Michael Brown wrote: > On 14/11/2019 16:07, Pete Batard wrote: >> +typedef >> +EFI_STATUS >> +(EFIAPI *GET_MODEL_FAMILY) ( >> +  UINT32 *ModelFamily >> +  ); >> + >>   typedef >>   EFI_STATUS >>   (EFIAPI *GET_FIRMWARE_REVISION) ( >> @@ -143,6 +150,7 @@ typedef struct { >>     GET_MODEL             GetModel; >>     GET_MODEL_REVISION    GetModelRevision; >>     GET_MODEL_NAME        GetModelName; >> +  GET_MODEL_FAMILY      GetModelFamily; >>     GET_FIRMWARE_REVISION GetFirmwareRevision; >>     GET_MANUFACTURER_NAME GetManufacturerName; >>     GET_CPU_NAME          GetCpuName; > > Is the RASPBERRY_PI_FIRMWARE_PROTOCOL structure expected to be > externally consumed at any point? I don't really expect so. And even if that becomes the case, I think the platform is still new enough at this stage not to expect anyone to run afoul of ABI breakage. > If so, then adding a field in the > middle of the structure without changing the associated GUID would break > the ABI. I guess we'll take that into consideration if we modify this structure again, so thanks for pointing it out. But for now, I would say that this concern is mostly irrelevant. > It's great to see the Pi 4 heading towards having UEFI support; I'm > looking forward to trying it out as soon as it's ready. Well, if you are that eager to look into it, you can already play with the 'pi4_dev1' branches we have for edk2-platforms and edk2-non-osi at https://github.com/pftf which is what we are currently working with (and what this patch series is based on). Right now, you should get video and you should also be able to run the UEFI Shell, but since we don't have xHCI, there's no USB support, so the only means of interacting with the firmware is through serial... Oh, and you must have the official Device Tree on your SD card when booting if you want the serial baudrate to be properly set to the expected 115200 bauds. On RPI4, it appears that the new VideoCore does read the Device Tree behind the scenes to perform some of its own init... If you build the firmware, a basic config.txt with the following should get you sorted: arm_64bit=1 enable_uart=1 core_freq=250 enable_gic=1 armstub=RPI_EFI.fd disable_commandline_tags=1 If you need more info, feel free to contact me off-list. Regards, /Pete > > Thanks, > > Michael