OUT BOOLEAN *IsFinal\r
)\r
{\r
+ BOOLEAN AcceptSlash = FALSE;\r
+\r
//\r
// A leading slash is expected. End of string is tolerated.\r
//\r
return RETURN_INVALID_PARAMETER;\r
}\r
\r
+ if (SubstringEq (OfwNode->DriverName, "rom")) {\r
+ //\r
+ // bug compatibility hack\r
+ //\r
+ // qemu passes fw_cfg filenames as rom unit address.\r
+ // The filenames have slashes:\r
+ // /rom@genroms/linuxboot_dma.bin\r
+ //\r
+ // Alow slashes in the unit address to avoid the parser trip up,\r
+ // so we can successfully parse the following lines (the rom\r
+ // entries themself are ignored).\r
+ //\r
+ AcceptSlash = TRUE;\r
+ }\r
+\r
//\r
// unit-address\r
//\r
\r
OfwNode->UnitAddress.Ptr = *Ptr;\r
OfwNode->UnitAddress.Len = 0;\r
- while (IsPrintNotDelim (**Ptr)) {\r
+ while (IsPrintNotDelim (**Ptr) || (AcceptSlash && **Ptr == '/')) {\r
++*Ptr;\r
++OfwNode->UnitAddress.Len;\r
}\r