From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qt1-f193.google.com (mail-qt1-f193.google.com [209.85.160.193]) by mx.groups.io with SMTP id smtpd.web10.21967.1591974453527581514 for ; Fri, 12 Jun 2020 08:07:33 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@semihalf-com.20150623.gappssmtp.com header.s=20150623 header.b=VR/IkM9+; spf=none, err=SPF record not found (domain: semihalf.com, ip: 209.85.160.193, mailfrom: mw@semihalf.com) Received: by mail-qt1-f193.google.com with SMTP id z1so7367129qtn.2 for ; Fri, 12 Jun 2020 08:07:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=semihalf-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc:content-transfer-encoding; bh=Xq54y2giRBF0rUSI892abu78NijjG6n2gKIdZsL9th0=; b=VR/IkM9+DYsTxgwc0nwqsyrAAtQl8zFcTEGJKAdlCL/eNrgUrF8frDkCB4LEdNNGng fEStnWZm/nWsLfgpFXQzedEN0P1xdNhjBXeq+uDHh+SxZcw5OyzeetUjtS6ZlV0d+EQz oi4nFXoEkx2nXrKSU/D3mBgq9ECunhvFiZiJ2cZMh0lyNYPa3r0AZsvXpwSWXencEtJy iC8FJNlL6gUCFYTGfy0j+xvyDJeqxFKhA714moaw+cJZLwk5757aO7S+uKuHT46dhwox fgQBVHq1QMXBjCo+YZ9hWjHE8EVanFHV1UHGCT14qGRr7ddVUf0/JcrSH7IaCi88HYg4 1Jfw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc:content-transfer-encoding; bh=Xq54y2giRBF0rUSI892abu78NijjG6n2gKIdZsL9th0=; b=ktisaZxDWGX1bZlzyAjAKCS9wswLQDGjLkHRdHoHZTaAunF+lSAFfAGmXdJylV/Om/ V+kBSvnCOKwpuP+qJrcgg0dJ7E8BiSlcUsayXnIs299IJG6pOeKpwoVR7P/+fxKBXTZq 6XsyBaRzVXloOEZYYO8SDFeWcFvvu/Q+vrgJlZie9mtWgPkiR0sg9t0qgb+oJx4B3gNg Cayio+1J/1iCrSTWzs11XtDo+b7EPsHs2CMH0LaL8L3Gsm5rVM5tDKocLyaBRekki4VH Bjv/zUW/W7MRR+krjN1Ju4OTsPxjn7d2NOYnhBHRU4/87sp5lUB0gMNXLSIYx+YrPwev EZFA== X-Gm-Message-State: AOAM533M5uuVpzBilEWOAV3o5MPH4FINUug7RRhWqj1w8OOpfZzQaTIM XT4nOb7hX0IC3H/KqmX5aidFyM9euz/9i8gPf/X1qQ== X-Google-Smtp-Source: ABdhPJzuuLQ6CSVlbyOsUkcM++zCjr94aRbkYi1WTYC0rA7UhPZlcuO177G60VIVsRs62DZ0SFoLNLFhuK1woO70nv4= X-Received: by 2002:ac8:176f:: with SMTP id u44mr3723813qtk.0.1591974452463; Fri, 12 Jun 2020 08:07:32 -0700 (PDT) MIME-Version: 1.0 References: <7860963d-c540-1577-600c-106d7236f921@arm.com> <14107.1591915430415249079@groups.io> <1886d7a0-cc28-54ce-6d57-b42f3525d6e2@arm.com> In-Reply-To: <1886d7a0-cc28-54ce-6d57-b42f3525d6e2@arm.com> From: "Marcin Wojtas" Date: Fri, 12 Jun 2020 17:07:21 +0200 Message-ID: Subject: Re: [edk2-devel] Additional configuration options on Armada/Cn913x To: Greg V Cc: Mark Kettenis , edk2-devel-groups-io , Ard Biesheuvel Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi, I see Greg was dropped in the meantime. pt., 12 cze 2020 o 10:45 Ard Biesheuvel napisa=C5= =82(a): > > On 6/12/20 12:43 AM, Mark Kettenis via Groups.Io wrote: > > On Thu, Jun 11, 2020 at 04:17 PM, Ard Biesheuvel wrote: > > > > On 6/11/20 4:07 PM, greg@unrelenting.technology wrote: > > > > June 11, 2020 4:19 PM, "Ard Biesheuvel" > > wrote: > > > > On 6/5/20 5:19 PM, Marcin Wojtas via groups.io wrote: > > > > Hi, > > I'd like to ask for comments before I develop the actua= l > > code - > currently we have 2 workarounds > > done specifically for Linux: > > a. ECAM shift in PCIE > > b. SPCR address space definition > > > > What does this mean? > > > > The SPCR in upstream edk2 is set up to work around some Linux > > weirdness (?) and I have to do this: > > > > https://github.com/myfreeweb/edk2-platforms/commit/74ec98a6498e= 78d2ae6c861db88487bf75f2e1a1 > > > > to make it work on FreeBSD. > > > > Surely, they can't both be correct. Marcin? > > > > Assuming the serial port on Armada/Cn911x is the same as on Armada8k, > > the following DT properties would be applicable: > > > > reg-shift =3D <2>; > > reg-io-width =3D <1> > > > > which means the registers are spaced 32-bits apart but have to be > > accessed using 8-bit load/store instructions. I'd say that > > means that the ACPI Generic Address Space should have RegisterBitWidth > > set to 32 and AccessSize set to BYTE. > > In other words, I think that the current: > > > > #define MV_UART_AS32(Address) { EFI_ACPI_5_0_SYSTEM_MEMORY, 32, 0, > > EFI_ACPI_5_0_BYTE, Address } > > > > is correct. That certainly is what works for OpenBSD. > > Thanks Mark > > The struct type is defined as > > typedef struct { > UINT8 AddressSpaceId; > UINT8 RegisterBitWidth; > UINT8 RegisterBitOffset; > UINT8 AccessSize; > UINT64 Address; > } EFI_ACPI_5_0_GENERIC_ADDRESS_STRUCTURE; > > so I agree that the current definition matches a UART that requires byte > accesses on registers that are 32 bits apart. > > So why does FreeBSD deviate from this? Greg, can you please explain your concerns here? Thanks, Marcin