While looking at VM bootup times, we stumbled over the fact that the NVMe
code only does I/O operations of up to 4kb at a given point in time. This
is usually ok, but if you have an OS that loads a lot of data on boot in
combination to network backed storage, it shows in bootup times.
There is no need to restrict ourselves to 4kb though. The INT13 call we
receive gives us much larger chunks which we can just map into a native
bigger NVMe I/O call if the request buffer is page aligned.
This patch implements all logic required to do the above and gives a
substantial performance boost on boot.
v1 -> v2:
- fix dprintf
- Fix bounds check on PRP list add logic
- Reduce PRP list to 15 entries embedded in the ns struct.
This reduces BIOS reserved memory footprint by 4kb.
v2 -> v3:
- new patch: nvme: Split requests by maximum allowed size
- Adjust the maximum request size to sector units. The hardware field
describes it in pages.
Alexander Graf (4):
nvme: Record maximum allowed request size
nvme: Allow to set PRP2
nvme: Pass large I/O requests as PRP lists
nvme: Split requests by maximum allowed size
src/hw/nvme-int.h | 16 ++++++-
src/hw/nvme.c | 122 +++++++++++++++++++++++++++++++++++++++++++++++-------
2 files changed, 121 insertions(+), 17 deletions(-)
--
2.16.4
Amazon Development Center Germany GmbH
Krausenstr. 38
10117 Berlin
Geschaeftsfuehrung: Christian Schlaeger, Jonathan Weiss
Eingetragen am Amtsgericht Charlottenburg unter HRB 149173 B
Sitz: Berlin
Ust-ID: DE 289 237 879
This series implements support for SMBIOS 3.0 entry points in
SeaBIOS.
The main advantage of SMBIOS 3.0 entry points is the higher limit
for total table size. The SMBIOS 2.1 64435 bytes limit can be
easily hit in QEMU if creating virtual machines with more than
720 VCPUs.
Eduardo Habkost (19):
biostables: copy_fseg_table() function
util.h: Delete unused get_smbios_entry_point() prototype
smbios: Rename code specific for SMBIOS 2.1 entry points
smbios: Generic smbios_next() function
smbios: smbios_get_tables() function
smbios: Use smbios_get_tables()/smbios_next() at display_uuid()
smbios: smbios_major_version()/smbios_minor_version() helpers
tpm: Use smbios_get_tables()
csm: Don't check SMBios21Addr before calling copy_smbios_21()
smbios: Make SMBios21Addr variable static
smbios: Use smbios_next() at smbios_romfile_setup()
smbios: Extract SMBIOS table building code to separate function
smbios: Make smbios_build_tables() more generic
smbios: smbios_21_setup_entry_point() function
smbios: Make some smbios_build_tables() arguments optional
smbios: Make smbios_build_tables() ready for 64-bit tables
smbios: copy_smbios_30() function
smbios: Support SMBIOS 3.0 entry point at copy_table()
smbios: Support SMBIOS 3.0 entry point at smbios_romfile_setup()
src/std/smbios.h | 17 ++-
src/util.h | 5 +-
src/fw/biostables.c | 259 +++++++++++++++++++++++++++++++++-----------
src/fw/csm.c | 6 +-
src/fw/smbios.c | 12 +-
src/tcgbios.c | 12 +-
6 files changed, 227 insertions(+), 84 deletions(-)
--
2.28.0
This patch series make seabios linkable with lld.
This is beneficial for FreeBSD ports as well
https://svnweb.freebsd.org/ports/head/misc/seabios/Makefile
as they can drop an LLD_UNSAFE
As a maintainer of lld ELF, I have triaged numerous pieces of software.
seabios is the only one making use of
This drops the only instance https://sourceware.org/bugzilla/show_bug.cgi?id=12726
1, 2, 3 and 4 are really independent and can be applied in arbitrary order.
5 depends on 4. I originally combined 4 and 5 and that was why I don't think a patch series made sense.
Fangrui Song (5):
romlayout.S: Add missing SHF_ALLOC flag to .fixedaddr.\addr
Make rom16.o linkable with lld
Makefile: Change ET_EXEC to ET_REL so that lld can link bios.bin.elf
romlayout32flag.lds: Use `. +=` instead of `. =`
test-build.sh: Delete unneeded LD capability test
Makefile | 4 ++++
scripts/layoutrom.py | 13 ++++++++++---
scripts/test-build.sh | 42 +-----------------------------------------
src/romlayout.S | 2 +-
4 files changed, 16 insertions(+), 45 deletions(-)
--
2.26.0.292.g33ef6b2f38-goog
When binding AHCI controller to virtual machine, the attached ATA device cannot be recognized for the following reason:
The first Identify PACKET CMD will be failed without dobut which will lead PORT_IRQ_TF_ERR be set in PxIS due to ERR bit set to 1 in D2H Register FIS(PxTFD.STS.ERR=1). In this case, the first CMD will be timeout for seabios only polling PORT_IRQ_D2H_REG_FIS & PORT_IRQ_PIOS_FIS before triggering error handling which leads AHCI controller is an error state, then the second IDENTIFY CMD cannot be issued by AHCI controller, no ATA device will be detected.
In AHCI spec HBA Port State Machine section(5.3.8.1 and 5.3.16.5), we can see this sequence: RegFIS:Entry --> ERR:FatalTaskfile (PxTFD.STS.ERR=1) --> ERR:WaitForClear, no entry for PORT_IRQ_D2H_REG_FIS/PORT_IRQ_PIOS_FIS to be set at this time.
May be we can also add PORT_IRQ_TF_ERR bit check when polling command completion status?
fail log:
02.386: |bffa6000| AHCI/1: link up
02.387: |bffa6000| AHCI/1: send cmd ...
02.387: |bffa7000| phys_free bffa9c00 (detail=0xbffaa320)
02.396: |bffa7000| phys_free bffaa200 (detail=0xbffaa1d0)
02.396: |bffa7000| phys_free bffaa000 (detail=0xbffaa1a0)
02.396: |bffa7000| phys_free bffaa380 (detail=0xbffaa350)
02.400: \bffa7000/ End thread
02.401: phys_free bffa7000 (detail=0xbffaa170)
34.391: |bffa6000| WARNING - Timeout at ahci_command:153!
34.392: |bffa6000| AHCI/1: send cmd ...
66.397: |bffa6000| WARNING - Timeout at ahci_command:153!
Signed-off-by: zhaoxin\runaguooc <RunaGuo-oc(a)zhaoxin.com>
---
src/hw/ahci.c | 10 +++++++++-
1 file changed, 9 insertions(+), 1 deletion(-)
diff --git a/src/hw/ahci.c b/src/hw/ahci.c index d45b430..bab5c35 100644
--- a/src/hw/ahci.c
+++ b/src/hw/ahci.c
@@ -104,7 +104,7 @@ static void ahci_port_writel(struct ahci_ctrl_s *ctrl, u32 pnr, u32 reg, u32 val static int ahci_command(struct ahci_port_s *port_gf, int iswrite, int isatapi,
void *buffer, u32 bsize) {
- u32 val, status, success, flags, intbits, error;
+ u32 val, status, success, flags, intbits, error, tf;
struct ahci_ctrl_s *ctrl = port_gf->ctrl;
struct ahci_cmd_s *cmd = port_gf->cmd;
struct ahci_fis_s *fis = port_gf->fis; @@ -148,6 +148,14 @@ static int ahci_command(struct ahci_port_s *port_gf, int iswrite, int isatapi,
error = GET_LOWFLAT(fis->rfis[3]);
break;
}
+
+ if(intbits & PORT_IRQ_TF_ERR){
+ tf = ahci_port_readl(ctrl,pnr,PORT_TFDATA);
+ status = tf & 0xff;
+ error = tf & 0xff00;
+ break;
+ }
+
}
if (timer_check(end)) {
warn_timeout();
--
2.17.1
At least some USB drives with a write protect switch (e.g. Netac U335)
could report "MEDIUM NOT PRESENT" for a while if a write protection is
enabled. Instead of stopping the initialization attempts immediately,
stop only after getting this report for 3 times, to ensure the
successful initialization of such a "broken hardware".
Signed-off-by: Mike Banon <mikebdp2(a)gmail.com>
diff --git a/src/hw/blockcmd.c b/src/hw/blockcmd.c
index 1f15081..6b6fea9 100644
--- a/src/hw/blockcmd.c
+++ b/src/hw/blockcmd.c
@@ -144,8 +144,9 @@ scsi_is_ready(struct disk_op_s *op)
dprintf(6, "scsi_is_ready (drive=%p)\n", op->drive_fl);
/* Retry TEST UNIT READY for 5 seconds unless MEDIUM NOT PRESENT is
- * reported by the device. If the device reports "IN PROGRESS",
+ * reported by the device 3 times. If the device reports "IN PROGRESS",
* 30 seconds is added. */
+ int tries = 3;
int in_progress = 0;
u32 end = timer_calc(5000);
for (;;) {
@@ -167,8 +168,11 @@ scsi_is_ready(struct disk_op_s *op)
// Sense succeeded.
if (sense.asc == 0x3a) { /* MEDIUM NOT PRESENT */
- dprintf(1, "Device reports MEDIUM NOT PRESENT\n");
- return -1;
+ tries--;
+ dprintf(1, "Device reports MEDIUM NOT PRESENT - %d tries left\n",
+ tries);
+ if (!tries)
+ return -1;
}
if (sense.asc == 0x04 && sense.ascq == 0x01 && !in_progress) {
Hi,
The Open Source Firmware, BMC and Bootloader devroom will take place
on Sunday, 7th February 2021 at FOSDEM, virtual.
Call for Participation
----------------------
We are opening the call for participation to our devroom, with the deadline
for talk proposals set to Sunday, 20th December 2020 23:59:59 UTC.
Devroom Scope
-------------
The devroom will focus on various topics related to the open source
firmware,
BMC and bootloaders including security issues. It will help to get together
all interested people in one place, present and discuss current developments
and issues haunting the community. Additionally, it will foster awareness
among attendees about pre-OS topics.
Possible topics: GRUB, TrustedGRUB, iPXE, TrenchBoot, coreboot, LinuxBoot,
SeaBIOS, UEFI, OVMF, TianoCore, hostboot, IPMI, OpenBMC, u-bmc, TPM,
attestation, security of firmware, BMC, bootloaders and related topics and
technologies.
Ideal submissions are actionable and opinionated. Submissions may be in the
form of 25 or 45 minutes talks, panel sessions or round-table discussions.
Dates
-----
Submission Deadline: 20-Dec-2020 @ 23:59:59 UTC
Acceptance Notification: 31-Dec-2020
Final Schedule Posted: 31-Dec-2020
Recording and uploading presentations: 04-Jan-2021 - 16-Jan-2021
Processing, reviewing, fixing videos: 17-Jan-2021 - 31-Jan-2021
How to submit
--------------
Visit https://penta.fosdem.org/submission/FOSDEM21
1) If you do not have an account, create one here
2) Click "Create Event"
3) Enter your presentation details
4) Be sure to select the Open Source Firmware,
BMC and Bootloader devroom track!
5) Submit
What to include
---------------
- The title of your submission
- A 1-paragraph abstract
- A longer description including the benefit of your talk to your target
audience, including a definition of your target audience
- Approximate length/type of submission (talk, BoF, ...)
- Links to related websites/blogs/talk material (if any)
Administrative Notes
--------------------
Since the FOSDEM21 is going virtual, the talks will be prerecorded. We
will be
streaming the recordings and performing live Q&A of the Open Source
Firmware,
BMC and Bootloader devroom. Presenting at FOSDEM implies permission to
record
your session and distribute the recording afterwards. All videos will be
made
available under the standard FOSDEM content license (CC-BY).
If you have any questions, feel free to contact the devroom organizers:
Daniel Kiper (daniel.kiper at oracle.com) and
Michał Żygowski (michal.zygowski at 3mdeb.com).
Daniel & Michał