changeset 187:977a23cdabeb

Merge from eCos master repository on 2001-10-05-16:42:53-BST
author jlarmour
date Fri, 05 Oct 2001 16:22:37 +0000
parents d60da272beeb
children ab68c1701603
files packages/devs/eth/mips/atlas/current/ChangeLog packages/devs/eth/mips/atlas/current/src/if_atlas.c packages/devs/eth/mips/atlas/current/src/saa9730.h packages/hal/arm/edb7xxx/current/include/hal_platform_ints.h packages/hal/i386/arch/current/ChangeLog packages/hal/i386/arch/current/cdl/hal_i386.cdl packages/hal/i386/arch/current/src/hal_misc.c packages/hal/i386/arch/current/src/i386_stub.c packages/hal/i386/arch/current/src/vectors.S packages/hal/i386/pc/current/ChangeLog packages/hal/i386/pc/current/include/plf_misc.h packages/hal/i386/pc/current/misc/redboot_FLOPPY.ecm packages/hal/i386/pc/current/src/plf_stub.c packages/hal/mips/arch/current/ChangeLog packages/hal/mips/arch/current/include/hal_arch.h packages/net/snmp/lib/current/ChangeLog packages/net/snmp/lib/current/include/config.h
diffstat 17 files changed, 220 insertions(+), 50 deletions(-) [+]
line wrap: on
line diff
--- a/packages/devs/eth/mips/atlas/current/ChangeLog
+++ b/packages/devs/eth/mips/atlas/current/ChangeLog
@@ -1,3 +1,9 @@
+2001-10-05  Jesper Skov  <jskov@redhat.com>
+
+	* src/if_atlas.c: Use new HAL endian conversion macros.
+
+	* src/saa9730.h: Deleted endian conversion macros.
+
 2001-02-15  Nick Garnett  <nickg@cygnus.co.uk>
 
 	* src/saa9730.h: 
--- a/packages/devs/eth/mips/atlas/current/src/if_atlas.c
+++ b/packages/devs/eth/mips/atlas/current/src/if_atlas.c
@@ -63,6 +63,7 @@
 #endif
 #include <cyg/infra/cyg_type.h>
 #include <cyg/hal/hal_arch.h>
+#include <cyg/hal/hal_endian.h>
 #include <cyg/hal/hal_intr.h>
 #include <cyg/hal/hal_cache.h>
 #include <cyg/infra/diag.h>
@@ -212,7 +213,7 @@ static void
     for (i = 0; i < SAA9730_BUFFERS; i++) {
         for (j = 0; j < SAA9730_TXPKTS_PER_BUFFER; j++) {
 	    memset(bufp, 0, 2048);
-	    *bufp = cpu_to_le32(TX_EMPTY);
+	    *bufp = CYG_CPU_TO_LE32(TX_EMPTY);
             spd->tx_buffer[i][j] = bufp;
             bufp += SAA9730_PACKET_SIZE/sizeof(*bufp);
 	}
@@ -234,7 +235,7 @@ static void
     // Enable RX buffer
     for (i = 0; i < SAA9730_RXPKTS_PER_BUFFER; i++) {
         p = spd->rx_buffer[buf_nr][i];
-        *p = cpu_to_le32(RX_READY);
+        *p = CYG_CPU_TO_LE32(RX_READY);
     }
 
     if (buf_nr)
@@ -261,7 +262,7 @@ static void
     for (i = 0; i < SAA9730_CAM_ENTRIES; i++) {
 	for (j = 0; j < 3; j++, cam_offset++) {
 	    SAA9730_CAMADR = cam_offset;
-	    SAA9730_CAMDAT = cpu_to_be32(abuf[j]);
+	    SAA9730_CAMDAT = CYG_CPU_TO_BE32(abuf[j]);
 	}
     }
 }
@@ -703,7 +704,7 @@ saa9730_send(struct eth_drv_sc *sc, stru
     }
 
     // Set transmit status WORD for hardware (LAN-DMA-ENGINE)
