PXE legacy & efi co-existence

This does not seem to be well documented but looking into /etc/init.d/dnsmasq I found solution

config match
        option networkid 'set:bios'
        option match '60,PXEClient:Arch:00000'
config match
        option networkid 'set:efi64'
        option match '60,PXEClient:Arch:00009'
config match
        option networkid 'set:efi64'
        option match '60,PXEClient:Arch:00007'
config boot
        option filename         'tag:bios,bios/pxelinux.0'
        option serveraddress    '192.168.1.1'
        option servername       'router'
config boot
        option filename         'tag:efi64,efi64/syslinux.efi'
        option serveraddress    '192.168.1.1'
        option servername       'router'