From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from NAM11-CO1-obe.outbound.protection.outlook.com (NAM11-CO1-obe.outbound.protection.outlook.com [40.107.220.60]) by mx.groups.io with SMTP id smtpd.web08.1764.1608056116112536696 for ; Tue, 15 Dec 2020 10:15:16 -0800 Authentication-Results: mx.groups.io; dkim=pass header.i=@vmware.com header.s=selector2 header.b=JCWzUxS5; spf=pass (domain: vmware.com, ip: 40.107.220.60, mailfrom: awarkentin@vmware.com) ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ahBBefZrLHDFauzSfKiGMUkAoaGVxR03wBvIuwOOWflTmax4dyVo0kCczTFc6yXziwdQWDJN1HzbMY29EPoUEgj+hc4SmcMXmgGQ2hHxFzCY4bILrdIdBgFloCgYGKPE2MY93+Hx/PTglnO1zhzjLHlp86lBLRxh7AvMMdps0P9hhOpb+fSAc9V4AMW0I+BabXxGqin7IbbJhCpxDapJA5PPoCd+WJ71VYq5MIBx9h/EobXDBbw6P5W0kcg6o7UOBtvkeqvIR6RsXYqw9lAbf36lnslBu6EHWq6Tse6NfNygw+SE/cg2mY81xrn5z95PPbMTT+sp2RdAHDPSyy0/Lw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qrHx+b3ZXkPiIhJB8ekC5zuDAcrZoM6Dv60DoPkwDzU=; b=b1VmI+MvgteNGapzI631VNgk9E/OTFMPLEbgnIbtQqFleHRhB6SNjn2V+fxQjX1OMIxWsUf3JS5vGsQheItTG5/JcRuJGad3MhykBeFu/OFEbB6gtkd71KAPOFWMyrRvb8BXuS0Pbo2nf6LsZHRa+gN2Lc3kUv7oL9Zp5HpNZgbsrNv7zDWIvGUKfDtQnvbjSeVGt0hoLXE1Gs8ZbN2iupIAjt9GXhlJOMptwQsPjPLhsxqTuiq4HePiOEhDGfzZauZr416rJNd97g4ocvDjUsXZwQRFLEVYIjt14sk4O+e9dEi4wv+z/DfZFup9Ma06EWK9g9KZxG2EqJ9MDZ3cmA== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=vmware.com; dmarc=pass action=none header.from=vmware.com; dkim=pass header.d=vmware.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=vmware.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=qrHx+b3ZXkPiIhJB8ekC5zuDAcrZoM6Dv60DoPkwDzU=; b=JCWzUxS5fXVidzEiKYIIfeN7A3IQxouHl+7ftnXV0RtbUNergNwvTN8FzObWd17Th43cYgkarnHkOAHmgcYEP2eeg9FOtK7WKsAKkaEtxyRtKB0cOvTDyFw0aZGpwcTLVF25/3jiVgCKMFq/d1k+rBFom1yCpYLHSHF4xI+5j68= Received: from SJ0PR05MB7580.namprd05.prod.outlook.com (2603:10b6:a03:2e0::24) by BYAPR05MB4374.namprd05.prod.outlook.com (2603:10b6:a02:f9::31) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.3676.12; Tue, 15 Dec 2020 18:15:14 +0000 Received: from SJ0PR05MB7580.namprd05.prod.outlook.com ([fe80::ad1c:9900:1bea:47cf]) by SJ0PR05MB7580.namprd05.prod.outlook.com ([fe80::ad1c:9900:1bea:47cf%6]) with mapi id 15.20.3654.025; Tue, 15 Dec 2020 18:15:14 +0000 From: "Andrei Warkentin" To: "devel@edk2.groups.io" , "jeremy.linton@arm.com" CC: "ard.biesheuvel@arm.com" , "leif@nuviainc.com" , "pete@akeo.ie" , "andrey.warkentin@gmail.com" , "samer.el-haj-mahmoud@arm.com" Subject: Re: [edk2-devel] [PATCH 1/7] Platform/RaspberryPi: Update VPU mailbox constants Thread-Topic: [edk2-devel] [PATCH 1/7] Platform/RaspberryPi: Update VPU mailbox constants Thread-Index: AQHW0nA0b+Wh3sA0GEq7lnlDBYntTan4d2Iz Date: Tue, 15 Dec 2020 18:15:14 +0000 Message-ID: References: <20201214232350.1192387-1-jeremy.linton@arm.com>,<20201214232350.1192387-2-jeremy.linton@arm.com> In-Reply-To: <20201214232350.1192387-2-jeremy.linton@arm.com> Accept-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: edk2.groups.io; dkim=none (message not signed) header.d=none;edk2.groups.io; dmarc=none action=none header.from=vmware.com; x-originating-ip: [98.214.99.181] x-ms-publictraffictype: Email x-ms-office365-filtering-correlation-id: 57c4c52e-707b-41bf-328b-08d8a1255e7c x-ms-traffictypediagnostic: BYAPR05MB4374: x-microsoft-antispam-prvs: x-ms-oob-tlc-oobclassifiers: OLM:2887; x-ms-exchange-senderadcheck: 1 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: lx+0hY+JXARylQbOdJAIx+T5R9WJ+erCTGz7xN+GzF2++q3Jkxyohsd+GRDwSHdrqIIkgSE9sl3ldRe0I+0H+kxYh7NKjmUWWzkG25qn2aB3yujKbt8asXuJdHeXZV5Vjz0KE8QBRJNOCozE1bXA1J+h6iknWYPAXJksM7CkwCTGpC79dw4RnFpdsaj8WO6AO+J/3KuoMnLwG0OpeOS/ke2hRTNsGIfChf3ewCFv4Lw2B2RHH9CJVaR59nKqn6nePwGi9uv4UtY2j/pCb6R74SKXUbRepWhdCM8yHFshTwoBHE1beb3XCJPTFx0zfwdJLPqtItrKcQ7BWwISkG7ajFsxxBxW/UPg0o3+S0D1NmUQ6z7GFQXaJpfhe4hnNFkiAUmj8pOiPDB2vWUTFDY1F7k2XHji0Xao/ZMjQNq7kO8YXDyPDauNuwd2JIlQy6i/qUWbAq2LShv8JzcQzlrR4Q== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:SJ0PR05MB7580.namprd05.prod.outlook.com;PTR:;CAT:NONE;SFS:(4636009)(136003)(376002)(346002)(39860400002)(366004)(396003)(86362001)(26005)(66556008)(4326008)(8676002)(64756008)(7696005)(76116006)(54906003)(110136005)(71200400001)(33656002)(66476007)(91956017)(2906002)(316002)(5660300002)(55016002)(166002)(966005)(9686003)(52536014)(15650500001)(66446008)(66946007)(53546011)(6506007)(83380400001)(186003)(19627405001)(478600001)(8936002)(45080400002);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata: =?us-ascii?Q?F4elhbIglukAN3yExhP6KxWnZkv9Zn8kvC8wE6PPiR6rZRlHpedWw9y4b60f?= =?us-ascii?Q?2SRFWzKemybypNIFGxEdc4OSmktauSSnuDakO4jhmXAfY+vk84xMdVwfJAgM?= =?us-ascii?Q?dqoKkH2DNQTyEPcF1lj+bDTAdQ2OMj1rz0K0ri6Ke6A7gEDSArdZaGGYBd7h?= =?us-ascii?Q?dzPJ+VSz8dAnS8gnHhoQP+w34h6zkg8rgsPor+QX8M2P70hFIye/gvaL0/LN?= =?us-ascii?Q?JqRrPcJlmuJtOQHEJrBAczEHh9dlNh8WRLbOFeq2afPveqkKE6Aez6hPjXqw?= =?us-ascii?Q?tc0Xq+ijvJwMSHhqwh3S5EGRbUxfrY9YjuV4eDtI7Fb1mC9on2Adpai4fUTF?= =?us-ascii?Q?N/Y+keIIf6Qkh4aHH4w8RhzvXFVKj/FK49bR4P3dnkw2CzSHI02dBy36dWh2?= =?us-ascii?Q?TsrRO59fZyUCNQJS6RyhbdxWVPAHqvpwYyUEp7osjnZ7rGLo+9xdwiXmnncX?= =?us-ascii?Q?k7cfo/UJA+qZqhgy/9ZGRcGXsk/c4pWJ2mEMrzMmVhPH0k5UngyRbFEoE7r3?= =?us-ascii?Q?2crDLDegOEBNQdN/b/FdOSpnRrgj7AQeIgfYvTszHS1UzEoepgFmN+QghU3H?= =?us-ascii?Q?Cgv1romKc/WhW4rZpD+2NAByZ1i1JX+zsBC7b7EE0d0TBpT3MRVBBOJ+mqBV?= =?us-ascii?Q?DBnepX29lU9Yx/IAtksWmbUp9l8YlWmA/qpveYfR9p98+M3p0p787qzkVD/G?= =?us-ascii?Q?NYjgSxBnWLxoxnzuEQXUhejYkV6pEwXloVyJw1TIjXx5+chT0NOJmwa3J0P7?= =?us-ascii?Q?zZl3p2ZD32e7+rg6lOASPnDYgELJjgAlofe7I1HURKnNCSrx1rTOOFHVPh9a?= =?us-ascii?Q?nGlh8hkkm8Zuq7k3UfxP9dqdfdB8Ut++oGcL/uLQxxe0n3caDHvJqU3whUeG?= =?us-ascii?Q?mbmNcWYUnpjzvMYhJFyRHdfmkU/g7juCjRXwcCS6Hh4HC+X352lTgGMEf6eN?= =?us-ascii?Q?MNZJAGPfrkc7s1xjyH+V57s8O+M74cADLys27Wgln8s=3D?= x-ms-exchange-transport-forked: True MIME-Version: 1.0 X-OriginatorOrg: vmware.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: SJ0PR05MB7580.namprd05.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: 57c4c52e-707b-41bf-328b-08d8a1255e7c X-MS-Exchange-CrossTenant-originalarrivaltime: 15 Dec 2020 18:15:14.2809 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b39138ca-3cee-4b4a-a4d6-cd83d9dd62f0 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: j09a6S7nsj2ymL1iImlPSjAwNNGIvSBKKLFK8ZEpTiqqxOV3raP988AvW6S6hyracOPk73d6+2YoxHiN8/umAg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: BYAPR05MB4374 Content-Language: en-US Content-Type: multipart/alternative; boundary="_000_SJ0PR05MB7580B395C60A5AF7BE8858A0B9C60SJ0PR05MB7580namp_" --_000_SJ0PR05MB7580B395C60A5AF7BE8858A0B9C60SJ0PR05MB7580namp_ Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable LGTM Reviewed-by: Andrei Warkentin ________________________________ From: devel@edk2.groups.io on behalf of Jeremy Linto= n via groups.io Sent: Monday, December 14, 2020 5:23 PM To: devel@edk2.groups.io Cc: ard.biesheuvel@arm.com ; leif@nuviainc.com ; pete@akeo.ie ; andrey.warkentin@gmail.com ; samer.el-haj-mahmoud@arm.com ; Jeremy Linton Subject: [edk2-devel] [PATCH 1/7] Platform/RaspberryPi: Update VPU mailbox = constants Lets sync our mailbox commands with the known/linux constants so that we have a more complete view of what we can request from the VPU. Signed-off-by: Jeremy Linton --- .../RaspberryPi/Include/IndustryStandard/RpiMbox.h | 94 ++++++++++++++++++= ++-- 1 file changed, 89 insertions(+), 5 deletions(-) diff --git a/Platform/RaspberryPi/Include/IndustryStandard/RpiMbox.h b/Plat= form/RaspberryPi/Include/IndustryStandard/RpiMbox.h index 7104068998..551c2b82e5 100644 --- a/Platform/RaspberryPi/Include/IndustryStandard/RpiMbox.h +++ b/Platform/RaspberryPi/Include/IndustryStandard/RpiMbox.h @@ -45,6 +45,10 @@ #define RPI_MBOX_GET_BOARD_SERIAL 0x00010004 #define RPI_MBOX_GET_ARM_MEMSIZE 0x00010005 #define RPI_MBOX_GET_VC_MEMSIZE 0x00010006 +#define RPI_MBOX_GET_CLOCKS 0x00010007 + +#define RPI_MBOX_GET_POWER_STATE 0x00020001 +#define RPI_MBOX_GET_TIMING 0x00020002 #define RPI_MBOX_SET_POWER_STATE 0x00028001 @@ -58,28 +62,92 @@ #define RPI_MBOX_POWER_STATE_SPI 0x00000007 #define RPI_MBOX_POWER_STATE_CCP2TX 0x00000008 +#define RPI_MBOX_GET_CLOCK_STATE 0x00030001 #define RPI_MBOX_GET_CLOCK_RATE 0x00030002 +#define RPI_MBOX_GET_VOLTAGE 0x00030003 #define RPI_MBOX_GET_MAX_CLOCK_RATE 0x00030004 +#define RPI_MBOX_GET_MAX_VOLTAGE 0x00030005 +#define RPI_MBOX_GET_TEMPERATURE 0x00030006 #define RPI_MBOX_GET_MIN_CLOCK_RATE 0x00030007 - +#define RPI_MBOX_GET_MIN_VOLTAGE 0x00030008 +#define RPI_MBOX_GET_TURBO 0x00030009 +#define RPI_MBOX_GET_MAX_TEMPERATURE 0x0003000a +#define RPI_MBOX_GET_STC 0x0003000b +#define RPI_MBOX_ALLOCATE_MEMORY 0x0003000c +#define RPI_MBOX_LOCK_MEMORY 0x0003000d +#define RPI_MBOX_UNLOCK_MEMORY 0x0003000e +#define RPI_MBOX_RELEASE_MEMORY 0x0003000f +#define RPI_MBOX_EXECUTE_CODE 0x00030010 +#define RPI_MBOX_EXECUTE_QPU 0x00030011 +#define RPI_MBOX_SET_ENABLE_QPU 0x00030012 +#define RPI_MBOX_GET_DISPMANX_RESOURCE_MEM_HANDLE 0x00030014 +#define RPI_MBOX_GET_EDID_BLOCK 0x00030020 +#define RPI_MBOX_GET_CUSTOMER_OTP 0x00030021 +#define RPI_MBOX_GET_DOMAIN_STATE 0x00030030 +#define RPI_MBOX_GET_GPIO_STATE 0x00030041 +#define RPI_MBOX_GET_GPIO_CONFIG 0x00030043 +#define RPI_MBOX_GET_PERIPH_REG 0x00030045 +#define RPI_MBOX_GET_THROTTLED 0x00030046 +#define RPI_MBOX_GET_CLOCK_MEASURED 0x00030047 +#define RPI_MBOX_NOTIFY_REBOOT 0x00030048 +#define RPI_MBOX_GET_POE_HAT_VAL 0x00030049 +#define RPI_MBOX_SET_POE_HAT_VAL 0x00030050 #define RPI_MBOX_NOTIFY_XHCI_RESET 0x00030058 +#define RPI_MBOX_SET_CLOCK_STATE 0x00038001 #define RPI_MBOX_SET_CLOCK_RATE 0x00038002 +#define RPI_MBOX_SET_VOLTAGE 0x00038003 +#define RPI_MBOX_SET_TURBO 0x00038009 +#define RPI_MBOX_SET_CUSTOMER_OTP 0x00038021 +#define RPI_MBOX_SET_DOMAIN_STATE 0x00038030 #define RPI_MBOX_SET_GPIO 0x00038041 +#define RPI_MBOX_SET_SDHOST_CLOCK 0x00038042 +#define RPI_MBOX_SET_GPIO_CONFIG 0x00038043 +#define RPI_MBOX_SET_PERIPH_REG 0x00038045 +#define RPI_MBOX_ALLOC_FB 0x00040001 +#define RPI_MBOX_FB_BLANK 0x00040002 #define RPI_MBOX_GET_FB_GEOMETRY 0x00040003 -#define RPI_MBOX_GET_FB_LINELENGTH 0x00040008 +#define RPI_MBOX_GET_FB_VIRTUAL_WIDTH_HEIGHT 0x00040004 #define RPI_MBOX_GET_FB_COLOR_DEPTH 0x00040005 -#define RPI_MBOX_GET_FB_REGION 0x00040001 +#define RPI_MBOX_GET_FB_PIXEL_ORDER 0x00040006 +#define RPI_MBOX_GET_FB_ALPHA_MODE 0x00040007 +#define RPI_MBOX_GET_FB_LINELENGTH 0x00040008 +#define RPI_MBOX_GET_FB_VIRTUAL_OFFSET 0x00040009 +#define RPI_MBOX_GET_FB_OVERSCAN 0x0004000a +#define RPI_MBOX_GET_FB_PALETTE 0x0004000b +#define RPI_MBOX_GET_FB_TOUCHBUF 0x0004000f +#define RPI_MBOX_GET_FB_GPIOVIRTBUF 0x00040010 + +#define RPI_MBOX_TEST_FB_PHYSICAL_WIDTH_HEIGHT 0x00044003 +#define RPI_MBOX_TEST_FB_VIRTUAL_WIDTH_HEIGHT 0x00044004 +#define RPI_MBOX_TEST_FB_DEPTH 0x00044005 +#define RPI_MBOX_TEST_FB_PIXEL_ORDER 0x00044006 +#define RPI_MBOX_TEST_FB_ALPHA_MODE 0x00044007 +#define RPI_MBOX_TEST_FB_VIRTUAL_OFFSET 0x00044009 +#define RPI_MBOX_TEST_FB_OVERSCAN 0x0004400a +#define RPI_MBOX_TEST_FB_PALETTE 0x0004400b +#define RPI_MBOX_TEST_FB_VSYNC 0x0004400e +#define RPI_MBOX_FREE_FB 0x00048001 #define RPI_MBOX_SET_FB_PGEOM 0x00048003 #define RPI_MBOX_SET_FB_VGEOM 0x00048004 #define RPI_MBOX_SET_FB_DEPTH 0x00048005 -#define RPI_MBOX_ALLOC_FB 0x00040001 -#define RPI_MBOX_FREE_FB 0x00048001 +#define RPI_MBOX_SET_FB_PIXEL_ORDER 0x00048006 +#define RPI_MBOX_SET_FB_ALPHA_MODE 0x00048007 +#define RPI_MBOX_SET_FB_VIRTUAL_OFFSET 0x00048009 +#define RPI_MBOX_SET_FB_OVERSCAN 0x0004800a +#define RPI_MBOX_SET_FB_PALET TE 0x0004800b +#define RPI_MBOX_VCHIQ_INIT 0x00048010 +#define RPI_MBOX_SET_FB_TOUCHBUF 0x0004801f +#define RPI_MBOX_SET_FB_GPIOVIRTBUF 0x00048020 +#define RPI_MBOX_SET_FB_VSYNC 0x0004800e +#define RPI_MBOX_SET_FB_BACKLIGHT 0x0004800f #define RPI_MBOX_GET_COMMAND_LINE 0x00050001 +#define RPI_MBOX_GET_DMA_CHANNELS 0x00060001 + #define RPI_MBOX_POWER_STATE_ENABLE BIT0 #define RPI_MBOX_POWER_STATE_WAIT BIT1 @@ -93,5 +161,21 @@ #define RPI_MBOX_CLOCK_RATE_SDRAM 0x000000008 #define RPI_MBOX_CLOCK_RATE_PIXEL 0x000000009 #define RPI_MBOX_CLOCK_RATE_PWM 0x00000000a +#define RPI_MBOX_CLOCK_RATE_HEVC 0x00000000b +#define RPI_MBOX_CLOCK_RATE_EMMC2 0x00000000c +#define RPI_MBOX_CLOCK_RATE_M2MC 0x00000000d +#define RPI_MBOX_CLOCK_RATE_PIXEL_BVB 0x00000000d + +#define RPI_EXP_GPIO_DIR_IN 0 +#define RPI_EXP_GPIO_DIR_OUT 1 + +#define RPI_EXP_GPIO_BT 0 +#define RPI_EXP_GPIO_WIFI 1 +#define RPI_EXP_GPIO_LED 2 +#define RPI_EXP_GPIO_RESET 3 +#define RPI_EXP_GPIO_SD_VOLT 4 +#define RPI_EXP_GPIO_CAMERA 5 +#define RPI_EXP_GPIO_SD_POWER 6 +#define RPI_EXP_GPIO_POWER_LED 7 #endif /* __RASPBERRY_PI_MAILBOX_H__ */ -- 2.13.7 -=3D-=3D-=3D-=3D-=3D-=3D Groups.io Links: You receive all messages sent to this group. View/Reply Online (#68813): https://nam04.safelinks.protection.outlook.com/= ?url=3Dhttps%3A%2F%2Fedk2.groups.io%2Fg%2Fdevel%2Fmessage%2F68813&data= =3D04%7C01%7Cawarkentin%40vmware.com%7C37bbadbcdf3c4394992308d8a0875585%7Cb= 39138ca3cee4b4aa4d6cd83d9dd62f0%7C0%7C0%7C637435850412050013%7CUnknown%7CTW= FpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3= D%7C1000&sdata=3D8Z49IWiFpGqiotCQbGpVM3jW0%2F7imrrNhTal8spe9bQ%3D&r= eserved=3D0 Mute This Topic: https://nam04.safelinks.protection.outlook.com/?url=3Dhttp= s%3A%2F%2Fgroups.io%2Fmt%2F78964889%2F4387333&data=3D04%7C01%7Cawarkent= in%40vmware.com%7C37bbadbcdf3c4394992308d8a0875585%7Cb39138ca3cee4b4aa4d6cd= 83d9dd62f0%7C0%7C0%7C637435850412050013%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4= wLjAwMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=3D= 8znoOGR4qF8%2FVyGcUf37tgagVZ%2BhQBUOaXL7JfQz4Xs%3D&reserved=3D0 Group Owner: devel+owner@edk2.groups.io Unsubscribe: https://nam04.safelinks.protection.outlook.com/?url=3Dhttps%3A= %2F%2Fedk2.groups.io%2Fg%2Fdevel%2Funsub&data=3D04%7C01%7Cawarkentin%40= vmware.com%7C37bbadbcdf3c4394992308d8a0875585%7Cb39138ca3cee4b4aa4d6cd83d9d= d62f0%7C0%7C0%7C637435850412050013%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAw= MDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&sdata=3DOv0gN= Diq9CIooyxWSDtnYwpK0Ffh5nLPCsCDQs8ilVs%3D&reserved=3D0 [awarkentin@vmwa= re.com] -=3D-=3D-=3D-=3D-=3D-=3D --_000_SJ0PR05MB7580B395C60A5AF7BE8858A0B9C60SJ0PR05MB7580namp_ Content-Type: text/html; charset="us-ascii" Content-Transfer-Encoding: quoted-printable
LGTM

