Skip to contentSkip to conversation

linux varenet

parisc-linux Thibaut VARENE 1 participant 1 message Oct 3, 2002 1 message not in the archive

Subsystems (2)
lore
Share & tools
lore
#1 lore raw
In reply to a message not in the archive
Quoted 14 lines · Thibaut Varene

CVSROOT: /var/cvs
Module name: linux
Changes by: varenet 02/10/03 09:33:30

Modified files:
. : Makefile
arch/parisc/kernel: Makefile firmware.c power.c process.c
setup.c traps.c
arch/parisc/mm : init.c
include/asm-parisc: pdc.h
Added files:
arch/parisc/kernel: pdc_chassis.c include/asm-parisc: pdc_chassis.h

Quoted 4 lines

Log message:
Implemented LED Panel support (Run/Attn/Fault) for E-class and PDC_PAT boxes. Implemented GSP Logging facility for PDC_PAT boxes.

These changes have been successfully tested so far on A500, B2600, B132 and E35.

We don't know yet if there are other machines that features the same LED Panel than the E series.

HTH,

Signature · 3 lines
Thibaut VARENE
PA/Linux ESIEE Team
http://pateam.esiee.fr/
Makefile +1 -1
diff -Nru -x CVS linux.orig-pa20/Makefile linux/Makefile
@@ -1,7 +1,7 @@
 VERSION = 2
 PATCHLEVEL = 4
 SUBLEVEL = 19
-EXTRAVERSION = -pa20
+EXTRAVERSION = -pa21
 
 KERNELRELEASE=$(VERSION).$(PATCHLEVEL).$(SUBLEVEL)$(EXTRAVERSION)
 
arch/parisc/kernel/Makefile +1 -1
diff -Nru -x CVS linux.orig-pa20/arch/parisc/kernel/Makefile linux/arch/parisc/kernel/Makefile
@@ -24,7 +24,7 @@
 		pa7300lc.o syscall.o entry.o sys_parisc.o firmware.o \
 		ptrace.o hardware.o inventory.o drivers.o semaphore.o \
 		signal.o hpmc.o real2.o parisc_ksyms.o unaligned.o \
-		processor.o power.o
+		processor.o power.o pdc_chassis.o
 
 export-objs	:= parisc_ksyms.o superio.o keyboard.o
 
arch/parisc/kernel/firmware.c +40 -1

50 lines not on this page · raw message

arch/parisc/kernel/pdc_chassis.c +204 -0

204 lines not on this page · raw message

arch/parisc/kernel/power.c +1 -1
diff -Nru -x CVS linux.orig-pa20/arch/parisc/kernel/power.c linux/arch/parisc/kernel/power.c
@@ -47,10 +47,10 @@
 
 #include <asm/gsc.h>
 #include <asm/pdc.h>
+#include <asm/pdc_chassis.h>
 #include <asm/irq.h>
 #include <asm/io.h>
 #include <asm/led.h>
-#include <asm/led.h>
 #include <asm/uaccess.h>
 
 
arch/parisc/kernel/process.c +7 -0
diff -Nru -x CVS linux.orig-pa20/arch/parisc/kernel/process.c linux/arch/parisc/kernel/process.c
@@ -27,6 +27,7 @@
 #include <linux/version.h>
 #include <linux/elf.h>
 #include <linux/personality.h>
+#include <linux/config.h>
 
 #include <asm/machdep.h>
 #include <asm/offset.h>
@@ -36,6 +37,7 @@
 #include <asm/io.h>
 #include <asm/gsc.h>
 #include <asm/processor.h>
+#include <asm/pdc_chassis.h>
 
 int hlt_counter;
 
@@ -118,6 +120,9 @@
 	/* "Normal" system reset */
 	pdc_do_reset();
 
+	/* set up a new led state on systems shipped with a LED State panel */
+	pdc_chassis_send_status(PDC_CHASSIS_DIRECT_SHUTDOWN);
+	
 	/* Nope...box should reset with just CMD_RESET now */
 	gsc_writel(CMD_RESET, COMMAND_GLOBAL);
 
@@ -150,6 +155,8 @@
 	 * following call will immediately power off. */
 	pdc_soft_power_button(0);
 
+	pdc_chassis_send_status(PDC_CHASSIS_DIRECT_SHUTDOWN);
+	
 	/* It seems we have no way to power the system off via
 	 * software. The user has to press the button himself. */
 
arch/parisc/kernel/setup.c +6 -0
diff -Nru -x CVS linux.orig-pa20/arch/parisc/kernel/setup.c linux/arch/parisc/kernel/setup.c
@@ -41,6 +41,7 @@
 #include <asm/processor.h>
 #include <asm/pdc.h>
 #include <asm/led.h>
+#include <asm/pdc_chassis.h>
 #include <asm/machdep.h>	/* for pa7300lc_init() proto */
 
 #define COMMAND_LINE_SIZE 1024
@@ -283,6 +284,11 @@
 	parisc_init_resources();
 	do_device_inventory();                  /* probe for hardware */
 
