On 08/27/14 21:02, Ard Biesheuvel wrote: > On 27 August 2014 20:17, Peter Maydell <[email protected]> wrote: >> On 27 August 2014 19:15, Olivier Martin <[email protected]> wrote: >>> I have been through the patchset yet. But I noticed the name of the platform >>> in another email. >>> Is this new platform AArch64 specific? Could we imagine this platform being >>> easily ported to ARMv7 (with Virtualization extension)? >> >> No, it's not 64-bit specific. QEMU supports this same board model >> for both 64-bit and 32-bit CPU types, and we're expecting it to be >> used for both with KVM. >> > > You are right. I inherited the name from Michael Casadevall, and did > not give it any more thought, but in fact, there is very little code > in there that is specific to AArch64 > > I will change the names when I spin a v4.
Please skim the UINTN variables too, I vaguely remember that at some point in my earlier review I said "this is OK because the code is 64-bit only". ... It might have been in relation to DEBUGs and their format strings. The general rule for printing an UINTN in code that can be both 32-bit and 64-bit is to always cast it to UINT64 explicitly, and use %Lx. When padding to a specific field width, say 016. ( The conversion specifiers in edk2 DEBUGs have a few quirks. For example, you can't print *all* unsigned integers in *decimal*; there's no %u support. You can only print the full range of unsigned integer types in hex (%x, %Lx). There's one "trick" for UINT32 though: you can cast such to INT64 losslessly, then print them with %Ld, in decimal. But there is no decimal support for the full range of UINT64. Another quirk is that the "L" (and "l") modifiers don't stand for "long", they mean "64-bit", even in ILP32 builds. That's why I always use "L" rather than "l" for UINT64 / INT64: "L" doesn't exist in standard C, nor in POSIX, for integers, hence it stands out from the edk2 source as a non-portable length modifier. ) Thanks Laszlo ------------------------------------------------------------------------------ Slashdot TV. Video for Nerds. Stuff that matters. http://tv.slashdot.org/ _______________________________________________ edk2-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/edk2-devel
