Changeset da74747 in mainline
- Timestamp:
- 2006-08-09T12:24:58Z (18 years ago)
- Branches:
- lfn, master, serial, ticket/834-toolchain-update, topic/msim-upgrade, topic/simplify-dev-export
- Children:
- 287920f
- Parents:
- e2882a7
- Location:
- kernel
- Files:
-
- 1 added
- 3 edited
- 8 moved
Legend:
- Unmodified
- Added
- Removed
-
kernel/arch/sparc64/Makefile.inc
re2882a7 rda74747 61 61 CONFIG_FB = y 62 62 63 ## Compile with support for i8042controller.63 ## Compile with support for z8530 controller. 64 64 # 65 65 66 CONFIG_ I8042= y67 CONFIG_ I8042_SUN = y68 DEFS += -DCONFIG_ I8042_SUN66 CONFIG_Z8530 = y 67 CONFIG_KBD_SUN = y 68 DEFS += -DCONFIG_KBD_SUN 69 69 70 70 ARCH_SOURCES = \ … … 89 89 arch/$(ARCH)/src/ddi/ddi.c \ 90 90 arch/$(ARCH)/src/drivers/tick.c \ 91 arch/$(ARCH)/src/drivers/ i8042.c91 arch/$(ARCH)/src/drivers/kbd.c -
kernel/arch/sparc64/include/drivers/z8530.h
re2882a7 rda74747 33 33 */ 34 34 35 #ifndef KERN_sparc64_ I8042_H_36 #define KERN_sparc64_ I8042_H_35 #ifndef KERN_sparc64_Z8530_H_ 36 #define KERN_sparc64_Z8530_H_ 37 37 38 38 #include <arch/types.h> … … 46 46 extern volatile uint8_t *kbd_virt_address; 47 47 48 static inline void i8042_data_write(uint8_t data)48 static inline void z8530_data_write(uint8_t data) 49 49 { 50 50 kbd_virt_address[DATA_REG] = data; 51 51 } 52 52 53 static inline uint8_t i8042_data_read(void)53 static inline uint8_t z8530_data_read(void) 54 54 { 55 55 return kbd_virt_address[DATA_REG]; 56 56 } 57 57 58 static inline uint8_t i8042_status_read(void)58 static inline uint8_t z8530_status_read(void) 59 59 { 60 60 return kbd_virt_address[STATUS_REG]; 61 61 } 62 62 63 static inline void i8042_command_write(uint8_t command)63 static inline void z8530_command_write(uint8_t command) 64 64 { 65 65 kbd_virt_address[COMMAND_REG] = command; -
kernel/arch/sparc64/src/console.c
re2882a7 rda74747 54 54 { 55 55 stdin = NULL; 56 57 fb_init(bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height, 58 bootinfo.screen.bpp, bootinfo.screen.scanline, true); 56 59 57 60 if (bootinfo.keyboard.addr) 58 61 kbd_init(); 59 60 fb_init(bootinfo.screen.addr, bootinfo.screen.width, bootinfo.screen.height,61 bootinfo.screen.bpp, bootinfo.screen.scanline, true);62 62 } 63 63 -
kernel/arch/sparc64/src/mm/page.c
re2882a7 rda74747 47 47 } 48 48 49 /** Map memory-mapped device into virtual memory. 50 * 51 * So far, only DTLB is used to map devices into memory. 52 * Chances are that there will be only a limited amount of 53 * devices that the kernel itself needs to lock in DTLB. 54 * 55 * @param physaddr Physical address of the page where the 56 * device is located. Must be at least 57 * page-aligned. 58 * @param size Size of the device's registers. Must not 59 * exceed 4M and must include extra space 60 * caused by the alignment. 61 * 62 * @return Virtual address of the page where the device is 63 * mapped. 64 */ 49 65 uintptr_t hw_map(uintptr_t physaddr, size_t size) 50 66 { … … 69 85 }; 70 86 87 ASSERT(ALIGN_UP(physaddr, PAGE_SIZE) == physaddr); 71 88 ASSERT(size <= 4*1024*1024); 72 89 -
kernel/genarch/include/kbd/i8042.h
re2882a7 rda74747 33 33 */ 34 34 35 #ifndef __I8042_H__36 #define __I8042_H__35 #ifndef KERN_I8042_H_ 36 #define KERN_I8042_H_ 37 37 38 #ifdef CONFIG_I8042_PC 39 #include <genarch/i8042/scanc_pc.h> 40 #endif 41 #ifdef CONFIG_I8042_SUN 42 #include <genarch/i8042/scanc_sun.h> 43 #endif 38 #include <genarch/kbd/scanc_pc.h> 44 39 45 40 #define SPECIAL '?' -
kernel/genarch/include/kbd/scanc_pc.h
re2882a7 rda74747 35 35 */ 36 36 37 #ifndef KERN_ I8042_PC_H_38 #define KERN_ I8042_PC_H_37 #ifndef KERN_SCANC_PC_H_ 38 #define KERN_SCANC_PC_H_ 39 39 40 40 #define SC_ESC 0x01 -
kernel/genarch/include/kbd/scanc_sun.h
re2882a7 rda74747 35 35 */ 36 36 37 #ifndef KERN_ I8042_SUN_H_38 #define KERN_ I8042_SUN_H_37 #ifndef KERN_SCANC_SUN_H_ 38 #define KERN_SCANC_SUN_H_ 39 39 40 40 #define SC_ESC 0x1d -
kernel/genarch/include/kbd/z8530.h
re2882a7 rda74747 1 1 /* 2 * Copyright (C) 200 6Jakub Jermar2 * Copyright (C) 2001-2004 Jakub Jermar 3 3 * All rights reserved. 4 4 * … … 27 27 */ 28 28 29 /** @addtogroup sparc6429 /** @addtogroup genarch 30 30 * @{ 31 31 */ 32 /** @file 32 /** 33 * @file 34 * @brief Headers for Zilog 8530 serial port / keyboard driver. 33 35 */ 34 36 35 #include <arch/drivers/i8042.h> 36 #include <genarch/i8042/i8042.h> 37 #include <arch/boot/boot.h> 38 #include <arch/types.h> 39 #include <arch/mm/page.h> 37 #ifndef KERN_Z8530_H_ 38 #define KERN_Z8530_H_ 40 39 41 volatile uint8_t *kbd_virt_address = NULL; 40 #include <genarch/kbd/scanc_sun.h> 42 41 43 void kbd_init() 44 { 45 kbd_virt_address = (uint8_t *) hw_map(bootinfo.keyboard.addr, LAST_REG); 46 i8042_init(); 47 } 42 #define SPECIAL '?' 43 44 extern char sc_primary_map[]; 45 extern char sc_secondary_map[]; 46 47 extern void z8530_init(void); 48 extern void z8530_poll(void); 49 extern void z8530_grab(void); 50 extern void z8530_release(void); 51 52 #endif 48 53 49 54 /** @} -
kernel/genarch/src/kbd/scanc_sun.c
re2882a7 rda74747 82 82 [0x29] = '=', 83 83 [0x2a] = '`', 84 [0x2b] = '\b', /* Backspace */84 [0x2b] = '\b', /* Backspace */ 85 85 [0x2c] = SPECIAL, /* Insert */ 86 86 [0x2d] = SPECIAL,
Note:
See TracChangeset
for help on using the changeset viewer.