2022年12月11日 星期日

RU 5.32.0423 BETA

 This version supports accessing PCI segments.

  • RU.EFI: Support PCI segments
    • By default it still accesses the segment 0 by 0xCF8 / 0xCFC, you can use "/S10" command line argument to force RU.EFI to call PciIo protocol
    • PCI segment > 0: It calls PciIo protocol
    • F6 list format is displayed as Segment/Bus:Device:Function (00/00:00:00)
  • Shift-F2 save memory as binary supports all memory read bus_type: PCIE, Variables, AHCI, USB, ACPI, SMBIOS
  • Fix Shift-F2 saves memory binary always saved the wrong size
  • Fix ALT-= UEFI variables hangs with big-size variable
  • Fix data saved by "RU /D SMBIOS " is wrong
  • Fix a bug of ALT-3 detecting SMSC SIO

 

Get the encrypted zip file here

Password: CC!2AmMWZSa4f3D8


15 則留言:

  1. Hi James, I use this version to check, PCI segments is correct, can see CPU1's pci device,
    but I check CPU1's pci device serr function found can't be trigger, CPU0 is can trigger, can you help to check this problem? thanks.
    trigger PCI SERR command: FF at 07 and 01 at 43.

    回覆刪除
  2. Hi @Whyte,

    Is it working if you use mm or pci commands in UEFI shell?

    回覆刪除
  3. Hi James
    I'm not sure waht to do, did you mean at UEFI shell and use pci command to set FF at 07 and 01 at 43? thanks~

    回覆刪除
  4. Hi James
    I use PCI to found my pci scsi card:
    PCI Segment 01 Bus 41 Device 04 Func 00
    And I use command: pci 41 04 00 -s 01 -i
    can get configuration space:

    PCI Segment 01 Bus 41 Device 04 Func 00 [EFI 0141040000]
    00000000: 05 90 17 80 40 01 30 04-10 00 00 01 10 20 00 00 *....@.0...... ..*
    00000010: 01 C1 00 00 04 00 18 E5-00 00 00 00 01 C0 00 00 *................*
    00000020: 00 00 00 00 00 00 00 00-00 00 00 00 05 90 45 00 *..............E.*
    00000030: 00 00 10 E5 DC 00 00 00-00 00 00 00 FF 01 28 19 *..............(.*

    00000040: C4 83 00 00 00 00 00 00-00 00 00 00 00 00 00 00 *................*
    00000050: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 *................*
    00000060: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 *................*
    00000070: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 *................*
    00000080: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 *................*
    00000090: 00 00 00 00 07 00 42 00-20 41 03 06 00 00 00 00 *......B. A......*
    000000A0: 05 94 82 00 00 00 00 00-00 00 00 00 00 00 00 00 *................*
    000000B0: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 *................*
    000000C0: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 *................*
    000000D0: 00 00 00 00 00 00 00 00-00 00 00 00 01 A0 02 00 *................*
    000000E0: 00 00 00 00 00 00 00 00-00 00 00 00 00 00 00 00 *................*
    000000F0: 00 00 00 00 00 00 00 00-00 00 00 0C 00 00 00 00 *................*

    Vendor ID(0): 9005 Device ID(2): 8017
    Command(4): 0140
    (00)I/O space access enabled: 0 (01)Memory space access enabled: 0
    (02)Behave as bus master: 0 (03)Monitor special cycle enabled: 0
    (04)Mem Write & Invalidate enabled: 0 (05)Palette snooping is enabled: 0
    (06)Assert PERR# when parity error: 1 (07)Do address/data stepping: 0
    (08)SERR# driver enabled: 1 (09)Fast back-to-back transact...: 0

    Status(6): 0430
    (04)New Capabilities linked list: 1 (05)66MHz Capable: 1
    (07)Fast Back-to-Back Capable: 0 (08)Master Data Parity Error: 0
    (09)DEVSEL timing: Slow (11)Signaled Target Abort: 0
    (12)Received Target Abort: 0 (13)Received Master Abort: 0
    (14)Signaled System Error: 0 (15)Detected Parity Error: 0

    Revision ID(8): 10 BIST(0F): Incapable
    Cache Line Size(C): 10 Latency Timer(D): 20
    Header Type(0E): 00, Single function, PCI device
    Class: Mass Storage Controller - SCSI - SCSI controller


    And then I check mm to set: mm 014104000 -PCIE
    and clcik enter to 01410400043 and set 01 then system will hang and BMC can get SERR log, so looks like can work at EFI shell, can you help to check tool? thanks!

    回覆刪除
  5. Hi @Whyte

    I will check why writing is not working.
    But it will take some time.

    回覆刪除
  6. Does hello.ru support Legacy mode?

    回覆刪除
  7. Yes RU.EXE is an legacy mode DOS application.

    回覆刪除
  8. Hi James,
    We met one problem that some MSRs may not be supported in some CPUs.
    And that causes the general-protection Exception (13).
    Is it possible to add some exception handling for fault-tolerance?

    Thank you
    Bin

    回覆刪除
  9. Hi Bin,

    GP fault exception was already added. Can you please try "RU /s1"? It just read standard MSRs. If it does not hang then it means the exception handler is not working.

    回覆刪除
  10. Hi James,

    最近在玩Ovmf, X64 發現ru.efi在rev 370以後會assert
    [Security] 3rd party image[0] can be loaded after EndOfDxe: PciRoot(0x0)/Pci(0x1,0x1)/Ata(Primary,Master,0x0)/HD(1,MBR,0xBE1AFDFA,0x3F,0xFBFC1)/\RU423.efi.
    InstallProtocolInterface: 5B1B31A1-9562-11D2-8E3F-00A0C969723B BE397040
    Loading driver at 0x000BE135000 EntryPoint=0x000BE1352E0
    InstallProtocolInterface: BC62157E-3E33-4FEC-9920-2D3B36D750DF BE398918
    ProtectUefiImageCommon - 0xBE397040
    - 0x00000000BE135000 - 0x0000000000067BC0
    InstallProtocolInterface: 752F3136-4E16-4FDC-A22A-E5F46812F4CA BFE97868
    ASSERT d:\code\edk2\MdeModulePkg\Core\Dxe\Mem\Pool.c(715): Tail->Signature == ((('p') | ('t' << 8)) | ((('a') | ('l' << 8)) << 16))

    Rev. 363是好的
    我有把qemu開到4G memory了 也是一樣assert在這裡~
    不曉得這會是什麼問題?
    edk2使用的是edk2-stable202108

    回覆刪除
  11. Preparation:
    1. Build OvmfPkg with EDK2 codebase
    build -a X64 -p OvmfPkg/OvmfPkgx64.dsc
    Get Ovmf.fd after build successfully.
    2. Install qemu(qemu-w64-setup-20230424.exe <- the version i use).
    https://qemu.weilnetz.de/w64/
    Execution:
    1. Use qemu to run ovmf.fd, with bios log saved and emulate a virtual disk
    we can put .efi files in the virtual disk to run it once it boots into shell.
    here, I put everything include ovmf.fd and efi files in D:\temp, set "C:\Program Files\qemu" to PATH in windows.
    run below command:
    D:\temp\qemu -bios ovmf.FD -debugcon file:debug.log -global isa-debugcon.iobase=0x402 -hda fat:rw:d:\temp\ -m 4G

    The bios serial log debug.log will be saved in the same directory(the ovmfpkg is default built with DEBUG MODE).

    回覆刪除
  12. sorry, command should be
    D:\temp\qemu-system-x86_64.exe-bios ovmf.FD -debugcon file:debug.log -global isa-debugcon.iobase=0x402 -hda fat:rw:d:\temp\ -m 4G

    because I copy qemu-system-x86_64.exe as qemu.exe to make the command easier.

    回覆刪除
  13. Hi YouGotIt,

    I think RU have accessed directly to some H/W that caused the problem. Will use the OVMF to debug. Thanks for the details.

    回覆刪除
  14. Hi YouGotIt,

    I got the assert problem fixed, thanks for reporting this bug.

    回覆刪除

歡迎留下意見, 但是我可能會回可能不會回
I may or may not respond, but welcome.