[SeaBIOS] [PATCH 3/5] nvme: Convert nvme_build_prpl() to nvme_prpl_xfer()

2022-01-19 Thread Kevin O'Connor
Rename nvme_build_prpl() to nvme_prpl_xfer() and directly invoke nvme_io_xfer() or nvme_bounce_xfer() from that function. Signed-off-by: Kevin O'Connor --- src/hw/nvme-int.h | 1 - src/hw/nvme.c | 42 -- 2 files changed, 16 insertions(+), 27

[SeaBIOS] [PATCH 2/5] nvme: Add nvme_bounce_xfer() helper function

2022-01-19 Thread Kevin O'Connor
Move bounce buffer processing to a new helper function. Signed-off-by: Kevin O'Connor --- src/hw/nvme.c | 35 +-- 1 file changed, 21 insertions(+), 14 deletions(-) diff --git a/src/hw/nvme.c b/src/hw/nvme.c index a97501b..fd7c1d0 100644 --- a/src/hw/nvme.c +++

[SeaBIOS] [PATCH 1/5] nvme: Rework nvme_io_readwrite() to return -1 on error

2022-01-19 Thread Kevin O'Connor
Rename nvme_io_readwrite() to nvme_io_xfer() and change it so it implements the debugging dprintf() and it returns -1 on an error. Signed-off-by: Kevin O'Connor --- src/hw/nvme.c | 34 +- 1 file changed, 17 insertions(+), 17 deletions(-) diff --git

[SeaBIOS] [PATCH 0/5] Rework NVME page transfers and avoid fsegment allocation

2022-01-19 Thread Kevin O'Connor
Hi Alex, I was looking at your recent fix for SeaBIOS NVME. I agree that it is not valid to write to the f-segment during runtime. However, I was struggling to understand the PRP list management in the nvme.c code. I came up with a different implementation that avoids allocating another buffer

[SeaBIOS] Re: [PATCH] nvme: Move PRP data to ZoneHigh

2022-01-19 Thread Matt DeVillier
verified working on Purism Librem hardware :) perhaps worth rolling into a 1.15.1 release, so that coreboot doesn't have to roll back to 1.14.0 until 1.16.0 is released? On Wed, Jan 19, 2022 at 8:22 AM Alexander Graf wrote: > > Commit 01f2736cc905d ("nvme: Pass large I/O requests as PRP lists")

[SeaBIOS] [PATCH] nvme: Only allocate one dma bounce buffer for all nvme drives

2022-01-19 Thread Kevin O'Connor
There is no need to create multiple dma bounce buffers as the BIOS disk code isn't reentrant capable. Signed-off-by: Kevin O'Connor --- This is a minor cleanup on top of the previous nvme code series. -Kevin --- src/hw/nvme-int.h | 3 --- src/hw/nvme.c | 14 +- 2 files

[SeaBIOS] [PATCH 5/5] nvme: Build the page list in the existing dma buffer

2022-01-19 Thread Kevin O'Connor
Commit 01f2736cc905d ("nvme: Pass large I/O requests as PRP lists") introduced multi-page requests using the NVMe PRP mechanism. To store the list and "first page to write to" hints, it added fields to the NVMe namespace struct. Unfortunately, that struct resides in fseg which is read-only at

[SeaBIOS] [PATCH 4/5] nvme: Pass prp1 and prp2 directly to nvme_io_xfer()

2022-01-19 Thread Kevin O'Connor
When using a prp2 parameter, build it in nvme_prpl_xfer() and pass it directly to nvme_io_xfer(). Signed-off-by: Kevin O'Connor --- src/hw/nvme.c | 39 ++- 1 file changed, 18 insertions(+), 21 deletions(-) diff --git a/src/hw/nvme.c b/src/hw/nvme.c index

[SeaBIOS] [PATCH] nvme: Move PRP data to ZoneHigh

2022-01-19 Thread Alexander Graf via SeaBIOS
Commit 01f2736cc905d ("nvme: Pass large I/O requests as PRP lists") introduced multi-page requests using the NVMe PRP mechanism. To store the list and "first page to write to" hints, it added fields to the NVMe namespace struct. Unfortunately, that struct resides in fseg which is read-only at

[SeaBIOS] Re: Git Repo https circularly redirecting to itself?

2022-01-19 Thread Paul Menzel
Dear Pvt, Am 03.01.22 um 05:27 schrieb Pvt Snafu via SeaBIOS: Anyone else having a problem accessing https://git.seabios.org/seabios.git/ tonight? For me, it's just doing 301 redirects to itself until my client gives up. Same for a web browser. cURL output: < HTTP/2 301 < server: nginx

[SeaBIOS] Re: [PATCH] sercon: add missing GET_LOW() to access rx_bytes

2022-01-19 Thread Kevin O'Connor
On Wed, Jan 19, 2022 at 10:08:49PM +0100, Volker Rümelin wrote: > The variable rx_bytes is marked VARLOW. Add a missing GET_LOW() > to access rx_bytes. > > Reported-by: Gabe Black > Signed-off-by: Volker Rümelin Thanks. Good catch! I think we should fix this by copying the contents into a

[SeaBIOS] [PATCH] sercon: add missing GET_LOW() to access rx_bytes

2022-01-19 Thread Volker Rümelin
The variable rx_bytes is marked VARLOW. Add a missing GET_LOW() to access rx_bytes. Reported-by: Gabe Black Signed-off-by: Volker Rümelin --- src/sercon.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/sercon.c b/src/sercon.c index 66a1f24..a33dd08 100644 ---

[SeaBIOS] Re: [PATCH v3 4/4] nvme: Split requests by maximum allowed size

2022-01-19 Thread Alexander Graf via SeaBIOS
Hi Matt, On 18.01.22 18:46, Matt DeVillier wrote: and attempting to boot from it: Booting from Hard Disk... sq 0x7aa77bdf next_sqe 0 sq 0x7aa77bdf commit_sqe 0 cq 0x7aa77bf1 head 0 -> 1 sq 0x7aa77bdf advanced to 1 ns 1 read lba 0+1: 0 Booting from :7c00 sq 0x7aa77bdf next_sqe 1 sq