Re: includes in sys/amd64/amd64/mem.c

From: Conrad J. Sabatier (conrads_at_cox.net)
Date: 08/02/04

  • Next message: Conrad J. Sabatier: "Re: includes in sys/amd64/amd64/mem.c"
    Date: Sun, 01 Aug 2004 20:16:50 -0500 (CDT)
    To: Mark Murray <markm@FreeBSD.ORG>
    
    

    On 01-Aug-2004 Mark Murray wrote:
    > "Conrad J. Sabatier" writes:
    >> Curious. I compared the includes in mem.c for each architecture and
    >> found that amd64 is the only one that doesn't include <sys/kernel.h>.
    >> Is this an oversight?
    >
    > Could be. Could you try adding that and see if it fixes things? I
    > don't have access to a working AMD64 right now.
    >
    >> Still waiting for the kernel build breakage on amd64 to be fixed.
    >> I'm at a loss, myself.
    >
    > Erm, could you post the errors you see?

    Sorry. They were posted in another thread, but I'll provide them
    again.

    Adding "#include <sys/kernel.h>" *almost* fixes things, but there are
    still some missing defines (from sys/amd64/include/vmparam.h, which is
    not being included either).

    In /etc/make.conf:

    COPTFLAGS= -O2 -pipe -march=athlon64 -m64

    cc -c -O2 -pipe -march=athlon64 -m64 -fno-strict-aliasing -Wall
    -Wredundant-decls -Wnested-externs -Wstrict-prototypes
    -Wmissing-prototypes -Wpointer-arith -Winline -Wcast-qual
    -fformat-extensions -std=c99 -g -nostdinc -I- -I. -I/usr/src/sys
    -I/usr/src/sys/contrib/dev/acpica -I/usr/src/sys/contrib/altq
    -I/usr/src/sys/contrib/ipfilter -I/usr/src/sys/contrib/pf
    -I/usr/src/sys/contrib/dev/ath -I/usr/src/sys/contrib/dev/ath/freebsd
    -I/usr/src/sys/contrib/ngatm -D_KERNEL -include opt_global.h
    -fno-common -finline-limit=8000 --param inline-unit-growth=100 --param
    large-function-growth=1000 -fno-builtin -fno-omit-frame-pointer
    -mcmodel=kernel -mno-red-zone -mfpmath=387 -mno-sse -mno-sse2 -mno-mmx
    -mno-3dnow -msoft-float -fno-asynchronous-unwind-tables -ffreestanding
    -Werror /usr/src/sys/amd64/amd64/mem.c
    /usr/src/sys/amd64/amd64/mem.c: In function `memrw':
    /usr/src/sys/amd64/amd64/mem.c:97: warning: implicit declaration of
    function `PHYS_TO_DMAP'
    /usr/src/sys/amd64/amd64/mem.c:97: warning: nested extern declaration
    of `PHYS_TO_DMAP'
    /usr/src/sys/amd64/amd64/mem.c:97: warning: cast to pointer from
    integer of different size
    /usr/src/sys/amd64/amd64/mem.c:103: error: `DMAP_MIN_ADDRESS'
    undeclared (first use in this function)
    /usr/src/sys/amd64/amd64/mem.c:103: error: (Each undeclared identifier
    is reported only once
    /usr/src/sys/amd64/amd64/mem.c:103: error: for each function it appears
    in.)
    /usr/src/sys/amd64/amd64/mem.c:103: error: `DMAP_MAX_ADDRESS'
    undeclared (first use in this function)
    /usr/src/sys/amd64/amd64/mem.c:104: warning: implicit declaration of
    function `DMAP_TO_PHYS'
    /usr/src/sys/amd64/amd64/mem.c:104: warning: nested extern declaration
    of `DMAP_TO_PHYS'
    /usr/src/sys/amd64/amd64/mem.c:118: error: `KERNBASE' undeclared (first
    use in this function)
    *** Error code 1

    Stop in /usr/obj/usr/src/sys/CUSTOM.

    Adding '#include "/usr/src/sys/amd64/include/vmparam.h"' to mem.c (I
    know this is a hack) produces this:

    linking kernel.debug
    amd64_mem.o(.text+0xa7a): In function `amd64_mrinit':
    /usr/src/sys/amd64/amd64/amd64_mem.c:562: undefined reference to
    `M_MEMDESC'
    mem.o(.text+0x30c): In function `memioctl':
    /usr/src/sys/amd64/amd64/mem.c:185: undefined reference to `M_MEMDESC'
    mem.o(.text+0x332):/usr/src/sys/amd64/amd64/mem.c:192: undefined
    reference to `M_MEMDESC'
    mem.o(.text+0x35a):/usr/src/sys/amd64/amd64/mem.c:200: undefined
    reference to `M_MEMDESC'
    mem.o(.text+0x38a):/usr/src/sys/amd64/amd64/mem.c:207: undefined
    reference to `M_MEMDESC'
    *** Error code 1

    Stop in /usr/obj/usr/src/sys/CUSTOM.

    -- 
    Conrad J. Sabatier <conrads@cox.net> -- "In Unix veritas"
    _______________________________________________
    freebsd-current@freebsd.org mailing list
    http://lists.freebsd.org/mailman/listinfo/freebsd-current
    To unsubscribe, send any mail to "freebsd-current-unsubscribe@freebsd.org"
    

  • Next message: Conrad J. Sabatier: "Re: includes in sys/amd64/amd64/mem.c"

    Relevant Pages

    • Re: interpretation of event id 51 (source disk)
      ... There seem to be many reasons for the warning but ... Raid controller, RAM, disk or even something else? ... There is a field "error code" which seems to ... Do you have any idea where to find this reference? ...
      (microsoft.public.windows.server.general)
    • Re: IntelliStation 185 ?
      ... where you can check for AAxxxxxx error code which will lead you to: ... Partition firmware reference codes ... When you find a BAxx ... then follow the actions indicated to resolve the boot problem. ...
      (comp.unix.aix)
    • Re: cf-card in pccard slot panics kernel 6.0 BETA and rc1 at boottime
      ... > Any chance for a trace? ... *** Error code 1 ...
      (freebsd-current)
    • Fwd: 6.2 custom kernel build HELP
      ... Begin forwarded message: ... 6.2 custom kernel build HELP ... reference to `ng_parse_struct_type' ... *** Error code 1 ...
      (freebsd-questions)
    • PRJ0019: A tool returned an error code from....
      ... A tool returned an error code from "Copying assemblies ... to target directory..." ... I got this when I added a reference to a project. ... Now if I copy the dll itself over to ...
      (microsoft.public.dotnet.languages.vc)