Re: [Etherboot-developers] gPXE/Bootix incompatibility
Brought to you by:
marty_connor,
stefanhajnoczi
From: Alex Z. <ale...@eu...> - 2010-03-24 14:18:53
|
Miller, Shao wrote: > > You mentioned that Bootix uses this area to store the next filename to > fetch. I am assuming that you mean the 128-byte filename array portion > of the cached packet structure, which is intended to hold a > nul-terminated string. I'm confused though... Did you mean that if > Bootix wants to fetch files A, B, in that order, that Bootix first > writes B into the cached packet, then calls PXENV_TFTP_READ_FILE but for > file A? Or did you mean that it puts A in the field, then calls > PXENV_TFTP_READ_FILE for A? Hi Shao, thanks for your reply. It looks like pxboot (the Bootix NBP) is using cached_info[CACHED_INFO_BINL].dhcphdr.file for its own purposes, and so things go awry when pxe_set_cached_filename() updates this field. In more detail: 1. At the start of day pxboot calls PXENV_GET_CACHED_INFO and gets a pointer to cached_info[CACHED_INFO_BINL]. 2. pxboot then writes "pxboot" into cached_info[CACHED_INFO_BINL].dhcphdr.file. 3. pxboot then calls PXENV_TFTP_READ_FILE with filename "8DFF5B8B.opt". This fails but has the side effect of calling pxe_set_cached_filename() to set cached_info[CACHED_INFO_DHCPACK].dhcphdr.file and cached_info[CACHED_INFO_BINL].dhcphdr.file to "8DFF5B8B.opt" 4. pxboot then calls PXENV_TFTP_READ_FILE with filename "8DFF5B8B.opt.opt". This fails. However, if we change pxe_set_cached_filename() so that it only updates cached_info[CACHED_INFO_DHCPACK].dhcphdr.file and leaves cached_info[CACHED_INFO_BINL].dhcphdr.file then the last event becomes 4. pxboot then calls PXENV_TFTP_READ_FILE for file "pxboot.opt". This succeeds. This leads me to think that pxboot is using its pointer to cached_info[CACHED_INFO_BINL].dhcphdr.file to save the name of the next file to get (minus the ".opt" extension). Now, from the comments above pxenv_tftp_read_file() it looks like the reason we are updating these two cached filenames is in order to emulate a bug in an Intel ROM that NTLDR relies on. However, the same comments *suggest* that we may be able to get away with only updating cached_info[CACHED_INFO_DHCPACK].dhcphdr.file. Does anyone know if this is true? I.e. is the patch I sent previously a safe way to fix the Bootix incompatibility? Regards, Alex |