Reviewed-by: Andrei Warkentin <awarkentin@vmware.com>

From: devel@edk2.groups.io = <devel@edk2.groups.io> on behalf of Jeremy Linton via groups.io <j= eremy.linton=3Darm.com@groups.io>
Sent: Monday, December 14, 2020 5:23 PM
To: devel@edk2.groups.io <devel@edk2.groups.io>
Cc: ard.biesheuvel@arm.com <ard.biesheuvel@arm.com>; leif@nuvi= ainc.com <leif@nuviainc.com>; pete@akeo.ie <pete@akeo.ie>; andr= ey.warkentin@gmail.com <andrey.warkentin@gmail.com>; samer.el-haj-mah= moud@arm.com <samer.el-haj-mahmoud@arm.com>; Jeremy Linton <jeremy.linton@arm.com>
Subject: [edk2-devel] [PATCH 1/7] Platform/RaspberryPi: Update VPU m= ailbox constants
 
Lets sync our mailbox commands with the known/linu= x
constants so that we have a more complete view of
what we can request from the VPU.

Signed-off-by: Jeremy Linton <jeremy.linton@arm.com>
---
 .../RaspberryPi/Include/IndustryStandard/RpiMbox.h | 94 +++++++++++++= +++++++--
 1 file changed, 89 insertions(+), 5 deletions(-)

