/Per,

PCD's are a Platform Configuration Database that is used in the edk2. Values 
can be compiled in, patched in binaries, or looked up dynamically in a 
database. The idea is the consuming code, like the UefiPxeBcDxe driver, codes 
stays the same and the platform sets the mechanism that is used. It looks like 
value you care about is resolving to a compiled in constant. 

If you want to change the value in the build go to  OvmfPkg/OvmfPkgX64.dsc (or 
the platform build DSC file you are using) under the [PcdsFixedAtBuild] section 
add this line:
  gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport|0

This PCD value is defined here: NetworkPkg/NetworkPkg.dec
[PcdsFixedAtBuild, PcdsPatchableInModule, PcdsDynamic, PcdsDynamicEx]
...
  ## IPv4 PXE support
  # 0x01 = PXE Enabled
  # 0x00 = PXE Disabled
  gEfiNetworkPkgTokenSpaceGuid.PcdIPv4PXESupport|0x01|UINT8|0x10000009

The list of types define (DEClare) the legal PCD types and the default value. 
Adding the info to the OVMF DSC file lets the platform build control the PCD 
type and the default value. 

Feel free to file a bugzilla and ask for a command line build option to control 
this feature. 

Thanks,

Andrew Fish


> On Mar 27, 2020, at 8:51 AM, per_sundstrom via Groups.Io 
> <[email protected]> wrote:
> 
> Hi,
> I want to exclusively use PXE/IPv6 when deploying a set of physical machines 
> with some QEMU/KVM virtual machines on top.
> 
> So far, the only [hacky] way I have managed to do this is to:
> 1) Bring up a VM with OVMF
> 2) Set the wanted boot-order with PXE over IPv6 at the top
> 3) Save this to the NVRAM
> 4) Repete the above for a set of VMs with different MAC addresse
> 5) Keep these NVRAMs as "canned" templates (with associated fixed MACs)
> 4) Later use one of these NVRAM as a template for VMs with the associated MAC 
> 
> Obviously this does not scale to hundreds of VMs
> 
> Reading through the code is seems that it might be possible to disable PXE 
> over IPv4 with
> the PCD variable "IPv4PXESupport" = <one byte binary zero>.
> 
> I have tried with
>     <qemu:arg value='-fw_cfg'/>
>     <qemu:arg 
> value='opt/ovmf/X-PcdIPv4PXESupport,file=/var/lib/libvirt/qemu/nvram/zero'/>
> 
> where the file is a one byte binary zero and I have verified that it shows up 
> in /sys/firmware/qemu_fw_cfg.
> linux-u7u9:/sys/firmware/qemu_fw_cfg/by_name # ls 
> opt/ovmf/X-PcdIPv4PXESupport/
> key  name  raw size
> linux-u7u9:/sys/firmware/qemu_fw_cfg/by_name # cat 
> opt/ovmf/X-PcdIPv4PXESupport/size 
> 1
> linux-u7u9:/sys/firmware/qemu_fw_cfg/by_name # od -b 
> opt/ovmf/X-PcdIPv4PXESupport/raw 
> 0000000 000
> Is this something that should work, or is this variable compiled in ?
> Are there other ways of acomplishing what I try to do ?
> 
> Thanks,
> 
>    /Per
> 


-=-=-=-=-=-=-=-=-=-=-=-
Groups.io Links: You receive all messages sent to this group.

View/Reply Online (#56503): https://edk2.groups.io/g/devel/message/56503
Mute This Topic: https://groups.io/mt/72590544/21656
Group Owner: [email protected]
Unsubscribe: https://edk2.groups.io/g/devel/unsub  [[email protected]]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to