Files
xen/docs/misc/printk-formats.txt
T
Roger Pau Monne 1ee1441835 print: introduce a format specifier for pci_sbdf_t
The new format specifier is '%pp', and prints a pci_sbdf_t using the
seg:bus:dev.func format. Replace all SBDFs printed using
'%04x:%02x:%02x.%u' to use the new format specifier.

No functional change intended.

Signed-off-by: Roger Pau Monné <roger.pau@citrix.com>
Reviewed-by: Kevin Tian <kevin.tian@intel.com>
Acked-by: Julien Grall <julien.grall@arm.com>
For just the pieces where Jan is the only maintainer:
Acked-by: Jan Beulich <jbeulich@suse.com>
2020-07-28 19:33:28 +01:00

56 lines
1.7 KiB
Plaintext

Xen custom %p format options. A subset, borrowed from Linux.
All parameters to a %p option should be compatible with void*. Regular
pointers are fine. Numbers should make use of the _p() macro.
Raw buffer as hex string:
%*ph 00 01 02 ... 3f
%*phC 00:01:02: ... :3f
%*phD 00-01-02- ... -3f
%*phN 000102 ... 3f
Up to 64 characters. Buffer length expected via the field_width
paramter. i.e. printk("%*ph", 8, buffer);
Bitmaps (e.g. cpumask/nodemask):
%*pb 4321
%*pbl 0,5,8-9,14
Print a bitmap as either a hex string, or a range list. Bitmap length
(in bits) expected via the field_width parameter.
Symbol/Function pointers:
%ps Symbol name with condition offset and size (iff offset != 0)
e.g. printk
default_idle+0x78/0x7d
%pS Symbol name with unconditional offset and size
e.g. printk+0/0x48
default_idle+0x78/0x7d
In the case that an appropriate symbol name can't be found, %p[sS] will
fall back to '%p' and print the address in hex.
Domain and vCPU information:
%pd Domain from a 'struct domain *'
Regular domains are printed with their ID in decimal. System
domains are printed with their name.
e.g. d0
d[IDLE]
%pv Domain and vCPU ID from a 'struct vcpu *'
The domain part as above, with the vcpu_id printed in decimal.
e.g. d0v1
d[IDLE]v0
PCI:
%pp PCI device address in S:B:D.F format from a pci_sbdf_t.
e.g. 0004:02:00.0