diff --git a/Platform/RaspberryPi/Include/IndustryStandard/RpiMbox.h b/Plat= form/RaspberryPi/Include/IndustryStandard/RpiMbox.h
index 7104068998..551c2b82e5 100644
--- a/Platform/RaspberryPi/Include/IndustryStandard/RpiMbox.h
+++ b/Platform/RaspberryPi/Include/IndustryStandard/RpiMbox.h
@@ -45,6 +45,10 @@
 #define RPI_MBOX_GET_BOARD_SERIAL      =             &nb= sp;          0x00010004

 #define RPI_MBOX_GET_ARM_MEMSIZE      &= nbsp;           &nbs= p;           0x00010005
 #define RPI_MBOX_GET_VC_MEMSIZE      &n= bsp;            = ;            0x00010= 006

+#define RPI_MBOX_GET_CLOCKS        = ;            &n= bsp;            = ;  0x00010007

+

+#define RPI_MBOX_GET_POWER_STATE       =             &nb= sp;          0x00020001

+#define RPI_MBOX_GET_TIMING        = ;            &n= bsp;            = ;  0x00020002

 

 #define RPI_MBOX_SET_POWER_STATE      &= nbsp;           &nbs= p;           0x00028001
 

@@ -58,28 +62,92 @@
 #define RPI_MBOX_POWER_STATE_SPI      &= nbsp;           &nbs= p;           0x00000007
 #define RPI_MBOX_POWER_STATE_CCP2TX     &nbs= p;            &= nbsp;        0x00000008

 

