PERFORCE change 118874 for review
Attilio Rao
attilio at freebsd.org
Tue May 1 18:38:45 UTC 2007
2007/4/29, Garrett Cooper <yanegomi at gmail.com>:
> Attilio Rao wrote:
> > Alexey Tarasov wrote:
> >> http://perforce.freebsd.org/chv.cgi?CH=118874
> >>
> >> Change 118874 by taleks at taleks_th on 2007/04/27 12:46:48
> >>
> >> added code from pxe.c. Now need to find way to install NIC irq
> >> handler.
> >>
> >> Affected files ...
> >>
> >> .. //depot/projects/soc2007/taleks-pxe_http/pxe_core.c#3 edit
> >> .. //depot/projects/soc2007/taleks-pxe_http/pxe_core.h#3 edit
> >>
> >> Differences ...
> >>
> >> ==== //depot/projects/soc2007/taleks-pxe_http/pxe_core.c#3 (text+ko) ====
> >>
> >> @@ -1,8 +1,38 @@
> >> +#include <stand.h>
> >> +#include <string.h>
> >> #include "pxe_core.h"
> >> #include "pxe_mem.h"
> >> #include "pxe_ip.h"
> >> #include "pxe_mutex.h"
> >>
> >> +#include "btxv86.h"
> >> +#include "pxe.h"
> >> +
> >> +
> >> +/* PXE API calls here will be made in same way as in pxeboot.
> >> + the only difference - installation of isr, that was not needed in
> >> pxe.c.
> >> + main problem is that, v86 monitors reflects interrupts,
> >> + we need to change IDT, for correct irq and call pxe_core_isr()
> >> from it.
> >> +*/
> >> +
> >> +/* NOTE: to think about using of this buffers */
> >> +#define PXE_BUFFER_SIZE 0x2000
> >> +#define PXE_TFTP_BUFFER_SIZE 512
> >> +static char scratch_buffer[PXE_BUFFER_SIZE];
> >> +static char data_buffer[PXE_BUFFER_SIZE];
> >> +static pxenv_t *pxenv_p = NULL; /* PXENV+ */
> >> +static pxe_t *pxe_p = NULL; /* !PXE */
> >> +static BOOTPLAYER bootplayer; /* PXE Cached information. */
> >> +
> >> +/* defined in pxetramp.s */
> >> +extern u_int16_t __bangpxeseg;
> >> +extern u_int16_t __bangpxeoff;
> >> +extern void __bangpxeentry(void);
> >> +extern u_int16_t __pxenvseg;
> >> +extern u_int16_t __pxenvoff;
> >> +extern void __pxenventry(void);
> >> +
> >> +/**/
> >
> > Could you, please, use here uint16_t instead than u_int16_t as style(9)
> > suggests?
> >
> > Attilio
>
> Just checking, but is this the same for other data types, i.e.
> u_int_32_t => uint32_t?
>
> I'm asking because I'm working with the BDB code, and I think it's using
> C99 or older format data elements / types.
Following style(9), you should only use uintXX_t (where XX is a number
of 8, 16, 32, etc.) since it follows ANSI C.
Attilio
--
Peace can only be achieved by understanding - A. Einstein
More information about the p4-projects
mailing list