From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: mx.groups.io; dkim=pass header.i=@semihalf-com.20150623.gappssmtp.com header.s=20150623 header.b=qB+G4mGp; spf=none, err=SPF record not found (domain: semihalf.com, ip: 209.85.222.194, mailfrom: mw@semihalf.com) Received: from mail-qk1-f194.google.com (mail-qk1-f194.google.com [209.85.222.194]) by groups.io with SMTP; Mon, 08 Apr 2019 18:32:08 -0700 Received: by mail-qk1-f194.google.com with SMTP id c189so9272897qke.6 for ; Mon, 08 Apr 2019 18:32:07 -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=x0s/lN3L9cOcB4pqiOunnvuo+MmzEGSf77A5eNkyis8=; b=qB+G4mGpzStJZYhYjPfKYyPEIHkCzR9ZN52N+6ojsnTmISM7VYdtW5fbtgtLxm4SNF b+QwmxQRNiYHz3F+I4kM7/64e6k+Rpj5Ay1eO+JA69Aj2lnAfU/nYjfQEoJoArJBs32B vqiwg9xCLbuXnycTUbjEVY80bdaALHUP4AXZ9GenofYy6Q4iG36ZRIlmlvBigp9tTIs0 rH6/k5hqaHFIUTdO3vKy1BMzc9E7XiLD1l6ZWkahMHxXGIlwPE0NxsL8BONzYo+aoJTd B2XaCR5yTu9SqwfqkjmoAm1c916bZYwnupyAms/3Y80OIRrWHS6TrS91z1jyqUPOwJ6T 1qrg== 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=x0s/lN3L9cOcB4pqiOunnvuo+MmzEGSf77A5eNkyis8=; b=j6saNMrBOP/tdkASqr7ZXiQPbr5ww6wlQCd55+x30w4eYkK+T/cmql30o3+Yqx5PRU 2SOkk++CrZu2J0GBUU7b+TiJH/2wydJhg6Q7QxMWMi/D0Cj/omFi8MzlJzjJrS3fsEL5 tmsG9WZSRU8vaW+FcAAfEBivkAS2AjhyxrDGSFM5x8tUeqUl2jw/e9IpnQM8ahm+Zaba lsjG66FXngJ4iTY0BIgu3QJ+pTPfE/avuxDS5pFFyPR/mEpWZpcwfVtGJHwyZnaKefx0 5GuO60bIhcw2Rb9BZhNoaqVaXwfUYlF1O3t1p1+RIUuV/pnVM8ElWr8Uh6dwP6rP+NCr rRMQ== X-Gm-Message-State: APjAAAXxietYbNz3MguzO4RjkUIlGqEVNk/sUgbiBQQgSRyAlVd1fB51 e0beRgkCcMw8Cv2ti4/DwLfswmRytUEc73iWPLB0jQ== X-Google-Smtp-Source: APXvYqzW4PSQJxjPUoKeXe4G3AO2iyFYT3E4EDH2jFBCzYIJwmQ8HYVYYKxt3jrxgNw0z/la3BywQ5WZOiiiStfGvrk= X-Received: by 2002:a37:a4d1:: with SMTP id n200mr24971340qke.62.1554773526880; Mon, 08 Apr 2019 18:32:06 -0700 (PDT) MIME-Version: 1.0 References: <20190409003327.3797-1-jeremy.linton@arm.com> In-Reply-To: <20190409003327.3797-1-jeremy.linton@arm.com> From: Marcin Wojtas Date: Tue, 9 Apr 2019 03:31:55 +0200 Message-ID: Subject: Re: [PATCH] Marvell/Armada7k8k: Remove SPCR baud rate setting To: Jeremy Linton Cc: devel@edk2.groups.io, Ard Biesheuvel , Leif Lindholm , "Kinney, Michael D" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Hi Jeremy, Thanks for the patch. However I played with booting with ACPI with and without your patch - I may be missing something, but I don't see a difference, when using earlycon (both 'earlycon=3Duart,mmio32,0xf0512000' and 'earlycon=3Duart8250,mmio32,0xf0512000'). Can you please show what booting scenario is fixed with the patch? Thanks, Marcin wt., 9 kwi 2019 o 02:33 Jeremy Linton napisa=C5=82(= a): > > The mcbin (and likely others) have a nonstandard uart clock. > This means that the earlycon programming will incorrectly set > the baud rate if it is specified. The way around this is to tell > the kernel to continue using the preprogrammed baud rate. This > is done by setting the baud to 0. > > Further, the SPCR and DSDT serial port need to match the port > address and port access type for the kernel to conclude they > are the same. > > So while ARM_GAS32 is correct for earlycon (it can be used alone > on the kernel command line) by providing the reg-shift=3D2 value, > it also sets the io type to MMIO32, which doesn't match the DSDT > defined MMIO. This means that the actual console will never appear. > The obvious fix is to set reg-width=3D4 in DSDT, but that also changes > the accesssors to 32-bits (similarly to earlycon) and results in > console failure. > > So the less obvious fix, is to use the GAS8 specifier. This means > that earlycon needs to be fully specified as > earlycon=3Duart,mmio32,0xf0512000, but has the extremely useful feature > that the console default works without any user interaction. > > If in the future marvell decides to define their own ACPI id for the > console and upstream a quirk, the ARM_GAS8 portion of this should > be reverted. > > Contributed-under: TianoCore Contribution Agreement 1.1 > Signed-off-by: Jeremy Linton > --- > Silicon/Marvell/Armada7k8k/AcpiTables/Spcr.aslc | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/Silicon/Marvell/Armada7k8k/AcpiTables/Spcr.aslc b/Silicon/Ma= rvell/Armada7k8k/AcpiTables/Spcr.aslc > index e78bb9036f..06c7af069c 100644 > --- a/Silicon/Marvell/Armada7k8k/AcpiTables/Spcr.aslc > +++ b/Silicon/Marvell/Armada7k8k/AcpiTables/Spcr.aslc > @@ -30,11 +30,11 @@ EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE Spcr = =3D { > { EFI_ACPI_RESERVED_BYTE, > EFI_ACPI_RESERVED_BYTE, > EFI_ACPI_RESERVED_BYTE }, = // Reserved1[3] > - ARM_GAS32 (FixedPcdGet64(PcdSerialRegisterBase)), = // BaseAddress > + ARM_GAS8 (FixedPcdGet64(PcdSerialRegisterBase)), = // BaseAddress > EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_INTERRUPT_TYPE_GIC, = // InterruptType > 0, = // Irq > 51, = // GlobalSystemInterrupt > - EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_BAUD_RATE_115200, = // BaudRate > + 0, = // Keep Firmware Baud > EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_PARITY_NO_PARITY, = // Parity > EFI_ACPI_SERIAL_PORT_CONSOLE_REDIRECTION_TABLE_STOP_BITS_1, = // StopBits > 0, = // FlowControl > -- > 2.20.1 >