+#define RPI_MBOX_GET_CLOCK_STATE       =             &nb= sp;          0x00030001

 #define RPI_MBOX_GET_CLOCK_RATE      &n= bsp;            = ;            0x00030= 002

+#define RPI_MBOX_GET_VOLTAGE       &nbs= p;            &= nbsp;           &nbs= p; 0x00030003

 #define RPI_MBOX_GET_MAX_CLOCK_RATE     &nbs= p;            &= nbsp;        0x00030004

+#define RPI_MBOX_GET_MAX_VOLTAGE       =             &nb= sp;          0x00030005

+#define RPI_MBOX_GET_TEMPERATURE       =             &nb= sp;          0x00030006

 #define RPI_MBOX_GET_MIN_CLOCK_RATE     &nbs= p;            &= nbsp;        0x00030007

-

+#define RPI_MBOX_GET_MIN_VOLTAGE       =             &nb= sp;          0x00030008

+#define RPI_MBOX_GET_TURBO        =             &nb= sp;            =    0x00030009

+#define RPI_MBOX_GET_MAX_TEMPERATURE      &n= bsp;            = ;       0x0003000a

+#define RPI_MBOX_GET_STC        &n= bsp;            = ;            &n= bsp;    0x0003000b

+#define RPI_MBOX_ALLOCATE_MEMORY       =             &nb= sp;          0x0003000c

