On 11/7/23 11:12, Chao Li wrote: > Hi Gerd, > > These two libraries is not only copy code, the way of obtain the serial > base address is different from ARM, and the early serial port output > also different from ARM, so these two libraries are LoongArch specific.
I think we're going to have to go through the design with "baby steps". The commit message of the patch is empty. Please don't expect reviewers to "reverse engineer" the design from the code. That's hugely taxing. It's hard enough to review code when we precisey know in advance, from the commit message, what the code will try to achieve. You are saying that the way to obtain serial base address is different from ARM, yet the GetSerialConsolePortAddress() function looks very similar to the function that I *replaced* in recent commits eb83b5330961 ("ArmVirtPkg: introduce FdtSerialPortAddressLib", 2023-10-26) and f078a6fdd4d7 ("ArmVirtPkg/Fdt16550SerialPortHookLib: rebase to FdtSerialPortAddressLib", 2023-10-26). So there are two issues with your GetSerialConsolePortAddress() function immediately, I would say: - you say that it's different from ARM, but it seems to parse the DTB identically (or mostly identically -- I'm speaking from memory), - I factored out the subject DTB parsing logic in the above-noted commits recently, so even if your GetSerialConsolePortAddress() function is *supposed* to parse the DTB identically to ARM, then the way to employ that logic is different; it should be reused, not duplicated. Now that you have a running prototype (basically evidence that the port to this new architecture can be done), can we go through the design of each component (library, driver etc) one by one? Dumping the whole thing on reviewers all at once, with little documentation, is not helpful. We basically need to start with the specification of each of your modules. See where the existing components in edk2 are not good enough or not flexible enough, etc. Laszlo -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#110931): https://edk2.groups.io/g/devel/message/110931 Mute This Topic: https://groups.io/mt/102413885/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/leave/9847357/21656/1706620634/xyzzy [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-