Open namezys opened 11 months ago
There are outputs for:
Some additional info
From here: variants/baseboard/devicetree.cb
# PCI Express Port 3 for LAN, will be swapped to port 1 by FSP
device pci 1c.2 on
chip drivers/net
register "customized_leds" = "0x0fa5"
register "wake" = "GPE0_PCI_EXP"
device pci 00.0 on end
register "device_index" = "0"
end
end # PCI Express Port 3
device pci 1c.3 on
chip drivers/wifi/generic
register "wake" = "GPE0_PCI_EXP"
device pci 00.0 on end
end
end # PCI Express Port 4 for WLAN
I looked into src/device/pci_device.c
As I undertand, pci_probe_dev
expect that there is a WiFi device on 1c.3
.
I suppose that I can remove chip section:
# PCI Express Port 3 for LAN, will be swapped to port 1 by FSP
device pci 1c.2 on
chip drivers/net
register "customized_leds" = "0x0fa5"
register "wake" = "GPE0_PCI_EXP"
device pci 00.0 on end
register "device_index" = "0"
end
end # PCI Express Port 3
device pci 1c.3 on end # PCI Express Port 4 for WLAN
device pci 1c.4 on end # PCI Express Port 5 for NVMe
In this case I can lost ability to wake on lan
but it acceptable for me.
To be honest, I don't know how to build everything. If you have a build script, it would be very helpful.
As I undertand, pci_probe_dev expect that there is a WiFi device on 1c.3.
that is not correct. The PCIe port is enabled, and that's it. the comment is simply to indicate what device is attached / why it's enabled. pci_probe_dev has no expectation as to what device is going to be connected to the root port.
coreboot is simply failing to detect any device attached to the port, for reasons unknown. There are no changes which we can make to the devicetree/overrridetree which will change that behavior. I'd likely need to add some more debug output to coreboot to determine the source of the issue
Already tried... my card is a 2.5G Intel i225 v3 (M key). Tried on the NVME/SATA port and the WiFi port with an adapter. It works on any other pc I have tried.
already tried...what?
your other PC may have the the m.2 sockets wired differently so it's not directly comparable to that on TEEMO
is this similar to what you're trying to use? www.amazon.com/dp/B0BPCT87MS
This is the card that I have: https://vi.aliexpress.com/item/1005005101361503.html
I want to add more logs to open core. @MrChromebox just to confirm that I can build ROM using your script: coreboot/build-uefi.sh Also, can I extract blobs from the current UEFI. I have not saved the original one.
Maybe I'm not correct (I started to dig into opencore code yesteday) but I suggest that:
pci_probe_dev
gets preconfigured dev
else
branch and it can not read PCI_VENDOR_ID
null
BTW, if I can build it, I would be able to debug it.
struct device *pci_probe_dev(struct device *dev, struct bus *bus,
unsigned int devfn)
{
u32 id, class;
u8 hdr_type;
/* Detect if a device is present. */
if (!dev) {
struct device dummy;
...
id = pci_read_config32(&dummy, PCI_VENDOR_ID);
...
dev = alloc_dev(bus, &dummy.path);
} else {
...
id = pci_read_config32(dev, PCI_VENDOR_ID);
/*
* If the device does not have a PCI ID disable it. Possibly
* this is because we have already disabled the device. But
* this also handles optional devices that may not always
* show up.
*/
/* If the chain is fully enumerated quit */
if ((id == 0xffffffff) || (id == 0x00000000) ||
(id == 0x0000ffff) || (id == 0xffff0000)) {
if (dev->enabled) {
printk(BIOS_INFO,
"PCI: Static device %s not found, disabling it.\n",
dev_path(dev));
dev->enabled = 0;
}
return dev;
}
}
...
/* Display the device. */
printk(BIOS_DEBUG, "%s [%04x/%04x] %s%s\n", dev_path(dev),
dev->vendor, dev->device, dev->enabled ? "enabled" : "disabled",
dev->ops ? "" : " No operations");
return dev;
}
already tried...what?
Tried to add a second ethernet adapter to a CN65.
your other PC may have the the m.2 sockets wired differently so it's not directly comparable to that on TEEMO
Of course, tested to make sure card and adapter were working properly.
is this similar to what you're trying to use? www.amazon.com/dp/B0BPCT87MS
Different ethernet port breakout, but looks the same.
@MrChromebox just to confirm that I can build ROM using your script:
coreboot/build-uefi.sh
you would build using: ./build-uefi.sh fizz
if you don't supply the board name, it will build all 100+ boards that I support
@MrChromebox just to confirm that I can build ROM using your script: coreboot/build-uefi.sh
you would build using:
./build-uefi.sh fizz
if you don't supply the board name, it will build all 100+ boards that I support
Got it. I tried but there were compatibility issues.
Can you tell me what environment do you use? I tried Ubuntu 22.04. And do I need any binaries? As I can see there almost all binaries except CPU microcode
Ubuntu 2204 works fine. you need to properly set up the coreboot toolchain etc and clone submodules as per the setup instructions on coreboot.org. CPU microcode is included in the blobs submodule and will automatically be included in the build once the submodule is cloned
Thank you. It works on 22.04. Also, I looked into the build instructions for edk2 to add other packages.
Hey.
I have a great news:
01:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller (rev 15)
02:00.0 Ethernet controller: Realtek Semiconductor Co., Ltd. RTL8125 2.5GbE Controller (rev 05)
03:00.0 Non-Volatile memory controller: Samsung Electronics Co Ltd NVMe SSD Controller SM981/PM981/PM983
I built dozens of firmware with a lot of debugging and understood a lot about PCI probes/scans. However, nothing related to an attached device.
Next step I looked at the WiFi card and checked the pinout of M-2 A+E port.
One pin looked very promising: CLKREQ.
Next was RTL8125.
Here this pin is unconnected therefore it's tri-state.
From some documentation (short description of PCI-E):
The card must drive the CLKREQ# signal low during power up, whenever it is reset, and whenever it requires the reference clock to be in the active clock state.
As a next step, I tapped this pin on the WiFi card. After boot this card is dissapered from PCI devices.
And final step - just connect this to ground pin (right to CLKREQ#) on ethernet card.
And it is in device list right now.
Testing through iperf
Next task:
And I can confirm that there is only PCI-E x1
try to find if it's possible to disable checking CLKRTL# in firmware.
you can enable/disable/adjust CLKREQ for PCIe devices, see: /home/mattd/dev/coreboot/src/mainboard/google/fizz/variants/baseboard/devicetree.cb starting around line 161
Do you mean register "PcieRpClkReqSupport[3]" = "1"
.
I tried it. Looks like it's affects only devices and does not affect bus initialisation. So you can disable this feature on add-on card only. I should find the place there PCI bus initialisation. Also I'm looking where PCI lanes combined to links. I hope I can turn NVMe slot (x4) to two (2x2) PCI slots.
Also I'm looking where PCI lanes combined to links. I hope I can turn NVMe slot (x4) to two (2x2) PCI slots.
that's controlled by the soft straps in the IFD, you need Intel's FIT tool to configure, and flash externally
@MrChromebox Thank you. If you have something to start, it would be great. I found few information but helpful would be appreciate. However, this investigation will be much slower.
Also, I check mini-pci SATA that I tried to use on my previous Chromebox.
Looks like same issue. unfortunately, I don't have this old Chromebox any more and can't check.
Actually I got old Chromebox and tried this card. It works
I suppose that it would be great to write short manual how to enable this add-on card.
look at the Win-raid forums for the download you'll need for the FIT tool
Hey, guys.
Win-raid is very helpful.
Right now I found how to disable checking CLKREQ.
Continue to play around.
Did you ever get it working? I was tempted to try and add a 2.5Gb ethernet adapter there as well, but if the hardware requires special software, I'd be at a loss. Did you punch another hole out the back or side for the ethernet cable?
@windsifter
Did you ever get it working?
Yes. It's actually easy. Just pull down CLK enable pin to ground (I suppose you can use conductive ink)
I was tempted to try and add a 2.5Gb ethernet adapter there as well
We did it (Realtek 2.5Gb) and it works better than embodied RTL controller
if the hardware requires special software
Nothing special, this is general PCI bus so you need only driver for your card (I suppose that you have Realtek or Intel)
Did you punch another hole out the back or side for the ethernet cable?
Right now it's open but we want to print a new case. So it is not a big issue for us.
PS: I'm thinking about bifurcation of NVMe but I need an adapter. It can be ordered from GLS PCB but the cost of one will be about $2-3 in case of order about 10 pieces and $20 in case of only one
@MrChromebox - is there a built-in firmware way of doing this now or do I still need to bridge that pin to ground? I'm on Kuldax and facing the same issue (card not detected) with an intel i226-v A+E m.2 2.5Gbps NIC card.
@wicadmin there is no way to modify this area of firmware from software, the only one way is to flash directly with programmer. And no general way to modify it - each case is unique and can depend on small hardware changes like revision.
Just as bridge between two pins with conduction ink and it will be enough.
@namezys - thanks. Do you know if just masking off the CLK REQ pin with plastic tape would work? I had done this with an HBA storage card a while back.
https://yannickdekoeijer.blogspot.com/2012/04/modding-dell-perc-6-sas-raidcontroller.html
@wicadmin the slot is too tight… so usually impossible
Oops. You can’t masked off this pin, it must be pull down to ground.
Oops. You can’t masked off this pin, it must be pull down to ground.
Yep, masked it and still it didn't show up :-)
OK, trying with what conductive paint I have. I found some cold galvanized paint (zinc only). See if it conducts when dried, no luck while still wet.
well, apparently the pin next to what is supposed to be the CLK REQ is not a ground pin (Only the tall square top pins are ground)
Per this, it appears the pins for A+E are different from B or M. https://w.electrodragon.com/w/M.2_Pins
Well, I overlayed the card that came with the chromebox (e-key) but most of the PCI pins not lining up. I assume this may be part of the issue.
@wicadmin I'm sure that this misplacement should not be an issue (95%, of course stupidness of engineer is possible).
However, It looks like SATA card. Missing pins are 2 data stream (up and down) and clock. I'm always mixed up different slots but I feel than 4 couples of missing pins are:
Also pairs of data and clock is separated by one ground.
Can you send pics of all cards, maybe I will be more precise because we are working on NSA for home and I read a lot.
@namezys - these are the photos. The orginal wifi/bluetoothj combo that came with the chromebox and the A+E 2.5Gbps nic.
I want to add 2.5Gb ethernet card to my chromebox. I added it and it doesn't work.
Some information about system:
firmware-util.sh output:
Replace WiFi card with ethernet card Realtek RTL8125B:
On-board ethernet: RTL8111:
There is no new device in
lspci
at all.I did some investigation.
fizz
board.cbmem -1
for cases with WiFi card and and with 2.Gb ethernet.There is a significant difference:
Next is trying to look into
overridetree.cb
. Looks like it is incorrect:coreboot/src/mainboard/google/fizz/variants/fizz/overridetree.cb
BTW I can see something like:
My suggestion is that this
PCI 02:
can be used only with WiFi. In the case of another device class, it would not be accepted and this device is disabled.Can you help me to realize what happened?