+	parisc_pdc_chassis_init();
+
+	/* set up a new led state on systems shipped LED State panel */
+	pdc_chassis_send_status(PDC_CHASSIS_DIRECT_BSTART);
+	
 	processor_init();
 	printk(KERN_INFO "CPU(s): %d x %s at %d.%06d MHz\n",
 			boot_cpu_data.cpu_count,
arch/parisc/kernel/traps.c +19 -2
diff -Nru -x CVS linux.orig-pa20/arch/parisc/kernel/traps.c linux/arch/parisc/kernel/traps.c
@@ -34,6 +34,7 @@
 #include <asm/atomic.h>
 #include <asm/smp.h>
 #include <asm/pdc.h>
+#include <asm/pdc_chassis.h>
 
 #include "../math-emu/math-emu.h"	/* for handle_fpe() */
 
@@ -487,6 +488,10 @@
 
 	case  1:
 		/* High-priority machine check (HPMC) */
+
+		/* set up a new led state on systems shipped with a LED State panel */
+		pdc_chassis_send_status(PDC_CHASSIS_DIRECT_HPMC);
+
 		parisc_terminate("High Priority Machine Check (HPMC)",
 				regs, code, 0);
 		/* NOT REACHED */
@@ -506,6 +511,9 @@
 
 	case  5:
 		/* Low-priority machine check */
+
+		pdc_chassis_send_status(PDC_CHASSIS_DIRECT_LPMC);
+
 		flush_all_caches();
 		cpu_lpmc(5, regs);
 		return;
@@ -578,6 +586,9 @@
 	case 17:
 		/* Non-access data TLB miss fault/Non-access data page fault */
 		/* TODO: Still need to add slow path emulation code here */
+		
+		pdc_chassis_send_status(PDC_CHASSIS_DIRECT_PANIC);
+
 		fault_address = regs->ior;
 		parisc_terminate("Non access data tlb fault!",regs,code,fault_address);
 
@@ -690,6 +701,9 @@
 			force_sig_info(SIGBUS, &si, current);
 			return;
 		}
+		
+		pdc_chassis_send_status(PDC_CHASSIS_DIRECT_PANIC);
+
 		parisc_terminate("Unexpected interruption", regs, code, 0);
 		/* NOT REACHED */
 	}
@@ -718,8 +732,11 @@
 	     * The kernel should never fault on its own address space.
 	     */
 
-	    if (fault_space == 0)
-		    parisc_terminate("Kernel Fault", regs, code, fault_address);
+	    if (fault_space == 0) {
+		pdc_chassis_send_status(PDC_CHASSIS_DIRECT_PANIC);
+
+		parisc_terminate("Kernel Fault", regs, code, fault_address);
+	    }
 	}
 
 #ifdef CONFIG_KWDB
arch/parisc/mm/init.c +4 -0
diff -Nru -x CVS linux.orig-pa20/arch/parisc/mm/init.c linux/arch/parisc/mm/init.c
@@ -21,6 +21,7 @@
 
 #include <asm/pgalloc.h>
 #include <asm/tlb.h>
+#include <asm/pdc_chassis.h>
 
 mmu_gather_t mmu_gathers[NR_CPUS];
 
@@ -409,6 +410,9 @@
 	}
 
 	printk("%luk freed\n", (unsigned long)(&__init_end - &__init_begin) >> 10);
+
+	/* set up a new led state on systems shipped LED State panel */
+	pdc_chassis_send_status(PDC_CHASSIS_DIRECT_BCOMPLETE);
 }
 
 /*
include/asm-parisc/pdc.h +4 -1
diff -Nru -x CVS linux.orig-pa20/include/asm-parisc/pdc.h linux/include/asm-parisc/pdc.h
@@ -476,7 +476,7 @@
 #define PDC_TYPE_SYSTEM_MAP	 1 /* 32-bit, but supports PDC_SYSTEM_MAP */
 #define PDC_TYPE_SNAKE		 2 /* Doesn't support SYSTEM_MAP */
 
-#define is_pdc_pat()    (pdc_type == PDC_TYPE_PAT)
+#define is_pdc_pat()	(pdc_type == PDC_TYPE_PAT)
 
 struct pdc_chassis_info {       /* for PDC_CHASSIS_INFO */
 	unsigned long actcnt;   /* actual number of bytes returned */
@@ -915,6 +915,7 @@
 
 int pdc_add_valid(unsigned long address);
 int pdc_chassis_info(struct pdc_chassis_info *chassis_info, void *led_info, unsigned long len);
+int pdc_chassis_disp(unsigned long disp);
 int pdc_coproc_cfg(struct pdc_coproc_cfg *pdc_coproc_info);
 int pdc_iodc_read(unsigned long *actcnt, unsigned long hpa, unsigned int index,
 		  void *iodc_data, unsigned int iodc_data_size);
@@ -961,6 +962,8 @@
                  unsigned long glob_cfg);
 
 #ifdef __LP64__
+int pdc_pat_chassis_send_log(unsigned long status, unsigned long data);
+
 int pdc_pat_cell_get_number(struct pdc_pat_cell_num *cell_info);
 int pdc_pat_cell_module(unsigned long *actcnt, unsigned long ploc, unsigned long mod,
 			unsigned long view_type, void *mem_addr);
include/asm-parisc/pdc_chassis.h +382 -0

382 lines not on this page · raw message