From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received-SPF: Pass (sender SPF authorized) identity=mailfrom; client-ip=2a00:1450:4864:20::536; helo=mail-ed1-x536.google.com; envelope-from=jake.burkholder2@gmail.com; receiver=edk2-devel@lists.01.org Received: from mail-ed1-x536.google.com (mail-ed1-x536.google.com [IPv6:2a00:1450:4864:20::536]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by ml01.01.org (Postfix) with ESMTPS id 152CE211E2BF4 for ; Wed, 20 Mar 2019 18:33:59 -0700 (PDT) Received: by mail-ed1-x536.google.com with SMTP id d6so3678506eds.2 for ; Wed, 20 Mar 2019 18:33:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=6pUrwX/eSwrk1Hk3LunZimkTp+9HmFKt7s5fsYafDIg=; b=HCHCfI+SEwwJQreOP5ZgpiNujzHJfWLjn8mwlUZozfJu83MwtksMq4zdB4A/nanvWC sldHDtbgzavA7h4LkWI4Hw+jDFm8UjI2cxKyQCD7IBFMY19yFPm4OlbN18lNonR0uls2 1V1S12BNPra1qFxM7LQaq7/DTd/YvM6GhGsnDgik2Tz5x2g+0g/sI0/eL+urR8UdtcW/ ZF6hWmXEvb/5Onjrzdb52TF1gssqaNp1uH7vMeofyezHfzHg/T6XGsgD+azSRUBzEA0E vb4zT/SBqN5SpW0xMhuDH6rmTysGc6pytU0mVXJzCTrJIieaDnTLUZvJUTcO6zF6Jn88 CJfw== 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; bh=6pUrwX/eSwrk1Hk3LunZimkTp+9HmFKt7s5fsYafDIg=; b=LYnexuciMknGPyUeDZ/bRf/N5pEEWZ2HbII08aoIa7v9eFNVAQH2uT6u50EGdFcTPB nSxs9Y2gGUQXMpc8MCgNoW2pS9sD+Q+IJc/WhPvaqXPtBFM4CvC/F5yEFX904lmBtFBR sXWXPN1qeA4V+Q4SfFYu1eG7dL77mzvj8yB1p7Gv7OLg21ObPOe/tA4p3+wSrKOxt/// Mox2uBLxjB+KnmAf7+vV9Kezl+CRIC1UE2t3CFUxOT320S3Y/uVgW7eU7tAWLCJQ4t+0 +h9ZPiu8tpQ55w+utKHix2TxIZgsUgw1fwBCLaW+pQ2mDI72ojLczCjmAw2HE5vj6n7p kmpg== X-Gm-Message-State: APjAAAUGj9wZuPVdZmGPaHgKS3GuMCLCaNZGLUUSkurVkn281cJFrO3z Q9ztIs7LPa2iU017mEGxDkaLWGlf8kdT19eLFnU= X-Google-Smtp-Source: APXvYqwM44e1RhFOXHOoCheqlnTWvI2UZk15CYBsgYa+5WlK4WkELU4+tOpfeiMdj037DC6ePPzSo/2KInxvpj7g3zU= X-Received: by 2002:a17:906:1c98:: with SMTP id g24mr658656ejh.178.1553132038202; Wed, 20 Mar 2019 18:33:58 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: Jacob Burkholder Date: Wed, 20 Mar 2019 18:33:47 -0700 Message-ID: To: "Kinney, Michael D" Cc: "edk2-devel@lists.01.org" X-Content-Filtered-By: Mailman/MimeDel 2.1.29 Subject: Re: SerialDxe with BaseSerialPortLib16550 and standard PC com port X-BeenThere: edk2-devel@lists.01.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: EDK II Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 21 Mar 2019 01:34:00 -0000 Content-Type: text/plain; charset="UTF-8" Hi Mike, I didn't change any of these because the defaults seemed to be what I wanted, 115200, 8n1. I also wasn't sure which one of for example PcdUartDefaultBaudRate or PcdSerialBaudRate would actually be used. In any case both seemed to be set to the same sane default 115200, 8n1, which is what I wanted. The baud rate seems to be set correctly because output works, but this may also just be the hardware reset default for the divisor (1). My edk2 checkout is a bit behind HEAD, the only local change I have is what I mentioned before to use BaseSerialPortLib16550 instead of BaseSerialPortLibNull. Regards, Jake [jake@localhost edk2]$ git log -n 1 commit cce9d763580a955d294a5e3696cbe07a03965e2b (HEAD -> master, origin/master, origin/HEAD) Author: Feng, Bob C Date: Wed Jan 16 19:12:00 2019 +0800 BaseTools: Allow empty value for HiiPcd in Dsc https://bugzilla.tianocore.org/show_bug.cgi?id=1466 DEC file defines PCD default value and PCD supported type. DSC can configure PCD type and value. If the value is same to default value in DEC file, DSC can only configure PCD type and leave empty for value. This usage supports all type PCD except for DynamicHii type. So, DynamicHii PCD should support this usage. Below is one example in DSC. for example, [PcdsDynamicHii.common.DEFAULT] PcdPkgTokenSpaceGuid.PcdCName|L"VarName"|gVarGuid|0x00||NV,BS Contributed-under: TianoCore Contribution Agreement 1.1 Signed-off-by: Bob Feng Cc: Liming Gao Cc: Jaben Carsey Reviewed-by: Liming Gao [jake@localhost edk2]$ git diff diff --git a/MdeModulePkg/MdeModulePkg.dsc b/MdeModulePkg/MdeModulePkg.dsc index 93eaf4b404..4bbc7517d7 100644 --- a/MdeModulePkg/MdeModulePkg.dsc +++ b/MdeModulePkg/MdeModulePkg.dsc @@ -76,7 +76,7 @@ DpcLib|MdeModulePkg/Library/DxeDpcLib/DxeDpcLib.inf SecurityManagementLib|MdeModulePkg/Library/DxeSecurityManagementLib/DxeSecurityManagementLib.inf TimerLib|MdePkg/Library/BaseTimerLibNullTemplate/BaseTimerLibNullTemplate.inf - SerialPortLib|MdePkg/Library/BaseSerialPortLibNull/BaseSerialPortLibNull.inf + SerialPortLib|MdeModulePkg/Library/BaseSerialPortLib16550/BaseSerialPortLib16550.inf^M CapsuleLib|MdeModulePkg/Library/DxeCapsuleLibNull/DxeCapsuleLibNull.inf PcdLib|MdePkg/Library/BasePcdLibNull/BasePcdLibNull.inf CustomizedDisplayLib|MdeModulePkg/Library/CustomizedDisplayLib/CustomizedDisplayLib.inf On Wed, Mar 20, 2019 at 12:06 PM Kinney, Michael D < michael.d.kinney@intel.com> wrote: > What are the PCDs settings you are using for the > SerialPortLib? > > Thanks, > > Mike > > > -----Original Message----- > > From: edk2-devel [mailto:edk2-devel-bounces@lists.01.org] > > On Behalf Of Jacob Burkholder > > Sent: Tuesday, March 19, 2019 7:06 PM > > To: edk2-devel@lists.01.org > > Subject: [edk2] SerialDxe with BaseSerialPortLib16550 and > > standard PC com port > > > > Greetings! > > > > I had trouble using SerialDxe.efi with > > BaseSerialPortLib16550 on a standard > > PC com port (com1). The PC is an asrock motherboard > > running whatever EFI > > bios it came with. I changed MdeModulePkg.dsc so that > > BaseSerialPortLib16550 would be used instead of > > BaseSerialPortLibNull and > > then rebuilt SerialDxe.efi and loaded and started it > > using > > BootServices->{LoadImage,StartImage}. > > > > Output works but input doesn't work, typed characters > > aren't received by > > the uart. I looked at the code briefly and it seems like > > the uart isn't > > initialized properly. I used this script to get input > > working (the > > commands should be self explanatory, they're not efi > > shell commands though): > > > > image SerialDxe.efi > > outb 0x3fb 0x83 > > outw 0x3f8 1 > > outb 0x3fb 0x3 > > outb 0x3fc 0x3 > > > > Any chance it can be fixed upstream? > > > > Thanks, > > > > Jake > > _______________________________________________ > > edk2-devel mailing list > > edk2-devel@lists.01.org > > https://lists.01.org/mailman/listinfo/edk2-devel >