+#define RPI_MBOX_LOCK_MEMORY       &nbs= p;            &= nbsp;           &nbs= p; 0x0003000d

+#define RPI_MBOX_UNLOCK_MEMORY       &n= bsp;            = ;            0x00030= 00e

+#define RPI_MBOX_RELEASE_MEMORY       &= nbsp;           &nbs= p;           0x0003000f
+#define RPI_MBOX_EXECUTE_CODE       &nb= sp;            =              0x= 00030010

+#define RPI_MBOX_EXECUTE_QPU       &nbs= p;            &= nbsp;           &nbs= p; 0x00030011

+#define RPI_MBOX_SET_ENABLE_QPU       &= nbsp;           &nbs= p;           0x00030012
+#define RPI_MBOX_GET_DISPMANX_RESOURCE_MEM_HANDLE    &= nbsp;        0x00030014

+#define RPI_MBOX_GET_EDID_BLOCK       &= nbsp;           &nbs= p;           0x00030020
+#define RPI_MBOX_GET_CUSTOMER_OTP       = ;            &n= bsp;         0x00030021

+#define RPI_MBOX_GET_DOMAIN_STATE       = ;            &n= bsp;         0x00030030

+#define RPI_MBOX_GET_GPIO_STATE       &= nbsp;           &nbs= p;           0x00030041
+#define RPI_MBOX_GET_GPIO_CONFIG       =             &nb= sp;          0x00030043