-    *pktstat = cpu_to_le32(TX_READY | pktlen);
+    *pktstat = CYG_CPU_TO_LE32(TX_READY | pktlen);
 
     // start hardware
     if (bindex == 0)
@@ -746,7 +747,7 @@ static void
     for (i = 0; i < SAA9730_BUFFERS; i++) {
         for (j = 1; j < SAA9730_RXPKTS_PER_BUFFER; j++) {
             pkt = spd->rx_buffer[i][j];
-            status = le32_to_cpu(*pkt);
+            status = CYG_LE32_TO_CPU(*pkt);
             size   = status & RXPACKET_STATUS_SIZE_MASK;
             flag   = status & RXPACKET_STATUS_FLAG_MASK;
             if (flag == RX_INVALID_STAT || size > 1514 || *(pkt - 1)) {
@@ -779,7 +780,7 @@ static void
 
     pktstat = spd->tx_buffer[bindex][pindex];
 
-    status = le32_to_cpu(*pktstat);
+    status = CYG_LE32_TO_CPU(*pktstat);
     if ((status & TXPACKET_STATUS_FLAG_MASK) != TX_HWDONE) {
 
 	hal_delay_us(1000);
@@ -804,7 +805,7 @@ static void
     for (pindex = 0; pindex < spd->tx_used[bindex]; pindex++) {
 	/* Check for error. */
 	pktstat = spd->tx_buffer[bindex][pindex];
-	status = le32_to_cpu(*pktstat);
+	status = CYG_LE32_TO_CPU(*pktstat);
 
 	if (status & TXPACKET_STATUS_ERROR) {
 	    if (status & TXPACKET_STATUS_EXDEFER)
@@ -823,7 +824,7 @@ static void
 		db_printf("tx sq\n");
 	}
 	/* free the space */
-	*pktstat = cpu_to_le32(TX_EMPTY);
+	*pktstat = CYG_CPU_TO_LE32(TX_EMPTY);
 
 	(sc->funs->eth_drv->tx_done)(sc, spd->tx_key[bindex][pindex], 1 /* status */);
     }
@@ -861,7 +862,7 @@ static void
         pkt = spd->rx_buffer[bindex][pindex];
 
 	// stop now if no more packets
-        if (((status = le32_to_cpu(*pkt)) & RXPACKET_STATUS_FLAG_MASK) == RX_READY)
+        if (((status = CYG_LE32_TO_CPU(*pkt)) & RXPACKET_STATUS_FLAG_MASK) == RX_READY)
             break;
 
 	// if this is the first packet in a buffer, switch the SAA9730 to
@@ -908,7 +909,7 @@ saa9730_recv(struct eth_drv_sc *sc, stru
 
     pkt = spd->rx_buffer[spd->next_rx_bindex][spd->next_rx_pindex];
 
-    status = le32_to_cpu(*pkt);
+    status = CYG_LE32_TO_CPU(*pkt);
     if (status & RXPACKET_STATUS_GOOD) {
 	// packet is good
 	pktlen = status & RXPACKET_STATUS_SIZE_MASK;
--- a/packages/devs/eth/mips/atlas/current/src/saa9730.h
+++ b/packages/devs/eth/mips/atlas/current/src/saa9730.h
@@ -121,32 +121,6 @@
 // This number is arbitrary and can be increased if needed
 #define SAA9730_MAX_MULTICAST_ADDRESSES           20 
 
-// These macros are machine dependent.  
-// They convert the big endian representation to the little endian
-// format, used by the DMA-engine of the LAN-controller on the PCI-bus.
-// Convert by BE:
-#ifdef MIPSEL
-#define cpu_to_le32(x) (x)
-#define le32_to_cpu(x) (x)
-#else
-#define cpu_to_le32(x) ((((cyg_uint32)(x)) << 24) |   \
-                       ((0x0000FF00UL & ((cyg_uint32)(x))) <<  8) |   \
-                       ((0x00FF0000UL & ((cyg_uint32)(x))) >>  8) |   \
-                       (((cyg_uint32)(x))  >> 24))
-#define le32_to_cpu(x) cpu_to_le32(x)
-#endif
-// Convert by LE:
-#ifdef MIPSEB
-#define cpu_to_be32( value ) (value)
-#define be32_to_cpu( value ) (value)
-#else
-#define cpu_to_be32(x) ((((cyg_uint32)(x)) << 24) |   \
-                       ((0x0000FF00UL & ((cyg_uint32)(x))) <<  8) |   \
-                       ((0x00FF0000UL & ((cyg_uint32)(x))) >>  8) |   \
-                       (((cyg_uint32)(x))  >> 24))
-#define be32_to_cpu(x) cpu_to_be32(x)
-#endif
-
 // SAA9730 Event Manager Registers
 #define SAA9730_EVM_ISR         *((volatile unsigned *)(__base + 0x02000))
 #define SAA9730_EVM_IER         *((volatile unsigned *)(__base + 0x02004))
--- a/packages/hal/arm/edb7xxx/current/include/hal_platform_ints.h
+++ b/packages/hal/arm/edb7xxx/current/include/hal_platform_ints.h
@@ -75,3 +75,28 @@
 #if defined(__EDB7209)
 #define CYGNUM_HAL_INTERRUPT_I2SINT     22
 #endif
+
+#define CYGNUM_HAL_ISR_MIN              0
+#if defined(__CL7111)
+#define CYGNUM_HAL_ISR_MAX              21
+#else
+#define CYGNUM_HAL_ISR_MAX              22
+#endif
+#define CYGNUM_HAL_ISR_COUNT            (CYGNUM_HAL_ISR_MAX+1)
+
+// The vector used by the Real time clock
+#define CYGNUM_HAL_INTERRUPT_RTC        CYGNUM_HAL_INTERRUPT_TC2OI
+
+
+
+//----------------------------------------------------------------------------
+// Reset.
+
+// Try and force the board into a reset state.  Since this hardware requires
+// a "wakeup" signal, we can't just use a watchdog/reset approach.
+externC void reset_platform(void);
+#define HAL_PLATFORM_RESET() reset_platform()
+
+#define HAL_PLATFORM_RESET_ENTRY 0xe0000000
+
+#endif // CYGONCE_HAL_PLATFORM_INTS_H
--- a/packages/hal/i386/arch/current/ChangeLog
+++ b/packages/hal/i386/arch/current/ChangeLog
@@ -1,3 +1,16 @@
+2001-10-05  Mark Salter  <msalter@redhat.com>
+
+	* src/vectors.S: Support separate stub stack.
+	(__syscall_tramp): Trampoline for GNUPRo syscalls (int $0x80).
+
+	* src/i386_stub.c (__is_bsp_syscall): New function.
+
+	* src/hal_misc.c (cyg_hal_exception_handler): Add mem fault handling.
+
+	* cdl/hal_i386.cdl: Add hal_syscalls.c to compile list.
+
+	* src/hal_syscall.c: New file. Support GNUPro syscalls.
+
 2001-10-01  Ian Campbell  <icampbell@arcom.co.uk>
 
 	* src/vectors.S: include CYGBLD_HAL_PLATFORM_H rather than
--- a/packages/hal/i386/arch/current/cdl/hal_i386.cdl
+++ b/packages/hal/i386/arch/current/cdl/hal_i386.cdl
@@ -52,7 +52,7 @@ cdl_package CYGPKG_HAL_I386 {
         necessary to select a specific target platform HAL
         package."
 
-    compile       hal_misc.c context.S i386_stub.c
+    compile       hal_misc.c context.S i386_stub.c hal_syscall.c
 
     make {
         <PREFIX>/lib/vectors.o : <PACKAGE>/src/vectors.S
--- a/packages/hal/i386/arch/current/src/hal_misc.c
+++ b/packages/hal/i386/arch/current/src/hal_misc.c
@@ -23,7 +23,7 @@
 //                                                                          
 // The Initial Developer of the Original Code is Red Hat.                   
 // Portions created by Red Hat are                                          
-// Copyright (C) 1998, 1999, 2000 Red Hat, Inc.                             
+// Copyright (C) 1998, 1999, 2000, 2001 Red Hat, Inc.                             
 // All Rights Reserved.                                                     
 // -------------------------------------------                              
 //                                                                          
@@ -90,11 +90,20 @@ cyg_hal_invoke_constructors (void)
 externC void __handle_exception (void);
 externC HAL_SavedRegisters *_hal_registers;
 
+externC void* volatile __mem_fault_handler;
+
 void
 cyg_hal_exception_handler(HAL_SavedRegisters *regs)
 {
 #if defined(CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS) && !defined(CYGPKG_CYGMON)
 
+    // If we caught an exception inside the stubs, see if we were expecting it
+    // and if so jump to the saved address
+    if (__mem_fault_handler) {
+        regs->pc = (CYG_ADDRWORD)__mem_fault_handler;
+        return; // Caught an exception inside stubs        
+    }
+
     _hal_registers = regs;
     __handle_exception();
     
--- a/packages/hal/i386/arch/current/src/i386_stub.c
+++ b/packages/hal/i386/arch/current/src/i386_stub.c
@@ -1,6 +1,6 @@
 /* i386_stub.c - helper functions for stub, generic to all i386 processors
  * 
- * Copyright (c) 1998,1999 Cygnus Solutions
+ * Copyright (c) 1998,1999, 2001 Cygnus Solutions
  *
  * The authors hereby grant permission to use, copy, modify, distribute,
  * and license this software and its documentation for any purpose, provided
@@ -22,6 +22,9 @@
 
 #include <pkgconf/hal.h>
 
+#ifdef CYGPKG_REDBOOT
+#include <pkgconf/redboot.h>
+#endif
 
 #ifdef CYGPKG_HAL_I386_SIM
 #error "GDB Stub support not implemented for i386 SIM"
@@ -106,6 +109,13 @@ int __get_trap_number (void)
 #endif        
 }
 
+#if defined(CYGSEM_REDBOOT_BSP_SYSCALLS)
+int __is_bsp_syscall(void) 
+{
+    return __get_trap_number() == 0x80;
+}
+#endif
+
 /* Set the currently-saved pc register value to PC. */
 
 void set_pc (target_register_t pc)
--- a/packages/hal/i386/arch/current/src/vectors.S
+++ b/packages/hal/i386/arch/current/src/vectors.S
@@ -23,7 +23,7 @@
 #                                                                          
 # The Initial Developer of the Original Code is Red Hat.                   
 # Portions created by Red Hat are                                          
-# Copyright (C) 1998, 1999, 2000 Red Hat, Inc.                             
+# Copyright (C) 1998, 1999, 2000, 2001 Red Hat, Inc.                             
 # All Rights Reserved.                                                     
 # -------------------------------------------                              
 #                                                                          
@@ -150,12 +150,47 @@ 1:	hlt
 __default_exception_vsr:
 
 	## We enter here with the CPU state still in the registers and:
-	##  0(%esp)	vector number pushed by trampoline
+	## 12(%esp)	EFLAGS pushed by hardware
+	##  8(%esp)	CS pushed by hardware
 	##  4(%esp)	PC pushed by hardware
-	##  8(%esp)	CS pushed by hardware
-	## 12(%esp)	EFLAGS pushed by hardware
+	##  0(%esp)	vector number pushed by trampoline
 
 	pusha			# save all registers
+
+#ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
+	mov	%esp,%ebp                 # save SP
+	cmpl	$__stub_stack_base,%esp   # compare SP with stub stack base
+	jb	1f                        # if sp < istack base, switch
+	cmpl	$__stub_stack,%esp        # compare SP with stub stack top
+	jbe	2f                        # if sp < stack top, dont switch
+1:
+	movl	$__stub_stack,%esp        # move to stub stack
+	
+	## We switched stacks with previous ESP in EBP
+	## 44(%ebp)	EFLAGS pushed by hardware
+	## 40(%ebp)	CS pushed by hardware
+	## 36(%ebp)	PC pushed by hardware
+	## 32(%ebp)	vector number pushed by trampoline
+	## 28(%ebp)	EAX
+	## 24(%ebp)	ECX
+	## 20(%ebp)	EDX
+	## 16(%ebp)	EBX
+	## 12(%ebp)	(ESP - 16)
+	##  8(%ebp)	EBP
+	##  4(%ebp)	ESI
+	##  0(%ebp)	EDI
+	
+	pushl	44(%ebp)		# copy EFLAGS from original stack
+	pushl	40(%ebp)		# copy CS
+	pushl	36(%ebp)		# copy PC
+	pushl	32(%ebp)		# copy vector number
+	pusha
+	movl	8(%ebp),%eax		# copy EBP
+	movl	%eax,8(%esp)
+	movl	12(%ebp),%eax		# copy ESP
+	movl	%eax,12(%esp)
+2:
+#endif
 	hal_fpu_push_exc	# save FPU state
 
 	mov	%esp,%edi	# save state pointer in EDI
@@ -176,6 +211,40 @@ 1:	hlt
 		
 
 	hal_fpu_pop_exc		# restore FPU state
+
+	## At this point, the stack contains:
+	## 44(%esp)	EFLAGS pushed by hardware
+	## 40(%esp)	CS pushed by hardware
+	## 36(%esp)	PC pushed by hardware
+	## 32(%esp)	vector number pushed by trampoline
+	## 28(%esp)	EAX
+	## 24(%esp)	ECX
+	## 20(%esp)	EDX
+	## 16(%esp)	EBX
+	## 12(%esp)	ESP
+	##  8(%esp)	EBP
+	##  4(%esp)	ESI
+	##  0(%esp)	EDI
+	
+#ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
+	movl	12(%esp),%ebp	# pre-exception ESP
+	sub	$48,%ebp	# adjust for current stack frame
+	cmpl	%esp,%ebp
+	je	1f
+
+	## need to switch stacks
+	xchg	%esp,%ebp
+	add	$48,%esp
+	pushl	44(%ebp)	# EFLAGS
+	pushl	40(%ebp)	# CS
+	pushl	36(%ebp)	# PC
+	mov	%ebp,%esp
+	popa
+	movl	-20(%esp),%esp	# popa doesn't restore %esp
+	sub	$12,%esp	# adjust for EFLAGS, CS, and PC
+	iret	
+1:
+#endif
 	popa			# restore all our registers.
 	addl	$4, %esp	# skip the vector number
                                 # Note: we do not need to re-adjust ESP
@@ -550,10 +619,17 @@ default_vsr_iret:
 	add $4,%esp
 	iret
 
+	# GNUPro apps use "int $0x80" for syscalls.
+        # There is no vsr table entry for this.
+	.global __syscall_tramp
+__syscall_tramp:
+	pushl $0x80
+	jmp __default_exception_vsr
+
 #==============================================================================
 # Initial and interrupt stack
 
-#ifndef CYG_HAL_PPC_INTERRUPT_STACK_DEFINED
+#ifndef CYG_HAL_I386_INTERRUPT_STACK_DEFINED
 	        
 	.bss
 
@@ -569,11 +645,24 @@ cyg_interrupt_stack_base:
 	.global cyg_interrupt_stack
 cyg_interrupt_stack:
 __interrupt_stack:
+        
+        .long   0,0,0,0,0,0,0,0
+#endif
 
-	.long	0,0,0,0,0,0,0,0	
+#ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
+	.global __stub_stack_base
+__stub_stack_base:
+	.rept CYGNUM_HAL_COMMON_INTERRUPTS_STACK_SIZE
+	.byte 0
+	.endr
+	.balign 16
+	.global __stub_stack
+__stub_stack:
+        
+        .long   0,0,0,0,0,0,0,0
+#endif
 
 
-#endif	
 		
 #------------------------------------------------------------------------------
 # end of vectors.S
--- a/packages/hal/i386/pc/current/ChangeLog
+++ b/packages/hal/i386/pc/current/ChangeLog
@@ -1,3 +1,12 @@
+2001-10-05  Mark Salter  <msalter@redhat.com>
+
+	* src/plf_stub.c (hal_pc_stubs_init): Install idt entry for GNUPro
+	syscalls.
+
+	* misc/redboot_FLOPPY.ecm: Turn on CYGSEM_REDBOOT_BSP_SYSCALLS.
+
+	* include/plf_misc.h: Add extern decl for cyg_hal_pc_set_idt_entry.
+
 2001-10-02  Jonathan Larmour  <jlarmour@redhat.com>
 
 	* cdl/hal_i386_pc.cdl 
--- a/packages/hal/i386/pc/current/include/plf_misc.h
+++ b/packages/hal/i386/pc/current/include/plf_misc.h
@@ -26,7 +26,7 @@
 //                                                                          
 // The Initial Developer of the Original Code is Red Hat.                   
 // Portions created by Red Hat are                                          
-// Copyright (C) 1998, 1999, 2000 Red Hat, Inc.                             
+// Copyright (C) 1998, 1999, 2000, 2001 Red Hat, Inc.                             
 // All Rights Reserved.                                                     
 // -------------------------------------------                              
 //                                                                          
@@ -67,6 +67,9 @@ void hal_platform_init(void) ;
 
 void hal_pc_reset(void) ;
 
+externC void cyg_hal_pc_set_idt_entry(CYG_ADDRESS routine,short *idtEntry);
+
+
 /*------------------------------------------------------------------------*/
 /* End of plf_misc.h                                                      */
 #endif //CYGONCE_PLF_MISC_H
--- a/packages/hal/i386/pc/current/misc/redboot_FLOPPY.ecm
+++ b/packages/hal/i386/pc/current/misc/redboot_FLOPPY.ecm
@@ -43,3 +43,8 @@ cdl_option CYGSEM_REDBOOT_VALIDATE_USER_
 #cdl_option CYGBLD_REDBOOT_FLASH_BOOT_OFFSET {
 #  inferred_value 0x1C00000
 #};
+
+cdl_option CYGSEM_REDBOOT_BSP_SYSCALLS {
+  user_value 1
+};
+
--- a/packages/hal/i386/pc/current/src/plf_stub.c
+++ b/packages/hal/i386/pc/current/src/plf_stub.c
@@ -27,7 +27,7 @@
 //                                                                          
 // The Initial Developer of the Original Code is Red Hat.                   
 // Portions created by Red Hat are                                          
-// Copyright (C) 1998, 1999, 2000 Red Hat, Inc.                             
+// Copyright (C) 1998, 1999, 2000, 2001 Red Hat, Inc.                             
 // All Rights Reserved.                                                     
 // -------------------------------------------                              
 //                                                                          
@@ -48,6 +48,10 @@
 
 #ifdef CYGDBG_HAL_DEBUG_GDB_INCLUDE_STUBS
 
+#ifdef CYGPKG_REDBOOT
+#include <pkgconf/redboot.h>
+#endif
+
 #include <cyg/hal/hal_stub.h>
 
 #include <cyg/hal/hal_io.h>             // HAL IO macros
@@ -60,12 +64,21 @@
 
 externC void __default_exception_vsr(void);
 
+#if defined(CYGSEM_REDBOOT_BSP_SYSCALLS)
+externC void __syscall_tramp(void);
+externC char idtStart[];
+#endif // CYGSEM_REDBOOT_BSP_SYSCALLS
+
+
 void hal_pc_stubs_init(void)
 {
     int i ;
     for(i=0; i<=31; i++)
         HAL_VSR_SET(i,&__default_exception_vsr,NULL);	
 
+#if defined(CYGSEM_REDBOOT_BSP_SYSCALLS)
+    cyg_hal_pc_set_idt_entry((CYG_ADDRESS)__syscall_tramp, (short *)(idtStart + (0x80 * 8)));
+#endif // CYGSEM_REDBOOT_BSP_SYSCALLS
 }
 
 
--- a/packages/hal/mips/arch/current/ChangeLog
+++ b/packages/hal/mips/arch/current/ChangeLog
@@ -1,3 +1,8 @@
+2001-10-05  Jesper Skov  <jskov@redhat.com>
+
+	* include/hal_arch.h: Provide CYGARC_CACHED_ADDRESS() and friends
+	without casting for use in assembler files.
+
 2001-09-17  Nick Garnett  <nickg@redhat.com>
 
 	* src/hal_misc.c (hal_delay_us): Rewrote this routine to work
--- a/packages/hal/mips/arch/current/include/hal_arch.h
+++ b/packages/hal/mips/arch/current/include/hal_arch.h
@@ -453,10 +453,14 @@ externC void hal_idle_thread_action(cyg_
 #define CYGARC_KSEG_UNCACHED                           (0xA0000000)
 #define CYGARC_KSEG_CACHED_BASE                        (0x80000000)
 #define CYGARC_KSEG_UNCACHED_BASE                      (0xA0000000)
+#ifndef __ASSEMBLER__
 #define CYGARC_CACHED_ADDRESS(x)                       ((((CYG_ADDRESS)(x)) & ~CYGARC_KSEG_MASK) | CYGARC_KSEG_CACHED)
 #define CYGARC_UNCACHED_ADDRESS(x)                     ((((CYG_ADDRESS)(x)) & ~CYGARC_KSEG_MASK) | CYGARC_KSEG_UNCACHED)
 #define CYGARC_PHYSICAL_ADDRESS(x)                     (((CYG_ADDRESS)(x)) & ~CYGARC_KSEG_MASK)
-#ifdef __ASSEMBLER__
+#else // __ASSEMBLER__
+#define CYGARC_CACHED_ADDRESS(x)                       ((((x)) & ~CYGARC_KSEG_MASK) | CYGARC_KSEG_CACHED)
+#define CYGARC_UNCACHED_ADDRESS(x)                     ((((x)) & ~CYGARC_KSEG_MASK) | CYGARC_KSEG_UNCACHED)
+#define CYGARC_PHYSICAL_ADDRESS(x)                     (((x)) & ~CYGARC_KSEG_MASK)
 #define CYGARC_ADDRESS_REG_CACHED(reg)                 \
         and     reg, reg, ~CYGARC_KSEG_MASK;           \
         or      reg, reg, CYGARC_KSEG_CACHED
--- a/packages/net/snmp/lib/current/ChangeLog
+++ b/packages/net/snmp/lib/current/ChangeLog
@@ -1,3 +1,7 @@
+2001-10-05  Jesper Skov  <jskov@redhat.com>
+
+	* include/config.h: CYGINT_ISO_DNS changed to bool.
+
 2001-09-24  Jesper Skov  <jskov@redhat.com>
 
 	* include/config.h: Define HAVE_GETHOSTBYNAME only if a DNS
--- a/packages/net/snmp/lib/current/include/config.h
+++ b/packages/net/snmp/lib/current/include/config.h
@@ -1163,7 +1163,7 @@ CONNECTION WITH THE USE OR PERFORMANCE O
 #define HAVE_LIBRPM 1
 
 /* define if you have gethostbyname */
-#if CYGINT_ISO_DNS
+#ifdef CYGINT_ISO_DNS
 # define HAVE_GETHOSTBYNAME 1
 #endif