+#define RPI_MBOX_GET_PERIPH_REG       &= nbsp;           &nbs= p;           0x00030045
+#define RPI_MBOX_GET_THROTTLED       &n= bsp;            = ;            0x00030= 046

+#define RPI_MBOX_GET_CLOCK_MEASURED      &nb= sp;            =         0x00030047

+#define RPI_MBOX_NOTIFY_REBOOT       &n= bsp;            = ;            0x00030= 048

+#define RPI_MBOX_GET_POE_HAT_VAL       =             &nb= sp;          0x00030049

+#define RPI_MBOX_SET_POE_HAT_VAL       =             &nb= sp;          0x00030050

 #define RPI_MBOX_NOTIFY_XHCI_RESET      = ;            &n= bsp;         0x00030058

 

+#define RPI_MBOX_SET_CLOCK_STATE       =             &nb= sp;          0x00038001

 #define RPI_MBOX_SET_CLOCK_RATE      &n= bsp;            = ;            0x00038= 002

+#define RPI_MBOX_SET_VOLTAGE       &nbs= p;            &= nbsp;           &nbs= p; 0x00038003

+#define RPI_MBOX_SET_TURBO        =             &nb= sp;            =    0x00038009

+#define RPI_MBOX_SET_CUSTOMER_OTP       = ;            &n= bsp;         0x00038021

+#define RPI_MBOX_SET_DOMAIN_STATE       = ;            &n= bsp;         0x00038030

 #define RPI_MBOX_SET_GPIO       &n= bsp;            = ;            &n= bsp;    0x00038041

+#define RPI_MBOX_SET_SDHOST_CLOCK       = ;            &n= bsp;         0x00038042

+#define RPI_MBOX_SET_GPIO_CONFIG       =             &nb= sp;          0x00038043

+#define RPI_MBOX_SET_PERIPH_REG       &= nbsp;           &nbs= p;           0x00038045
 

+#define RPI_MBOX_ALLOC_FB        &= nbsp;           &nbs= p;            &= nbsp;   0x00040001

+#define RPI_MBOX_FB_BLANK        &= nbsp;           &nbs= p;            &= nbsp;   0x00040002

 #define RPI_MBOX_GET_FB_GEOMETRY      &= nbsp;           &nbs= p;           0x00040003
-#define RPI_MBOX_GET_FB_LINELENGTH      &nbs= p;            &= nbsp;        0x00040008

+#define RPI_MBOX_GET_FB_VIRTUAL_WIDTH_HEIGHT     =              0x= 00040004

 #define RPI_MBOX_GET_FB_COLOR_DEPTH     &nbs= p;            &= nbsp;        0x00040005

-#define RPI_MBOX_GET_FB_REGION       &n= bsp;            = ;            0x00040= 001

+#define RPI_MBOX_GET_FB_PIXEL_ORDER      &nb= sp;            =         0x00040006

+#define RPI_MBOX_GET_FB_ALPHA_MODE      &nbs= p;            &= nbsp;        0x00040007

+#define RPI_MBOX_GET_FB_LINELENGTH      &nbs= p;            &= nbsp;        0x00040008

+#define RPI_MBOX_GET_FB_VIRTUAL_OFFSET      =             &nb= sp;     0x00040009

+#define RPI_MBOX_GET_FB_OVERSCAN       =             &nb= sp;          0x0004000a

+#define RPI_MBOX_GET_FB_PALETTE       &= nbsp;           &nbs= p;           0x0004000b
+#define RPI_MBOX_GET_FB_TOUCHBUF       =             &nb= sp;          0x0004000f

+#define RPI_MBOX_GET_FB_GPIOVIRTBUF      &nb= sp;            =         0x00040010

+

+#define RPI_MBOX_TEST_FB_PHYSICAL_WIDTH_HEIGHT    &nbs= p;           0x00044003
+#define RPI_MBOX_TEST_FB_VIRTUAL_WIDTH_HEIGHT     = ;            0x00044= 004

+#define RPI_MBOX_TEST_FB_DEPTH       &n= bsp;            = ;            0x00044= 005

+#define RPI_MBOX_TEST_FB_PIXEL_ORDER      &n= bsp;            = ;       0x00044006

+#define RPI_MBOX_TEST_FB_ALPHA_MODE      &nb= sp;            =         0x00044007

+#define RPI_MBOX_TEST_FB_VIRTUAL_OFFSET      = ;            &n= bsp;    0x00044009

+#define RPI_MBOX_TEST_FB_OVERSCAN       = ;            &n= bsp;         0x0004400a

+#define RPI_MBOX_TEST_FB_PALETTE       =             &nb= sp;          0x0004400b

+#define RPI_MBOX_TEST_FB_VSYNC       &n= bsp;            = ;            0x00044= 00e

 

+#define RPI_MBOX_FREE_FB        &n= bsp;            = ;            &n= bsp;    0x00048001

 #define RPI_MBOX_SET_FB_PGEOM      &nbs= p;            &= nbsp;           &nbs= p; 0x00048003

 #define RPI_MBOX_SET_FB_VGEOM      &nbs= p;            &= nbsp;           &nbs= p; 0x00048004

 #define RPI_MBOX_SET_FB_DEPTH      &nbs= p;            &= nbsp;           &nbs= p; 0x00048005

-#define RPI_MBOX_ALLOC_FB        &= nbsp;           &nbs= p;            &= nbsp;   0x00040001

-#define RPI_MBOX_FREE_FB        &n= bsp;            = ;            &n= bsp;    0x00048001

+#define RPI_MBOX_SET_FB_PIXEL_ORDER      &nb= sp;            =         0x00048006

+#define RPI_MBOX_SET_FB_ALPHA_MODE      &nbs= p;            &= nbsp;        0x00048007

+#define RPI_MBOX_SET_FB_VIRTUAL_OFFSET      =             &nb= sp;     0x00048009

+#define RPI_MBOX_SET_FB_OVERSCAN       =             &nb= sp;          0x0004800a

+#define RPI_MBOX_SET_FB_PALET TE       =             &nb= sp;          0x0004800b

+#define RPI_MBOX_VCHIQ_INIT        = ;            &n= bsp;            = ;  0x00048010

+#define RPI_MBOX_SET_FB_TOUCHBUF       =             &nb= sp;          0x0004801f

+#define RPI_MBOX_SET_FB_GPIOVIRTBUF      &nb= sp;            =         0x00048020

+#define RPI_MBOX_SET_FB_VSYNC       &nb= sp;            =              0x= 0004800e

+#define RPI_MBOX_SET_FB_BACKLIGHT       = ;            &n= bsp;         0x0004800f

 

 #define RPI_MBOX_GET_COMMAND_LINE      =             &nb= sp;          0x00050001

 

+#define RPI_MBOX_GET_DMA_CHANNELS       = ;            &n= bsp;         0x00060001

+

 #define RPI_MBOX_POWER_STATE_ENABLE     &nbs= p;            &= nbsp;        BIT0

 #define RPI_MBOX_POWER_STATE_WAIT      =             &nb= sp;          BIT1

 

@@ -93,5 +161,21 @@
 #define RPI_MBOX_CLOCK_RATE_SDRAM      =             &nb= sp;          0x000000008

 #define RPI_MBOX_CLOCK_RATE_PIXEL      =             &nb= sp;          0x000000009

 #define RPI_MBOX_CLOCK_RATE_PWM      &n= bsp;            = ;            0x00000= 000a

+#define RPI_MBOX_CLOCK_RATE_HEVC       =             &nb= sp;          0x00000000b

+#define RPI_MBOX_CLOCK_RATE_EMMC2       = ;            &n= bsp;         0x00000000c

+#define RPI_MBOX_CLOCK_RATE_M2MC       =             &nb= sp;          0x00000000d

+#define RPI_MBOX_CLOCK_RATE_PIXEL_BVB      &= nbsp;           &nbs= p;      0x00000000d

+

+#define RPI_EXP_GPIO_DIR_IN        = ;            &n= bsp;            = ;  0

+#define RPI_EXP_GPIO_DIR_OUT       &nbs= p;            &= nbsp;           &nbs= p; 1

+

+#define RPI_EXP_GPIO_BT        &nb= sp;            =             &nb= sp;     0

+#define RPI_EXP_GPIO_WIFI        &= nbsp;           &nbs= p;            &= nbsp;   1

+#define RPI_EXP_GPIO_LED        &n= bsp;            = ;            &n= bsp;    2

+#define RPI_EXP_GPIO_RESET        =             &nb= sp;            =    3

+#define RPI_EXP_GPIO_SD_VOLT       &nbs= p;            &= nbsp;           &nbs= p; 4

+#define RPI_EXP_GPIO_CAMERA        = ;            &n= bsp;            = ;  5

+#define RPI_EXP_GPIO_SD_POWER       &nb= sp;            =              6<= br>
+#define RPI_EXP_GPIO_POWER_LED       &n= bsp;            = ;            7

 

 #endif /* __RASPBERRY_PI_MAILBOX_H__ */

--
2.13.7



-=3D-=3D-=3D-=3D-=3D-=3D
Groups.io Links: You receive all messages sent to this group.
View/Reply Online (#68813): https://nam04.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fedk2.gr= oups.io%2Fg%2Fdevel%2Fmessage%2F68813&amp;data=3D04%7C01%7Cawarkentin%4= 0vmware.com%7C37bbadbcdf3c4394992308d8a0875585%7Cb39138ca3cee4b4aa4d6cd83d9= dd62f0%7C0%7C0%7C637435850412050013%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjA= wMDAiLCJQIjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=3D= 8Z49IWiFpGqiotCQbGpVM3jW0%2F7imrrNhTal8spe9bQ%3D&amp;reserved=3D0 Mute This Topic: https://nam04.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fgroups.= io%2Fmt%2F78964889%2F4387333&amp;data=3D04%7C01%7Cawarkentin%40vmware.c= om%7C37bbadbcdf3c4394992308d8a0875585%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C= 0%7C0%7C637435850412050013%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQ= IjoiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=3D8znoOGR4q= F8%2FVyGcUf37tgagVZ%2BhQBUOaXL7JfQz4Xs%3D&amp;reserved=3D0
Group Owner: devel+owner@edk2.groups.io
Unsubscribe: https://nam04.safelinks.protection.outlook.com/?url=3Dhttps%3A%2F%2Fedk2.gr= oups.io%2Fg%2Fdevel%2Funsub&amp;data=3D04%7C01%7Cawarkentin%40vmware.co= m%7C37bbadbcdf3c4394992308d8a0875585%7Cb39138ca3cee4b4aa4d6cd83d9dd62f0%7C0= %7C0%7C637435850412050013%7CUnknown%7CTWFpbGZsb3d8eyJWIjoiMC4wLjAwMDAiLCJQI= joiV2luMzIiLCJBTiI6Ik1haWwiLCJXVCI6Mn0%3D%7C1000&amp;sdata=3DOv0gNDiq9C= IooyxWSDtnYwpK0Ffh5nLPCsCDQs8ilVs%3D&amp;reserved=3D0 [awarkentin@vmware.com]
-=3D-=3D-=3D-=3D-=3D-=3D


--_000_SJ0PR05MB7580B395C60A5AF7BE8858A0B9C60SJ0PR05MB7580namp_--